You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/nettle/files/nettle-2.4-darwin-shlink.patch

54 lines
2.3 KiB

From MacPorts:
https://trac.macports.org/browser/trunk/dports/devel/nettle/files/patch-configure.diff
nettle: move -L. before $(LDFLAGS) (which will contain -L${prefix}/lib)
so future updates when the new and old libraries are incompatible don't
go awry
Reworked by Gentoo for configure.ac
Fixes in particular the linking stage on Darwin, using the right
dependency libs, and creating the right names.
Fixed incorrect -gmp argument in LIBS (probably typo)
--- configure.ac
+++ configure.ac
@@ -61,9 +61,7 @@
[enable_gcov=no])
LSH_RPATH_INIT([`echo $with_lib_path | sed 's/:/ /g'` \
- `echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$ac_default_prefix/lib@g"` \
- /usr/local/lib /sw/local/lib /sw/lib \
- /usr/gnu/lib /opt/gnu/lib /sw/gnu/lib /usr/freeware/lib /usr/pkg/lib])
+ `echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$ac_default_prefix/lib@g"`])
# Checks for programs.
AC_PROG_CC
@@ -281,16 +280,16 @@
;;
darwin*)
LIBNETTLE_FORLINK=libnettle.dylib
- LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
- LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
- LIBNETTLE_LINK='$(CC) -dynamiclib $(LDFLAGS)'
- LIBNETTLE_LIBS=''
+ LIBNETTLE_SONAME='libnettle.$(LIBNETTLE_MAJOR).dylib'
+ LIBNETTLE_FILE='libnettle.$(LIBNETTLE_MAJOR).$(LIBNETTLE_MINOR).dylib'
+ LIBNETTLE_LINK='$(CC) -dynamiclib $(LDFLAGS) -install_name ${libdir}/$(LIBNETTLE_SONAME) -compatibility_version $(LIBNETTLE_MAJOR) -current_version $(LIBNETTLE_MAJOR).$(LIBNETTLE_MINOR)'
+ LIBNETTLE_LIBS='$(LIBS)'
LIBHOGWEED_FORLINK=libhogweed.dylib
- LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
- LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
- LIBHOGWEED_LINK='$(CC) -dynamiclib $(LDFLAGS)'
- LIBHOGWEED_LIBS=''
+ LIBHOGWEED_SONAME='libhogweed.$(LIBHOGWEED_MAJOR).dylib'
+ LIBHOGWEED_FILE='libhogweed.$(LIBHOGWEED_MAJOR).$(LIBHOGWEED_MINOR).dylib'
+ LIBHOGWEED_LINK='$(CC) -dynamiclib -L. $(LDFLAGS) -install_name ${libdir}/$(LIBHOGWEED_SONAME) -compatibility_version $(LIBHOGWEED_MAJOR) -current_version $(LIBHOGWEED_MAJOR).$(LIBHOGWEED_MINOR)'
+ LIBHOGWEED_LIBS='$(LIBS) -lnettle'
;;
solaris*)
# Sun's ld uses -h to set the soname, and this option is passed