mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
update to libcpucycles-20260105, from Miguel Landaeta (maintainer)
i added a post-install to remove the linux-specific "cpucycles-open"
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
COMMENT= library for counting CPU cycles
|
||||
|
||||
V= 20250925
|
||||
V= 20260105
|
||||
DISTNAME= libcpucycles-${V}
|
||||
SHARED_LIBS+= cpucycles 0.0 # 1.0
|
||||
CATEGORIES= misc
|
||||
@@ -26,5 +26,11 @@ CONFIGURE_ARGS+= --prefix="${WRKINST}${PREFIX}" \
|
||||
--soversion="${LIBcpucycles_VERSION}"
|
||||
ALL_TARGET=
|
||||
MAKE_FLAGS+= LIBcpucycles_VERSION=${LIBcpucycles_VERSION}
|
||||
FAKE_FLAGS= DESTDIR=
|
||||
|
||||
# just pokes at linux procfs/sysfs
|
||||
post-install:
|
||||
rm ${PREFIX}/bin/cpucycles-open \
|
||||
${PREFIX}/man/man1/cpucycles-open.1
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SHA256 (libcpucycles-20250925.tar.gz) = YjE9Qq1aPL2NQan7cIjtwyjvSZ1Cbh8ZFhIzHQ/L4wE=
|
||||
SIZE (libcpucycles-20250925.tar.gz) = 48447
|
||||
SHA256 (libcpucycles-20260105.tar.gz) = 6H3KqijpBbV0zPPUniPgXHPts/mRNtzVZryhaCmrZpQ=
|
||||
SIZE (libcpucycles-20260105.tar.gz) = 58997
|
||||
|
||||
@@ -3,7 +3,7 @@ Fix library soname.
|
||||
Index: configure
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -10,6 +10,7 @@
|
||||
@@ -10,6 +10,7 @@ import tempfile
|
||||
prefix = '/usr/local'
|
||||
clean = True
|
||||
darwin = platform.system() == 'Darwin'
|
||||
@@ -11,7 +11,7 @@ Index: configure
|
||||
|
||||
def hostsanitize(host):
|
||||
host = host.split('-')[0]
|
||||
@@ -43,6 +44,9 @@
|
||||
@@ -51,6 +52,9 @@ for arg in sys.argv[1:]:
|
||||
if arg.startswith('--host='):
|
||||
host = hostsanitize(arg[7:])
|
||||
continue
|
||||
@@ -21,15 +21,15 @@ Index: configure
|
||||
if arg == '--clean':
|
||||
clean = True
|
||||
continue
|
||||
@@ -60,6 +64,7 @@
|
||||
@@ -68,6 +72,7 @@ for arg in sys.argv[1:]:
|
||||
echoargs = './configure'
|
||||
echoargs += ' --prefix=%s' % prefix
|
||||
echoargs += ' --host=%s' % host
|
||||
+echoargs += ' --soversion=%s' % soversion
|
||||
if clean: echoargs += ' --clean'
|
||||
if not clean: echoargs += ' --noclean'
|
||||
if not clean: echoargs += ' --no-clean'
|
||||
if darwin: echoargs += ' --darwin'
|
||||
@@ -96,7 +101,7 @@
|
||||
@@ -104,7 +109,7 @@ dirlinksym('build/%s/scripts'%host,'install','../src/s
|
||||
# ----- shared-library variations
|
||||
|
||||
so = 'dylib' if darwin else 'so'
|
||||
@@ -38,7 +38,7 @@ Index: configure
|
||||
soname = 'install_name' if darwin else 'soname'
|
||||
syslibs = '-lm' if darwin else '-lm -lrt'
|
||||
|
||||
@@ -245,17 +250,11 @@
|
||||
@@ -258,17 +263,11 @@ with open('build/%s/scripts/sharedlib' % host,'w') as
|
||||
f.write(f'chmod 644 package/lib/libcpucycles.{so1}\n')
|
||||
os.chmod('build/%s/scripts/sharedlib' % host,0o755)
|
||||
|
||||
@@ -57,7 +57,7 @@ Index: configure
|
||||
# ----- command
|
||||
|
||||
os.makedirs('build/%s/command'%host)
|
||||
@@ -284,8 +283,8 @@
|
||||
@@ -308,8 +307,8 @@ for fn in sorted(os.listdir('command')):
|
||||
M += '\tscripts/compiledefault command %s c -I include\n' % base
|
||||
M += '\n'
|
||||
makefile = M + makefile
|
||||
@@ -68,7 +68,7 @@ Index: configure
|
||||
M += '\n'
|
||||
makefile = M + makefile
|
||||
commands += ['package/bin/%s' % base]
|
||||
@@ -303,7 +302,7 @@
|
||||
@@ -327,7 +326,7 @@ makefile = M + makefile
|
||||
|
||||
# ----- make default
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ OpenBSD neither provides nor requires librt.
|
||||
Index: configure
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -103,7 +103,7 @@
|
||||
@@ -111,7 +111,7 @@ dirlinksym('build/%s/scripts'%host,'install','../src/s
|
||||
so = 'dylib' if darwin else 'so'
|
||||
so1 = soversion
|
||||
so1 = f'so.{soversion}'
|
||||
soname = 'install_name' if darwin else 'soname'
|
||||
-syslibs = '-lm' if darwin else '-lm -lrt'
|
||||
+syslibs = '-lm'
|
||||
|
||||
@@ -5,7 +5,7 @@ Index: configure
|
||||
+++ configure
|
||||
@@ -19,6 +19,7 @@ def hostsanitize(host):
|
||||
('amd64','amd64'), ('x86_64','amd64'),
|
||||
('x86','x86'), ('i386','x86'), ('i686','x86'),
|
||||
('x86','x86'), ('i386','x86'), ('i486','x86'), ('i586','x86'), ('i686','x86'),
|
||||
('arm64','arm64'), ('armv8','arm64'), ('aarch64','arm64'),
|
||||
+ ('armv7','arm32'),
|
||||
('arm','arm32'),
|
||||
|
||||
Reference in New Issue
Block a user