SOURCES: xulrunner-system-bz2.patch (NEW) - from debian

glen glen at pld-linux.org
Thu Nov 15 22:04:40 CET 2007


Author: glen                         Date: Thu Nov 15 21:04:40 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- from debian

---- Files affected:
SOURCES:
   xulrunner-system-bz2.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/xulrunner-system-bz2.patch
diff -u /dev/null SOURCES/xulrunner-system-bz2.patch:1.1
--- /dev/null	Thu Nov 15 22:04:40 2007
+++ SOURCES/xulrunner-system-bz2.patch	Thu Nov 15 22:04:35 2007
@@ -0,0 +1,216 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 31_system_bz2.dpatch by Mike Hommey <glandium at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: use system bz2. bz#305782.
+
+ at DPATCH@
+
+=== Makefile.in
+==================================================================
+--- xulrunner/Makefile.in	(revision 10)
++++ xulrunner/Makefile.in	(local)
+@@ -126,7 +126,9 @@
+ endif
+ 
+ ifdef MOZ_UPDATER
++ifndef MOZ_NATIVE_BZ2
+ tier_1_dirs += modules/libbz2
++endif
+ tier_1_dirs += modules/libmar
+ endif
+ 
+=== config/autoconf.mk.in
+==================================================================
+--- xulrunner/config/autoconf.mk.in	(revision 10)
++++ xulrunner/config/autoconf.mk.in	(local)
+@@ -181,6 +181,7 @@
+ NECKO_COOKIES = @NECKO_COOKIES@
+ 
+ MOZ_NATIVE_ZLIB	= @SYSTEM_ZLIB@
++MOZ_NATIVE_BZ2	= @SYSTEM_BZ2@
+ MOZ_NATIVE_JPEG	= @SYSTEM_JPEG@
+ MOZ_NATIVE_PNG	= @SYSTEM_PNG@
+ MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
+@@ -370,6 +371,14 @@
+ ZLIB_REQUIRES	= zlib
+ endif
+ 
++MOZ_BZ2_CFLAGS	= @MOZ_BZ2_CFLAGS@
++MOZ_BZ2_LIBS	= @MOZ_BZ2_LIBS@
++ifdef MOZ_NATIVE_BZ2
++BZ2_REQUIRES	=
++else
++BZ2_REQUIRES	= libbz2
++endif
++
+ ifdef MOZ_NATIVE_PNG
+ PNG_CFLAGS	= @PNG_CFLAGS@
+ PNG_LIBS	= @PNG_LIBS@
+=== configure.in
+==================================================================
+--- xulrunner/configure.in	(revision 10)
++++ xulrunner/configure.in	(local)
+@@ -732,6 +732,8 @@
+ MOZ_JPEG_LIBS='-L$(DIST)/lib -lmozjpeg'
+ MOZ_ZLIB_CFLAGS=
+ MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz'
++MOZ_BZ2_CFLAGS=
++MOZ_BZ2_LIBS='-L$(DIST)/lib -lbz2'
+ MOZ_PNG_CFLAGS=
+ MOZ_PNG_LIBS='-L$(DIST)/lib -lmozpng'
+ 
+@@ -1524,6 +1526,7 @@
+     MOZ_PNG_LIBS='$(DIST)/lib/mozpng.lib'
+     MOZ_XPCOM_OBSOLETE_LIBS='$(DIST)/lib/xpcom_compat.lib'
+     MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.lib'
++    MOZ_BZ2_LIBS='$(DIST)/lib/bz2.lib'
+     OBJ_SUFFIX=obj
+     RANLIB='echo not_ranlib'
+     STRIP='echo not_strip'
+@@ -1579,6 +1582,7 @@
+         RCFLAGS='-O coff --use-temp-file'
+         MOZ_JPEG_LIBS='-L$(DIST)/lib -ljpeg$(MOZ_BITS)$(VERSION_NUMBER)'
+         MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz'
++        MOZ_BZ2_LIBS='-L$(DIST)/lib -lbz2'
+         MOZ_PNG_LIBS='-L$(DIST)/lib -lpng'
+         MOZ_JS_LIBS='-L$(DIST)/lib -ljs$(MOZ_BITS)$(VERSION_NUMBER)'
+         MOZ_FIX_LINK_PATHS=
+@@ -1618,6 +1622,7 @@
+     	MOZ_OPTIMIZE_FLAGS='-O1'
+         MOZ_JPEG_LIBS='$(DIST)/lib/jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib'
+         MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.lib'
++        MOZ_BZ2_LIBS='$(DIST)/lib/bz2.lib'
+         MOZ_PNG_LIBS='$(DIST)/lib/png.lib'
+         MOZ_JS_LIBS='$(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib'
+         MOZ_FIX_LINK_PATHS=
+@@ -1923,6 +1928,7 @@
+         LIBXUL_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xul.lib'
+         MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)'
+         MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)'
++        MOZ_BZ2_LIBS='$(DIST)/lib/bz2.$(LIB_SUFFIX)'
+         MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)'
+         MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)'
+         MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_GFX_TOOLKIT)'
+@@ -3569,6 +3575,35 @@
+     ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}"
+ fi
+ 
++dnl system BZIP2 Support
++dnl ========================================================
++MOZ_ARG_WITH_STRING(system-bz2,
++[  --with-system-bz2[=PFX]
++                          Use system libbz2 [installed at prefix PFX]],
++    BZ2_DIR=$withval)
++
++_SAVE_CFLAGS=$CFLAGS
++_SAVE_LDFLAGS=$LDFLAGS
++_SAVE_LIBS=$LIBS
++if test -n "${BZ2_DIR}" -a "${BZ2_DIR}" != "yes"; then
++    CFLAGS="-I${BZ2_DIR}/include $CFLAGS"
++    LDFLAGS="-L${BZ2_DIR}/lib $LDFLAGS"
++fi
++if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then
++    SYSTEM_BZ2=
++else
++    AC_CHECK_LIB(bz2, BZ2_bzread, [SYSTEM_BZ2=1 MOZ_BZ2_LIBS="-lbz2"], 
++	[SYSTEM_BZ2= MOZ_BZ2_CFLAGS= MOZ_BZ2_LIBS=], $MOZ_BZ2_LIBS)
++fi
++CFLAGS=$_SAVE_CFLAGS
++LDFLAGS=$_SAVE_LDFLAGS
++LIBS=$_SAVE_LIBS
++
++if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$SYSTEM_BZ2" = 1; then
++    MOZ_BZ2_CFLAGS="-I${BZ2_DIR}/include"
++    MOZ_BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}"
++fi
++
+ dnl system PNG Support
+ dnl ========================================================
+ MOZ_ARG_WITH_STRING(system-png, 
+@@ -6679,6 +6714,7 @@
+ AC_SUBST(SYSTEM_JPEG)
+ AC_SUBST(SYSTEM_PNG)
+ AC_SUBST(SYSTEM_ZLIB)
++AC_SUBST(SYSTEM_BZ2)
+ 
+ AC_SUBST(JPEG_CFLAGS)
+ AC_SUBST(JPEG_LIBS)
+@@ -6691,6 +6727,8 @@
+ AC_SUBST(MOZ_JPEG_LIBS)
+ AC_SUBST(MOZ_ZLIB_CFLAGS)
+ AC_SUBST(MOZ_ZLIB_LIBS)
++AC_SUBST(MOZ_BZ2_CFLAGS)
++AC_SUBST(MOZ_BZ2_LIBS)
+ AC_SUBST(MOZ_PNG_CFLAGS)
+ AC_SUBST(MOZ_PNG_LIBS)
+ 
+=== toolkit/mozapps/update/src/updater/Makefile.in
+==================================================================
+--- xulrunner/toolkit/mozapps/update/src/updater/Makefile.in	(revision 10)
++++ xulrunner/toolkit/mozapps/update/src/updater/Makefile.in	(local)
+@@ -52,11 +52,11 @@
+ 
+ PROGRAM = updater$(BIN_SUFFIX)
+ 
+-REQUIRES = libmar libbz2
++REQUIRES = libmar \
++	   $(BZ2_REQUIRES)
+ 
+ LIBS += \
+ 	$(DIST)/lib/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
+-	$(DIST)/lib/$(LIB_PREFIX)bz2.$(LIB_SUFFIX) \
+ 	$(NULL)
+ 
+ ifeq ($(OS_ARCH),WINNT)
+@@ -118,3 +118,6 @@
+ # Pick up nsWindowsRestart.cpp
+ LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+ endif
++
++CXXFLAGS += $(MOZ_BZ2_CFLAGS)
++EXTRA_LIBS += $(MOZ_BZ2_LIBS)
+=== toolkit/mozapps/update/src/updater/updater.cpp
+==================================================================
+--- xulrunner/toolkit/mozapps/update/src/updater/updater.cpp	(revision 10)
++++ xulrunner/toolkit/mozapps/update/src/updater/updater.cpp	(local)
+@@ -52,6 +52,7 @@
+ #include "archivereader.h"
+ #include "errors.h"
+ #include "bzlib.h"
++#include "nscore.h"
+ 
+ #include <stdio.h>
+ #include <string.h>
+@@ -121,7 +122,7 @@
+ 
+ // This variable lives in libbz2.  It's declared in bzlib_private.h, so we just
+ // declare it here to avoid including that entire header file.
+-extern "C" unsigned int BZ2_crc32Table[256];
++extern "C" NS_IMPORT_(unsigned int) BZ2_crc32Table[256];
+ 
+ static unsigned int
+ crc32(const unsigned char *buf, unsigned int len)
+=== config/Makefile.in
+==================================================================
+--- xulrunner/config/Makefile.in	(revision 245)
++++ xulrunner/config/Makefile.in	(local)
+@@ -137,6 +137,7 @@
+ 	$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
+ 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
+ 		-DMOZ_ENABLE_LIBXUL=$(MOZ_ENABLE_LIBXUL) \
++		-DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
+ 		-DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
+ 		-DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
+ 		$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
+=== config/system-headers
+==================================================================
+--- xulrunner/config/system-headers	(revision 245)
++++ xulrunner/config/system-headers	(local)
+@@ -931,3 +931,6 @@
+ #if MOZ_NATIVE_ZLIB==1
+ zlib.h
+ #endif
++#if MOZ_NATIVE_BZ2==1
++bzlib.h
++#endif
================================================================


More information about the pld-cvs-commit mailing list