pkgsrc/devel/xulrunner192/patches/patch-ac
joerg 05a9d221d7 Global variables of types without default constructors may not be
constant. Fix issues with template look up. Disable visibility for clang
as it checks the consistency of type declarations and the old Mozilla
code is way too heavy to patch for that.
2012-11-18 01:55:52 +00:00

93 lines
2.9 KiB
Text

$NetBSD: patch-ac,v 1.2 2012/11/18 01:55:52 joerg Exp $
--- nsprpub/configure.in.orig 2012-03-06 14:45:41.000000000 +0000
+++ nsprpub/configure.in
@@ -71,7 +71,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=
@@ -677,6 +677,9 @@ if test "$GNU_CC"; then
AC_CACHE_CHECK(for visibility(hidden) attribute,
ac_cv_visibility_hidden,
[cat > conftest.c <<EOF
+#ifdef __clang__
+#error Not supported by old Mozilla
+#endif
int foo __attribute__ ((visibility ("hidden"))) = 1;
EOF
ac_cv_visibility_hidden=no
@@ -1311,6 +1314,34 @@ 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(FREEBSD)
+ 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=_freebsd.cfg
+ PR_MD_CSRCS=freebsd.c
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
;;
*-hpux*)
@@ -1925,6 +1956,7 @@ mips-nec-sysv*)
AC_DEFINE(XP_UNIX)
AC_DEFINE(NETBSD)
AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
@@ -2730,7 +2762,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
;;
*)
@@ -2768,7 +2800,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.
@@ -2849,7 +2881,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