diff --git a/mingw-w64-firefox/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch b/mingw-w64-firefox/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch new file mode 100644 index 0000000000..b7fd3b59a5 --- /dev/null +++ b/mingw-w64-firefox/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch @@ -0,0 +1,85 @@ +diff -urN firefox-39.0.orig/media/libstagefright/moz.build firefox-39.0/media/libstagefright/moz.build +--- firefox-39.0.orig/media/libstagefright/moz.build 2015-06-30 23:57:58.000000000 +0100 ++++ firefox-39.0/media/libstagefright/moz.build 2015-07-20 18:53:20.523932000 +0100 +@@ -16,9 +16,10 @@ + DEFINES['off64_t'] = 'int64_t' + DEFINES['strcasecmp'] = 'stricmp' + DEFINES['strncasecmp'] = 'strnicmp' ++ LOCAL_INCLUDES += [ 'ports/win32/include' ] + DEFINES['HAVE_MS_C_RUNTIME'] = True + DEFINES['__PRETTY_FUNCTION__'] = '__FUNCTION__' +- LOCAL_INCLUDES += [ 'ports/win32/include' ] ++ LOCAL_INCLUDES += [ 'ports/mingw-w64/include' ] + elif CONFIG['OS_TARGET'] == 'Darwin': + DEFINES['HAVE_SYS_UIO_H'] = True + DEFINES['off64_t'] = 'off_t' +diff -urN firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/arpa/inet.h firefox-39.0/media/libstagefright/ports/mingw-w64/include/arpa/inet.h +--- firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/arpa/inet.h 1970-01-01 01:00:00.000000000 +0100 ++++ firefox-39.0/media/libstagefright/ports/mingw-w64/include/arpa/inet.h 2015-07-20 19:55:44.843115100 +0100 +@@ -0,0 +1,9 @@ ++/* Any copyright is dedicated to the Public Domain. ++ * http://creativecommons.org/publicdomain/zero/1.0/ */ ++ ++#ifndef INET_H_ ++#define INET_H_ ++ ++#include ++ ++#endif +diff -urN firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/byteswap.h firefox-39.0/media/libstagefright/ports/mingw-w64/include/byteswap.h +--- firefox-39.0.orig/media/libstagefright/ports/mingw-w64.orig/include/byteswap.h 1970-01-01 01:00:00.000000000 +0100 ++++ firefox-39.0/media/libstagefright/ports/mingw-w64/include/byteswap.h 2015-07-20 20:22:01.796787900 +0100 +@@ -0,0 +1,10 @@ ++/* Any copyright is dedicated to the Public Domain. ++ * http://creativecommons.org/publicdomain/zero/1.0/ */ ++ ++#ifndef BYTESWAP_H_ ++#define BYTESWAP_H_ ++ ++#include ++#define bswap_16 _byteswap_ushort ++ ++#endif +diff -urN firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/netinet/in.h firefox-39.0/media/libstagefright/ports/mingw-w64/include/netinet/in.h +--- firefox-39.0.orig/media/libstagefright/ports/mingw-w64/include/netinet/in.h 1970-01-01 01:00:00.000000000 +0100 ++++ firefox-39.0/media/libstagefright/ports/mingw-w64/include/netinet/in.h 2015-07-20 19:55:44.858714700 +0100 +@@ -0,0 +1,39 @@ ++/* Any copyright is dedicated to the Public Domain. ++ * http://creativecommons.org/publicdomain/zero/1.0/ */ ++ ++#ifndef IN_H_ ++#define IN_H_ ++ ++#include ++ ++#if defined(_M_IX86) || defined(_M_AMD64) ++ ++static uint32_t ++ntohl(uint32_t x) ++{ ++ return x << 24 | (x << 8 & 0xff0000) | (x >> 8 & 0xff00) | x >> 24; ++} ++ ++static uint16_t ++ntohs(uint16_t x) ++{ ++ return x << 8 | x >> 8; ++} ++ ++static uint32_t ++htonl(uint32_t x) ++{ ++ return x << 24 | (x << 8 & 0xff0000) | (x >> 8 & 0xff00) | x >> 24; ++} ++ ++static uint16_t ++htons(uint16_t x) ++{ ++ return x << 8 | x >> 8; ++} ++ ++#else ++#error Unsupported architecture ++#endif ++ ++#endif diff --git a/mingw-w64-firefox/PKGBUILD b/mingw-w64-firefox/PKGBUILD index 7a2d56e60c..4b3088c052 100644 --- a/mingw-w64-firefox/PKGBUILD +++ b/mingw-w64-firefox/PKGBUILD @@ -85,7 +85,8 @@ url='https://www.mozilla.org/firefox/' license=('MPL2') makedepends=('unzip' 'zip' - "${MINGW_PACKAGE_PREFIX}-yasm") + "${MINGW_PACKAGE_PREFIX}-yasm" + "${MINGW_PACKAGE_PREFIX}-python2") source=("http://ftp.mozilla.org/pub/mozilla.org/${_realname}/releases/${pkgver}/source/${_realname}-${pkgver}.source.tar.bz2" "http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip" manifest @@ -99,6 +100,7 @@ source=("http://ftp.mozilla.org/pub/mozilla.org/${_realname}/releases/${pkgver}/ "0008-Fix-stray-back-slash-in-program.patch" "0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch" "0010-Dont-use-I64-numeric-suffix.patch" + "0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch" "debugging.patch" "mozconfig.x86_64" "mozconfig.i686" @@ -118,9 +120,10 @@ sha1sums=('32785daee7ddb9da8d7509ef095258fc58fe838e' 'c17480500944d0863f51af46919133b2bd777e0c' '17bc2719882a5bc0775f48522a45c9132aebdd04' '12385ab4cb659f712f3a3a93248741d299048b9c' + '4553ac6631d56bc251ffd6cbc503002c6835c9de' 'c2a0ed20a82d212bb4aa84cb2f294be3ba0bb859' - 'f437cc5a819788b63d8d9202290f516a85e9f6a2' - 'f6da0857f310788c4a23d158bf03a93ab11230b7' + 'fb6b4567f07fb5e51dfb2b898c1b0ffdf550eba6' + 'ccc52e6b4031ce48d006a4a28e6db289faeec3b4' '17c4f8628ea435c999be66ee4c2967fdaf3b2955' 'ffb6644dbad00413c668c833e3f3680d1d73aa53') @@ -159,6 +162,7 @@ prepare() { patch -p1 -i "${srcdir}"/0008-Fix-stray-back-slash-in-program.patch patch -p1 -i "${srcdir}"/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch patch -p1 -i "${srcdir}"/0010-Dont-use-I64-numeric-suffix.patch + patch -p1 -i "${srcdir}"/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch patch -p1 -i "${srcdir}"/debugging.patch find . -name config.sub -exec cp "${srcdir}"/config.sub {} \; diff --git a/mingw-w64-firefox/manifest b/mingw-w64-firefox/manifest new file mode 100644 index 0000000000..43c4646d22 --- /dev/null +++ b/mingw-w64-firefox/manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/mingw-w64-firefox/mozconfig.i686 b/mingw-w64-firefox/mozconfig.i686 new file mode 100644 index 0000000000..8a6a05acd1 --- /dev/null +++ b/mingw-w64-firefox/mozconfig.i686 @@ -0,0 +1,19 @@ +#Specify the cross compile +export CROSS_COMPILE=1 +mk_add_options CROSS_COMPILE=1 +ac_add_options --enable-application=browser +ac_add_options --target=i686-w64-mingw32 +ac_add_options --enable-default-toolkit=cairo-windows + +ac_add_options --enable-debug +ac_add_options --disable-optimize + +ac_add_options --disable-updater +ac_add_options --disable-crashreporter +ac_add_options --disable-maintenance-service +ac_add_options --disable-webrtc +ac_add_options --without-intl-api +ac_add_options --disable-sandbox + +# Use parallel build. Adjust number of processes for your setup. +mk_add_options MOZ_MAKE_FLAGS=-j8 diff --git a/mingw-w64-firefox/mozconfig.x86_64 b/mingw-w64-firefox/mozconfig.x86_64 new file mode 100644 index 0000000000..55cb2807bf --- /dev/null +++ b/mingw-w64-firefox/mozconfig.x86_64 @@ -0,0 +1,19 @@ +#Specify the cross compile +export CROSS_COMPILE=1 +mk_add_options CROSS_COMPILE=1 +ac_add_options --enable-application=browser +ac_add_options --target=x86_64-w64-mingw32 +ac_add_options --enable-default-toolkit=cairo-windows + +ac_add_options --enable-debug +ac_add_options --disable-optimize + +ac_add_options --disable-updater +ac_add_options --disable-crashreporter +ac_add_options --disable-maintenance-service +ac_add_options --disable-webrtc +ac_add_options --without-intl-api +ac_add_optoins --disable-sandbox + +# Use parallel build. Adjust number of processes for your setup. +mk_add_options MOZ_MAKE_FLAGS=-j8