diff options
Diffstat (limited to 'extra/xulrunner')
-rw-r--r-- | extra/xulrunner/PKGBUILD | 20 | ||||
-rw-r--r-- | extra/xulrunner/mips.patch | 114 |
2 files changed, 128 insertions, 6 deletions
diff --git a/extra/xulrunner/PKGBUILD b/extra/xulrunner/PKGBUILD index 1bf7cd3db..783b9f3e3 100644 --- a/extra/xulrunner/PKGBUILD +++ b/extra/xulrunner/PKGBUILD @@ -5,23 +5,31 @@ pkgname=xulrunner pkgver=5.0 _ffoxver=5.0 pkgrel=1 +pkgver=2.0 +pkgrel=2 # hold ver pkgdesc="Mozilla Runtime Environment" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') license=('MPL' 'GPL' 'LGPL') depends=('gtk2' 'gcc-libs' 'libidl2' 'mozilla-common' 'nss' 'libxt' 'libxrender' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib' 'libevent' 'sqlite3>=3.7.4' 'libnotify') makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm' 'mesa' 'gconf') url="http://wiki.mozilla.org/XUL:Xul_Runner" -source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2 +source=(http://ftp.gnu.org/gnu/gnuzilla/${_ffoxver}/icecat-${_ffoxver}.tar.xz mozconfig - mozilla-pkgconfig.patch) + mozilla-pkgconfig.patch + mips.patch) options=('!emptydirs' '!buildflags') replaces=('xulrunner-oss') build() { - cd "${srcdir}/mozilla-release" + cd "${srcdir}/icecat-${_ffoxver}/" cp "${srcdir}/mozconfig" .mozconfig #fix libdir/sdkdir - fedora - patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch" + patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch" + + [[ "$CARCH" == "mips64el" ]] && { + echo "ac_add_options --disable-ipc" >> .mozconfig + patch -Np0 -i "${srcdir}/mips.patch" + } export CXXFLAGS="-fpermissive" export LDFLAGS="-Wl,-rpath,/usr/lib/xulrunner-${pkgver} -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed" @@ -30,7 +38,7 @@ build() { } package() { - cd "${srcdir}/mozilla-release" + cd "${srcdir}/icecat-${_ffoxver}/" make -j1 -f client.mk DESTDIR="${pkgdir}" install #Remove included dictionaries, add symlink to system myspell path. diff --git a/extra/xulrunner/mips.patch b/extra/xulrunner/mips.patch new file mode 100644 index 000000000..f9de910b2 --- /dev/null +++ b/extra/xulrunner/mips.patch @@ -0,0 +1,114 @@ +--- ../../tmp.ne6Bz1oy72/xulrunner/src/mozilla-2.0/js/src/assembler/jit/ExecutableAllocator.h 2011-03-18 20:33:47.000000000 -0300 ++++ js/src/assembler/jit/ExecutableAllocator.h 2011-03-30 15:45:07.537247142 -0300 +@@ -44,9 +44,7 @@ + #include <e32std.h> + #endif + +-#if WTF_CPU_MIPS && WTF_PLATFORM_LINUX + #include <sys/cachectl.h> +-#endif + + #if WTF_PLATFORM_WINCE + // From pkfuncs.h (private header file from the Platform Builder) +@@ -311,89 +309,10 @@ + #endif + + +-#if WTF_CPU_X86 || WTF_CPU_X86_64 +- static void cacheFlush(void*, size_t) +- { +- } +-#elif WTF_CPU_MIPS + static void cacheFlush(void* code, size_t size) + { +-#if WTF_COMPILER_GCC && (GCC_VERSION >= 40300) +-#if WTF_MIPS_ISA_REV(2) && (GCC_VERSION < 40403) +- int lineSize; +- asm("rdhwr %0, $1" : "=r" (lineSize)); +- // +- // Modify "start" and "end" to avoid GCC 4.3.0-4.4.2 bug in +- // mips_expand_synci_loop that may execute synci one more time. +- // "start" points to the fisrt byte of the cache line. +- // "end" points to the last byte of the line before the last cache line. +- // Because size is always a multiple of 4, this is safe to set +- // "end" to the last byte. +- // +- intptr_t start = reinterpret_cast<intptr_t>(code) & (-lineSize); +- intptr_t end = ((reinterpret_cast<intptr_t>(code) + size - 1) & (-lineSize)) - 1; +- __builtin___clear_cache(reinterpret_cast<char*>(start), reinterpret_cast<char*>(end)); +-#else +- intptr_t end = reinterpret_cast<intptr_t>(code) + size; +- __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end)); +-#endif +-#else + _flush_cache(reinterpret_cast<char*>(code), size, BCACHE); +-#endif +- } +-#elif WTF_CPU_ARM_THUMB2 && WTF_PLATFORM_IPHONE +- static void cacheFlush(void* code, size_t size) +- { +- sys_dcache_flush(code, size); +- sys_icache_invalidate(code, size); +- } +-#elif WTF_CPU_ARM_THUMB2 && WTF_PLATFORM_LINUX +- static void cacheFlush(void* code, size_t size) +- { +- asm volatile ( +- "push {r7}\n" +- "mov r0, %0\n" +- "mov r1, %1\n" +- "movw r7, #0x2\n" +- "movt r7, #0xf\n" +- "movs r2, #0x0\n" +- "svc 0x0\n" +- "pop {r7}\n" +- : +- : "r" (code), "r" (reinterpret_cast<char*>(code) + size) +- : "r0", "r1", "r2"); +- } +-#elif WTF_PLATFORM_SYMBIAN +- static void cacheFlush(void* code, size_t size) +- { +- User::IMB_Range(code, static_cast<char*>(code) + size); +- } +-#elif WTF_CPU_ARM_TRADITIONAL && WTF_PLATFORM_LINUX && WTF_COMPILER_RVCT +- static __asm void cacheFlush(void* code, size_t size); +-#elif WTF_CPU_ARM_TRADITIONAL && (WTF_PLATFORM_LINUX || WTF_PLATFORM_ANDROID) && WTF_COMPILER_GCC +- static void cacheFlush(void* code, size_t size) +- { +- asm volatile ( +- "push {r7}\n" +- "mov r0, %0\n" +- "mov r1, %1\n" +- "mov r7, #0xf0000\n" +- "add r7, r7, #0x2\n" +- "mov r2, #0x0\n" +- "svc 0x0\n" +- "pop {r7}\n" +- : +- : "r" (code), "r" (reinterpret_cast<char*>(code) + size) +- : "r0", "r1", "r2"); +- } +-#elif WTF_PLATFORM_WINCE +- static void cacheFlush(void* code, size_t size) +- { +- CacheRangeFlush(code, size, CACHE_SYNC_ALL); + } +-#else +- #error "The cacheFlush support is missing on this platform." +-#endif + + private: + +--- js/src/Makefile.in.orig 2011-03-30 22:02:39.725318514 -0300 ++++ js/src/Makefile.in 2011-03-30 22:02:51.689347820 -0300 +@@ -914,7 +914,7 @@ + # Needed to "configure" it correctly. Unfortunately these + # flags wind up being applied to all code in js/src, not just + # the code in js/src/assembler. +-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 ++CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_JIT=1 + + INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr + + |