You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
4.1 KiB
118 lines
4.1 KiB
# TODO: Slap the devs for relying on gcc 4.9 (It segfaults often when building with newer versions, probably due to new optimizations)
|
|
|
|
name=Pale-Moon
|
|
version=27.1.2
|
|
version_autoconf=2.13
|
|
version_gcc=4.9.4
|
|
update_url="https://github.com/MoonchildProductions/$name/releases"
|
|
update_names="/archive/${version}_Release.tar.gz"
|
|
|
|
define_option 'pulseaudio: Build with support for PulseAudio'
|
|
|
|
dlextract "https://github.com/MoonchildProductions/$name/archive/${version}_Release/$name-${version}_Release.tar.gz" \
|
|
'd9fda44446bb560169741a0ad27ef915'
|
|
( name=autoconf version="$version_autoconf"
|
|
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
|
|
'9de56d4a161a723228220b0f425dc711'
|
|
)
|
|
( name=gcc version="$version_gcc"
|
|
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
|
|
'87c24a4090c1577ba817ec6882602491'
|
|
)
|
|
extrafile 'palemoon.desktop'
|
|
header_end
|
|
|
|
( cd "autoconf-$version_autoconf"
|
|
./configure --prefix="$PWD/install" --program-suffix=-$version_autoconf
|
|
make
|
|
make install
|
|
)
|
|
|
|
( cd "gcc-$version_gcc"
|
|
sed -i -e 's/\.\/fixinc\.sh/-c true/' gcc/Makefile.in
|
|
mkdir build; cd build
|
|
../configure --prefix="$PWD/../install" --disable-bootstrap --enable-languages=c++
|
|
make
|
|
make install
|
|
)
|
|
|
|
cd "$name-${version}_Release"
|
|
|
|
cat > .mozconfig << EOF
|
|
# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
|
|
#ac_add_options --enable-official-branding
|
|
#export MOZILLA_OFFICIAL=1
|
|
|
|
mk_add_options MOZ_CO_PROJECT=browser
|
|
ac_add_options --enable-application=browser
|
|
|
|
mk_add_options MOZ_OBJDIR="$PWD/pmbuild/"
|
|
|
|
ac_add_options --enable-optimize="-O2 -msse2 -mfpmath=sse"
|
|
ac_add_options --with-pthreads
|
|
|
|
ac_add_options --disable-installer
|
|
ac_add_options --disable-updater
|
|
|
|
ac_add_options --enable-release
|
|
ac_add_options --enable-devtools
|
|
ac_add_options --enable-jemalloc
|
|
ac_add_options --enable-shared-js
|
|
|
|
ac_add_options --enable-strip
|
|
|
|
ac_add_options --x-libraries="/$dir_prefix/$dir_libdir"
|
|
|
|
# The section before this is kept up to date with https://developer.palemoon.org/Developer_Guide:Build_Instructions/Pale_Moon/Linux#head:Mozconfig_Files (with minor changes)
|
|
# The following section are my additions.
|
|
|
|
# Use system libraries (./configure --help | grep system)
|
|
ac_add_options --with-system-nspr
|
|
ac_add_options --with-system-libevent
|
|
#ac_add_options --with-system-nss - Apparently unsupported
|
|
ac_add_options --with-system-jpeg
|
|
ac_add_options --with-system-zlib
|
|
ac_add_options --with-system-bz2
|
|
ac_add_options --with-system-webp
|
|
#ac_add_options --with-system-png - The APNG patch is not upstrean
|
|
ac_add_options --enable-system-hunspell
|
|
ac_add_options --enable-system-ffi
|
|
ac_add_options --with-system-libvpx
|
|
ac_add_options --enable-system-sqlite
|
|
ac_add_options --enable-system-cairo
|
|
ac_add_options --enable-system-pixman
|
|
ac_add_options --with-system-icu
|
|
|
|
# Make pulseaudio support optional
|
|
$(option pulseaudio && echo ac_add_options --enable-pulseaudio || echo ac_add_options --disable-pulseaudio)
|
|
EOF
|
|
|
|
# Build
|
|
PATH="$PWD/../autoconf-$version_autoconf/install/bin:$PWD/../gcc-$version_gcc/install/bin:$PATH" \
|
|
make -f client.mk build
|
|
|
|
# Install
|
|
cd pmbuild
|
|
make package
|
|
|
|
mkdir -p "$dir_install/$dir_prefix/$dir_libdir/palemoon"
|
|
cp -Ta dist/palemoon "$dir_install/$dir_prefix/$dir_libdir/palemoon"
|
|
mkdir -p "$dir_install/$dir_prefix/$dir_bindir"
|
|
ln -sf "/$dir_prefix/$dir_libdir/palemoon/palemoon" "$dir_install/$dir_prefix/$dir_bindir/palemoon"
|
|
|
|
cd ../..
|
|
|
|
# Install icons
|
|
for x in 16 32 48; do
|
|
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/${x}x$x/apps"
|
|
ln -sf "/$dir_prefix/$dir_libdir/palemoon/browser/chrome/icons/default/default$x.png" \
|
|
"$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/${x}x$x/apps/palemoon.png"
|
|
done
|
|
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/128x128/apps"
|
|
ln -sf "/$dir_prefix/$dir_libdir/palemoon/browser/icons/mozicon128.png" \
|
|
"$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/128x128/apps/palemoon.png"
|
|
|
|
# Install desktop
|
|
install -Dm644 -t "$dir_install/$dir_prefix/$dir_datadir/applications" palemoon.desktop
|
|
|
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:
|
|
|