pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/misc/rhash



Module Name:    pkgsrc
Committed By:   nia
Date:           Tue May 14 14:37:48 UTC 2024

Modified Files:
        pkgsrc/misc/rhash: Makefile PLIST distinfo
        pkgsrc/misc/rhash/patches: patch-librhash_Makefile
Added Files:
        pkgsrc/misc/rhash/patches: patch-Makefile

Log Message:
rhash: libtoolize, other portability improvements


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/misc/rhash/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/misc/rhash/PLIST
cvs rdiff -u -r1.23 -r1.24 pkgsrc/misc/rhash/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/misc/rhash/patches/patch-Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/misc/rhash/patches/patch-librhash_Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/misc/rhash/Makefile
diff -u pkgsrc/misc/rhash/Makefile:1.22 pkgsrc/misc/rhash/Makefile:1.23
--- pkgsrc/misc/rhash/Makefile:1.22     Tue Oct 24 22:10:04 2023
+++ pkgsrc/misc/rhash/Makefile  Tue May 14 14:37:47 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2023/10/24 22:10:04 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2024/05/14 14:37:47 nia Exp $
 
 DISTNAME=      rhash-1.4.4
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    misc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=rhash/}
 GITHUB_PROJECT=        RHash
@@ -21,22 +21,40 @@ CONFIGURE_ARGS+=    --disable-symlinks
 CONFIGURE_ARGS+=       --enable-lib-shared
 CONFIGURE_ARGS+=       --enable-lib-static
 CONFIGURE_ARGS+=       --enable-openssl
-CONFIGURE_ARGS+=       --extra-cflags=-I${PREFIX}/include\ ${CFLAGS:Q}
-CONFIGURE_ARGS+=       --extra-ldflags=-L${PREFIX}/lib\ ${COMPILER_RPATH_FLAG}${PREFIX}/lib\ ${LDFLAGS:Q}
 CONFIGURE_ARGS+=       --mandir=${PREFIX}/${PKGMANDIR}
 CONFIGURE_ARGS+=       --prefix=${PREFIX}
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
-INSTALL_TARGET=                install install-pkg-config install-lib-so-link
+INSTALL_TARGET=                build-install-binary install-man
+INSTALL_TARGET+=       install-pkg-config install-lib-shared
+INSTALL_TARGET+=       install-lib-headers
 INSTALLATION_DIRS=     share/examples/rhash
+
+USE_LIBTOOL=           yes
+BUILD_TARGET+=         librhash/librhash.la rhash
 TEST_TARGET=           test
 
+MAKE_FLAGS+=           LIBRHASH_SHARED=librhash/librhash.la
+MAKE_FLAGS+=           CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+=           LDFLAGS=${LDFLAGS:Q}
+
+.include "../../mk/bsd.prefs.mk"
+
+# posix_memalign
+.if ${OPSYS} == "Darwin" && ${OPSYS_VERSION} < 100600
+LDFLAGS+=      -lMacportsLegacySupport
+.  include "../../devel/macports-legacy-support/buildlink3.mk"
+.endif
+
+LDFLAGS+=      -lcrypto
+
 PKGCONFIG_OVERRIDE=            dist/librhash.pc
 PKGCONFIG_OVERRIDE_STAGE=      post-configure
 
 CONF_FILES+=   ${PREFIX}/share/examples/rhash/rhashrc ${PKG_SYSCONFDIR}/rhashrc
 
 post-install:
-       ${MV} ${DESTDIR}${PKG_SYSCONFDIR}/rhashrc ${DESTDIR}${PREFIX}/share/examples/rhash/rhashrc
+       ${INSTALL_DATA} ${WRKSRC}/dist/rhashrc.sample \
+               ${DESTDIR}${PREFIX}/share/examples/rhash/rhashrc
 
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"

Index: pkgsrc/misc/rhash/PLIST
diff -u pkgsrc/misc/rhash/PLIST:1.4 pkgsrc/misc/rhash/PLIST:1.5
--- pkgsrc/misc/rhash/PLIST:1.4 Tue Jul 18 06:13:51 2023
+++ pkgsrc/misc/rhash/PLIST     Tue May 14 14:37:47 2024
@@ -1,11 +1,8 @@
-@comment $NetBSD: PLIST,v 1.4 2023/07/18 06:13:51 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2024/05/14 14:37:47 nia Exp $
 bin/rhash
 include/rhash.h
 include/rhash_torrent.h
-lib/librhash.a
-lib/librhash.so
-lib/librhash.so.${PKGVERSION}
-lib/librhash.so.1
+lib/librhash.la
 lib/pkgconfig/librhash.pc
 man/man1/rhash.1
 share/examples/rhash/rhashrc

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

Index: pkgsrc/misc/rhash/patches/patch-librhash_Makefile
diff -u pkgsrc/misc/rhash/patches/patch-librhash_Makefile:1.3 pkgsrc/misc/rhash/patches/patch-librhash_Makefile:1.4
--- pkgsrc/misc/rhash/patches/patch-librhash_Makefile:1.3       Tue Jul 18 06:13:51 2023
+++ pkgsrc/misc/rhash/patches/patch-librhash_Makefile   Tue May 14 14:37:48 2024
@@ -1,15 +1,157 @@
-$NetBSD: patch-librhash_Makefile,v 1.3 2023/07/18 06:13:51 adam Exp $
+$NetBSD: patch-librhash_Makefile,v 1.4 2024/05/14 14:37:48 nia Exp $
 
-Make ar(1) flags compatible with SunOS 
+libtoolize.
 
 --- librhash/Makefile.orig     2023-07-14 13:06:29.000000000 +0000
 +++ librhash/Makefile
-@@ -187,7 +187,7 @@ $(LIBRHASH_SHARED): $(SOURCES) $(EXPORTS
+@@ -4,7 +4,7 @@ include config.mak
+ 
+ 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
+ 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
+-OBJECTS = $(SOURCES:.c=.o)
++OBJECTS = $(SOURCES:.c=.lo)
+ LIB_HEADERS = rhash.h rhash_torrent.h
+ TEST_STATIC = test_static$(EXEC_EXT)
+ TEST_SHARED = test_shared$(EXEC_EXT)
+@@ -26,10 +26,7 @@ install-lib-static: $(LIBRHASH_STATIC)
+ 
+ install-lib-shared: $(LIBRHASH_SHARED) $(EXTRA_INSTALL_LIBSHARED)
+       $(INSTALL) -d $(SO_DIR)
+-      $(INSTALL_SHARED) $(LIBRHASH_SHARED) $(SO_DIR)/
+-      test "x$(LIBRHASH_SO_MAJ)" != "x$(LIBRHASH_SHARED)" && \
+-        rm -f $(LIBDIR)/$(LIBRHASH_SO_MAJ) && \
+-        ln -s $(LIBRHASH_SHARED) $(LIBDIR)/$(LIBRHASH_SO_MAJ)
++      $(LIBTOOL) --mode=install --tag=CC $(INSTALL_SHARED) $(LIBRHASH_SHARED) $(SO_DIR)/
+ 
+ install-implib:
+       $(INSTALL) -d $(LIBDIR)
+@@ -59,115 +56,10 @@ install-lib-headers:
+ uninstall-lib-headers:
+       for f in $(LIB_HEADERS); do rm -f "$(INCDIR)/$$f"; done
+ 
+-# not using GNU make extensions for compatibility with Unix/*BSD make
+-#%.o: %.c
+-#     $(CC) -c $(CFLAGS) $< -o $@
+-
+-# NOTE: dependences were generated by 'gcc -MM -DUSE_OPENSSL *.c'
+-# we are using plain old makefile style to support BSD make
+-aich.o: aich.c byte_order.h ustd.h algorithms.h rhash.h aich.h sha1.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-algorithms.o: algorithms.c byte_order.h ustd.h rhash.h algorithms.h \
+- aich.h sha1.h crc32.h ed2k.h md4.h edonr.h gost12.h gost94.h has160.h \
+- md5.h ripemd-160.h snefru.h sha256.h sha512.h sha3.h tiger.h torrent.h \
+- tth.h whirlpool.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-blake2b.o: blake2b.c blake2b.h ustd.h byte_order.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-blake2s.o: blake2s.c blake2s.h ustd.h byte_order.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-byte_order.o: byte_order.c byte_order.h ustd.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-crc32.o: crc32.c byte_order.h ustd.h crc32.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-ed2k.o: ed2k.c ed2k.h md4.h ustd.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-edonr.o: edonr.c byte_order.h ustd.h edonr.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-gost12.o: gost12.c gost12.h ustd.h byte_order.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-gost94.o: gost94.c gost94.h ustd.h byte_order.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-has160.o: has160.c byte_order.h ustd.h has160.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-hex.o: hex.c hex.h ustd.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-md4.o: md4.c byte_order.h ustd.h md4.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-md5.o: md5.c byte_order.h ustd.h md5.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-plug_openssl.o: plug_openssl.c algorithms.h rhash.h byte_order.h ustd.h \
+- plug_openssl.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-rhash.o: rhash.c byte_order.h ustd.h algorithms.h rhash.h torrent.h \
+- sha1.h plug_openssl.h util.h hex.h
+-      $(CC) -c $(CFLAGS) $(VERSION_CFLAGS) $< -o $@
+-
+-rhash_torrent.o: rhash_torrent.c algorithms.h rhash.h byte_order.h ustd.h \
+- torrent.h sha1.h rhash_torrent.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-ripemd-160.o: ripemd-160.c byte_order.h ustd.h ripemd-160.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-sha1.o: sha1.c byte_order.h ustd.h sha1.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-sha256.o: sha256.c byte_order.h ustd.h sha256.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-sha3.o: sha3.c byte_order.h ustd.h sha3.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-sha512.o: sha512.c byte_order.h ustd.h sha512.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-snefru.o: snefru.c byte_order.h ustd.h snefru.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-test_lib.o: test_lib.c byte_order.h ustd.h rhash_torrent.h test_utils.h \
+- rhash.h test_lib.h util.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-test_utils.o: test_utils.c byte_order.h ustd.h rhash.h test_utils.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-tiger.o: tiger.c byte_order.h ustd.h tiger.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-tiger_sbox.o: tiger_sbox.c byte_order.h ustd.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-torrent.o: torrent.c byte_order.h ustd.h algorithms.h rhash.h hex.h \
+- torrent.h sha1.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-tth.o: tth.c byte_order.h ustd.h tth.h tiger.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-util.o: util.c util.h
+-      $(CC) -c $(CFLAGS) $< -o $@
+-
+-whirlpool.o: whirlpool.c byte_order.h ustd.h whirlpool.h
+-      $(CC) -c $(CFLAGS) $< -o $@
++.SUFFIXES: .lo
+ 
+-whirlpool_sbox.o: whirlpool_sbox.c byte_order.h ustd.h
+-      $(CC) -c $(CFLAGS) $< -o $@
++.c.lo:
++      $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CFLAGS) $(VERSION_CFLAGS) $< -o $@
+ 
+ # build shared library
+ $(EXPORTS_FILE): $(LIB_HEADERS)
+@@ -181,8 +73,8 @@ $(LIBRHASH_SOLINK):
+       rm -f $(LIBRHASH_SOLINK)
+       ln -s $(LIBRHASH_SO_MAJ) $(LIBRHASH_SOLINK)
+ 
+-$(LIBRHASH_SHARED): $(SOURCES) $(EXPORTS_TARGET) $(SOLINK_TARGET)
+-      $(CC) $(SHARED_CFLAGS) $(VERSION_CFLAGS) $(SOURCES) $(SHARED_LDFLAGS) -o $@
++$(LIBRHASH_SHARED): $(OBJECTS)
++      $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(OBJECTS) -rpath $(PREFIX)/lib -version-info 1:0 -o $@
+ 
  # build static library
  $(LIBRHASH_STATIC): $(OBJECTS)
-       rm -f $@
--      $(AR) -cqs $@ $(OBJECTS)
-+      $(AR) -crs $@ $(OBJECTS)
- 
- # test targets
- $(TEST_SHARED): $(LIBRHASH_SHARED) test_lib.o test_utils.o

Added files:

Index: pkgsrc/misc/rhash/patches/patch-Makefile
diff -u /dev/null pkgsrc/misc/rhash/patches/patch-Makefile:1.3
--- /dev/null   Tue May 14 14:37:48 2024
+++ pkgsrc/misc/rhash/patches/patch-Makefile    Tue May 14 14:37:48 2024
@@ -0,0 +1,17 @@
+$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



Home | Main Index | Thread Index | Old Index