pkgsrc/devel/xulrunner192/patches/patch-aa
2013-10-20 18:17:04 +00:00

118 lines
4.2 KiB
Text

$NetBSD: patch-aa,v 1.5 2013/10/20 18:17:04 joerg Exp $
Do not allow access to _res on NetBSD.
--- configure.in.orig 2012-03-06 14:45:23.000000000 +0000
+++ configure.in
@@ -1398,8 +1398,8 @@ if test "$GNU_CC"; then
ASFLAGS="$ASFLAGS -fPIC"
_MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti
_MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti
- _MOZ_EXCEPTIONS_FLAGS_ON='-fhandle-exceptions'
- _MOZ_EXCEPTIONS_FLAGS_OFF='-fno-handle-exceptions'
+ _MOZ_EXCEPTIONS_FLAGS_ON='-fexceptions'
+ _MOZ_EXCEPTIONS_FLAGS_OFF='-fno-exceptions'
# Turn on GNU specific features
# -Wall - turn on all warnings
@@ -1858,7 +1858,7 @@ case "$target" in
fi
;;
-*-freebsd*)
+*-freebsd* | *-dragonfly*)
if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
DLL_SUFFIX=".so.1.0"
DSO_LDOPTS="-shared"
@@ -1872,6 +1872,9 @@ case "$target" in
# MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
# MKSHLIB_UNFORCE_ALL=''
# fi
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+ fi
;;
*-hpux*)
@@ -2939,6 +2942,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
@@ -3110,6 +3116,9 @@ dnl ====================================
case $target in
*-hpux11.*)
;;
+*-dragonfly*)
+ AC_CHECK_LIB(c, gethostbyname_r)
+ ;;
*)
AC_CHECK_LIB(c_r, gethostbyname_r)
;;
@@ -3556,7 +3565,11 @@ AC_CACHE_CHECK(
#endif
#include <resolv.h>
],
- [int foo = res_ninit(&_res);],
+ [
+ #ifdef __NetBSD__
+ #error "_res is not usable in threaded programs"
+ #endif
+ int foo = res_ninit(&_res);],
[ac_cv_func_res_ninit=yes],
[ac_cv_func_res_ninit=no])
])
@@ -3792,13 +3805,7 @@ if test "$GNU_CXX"; then
AC_CACHE_VAL(ac_cv_cxx_exceptions_flags,
[echo "int main() { return 0; }" | cat > conftest.C
- ${CXX-g++} ${CXXFLAGS} -c -fno-handle-exceptions conftest.C > conftest.out 2>&1
-
- if egrep "warning.*renamed" conftest.out >/dev/null; then
- ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions
- else
- ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-handle-exceptions
- fi
+ ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions
rm -f conftest*])
@@ -4326,6 +4333,14 @@ else
fi
fi
+if test -n "${LIBXUL_SDK_DIR}"; then
+ AC_MSG_WARN([pkgsrc: LIBXUL_SDK_DIR is set; assuming we want nss and nspr from xulrunner.])
+ NSPR_CFLAGS="-I${prefix}/include/xulrunner192/unstable `pkg-config --cflags mozilla-nspr`"
+ NSPR_LIBS="`pkg-config --libs mozilla-nspr`"
+ NSS_CFLAGS="`pkg-config --cflags mozilla-nss`"
+ NSS_LIBS="`pkg-config --libs mozilla-nss`"
+fi
+
if test -z "$SKIP_LIBRARY_CHECKS"; then
dnl system JPEG support
dnl ========================================================
@@ -8630,7 +8645,8 @@ rm -f confdefs.h.save
mv confdefs.h confdefs.h.save
egrep -v "$_EGREP_PATTERN" confdefs.h.save > confdefs.h
AC_OUTPUT_MAKE_DEFS()
-MOZ_DEFINES=$DEFS
+# nbsed broken. PR bin/42261
+MOZ_DEFINES="$DEFS`awk 'BEGIN {while(x<1000){printf " ";x++}}'`"
AC_SUBST(MOZ_DEFINES)
rm -f confdefs.h
mv confdefs.h.save confdefs.h
@@ -8721,6 +8737,8 @@ if test -z "$MOZ_NATIVE_NSPR"; then
AC_MSG_WARN([Recreating autoconf.mk with updated nspr-config output])
if test "$OS_ARCH" != "WINNT" && test "$OS_ARCH" != "WINCE"; then
NSPR_LIBS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --libdir=$LIBXUL_DIST/lib --libs`
+ AC_MSG_WARN([pkgsrc: adding run path to NSPR_LIBS for bundled NSPR.])
+ NSPR_LIBS="-Wl,-R${prefix}/lib/\${MOZILLA_PKG_NAME} ${NSPR_LIBS}"
$PERL -pi.bak -e "s '^NSPR_LIBS\\s*=.*'NSPR_LIBS = $NSPR_LIBS'" config/autoconf.mk
NSPR_CFLAGS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --includedir=$LIBXUL_DIST/include/nspr --cflags`
$PERL -pi.bak -e "s '^NSPR_CFLAGS\\s*=.*'NSPR_CFLAGS = $NSPR_CFLAGS'" config/autoconf.mk