rhash - 1.3.6 - Update to altest version, fix a few issues and drop s… (#3519)
* rhash - 1.3.6 - Update to altest version, fix a few issues and drop some stuff I had done that became superceded by other work that's in the source-code. * Fix a compile error. I had mistakenly let an expiriement slip in.
This commit is contained in:
@@ -1,64 +1,93 @@
|
||||
--- rhash-1.3.4/Makefile.orig 2017-05-10 11:54:31.856464800 +0300
|
||||
+++ rhash-1.3.4/Makefile 2017-05-10 11:57:17.536084400 +0300
|
||||
@@ -17,7 +17,7 @@
|
||||
-Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations
|
||||
LDLIBRHASH = -Llibrhash -lrhash
|
||||
ALLLDFLAGS = $(LDLIBRHASH) $(LDFLAGS) $(ADDLDFLAGS)
|
||||
-SHAREDLIB = librhash/librhash.so.0
|
||||
+SHAREDLIB = librhash/librhash.dll
|
||||
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
|
||||
--- RHash-1.3.5/librhash/Makefile.orig 2017-08-14 02:56:22.000000000 +0200
|
||||
+++ RHash-1.3.5/librhash/Makefile 2017-08-25 09:58:18.456531500 +0200
|
||||
@@ -25,6 +25,7 @@
|
||||
# installation directories and names
|
||||
DESTDIR =
|
||||
PREFIX ?= /usr/local
|
||||
+BINDIR = $(PREFIX)/bin
|
||||
INCDIR = $(PREFIX)/include
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
LIBRARY = librhash.a
|
||||
@@ -35,6 +36,10 @@
|
||||
DLLNAME = librhash.dll
|
||||
TEST_TARGET = test_hashes
|
||||
TEST_SHARED = test_shared
|
||||
+
|
||||
+# MINGW dll target
|
||||
+DLLNAME = librhash.dll
|
||||
+
|
||||
# Set variables according to GNU coding standard
|
||||
INSTALL = install
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
@@ -42,7 +47,7 @@
|
||||
--- RHash-1.3.6/configure.orig 2018-03-13 21:42:17.000000000 -0400
|
||||
+++ RHash-1.3.6/configure 2018-03-28 05:05:49.625780400 -0400
|
||||
@@ -547,7 +547,9 @@ EXEC_EXT=
|
||||
NEED_IMPLIB=no
|
||||
NEED_SOLINK=yes
|
||||
INSTALL_SO_DIR=$INSTALL_LIBDIR
|
||||
+LN_S="ln -sf"
|
||||
if win32; then
|
||||
+ LN_S="cp -pR"
|
||||
EXEC_EXT=".exe"
|
||||
SHARED_EXT=".dll"
|
||||
NEED_IMPLIB=yes
|
||||
@@ -649,12 +651,12 @@ if test "$OPT_GETTEXT" != "no"; then
|
||||
if cc_check_headers "libintl.h"; then
|
||||
if cc_check_statement "libintl.h" "gettext(\"\");"; then
|
||||
GETTEXT_FOUND=found
|
||||
- elif cc_check_statement "libintl.h" "gettext(\"\");" "-lintl"; then
|
||||
- GETTEXT_LDFLAGS="-lintl"
|
||||
- GETTEXT_FOUND=found
|
||||
elif cc_check_statement "libintl.h" "gettext(\"\");" "-lintl -liconv"; then
|
||||
GETTEXT_LDFLAGS="-lintl -liconv"
|
||||
GETTEXT_FOUND=found
|
||||
+ elif cc_check_statement "libintl.h" "gettext(\"\");" "-lintl"; then
|
||||
+ GETTEXT_LDFLAGS="-lintl"
|
||||
+ GETTEXT_FOUND=found
|
||||
fi
|
||||
fi
|
||||
test "$GETTEXT_FOUND" = "found" && RHASH_DEFINES=$(str_concat $RHASH_DEFINES -DUSE_GETTEXT)
|
||||
@@ -815,6 +817,7 @@ RHASH_SHARED = $RHASH_SHARED\$(EXEC_E
|
||||
BUILD_TARGETS = $RHASH_BUILD_TARGETS
|
||||
EXTRA_INSTALL = $RHASH_EXTRA_INSTALL
|
||||
SYMLINKS = $INSTALL_SYMLINKS
|
||||
+LN_S = $LN_S
|
||||
|
||||
all: $(LIBRARY)
|
||||
lib-static: $(LIBRARY)
|
||||
-lib-shared: $(SONAME)
|
||||
+lib-shared: $(DLLNAME)
|
||||
libs-all: lib-static lib-shared
|
||||
uninstall-lib: uninstall-lib-shared uninstall-lib-static uninstall-so-link
|
||||
dylib: $(DYNAME)
|
||||
@@ -53,9 +58,11 @@
|
||||
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
||||
$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/
|
||||
OPTFLAGS = $OPTFLAGS
|
||||
OPTLDFLAGS = $WIN_LDFLAGS
|
||||
@@ -897,4 +900,4 @@ Libs: -L\${libdir} -lrhash
|
||||
Libs.private: ${OPENSSL_LDFLAGS}
|
||||
|
||||
-install-lib-shared: $(SONAME)
|
||||
+install-lib-shared: $(DLLNAME)
|
||||
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
|
||||
+ $(INSTALL_SHARED) $(DLLNAME) $(DESTDIR)$(BINDIR)/
|
||||
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
||||
- $(INSTALL_SHARED) $(SONAME) $(DESTDIR)$(LIBDIR)/
|
||||
+ $(INSTALL_SHARED) $(DLLNAME).a $(DESTDIR)$(LIBDIR)/
|
||||
EOF
|
||||
-fi
|
||||
\ No newline at end of file
|
||||
+fi
|
||||
--- RHash-1.3.6/Makefile.orig 2018-03-13 21:42:17.000000000 -0400
|
||||
+++ RHash-1.3.6/Makefile 2018-03-28 05:12:48.794963500 -0400
|
||||
@@ -85,8 +85,8 @@ install-conf:
|
||||
|
||||
install-so-link:
|
||||
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
||||
@@ -180,7 +187,7 @@
|
||||
# MINGW: build a dll library
|
||||
$(DLLNAME): $(SOURCES)
|
||||
sed -n '1s/.*/{ global:/p; s/^RHASH_API.* \([a-z0-9_]\+\)(.*/ \1;/p; $$s/.*/local: *; };/p' $(LIB_HEADERS) > exports.sym
|
||||
- $(CC) -DRHASH_EXPORTS $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym,--output-def,librhash.def,-soname,$@ $(LIBLDFLAGS) -o $@
|
||||
+ $(CC) -DRHASH_EXPORTS $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym,--output-def,librhash.def,--out-implib,$@.a $(LIBLDFLAGS) -o $@
|
||||
# dependencies should be properly set, otherwise 'make -j<n>' can fail
|
||||
install-symlinks: mkdir-bin install-man install-binary
|
||||
- cd $(BINDIR) && for f in $(SYMLINKS); do ln -fs $(RHASH_BINARY) $$f$(EXEC_EXT); done
|
||||
- cd $(MANDIR)/man1 && for f in $(SYMLINKS); do ln -fs rhash.1* $$f.1; done
|
||||
+ cd $(BINDIR) && for f in $(SYMLINKS); do $(LN_S) $(RHASH_BINARY) $$f$(EXEC_EXT); done
|
||||
+ cd $(MANDIR)/man1 && for f in $(SYMLINKS); do $(LN_S) rhash.1 $$f.1; done
|
||||
|
||||
test-dll: $(DLLNAME) test_hashes.o
|
||||
$(CC) $(PRGCFLAGS) test_hashes.o $(DLLNAME) -o $(TEST_SHARED) && ./$(TEST_SHARED)
|
||||
install-pkg-config:
|
||||
$(INSTALL) -d $(PKGCONFIGDIR)
|
||||
@@ -108,10 +108,10 @@ uninstall-lib:
|
||||
+cd librhash && $(MAKE) uninstall-lib
|
||||
|
||||
install-lib-static: $(LIBRHASH_STATIC)
|
||||
- +cd librhash && $(MAKE) install-lib-static
|
||||
+ +cd librhash && $(MAKE) install-lib-static install-headers
|
||||
|
||||
install-lib-shared: $(LIBRHASH_SHARED)
|
||||
- +cd librhash && $(MAKE) install-lib-shared
|
||||
+ +cd librhash && $(MAKE) install-lib-shared install-headers
|
||||
|
||||
install-lib-so-link:
|
||||
+cd librhash && $(MAKE) install-so-link
|
||||
--- RHash-1.3.6/librhash/Makefile.orig 2018-03-13 21:42:17.000000000 -0400
|
||||
+++ RHash-1.3.6/librhash/Makefile 2018-03-28 05:13:33.700479900 -0400
|
||||
@@ -25,7 +25,7 @@ install-lib-static: $(LIBRHASH_STATIC) i
|
||||
$(INSTALL) -d $(LIBDIR)
|
||||
$(INSTALL_DATA) $(LIBRHASH_STATIC) $(LIBDIR)/
|
||||
|
||||
-install-lib-shared: $(LIBRHASH_SHARED) $(EXTRA_INSTALL_LIBSHARED)
|
||||
+install-lib-shared: $(LIBRHASH_SHARED) $(EXTRA_INSTALL_LIBSHARED) install-headers
|
||||
$(INSTALL) -d $(SO_DIR)
|
||||
$(INSTALL_SHARED) $(LIBRHASH_SHARED) $(SO_DIR)/
|
||||
|
||||
--- RHash-1.3.6/file.c.orig 2018-03-28 05:58:22.536574100 -0400
|
||||
+++ RHash-1.3.6/file.c 2018-03-28 06:46:11.141898500 -0400
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
#if defined( _WIN32) || defined(__CYGWIN__)
|
||||
# include <windows.h>
|
||||
+#if !defined(__CYGWIN__)
|
||||
# include <share.h> /* for _SH_DENYWR */
|
||||
+#endif
|
||||
# include <fcntl.h> /* _O_RDONLY, _O_BINARY */
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,37 +3,50 @@
|
||||
_realname=rhash
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.3.5
|
||||
pkgver=1.3.6
|
||||
pkgrel=1
|
||||
pkgdesc="Great utility for computing hash sums (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://sourceforge.net/projects/rhash/'
|
||||
license=('LICENSE')
|
||||
validpgpkeys=('gpg_KEY')
|
||||
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/${_realname}/RHash/archive/v${pkgver}.tar.gz"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gettext")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-ruby")
|
||||
license=('custom' 'MIT')
|
||||
source=(https://downloads.sourceforge.net/rhash/${_realname}-$pkgver-src.tar.gz{,.asc}
|
||||
001-mingw.patch)
|
||||
sha256sums=('98e0688acae29e68c298ffbcdbb0f838864105f9b2bd8857980664435b1f1f2e'
|
||||
'92f09a5188fc369a8556873a8b5e416ae3fd9e978a12bd0b1619414c99936746')
|
||||
sha256sums=('964df972b60569b5cb35ec989ced195ab8ea514fc46a74eab98e86569ffbcf92'
|
||||
'SKIP'
|
||||
'0de7aa61dfe43fe7ed453d807c10604e1bcd664867b67b13c46a33efe9bc7480')
|
||||
validpgpkeys=('2875F6B1C2D27A4F0C8AF60B2A714497E37363AE')
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}-${pkgver}
|
||||
patch -p1 -i ${srcdir}/001-mingw.patch
|
||||
patch -Nbp1 -i ${srcdir}/001-mingw.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
|
||||
mv "${srcdir}"/RHash-${pkgver} "${srcdir}"/build-${CARCH}
|
||||
cp -R "${srcdir}"/RHash-${pkgver} "${srcdir}"/build-${CARCH}
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make CC=${MINGW_PREFIX}/bin/gcc AR=${MINGW_PREFIX}/bin/ar
|
||||
./configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--enable-lib-static \
|
||||
--enable-lib-shared
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
echo "Skipping make check"
|
||||
# cd "${srcdir}"/build-${CARCH}
|
||||
# make check
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make test test-shared test-static
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
make install install-lib-shared install-lib-static PREFIX="${pkgdir}${MINGW_PREFIX}"
|
||||
make -j1 install DESTDIR="${pkgdir}"
|
||||
make -j1 install install-gmo
|
||||
|
||||
# license
|
||||
# fully qualify path for this because there might be switch in
|
||||
# build systems.
|
||||
install -Dm644 ${srcdir}/RHash-${pkgver}/COPYING \
|
||||
"$pkgdir${MINGW_PREFIX}"/share/licenses/rhash/LICENSE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user