harfbuzz-icu: package imported at 4.3.0
[kiss-trunc88.git] / palemoon / build
blob7f51e8a5d97262433461e79ce05d2ad687a6f610
1 #!/bin/sh -e
3 #git submodule init
4 #git submodule update
6 # Build autoconf 2.13 for browser's sole use.
8 cd autoconf2.13
10 ./configure \
11 --prefix="$PWD/../junk" \
12 --program-suffix=-2.13
14 make
15 make install
18 if ! command -v yasm; then (
19 cd yasm
21 ./configure \
22 --prefix=/
24 make
25 make DESTDIR="$PWD/../junk" install
26 ); fi
28 for f in zip unzip; do
29 if ! kiss list "$f"; then (
30 cd "$f"
32 make \
33 -f unix/Makefile generic
35 make \
36 prefix="$PWD/../junk" \
37 -f unix/Makefile install
38 ); fi
39 done
41 unset CFLAGS
42 unset CXXFLAGS
43 export CFLAGS="-pipe -march=westmere"
44 export CXXFLAGS="$CFLAGS"
46 export PATH="$PWD/junk/bin:$PATH"
48 sed -e 's#%SRCDIR%#'"$(realpath .)"'#g' -e "s#%CFLAGS%#$CFLAGS#g" mozconfig.in > .mozconfig
50 for patch in *.patch; do
51 patch -p1 < "$patch"
52 done
54 export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/browser"
56 # Apparently `mach` is now a *bash* script, yet it's marked as /bin/sh.
57 # So we just delete the offending code.
58 printf '#!/bin/sh\n./platform/mach $@' > ./mach
60 ./mach build
61 ./mach stage
63 mkdir -p "$1/usr/bin"
64 mkdir -p "$1/usr/lib"
66 cp -r objdir/dist/palemoon "$1/usr/lib/browser"
67 ln -s ../lib/browser/palemoon "$1/usr/bin/browser"