Files
MSYS2-packages/rhash/001-mingw.patch

94 lines
3.3 KiB
Diff

--- 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
OPTFLAGS = $OPTFLAGS
OPTLDFLAGS = $WIN_LDFLAGS
@@ -897,4 +900,4 @@ Libs: -L\${libdir} -lrhash
Libs.private: ${OPENSSL_LDFLAGS}
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:
# 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
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