From f565274fe530d2c3008ec6e2f27a1381a0978ce0 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 23 Jan 2018 21:11:44 -0600 Subject: rhash: 1.3.3 -> 1.3.5 1.3.5: https://github.com/rhash/RHash/releases/tag/v1.3.5 1.3.4: https://github.com/rhash/RHash/releases/tag/v1.3.4 * still need makefile bug workarounds * cleanup a bit * port darwin patch-- don't believe still needed but shouldn't hurt. --- pkgs/tools/security/rhash/darwin.patch | 25 ------------------------- pkgs/tools/security/rhash/default.nix | 20 ++++++-------------- 2 files changed, 6 insertions(+), 39 deletions(-) (limited to 'pkgs/tools/security/rhash') diff --git a/pkgs/tools/security/rhash/darwin.patch b/pkgs/tools/security/rhash/darwin.patch index 76ad8fe9abd9..058791cdd88a 100644 --- a/pkgs/tools/security/rhash/darwin.patch +++ b/pkgs/tools/security/rhash/darwin.patch @@ -11,28 +11,3 @@ index e40dbc3..e198b93 100644 SHRDLFLAGS = $(LDFLAGS) $(ADDLDFLAGS) HEADERS = calc_sums.h hash_print.h common_func.h hash_update.h file_mask.h file_set.h find_file.h hash_check.h output.h parse_cmdline.h rhash_main.h win_utils.h version.h SOURCES = calc_sums.c hash_print.c common_func.c hash_update.c file_mask.c file_set.c find_file.c hash_check.c output.c parse_cmdline.c rhash_main.c win_utils.c -diff --git a/librhash/Makefile b/librhash/Makefile -index 2f9bcc9..0c5aaad 100644 ---- a/librhash/Makefile -+++ b/librhash/Makefile -@@ -28,8 +28,8 @@ PREFIX = /usr/local - INCDIR = $(PREFIX)/include - LIBDIR = $(PREFIX)/lib - LIBRARY = librhash.a --SONAME = librhash.so.0 --SOLINK = librhash.so -+SONAME = librhash.0.dylib -+SOLINK = librhash.dylib - TEST_TARGET = test_hashes - TEST_SHARED = test_shared - # Set variables according to GNU coding standard -@@ -182,8 +182,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 -- $(CC) -fpic $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym,-soname,$(SONAME) $(LIBLDFLAGS) -o $@ -+ $(CC) -fpic $(ALLCFLAGS) -dynamiclib $(SOURCES) $(LIBLDFLAGS) -Wl,-install_name,$(PREFIX)/lib/$@ -o $@ - ln -s $(SONAME) $(SOLINK) - # use 'nm -Cg --defined-only $@' to view exported symbols - diff --git a/pkgs/tools/security/rhash/default.nix b/pkgs/tools/security/rhash/default.nix index 68c3edc4cd25..14121b3bc04c 100644 --- a/pkgs/tools/security/rhash/default.nix +++ b/pkgs/tools/security/rhash/default.nix @@ -1,31 +1,23 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - version = "1.3.3"; + version = "1.3.5"; name = "rhash-${version}"; src = fetchurl { url = "mirror://sourceforge/rhash/${name}-src.tar.gz"; - sha1 = "0981bdc98ba7ef923b1a6cd7fd8bb0374cff632e"; - sha256 = "0nii6p4m2x8rkaf8r6smgfwb1q4hpf117kkg64yr6gyqgdchnljv"; + sha256 = "0bhz3xdl6r06k1bqigdjz42l31iqz2qdpg7zk316i7p2ra56iq4q"; }; patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch; - installFlags = [ "DESTDIR=$(out)" "PREFIX=/" ]; + makeFlags = [ "DESTDIR=$(out)" "PREFIX=/" "AR:=$(AR)" "CC:=$(CC)" ]; - # we build the static library because of two makefile bugs - # * .h files installed for static library target only - # * .so.0 -> .so link only created in the static library install target - buildPhase = '' - make lib-shared lib-static build-shared CC=$CC AR=$AR PREFIX=$out - ''; + buildFlags = [ "build-shared" "lib-shared" ]; - # we don't actually want the static library, so we remove it after it - # gets installed installPhase = '' - make DESTDIR="$out" PREFIX="/" install-shared install-lib-shared install-lib-static - rm $out/lib/librhash.a + make $makeFlags -C librhash install-lib-shared install-headers install-so-link + make $makeFlags install-shared ''; meta = with stdenv.lib; { -- cgit 1.4.1