From 8acfe1d820f87f5f8cd04707d5b928ff3fdc946d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 23 2019 01:06:37 +0000 Subject: import xulrunner-31.6.0-2.el7_1 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1cdc9d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/firefox-31.6.0esr.source.tar.bz2 diff --git a/.xulrunner.metadata b/.xulrunner.metadata new file mode 100644 index 0000000..d38d1ae --- /dev/null +++ b/.xulrunner.metadata @@ -0,0 +1 @@ +9c13012fec260c672e0e97ffb29f36fe360b02ad SOURCES/firefox-31.6.0esr.source.tar.bz2 diff --git a/SOURCES/disable-webm.patch b/SOURCES/disable-webm.patch new file mode 100644 index 0000000..570713b --- /dev/null +++ b/SOURCES/disable-webm.patch @@ -0,0 +1,11 @@ +diff -up mozilla-esr31/browser/confvars.sh.webm-fix mozilla-esr31/browser/confvars.sh +--- mozilla-esr31/browser/confvars.sh.webm-fix 2014-07-21 13:56:53.522253529 +0200 ++++ mozilla-esr31/browser/confvars.sh 2014-07-21 13:57:49.983533186 +0200 +@@ -65,6 +65,6 @@ MOZ_PAY=1 + # Enable activities. These are used for FxOS developers currently. + MOZ_ACTIVITIES=1 + MOZ_JSDOWNLOADS=1 +-MOZ_WEBM_ENCODER=1 ++#MOZ_WEBM_ENCODER=1 + # Enable exact rooting on desktop. + JSGC_USE_EXACT_ROOTING=1 diff --git a/SOURCES/find-external-requires b/SOURCES/find-external-requires new file mode 100755 index 0000000..d79db1d --- /dev/null +++ b/SOURCES/find-external-requires @@ -0,0 +1,23 @@ +#!/bin/sh + +# Finds requirements provided outside of the current file set + +filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"` + +provides=`echo $filelist | /usr/lib/rpm/find-provides` + +{ +for f in $filelist ; do + echo $f | /usr/lib/rpm/find-requires | while read req ; do + found=0 + for p in $provides ; do + if [ "$req" = "$p" ]; then + found=1 + fi + done + if [ "$found" = "0" ]; then + echo $req + fi + done +done +} | sort -u \ No newline at end of file diff --git a/SOURCES/firefox-install-dir.patch b/SOURCES/firefox-install-dir.patch new file mode 100644 index 0000000..c962fa5 --- /dev/null +++ b/SOURCES/firefox-install-dir.patch @@ -0,0 +1,12 @@ +diff -up mozilla-aurora/config/baseconfig.mk.orig mozilla-aurora/config/baseconfig.mk +--- mozilla-aurora/config/baseconfig.mk.orig 2014-05-06 13:17:17.000000000 +0200 ++++ mozilla-aurora/config/baseconfig.mk 2014-05-27 17:13:05.215503107 +0200 +@@ -4,7 +4,7 @@ + # whether a normal build is happening or whether the check is running. + includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + ifndef TOP_DIST + TOP_DIST = dist diff --git a/SOURCES/mozilla-193-pkgconfig.patch b/SOURCES/mozilla-193-pkgconfig.patch new file mode 100644 index 0000000..67ec302 --- /dev/null +++ b/SOURCES/mozilla-193-pkgconfig.patch @@ -0,0 +1,32 @@ +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in 2010-08-16 11:12:32.000000000 +0200 +@@ -6,5 +6,6 @@ idldir=%idldir% + Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% + Libs: -L${sdkdir}/lib -lxpcomglue -ldl + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in 2010-08-16 11:07:52.000000000 +0200 +@@ -2,6 +2,7 @@ prefix=%prefix% + sdkdir=%sdkdir% + includedir=%includedir% + idldir=%idldir% ++libdir=%libdir% + + Name: libxul + Description: The Mozilla Runtime and Embedding Engine +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk 2010-08-16 11:07:52.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in 2010-08-16 11:07:52.000000000 +0200 +@@ -116,6 +116,7 @@ endif + -e "s|%includedir%|$(includedir)|" \ + -e "s|%idldir%|$(idldir)|" \ + -e "s|%sdkdir%|$(sdkdir)|" \ ++ -e "s|%libdir%|$(installdir)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ diff --git a/SOURCES/remove-ogg.patch b/SOURCES/remove-ogg.patch new file mode 100644 index 0000000..9bf924b --- /dev/null +++ b/SOURCES/remove-ogg.patch @@ -0,0 +1,449 @@ +diff -up mozilla-aurora/config/external/moz.build.remove-ogg mozilla-aurora/config/external/moz.build +--- mozilla-aurora/config/external/moz.build.remove-ogg 2014-05-06 13:17:17.000000000 +0200 ++++ mozilla-aurora/config/external/moz.build 2014-06-03 13:51:14.450340480 +0200 +@@ -33,14 +33,15 @@ if CONFIG['MOZ_WEBM_ENCODER']: + if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']: + external_dirs += ['media/libvpx'] + ++if CONFIG['MOZ_OGG']: ++ external_dirs += ['media/libogg', 'media/libtheora'] ++ + if not CONFIG['MOZ_NATIVE_PNG']: + external_dirs += ['media/libpng'] + + external_dirs += [ + 'media/kiss_fft', + 'media/libcubeb', +- 'media/libogg', +- 'media/libtheora', + 'media/libspeex_resampler', + 'media/libsoundtouch', + ] +diff -up mozilla-aurora/configure.in.remove-ogg mozilla-aurora/configure.in +--- mozilla-aurora/configure.in.remove-ogg 2014-05-06 13:17:17.000000000 +0200 ++++ mozilla-aurora/configure.in 2014-06-03 13:51:14.452340483 +0200 +@@ -3938,6 +3938,7 @@ MOZ_FEEDS=1 + MOZ_WEBAPP_RUNTIME= + MOZ_JSDEBUGGER=1 + MOZ_AUTH_EXTENSION=1 ++MOZ_OGG=1 + MOZ_RAW= + MOZ_VORBIS= + MOZ_TREMOR= +@@ -5191,25 +5192,37 @@ fi + + AC_SUBST(MOZ_RAW) + +-dnl Checks for __attribute__(aligned()) directive need by libogg +-AC_CACHE_CHECK([__attribute__ ((aligned ())) support], +- [ac_cv_c_attribute_aligned], +- [ac_cv_c_attribute_aligned=0 +- CFLAGS_save="${CFLAGS}" +- CFLAGS="${CFLAGS} -Werror" +- for ac_cv_c_attr_align_try in 64 32 16 8; do +- echo "trying $ac_cv_c_attr_align_try" +- AC_TRY_COMPILE([], +- [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;], +- [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"]) +- if test "$ac_cv_c_attribute_aligned" != 0; then +- break; +- fi +- done +- CFLAGS="${CFLAGS_save}"]) +-if test "${ac_cv_c_attribute_aligned}" != "0"; then +- AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], +- [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment]) ++dnl ======================================================== ++dnl = Disable Ogg Codecs ++dnl ======================================================== ++MOZ_ARG_DISABLE_BOOL(ogg, ++[ --disable-ogg Disable support for OGG media (Theora video and Vorbis audio)], ++ MOZ_OGG=, ++ MOZ_OGG=1) ++ ++if test -n "$MOZ_OGG"; then ++ AC_DEFINE(MOZ_OGG) ++ ++ dnl Checks for __attribute__(aligned()) directive ++ AC_CACHE_CHECK([__attribute__ ((aligned ())) support], ++ [ac_cv_c_attribute_aligned], ++ [ac_cv_c_attribute_aligned=0 ++ CFLAGS_save="${CFLAGS}" ++ CFLAGS="${CFLAGS} -Werror" ++ for ac_cv_c_attr_align_try in 64 32 16 8; do ++ echo "trying $ac_cv_c_attr_align_try" ++ AC_TRY_COMPILE([], ++ [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;], ++ [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"]) ++ if test "$ac_cv_c_attribute_aligned" != 0; then ++ break; ++ fi ++ done ++ CFLAGS="${CFLAGS_save}"]) ++ if test "${ac_cv_c_attribute_aligned}" != "0"; then ++ AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], ++ [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment]) ++ fi + fi + + dnl ======================================================== +@@ -5426,7 +5439,7 @@ AC_SUBST(MOZ_NATIVE_LIBVPX) + AC_SUBST(MOZ_LIBVPX_CFLAGS) + AC_SUBST(MOZ_LIBVPX_LIBS) + +-if test "$MOZ_WEBM"; then ++if test "$MOZ_WEBM" -o "$MOZ_OGG"; then + if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then + MOZ_VORBIS=1 + else +@@ -5533,6 +5546,15 @@ dnl ==================================== + dnl = Handle dependent MEDIA defines + dnl ======================================================== + ++if test -n "$MOZ_OPUS" -a -z "$MOZ_OGG"; then ++ AC_MSG_ERROR([MOZ_OPUS requires MOZ_OGG which is disabled.]) ++fi ++ ++if test -n "$MOZ_VORBIS" -a -z "$MOZ_OGG"; then ++ AC_MSG_ERROR([MOZ_VORBIS requires MOZ_OGG which is disabled. ++Note that you need vorbis support for WebM playback.]) ++fi ++ + if test -n "$MOZ_VORBIS" -a -n "$MOZ_TREMOR"; then + AC_MSG_ERROR([MOZ_VORBIS and MOZ_TREMOR are mutually exclusive! The build system should not allow them both to be set, but they are. Please file a bug at https://bugzilla.mozilla.org/]) + fi +@@ -8842,6 +8864,7 @@ AC_SUBST(MOZ_APPLEMEDIA) + AC_SUBST(MOZ_OMX_PLUGIN) + AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT) + AC_SUBST(MOZ_VPX) ++AC_SUBST(MOZ_OGG) + AC_SUBST(VPX_AS) + AC_SUBST(VPX_ASFLAGS) + AC_SUBST(VPX_DASH_C_FLAG) +diff -up mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp.remove-ogg mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp +--- mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp.remove-ogg 2014-05-06 13:17:19.000000000 +0200 ++++ mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp 2014-06-03 13:51:14.452340483 +0200 +@@ -81,12 +81,16 @@ nsresult HTMLAudioElement::SetAcceptHead + #ifdef MOZ_WEBM + "audio/webm," + #endif ++#ifdef MOZ_OGG + "audio/ogg," ++#endif + #ifdef MOZ_WAVE + "audio/wav," + #endif + "audio/*;q=0.9," ++#ifdef MOZ_OGG + "application/ogg;q=0.7," ++#endif + "video/*;q=0.6,*/*;q=0.5"); + + return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"), +diff -up mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp.remove-ogg mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp +--- mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp.remove-ogg 2014-05-06 13:17:19.000000000 +0200 ++++ mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp 2014-06-03 13:51:14.452340483 +0200 +@@ -136,9 +136,13 @@ nsresult HTMLVideoElement::SetAcceptHead + #ifdef MOZ_WEBM + "video/webm," + #endif ++#ifdef MOZ_OGG + "video/ogg," ++#endif + "video/*;q=0.9," ++#ifdef MOZ_OGG + "application/ogg;q=0.7," ++#endif + "audio/*;q=0.6,*/*;q=0.5"); + + return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"), +diff -up mozilla-aurora/content/media/DecoderTraits.cpp.remove-ogg mozilla-aurora/content/media/DecoderTraits.cpp +--- mozilla-aurora/content/media/DecoderTraits.cpp.remove-ogg 2014-05-06 13:17:20.000000000 +0200 ++++ mozilla-aurora/content/media/DecoderTraits.cpp 2014-06-03 13:51:14.452340483 +0200 +@@ -13,8 +13,10 @@ + #include "MediaPluginHost.h" + #endif + ++#ifdef MOZ_OGG + #include "OggDecoder.h" + #include "OggReader.h" ++#endif + #ifdef MOZ_WAVE + #include "WaveDecoder.h" + #include "WaveReader.h" +@@ -100,6 +102,7 @@ IsRawType(const nsACString& aType) + } + #endif + ++#ifdef MOZ_OGG + // See http://www.rfc-editor.org/rfc/rfc5334.txt for the definitions + // of Ogg media types and codec types + static const char* const gOggTypes[4] = { +@@ -131,6 +134,7 @@ IsOggType(const nsACString& aType) + + return CodecListContains(gOggTypes, aType); + } ++#endif + + #ifdef MOZ_WAVE + // See http://www.rfc-editor.org/rfc/rfc2361.txt for the definitions +@@ -199,8 +203,10 @@ IsGStreamerSupportedType(const nsACStrin + if (IsWebMType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false)) + return false; + #endif ++#ifdef MOZ_OGG + if (IsOggType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false)) + return false; ++#endif + + return GStreamerDecoder::CanHandleMediaType(aMimeType, nullptr); + } +@@ -370,10 +376,12 @@ DecoderTraits::CanHandleMediaType(const + result = CANPLAY_MAYBE; + } + #endif ++#ifdef MOZ_OGG + if (IsOggType(nsDependentCString(aMIMEType))) { + codecList = MediaDecoder::IsOpusEnabled() ? gOggCodecsWithOpus : gOggCodecs; + result = CANPLAY_MAYBE; + } ++#endif + #ifdef MOZ_WAVE + if (IsWaveType(nsDependentCString(aMIMEType))) { + codecList = gWaveCodecs; +@@ -479,10 +487,12 @@ InstantiateDecoder(const nsACString& aTy + return decoder.forget(); + } + #endif ++#ifdef MOZ_OGG + if (IsOggType(aType)) { + decoder = new OggDecoder(); + return decoder.forget(); + } ++#endif + #ifdef MOZ_WAVE + if (IsWaveType(aType)) { + decoder = new WaveDecoder(); +@@ -587,9 +597,11 @@ MediaDecoderReader* DecoderTraits::Creat + decoderReader = new RawReader(aDecoder); + } else + #endif ++#ifdef MOZ_OGG + if (IsOggType(aType)) { + decoderReader = new OggReader(aDecoder); + } else ++#endif + #ifdef MOZ_WAVE + if (IsWaveType(aType)) { + decoderReader = new WaveReader(aDecoder); +@@ -642,7 +654,9 @@ MediaDecoderReader* DecoderTraits::Creat + bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType) + { + return ++#ifdef MOZ_OGG + IsOggType(aType) || ++#endif + #ifdef MOZ_OMX_DECODER + // We support amr inside WebApps on firefoxOS but not in general web content. + // Ensure we dont create a VideoDocument when accessing amr URLs directly. +diff -up mozilla-aurora/content/media/encoder/MediaEncoder.cpp.remove-ogg mozilla-aurora/content/media/encoder/MediaEncoder.cpp +--- mozilla-aurora/content/media/encoder/MediaEncoder.cpp.remove-ogg 2014-05-06 13:17:20.000000000 +0200 ++++ mozilla-aurora/content/media/encoder/MediaEncoder.cpp 2014-06-03 13:51:14.453340485 +0200 +@@ -9,7 +9,9 @@ + #include "prlog.h" + #include "mozilla/Preferences.h" + ++#ifdef MOZ_OGG + #include "OggWriter.h" ++#endif + #ifdef MOZ_OPUS + #include "OpusTrackEncoder.h" + +@@ -133,6 +135,7 @@ MediaEncoder::CreateEncoder(const nsAStr + mimeType = NS_LITERAL_STRING(AUDIO_3GPP); + } + #endif // MOZ_OMX_ENCODER ++#ifdef MOZ_OGG + else if (MediaDecoder::IsOggEnabled() && MediaDecoder::IsOpusEnabled() && + (aMIMEType.EqualsLiteral(AUDIO_OGG) || + (aTrackTypes & ContainerWriter::CREATE_AUDIO_TRACK))) { +@@ -142,6 +145,7 @@ MediaEncoder::CreateEncoder(const nsAStr + NS_ENSURE_TRUE(audioEncoder, nullptr); + mimeType = NS_LITERAL_STRING(AUDIO_OGG); + } ++#endif // MOZ_OGG + else { + LOG(PR_LOG_ERROR, ("Can not find any encoder to record this media stream")); + return nullptr; +diff -up mozilla-aurora/content/media/MediaDecoder.cpp.remove-ogg mozilla-aurora/content/media/MediaDecoder.cpp +--- mozilla-aurora/content/media/MediaDecoder.cpp.remove-ogg 2014-05-06 13:17:20.000000000 +0200 ++++ mozilla-aurora/content/media/MediaDecoder.cpp 2014-06-03 13:51:14.453340485 +0200 +@@ -1653,6 +1653,7 @@ MediaDecoder::IsRawEnabled() + } + #endif + ++#ifdef MOZ_OGG + bool + MediaDecoder::IsOpusEnabled() + { +@@ -1668,6 +1669,7 @@ MediaDecoder::IsOggEnabled() + { + return Preferences::GetBool("media.ogg.enabled"); + } ++#endif + + #ifdef MOZ_WAVE + bool +diff -up mozilla-aurora/content/media/MediaDecoder.h.remove-ogg mozilla-aurora/content/media/MediaDecoder.h +--- mozilla-aurora/content/media/MediaDecoder.h.remove-ogg 2014-05-06 13:17:20.000000000 +0200 ++++ mozilla-aurora/content/media/MediaDecoder.h 2014-06-03 13:51:14.453340485 +0200 +@@ -844,8 +844,10 @@ public: + static bool IsRawEnabled(); + #endif + ++#ifdef MOZ_OGG + static bool IsOggEnabled(); + static bool IsOpusEnabled(); ++#endif + + #ifdef MOZ_WAVE + static bool IsWaveEnabled(); +diff -up mozilla-aurora/content/media/moz.build.remove-ogg mozilla-aurora/content/media/moz.build +--- mozilla-aurora/content/media/moz.build.remove-ogg 2014-05-06 13:17:20.000000000 +0200 ++++ mozilla-aurora/content/media/moz.build 2014-06-03 13:51:14.453340485 +0200 +@@ -7,7 +7,6 @@ + PARALLEL_DIRS += [ + 'encoder', + 'mediasource', +- 'ogg', + 'webaudio', + 'webvtt' + ] +@@ -17,6 +16,9 @@ TEST_TOOL_DIRS += ['compiledtest'] + if CONFIG['MOZ_RAW']: + PARALLEL_DIRS += ['raw'] + ++if CONFIG['MOZ_OGG']: ++ PARALLEL_DIRS += ['ogg'] ++ + if CONFIG['MOZ_WAVE']: + PARALLEL_DIRS += ['wave'] + +diff -up mozilla-aurora/layout/media/symbols.def.in.remove-ogg mozilla-aurora/layout/media/symbols.def.in +--- mozilla-aurora/layout/media/symbols.def.in.remove-ogg 2014-05-06 13:17:13.000000000 +0200 ++++ mozilla-aurora/layout/media/symbols.def.in 2014-06-03 13:51:14.454340486 +0200 +@@ -145,6 +145,7 @@ cubeb_stream_init + cubeb_stream_start + cubeb_stream_stop + cubeb_stream_get_latency ++#ifdef MOZ_OGG + th_comment_clear + th_comment_init + th_decode_alloc +@@ -158,6 +159,7 @@ th_info_init + th_packet_isheader + th_packet_iskeyframe + th_setup_free ++#endif + #ifdef MOZ_OPUS + opus_decoder_create + opus_decoder_destroy +diff -up mozilla-aurora/modules/libpref/src/init/all.js.remove-ogg mozilla-aurora/modules/libpref/src/init/all.js +--- mozilla-aurora/modules/libpref/src/init/all.js.remove-ogg 2014-05-19 11:43:49.000000000 +0200 ++++ mozilla-aurora/modules/libpref/src/init/all.js 2014-06-03 13:51:25.028355239 +0200 +@@ -212,7 +212,9 @@ pref("media.fragmented-mp4.use-blank-dec + #ifdef MOZ_RAW + pref("media.raw.enabled", true); + #endif ++#ifdef MOZ_OGG + pref("media.ogg.enabled", true); ++#endif + #ifdef MOZ_OPUS + pref("media.opus.enabled", true); + #endif +diff -up mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py.remove-ogg mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py +--- mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py.remove-ogg 2014-05-06 13:17:17.000000000 +0200 ++++ mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py 2014-06-03 13:51:25.028355239 +0200 +@@ -84,6 +84,7 @@ def build_dict(config, env=os.environ): + d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1" + d['bin_suffix'] = substs.get('BIN_SUFFIX', '') + ++ d['ogg'] = bool(substs.get('MOZ_OGG')) + d['webm'] = bool(substs.get('MOZ_WEBM')) + d['wave'] = bool(substs.get('MOZ_WAVE')) + +diff -up mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp.remove-ogg mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp +--- mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp.remove-ogg 2014-05-06 13:17:27.000000000 +0200 ++++ mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp 2014-06-03 13:51:25.030355242 +0200 +@@ -462,6 +462,7 @@ static nsDefaultMimeTypeEntry defaultMim + { "application/xhtml+xml", "xhtml" }, + { "application/xhtml+xml", "xht" }, + { TEXT_PLAIN, "txt" }, ++#ifdef MOZ_OGG + { VIDEO_OGG, "ogv" }, + { VIDEO_OGG, "ogg" }, + { APPLICATION_OGG, "ogg" }, +@@ -469,6 +470,7 @@ static nsDefaultMimeTypeEntry defaultMim + #ifdef MOZ_OPUS + { AUDIO_OGG, "opus" }, + #endif ++#endif + #ifdef MOZ_WEBM + { VIDEO_WEBM, "webm" }, + { AUDIO_WEBM, "webm" }, +diff -up mozilla-aurora/xpcom/build/nsXPComInit.cpp.remove-ogg mozilla-aurora/xpcom/build/nsXPComInit.cpp +--- mozilla-aurora/xpcom/build/nsXPComInit.cpp.remove-ogg 2014-06-03 14:04:38.913464144 +0200 ++++ mozilla-aurora/xpcom/build/nsXPComInit.cpp 2014-06-03 14:06:03.282582245 +0200 +@@ -133,7 +133,9 @@ extern nsresult nsStringInputStreamConst + #include "mozilla/VisualEventTracer.h" + #endif + ++#if MOZ_OGG + #include "ogg/ogg.h" ++#endif + #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) + #include "vpx_mem/vpx_mem.h" + #endif +@@ -378,7 +380,7 @@ private: + NS_IMPL_ISUPPORTS(ICUReporter, nsIMemoryReporter) + + /* static */ template<> Atomic CountingAllocatorBase::sAmount(0); +- ++#if MOZ_OGG + class OggReporter MOZ_FINAL : public nsIMemoryReporter, + public CountingAllocatorBase + { +@@ -420,7 +422,7 @@ NS_IMPL_ISUPPORTS(VPXReporter, nsIMemory + + /* static */ template<> Atomic CountingAllocatorBase::sAmount(0); + #endif /* MOZ_VPX */ +- ++#endif /* MOZ_OGG */ + #ifdef MOZ_WEBM + class NesteggReporter MOZ_FINAL : public nsIMemoryReporter + , public CountingAllocatorBase +@@ -606,12 +608,13 @@ NS_InitXPCOM2(nsIServiceManager* *result + // depend on the XPCOM-based memory reporting goop. So for now, we have + // this oddness. + mozilla::SetICUMemoryFunctions(); +- ++#if MOZ_OGG + // Do the same for libogg. + ogg_set_mem_functions(OggReporter::CountingMalloc, + OggReporter::CountingCalloc, + OggReporter::CountingRealloc, + OggReporter::CountingFree); ++#endif + + #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) + // And for VPX. +@@ -678,7 +681,9 @@ NS_InitXPCOM2(nsIServiceManager* *result + + // The memory reporter manager is up and running -- register our reporters. + RegisterStrongMemoryReporter(new ICUReporter()); ++#if MOZ_OGG + RegisterStrongMemoryReporter(new OggReporter()); ++#endif + #ifdef MOZ_VPX + RegisterStrongMemoryReporter(new VPXReporter()); + #endif diff --git a/SOURCES/rhbz-872752.patch b/SOURCES/rhbz-872752.patch new file mode 100644 index 0000000..63404c7 --- /dev/null +++ b/SOURCES/rhbz-872752.patch @@ -0,0 +1,38 @@ +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in.orig 2012-11-05 11:17:57.000000000 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in 2012-11-05 11:56:22.513385775 +0100 +@@ -46,6 +46,7 @@ + + pkg_config_files = \ + libxul.pc \ ++ libxul-embedding-lib.pc \ + libxul-embedding.pc \ + mozilla-js.pc \ + mozilla-plugin.pc \ +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in.orig 2012-11-05 11:59:31.493626458 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in 2012-11-05 12:01:03.547230893 +0100 +@@ -0,0 +1,11 @@ ++prefix=%prefix% ++sdkdir=%sdkdir% ++includedir=%includedir% ++idldir=%idldir% ++ ++Name: libxul-embedding-lib ++Description: Static library for version-independent embedding of the Mozilla runtime for libraries ++Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% ++Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in.fixembed 2012-11-05 11:17:57.227491778 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in 2012-11-05 12:01:56.140574788 +0100 +@@ -4,8 +4,8 @@ + idldir=%idldir% + + Name: libxul-embedding +-Description: Static library for version-independent embedding of the Mozilla runtime ++Description: Static library for version-independent embedding of the Mozilla runtime for applications + Version: %MOZILLA_VERSION% +-Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Requires: %NSPR_NAME% >= %NSPR_VERSION% , libxul-embedding-lib = %MOZILLA_VERSION% ++Libs: -L${sdkdir}/lib -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl -rdynamic + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/SOURCES/rhbz-966424.patch b/SOURCES/rhbz-966424.patch new file mode 100644 index 0000000..c4c332e --- /dev/null +++ b/SOURCES/rhbz-966424.patch @@ -0,0 +1,23 @@ +--- a/toolkit/modules/CertUtils.jsm ++++ b/toolkit/modules/CertUtils.jsm +@@ -170,17 +170,19 @@ this.checkCert = + issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); + var tokenNames = issuerCert.getAllTokenNames({}); + + if (!tokenNames || !tokenNames.some(isBuiltinToken)) + throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT); + } + + function isBuiltinToken(tokenName) { +- return tokenName == "Builtin Object Token"; ++ return tokenName == "Builtin Object Token" || ++ tokenName == "Default Trust" || ++ tokenName == "System Trust"; + } + + /** + * This class implements nsIBadCertListener. Its job is to prevent "bad cert" + * security dialogs from being shown to the user. It is better to simply fail + * if the certificate is bad. See bug 304286. + * + * @param aAllowNonBuiltInCerts (optional) diff --git a/SOURCES/webrtc-arch-cpu.patch b/SOURCES/webrtc-arch-cpu.patch new file mode 100644 index 0000000..29fd578 --- /dev/null +++ b/SOURCES/webrtc-arch-cpu.patch @@ -0,0 +1,22 @@ +--- a/media/webrtc/trunk/build/build_config.h ++++ b/media/webrtc/trunk/build/build_config.h +@@ -123,7 +123,9 @@ + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC64 1 + #define ARCH_CPU_64_BITS 1 ++#ifndef _LITTLE_ENDIAN + #define ARCH_CPU_BIG_ENDIAN 1 ++#endif + #elif defined(__ppc__) || defined(__powerpc__) + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC 1 +@@ -156,6 +158,9 @@ + #elif defined(__alpha__) + #define ARCH_CPU_ALPHA 1 + #define ARCH_CPU_64_BITS 1 ++#elif defined(__aarch64__) ++#define ARCH_CPU_AARCH64 1 ++#define ARCH_CPU_64_BITS 1 + #else + #error Please add support for your architecture in build/build_config.h + #endif diff --git a/SOURCES/xulrunner-24.0-jemalloc-ppc.patch b/SOURCES/xulrunner-24.0-jemalloc-ppc.patch new file mode 100644 index 0000000..fe404ca --- /dev/null +++ b/SOURCES/xulrunner-24.0-jemalloc-ppc.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c +--- xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2013-09-11 01:15:18.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c 2013-09-13 13:36:34.171680919 +0200 +@@ -1104,7 +1104,7 @@ static unsigned ncpus; + * controlling the malloc behavior are defined as compile-time constants + * for best performance and cannot be altered at runtime. + */ +-#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) ++#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__)) + #define MALLOC_STATIC_SIZES 1 + #endif + diff --git a/SOURCES/xulrunner-mozconfig b/SOURCES/xulrunner-mozconfig new file mode 100755 index 0000000..fe0c85f --- /dev/null +++ b/SOURCES/xulrunner-mozconfig @@ -0,0 +1,43 @@ +. $topsrcdir/xulrunner/config/mozconfig + +# --with-system-png is disabled because Mozilla requires APNG support in libpng +#ac_add_options --with-system-png + +ac_add_options --prefix="$PREFIX" +ac_add_options --libdir="$LIBDIR" +ac_add_options --with-system-jpeg +ac_add_options --with-system-zlib +ac_add_options --with-system-bz2 +ac_add_options --disable-system-cairo +ac_add_options --with-pthreads +ac_add_options --disable-strip +ac_add_options --disable-tests +ac_add_options --disable-mochitest +ac_add_options --disable-installer +ac_add_options --disable-debug +ac_add_options --enable-optimize +ac_add_options --enable-default-toolkit=cairo-gtk2 +ac_add_options --enable-pango +ac_add_options --enable-svg +ac_add_options --enable-canvas +ac_add_options --disable-javaxpcom +ac_add_options --disable-crashreporter +ac_add_options --enable-safe-browsing +ac_add_options --enable-extensions=default +ac_add_options --disable-necko-wifi +ac_add_options --disable-libjpeg-turbo +ac_add_options --disable-cpp-exceptions +ac_add_options --disable-updater +ac_add_options --disable-gnomevfs +ac_add_options --enable-gio +ac_add_options --disable-gstreamer + +export BUILD_OFFICIAL=1 +export MOZILLA_OFFICIAL=1 +mk_add_options BUILD_OFFICIAL=1 +mk_add_options MOZILLA_OFFICIAL=1 +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir + +export CFLAGS="$CFLAGS -gdwarf-2" +export CXXFLAGS="$CXXFLAGS -gdwarf-2" + diff --git a/SOURCES/xulrunner-nspr-version.patch b/SOURCES/xulrunner-nspr-version.patch new file mode 100644 index 0000000..79b318b --- /dev/null +++ b/SOURCES/xulrunner-nspr-version.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in.nspr xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in +--- xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in.nspr 2013-08-01 13:59:21.000000000 +0200 ++++ xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in 2013-08-01 15:20:51.311864276 +0200 +@@ -91,7 +91,7 @@ endif + -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ + -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \ + -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \ +- -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \ ++ -e "s|%NSPR_VERSION%|__RH_NSPR_VERSION__|" \ + -e "s|%MOZ_XUL_LINK%|$(MOZ_XUL_LINK)|" \ + -e "s|%MOZ_JS_LINK%|$(MOZ_JS_LINK)|" > $@ + chmod 644 $@ diff --git a/SOURCES/xulrunner-redhat-default-prefs.js b/SOURCES/xulrunner-redhat-default-prefs.js new file mode 100644 index 0000000..36e1857 --- /dev/null +++ b/SOURCES/xulrunner-redhat-default-prefs.js @@ -0,0 +1,20 @@ +pref("app.update.enabled", false); +pref("app.update.autoInstallEnabled", false); +pref("browser.display.use_system_colors", true); +pref("browser.link.open_external", 3); +pref("general.smoothScroll", true); +pref("general.useragent.vendor", "Red Hat"); +pref("general.useragent.vendorSub", "RPM_VERREL"); +pref("intl.locale.matchOS", true); +pref("network.manage-offline-status", true); +pref("toolkit.networkmanager.disable", false); +pref("offline.autoDetect", true); +pref("toolkit.storage.synchronous", 0); +pref("browser.startup.homepage", "http://www.redhat.com"); +pref("startup.homepage_override_url", "http://www.redhat.com"); +pref("startup.homepage_welcome_url", "http://www.redhat.com"); +pref("javascript.options.baselinejit.content", false); +pref("javascript.options.baselinejit.chrome", false); +pref("extensions.shownSelectionUI", true); +pref("network.negotiate-auth.allow-insecure-ntlm-v1", true); +pref("security.use_mozillapkix_verification", false); diff --git a/SOURCES/xulrunner.1 b/SOURCES/xulrunner.1 new file mode 100644 index 0000000..2086325 --- /dev/null +++ b/SOURCES/xulrunner.1 @@ -0,0 +1,125 @@ +.TH FIREFOX 1 "August 07, 2001" firefox "Linux User's Manual" +.SH NAME +firefox \- a Web browser for X11 derived from the Mozilla browser + +.SH SYNOPSIS +.B firefox +[\fIOPTIONS\fR] [\fIURL\fR] + +.B firefox-bin +[\fIOPTIONS\fR] [\fIURL\fR] + +.SH DESCRIPTION +\fBMozilla Firefox\fR is an open-source web browser, designed for +standards compliance, performance and portability. + +.SH USAGE +\fBfirefox\fR is a simple shell script that will set up the +environment for the actual executable, \fBfirefox-bin\fR. + +.SH OPTIONS +A summary of the options supported by \fBfirefox\fR is included below. + +.SS "GTK options" +\fB\-\-gdk-debug=\fR\fIFLAGS\fR +Gdk debugging flags to set +.TP +\fB\-\-gdk-no-debug=\fR\fIFLAGS\fR +Gdk debugging flags to unset +.TP +\fB\-\-gtk-debug=\fR\fIFLAGS\fR +Gtk+ debugging flags to set +.TP +\fB\-\-gtk-no-debug=\fR\fIFLAGS\fR +Gtk+ debugging flags to unset +.TP +\fB\-\-gtk-module=\fR\fIMODULE\fR +Load an additional Gtk module + +.SS "X11 options" +.TP +.BI \-\-display= DISPLAY +X display to use +.TP +.B \--sync +Make X calls synchronous +.TP +.B \-\-no-xshm +Don't use X shared memory extension +.TP +.BI \-\-xim-preedit= STYLE +.TP +.BI \-\-xim-status= STYLE +.TP +.B \-\-g-fatal-warnings +Make all warnings fatal + +.SS "Firefox options" +.TP +\fB\-height\fR \fIvalue\fR +Set height of startup window to \fIvalue\fR. +.TP +.B \-h, \-help +Show summary of options. +.TP +.B \-installer +Start with 4.x migration window. +.TP +\fB\-width\fR \fIvalue\fR +Set width of startup window to \fIvalue\fR. +.TP +.B \-v, \-version +Print \fB/usr/bin/firefox-bin\fR version. +.TP +\fB\-CreateProfile\fR \fIprofile\fR +Create \fIprofile\fR. +.TP +\fB\-P\fR \fIprofile\fR +Start with \fIprofile\fR. +.TP +.B \-ProfileWizard +Start with profile wizard. +.TP +.B \-ProfileManager +Start with profile manager. +.TP +.B \-SelectProfile +Start with profile selection dialog. +.TP +\fB\-lang\fR \fIlang-region\fR +Start with \fIlang-region\fR resources. +.TP +\fB\-remote\fR \fIcommand\fR +Execute \fIcommand\fR in an already running Firefox process. For more info, +see: \fIhttp://www.mozilla.org/unix/remote.html\fR +.TP +.B \-splash +Enable splash screen. +.TP +.B \-jsconsole +Start with Javascript Console +.TP +\fB\-chrome\fR \fIurl\fR +Load the specified chrome. +.TP + +.SH FILES +\fI/usr/bin/firefox\fR - shell script wrapping +\fBfirefox\fR +.br +\fI/usr/lib/mozilla/firefox-bin\fR - \fBfirefox\fR +executable + +.SH VERSION +1.0 + +.SH BUGS +To report a bug, please visit \fIhttp://bugzilla.mozilla.org/\fR + +.SH "SEE ALSO" +.BR mozilla(1) + +.SH AUTHORS +.TP +.B The Mozilla Organization +.I http://www.mozilla.org/about.html diff --git a/SOURCES/xulrunner.sh.in b/SOURCES/xulrunner.sh.in new file mode 100644 index 0000000..af0d466 --- /dev/null +++ b/SOURCES/xulrunner.sh.in @@ -0,0 +1,62 @@ +#!/bin/sh +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +## +## Usage: +## +## $ xulrunner +## +## This script is meant to run a xulrunner program from the xulrunner +## rpm installation. +## + +cmdname=`basename $0` + +## +## Variables +## +XUL_ARCH=$(uname -m) +case $XUL_ARCH in + x86_64 | ia64 | s390 ) + XUL_LIB_DIR="/usr/lib64" + SECONDARY_LIB_DIR="/usr/lib" + ;; + * ) + XUL_LIB_DIR="/usr/lib" + SECONDARY_LIB_DIR="/usr/lib64" + ;; +esac + +if [ ! -x $XUL_LIB_DIR/xulrunner/xulrunner ]; then + if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then + echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found" + if [ -d $SECONDARY_LIB_DIR ]; then + echo " $SECONDARY_LIB_DIR/xulrunner/xulrunner not found" + fi + exit 1 + fi + XUL_LIB_DIR="$SECONDARY_LIB_DIR" +fi +XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner" +XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" + +exec $XUL_PROGRAM "$@" diff --git a/SPECS/xulrunner.spec b/SPECS/xulrunner.spec new file mode 100644 index 0000000..a9681ab --- /dev/null +++ b/SPECS/xulrunner.spec @@ -0,0 +1,694 @@ +# Use system sqlite? +%define system_sqlite 0 +%define system_ffi 1 + +# Use system nss/nspr? +%define system_nss 1 + +%define enable_webm 1 + +# Build as a debug package? +%define debug_build 0 + +# Do we build a final version? +%define official_branding 1 + +# Minimal required versions +%if %{?system_nss} +%global nspr_version 4.10.6 +%global nss_version 3.16.2.3 +%endif + +%define cairo_version 1.6.0 +%define freetype_version 2.1.9 +%define ffi_version 3.0.9 +%define libvpx_version 1.3.0 + +# gecko_dir_ver should be set to the version in our directory names +%global gecko_dir_ver %{version} + +%global mozappdir %{_libdir}/%{name} + +%if %{?system_sqlite} +%define sqlite_version 3.8.4.2 +# The actual sqlite version (see #480989): +%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) +%endif + +%global tarballdir mozilla-esr31 +%global ext_version esr +%global gecko_verrel %{expand:%%{version}} + +Summary: XUL Runtime for Gecko Applications +Name: xulrunner +Version: 31.6.0 +Release: 2%{?pre_tag}%{?dist} +URL: http://developer.mozilla.org/En/XULRunner +License: MPLv1.1 or GPLv2+ or LGPLv2+ +Group: Applications/Internet +Source0: ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{ext_version}%{?pre_version}.source.tar.bz2 +Source10: %{name}-mozconfig +Source12: %{name}-redhat-default-prefs.js +Source21: %{name}.sh.in +Source23: %{name}.1 +Source100: find-external-requires + +# Xulrunner patches +# Build patches +Patch0: xulrunner-nspr-version.patch +Patch2: firefox-install-dir.patch +Patch6: webrtc-arch-cpu.patch +Patch20: xulrunner-24.0-jemalloc-ppc.patch +Patch21: disable-webm.patch +Patch22: remove-ogg.patch + +# RHEL specific patches +Patch51: mozilla-193-pkgconfig.patch +# Solves runtime crash of yelp: +Patch54: rhbz-872752.patch +Patch55: rhbz-966424.patch + +# RHEL specific patches + +# Upstream patches + +# --------------------------------------------------- + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +%if %{?system_nss} +BuildRequires: nspr-devel >= %{nspr_version} +BuildRequires: nss-devel >= %{nss_version} +%endif +BuildRequires: libpng-devel +BuildRequires: libjpeg-devel +BuildRequires: zip +BuildRequires: bzip2-devel +BuildRequires: zlib-devel +BuildRequires: libIDL-devel +BuildRequires: gtk2-devel +BuildRequires: gnome-vfs2-devel +BuildRequires: libgnome-devel +BuildRequires: libgnomeui-devel +BuildRequires: krb5-devel +BuildRequires: pango-devel +BuildRequires: freetype-devel >= %{freetype_version} +BuildRequires: libXt-devel +BuildRequires: libXrender-devel +BuildRequires: startup-notification-devel +BuildRequires: alsa-lib-devel +BuildRequires: libnotify-devel +BuildRequires: autoconf213 +BuildRequires: mesa-libGL-devel +BuildRequires: pulseaudio-libs-devel + +Requires: liberation-fonts-common +Requires: liberation-sans-fonts + +%if %{?system_nss} +Requires: nspr >= %{nspr_version} +Requires: nss >= %{nss_version} +%endif + +# RHEL6 BuildRequires and Requires +BuildRequires: cairo-devel >= %{cairo_version} +BuildRequires: hunspell-devel +Requires: mozilla-filesystem +%if %{?system_sqlite} +BuildRequires: sqlite-devel >= %{sqlite_version} +Requires: sqlite >= %{sqlite_build_version} +%endif +%if %{?system_ffi} +BuildRequires: libffi-devel >= %{ffi_version} +Requires: libffi >= %{ffi_version} +%endif +%if %{?enable_webm} +BuildRequires: libvpx-devel >= %{libvpx_version} +Requires: libvpx >= %{libvpx_version} +%endif + +Provides: gecko-libs = %{gecko_verrel} +Provides: gecko-libs%{?_isa} = %{gecko_verrel} +Conflicts: firefox < 3.6 + +%description +XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM +applications that are as rich as Firefox and Thunderbird. It provides mechanisms +for installing, upgrading, and uninstalling these applications. XULRunner also +provides libxul, a solution which allows the embedding of Mozilla technologies +in other projects and products. + +%package devel +Summary: Development files for Gecko +Group: Development/Libraries +Obsoletes: mozilla-devel < 1.9 +Obsoletes: firefox-devel < 2.1 +Obsoletes: xulrunner-devel-unstable +Provides: gecko-devel = %{gecko_verrel} +Provides: gecko-devel%{?_isa} = %{gecko_verrel} +Provides: gecko-devel-unstable = %{gecko_verrel} +Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} + +Requires: xulrunner = %{version}-%{release} +%if %{?system_nss} +Requires: nspr-devel >= %{nspr_version} +Requires: nss-devel >= %{nss_version} +%endif +Requires: libjpeg-devel +Requires: zip +Requires: bzip2-devel +Requires: zlib-devel +Requires: libIDL-devel +Requires: gtk2-devel +Requires: gnome-vfs2-devel +Requires: libgnome-devel +Requires: libgnomeui-devel +Requires: krb5-devel +Requires: pango-devel +Requires: freetype-devel >= %{freetype_version} +Requires: libXt-devel +Requires: libXrender-devel +Requires: startup-notification-devel +Requires: alsa-lib-devel +Requires: libnotify-devel +Requires: cairo-devel >= %{cairo_version} +Requires: hunspell-devel +Requires: sqlite-devel + +%description devel +This package contains the libraries amd header files that are needed +for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. + +#--------------------------------------------------------------------- +# Override internal dependency generator to avoid showing libraries provided by this package +# in dependencies: +AutoProv: 0 +%define _use_internal_dependency_generator 0 +%define __find_requires %{SOURCE100} + +%prep +%setup -q -c +cd %{tarballdir} + +sed -e 's/__RH_NSPR_VERSION__/%{nspr_version}/' %{P:%%PATCH0} > version.patch +%{__patch} -p2 -b --suffix .nspr --fuzz=0 < version.patch + +%patch2 -p1 +%patch6 -p1 -b .webrtc-arch-cpu +%patch20 -p2 -b .jemalloc-ppc +%if !%{?enable_webm} +%patch21 -p1 -b .disable-webm +%endif +%patch22 -p1 -b .ogg +%patch51 -p2 -b .pk +%patch54 -p2 -b .embedlink +%patch55 -p1 -b .973720 + +%{__rm} -f .mozconfig +%{__cp} %{SOURCE10} .mozconfig + +%if %{?system_nss} +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +%else +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig +%endif + +%if %{?system_sqlite} +echo "ac_add_options --enable-system-sqlite" >> .mozconfig +%else +echo "ac_add_options --disable-system-sqlite" >> .mozconfig +%endif + +%if %{?enable_webm} +echo "ac_add_options --with-system-libvpx" >> .mozconfig +echo "ac_add_options --enable-webm" >> .mozconfig +echo "ac_add_options --enable-webrtc" >> .mozconfig +echo "ac_add_options --enable-ogg" >> .mozconfig +%else +echo "ac_add_options --without-system-libvpx" >> .mozconfig +echo "ac_add_options --disable-webm" >> .mozconfig +echo "ac_add_options --disable-webrtc" >> .mozconfig +echo "ac_add_options --disable-ogg" >> .mozconfig +echo "ac_add_options --disable-opus" >> .mozconfig +%endif + +%ifnarch %{ix86} x86_64 +echo "ac_add_options --disable-methodjit" >> .mozconfig +echo "ac_add_options --disable-monoic" >> .mozconfig +echo "ac_add_options --disable-polyic" >> .mozconfig +echo "ac_add_options --disable-tracejit" >> .mozconfig +%endif + +echo "ac_add_options --enable-system-hunspell" >> .mozconfig +echo "ac_add_options --enable-libnotify" >> .mozconfig +echo "ac_add_options --enable-startup-notification" >> .mozconfig +echo "ac_add_options --enable-jemalloc" >> .mozconfig + +# Debug build flags +%if %{?debug_build} +echo "ac_add_options --enable-debug" >> .mozconfig +echo "ac_add_options --disable-optimize" >> .mozconfig +%else +echo "ac_add_options --disable-debug" >> .mozconfig +echo "ac_add_options --enable-optimize" >> .mozconfig +%endif + +%if %{?system_ffi} +echo "ac_add_options --enable-system-ffi" >> .mozconfig +%endif + +#--------------------------------------------------------------------- + +%build +%if %{?system_sqlite} +# Do not proceed with build if the sqlite require would be broken: +# make sure the minimum requirement is non-empty, ... +sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 +# ... and that major number of the computed build-time version matches: +case "%{sqlite_build_version}" in + "$sqlite_version"*) ;; + *) exit 1 ;; +esac +%endif + +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 -fpermissive" | %{__sed} -e 's/-Wall//') +%if %{?debug_build} +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') +%endif +%ifarch s390 +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +%endif +%ifarch s390 %{arm} ppc +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +%endif + +export CFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS=$MOZ_OPT_FLAGS +export LDFLAGS=$MOZ_LINK_FLAGS +export WCHAR_CFLAGS="-std=gnu++0x" + +export PREFIX='%{_prefix}' +export LIBDIR='%{_libdir}' + +MOZ_SMP_FLAGS=-j1 +%ifnarch ppc ppc64 s390 s390x +[ -z "$RPM_BUILD_NCPUS" ] && \ + RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 +[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 +%endif + +make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" + +#--------------------------------------------------------------------- + +%install +cd %{tarballdir} +%{__rm} -rf $RPM_BUILD_ROOT + +DESTDIR=$RPM_BUILD_ROOT make -C objdir install STAGE_SDK=1 + +# set up our default preferences +%{__cat} %{SOURCE12} | %{__sed} -e 's,RPM_VERREL,%{version}-%{release},g' > rh-default-prefs +%{__install} -p -D -m 644 rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js +%{__rm} rh-default-prefs + +# Start script install +%{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} +%{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{gecko_dir_ver},g' > \ + $RPM_BUILD_ROOT%{_bindir}/%{name} +%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/%{name} + +%{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config + +# Copy pc files (for compatibility with 1.9.1) +%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ + $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc +%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding.pc \ + $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding-unstable.pc + +# Fix multilib devel conflicts... +function install_file() { +genheader=$* +mv ${genheader}.h ${genheader}%{__isa_bits}.h +cat > ${genheader}.h << EOF +/* This file exists to fix multilib conflicts */ +#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || defined(__aarch64__) +#include "${genheader}64.h" +#else +#include "${genheader}32.h" +#endif +EOF +} + +INTERNAL_APP_NAME=%{name}-%{gecko_dir_ver} + +# Install 32 and 64 bit headers separatelly due to multilib conflicts: +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} +install_file "mozilla-config" +popd + +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} +install_file "js-config" +popd + +# Link libraries in sdk directory instead of copying them: +pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/lib +for i in *.so; do + rm $i + ln -s %{mozappdir}/$i $i +done +popd + +# Move sdk/bin to xulrunner libdir +pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin +mv ply *.py $RPM_BUILD_ROOT%{mozappdir} +popd +rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin +ln -s %{mozappdir} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin + +# Library path +LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d +LD_CONF_FILE=xulrunner-%{__isa_bits}.conf + +%{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} +%{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF +%{mozappdir} +EOF + +# Copy over the LICENSE +%{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} + +# Use the system hunspell dictionaries for RHEL6+ +%{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries +ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries + +# Remove tmp files +find $RPM_BUILD_ROOT/%{mozappdir} -name '.mkdir.done' -exec rm -rf {} \; + +# ghost files +%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components +touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat +touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat + +#--------------------------------------------------------------------- + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +#--------------------------------------------------------------------- + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%preun +# is it a final removal? +if [ $1 -eq 0 ]; then + %{__rm} -rf %{mozappdir}/components +fi + +%files +%defattr(-,root,root,-) +%{_bindir}/xulrunner +%dir %{mozappdir} +%doc %attr(644, root, root) %{mozappdir}/LICENSE +%doc %attr(644, root, root) %{mozappdir}/README.xulrunner +%{mozappdir}/chrome +%{mozappdir}/chrome.manifest +%dir %{mozappdir}/components +%ghost %{mozappdir}/components/compreg.dat +%ghost %{mozappdir}/components/xpti.dat +%{mozappdir}/components/*.so +%{mozappdir}/components/*.manifest +%{mozappdir}/defaults +%{mozappdir}/omni.ja +%{mozappdir}/*.so +%{mozappdir}/mozilla-xremote-client +%{mozappdir}/run-mozilla.sh +%{mozappdir}/xulrunner +%{mozappdir}/xulrunner-stub +%{mozappdir}/platform.ini +%{mozappdir}/dependentlibs.list +%{_sysconfdir}/ld.so.conf.d/xulrunner*.conf +%{mozappdir}/dictionaries +%{mozappdir}/plugin-container +%if !%{?system_nss} +%{mozappdir}/*.chk +%endif +%{mozappdir}/install_app.py +%ghost %{mozappdir}/install_app.pyc +%ghost %{mozappdir}/install_app.pyo + +%files devel +%defattr(-,root,root,-) +%dir %{_libdir}/%{name}-devel-* +%{_datadir}/idl/%{name}*%{gecko_dir_ver} +%{_includedir}/%{name}*%{gecko_dir_ver} +%{_libdir}/%{name}-devel-*/* +%{_libdir}/pkgconfig/*.pc +%{mozappdir}/xpcshell +%{mozappdir}/*.py +%ghost %{mozappdir}/*.pyc +%ghost %{mozappdir}/*.pyo +%dir %{mozappdir}/ply +%{mozappdir}/ply/*.py +%ghost %{mozappdir}/ply/*.pyc +%ghost %{mozappdir}/ply/*.pyo + +#--------------------------------------------------------------------- + +%changelog +* Thu Mar 26 2015 Martin Stransky - 31.6.0-2 +- Update to 31.6.0 ESR Build 2 + +* Wed Mar 25 2015 Jan Horak - 31.6.0-1 +- Update to 31.6.0 ESR + +* Fri Feb 20 2015 Martin Stransky - 31.5.0-1 +- Update to 31.5.0 ESR + +* Mon Jan 19 2015 Martin Stransky - 31.4.0-2 +- Added -std=gnu++0x to libxul library build flags (rhbz#1170226) + +* Tue Jan 6 2015 Jan Horak - 31.4.0-1 +- Update to 31.4.0 ESR + +* Fri Dec 5 2014 Martin Stransky - 31.3.0-1 +- Update to 31.3.0 ESR Build 2 + +* Mon Nov 10 2014 Martin Stransky - 31.2.0-3 +- Ship sdk/bin as a symlink for compability (rhbz#1162187) + +* Mon Oct 27 2014 Yaakov Selkowitz - 31.2.0-2 +- Fix webRTC for aarch64, ppc64le (rhbz#1148622) + +* Tue Oct 7 2014 Jan Horak - 31.2.0-1 +- Update to 31.2.0 + +* Tue Sep 9 2014 Martin Stransky - 31.1.0-3 +- move /sdk/bin to xulrunner libdir + +* Mon Sep 8 2014 Martin Stransky - 31.1.0-2 +- Sync preferences with Firefox package + +* Mon Sep 8 2014 Martin Stransky - 31.1.0-1 +- Update to 31.1.0 ESR + +* Thu Aug 14 2014 Yaakov Selkowitz - 31.0-2 +- Fix header wrapper for aarch64 + +* Tue Aug 5 2014 Martin Stransky - 31.0-1 +- Update to 31.0 ESR + +* Wed Jun 4 2014 Jan Horak - 24.6.0-1 +- Update to 24.6.0 ESR + +* Wed Apr 23 2014 Martin Stransky - 24.5.0-1 +- Update to 24.5.0 ESR + +* Thu Mar 27 2014 Martin Stransky - 24.4.0-1 +- Update to 24.4.0 ESR + +* Wed Feb 5 2014 Jan Horak - 24.3.0-1 +- Update to 24.3.0 ESR + +* Fri Jan 24 2014 Daniel Mach - 24.2.0-3 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 24.2.0-2 +- Mass rebuild 2013-12-27 + +* Mon Dec 9 2013 Martin Stransky - 24.2.0-1 +- Update to 24.2.0 ESR + +* Fri Nov 22 2013 Martin Stransky - 24.1.0-2 +- Relaxed the nspr dependency + +* Wed Nov 6 2013 Martin Stransky - 24.1.0-1 +- Update to 24.1.0 ESR + +* Wed Oct 23 2013 Martin Stransky - 24.0-1 +- Update to 24.0 ESR + +* Thu Sep 12 2013 Jan Horak - 17.0.9-1 +- Update to 17.0.9 ESR + +* Wed Sep 4 2013 Jan Horak - 17.0.8-5 +- Fixed mozbz#633001 - Cannot open ipv6 address with self-signed certificate + +* Tue Sep 3 2013 Martin Stransky - 17.0.8-4 +- Fixed rhbz#818636 - Firefox allows install of addons, + disregarding xpinstall.enabled flag set as false. + +* Tue Aug 6 2013 Martin Stransky - 17.0.8-3 +- Update to 17.0.8 ESR Build 2 + +* Thu Aug 1 2013 Martin Stransky - 17.0.8-2 +- Added fix for rhbz#990921 - firefox does not build with + required nss/nspr + +* Wed Jul 31 2013 Martin Stransky - 17.0.8-1 +- Update to 17.0.8 ESR + +* Thu Jun 20 2013 Jan Horak - 17.0.7-1 +- Update to 17.0.7 ESR + +* Tue Jun 18 2013 Jan Horak - 17.0.6-2 +- Fixed launch script, rhbz#974006 +- Fixed problems with addon installation, rhbz#973720 + +* Fri May 17 2013 Jan Horak - 17.0.6-1 +- Update to 17.0.6 ESR + +* Tue Apr 2 2013 Jan Horak - 17.0.5-1 +- Update to 17.0.5 ESR + +* Wed Mar 13 2013 Martin Stransky - 17.0.4-1 +- Update to 17.0.4 ESR +- Added fix for mozbz#239254 - [Linux] Support disk cache on a local path +- Use an official firefox tarball + +* Tue Jan 15 2013 Martin Stransky - 17.0.2-3 +- Added fix for NM regression (mozbz#791626) + +* Fri Jan 11 2013 Martin Stransky - 17.0.2-2 +- Added fix for rhbz#816234 - NFS fix + +* Thu Jan 10 2013 Jan Horak - 17.0.2-1 +- Update to 17.0.2 ESR + +* Thu Dec 20 2012 Jan Horak - 17.0.1-1 +- Update to 17.0.1 ESR + +* Mon Nov 19 2012 Martin Stransky 17.0-1 +- Update to 17.0 ESR + +* Thu Nov 8 2012 Martin Stransky 17.0-0.6.b5 +- Update to 17 Beta 5 +- Updated fix for rhbz#872752 - embeded crash + +* Tue Nov 6 2012 Martin Stransky 17.0-0.5.b4 +- Added fix for rhbz#872752 - embeded crash + +* Thu Nov 1 2012 Martin Stransky 17.0-0.4.b4 +- Update to 17 Beta 4 + +* Wed Oct 24 2012 Martin Stransky 17.0-0.3.b3 +- Update to 17 Beta 3 +- Updated ppc(64) patch (mozbz#746112) + +* Wed Oct 24 2012 Martin Stransky 17.0-0.2.b2 +- Built with system nspr/nss + +* Fri Oct 19 2012 Martin Stransky 17.0-0.1.b2 +- Update to 17 Beta 2 + +* Wed Oct 10 2012 Martin Stransky 17.0-0.1.b1 +- Update to 17 Beta 1 + +* Sat Aug 25 2012 Jan Horak - 10.0.7-1 +- Update to 10.0.7 ESR + +* Thu Aug 16 2012 Martin Stransky 10.0.6-2 +- Added fix for rhbz#770276 - Firefox segfaults, should + have a font dependency + +* Sat Jul 14 2012 Martin Stransky 10.0.6-1 +- Update to 10.0.6 ESR + +* Tue Jun 26 2012 Martin Stransky 10.0.5-3 +- Added fix for rhbz#808136 (mozbz#762301) + +* Tue Jun 12 2012 Martin Stransky 10.0.5-2 +- Enabled WebM (rhbz#798880) + +* Fri Jun 1 2012 Martin Stransky 10.0.5-1 +- Update to 10.0.5 ESR + +* Tue May 29 2012 Martin Stransky 10.0.4-2 +- Added patch for mozbz#703633 + +* Sat Apr 21 2012 Martin Stransky 10.0.4-1 +- Update to 10.0.4 ESR + +* Wed Apr 18 2012 Martin Stransky 10.0.3-3 +- Fixed mozbz#746112 - ppc(64) freeze + +* Mon Apr 2 2012 Kai Engert 10.0.3-2 +- Fixed mozbz#681937 + +* Mon Mar 5 2012 Martin Stransky 10.0.3-1 +- Update to 10.0.3 ESR + +* Thu Feb 16 2012 Jan Horak - 10.0.1-2 +- Fixed mozbz#727401 + +* Thu Feb 9 2012 Jan Horak - 10.0.1-1 +- Update to 10.0.1 ESR + +* Tue Feb 7 2012 Martin Stransky 10.0-5 +- Update to 10.0 ESR + +* Sun Jan 29 2012 Martin Stransky 10.0-4 +- Update to 10.0 + +* Thu Jan 19 2012 Martin Stransky 10.0-0.3.b5 +- Update to 10.0 beta 5 + +* Wed Jan 18 2012 Martin Stransky 10.0-0.2.b4 +- Update to 10.0 beta 4 + +* Thu Jan 12 2012 Jan Horak - 10.0-0.1.b3 +- Update to 10.0 beta 3 + +* Tue Jan 3 2012 Jan Horak - 9.0.1-1 +- Update to 9.0.1 + +* Mon Nov 21 2011 Martin Stransky 8.0-6 +- Updated to 8.0 + +* Fri Oct 14 2011 Martin Stransky 8.0-5 +- Updated to 8.0 Beta 3 + +* Tue Oct 11 2011 Martin Stransky 8.0-4 +- Added gtkmozembed patch + +* Fri Oct 7 2011 Martin Stransky 8.0-3 +- Updated to 8.0 Beta 2 + +* Mon Oct 3 2011 Martin Stransky 8.0-2 +- Updated to 8.0 Beta 1 + +* Mon Sep 26 2011 Martin Stransky 7.0-7 +- Updated to 7.0 + +* Mon Sep 19 2011 Jan Horak - 7.0-6.b6 +- Updated to 7.0 Beta 6 +- Added fix for mozbz#674522: s390x javascript freeze fix