@ -1,32 +1,35 @@
# TODO: Slap the devs for relying on gcc 4.9 (It segfaults often when building with newer versions, probably due to new optimizations)
# 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
name=Pale-Moon
version=27.1.1
version=27.1.2
version_autoconf=2.13
version_gcc=4.9.4
update_url="https://github.com/MoonchildProductions/$name/releases"
update_url="https://github.com/MoonchildProductions/$name/releases"
update_names="/archive/${version}_Release.tar.gz"
update_names="/archive/${version}_Release.tar.gz"
define_option 'pulseaudio: Build with support for PulseAudio'
define_option 'pulseaudio: Build with support for PulseAudio'
dlextract "https://github.com/MoonchildProductions/$name/archive/${version}_Release/$name-${version}_Release.tar.gz" \
dlextract "https://github.com/MoonchildProductions/$name/archive/${version}_Release/$name-${version}_Release.tar.gz" \
'a4148016d84345b081a3c5350acaa9f6 '
'd9fda44446bb560169741a0ad27ef915 '
( name=autoconf
( name=autoconf version="$version_autoconf"
dlextract 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz' \
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
'9de56d4a161a723228220b0f425dc711'
'9de56d4a161a723228220b0f425dc711'
)
)
( name=gcc
( name=gcc version="$version_gcc"
dlextract 'http://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2' \
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
'87c24a4090c1577ba817ec6882602491'
'87c24a4090c1577ba817ec6882602491'
)
)
extrafile 'palemoon.desktop'
extrafile 'palemoon.desktop'
header_end
header_end
( cd 'autoconf-2.13'
( cd "autoconf-$version_autoconf"
./configure --prefix="$PWD/install" --program-suffix=-2.13
./configure --prefix="$PWD/install" --program-suffix=-$version_autoconf
make
make
make install
make install
)
)
( cd 'gcc-4.9.4'
( cd "gcc-$version_gcc"
sed -i -e 's/\.\/fixinc\.sh/-c true/' gcc/Makefile.in
mkdir build; cd build
mkdir build; cd build
../configure --prefix="$PWD/../install" --disable-bootstrap --enable-languages=c++
../configure --prefix="$PWD/../install" --disable-bootstrap --enable-languages=c++
make
make
@ -63,13 +66,6 @@ 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 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.
# The following section are my additions.
# Proper paths
ac_add_options --prefix="/$dir_prefix"
ac_add_options --bindir="/$dir_prefix/$dir_bindir"
ac_add_options --libdir="/$dir_prefix/$dir_libdir"
ac_add_options --includedir="/$dir_prefix/$dir_includedir"
ac_add_options --datadir="/$dir_prefix/$dir_datadir"
# Use system libraries (./configure --help | grep system)
# Use system libraries (./configure --help | grep system)
ac_add_options --with-system-nspr
ac_add_options --with-system-nspr
ac_add_options --with-system-libevent
ac_add_options --with-system-libevent
@ -91,22 +87,29 @@ ac_add_options --with-system-icu
$(option pulseaudio && echo ac_add_options --enable-pulseaudio || echo ac_add_options --disable-pulseaudio)
$(option pulseaudio && echo ac_add_options --enable-pulseaudio || echo ac_add_options --disable-pulseaudio)
EOF
EOF
PATH="$PWD/../autoconf-2.13/install/bin:$PWD/../gcc-4.9.4/install/bin:$PATH" \
# Build
PATH="$PWD/../autoconf-$version_autoconf/install/bin:$PWD/../gcc-$version_gcc/install/bin:$PATH" \
make -f client.mk build
make -f client.mk build
# Install
cd pmbuild
cd pmbuild
make DESTDIR="$dir_install" install
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 ../..
cd ../..
# Install icons
# Install icons
for x in 16 32 48; do
for x in 16 32 48; do
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/${x}x$x/apps"
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/${x}x$x/apps"
ln -s "/$dir_prefix/$dir_libdir/palemoon-$versi on/browser/chrome/icons/default/default$x.png" \
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"
"$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/${x}x$x/apps/palemoon.png"
done
done
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/128x128/apps"
mkdir -p "$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/128x128/apps"
ln -s "/$dir_prefix/$dir_libdir/palemoon-$versi on/browser/icons/mozicon128.png" \
ln -sf "/$dir_prefix/$dir_libdir/palemoon/browser/icons/mozicon128.png" \
"$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/128x128/apps/palemoon.png"
"$dir_install/$dir_prefix/$dir_datadir/icons/hicolor/128x128/apps/palemoon.png"
# Install desktop
# Install desktop