[xulrunner] spec cleanups

Tom Callaway spot at fedoraproject.org
Tue Sep 7 16:13:45 UTC 2010


commit 1be133d4c7d1badce0d388e997fea9c0a376ae16
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Tue Sep 7 12:13:47 2010 -0400

    spec cleanups

 firefox4-jemalloc.patch  |   22 ++++++++++++++++++++++
 mozilla-build-sbrk.patch |   18 +++++++++---------
 xulrunner-mozconfig      |    3 ++-
 xulrunner.spec           |   28 +++++++++++++---------------
 4 files changed, 46 insertions(+), 25 deletions(-)
---
diff --git a/firefox4-jemalloc.patch b/firefox4-jemalloc.patch
new file mode 100644
index 0000000..982483f
--- /dev/null
+++ b/firefox4-jemalloc.patch
@@ -0,0 +1,22 @@
+diff -up mozilla-central/memory/jemalloc/jemalloc.h.jemalloc mozilla-central/memory/jemalloc/jemalloc.h
+--- mozilla-central/memory/jemalloc/jemalloc.h.jemalloc	2010-08-18 15:21:10.000000000 -0400
++++ mozilla-central/memory/jemalloc/jemalloc.h	2010-09-01 16:50:38.615946834 -0400
+@@ -42,12 +42,12 @@ extern const char *_malloc_options;
+ 
+ /* Darwin and Linux already have memory allocation functions */
+ #if (!defined(MOZ_MEMORY_DARWIN) && !defined(MOZ_MEMORY_LINUX))
+-void	*malloc(size_t size);
+-void	*valloc(size_t size);
+-void	*calloc(size_t num, size_t size);
+-void	*realloc(void *ptr, size_t size);
+-void	free(void *ptr);
+-int	posix_memalign(void **memptr, size_t alignment, size_t size);
++void *malloc(size_t size) __THROW __attribute_malloc__ __wur;
++void *valloc(size_t size) __THROW __attribute_malloc__ __wur;
++void *calloc(size_t num, size_t size) __THROW __attribute_malloc__ __wur;
++void *realloc(void *ptr, size_t size) __THROW __attribute_malloc__ __wur;
++void free(void *ptr) __THROW __attribute_malloc__ __wur;
++int posix_memalign(void **memptr, size_t alignment, size_t size) __THROW __attribute_malloc__ __wur;
+ #endif /* MOZ_MEMORY_DARWIN, MOZ_MEMORY_LINUX */
+ 
+ #if defined(MOZ_MEMORY_ANDROID) || defined(WRAP_MALLOC)
diff --git a/mozilla-build-sbrk.patch b/mozilla-build-sbrk.patch
index e7e8773..7e8f8c9 100644
--- a/mozilla-build-sbrk.patch
+++ b/mozilla-build-sbrk.patch
@@ -1,19 +1,19 @@
-diff -up xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp.sbrk xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp
---- xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp.sbrk	2010-01-06 04:35:17.000000000 +0100
-+++ xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell/js.cpp	2010-01-13 21:49:33.000000000 +0100
-@@ -1119,7 +1119,7 @@ GC(JSContext *cx, uintN argc, jsval *vp)
+diff -up xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp
+--- xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk	2010-07-20 20:52:15.000000000 -0400
++++ xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp	2010-07-28 10:21:51.905606001 -0400
+@@ -1118,7 +1118,7 @@ GC(JSContext *cx, uintN argc, jsval *vp)
      char buf[256];
      JS_snprintf(buf, sizeof(buf), "before %lu, after %lu, break %08lx\n",
-                 (unsigned long)preBytes, (unsigned long)rt->gcBytes,
+                 (unsigned long)preBytes, (unsigned long)cx->runtime->gcBytes,
 -#ifdef HAVE_SBRK
 +#if 0
                  (unsigned long)sbrk(0)
  #else
                  0
-diff -up xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp.sbrk xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp
---- xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp.sbrk	2010-01-06 04:35:19.000000000 +0100
-+++ xulrunner-1.9.2.1/mozilla-1.9.2/js/src/xpconnect/shell/xpcshell.cpp	2010-01-13 22:32:46.000000000 +0100
-@@ -543,7 +543,7 @@ GC(JSContext *cx, JSObject *obj, uintN a
+diff -up xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp
+--- xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk	2010-07-20 20:52:20.000000000 -0400
++++ xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp	2010-07-28 10:20:36.878606001 -0400
+@@ -540,7 +540,7 @@ GC(JSContext *cx, JSObject *obj, uintN a
      JS_GC(cx);
      fprintf(gOutFile, "before %lu, after %lu, break %08lx\n",
             (unsigned long)preBytes, (unsigned long)rt->gcBytes,
diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig
index f7e97ed..fa47503 100644
--- a/xulrunner-mozconfig
+++ b/xulrunner-mozconfig
@@ -11,7 +11,7 @@ ac_add_options --with-system-jpeg
 ac_add_options --with-system-zlib
 ac_add_options --with-system-bz2
 ac_add_options --enable-system-hunspell
-ac_add_options --disable-system-sqlite
+ac_add_options --enable-system-sqlite
 ac_add_options --enable-system-cairo
 ac_add_options --with-pthreads
 ac_add_options --disable-strip
@@ -20,6 +20,7 @@ ac_add_options --disable-mochitest
 ac_add_options --disable-installer
 ac_add_options --disable-debug
 ac_add_options --enable-optimize
+ac_add_options --enable-xinerama
 ac_add_options --enable-default-toolkit=cairo-gtk2
 ac_add_options --enable-pango
 ac_add_options --enable-svg
diff --git a/xulrunner.spec b/xulrunner.spec
index 387c904..4c64456 100644
--- a/xulrunner.spec
+++ b/xulrunner.spec
@@ -24,7 +24,7 @@
 Summary:        XUL Runtime for Gecko Applications
 Name:           xulrunner
 Version:        1.9.3.0
-Release:        0.1%{?pretag}%{?dist}
+Release:        0.2%{?pretag}%{?dist}
 URL:            http://developer.mozilla.org/En/XULRunner
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 Group:          Applications/Internet
@@ -39,7 +39,7 @@ Source23:       %{name}.1
 # build patches
 Patch0:         xulrunner-version.patch
 Patch1:         mozilla-build.patch
-Patch3:         mozilla-jemalloc.patch
+Patch3:         firefox4-jemalloc.patch
 Patch4:         mozilla-about-firefox-version.patch
 Patch7:         xulrunner-1.9.2.1-build.patch
 Patch8:         mozilla-plugin.patch
@@ -125,6 +125,7 @@ Requires: sqlite-devel
 Requires: startup-notification-devel
 Requires: alsa-lib-devel
 Requires: libnotify-devel
+Requires: mesa-libGL-devel
 
 %description devel
 Gecko development files.
@@ -140,11 +141,11 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \
 %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch
 
 %patch1  -p2 -b .build
-#%patch3  -p1 -b .jemalloc
+%patch3  -p1 -b .jemalloc
 %patch4  -p1 -b .about-firefox-version
 %patch7  -p2 -b .del
 #%patch8  -p1 -b .plugin
-#%patch9  -p2 -b .sbrk
+%patch9  -p2 -b .sbrk
 %ifarch s390
 %patch10 -p1 -b .s390
 %endif
@@ -185,11 +186,9 @@ MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO}
 # Mozilla builds with -Wall with exception of a few warnings which show up
 # everywhere in the code; so, don't override that.
 # and disable C++ exceptions
-MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions//')
-# TODO - mozilla seems to use its own optimize config in Firefox 4,
-# we need to figure how set our gcc flags properly.
-#export CFLAGS=$MOZ_OPT_FLAGS
-#export CXXFLAGS=$MOZ_OPT_FLAGS
+MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions/-fno-exceptions/')
+export CFLAGS=$MOZ_OPT_FLAGS
+export CXXFLAGS=$MOZ_OPT_FLAGS
 
 export PREFIX='%{_prefix}'
 export LIBDIR='%{_libdir}'
@@ -202,7 +201,7 @@ MOZ_SMP_FLAGS=-j1
 %endif
 
 export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}"
-make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
+make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
 
 # create debuginfo for crash-stats.mozilla.com
 %if %{enable_mozilla_crashreporter}
@@ -441,13 +440,9 @@ fi
 
 %files devel
 %defattr(-,root,root,-)
-%dir %{_libdir}/%{name}-sdk-*
-%dir %{_libdir}/%{name}-sdk-*/sdk
-%dir %{_datadir}/idl/%{name}*%{version_internal}
 %{_datadir}/idl/%{name}*%{version_internal}
 %{_includedir}/%{name}*%{version_internal}
-%{_libdir}/%{name}-sdk-*/*
-%{_libdir}/%{name}-sdk-*/sdk/*
+%{_libdir}/%{name}-sdk-*/
 %{_libdir}/pkgconfig/*.pc
 %{mozappdir}/xpcshell
 %{mozappdir}/xpidl
@@ -457,6 +452,9 @@ fi
 #---------------------------------------------------------------------
 
 %changelog
+* Tue Sep  7 2010 Tom "spot" Callaway <tcallawa at redhat.com> 1.9.3.0-0.2.b4
+- spec file cleanup
+
 * Fri Aug 27 2010 Martin Stransky <stransky at redhat.com> 1.9.3.0-0.1.b4
 - Update to 1.9.3.1 beta 4
 


More information about the scm-commits mailing list