File fix-configure.patch of Package libcpucycles
Index: libcpucycles-20250925/configure
===================================================================
--- libcpucycles-20250925.orig/configure
+++ libcpucycles-20250925/configure
@@ -56,7 +56,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
@@ -298,13 +298,13 @@ makefile = M + makefile
# ----- 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
# ----- make default
-M = f'default: package/lib/libcpucycles.a package/lib/libcpucycles.{so} package/lib/libcpucycles.{so1} \\\n'
+M = f'default: package/lib/libcpucycles.{so} package/lib/libcpucycles.{so1} \\\n'
M += 'commands\n'
M += '\n'
makefile = M + makefile
Index: libcpucycles-20250925/scripts-build/install
===================================================================
--- libcpucycles-20250925.orig/scripts-build/install
+++ libcpucycles-20250925/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)
Index: libcpucycles-20250925/configure
===================================================================
--- libcpucycles-20250925.orig/configure
+++ libcpucycles-20250925/configure
@@ -145,14 +145,14 @@ os.chmod('build/%s/scripts/compiledefaul
# ----- libcpucycles
os.makedirs('build/%s/cpucycles' % host,exist_ok=True)
-os.makedirs('build/%s/package/man/man1' % host,exist_ok=True)
-os.makedirs('build/%s/package/man/man3' % host,exist_ok=True)
+os.makedirs('build/%s/package/share/man/man1' % host,exist_ok=True)
+os.makedirs('build/%s/package/share/man/man3' % host,exist_ok=True)
dirlinksym('build/%s/cpucycles'%host,'cpucycles.h','../src/cpucycles/cpucycles.h')
dirlinksym('build/%s/cpucycles'%host,'cpucycles_internal.h','../src/cpucycles/cpucycles_internal.h')
shutil.copy2('cpucycles/cpucycles.h','build/%s/package/include/cpucycles.h'%host)
-shutil.copy2('doc/man/cpucycles-info.1','build/%s/package/man/man1/cpucycles-info.1'%host)
-shutil.copy2('doc/man/cpucycles.3','build/%s/package/man/man3/cpucycles.3'%host)
+shutil.copy2('doc/man/cpucycles-info.1','build/%s/package/share/man/man1/cpucycles-info.1'%host)
+shutil.copy2('doc/man/cpucycles.3','build/%s/package/share/man/man3/cpucycles.3'%host)
with open('build/%s/cpucycles/compile-ticks' % host,'w') as f:
f.write('#!/bin/sh\n')