diff -up seamonkey-2.48/mozilla/build/moz.configure/old.configure.system-ogg seamonkey-2.48/mozilla/build/moz.configure/old.configure --- seamonkey-2.48/mozilla/build/moz.configure/old.configure.system-ogg 2017-07-07 07:35:47.000000000 +0200 +++ seamonkey-2.48/mozilla/build/moz.configure/old.configure 2017-08-02 21:47:04.859159432 +0200 @@ -288,6 +288,7 @@ def old_configure_options(*options): '--with-system-jpeg', '--with-system-libevent', '--with-system-libvpx', + '--with-system-ogg', '--with-system-nspr', '--with-system-nss', '--with-system-png', diff -up seamonkey-2.48/mozilla/config/external/moz.build.system-ogg seamonkey-2.48/mozilla/config/external/moz.build --- seamonkey-2.48/mozilla/config/external/moz.build.system-ogg 2017-07-07 07:35:48.000000000 +0200 +++ seamonkey-2.48/mozilla/config/external/moz.build 2017-08-02 21:47:04.753160116 +0200 @@ -21,12 +21,15 @@ if CONFIG['MOZ_UPDATER']: external_dirs += ['modules/brotli'] external_dirs += ['modules/woff2'] -if CONFIG['MOZ_VORBIS']: +if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_SYSTEM_OGG']: external_dirs += ['media/libvorbis'] if CONFIG['MOZ_TREMOR']: external_dirs += ['media/libtremor'] +if not CONFIG['MOZ_SYSTEM_OGG']: + external_dirs += ['media/libopus'] + if CONFIG['MOZ_WEBM_ENCODER']: external_dirs += ['media/libmkv'] @@ -36,6 +39,9 @@ if not CONFIG['MOZ_SYSTEM_LIBVPX']: if not CONFIG['MOZ_SYSTEM_PNG']: external_dirs += ['media/libpng'] +if not CONFIG['MOZ_SYSTEM_OGG']: + external_dirs += ['media/libogg', 'media/libtheora'] + if CONFIG['CPU_ARCH'] == 'arm': external_dirs += ['media/openmax_dl'] @@ -52,9 +58,6 @@ external_dirs += [ 'media/kiss_fft', 'media/libcubeb', 'media/libnestegg', - 'media/libogg', - 'media/libopus', - 'media/libtheora', 'media/libspeex_resampler', 'media/libstagefright', 'media/libsoundtouch', diff -up seamonkey-2.48/mozilla/config/Makefile.in.system-ogg seamonkey-2.48/mozilla/config/Makefile.in --- seamonkey-2.48/mozilla/config/Makefile.in.system-ogg 2017-08-02 21:47:04.766160032 +0200 +++ seamonkey-2.48/mozilla/config/Makefile.in 2017-08-02 21:52:33.547037855 +0200 @@ -48,6 +48,7 @@ export:: $(export-preqs) -DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \ -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \ -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \ + -DMOZ_SYSTEM_OGG=$(MOZ_SYSTEM_OGG) \ -DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \ $(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers $(INSTALL) system_wrappers $(DIST) diff -up seamonkey-2.48/mozilla/config/system-headers.system-ogg seamonkey-2.48/mozilla/config/system-headers --- seamonkey-2.48/mozilla/config/system-headers.system-ogg 2017-07-07 07:35:48.000000000 +0200 +++ seamonkey-2.48/mozilla/config/system-headers 2017-08-02 21:47:04.784159916 +0200 @@ -1302,6 +1302,17 @@ vpx/vp8cx.h vpx/vp8dx.h vpx_mem/vpx_mem.h #endif +#if MOZ_SYSTEM_OGG==1 +vorbis/codec.h +vorbis/vorbisenc.h +theora/theoradec.h +ogg/ogg.h +ogg/os_types.h +opus/opus_defines.h +opus/opus.h +opus/opus_multistream.h +opus/opus_types.h +#endif gst/gst.h gst/app/gstappsink.h gst/app/gstappsrc.h diff -up seamonkey-2.48/mozilla/old-configure.in.system-ogg seamonkey-2.48/mozilla/old-configure.in --- seamonkey-2.48/mozilla/old-configure.in.system-ogg 2017-07-07 07:37:32.000000000 +0200 +++ seamonkey-2.48/mozilla/old-configure.in 2017-08-02 21:53:26.079698750 +0200 @@ -3004,6 +3004,34 @@ fi AC_SUBST(MOZ_RAW) +dnl system ogg Support +dnl ======================================================== +MOZ_ARG_WITH_BOOL(system-ogg, +[ --with-system-ogg Use system ogg, vorbis, theora, and opus libraries (located with pkgconfig)], + MOZ_SYSTEM_OGG=1) + +MOZ_OGG_CFLAGS= +MOZ_OGG_LIBS= +MOZ_VORBIS_CFLAGS= +MOZ_VORBIS_LIBS= +MOZ_THEORA_CFLAGS= +MOZ_THEORA_LIBS= +MOZ_OPUS_CFLAGS= +MOZ_OPUS_LIBS= + +if test -n "$MOZ_SYSTEM_OGG"; then + dnl ============================ + dnl === ogg (version) check === + dnl ============================ + dnl Check to see if we have system ogg and theora packages. + PKG_CHECK_MODULES(OGG, ogg) + PKG_CHECK_MODULES(THEORA, theoradec) + MOZ_OGG_CFLAGS="$OGG_CFLAGS" + MOZ_OGG_LIBS="$OGG_LIBS" + MOZ_THEORA_CFLAGS="$THEORA_CFLAGS" + MOZ_THEORA_LIBS="$THEORA_LIBS" +fi + dnl ======================================================== dnl = Apple platform decoder support dnl ======================================================== @@ -3241,6 +3269,17 @@ fi if test -n "$MOZ_VORBIS"; then AC_DEFINE(MOZ_VORBIS) + + if test -n "$MOZ_SYSTEM_OGG"; then + dnl ============================ + dnl === vorbis (version) check === + dnl ============================ + dnl Check to see if we have a system vorbis package. + PKG_CHECK_MODULES(VORBIS, vorbis) + PKG_CHECK_MODULES(VORBISENC, vorbisenc) + MOZ_VORBIS_CFLAGS="$VORBIS_CFLAGS $VORBISENC_CFLAGS" + MOZ_VORBIS_LIBS="$VORBIS_LIBS $VORBISENC_LIBS" + fi fi if test -n "$MOZ_TREMOR"; then @@ -3251,6 +3290,27 @@ MOZ_WEBM_ENCODER=1 AC_DEFINE(MOZ_WEBM_ENCODER) AC_SUBST(MOZ_WEBM_ENCODER) + +if test -n "$MOZ_SYSTEM_OGG"; then + dnl ============================ + dnl === opus (version) check === + dnl ============================ + dnl Check to see if we have a system opus package. + PKG_CHECK_MODULES(OPUS, opus) + MOZ_OPUS_CFLAGS="$OPUS_CFLAGS" + MOZ_OPUS_LIBS="$OPUS_LIBS" +fi + +AC_SUBST(MOZ_SYSTEM_OGG) +AC_SUBST_LIST(MOZ_OGG_CFLAGS) +AC_SUBST_LIST(MOZ_OGG_LIBS) +AC_SUBST_LIST(MOZ_VORBIS_CFLAGS) +AC_SUBST_LIST(MOZ_VORBIS_LIBS) +AC_SUBST_LIST(MOZ_THEORA_CFLAGS) +AC_SUBST_LIST(MOZ_THEORA_LIBS) +AC_SUBST_LIST(MOZ_OPUS_CFLAGS) +AC_SUBST_LIST(MOZ_OPUS_LIBS) + dnl ================================== dnl = Check alsa availability on Linux dnl ================================== diff -up seamonkey-2.48/mozilla/toolkit/library/moz.build.system-ogg seamonkey-2.48/mozilla/toolkit/library/moz.build --- seamonkey-2.48/mozilla/toolkit/library/moz.build.system-ogg 2017-07-07 07:38:25.000000000 +0200 +++ seamonkey-2.48/mozilla/toolkit/library/moz.build 2017-08-02 21:47:04.827159638 +0200 @@ -243,6 +243,12 @@ if CONFIG['MOZ_SYSTEM_LIBEVENT']: if CONFIG['MOZ_SYSTEM_LIBVPX']: OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS'] +if CONFIG['MOZ_SYSTEM_OGG']: + OS_LIBS += CONFIG['MOZ_OGG_LIBS'] + OS_LIBS += CONFIG['MOZ_VORBIS_LIBS'] + OS_LIBS += CONFIG['MOZ_THEORA_LIBS'] + OS_LIBS += CONFIG['MOZ_OPUS_LIBS'] + if not CONFIG['MOZ_TREE_PIXMAN']: OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] diff -up seamonkey-2.48/mozilla/xpcom/build/XPCOMInit.cpp.system-ogg seamonkey-2.48/mozilla/xpcom/build/XPCOMInit.cpp --- seamonkey-2.48/mozilla/xpcom/build/XPCOMInit.cpp.system-ogg 2017-07-07 07:38:29.000000000 +0200 +++ seamonkey-2.48/mozilla/xpcom/build/XPCOMInit.cpp 2017-08-02 21:47:04.843159535 +0200 @@ -658,11 +658,13 @@ NS_InitXPCOM2(nsIServiceManager** aResul // this oddness. mozilla::SetICUMemoryFunctions(); +#if 0 // 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.