--- /dev/null
+--- mozilla/config/config.mk.orig 2012-03-22 16:58:29.475414529 +0100
++++ mozilla/config/config.mk 2012-03-22 19:11:29.342349305 +0100
+@@ -368,7 +368,7 @@
+ CCC = $(CXX)
+ PURIFY = purify $(PURIFYOPTIONS)
+ QUANTIFY = quantify $(QUANTIFYOPTIONS)
+-XPIDL_LINK = $(PYTHON) $(SDK_BIN_DIR)/xpt.py link
++XPIDL_LINK = $(PYTHON) $(LIBXUL_DIST)/sdk/bin/xpt.py link
+
+ INCLUDES = \
+ $(LOCAL_INCLUDES) \
+--- mozilla/mail/build.mk.orig 2012-02-16 11:18:23.000000000 +0100
++++ mozilla/mail/build.mk 2012-03-22 20:58:11.475895080 +0100
+@@ -45,6 +45,9 @@
+
+ ifndef LIBXUL_SDK
+ include $(topsrcdir)/toolkit/toolkit-tiers.mk
++else
++tier_app_staticdirs += $(APP_LIBXUL_STATICDIRS)
++tier_app_dirs += $(APP_LIBXUL_DIRS)
+ endif
+
+ TIERS += app
+--- mozilla/mail/app/Makefile.in.orig 2012-02-16 11:18:22.000000000 +0100
++++ mozilla/mail/app/Makefile.in 2012-03-22 16:43:33.608721456 +0100
+@@ -44,5 +44,7 @@
+
+ AB_CD = $(MOZ_UI_LOCALE)
+
++DIST_FILES = application.ini
++
+ GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
+ GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
+@@ -79,6 +81,7 @@
+ $(srcdir)/profile/channel-prefs.js \
+ $(NULL)
+
++ifndef LIBXUL_SDK
+ ifneq (,$(filter OS2 Darwin WINCE WINNT,$(OS_ARCH)))
+ PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
+ else
+@@ -88,8 +91,6 @@
+
+ CPPSRCS = nsMailApp.cpp
+
+-DIST_FILES = application.ini
+-
+ LOCAL_INCLUDES += \
+ -I$(MOZILLA_SRCDIR)/toolkit/xre \
+ -I$(MOZILLA_SRCDIR)/xpcom/base \
+@@ -116,6 +117,8 @@
+ LIBS += $(MOZ_DBUS_GLIB_LIBS)
+ endif
+
++endif # LIBXUL_SDK
++
+ ifndef MOZ_WINCONSOLE
+ ifdef MOZ_DEBUG
+ MOZ_WINCONSOLE = 1
+@@ -233,6 +236,11 @@
+ $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default* $(DESTDIR)$(mozappdir)/chrome/icons/default
+ endif
+
++ifdef LIBXUL_SDK
++libs::
++ cp $(LIBXUL_DIST)/bin/$(XULRUNNER_STUB_NAME)$(BIN_SUFFIX) $(DIST)/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
++endif
++
+ ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
+ ifneq (,$(filter-out Darwin,$(OS_ARCH)))
+ $(MOZ_APP_NAME):: $(MOZILLA_DIR)/build/unix/mozilla.in $(GLOBAL_DEPS) $(DEPTH)/config/autoconf.mk
%bcond_without gnome # alias for gnomeui
%bcond_without ldap # disable e-mail address lookups in LDAP directories
%bcond_without lightning # disable Sunbird/Lightning calendar
-%bcond_without xulrunner # build with xulrunner
+%bcond_with xulrunner # system xulrunner
%bcond_with crashreporter # report crashes to crash-stats.mozilla.com
%if %{without gnome}
Source5: %{name}.sh
Patch0: %{name}-branding.patch
Patch1: %{name}-enigmail-shared.patch
+Patch2: %{name}-system-xulrunner.patch
Patch3: %{name}-fonts.patch
Patch4: %{name}-install.patch
Patch5: %{name}-hunspell.patch
/bin/sh %{SOURCE3}
%patch0 -p1
%{?with_enigmail:%patch1 -p1}
+%{?with_system_xulrunner:%patch2 -p1}
%patch3 -p1
%patch4 -p1
%patch6 -p1
cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf
-install -d libxul-sdk
-ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk
-
cat << EOF > .mozconfig
mk_add_options MOZ_OBJDIR=%{objdir}
-export CFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner"
-export CXXFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner"
+export CFLAGS="%{rpmcflags}"
+# use c++0x for char16_t (like in xulrunner 10.0.x)
+export CXXFLAGS="%{rpmcflags}%{?with_system_xulrunner: -std=gnu++0x}"
%if %{with crashreporter}
export MOZ_DEBUG_SYMBOLS=1
ac_add_options --with-distribution-id=org.pld-linux
ac_add_options --with-branding=icedove/branding
%if %{with xulrunner}
-#ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk/sdk
+ac_add_options --enable-shared-js
+ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)
ac_add_options --with-system-libxul
-ac_add_options --enable-shared
-ac_add_options --enable-libxul
%else
ac_add_options --disable-xul
%endif
cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest
%endif
-# remove unecessary stuff
-#%%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/README.txt
-#%%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/components/components.list
-#%%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/components.list
-
# never package these. always remove
# nss
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*