Support building with system media libraries. See Based on: https://svnweb.freebsd.org/ports/head/www/firefox-esr/files/patch-z-bug517422?revision=472833&view=markup Changes to files within the bundled libraries are omitted, since those files are removed from Guix sources. Modified for use with patch -p1, and to apply cleanly to GNU IceCat. --- icecat-60.5.0/build/moz.configure/old.configure +++ icecat-60.5.0/build/moz.configure/old.configure @@ -273,7 +273,12 @@ '--with-system-libvpx', '--with-system-nspr', '--with-system-nss', + '--with-system-ogg', '--with-system-png', + '--with-system-soundtouch', + '--with-system-theora', + '--with-system-tremor', + '--with-system-vorbis', '--with-system-zlib', '--with-thumb', '--with-thumb-interwork', --- icecat-60.5.0/config/external/moz.build +++ icecat-60.5.0/config/external/moz.build @@ -23,12 +23,21 @@ external_dirs += ['modules/xz-embedded'] -if CONFIG['MOZ_VORBIS']: +if not CONFIG['MOZ_SYSTEM_OGG']: + external_dir
aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/spice.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/spice.scm')
0 files changed, 0 insertions, 0 deletions
/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp +++ icecat-60.5.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp @@ -15,9 +15,13 @@ #include #endif +#ifdef MOZ_SYSTEM_SOUNDTOUCH +#include "nsXPCOMPrivate.h" // for XUL_DLL +#else // We use a known symbol located in lgpllibs to determine its location. // soundtouch happens to be always included in lgpllibs #include "soundtouch/SoundTouch.h" +#endif namespace mozilla { @@ -60,6 +64,12 @@ sLinkStatus = LinkStatus_FAILED; +#ifdef MOZ_SYSTEM_SOUNDTOUCH + // We retrieve the path of the XUL library as this is where mozavcodec and + // mozavutil libs are located. + char* path = + PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init); +#else // We retrieve the path of the lgpllibs library as this is where mozavcodec // and mozavutil libs are located. PathString lgpllibsname = GetLibraryName(nullptr, "lgpllibs"); @@ -68,6 +78,7 @@ } PathString path = GetLibraryFilePathname( lgpllibsname.get(), (PRFuncPtr)&soundtouch::SoundTouch::getVersionId); +#endif if (path.IsEmpty()) { return false; } --- icecat-60.5.0/old-configure.in +++ icecat-60.5.0/old-configure.in @@ -2417,6 +2417,111 @@ fi fi # COMPILE_ENVIRONMENT +dnl ======================================================== +dnl Check for libogg +dnl ======================================================== + +MOZ_ARG_WITH_BOOL(system-ogg, +[ --with-system-ogg Use system libogg (located with pkgconfig)], +MOZ_SYSTEM_OGG=1, +MOZ_SYSTEM_OGG=) + +if test -n "$MOZ_SYSTEM_OGG"; then + PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.3) + + _SAVE_LIBS=$LIBS + LIBS="$LIBS $MOZ_OGG_LIBS" + AC_CHECK_FUNC(ogg_set_mem_functions, [], + [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)]) + LIBS=$_SAVE_LIBS +fi + +AC_SUBST(MOZ_SYSTEM_OGG) + +dnl ======================================================== +dnl Check for libvorbis +dnl ======================================================== + +MOZ_ARG_WITH_BOOL(system-vorbis, +[ --with-system-vorbis Use system libvorbis (located with pkgconfig)], +MOZ_SYSTEM_VORBIS=1, +MOZ_SYSTEM_VORBIS=) + +if test -n "$MOZ_SYSTEM_VORBIS"; then + PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.6) +fi + +AC_SUBST(MOZ_SYSTEM_VORBIS) + +dnl ======================================================== +dnl Check for integer-only libvorbis aka tremor +dnl ======================================================== + +MOZ_ARG_WITH_BOOL(system-tremor, +[ --with-system-tremor Use system libtremor (located with pkgconfig)], +MOZ_SYSTEM_TREMOR=1, +MOZ_SYSTEM_TREMOR=) + +if test -n "$MOZ_SYSTEM_TREMOR"; then + PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1) +fi + +AC_SUBST(MOZ_SYSTEM_TREMOR) + +dnl ======================================================== +dnl Check for libtheora +dnl ======================================================== + +MOZ_ARG_WITH_BOOL(system-theora, +[ --with-system-theora Use system libtheora (located with pkgconfig)], +MOZ_SYSTEM_THEORA=1, +MOZ_SYSTEM_THEORA=) + +if test -n "$MOZ_SYSTEM_THEORA"; then + PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2) +fi + +AC_SUBST(MOZ_SYSTEM_THEORA) + +dnl ======================================================== +dnl Check for libSoundTouch +dnl ======================================================== + +MOZ_ARG_WITH_BOOL(system-soundtouch, +[ --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)], +MOZ_SYSTEM_SOUNDTOUCH=1, +MOZ_SYSTEM_SOUNDTOUCH=) + +if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then + PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0) + + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + _SAVE_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS" + AC_CACHE_CHECK(for soundtouch sample type, + ac_cv_soundtouch_sample_type, + [AC_TRY_COMPILE([#include + #ifndef SOUNDTOUCH_INTEGER_SAMPLES + #error soundtouch expects float samples + #endif], + [], + [ac_cv_soundtouch_sample_type=short], + [ac_cv_soundtouch_sample_type=float])]) + CXXFLAGS=$_SAVE_CXXFLAGS + AC_LANG_RESTORE + + if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \ + -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then + AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.]) + fi +fi + +if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then + AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH) +fi +AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH) + dnl system libvpx Support dnl ======================================================== MOZ_ARG_WITH_BOOL(system-libvpx, --- icecat-60.5.0/toolkit/library/moz.build +++ icecat-60.5.0/toolkit/library/moz.build @@ -244,6 +244,21 @@ if CONFIG['MOZ_SYSTEM_HUNSPELL']: OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] +if CONFIG['MOZ_SYSTEM_OGG']: + OS_LIBS += CONFIG['MOZ_OGG_LIBS'] + +if CONFIG['MOZ_SYSTEM_THEORA']: + OS_LIBS += CONFIG['MOZ_THEORA_LIBS'] + +if CONFIG['MOZ_SYSTEM_VORBIS']: + OS_LIBS += CONFIG['MOZ_VORBIS_LIBS'] + +if CONFIG['MOZ_SYSTEM_TREMOR']: + OS_LIBS += CONFIG['MOZ_TREMOR_LIBS'] + +if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']: + OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS'] + if CONFIG['MOZ_SYSTEM_LIBEVENT']: OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] --- icecat-60.5.0/xpcom/build/XPCOMInit.cpp +++ icecat-60.5.0/xpcom/build/XPCOMInit.cpp @@ -139,7 +139,9 @@ #include "mozilla/ipc/GeckoChildProcessHost.h" +#ifndef MOZ_OGG_NO_MEM_REPORTING #include "ogg/ogg.h" +#endif #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) #if defined(HAVE_STDINT_H) // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in @@ -635,10 +637,12 @@ // this oddness. mozilla::SetICUMemoryFunctions(); +#ifndef MOZ_OGG_NO_MEM_REPORTING // 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.