summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom "spot" Callaway <tcallawa@redhat.com>2010-09-07 10:57:17 -0400
committerTom "spot" Callaway <tcallawa@redhat.com>2010-09-07 10:57:17 -0400
commit7807013a6c58c16080f481c06b6ca44ea492f15d (patch)
treeaf27c7be8d11debe4e9d55d670e7a3b6ee710966
parenttarball upload (diff)
downloadlibrewolf-fedora-ff-7807013a6c58c16080f481c06b6ca44ea492f15d.tar.gz
librewolf-fedora-ff-7807013a6c58c16080f481c06b6ca44ea492f15d.tar.bz2
librewolf-fedora-ff-7807013a6c58c16080f481c06b6ca44ea492f15d.zip
fixed patches, fixed spec file
-rwxr-xr-xfirefox-mozconfig2
-rw-r--r--firefox.spec33
-rw-r--r--firefox4-build-throw.patch12
-rw-r--r--firefox4-jemalloc.patch22
4 files changed, 60 insertions, 9 deletions
diff --git a/firefox-mozconfig b/firefox-mozconfig
index 0101a38..b4a8bc0 100755
--- a/firefox-mozconfig
+++ b/firefox-mozconfig
@@ -10,7 +10,7 @@ ac_add_options --with-system-zlib
ac_add_options --with-pthreads
ac_add_options --disable-tests
ac_add_options --disable-debug
-ac_add_options --enable-optimize
+ac_add_options --enable-optimize="$MOZ_OPT_FLAGS"
#ac_add_options --enable-debug
#ac_add_options --disable-optimize
ac_add_options --disable-installer
diff --git a/firefox.spec b/firefox.spec
index d19a518..746c774 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -2,6 +2,9 @@
%define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html
%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
+# This is a bit of a hack, but the tabview files have to be in the xulrunner_libdir
+%{!?xulrunner_libdir: %global xulrunner_libdir %(pkg-config --variable=libdir libxul)}
+
%define mozappdir %{_libdir}/%{name}-%{internal_version}
%define tarballdir mozilla-central
@@ -25,7 +28,7 @@
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 4.0
-Release: 0.1%{?prever}%{?dist}
+Release: 0.2%{?prever}%{?dist}
URL: http://www.mozilla.org/projects/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
@@ -41,12 +44,14 @@ Source13: firefox-mozconfig-debuginfo
Source20: firefox.desktop
Source21: firefox.sh.in
Source23: firefox.1
-Source100: find-external-requires
+# Not necessary
+# Source100: find-external-requires
#Build patches
Patch0: firefox-version.patch
-#Patch1: mozilla-jemalloc-526152.patch
+Patch1: firefox4-jemalloc.patch
+Patch2: firefox4-build-throw.patch
# Fedora patches
Patch10: firefox-disable-checkupdates.patch
@@ -70,6 +75,8 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: desktop-file-utils
BuildRequires: system-bookmarks
BuildRequires: xulrunner-devel >= %{xulrunner_version}
+# Should xulrunner-devel pull this in?
+BuildRequires: mesa-libGL-devel
Requires: xulrunner >= %{xulrunner_version}
Conflicts: xulrunner >= %{xulrunner_version_max}
@@ -78,8 +85,8 @@ Obsoletes: mozilla <= 37:1.7.13
Provides: webclient
-%define _use_internal_dependency_generator 0
-%define __find_requires %{SOURCE100}
+# %%define _use_internal_dependency_generator 0
+# %%define __find_requires %{SOURCE100}
%description
Mozilla Firefox is an open-source web browser, designed for standards
@@ -97,7 +104,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{internal_version}/' %{P:%%PATCH0} \
# For branding specific patches.
-#%patch1 -p1 -b .526152
+%patch1 -p1 -b .526152
+%patch2 -p1 -b .throw
# Fedora patches
%patch10 -p1 -b .checkupdates
@@ -131,7 +139,7 @@ cd %{tarballdir}
# Mozilla builds with -Wall with exception of a few warnings which show up
# everywhere in the code; so, don't override that.
-MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions//')
+export MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-Wall//' | %{__sed} -e 's/-fexceptions//')
export CFLAGS=$MOZ_OPT_FLAGS
export CXXFLAGS=$MOZ_OPT_FLAGS
@@ -149,7 +157,7 @@ INTERNAL_GECKO=%{internal_version}
MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO}
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 %{include_debuginfo}
@@ -172,6 +180,10 @@ DESTDIR=$RPM_BUILD_ROOT make install
%{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications}
+# This is a HACK. Firefox4 won't find the tabview code unless it is in the xulrunner directory.
+mkdir -p %{buildroot}/%{xulrunner_libdir}/modules/
+mv %{buildroot}%{mozappdir}/modules/tabview/ %{buildroot}/%{xulrunner_libdir}/modules/
+
desktop-file-install --vendor mozilla \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--add-category WebBrowser \
@@ -364,6 +376,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/modules/NetworkPrioritizer.jsm
%{mozappdir}/modules/PlacesUIUtils.jsm
%{mozappdir}/modules/stylePanel.jsm
+# Hack Hack Hack
+%{xulrunner_libdir}/modules/tabview/
%{mozappdir}/updater*
%exclude %{mozappdir}/removed-files
%{_datadir}/icons/hicolor/16x16/apps/firefox.png
@@ -383,6 +397,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Tue Sep 7 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 4.0-0.2.b4
+- get package building and mostly functional
+
* Mon Aug 30 2010 Martin Stransky <stransky@redhat.com> - 4.0-0.1.b4
- Update to 4.0 Beta 4
diff --git a/firefox4-build-throw.patch b/firefox4-build-throw.patch
new file mode 100644
index 0000000..87a3058
--- /dev/null
+++ b/firefox4-build-throw.patch
@@ -0,0 +1,12 @@
+diff -up mozilla-central/memory/mozalloc/mozalloc.h.throw mozilla-central/memory/mozalloc/mozalloc.h
+--- mozilla-central/memory/mozalloc/mozalloc.h.throw 2010-09-01 17:21:53.906286481 -0400
++++ mozilla-central/memory/mozalloc/mozalloc.h 2010-09-01 17:22:27.422157338 -0400
+@@ -214,7 +214,7 @@ MOZALLOC_EXPORT void* moz_valloc(size_t
+ #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw()
+ #endif
+
+-#ifdef MOZ_CPP_EXCEPTIONS
++#if 1
+ #define MOZALLOC_THROW_BAD_ALLOC throw(std::bad_alloc)
+ #else
+ #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_IF_HAS_EXCEPTIONS
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)
bgstack15