b=518506 make public pixman symbols available in --disable-libxul and --enable-system-cairo builds r=bsmedberg
authorKarl Tomlinson <karlt+@karlt.net>
Mon, 14 Dec 2009 10:00:31 +1300
changeset 35697 d6cf9a15c50fc191d563b7f12c6e0b61086800d7
parent 35696 bc0849430750575ea1e08a4ce81241f62da02103
child 35698 274480cf21d74e008336532f954e48d3700f3504
push id10683
push userktomlinson@mozilla.com
push dateMon, 14 Dec 2009 02:37:51 +0000
treeherdermozilla-central@f20c4c211ac8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs518506
milestone1.9.3a1pre
b=518506 make public pixman symbols available in --disable-libxul and --enable-system-cairo builds r=bsmedberg
config/system-headers
configure.in
gfx/cairo/README
gfx/cairo/endian.patch
gfx/cairo/libpixman/src/Makefile.in
gfx/cairo/libpixman/src/pixman-private.h
gfx/cairo/libpixman/src/pixman.h
gfx/cairo/pixman-rename-and-endian.patch
js/src/config/system-headers
--- a/config/system-headers
+++ b/config/system-headers
@@ -71,16 +71,17 @@ Button.h
 byteswap.h
 #if MOZ_ENABLE_LIBXUL!=1
 #define WRAP_CAIRO_HEADERS
 #endif
 #if MOZ_TREE_CAIRO!=1
 #define WRAP_CAIRO_HEADERS
 #endif
 #ifdef WRAP_CAIRO_HEADERS
+pixman.h
 cairo.h
 cairo-atsui.h
 cairo-beos.h
 cairo-ft.h
 cairo-glitz.h
 cairo-os2.h
 cairo-pdf.h
 cairo-ps.h
--- a/configure.in
+++ b/configure.in
@@ -7601,17 +7601,17 @@ if test "$MOZ_TREE_CAIRO"; then
             MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS -lXrender -lfreetype -lfontconfig"
         fi
     fi
 
     CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h
     mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null
 
 else
-   PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION freetype2 fontconfig)
+   PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION pixman-1 freetype2 fontconfig)
    MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS
    MOZ_CAIRO_LIBS=$CAIRO_LIBS
    if test "$MOZ_X11"; then
         PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION)
         MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS"
         MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS"
    fi
 fi
--- a/gfx/cairo/README
+++ b/gfx/cairo/README
@@ -61,13 +61,13 @@ quartz-const-globals.patch: make some Qu
 quartz-minimze-gradient-repeat.patch: reduce the number of gradient stop repetitions we use, to improve quality of Quartz's gradient rendering
 
 quartz-first-stop.patch: return the first stop for negative positions on the gradient line of a nonrepeating linear gradient
 
 ==== pixman patches ====
 
 pixman-neon.patch: add ARM NEON optimized compositing functions
 
-endian.patch: include cairo-platform.h for endian macros
+pixman-rename-and-endian.patch: include cairo-platform.h for renaming of external symbols and endian macros
 
 ==== disable printing patch ====
 
 disable-printing.patch:  allows us to use NS_PRINTING to disable printing.
deleted file mode 100644
--- a/gfx/cairo/endian.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libpixman/src/pixman-private.h	Fri Oct 19 14:55:56 2007
-+++ b/libpixman/src/pixman-private.h	Fri Oct 19 14:56:45 2007
-@@ -5,6 +5,8 @@
- #ifndef PIXMAN_PRIVATE_H
- #define PIXMAN_PRIVATE_H
- 
-+#include "cairo-platform.h"
-+
- #include "pixman.h"
- #include <time.h>
- 
--- a/gfx/cairo/libpixman/src/Makefile.in
+++ b/gfx/cairo/libpixman/src/Makefile.in
@@ -157,16 +157,30 @@ endif
 EXPORTS		= pixman.h pixman-version.h
 
 LOCAL_INCLUDES	+= -I$(srcdir) -I$(srcdir)/../../cairo/src
 
 FORCE_STATIC_LIB = 1
 # This library is used by other shared libs in a static build
 FORCE_USE_PIC = 1
 
+include $(topsrcdir)/config/config.mk
+
+ifndef MOZ_ENABLE_LIBXUL
+ifdef GNU_CC
+# -fvisibility=hidden works fine but PIXMAN_EXPORT is not used in header
+# files, so pixman.h needs to be included before
+# "#pragma GCC visibility -push(hidden)".
+ifdef WRAP_SYSTEM_INCLUDES
+MY_VISIBILITY_FLAGS := -include pixman.h $(VISIBILITY_FLAGS)
+COMPILE_CFLAGS += $(MY_VISIBILITY_FLAGS)
+endif # WRAP_SYSTEM_INCLUDES
+endif # GNU_CC
+endif # !MOZ_ENABLE_LIBXUL
+
 include $(topsrcdir)/config/rules.mk
 
 CFLAGS += -DPACKAGE="mozpixman" -D_USE_MATH_DEFINES
 
 
 # special rule for pixman-mmx to get the right cflags
 pixman-mmx.$(OBJ_SUFFIX): pixman-mmx.c Makefile Makefile.in
 	$(REPORT_BUILD)
--- a/gfx/cairo/libpixman/src/pixman-private.h
+++ b/gfx/cairo/libpixman/src/pixman-private.h
@@ -1,17 +1,15 @@
 #ifndef PACKAGE
 #  error config.h must be included before pixman-private.h
 #endif
 
 #ifndef PIXMAN_PRIVATE_H
 #define PIXMAN_PRIVATE_H
 
-#include "cairo-platform.h"
-
 #include "pixman.h"
 #include <time.h>
 
 #ifndef FALSE
 #define FALSE 0
 #endif
 
 #ifndef TRUE
--- a/gfx/cairo/libpixman/src/pixman.h
+++ b/gfx/cairo/libpixman/src/pixman.h
@@ -64,16 +64,18 @@ SOFTWARE.
  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
 #ifndef PIXMAN_H__
 #define PIXMAN_H__
 
+#include "cairo-platform.h"
+
 #include <pixman-version.h>
 
 /*
  * Standard integers
  */
 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
 #  include <inttypes.h>
 #elif defined (_MSC_VER)
new file mode 100644
--- /dev/null
+++ b/gfx/cairo/pixman-rename-and-endian.patch
@@ -0,0 +1,22 @@
+diff --git a/gfx/cairo/libpixman/src/pixman.h b/gfx/cairo/libpixman/src/pixman.h
+--- a/gfx/cairo/libpixman/src/pixman.h
++++ b/gfx/cairo/libpixman/src/pixman.h
+@@ -64,16 +64,18 @@ SOFTWARE.
+  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+  * PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
+ #ifndef PIXMAN_H__
+ #define PIXMAN_H__
+ 
++#include "cairo-platform.h"
++
+ #include <pixman-version.h>
+ 
+ /*
+  * Standard integers
+  */
+ #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
+ #  include <inttypes.h>
+ #elif defined (_MSC_VER)
--- a/js/src/config/system-headers
+++ b/js/src/config/system-headers
@@ -71,16 +71,17 @@ Button.h
 byteswap.h
 #if MOZ_ENABLE_LIBXUL!=1
 #define WRAP_CAIRO_HEADERS
 #endif
 #if MOZ_TREE_CAIRO!=1
 #define WRAP_CAIRO_HEADERS
 #endif
 #ifdef WRAP_CAIRO_HEADERS
+pixman.h
 cairo.h
 cairo-atsui.h
 cairo-beos.h
 cairo-ft.h
 cairo-glitz.h
 cairo-os2.h
 cairo-pdf.h
 cairo-ps.h