Tue May 14 14:37:48 2024 UTC (33d)
rhash: libtoolize, other portability improvements


(nia)
diff -r1.22 -r1.23 pkgsrc/misc/rhash/Makefile
diff -r1.4 -r1.5 pkgsrc/misc/rhash/PLIST
diff -r1.23 -r1.24 pkgsrc/misc/rhash/distinfo
diff -r0 -r1.3 pkgsrc/misc/rhash/patches/patch-Makefile
diff -r1.3 -r1.4 pkgsrc/misc/rhash/patches/patch-librhash_Makefile

cvs diff -r1.22 -r1.23 pkgsrc/misc/rhash/Makefile (expand / switch to unified diff)

--- pkgsrc/misc/rhash/Makefile 2023/10/24 22:10:04 1.22
+++ pkgsrc/misc/rhash/Makefile 2024/05/14 14:37:47 1.23
@@ -1,43 +1,61 @@ @@ -1,43 +1,61 @@
1# $NetBSD: Makefile,v 1.22 2023/10/24 22:10:04 wiz Exp $ 1# $NetBSD: Makefile,v 1.23 2024/05/14 14:37:47 nia Exp $
2 2
3DISTNAME= rhash-1.4.4 3DISTNAME= rhash-1.4.4
4PKGREVISION= 1 4PKGREVISION= 2
5CATEGORIES= misc 5CATEGORIES= misc
6MASTER_SITES= ${MASTER_SITE_GITHUB:=rhash/} 6MASTER_SITES= ${MASTER_SITE_GITHUB:=rhash/}
7GITHUB_PROJECT= RHash 7GITHUB_PROJECT= RHash
8GITHUB_TAG= v${PKGVERSION_NOREV} 8GITHUB_TAG= v${PKGVERSION_NOREV}
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://github.com/rhash/RHash 11HOMEPAGE= https://github.com/rhash/RHash
12COMMENT= Calculate/check CRC32, MD5, SHA1, GOST, TTH, BTIH or other hash sums 12COMMENT= Calculate/check CRC32, MD5, SHA1, GOST, TTH, BTIH or other hash sums
13LICENSE= mit 13LICENSE= mit
14 14
15WRKSRC= ${WRKDIR}/${DISTNAME:S/rh/RH/} 15WRKSRC= ${WRKDIR}/${DISTNAME:S/rh/RH/}
16HAS_CONFIGURE= yes 16HAS_CONFIGURE= yes
17USE_GCC_RUNTIME= yes 17USE_GCC_RUNTIME= yes
18USE_TOOLS+= gmake 18USE_TOOLS+= gmake
19CONFIGURE_ARGS+= --disable-gettext 19CONFIGURE_ARGS+= --disable-gettext
20CONFIGURE_ARGS+= --disable-symlinks 20CONFIGURE_ARGS+= --disable-symlinks
21CONFIGURE_ARGS+= --enable-lib-shared 21CONFIGURE_ARGS+= --enable-lib-shared
22CONFIGURE_ARGS+= --enable-lib-static 22CONFIGURE_ARGS+= --enable-lib-static
23CONFIGURE_ARGS+= --enable-openssl 23CONFIGURE_ARGS+= --enable-openssl
24CONFIGURE_ARGS+= --extra-cflags=-I${PREFIX}/include\ ${CFLAGS:Q} 
25CONFIGURE_ARGS+= --extra-ldflags=-L${PREFIX}/lib\ ${COMPILER_RPATH_FLAG}${PREFIX}/lib\ ${LDFLAGS:Q} 
26CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} 24CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
27CONFIGURE_ARGS+= --prefix=${PREFIX} 25CONFIGURE_ARGS+= --prefix=${PREFIX}
28CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} 26CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
29INSTALL_TARGET= install install-pkg-config install-lib-so-link 27INSTALL_TARGET= build-install-binary install-man
 28INSTALL_TARGET+= install-pkg-config install-lib-shared
 29INSTALL_TARGET+= install-lib-headers
30INSTALLATION_DIRS= share/examples/rhash 30INSTALLATION_DIRS= share/examples/rhash
 31
 32USE_LIBTOOL= yes
 33BUILD_TARGET+= librhash/librhash.la rhash
31TEST_TARGET= test 34TEST_TARGET= test
32 35
 36MAKE_FLAGS+= LIBRHASH_SHARED=librhash/librhash.la
 37MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}
 38MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
 39
 40.include "../../mk/bsd.prefs.mk"
 41
 42# posix_memalign
 43.if ${OPSYS} == "Darwin" && ${OPSYS_VERSION} < 100600
 44LDFLAGS+= -lMacportsLegacySupport
 45. include "../../devel/macports-legacy-support/buildlink3.mk"
 46.endif
 47
 48LDFLAGS+= -lcrypto
 49
33PKGCONFIG_OVERRIDE= dist/librhash.pc 50PKGCONFIG_OVERRIDE= dist/librhash.pc
34PKGCONFIG_OVERRIDE_STAGE= post-configure 51PKGCONFIG_OVERRIDE_STAGE= post-configure
35 52
36CONF_FILES+= ${PREFIX}/share/examples/rhash/rhashrc ${PKG_SYSCONFDIR}/rhashrc 53CONF_FILES+= ${PREFIX}/share/examples/rhash/rhashrc ${PKG_SYSCONFDIR}/rhashrc
37 54
38post-install: 55post-install:
39 ${MV} ${DESTDIR}${PKG_SYSCONFDIR}/rhashrc ${DESTDIR}${PREFIX}/share/examples/rhash/rhashrc 56 ${INSTALL_DATA} ${WRKSRC}/dist/rhashrc.sample \
 57 ${DESTDIR}${PREFIX}/share/examples/rhash/rhashrc
40 58
41.include "../../devel/gettext-lib/buildlink3.mk" 59.include "../../devel/gettext-lib/buildlink3.mk"
42.include "../../security/openssl/buildlink3.mk" 60.include "../../security/openssl/buildlink3.mk"
43.include "../../mk/bsd.pkg.mk" 61.include "../../mk/bsd.pkg.mk"

cvs diff -r1.4 -r1.5 pkgsrc/misc/rhash/PLIST (expand / switch to unified diff)

--- pkgsrc/misc/rhash/PLIST 2023/07/18 06:13:51 1.4
+++ pkgsrc/misc/rhash/PLIST 2024/05/14 14:37:47 1.5
@@ -1,11 +1,8 @@ @@ -1,11 +1,8 @@
1@comment $NetBSD: PLIST,v 1.4 2023/07/18 06:13:51 adam Exp $ 1@comment $NetBSD: PLIST,v 1.5 2024/05/14 14:37:47 nia Exp $
2bin/rhash 2bin/rhash
3include/rhash.h 3include/rhash.h
4include/rhash_torrent.h 4include/rhash_torrent.h
5lib/librhash.a 5lib/librhash.la
6lib/librhash.so 
7lib/librhash.so.${PKGVERSION} 
8lib/librhash.so.1 
9lib/pkgconfig/librhash.pc 6lib/pkgconfig/librhash.pc
10man/man1/rhash.1 7man/man1/rhash.1
11share/examples/rhash/rhashrc 8share/examples/rhash/rhashrc

cvs diff -r1.23 -r1.24 pkgsrc/misc/rhash/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/rhash/distinfo 2023/07/18 06:13:51 1.23
+++ pkgsrc/misc/rhash/distinfo 2024/05/14 14:37:47 1.24
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
1$NetBSD: distinfo,v 1.23 2023/07/18 06:13:51 adam Exp $ 1$NetBSD: distinfo,v 1.24 2024/05/14 14:37:47 nia Exp $
2 2
3BLAKE2s (rhash-1.4.4.tar.gz) = 7812d695fef6e198eb1eccc7440fa63936ec3c2ba559467e7102a7f4adcf35d2 3BLAKE2s (rhash-1.4.4.tar.gz) = 7812d695fef6e198eb1eccc7440fa63936ec3c2ba559467e7102a7f4adcf35d2
4SHA512 (rhash-1.4.4.tar.gz) = 00a7e5e058b53ce20ae79509815452ed9cb699d1322b678220b72c61dea3ea2f8fa131acfade8bb6d9f6af913f0c3c472330841181b22314b8755166310c946f 4SHA512 (rhash-1.4.4.tar.gz) = 00a7e5e058b53ce20ae79509815452ed9cb699d1322b678220b72c61dea3ea2f8fa131acfade8bb6d9f6af913f0c3c472330841181b22314b8755166310c946f
5Size (rhash-1.4.4.tar.gz) = 435691 bytes 5Size (rhash-1.4.4.tar.gz) = 435691 bytes
 6SHA1 (patch-Makefile) = 55d3e148db36ab4bcff9fd23add3e32b51a3854c
6SHA1 (patch-configure) = 47136a8817c439b6f3ac4adf6c7a072bb88a7455 7SHA1 (patch-configure) = 47136a8817c439b6f3ac4adf6c7a072bb88a7455
7SHA1 (patch-librhash_Makefile) = 9b4b44c2e729d7866fcab82d93a7ac83be14cc28 8SHA1 (patch-librhash_Makefile) = 763d6416c8ebe32a80a43520e28b869abb7a88e3

File Added: pkgsrc/misc/rhash/patches/patch-Makefile
$NetBSD: patch-Makefile,v 1.3 2024/05/14 14:37:48 nia Exp $

libtoolize.

--- Makefile.orig	2023-07-14 13:06:29.000000000 +0000
+++ Makefile
@@ -149,8 +149,8 @@ check:
 	grep -q '^#define VERSION "$(VERSION)"' version.h
 	test ! -f bindings/version.properties || grep -q '^version=$(VERSION)$$' bindings/version.properties
 
-$(RHASH_BINARY): $(OBJECTS) $(LIBRHASH_PATH)
-	$(CC) $(OBJECTS) $(LIBRHASH_PATH) $(LDFLAGS) -o $@
+$(RHASH_BINARY): $(OBJECTS) $(LIBRHASH_PATH)
+	$(CC) $(OBJECTS) -Llibrhash/librhash/.libs -lrhash $(LDFLAGS) -o $@
 
 # NOTE: dependences were generated by 'gcc -Ilibrhash -MM *.c'
 # we are using plain old makefile style to support BSD make

cvs diff -r1.3 -r1.4 pkgsrc/misc/rhash/patches/patch-librhash_Makefile (expand / switch to unified diff)

--- pkgsrc/misc/rhash/patches/patch-librhash_Makefile 2023/07/18 06:13:51 1.3
+++ pkgsrc/misc/rhash/patches/patch-librhash_Makefile 2024/05/14 14:37:48 1.4
@@ -1,15 +1,157 @@ @@ -1,15 +1,157 @@
1$NetBSD: patch-librhash_Makefile,v 1.3 2023/07/18 06:13:51 adam Exp $ 1$NetBSD: patch-librhash_Makefile,v 1.4 2024/05/14 14:37:48 nia Exp $
2 2
3Make ar(1) flags compatible with SunOS  3libtoolize.
4 4
5--- librhash/Makefile.orig 2023-07-14 13:06:29.000000000 +0000 5--- librhash/Makefile.orig 2023-07-14 13:06:29.000000000 +0000
6+++ librhash/Makefile 6+++ librhash/Makefile
7@@ -187,7 +187,7 @@ $(LIBRHASH_SHARED): $(SOURCES) $(EXPORTS 7@@ -4,7 +4,7 @@ include config.mak
 8
 9 HEADERS = algorithms.h byte_order.h plug_openssl.h rhash.h rhash_torrent.h aich.h blake2b.h blake2s.h crc32.h ed2k.h edonr.h hex.h md4.h md5.h sha1.h sha256.h sha512.h sha3.h ripemd-160.h gost12.h gost94.h has160.h snefru.h tiger.h tth.h torrent.h ustd.h util.h whirlpool.h
 10 SOURCES = algorithms.c byte_order.c plug_openssl.c rhash.c rhash_torrent.c aich.c blake2b.c blake2s.c crc32.c ed2k.c edonr.c hex.c md4.c md5.c sha1.c sha256.c sha512.c sha3.c ripemd-160.c gost12.c gost94.c has160.c snefru.c tiger.c tiger_sbox.c tth.c torrent.c util.c whirlpool.c whirlpool_sbox.c
 11-OBJECTS = $(SOURCES:.c=.o)
 12+OBJECTS = $(SOURCES:.c=.lo)
 13 LIB_HEADERS = rhash.h rhash_torrent.h
 14 TEST_STATIC = test_static$(EXEC_EXT)
 15 TEST_SHARED = test_shared$(EXEC_EXT)
 16@@ -26,10 +26,7 @@ install-lib-static: $(LIBRHASH_STATIC)
 17
 18 install-lib-shared: $(LIBRHASH_SHARED) $(EXTRA_INSTALL_LIBSHARED)
 19 $(INSTALL) -d $(SO_DIR)
 20- $(INSTALL_SHARED) $(LIBRHASH_SHARED) $(SO_DIR)/
 21- test "x$(LIBRHASH_SO_MAJ)" != "x$(LIBRHASH_SHARED)" && \
 22- rm -f $(LIBDIR)/$(LIBRHASH_SO_MAJ) && \
 23- ln -s $(LIBRHASH_SHARED) $(LIBDIR)/$(LIBRHASH_SO_MAJ)
 24+ $(LIBTOOL) --mode=install --tag=CC $(INSTALL_SHARED) $(LIBRHASH_SHARED) $(SO_DIR)/
 25
 26 install-implib:
 27 $(INSTALL) -d $(LIBDIR)
 28@@ -59,115 +56,10 @@ install-lib-headers:
 29 uninstall-lib-headers:
 30 for f in $(LIB_HEADERS); do rm -f "$(INCDIR)/$$f"; done
 31
 32-# not using GNU make extensions for compatibility with Unix/*BSD make
 33-#%.o: %.c
 34-# $(CC) -c $(CFLAGS) $< -o $@
 35-
 36-# NOTE: dependences were generated by 'gcc -MM -DUSE_OPENSSL *.c'
 37-# we are using plain old makefile style to support BSD make
 38-aich.o: aich.c byte_order.h ustd.h algorithms.h rhash.h aich.h sha1.h
 39- $(CC) -c $(CFLAGS) $< -o $@
 40-
 41-algorithms.o: algorithms.c byte_order.h ustd.h rhash.h algorithms.h \
 42- aich.h sha1.h crc32.h ed2k.h md4.h edonr.h gost12.h gost94.h has160.h \
 43- md5.h ripemd-160.h snefru.h sha256.h sha512.h sha3.h tiger.h torrent.h \
 44- tth.h whirlpool.h
 45- $(CC) -c $(CFLAGS) $< -o $@
 46-
 47-blake2b.o: blake2b.c blake2b.h ustd.h byte_order.h
 48- $(CC) -c $(CFLAGS) $< -o $@
 49-
 50-blake2s.o: blake2s.c blake2s.h ustd.h byte_order.h
 51- $(CC) -c $(CFLAGS) $< -o $@
 52-
 53-byte_order.o: byte_order.c byte_order.h ustd.h
 54- $(CC) -c $(CFLAGS) $< -o $@
 55-
 56-crc32.o: crc32.c byte_order.h ustd.h crc32.h
 57- $(CC) -c $(CFLAGS) $< -o $@
 58-
 59-ed2k.o: ed2k.c ed2k.h md4.h ustd.h
 60- $(CC) -c $(CFLAGS) $< -o $@
 61-
 62-edonr.o: edonr.c byte_order.h ustd.h edonr.h
 63- $(CC) -c $(CFLAGS) $< -o $@
 64-
 65-gost12.o: gost12.c gost12.h ustd.h byte_order.h
 66- $(CC) -c $(CFLAGS) $< -o $@
 67-
 68-gost94.o: gost94.c gost94.h ustd.h byte_order.h
 69- $(CC) -c $(CFLAGS) $< -o $@
 70-
 71-has160.o: has160.c byte_order.h ustd.h has160.h
 72- $(CC) -c $(CFLAGS) $< -o $@
 73-
 74-hex.o: hex.c hex.h ustd.h
 75- $(CC) -c $(CFLAGS) $< -o $@
 76-
 77-md4.o: md4.c byte_order.h ustd.h md4.h
 78- $(CC) -c $(CFLAGS) $< -o $@
 79-
 80-md5.o: md5.c byte_order.h ustd.h md5.h
 81- $(CC) -c $(CFLAGS) $< -o $@
 82-
 83-plug_openssl.o: plug_openssl.c algorithms.h rhash.h byte_order.h ustd.h \
 84- plug_openssl.h
 85- $(CC) -c $(CFLAGS) $< -o $@
 86-
 87-rhash.o: rhash.c byte_order.h ustd.h algorithms.h rhash.h torrent.h \
 88- sha1.h plug_openssl.h util.h hex.h
 89- $(CC) -c $(CFLAGS) $(VERSION_CFLAGS) $< -o $@
 90-
 91-rhash_torrent.o: rhash_torrent.c algorithms.h rhash.h byte_order.h ustd.h \
 92- torrent.h sha1.h rhash_torrent.h
 93- $(CC) -c $(CFLAGS) $< -o $@
 94-
 95-ripemd-160.o: ripemd-160.c byte_order.h ustd.h ripemd-160.h
 96- $(CC) -c $(CFLAGS) $< -o $@
 97-
 98-sha1.o: sha1.c byte_order.h ustd.h sha1.h
 99- $(CC) -c $(CFLAGS) $< -o $@
 100-
 101-sha256.o: sha256.c byte_order.h ustd.h sha256.h
 102- $(CC) -c $(CFLAGS) $< -o $@
 103-
 104-sha3.o: sha3.c byte_order.h ustd.h sha3.h
 105- $(CC) -c $(CFLAGS) $< -o $@
 106-
 107-sha512.o: sha512.c byte_order.h ustd.h sha512.h
 108- $(CC) -c $(CFLAGS) $< -o $@
 109-
 110-snefru.o: snefru.c byte_order.h ustd.h snefru.h
 111- $(CC) -c $(CFLAGS) $< -o $@
 112-
 113-test_lib.o: test_lib.c byte_order.h ustd.h rhash_torrent.h test_utils.h \
 114- rhash.h test_lib.h util.h
 115- $(CC) -c $(CFLAGS) $< -o $@
 116-
 117-test_utils.o: test_utils.c byte_order.h ustd.h rhash.h test_utils.h
 118- $(CC) -c $(CFLAGS) $< -o $@
 119-
 120-tiger.o: tiger.c byte_order.h ustd.h tiger.h
 121- $(CC) -c $(CFLAGS) $< -o $@
 122-
 123-tiger_sbox.o: tiger_sbox.c byte_order.h ustd.h
 124- $(CC) -c $(CFLAGS) $< -o $@
 125-
 126-torrent.o: torrent.c byte_order.h ustd.h algorithms.h rhash.h hex.h \
 127- torrent.h sha1.h
 128- $(CC) -c $(CFLAGS) $< -o $@
 129-
 130-tth.o: tth.c byte_order.h ustd.h tth.h tiger.h
 131- $(CC) -c $(CFLAGS) $< -o $@
 132-
 133-util.o: util.c util.h
 134- $(CC) -c $(CFLAGS) $< -o $@
 135-
 136-whirlpool.o: whirlpool.c byte_order.h ustd.h whirlpool.h
 137- $(CC) -c $(CFLAGS) $< -o $@
 138+.SUFFIXES: .lo
 139
 140-whirlpool_sbox.o: whirlpool_sbox.c byte_order.h ustd.h
 141- $(CC) -c $(CFLAGS) $< -o $@
 142+.c.lo:
 143+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CFLAGS) $(VERSION_CFLAGS) $< -o $@
 144
 145 # build shared library
 146 $(EXPORTS_FILE): $(LIB_HEADERS)
 147@@ -181,8 +73,8 @@ $(LIBRHASH_SOLINK):
 148 rm -f $(LIBRHASH_SOLINK)
 149 ln -s $(LIBRHASH_SO_MAJ) $(LIBRHASH_SOLINK)
 150
 151-$(LIBRHASH_SHARED): $(SOURCES) $(EXPORTS_TARGET) $(SOLINK_TARGET)
 152- $(CC) $(SHARED_CFLAGS) $(VERSION_CFLAGS) $(SOURCES) $(SHARED_LDFLAGS) -o $@
 153+$(LIBRHASH_SHARED): $(OBJECTS)
 154+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(OBJECTS) -rpath $(PREFIX)/lib -version-info 1:0 -o $@
 155
8 # build static library 156 # build static library
9 $(LIBRHASH_STATIC): $(OBJECTS) 157 $(LIBRHASH_STATIC): $(OBJECTS)
10 rm -f $@ 
11- $(AR) -cqs $@ $(OBJECTS) 
12+ $(AR) -crs $@ $(OBJECTS) 
13  
14 # test targets 
15 $(TEST_SHARED): $(LIBRHASH_SHARED) test_lib.o test_utils.o