Files
pkgsrc-ng/devel/nspr/patches/patch-ac
2016-11-18 22:39:22 +01:00

96 lines
3.1 KiB
Plaintext

$NetBSD: patch-ac,v 1.11 2016/08/28 07:00:50 richard Exp $
add runpath to Linux caught during check-shlibs-elf
--- nspr/configure.in.orig 2016-02-12 13:51:25.000000000 +0000
+++ nspr/configure.in
@@ -38,7 +38,7 @@ OBJDIR_NAME=.
OBJDIR_SUFFIX=OBJ
NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
NOSUCHFILE=/no-such-file
-LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
+LIBNSPR='-Wl,-R${prefix}/lib/${MOZILLA_PKG_NAME} -L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
CYGWIN_WRAPPER=
MACOS_SDK_DIR=
@@ -1531,6 +1531,33 @@ tools are selected during the Xcode/Deve
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
MDCPUCFG_H=_freebsd.cfg
PR_MD_CSRCS=freebsd.c
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
+ ;;
+
+*-dragonfly*)
+ if test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ fi
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
+ MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ if test "$MOZ_OBJFORMAT" = "elf"; then
+ DLL_SUFFIX=so
+ else
+ DLL_SUFFIX=so.1.0
+ fi
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ MDCPUCFG_H=_dragonfly.cfg
+ PR_MD_CSRCS=freebsd.c
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
;;
*-hpux*)
@@ -1805,6 +1832,9 @@ tools are selected during the Xcode/Deve
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
DSO_CFLAGS=-fPIC
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
_OPTIMIZE_FLAGS=-O2
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
# combo is not yet good at debugging inlined
@@ -2128,7 +2158,7 @@ tools are selected during the Xcode/Deve
AC_DEFINE(HAVE_SOCKLEN_T)
CFLAGS="$CFLAGS -ansi -Wall"
CXXFLAGS="$CXXFLAGS -ansi -Wall"
- DLL_SUFFIX=so.1.0
+ DLL_SUFFIX=so
DSO_CFLAGS=-fPIC
MDCPUCFG_H=_openbsd.cfg
PR_MD_CSRCS=openbsd.c
@@ -2715,7 +2745,7 @@ if test -n "$USE_PTHREADS"; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthread=yes
case "$target_os" in
- freebsd*)
+ freebsd* | dragonfly*)
# Freebsd doesn't use -pthread for compiles, it uses them for linking
;;
*)
@@ -2753,7 +2783,7 @@ if test -n "$USE_PTHREADS"; then
_PTHREAD_LDFLAGS=
fi
;;
- *-freebsd*)
+ *-freebsd* | *-dragonfly*)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
dnl -pthread links in -lc_r, so don't specify it explicitly.
@@ -2834,7 +2864,7 @@ case "$target" in
AC_DEFINE(_PR_NEED_PTHREAD_INIT)
fi
;;
-*-freebsd*)
+*-freebsd* | *-dragonfly*)
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi