Files
pkgsrc-ng/www/firefox/patches/patch-aa
2013-09-26 17:14:40 +02:00

200 lines
6.8 KiB
Plaintext

$NetBSD: patch-aa,v 1.13 2013/07/01 13:53:27 martin Exp $
--- configure.in.orig 2013-06-17 22:12:58.000000000 +0000
+++ configure.in
@@ -1388,6 +1388,17 @@ if test "$GNU_CC"; then
CFLAGS=$_SAVE_CFLAGS
AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
+ # Check for -msse4.1 on $CC
+ AC_MSG_CHECKING([if toolchain supports -msse4.1 option])
+ HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=
+ _SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -msse4.1"
+ AC_TRY_COMPILE([asm ("pmulld %xmm6,%xmm0");],,AC_MSG_RESULT([yes])
+ [HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1],
+ AC_MSG_RESULT([no]))
+ CFLAGS=$_SAVE_CFLAGS
+ AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
+
# Turn on GNU-specific warnings:
# -Wall - turn on a lot of warnings
# -Wpointer-arith - good to have
@@ -2066,6 +2077,9 @@ ia64*-hpux*)
if test -z "$MC"; then
MC=mc.exe
fi
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+ fi
;;
*-mingw*)
DSO_CFLAGS=
@@ -2862,6 +2876,7 @@ EOF
#pragma GCC visibility push(hidden)
#pragma GCC visibility push(default)
#include <string.h>
+#include <iterator>
#pragma GCC visibility pop
__attribute__ ((visibility ("default"))) void Func() {
@@ -2870,7 +2885,7 @@ __attribute__ ((visibility ("default")))
}
EOF
ac_cv_have_visibility_builtin_bug=no
- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
+ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
ac_cv_have_visibility_builtin_bug=yes
else
if test `grep -c "@PLT" conftest.S` = 0; then
@@ -3032,6 +3047,9 @@ dnl ====================================
case $target in
*-hpux11.*)
;;
+*-dragonfly*)
+ AC_CHECK_LIB(c, gethostbyname_r)
+ ;;
*)
AC_CHECK_LIB(c_r, gethostbyname_r)
;;
@@ -3333,6 +3351,9 @@ AC_CACHE_CHECK(
#ifdef linux
#define _BSD_SOURCE 1
#endif
+ #ifdef __NetBSD__
+ #error use of global _res variable in threaded programs is not portable
+ #endif
#include <resolv.h>
],
[int foo = res_ninit(&_res);],
@@ -3995,6 +4016,14 @@ if test -n "$YASM"; then
_YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'`
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/xulrunner/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 ========================================================
@@ -4022,11 +4051,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
#include <jpeglib.h> ],
[ #if JPEG_LIB_VERSION < $MOZJPEG
#error "Insufficient JPEG library version ($MOZJPEG required)."
- #endif
- #ifndef JCS_EXTENSIONS
- #error "libjpeg-turbo JCS_EXTENSIONS required"
- #endif
- ],
+ #endif ],
MOZ_NATIVE_JPEG=1,
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
fi
@@ -5260,7 +5285,7 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_WEBRTC=
fi
;;
- *-linux*|*-mingw*|*-darwin*)
+ *-linux*|*-mingw*|*-darwin*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
dnl Leave enabled
;;
*)
@@ -5314,6 +5339,9 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_VP8_ENCODER=1
MOZ_VP8_ERROR_CONCEALMENT=1
+ dnl with libv4l2 we can support more cameras
+ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
+
if test "$MOZ_WIDGET_TOOLKIT" != "gonk"; then
dnl OpenSLES is only available in Android 2.3 and later; we'll change this
dnl hard dependency to a dynamic load with graceful runtime failure before
@@ -5727,7 +5755,7 @@ MOZ_ALSA=)
if test -n "$MOZ_ALSA"; then
AC_DEFINE(MOZ_CUBEB)
- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
+ PKG_CHECK_MODULES(MOZ_ALSA, alsa, MOZ_ALSA=1,
[echo "$MOZ_ALSA_PKG_ERRORS"
AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])])
fi
@@ -8332,7 +8360,7 @@ if test "$MOZ_ENABLE_SKIA"; then
AC_DEFINE(GR_DLL)
fi
- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64"; then
+ if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc"; then
MOZ_ENABLE_SKIA_GPU=1
AC_DEFINE(USE_SKIA_GPU)
AC_SUBST(MOZ_ENABLE_SKIA_GPU)
@@ -8413,16 +8441,26 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi,
NECKO_WIFI=,
NECKO_WIFI=1)
-if test "$OS_ARCH" = "OS2"; then
- dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
- NECKO_WIFI=
-fi
-if test "$NECKO_WIFI" -a \
- "$OS_ARCH" != "Linux" -a \
- "$OS_ARCH" != "Darwin" -a \
- "$OS_ARCH" != "SunOS" -a \
- "$OS_ARCH" != "WINNT"; then
- AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
+if test "$NECKO_WIFI"; then
+ case "$OS_TARGET" in
+ Android)
+ ;;
+ Darwin)
+ ;;
+ SunOS)
+ ;;
+ WINNT)
+ ;;
+ OS2)
+ dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
+ NECKO_WIFI=
+ ;;
+ *)
+ if test -z "$MOZ_ENABLE_DBUS"; then
+ AC_MSG_ERROR([Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi])
+ fi
+ ;;
+ esac
fi
if test "$NECKO_WIFI"; then
@@ -9102,6 +9140,27 @@ if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE
EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1"
fi
+# Keep libcubeb and audio_device backends in sync
+if test -n "$MOZ_ALSA"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1"
+else
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0"
+fi
+if test -n "$MOZ_PULSEAUDIO"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1"
+else
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0"
+fi
+
+# Don't try to compile sse4.1 code if toolchain doesn't support
+if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1"
+fi
+
+if test -n "$MOZ_LIBV4L2_LIBS"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D use_libv4l2=1"
+fi
+
if test -n "$MOZ_WEBRTC"; then
AC_MSG_RESULT("generating WebRTC Makefiles...")