File fix-configure.patch of Package librandombytes
Index: librandombytes-20240318/configure
===================================================================
--- librandombytes-20240318.orig/configure
+++ librandombytes-20240318/configure
@@ -63,7 +63,7 @@ for arg in sys.argv[1:]:
if arg == '--nodarwin':
darwin = False
continue
- raise ValueError('unrecognized argument %s' % arg)
+ # raise ValueError('unrecognized argument %s' % arg)
echoargs = './configure'
echoargs += ' --prefix=%s' % prefix
@@ -200,10 +200,10 @@ for dir in 'kernel','openssl','include':
objects[dir] += ['%s/%s.o'%(dir,base)]
for impl in sorted(objects):
- M = 'package/lib/lib%s-%s.a: scripts/staticlib %s\n' % (projectlibrary,impl,' '.join(objects[impl]))
- M += '\tscripts/staticlib lib%s-%s %s\n' % (projectlibrary,impl,' '.join(objects[impl]))
- M += '\n'
- makefile = M + makefile
+ # M = 'package/lib/lib%s-%s.a: scripts/staticlib %s\n' % (projectlibrary,impl,' '.join(objects[impl]))
+ # M += '\tscripts/staticlib lib%s-%s %s\n' % (projectlibrary,impl,' '.join(objects[impl]))
+ # M += '\n'
+ # makefile = M + makefile
M = f'package/lib/lib%s-%s.{so1}: scripts/sharedlib %s\n' % (projectlibrary,impl,' '.join(objects[impl]))
if impl == 'openssl':
@@ -282,14 +282,14 @@ makefile = M + makefile
for manpage in sorted(os.listdir('doc/man')):
section = 'man%s' % manpage[-1]
- targetdir = 'build/%s/package/man/%s' % (host,section)
+ targetdir = 'build/%s/package/share/man/%s' % (host,section)
os.makedirs(targetdir,exist_ok=True)
shutil.copy2('doc/man/%s'%manpage,'%s/%s'%(targetdir,manpage))
# ----- make install
M = 'install: scripts/install default\n'
-M += '\tscripts/install %s\n' % prefix
+M += '\tscripts/install ${DESTDIR}/usr \n'
M += '\n'
makefile = M + makefile
@@ -297,10 +297,10 @@ makefile = M + makefile
M = 'default: \\\n'
for impl in sorted(objects):
- M += 'package/lib/lib%s-%s.a \\\n' % (projectlibrary,impl)
+ # M += 'package/lib/lib%s-%s.a \\\n' % (projectlibrary,impl)
M += f'package/lib/lib%s-%s.{so} \\\n' % (projectlibrary,impl)
M += f'package/lib/lib%s-%s.{so1} \\\n' % (projectlibrary,impl)
-M += 'package/lib/lib%s.a \\\n' % projectlibrary
+# M += 'package/lib/lib%s.a \\\n' % projectlibrary
M += f'package/lib/lib%s.{so} \\\n' % projectlibrary
M += f'package/lib/lib%s.{so1} \\\n' % projectlibrary
M += 'commands\n'
Index: librandombytes-20240318/scripts-build/install
===================================================================
--- librandombytes-20240318.orig/scripts-build/install
+++ librandombytes-20240318/scripts-build/install
@@ -4,15 +4,19 @@ import os
import sys
import shutil
import tempfile
+import platform
prefix = sys.argv[1]
-dirs = 'man/man1','man/man3','lib','include','bin'
+dirs = 'share/man/man1','share/man/man3','lib','include','bin'
install = {}
os.umask(0o22)
for target in dirs:
+ # Install under /lib64 when CPU is 64 bit
install[target] = '%s/%s'%(prefix,target)
+ if (target == 'lib' and platform.architecture()[0] == '64bit'):
+ install[target] = '%s/%s'%(prefix,'lib64')
os.makedirs(install[target],exist_ok=True)
os.umask(0o77)