aboutsummaryrefslogtreecommitdiff
path: root/security/rhash
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2020-04-13 07:59:30 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2020-04-13 07:59:30 +0000
commit37cd5bfde4ba472a88048273d324988f8ef0a39b (patch)
treee2fabf677c6b558ea9a3cafa968936a9de0821f8 /security/rhash
parente3c80b3f2c7b22159c4f39f5fc9c4d6b2a193101 (diff)
downloadports-37cd5bfde4ba472a88048273d324988f8ef0a39b.tar.gz
ports-37cd5bfde4ba472a88048273d324988f8ef0a39b.zip
- Belatedly update to version 1.3.9
- Pull two patches from Gentoo Linux - Install *.pc file for pkgconf(1) - Allow to build with NLS support PR: 245424
Notes
Notes: svn path=/head/; revision=531582
Diffstat (limited to 'security/rhash')
-rw-r--r--security/rhash/Makefile29
-rw-r--r--security/rhash/distinfo10
-rw-r--r--security/rhash/files/patch-Makefile41
-rw-r--r--security/rhash/files/patch-configure10
-rw-r--r--security/rhash/files/patch-librhash_Makefile23
-rw-r--r--security/rhash/pkg-plist21
6 files changed, 72 insertions, 62 deletions
diff --git a/security/rhash/Makefile b/security/rhash/Makefile
index a61b68bdd1fd..bc1105b77e9e 100644
--- a/security/rhash/Makefile
+++ b/security/rhash/Makefile
@@ -2,32 +2,41 @@
# $FreeBSD$
PORTNAME= rhash
-PORTVERSION= 1.3.5
+PORTVERSION= 1.3.9
CATEGORIES= security
MASTER_SITES= SF
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+PATCH_SITES= https://gitweb.gentoo.org/repo/gentoo.git/plain/app-crypt/rhash/files/ \
+ https://raw.githubusercontent.com/gentoo/gentoo/master/app-crypt/rhash/files/
+PATCHFILES= rhash-1.3.9-nls.patch:-p1 rhash-1.3.9-rc-segfault.patch:-p1
+
MAINTAINER= danfe@FreeBSD.org
COMMENT= Utility and library for computing and checking of file hashes
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --prefix="${PREFIX}" --mandir="${PREFIX}/man" \
+ --pkgconfigdir="${PREFIX}/libdata/pkgconfig" \
+ --enable-lib-static --enable-openssl-runtime \
+ --extra-cflags="${CFLAGS}" --extra-ldflags="${LDFLAGS}"
+INSTALL_TARGET= install install-lib-so-link install-pkg-config
USE_LDCONFIG= yes
-MAKE_ARGS= INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
- INSTALL_SHARED="${INSTALL_PROGRAM}" \
- MANDIR="${PREFIX}/man"
-ALL_TARGET= build-shared
-INSTALL_TARGET= install-shared install-lib-static install-lib-shared
WRKSRC= ${WRKDIR}/RHash-${PORTVERSION}
-PORTDOCS= ChangeLog README
+PORTDOCS= ChangeLog README.md
+
+OPTIONS_DEFINE= DOCS NLS
+OPTIONS_SUB= yes
-OPTIONS_DEFINE= DOCS
+NLS_USES= gettext localbase:ldflags
+NLS_CONFIGURE_ON= --enable-gettext
+NLS_INSTALL_TARGET= install-gmo
post-patch:
- @${REINPLACE_CMD} -e 's,/etc/,${PREFIX}&,' ${WRKSRC}/parse_cmdline.c
@${REINPLACE_CMD} -e '/BYTE_ORDER/s,__,_,g' \
${WRKSRC}/librhash/byte_order.h
@@ -36,6 +45,6 @@ post-install-DOCS-on:
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
do-test:
- cd ${WRKSRC}/tests && ${SH} test_rhash.sh --full
+ cd ${WRKSRC}/tests && ${SH} test_rhash.sh --full --shared
.include <bsd.port.mk>
diff --git a/security/rhash/distinfo b/security/rhash/distinfo
index 257c943d391d..e88ba23f5160 100644
--- a/security/rhash/distinfo
+++ b/security/rhash/distinfo
@@ -1,3 +1,7 @@
-TIMESTAMP = 1502675104
-SHA256 (rhash-1.3.5-src.tar.gz) = 98e0688acae29e68c298ffbcdbb0f838864105f9b2bd8857980664435b1f1f2e
-SIZE (rhash-1.3.5-src.tar.gz) = 316867
+TIMESTAMP = 1576370852
+SHA256 (rhash-1.3.9-src.tar.gz) = 42b1006f998adb189b1f316bf1a60e3171da047a85c4aaded2d0d26c1476c9f6
+SIZE (rhash-1.3.9-src.tar.gz) = 403415
+SHA256 (rhash-1.3.9-nls.patch) = 2e60e6e34d32296f8b6d0851f5f8fe6506836dea8d560d1261424d4bc783dc50
+SIZE (rhash-1.3.9-nls.patch) = 744
+SHA256 (rhash-1.3.9-rc-segfault.patch) = 39e875cde8026fb609e1008d7afc7133474e104c5f823bd7552060d39ae7d891
+SIZE (rhash-1.3.9-rc-segfault.patch) = 9662
diff --git a/security/rhash/files/patch-Makefile b/security/rhash/files/patch-Makefile
index 5f83a4bcd650..f9f5f97d6a67 100644
--- a/security/rhash/files/patch-Makefile
+++ b/security/rhash/files/patch-Makefile
@@ -1,32 +1,25 @@
---- Makefile.orig 2016-11-05 23:22:07 UTC
+--- Makefile.orig 2019-12-14 16:52:11 UTC
+++ Makefile
-@@ -6,9 +6,9 @@ VERSION = 1.3.4
- PREFIX ?= /usr/local
- CC ?= gcc
- # using OPTFLAGS/OPTLDFLAGS for compatibilty with old scripts using this makefile
--OPTFLAGS = -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
-+OPTFLAGS = -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
- OPTLDFLAGS =
--CFLAGS = $(OPTFLAGS)
-+CFLAGS += $(OPTFLAGS)
- LDFLAGS = $(OPTLDFLAGS)
- ADDCFLAGS =
- ADDLDFLAGS =
-@@ -106,7 +106,7 @@ install-man:
+@@ -80,7 +80,7 @@ install-man:
install-conf:
- $(INSTALL) -d $(DESTDIR)/etc
-- tr -d \\r < dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(DESTDIR)/etc/rhashrc
-+ tr -d \\r < dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(DESTDIR)$(PREFIX)/etc/rhashrc.sample
+ $(INSTALL) -d $(SYSCONFDIR)
+- tr -d \\r < dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(SYSCONFDIR)/rhashrc
++ tr -d \\r < dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(SYSCONFDIR)/rhashrc.sample
rm -f rc.tmp
# dependencies should be properly set, otherwise 'make -j<n>' can fail
-@@ -127,7 +127,7 @@ install-lib-static: $(LIBRHASH)
- +make -C librhash install-lib-static
+@@ -212,11 +212,11 @@ parse_cmdline.o: parse_cmdline.c parse_cmdline.h commo
+ rhash_main.o: rhash_main.c rhash_main.h calc_sums.h common_func.h file.h \
+ hash_check.h file_mask.h find_file.h hash_print.h hash_update.h \
+ parse_cmdline.h output.h win_utils.h librhash/rhash.h
+- $(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CFLAGS) $(LOCALECFLAGS) $< -o $@
- install-lib-shared: $(SHAREDLIB)
-- +$(MAKE) -C librhash install-lib-shared
-+ +$(MAKE) -C librhash install-lib-shared install-so-link
+ win_utils.o: win_utils.c win_utils.h common_func.h file.h parse_cmdline.h \
+ rhash_main.h
+- $(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CFLAGS) $(LOCALECFLAGS) $< -o $@
- $(SHAREDLIB):
- +make -C librhash lib-shared
+ dist/rhash.1.win.html: dist/rhash.1 dist/rhash.1.win.sed
+ sed -f dist/rhash.1.win.sed dist/rhash.1 | rman -fHTML -roff | \
diff --git a/security/rhash/files/patch-configure b/security/rhash/files/patch-configure
new file mode 100644
index 000000000000..45f1f34e4846
--- /dev/null
+++ b/security/rhash/files/patch-configure
@@ -0,0 +1,10 @@
+--- configure.orig 2019-12-14 16:52:11 UTC
++++ configure
+@@ -883,6 +883,7 @@ WARN_CFLAGS = $WARN_CFLAGS
+ ADDCFLAGS = $BUILD_EXTRA_CFLAGS
+ ADDLDFLAGS = $BUILD_EXTRA_LDFLAGS
+ CONFCFLAGS = -DSYSCONFDIR=\\"$INSTALL_SYSCONFDIR\\"
++LOCALECFLAGS = -DLOCALEDIR=\\"$INSTALL_LOCALEDIR\\"
+ CFLAGS = $RHASH_DEFINES \$(OPTFLAGS) \$(WARN_CFLAGS) \$(ADDCFLAGS)
+ LDFLAGS = \$(OPTLDFLAGS) \$(ADDLDFLAGS) $GETTEXT_LDFLAGS
+ BIN_STATIC_LDFLAGS = \$(LDFLAGS) $(join_params $LD_STATIC $OPENSSL_LDFLAGS)
diff --git a/security/rhash/files/patch-librhash_Makefile b/security/rhash/files/patch-librhash_Makefile
deleted file mode 100644
index 3b7f85bf4526..000000000000
--- a/security/rhash/files/patch-librhash_Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
---- librhash/Makefile.orig 2016-11-06 15:49:40 UTC
-+++ librhash/Makefile
-@@ -2,9 +2,9 @@
- CC ?= gcc
- AR ?= ar
- #NOTE: NDEBUG turns off asserts
--OPTFLAGS = -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
-+OPTFLAGS = -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
- OPTLDFLAGS =
--CFLAGS = $(OPTFLAGS)
-+CFLAGS += $(OPTFLAGS)
- LDFLAGS = $(OPTLDFLAGS)
- ADDCFLAGS =
- LIBCFLAGS =
-@@ -187,7 +187,7 @@ test-dll: $(DLLNAME) test_hashes.o
-
- # shared and static libraries
- $(SONAME): $(SOURCES)
-- sed -n '1s/.*/{ global:/p; s/^RHASH_API.* \([a-z0-9_]\+\)(.*/ \1;/p; $$s/.*/local: *; };/p' $(SO_HEADERS) > exports.sym
-+ sed -nE '1s/.*/{ global:/p; s/^RHASH_API.* ([a-z0-9_]+)\(.*/ \1;/p; $$s/.*/local: *; };/p' $(SO_HEADERS) > exports.sym
- $(CC) -fpic $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym,-soname,$(SONAME) $(LIBLDFLAGS) -o $@
- ln -s $(SONAME) $(SOLINK)
- # use 'nm -Cg --defined-only $@' to view exported symbols
diff --git a/security/rhash/pkg-plist b/security/rhash/pkg-plist
index 701ee6d3bba5..28817970f4fe 100644
--- a/security/rhash/pkg-plist
+++ b/security/rhash/pkg-plist
@@ -1,5 +1,8 @@
bin/ed2k-link
-bin/gost-hash
+bin/edonr256-hash
+bin/edonr512-hash
+bin/gost12-256-hash
+bin/gost12-512-hash
bin/has160-hash
bin/magnet-link
bin/rhash
@@ -13,8 +16,12 @@ include/rhash_torrent.h
lib/librhash.a
lib/librhash.so
lib/librhash.so.0
+libdata/pkgconfig/librhash.pc
man/man1/ed2k-link.1.gz
-man/man1/gost-hash.1.gz
+man/man1/edonr256-hash.1.gz
+man/man1/edonr512-hash.1.gz
+man/man1/gost12-256-hash.1.gz
+man/man1/gost12-512-hash.1.gz
man/man1/has160-hash.1.gz
man/man1/magnet-link.1.gz
man/man1/rhash.1.gz
@@ -22,3 +29,13 @@ man/man1/sfv-hash.1.gz
man/man1/tiger-hash.1.gz
man/man1/tth-hash.1.gz
man/man1/whirlpool-hash.1.gz
+%%NLS%%share/locale/ca/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/de/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/en_AU/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/es/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/it/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/rhash.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/rhash.mo