1 # Description: The Mozilla Firefox browser
2 # URL: http://www.mozilla.com/firefox/
3 # Maintainer: Fredrik Rinnestam, fredrik at crux dot nu
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on: nss, libidl, gtk, python, alsa-lib, yasm, mesa3d
10 source=(ftp://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.bz2
11 firefox-install-dir.patch 0001-Fix-build-with-USE_SKIA_GPU.patch firefox.desktop)
16 patch -p1 -i $SRC/firefox-install-dir.patch
17 patch -p1 -i $SRC/0001-Fix-build-with-USE_SKIA_GPU.patch
19 # determine some flags depending on SOC
20 FPU=vfp; ARCH=armv6; THUMB=no
22 armv7*) ARCH=armv7; THUMB=yes;;
24 for flag in $CFLAGS; do
26 -mfpu=neon*) FPU=neon;;
30 #ac_add_options --with-thumb-interwork=$THUMB
31 #ac_add_options --with-soft-float=no
32 #ac_add_options --with-thumb=$THUMB
34 # mk_add_options MOZ_ALIGN=no
35 # ac_add_options --with-arch=$ARCH
36 # ac_add_options --with-fpu=$FPU
37 # ac_add_options --with-float-abi=hard
38 # ac_add_options --with-thumb-interwork=no
39 # ac_add_options --with-thumb=no
42 # export MOZ_THUMB="no"
43 # export MOZ_ARCH="$ARCH"
44 # export MOZ_FPU="$FPU"
45 # export MOZ_FLOAT_ABI="hard"
46 # export MOZ_ALIGN="no"
47 # export VPX_ASFLAGS="$CFLAGS"
48 # export LIBJPEG_TURBO_ASFLAGS="$CFLAGS"
50 cat <<- EOF > .mozconfig
51 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-shared
52 mk_add_options MOZ_MAKE_FLAGS="$MAKEFLAGS -s"
53 export VPX_ASFLAGS="$CFLAGS"
54 export LIBJPEG_TURBO_ASFLAGS="$CFLAGS"
55 ac_add_options --prefix=/usr
56 ac_add_options --with-system-jpeg
57 ac_add_options --with-system-zlib
58 ac_add_options --with-system-mng
59 ac_add_options --with-system-png
60 ac_add_options --with-system-nspr
61 ac_add_options --with-system-nss
62 ac_add_options --enable-system-ffi
63 ac_add_options --enable-system-pixman
64 ac_add_options --enable-system-sqlite
65 ac_add_options --enable-system-cairo
66 ac_add_options --with-pthreads
67 ac_add_options --enable-optimize="$CFLAGS"
68 ac_add_options --enable-official-branding
69 ac_add_options --enable-extensions=default,-gnomevfs
70 ac_add_options --enable-shared
71 ac_add_options --enable-svg
72 ac_add_options --enable-canvas
73 ac_add_options --enable-crypto
74 ac_add_options --enable-single-profile
75 ac_add_options --enable-places
76 ac_add_options --enable-storage
77 ac_add_options --enable-places_bookmarks
78 ac_add_options --enable-image-encoder=all
79 ac_add_options --enable-xft
80 ac_add_options --disable-static
81 ac_add_options --disable-tests
82 ac_add_options --disable-mochitest
83 ac_add_options --disable-dbus
84 ac_add_options --disable-debug
85 ac_add_options --disable-installer
86 ac_add_options --disable-updater
87 ac_add_options --disable-xprint
88 ac_add_options --disable-profilesharing
89 ac_add_options --disable-gnomevfs
90 ac_add_options --disable-gnomeui
91 ac_add_options --disable-mailnews
92 ac_add_options --disable-crashreporter
93 ac_add_options --disable-necko-wifi
94 ac_add_options --disable-libnotify
95 ac_add_options --disable-gstreamer
96 ac_add_options --disable-pulseaudio
97 ac_add_options --disable-skia-gpu
100 #sed "s|-march=armv7-a -mfpu=neon||g" -i configure
101 # sed "s|VPX_ASFLAGS.*|VPX_ASFLAGS=\"\"|g" -i configure
102 # sed "s|LIBJPEG_TURBO_ASFLAGS.*|LIBJPEG_TURBO_ASFLAGS=\"\"|g" -i configure
103 #make -f client.mk build VPX_ASFLAGS="$CFLAGS" LIBJPEG_TURBO_ASFLAGS="$CFLAGS"
104 # sed "s|VPX_ASFLAGS = -march=armv7-a -mfpu=neon|VPX_ASFLAGS = |g" -i firefox-shared/config/autoconf.mk
105 # sed -e "s|-march=armv7-a||g" -e "s|-mthumb||g" -e "s|-mfloat-abi=softfp||g" -e "s|-mfpu=neon||g" -i mozilla-release/firefox-shared/media/libvpx/backend.mk
106 sed "s|\['-march=armv7-a', '-mthumb', '-mfloat-abi=softfp', '-mfpu=neon'\]|\[\]|g" -i media/libvpx/moz.build
107 make -f client.mk build
108 make -f client.mk DESTDIR=$PKG install
110 mkdir -p $PKG/usr/share/pixmaps
111 ln -s /usr/lib/firefox/browser/chrome/icons/default/default48.png $PKG/usr/share/pixmaps/firefox_default48.png
112 install -D -m 0644 $SRC/firefox.desktop $PKG/usr/share/applications/firefox.desktop