FreonLinux/build-extensions

1515 lines
26 KiB
Plaintext
Raw Normal View History

#!/bin/bash
# Build Freon Linux software from source.
2020-11-29 16:03:06 -08:00
# Version: 0.5.0
# (C) Chris Dorman, 2018-2020 GPLv3+
2020-11-29 16:03:06 -08:00
corecount="25"
#### Variables ###
# mirrors
mpfrmirror="https://ftp.gnu.org/gnu/mpfr"
mpcmirror="https://ftp.gnu.org/gnu/mpc"
gmpmirror="https://ftp.gnu.org/gnu/gmp"
binutilsmirror="https://ftp.gnu.org/gnu/binutils"
gccmirror="http://ftp.gnu.org/gnu/gcc/gcc-9.2.0"
nanomirror="https://www.nano-editor.org/dist/v3"
chttpdmirror="https://github.com/Pentium44/chttpd.git"
ftpmirror="https://github.com/Harlonxl/minFTPD.git"
2020-11-29 19:51:23 -08:00
harfbuzzmirror="https://github.com/harfbuzz/harfbuzz"
ncursesmirror="https://ftp.gnu.org/pub/gnu/ncurses"
bashmirror="https://ftp.gnu.org/gnu/bash"
zlibmirror="https://zlib.net"
termcapmirror="https://ftp.gnu.org/gnu/termcap"
2020-11-27 12:14:47 -08:00
htopmirror="https://github.com/htop-dev/htop/archive"
islmirror="http://isl.gforge.inria.fr"
2020-11-29 17:07:11 -08:00
irciimirror="http://ircii.warped.com"
opensslmirror="https://www.openssl.org/source"
2020-11-30 00:54:17 -08:00
xlibmirror="https://www.x.org/archive/individual/lib"
xcbmirror="https://www.x.org/archive/individual/xcb"
libbsdmirror="https://libbsd.freedesktop.org/releases"
bz2mirror="https://sourceware.org/pub/bzip2"
freetypemirror="https://download.savannah.gnu.org/releases/freetype"
png16mirror="https://download.sourceforge.net/libpng"
2020-11-29 21:55:09 -08:00
stracemirror="https://gitlab.com/strace/strace.git"
2020-11-29 22:09:07 -08:00
elfutilsmirror="git://sourceware.org/git/elfutils.git"
gtk2mirror="https://download.gnome.org/sources/gtk+/2.24"
2020-11-30 17:22:20 -08:00
netsurfmirror="http://download.netsurf-browser.org/netsurf/releases/source-full"
2020-11-30 17:30:35 -08:00
xfemirror="https://netactuate.dl.sourceforge.net/project/xfe/xfe/1.43.2"
2020-12-01 20:28:02 -08:00
pangomirror="https://download.gnome.org/sources/pango/1.42"
fontconfigmirror="https://www.freedesktop.org/software/fontconfig/release"
2020-11-30 20:58:54 -08:00
hexchatmirror="https://dl.hexchat.net/hexchat"
2020-11-30 22:11:38 -08:00
pcmanfmmirror="https://downloads.sourceforge.net/pcmanfm"
2020-11-30 23:52:45 -08:00
idnmirror="https://ftp.gnu.org/gnu/libidn"
2020-11-30 23:45:33 -08:00
lynxmirror="https://invisible-mirror.net/archives/lynx/tarballs"
2020-12-01 00:35:53 -08:00
expatmirror="https://github.com/libexpat/libexpat/releases/download/R_2_2_7"
utillinuxmirror="https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33"
2020-12-01 00:46:48 -08:00
foxmirror="ftp://ftp.fox-toolkit.org/pub"
2020-12-01 17:36:52 -08:00
glib2mirror="https://download.gnome.org/sources/glib/2.56"
cairomirror="https://www.cairographics.org/releases"
gdkpixbufmirror="http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.36"
atkmirror="http://ftp.gnome.org/pub/gnome/sources/atk/2.26"
gobjectintromirror="http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.54"
selinuxmirror="http://deb.debian.org/debian/pool/main/libs/libselinux"
ffimirror="https://sourceware.org/ftp/libffi"
pcremirror="https://downloads.sourceforge.net/pcre"
fmmirror="https://downloads.sourceforge.net/pcmanfm"
2020-12-01 19:26:02 -08:00
menucachemirror="https://downloads.sourceforge.net/lxde"
2020-12-01 19:44:45 -08:00
notifymirror="http://ftp.gnome.org/pub/gnome/sources/libnotify/0.7"
2020-12-01 20:37:54 -08:00
fribidimirror="https://github.com/fribidi/fribidi/releases/download/v1.0.1"
# filenames
gcc="gcc-9.2.0.tar.xz"
nano="nano-3.1.tar.xz"
ncurses="ncurses-6.1.tar.gz"
bash="bash-5.0.tar.gz"
zlib="zlib-1.2.11.tar.xz"
termcap="termcap-1.3.1.tar.gz"
htop="htop-2.2.0.tar.gz"
binutils="binutils-2.31.1.tar.xz"
gmp="gmp-6.1.2.tar.xz"
mpfr="mpfr-4.0.2.tar.xz"
mpc="mpc-1.1.0.tar.gz"
isl="isl-0.19.tar.xz"
2020-11-29 17:07:11 -08:00
ircii="ircii-20190117.tar.gz"
openssl="openssl-1.1.1h.tar.gz"
libbsd="libbsd-0.9.1.tar.xz"
bz2="bzip2-1.0.8.tar.gz"
freetype="freetype-2.10.4.tar.xz"
png16="libpng-1.6.37.tar.xz"
2020-11-30 19:14:30 -08:00
gtk2="gtk+-2.24.32.tar.xz"
2020-11-30 17:22:20 -08:00
netsurf="netsurf-all-3.10.tar.gz"
2020-12-01 00:26:39 -08:00
xcb="libxcb-1.13.tar.gz"
xcbutil="xcb-util-0.4.0.tar.gz"
xcbproto="xcb-proto-1.13.tar.gz"
2020-11-30 17:30:35 -08:00
xfe="xfe-1.43.2.tar.gz"
2020-12-01 20:28:02 -08:00
pango="pango-1.42.4.tar.xz"
fontconfig="fontconfig-2.13.1.tar.bz2"
2020-11-30 20:58:54 -08:00
hexchat="hexchat-2.12.4.tar.xz"
2020-11-30 22:11:38 -08:00
pcmanfm="pcmanfm-1.3.1.tar.xz"
2020-11-30 23:45:33 -08:00
lynx="lynx2.8.9rel.1.tar.gz"
2020-11-30 23:52:45 -08:00
idn="libidn-1.36.tar.gz"
2020-12-01 00:35:53 -08:00
expat="expat-2.2.7.tar.xz"
utillinux="util-linux-2.33.2.tar.xz"
2020-12-01 00:46:48 -08:00
fox="fox-1.6.57.tar.gz"
2020-12-01 17:36:52 -08:00
glib2="glib-2.56.4.tar.xz"
gobjectintro="gobject-introspection-1.54.1.tar.xz"
gdkpixbuf="gdk-pixbuf-2.36.11.tar.xz"
cairo="cairo-1.14.12.tar.xz"
pixman="pixman-0.34.0.tar.gz"
atk="atk-2.26.1.tar.xz"
2020-12-01 19:27:10 -08:00
pcre="pcre-8.43.tar.bz2"
2020-12-01 19:01:46 -08:00
selinux="libselinux_2.8.orig.tar.gz"
fm="libfm-1.2.5.tar.xz"
ffi="libffi-3.2.1.tar.gz"
2020-12-01 19:26:02 -08:00
menucache="menu-cache-1.1.0.tar.xz"
2020-12-01 19:44:45 -08:00
notify="libnotify-0.7.6.tar.xz"
2020-12-01 20:37:54 -08:00
fribidi="fribidi-1.0.1.tar.bz2"
# work directories
tmpdir="`pwd`/pkgsrc"
softwaredir="`pwd`/src/rootfs"
freondir="/freon"
2020-11-29 17:49:10 -08:00
systemdir="`pwd`/system"
# source directories
gccsrcdir=${gcc//.tar.xz}
nanosrcdir=${nano//.tar.xz}
ncursessrcdir=${ncurses//.tar.gz}
bashsrcdir=${bash//.tar.gz}
zlibsrcdir=${zlib//.tar.xz}
termcapsrcdir=${termcap//.tar.gz}
htopsrcdir=${htop//.tar.gz}
mpcsrcdir=${mpc//.tar.gz}
mpfrsrcdir=${mpfr//.tar.xz}
binutilssrcdir=${binutils//.tar.xz}
gmpsrcdir=${gmp//.tar.xz}
islsrcdir=${isl//.tar.xz}
2020-11-29 17:07:11 -08:00
irciisrcdir=${ircii//.tar.gz}
2020-11-29 17:30:18 -08:00
opensslsrcdir=${openssl//.tar.gz}
libbsdsrcdir=${libbsd//.tar.xz}
bz2srcdir=${bz2//.tar.gz}
freetypesrcdir=${freetype//.tar.xz}
png16srcdir=${png16//.tar.xz}
2020-11-29 20:34:23 -08:00
fontmiscsrcdir=${fontmisc//.tar.bz2}
font75dpisrcdir=${font75dpi//.tar.bz2}
font100dpisrcdir=${font100dpi//.tar.bz2}
2020-11-30 19:14:30 -08:00
gtk2srcdir=${gtk2//.tar.xz}
2020-11-30 17:30:35 -08:00
netsurfsrcdir=${netsurf//.tar.gz}
xfesrcdir=${xfe//.tar.gz}
pangosrcdir=${pango//.tar.xz}
fontconfigsrcdir=${fontconfig//.tar.bz2}
2020-11-30 20:58:54 -08:00
hexchatsrcdir=${hexchat//.tar.xz}
2020-11-30 22:11:38 -08:00
pcmanfmsrcdir=${pcmanfm//.tar.xz}
2020-11-30 23:46:55 -08:00
lynxsrcdir=${lynx//.tar.gz}
2020-11-30 23:52:45 -08:00
idnsrcdir=${idn//.tar.gz}
2020-12-01 00:26:39 -08:00
xcbsrcdir=${xcb//.tar.gz}
xcbutilsrcdir=${xcbutil//.tar.gz}
xcbprotosrcdir=${xcbproto//.tar.gz}
2020-12-01 00:40:06 -08:00
expatsrcdir=${expat//.tar.xz}
2020-12-01 00:35:53 -08:00
utillinuxsrcdir=${utillinux//.tar.xz}
2020-12-01 00:46:48 -08:00
foxsrcdir=${fox//.tar.gz}
2020-12-01 17:43:17 -08:00
glib2srcdir=${glib2//.tar.xz}
2020-12-01 17:36:52 -08:00
gdkpixbufsrcdir=${gdkpixbuf//.tar.xz}
cairosrcdir=${cairo//.tar.xz}
pixmansrcdir=${pixman//.tar.gz}
atksrcdir=${atk//.tar.xz}
gobjectintrosrcdir=${gobjectintro//.tar.xz}
ffisrcdir=${ffi//.tar.gz}
pcresrcdir=${pcre//.tar.bz2}
2020-12-01 19:03:29 -08:00
selinuxsrcdir=${selinux//.orig.tar.gz}
fmsrcdir=${fm//.tar.xz}
2020-12-01 19:26:02 -08:00
menucachesrcdir=${menucache//.tar.xz}
2020-12-01 19:44:45 -08:00
notifysrcdir=${notify//.tar.xz}
2020-12-01 20:37:54 -08:00
fribidisrcdir=${fribidi//.tar.bz2}
if [ ! -d "$tmpdir" ]; then
echo "Warning: package source directory not found, creating."
mkdir $tmpdir > /dev/null 2>&1
fi
bash()
{
cd $tmpdir
# Downloading TCC source
if [ ! -f "$bash" ]; then
echo "Downloading bash sources..."
wget $bashmirror/$bash
tar -xf $bash
fi
cd $bashsrcdir
./configure --prefix=$freondir --without-bash-malloc
make -j$corecount
make install
cd ..
}
gcc()
{
cd $tmpdir
# Downloading GCC source
if [ ! -f "$gcc" ]; then
echo "Downloading GCC sources..."
wget $gccmirror/$gcc
tar -xf $gcc
fi
cd $gccsrcdir
mkdir -v build
cd build
SED=sed
../configure --prefix=$freondir \
--enable-languages=c,c++ \
--disable-multilib \
--disable-bootstrap \
--with-system-zlib
# Compile
make -j$corecount
make install
cd $softwaredir
if [ ! -d "freon-ext" ]; then
mkdir freon-ext
fi
cd freon-ext
cp -a $freondir/. .
rm lib/*.a
rm lib64/*.a
cd $tmpdir
}
htop()
{
cd $tmpdir
# Downloading TCC source
if [ ! -f "$htop" ]; then
echo "Downloading htop sources..."
2020-11-27 12:14:47 -08:00
wget $htopmirror/2.2.0.tar.gz
mv 2.2.0.tar.gz $htop
tar -xf $htop
fi
# Configure TCC
cd $htopsrcdir
2020-11-27 12:25:56 -08:00
./autogen.sh
./configure --prefix=$freondir
# Compile
make -j20
make install
cd ..
}
termcap()
{
cd $tmpdir
# Downloading termcap source
if [ ! -f "$termcap" ]; then
echo "Downloading termcap sources..."
wget $termcapmirror/$termcap
tar -xf $termcap
fi
# Configure TCC
cd $termcapsrcdir
./configure --prefix=$freondir --with-shared --without-normal
# Compile
make -j20
make install
cd ..
}
nano()
{
cd $tmpdir
# Downloading nano source
if [ ! -f "$nano" ]; then
echo "Downloading nano editor sources..."
wget $nanomirror/$nano
tar -xf $nano
fi
# Confingure
cd $nanosrcdir
./configure --prefix=$freondir
# Compile
make -j20
make install
cd ..
}
ncurses()
{
cd $tmpdir
# Downloading nano source
if [ ! -f "$ncurses" ]; then
echo "Downloading ncurses sources..."
wget $ncursesmirror/$ncurses
tar -xf $ncurses
fi
# Configure
cd $ncursessrcdir
./configure --prefix=$freondir \
--with-shared \
--without-debug \
--without-normal \
--enable-widec
# Compile
make -j$corecount
make install
make distclean
2020-11-27 13:45:24 -08:00
./configure --prefix=$freondir \
--with-shared \
--without-normal \
--without-debug \
--without-cxx-binding \
--with-abi-version=5 \
2020-11-27 14:06:48 -08:00
--with-versioned-syms
make sources libs
2020-11-27 13:45:24 -08:00
cp -av lib/lib*.so.5* $freondir/lib
2020-11-27 13:45:24 -08:00
cd $freondir/lib
2020-11-27 14:06:48 -08:00
ln -s libncursesw.so.6 libtinfo.so.6
ln -s libtinfo.so.6 libtinfo.so
ln -s libncurses.so.5 libtinfo.so.5
2020-11-27 13:45:24 -08:00
ln -s libtinfo.so.5 libtinfo.so
2020-11-27 13:45:24 -08:00
ln -s libncursesw.so.6 libncursesw.so.5
cd $tmpdir
}
binutils()
{
cd $tmpdir
# Downloading binutils sources
if [ ! -f "$binutils" ]; then
echo "Downloading binutils sources..."
wget $binutilsmirror/$binutils
tar -xf $binutils
fi
# Configure Binutils
if [ ! -d "${binutilssrcdir}-build" ]; then
mkdir ${binutilssrcdir}-build
fi
cd ${binutilssrcdir}-build
../$binutilssrcdir/configure --prefix=$freondir --enable-shared
make tooldir=$freondir -j$corecount
make tooldir=$freondir install
cp -v ../$binutilssrcdir/include/libiberty.h $freondir/include
cd $tmpdir
}
mpc()
{
cd $tmpdir
# Download sources
if [ ! -f "$mpc" ]; then
echo "Downloading GNU mpc sources..."
wget $mpcmirror/$mpc
tar -xf $mpc
fi
cd $mpcsrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
}
mpfr()
{
cd $tmpdir
# Download sources
if [ ! -f "$mpfr" ]; then
echo "Downloading GNU mpfr sources..."
wget $mpfrmirror/$mpfr
tar -xf $mpfr
fi
# Configure and compile
cd $mpfrsrcdir
./configure --prefix=$freondir --disable-static --enable-thread-safe
make -j$corecount
make install
cd ..
}
gmp()
{
cd $tmpdir
# Download sources
if [ ! -f "$gmp" ]; then
echo "Downloading GNU gmp sources..."
wget $gmpmirror/$gmp
tar -xf $gmp
fi
# Configure and compile
cd $gmpsrcdir
./configure --prefix=$freondir --disable-static --enable-cxx
make -j$corecount
make install
cd ..
}
ftp()
{
cd $tmpdir
if [ ! -d "minFTPD" ]; then
git clone $ftpmirror
fi
cd minFTPD
make -j20
cp minFTPD ../../src/rootfs/sbin/
cp miniFTPD.conf ../../src/rootfs/etc/
cd $tmpdir
}
isl()
{
cd $tmpdir
# Download sources
if [ ! -f "$isl" ]; then
echo "Downloading ISL sources..."
wget $islmirror/$isl
tar -xf $isl
fi
# Configure and compile
cd $islsrcdir
./configure --prefix=$freondir
make -j$corecount
make install
cd ..
}
2020-11-29 16:03:06 -08:00
# IRC clients / servers
2020-11-29 17:07:11 -08:00
# Because why not! :D / BitchX has pissed me off
ircii()
2020-11-29 16:03:06 -08:00
{
cd $tmpdir
2020-11-29 17:07:11 -08:00
# Grab latest sources ircII
if [ ! -d $irciisrcdir ]; then
wget $irciimirror/$ircii
tar -xf $ircii
2020-11-29 16:03:06 -08:00
fi
2020-11-29 17:07:11 -08:00
cd $irciisrcdir
2020-11-29 16:15:31 -08:00
# Configure and build + install
./configure --prefix=$freondir
make -j20
make install
2020-11-29 16:03:06 -08:00
cd $tmpdir
}
# OpenSSL, needed for ircii TLS/SSL, and probably a bit more packages in the future.
openssl()
{
cd $tmpdir
# Grab latest sources ircII
if [ ! -d $opensslsrcdir ]; then
wget $opensslmirror/$openssl
tar -xf $openssl
fi
cd $opensslsrcdir
2020-11-29 17:32:17 -08:00
./config --prefix=$freondir \
--openssldir=$freondir/etc/ssl \
--libdir=lib \
shared \
zlib-dynamic
make -j$corecount
make install
cd $tmpdir
}
2020-11-29 17:49:10 -08:00
# DVTM ~ Dynamic virtual terminal manager
dvtm()
{
cd $systemdir/dvtm
make -j$corecount
make install
cd $tmpdir
}
# Xfbdev dependencies
2020-11-30 19:14:30 -08:00
xlibs()
{
cd $tmpdir
cat > xlibs.md5 << "EOF"
ce2fb8100c6647ee81451ebe388b17ad xtrans-1.4.0.tar.bz2
f46572566e2cec801609d25f735285b7 libX11-1.7.0.tar.bz2
f5b48bb76ba327cd2a8dc7a383532a95 libXext-1.3.4.tar.bz2
4e1196275aa743d6ebd3d3d5ec1dff9c libFS-1.0.8.tar.bz2
76d77499ee7120a56566891ca2c0dbcf libICE-1.0.10.tar.bz2
87c7fad1c1813517979184c8ccd76628 libSM-1.2.3.tar.bz2
eeea9d5af3e6c143d0ea1721d27a5e49 libXScrnSaver-1.2.3.tar.bz2
a9019421d3ee8b4937b6afd9025f018a libXt-1.2.0.tar.bz2
ac774cff8b493f566088a255dbf91201 libXmu-1.1.3.tar.bz2
6f0ecf8d103d528cfc803aa475137afa libXpm-3.5.13.tar.bz2
e5e06eb14a608b58746bdd1c0bd7b8e3 libXaw-1.0.13.tar.bz2
07e01e046a0215574f36a3aacb148be0 libXfixes-5.0.3.tar.bz2
3fa0841ea89024719b20cd702a9b54e0 libXcomposite-0.4.5.tar.bz2
802179a76bded0b658f4e9ec5e1830a4 libXrender-0.9.10.tar.bz2
9b9be0e289130fb820aedf67705fc549 libXcursor-1.2.0.tar.bz2
e3f554267a7a04b042dc1f6352bd6d99 libXdamage-1.1.5.tar.bz2
6447db6a689fb530c218f0f8328c3abc libfontenc-1.1.4.tar.bz2
2020-11-30 19:36:18 -08:00
16eaf156edd79b68038b6a7c44aa9e9b libXfont-1.5.4.tar.bz2
2020-11-30 19:14:30 -08:00
4a433c24627b4ff60a4dd403a0990796 libXft-2.3.3.tar.bz2
62c4af0839072024b4b1c8cbe84216c7 libXi-1.7.10.tar.bz2
0d5f826a197dae74da67af4a9ef35885 libXinerama-1.1.4.tar.bz2
18f3b20d522f45e4dadd34afb5bea048 libXrandr-1.5.2.tar.bz2
5d6d443d1abc8e1f6fc1c57fb27729bb libXres-1.2.0.tar.bz2
ef8c2c1d16a00bd95b9fdcef63b8a2ca libXtst-1.2.3.tar.bz2
210b6ef30dda2256d54763136faa37b9 libXv-1.0.11.tar.bz2
3569ff7f3e26864d986d6a21147eaa58 libXvMC-1.0.12.tar.bz2
0ddeafc13b33086357cfa96fae41ee8e libXxf86dga-1.1.5.tar.bz2
298b8fff82df17304dfdb5fe4066fe3a libXxf86vm-1.1.4.tar.bz2
d2f1f0ec68ac3932dd7f1d9aa0a7a11c libdmx-1.1.4.tar.bz2
b34e2cbdd6aa8f9cc3fa613fd401a6d6 libpciaccess-0.16.tar.bz2
dd7e1e946def674e78c0efbc5c7d5b3b libxkbfile-1.1.0.tar.bz2
42dda8016943dc12aff2c03a036e0937 libxshmfence-1.3.tar.bz2
EOF
2020-11-30 19:37:49 -08:00
if [ ! -d xlibs ]; then
mkdir xlibs
fi
cd xlibs
2020-11-30 19:14:30 -08:00
grep -v '^#' ../xlibs.md5 | awk '{print $2}' | wget -i- -c \
2020-11-30 19:15:28 -08:00
-B $xlibmirror/ &&
2020-11-30 19:14:30 -08:00
md5sum -c ../xlibs.md5
for package in $(grep -v '^#' ../xlibs.md5 | awk '{print $2}')
do
packagedir=${package%.tar.bz2}
tar -xf $package
2020-11-30 19:25:47 -08:00
config_var="--prefix=$freondir --enable-shared"
cd $packagedir
2020-11-30 19:14:30 -08:00
case $packagedir in
libICE* )
./configure $config_var ICE_LIBS=-lpthread
2020-11-30 19:25:47 -08:00
make -j$corecount
make install
2020-11-30 19:14:30 -08:00
;;
libXfont2-[0-9]* )
./configure $config_var --disable-devel-docs
2020-11-30 19:25:47 -08:00
make -j$corecount
make install
2020-11-30 19:14:30 -08:00
;;
libXt-[0-9]* )
./configure $config_var \
--with-appdefaultdir=$freondir/etc/X11/app-defaults
2020-11-30 19:25:47 -08:00
make -j$corecount
make install
2020-11-30 19:14:30 -08:00
;;
* )
./configure $config_var
2020-11-30 19:25:47 -08:00
make -j$corecount
make install
2020-11-30 19:14:30 -08:00
;;
2020-11-30 19:20:40 -08:00
esac
2020-11-30 19:27:40 -08:00
cd ..
2020-11-30 19:20:40 -08:00
done
2020-11-30 00:47:57 -08:00
}
#last dep for X
2020-11-30 19:36:18 -08:00
xcb()
{
cd $tmpdir
# Grab latest sources for freetype
2020-11-30 19:36:18 -08:00
if [ ! -d $xcbsrcdir ]; then
wget $xcbmirror/$xcb
tar -xf $xcb
fi
2020-11-30 19:36:18 -08:00
cd $xcbsrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
2020-11-30 19:14:30 -08:00
cd $tmpdir
2020-12-01 00:26:39 -08:00
# Grab latest sources for freetype
if [ ! -d $xcbutilsrcdir ]; then
wget $xcbmirror/$xcbutil
tar -xf $xcbutil
fi
cd $xcbutilsrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
# Grab latest sources for freetype
if [ ! -d $xcbprotosrcdir ]; then
wget $xcbmirror/$xcbproto
tar -xf $xcbproto
fi
cd $xcbprotosrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
}
2020-11-30 19:36:18 -08:00
libbsd()
{
cd $tmpdir
# Grab latest sources for freetype
2020-11-30 19:36:18 -08:00
if [ ! -d $libbsdsrcdir ]; then
wget $libbsdmirror/$libbsd
tar -xf $libbsd
fi
2020-11-30 19:36:18 -08:00
cd $libbsdsrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
2020-11-30 19:36:18 -08:00
cd $tmpdir
}
png16()
{
cd $tmpdir
# Grab latest sources for freetype
if [ ! -d $png16srcdir ]; then
wget $png16mirror/$png16
tar -xf $png16
fi
cd $png16srcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
}
bz2()
{
cd $tmpdir
# Grab latest sources bzip2
if [ ! -d $bz2srcdir ]; then
wget $bz2mirror/$bz2
tar -xf $bz2
fi
cd $bz2srcdir
make -f Makefile-libbz2_so
make clean
make -j$corecount
make PREFIX=$freondir install
cp bzip2-shared $freondir/bin/bzip2
cp -a libbz2.so* $freondir/lib
cd $freondir/lib
ln -s libbz2.so.* libbz2.so
cd $tmpdir
}
fontconfig()
{
cd $tmpdir
# Grab latest sources font config
if [ ! -d $fontconfigsrcdir ]; then
wget $fontconfigmirror/$fontconfig
tar -xf $fontconfig
fi
cd $fontconfigsrcdir
2020-11-30 20:40:44 -08:00
./configure --prefix=$freondir \
--sysconfdir=$freondir/etc \
--localstatedir=$freondir/var \
--disable-docs \
make -j$corecount
make install
cd $tmpdir
}
pango()
{
cd $tmpdir
# Grab latest sources for libpango
if [ ! -d $pangosrcdir ]; then
wget $pangomirror/$pango
tar -xf $pango
fi
cd $pangosrcdir
2020-12-01 20:31:53 -08:00
./configure --prefix=$freondir
2020-11-30 20:47:26 -08:00
2020-12-01 20:31:53 -08:00
make -j$corecount
2020-12-01 20:28:02 -08:00
2020-12-01 20:31:53 -08:00
make install
cd $tmpdir
}
2020-12-01 20:37:54 -08:00
fribidi()
{
cd $tmpdir
# Grab latest sources for libfribidi
if [ ! -d $fribidisrcdir ]; then
wget $fribidimirror/$fribidi
tar -xf $fribidi
fi
cd $fribidisrcdir
./configure --prefix=$freondir
make -j$corecount
make install
cd $tmpdir
}
freetype()
{
cd $tmpdir
# Grab latest sources for freetype
if [ ! -d $freetypesrcdir ]; then
wget $freetypemirror/$freetype
tar -xf $freetype
fi
cd $freetypesrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
}
2020-11-29 19:51:23 -08:00
harfbuzz()
{
cd $tmpdir
if [ ! -d "harfbuzz" ]; then
git clone $harfbuzzmirror
fi
cd harfbuzz
2020-11-29 19:56:03 -08:00
./autogen.sh
2020-11-29 19:51:23 -08:00
./configure --prefix=$freondir \
--disable-static \
--enable-shared \
--without-gobject \
--without-graphite2 \
--without-glib \
--without-icu \
--without-cairo
make -j20
make install
cd $tmpdir
}
2020-11-29 20:34:23 -08:00
fixedfonts()
{
2020-11-30 01:28:30 -08:00
cd $systemdir/fonts
2020-11-29 20:34:23 -08:00
2020-11-30 01:34:48 -08:00
mkdir -p $freondir/lib/X11/fonts
2020-11-29 20:34:23 -08:00
2020-11-30 01:28:30 -08:00
cp -a * $freondir/lib/X11/fonts
2020-11-29 20:34:23 -08:00
cd ..
}
# TinyX Xfbdev ~ Nonaccelerated X server for simple GUI possibilities
# Freon Linux. Really can't believe it still compiles but yeah :D
2020-11-29 19:51:23 -08:00
tinyx()
{
cd $systemdir/tinyx
2020-11-29 18:58:51 -08:00
./autogen.sh
2020-11-29 19:51:23 -08:00
./configure --prefix=$freondir --disable-static --enable-shared
# Here we will have to disable build for Xvesa, only Xfbdev
2020-11-29 19:00:49 -08:00
cp ../../files/kdrive.config include/kdrive-config.h
make -j$corecount
make install
$tmpdir
}
2020-11-30 17:22:20 -08:00
# X11 applications
2020-11-30 01:06:33 -08:00
rxvt()
{
cd $systemdir/rxvt
./configure --prefix=$freondir
make -j$corecount
make install
cd $tmpdir
}
2020-11-30 00:29:33 -08:00
jwm()
{
cd $systemdir/jwm
./configure --prefix=$freondir \
--disable-cairo \
--disable-rsvg \
--disable-jpeg \
--disable-fribidi \
--disable-shape \
make -j$corecount
make install
cd $tmpdir
}
2020-11-30 17:22:20 -08:00
# We'll get there
tazweb()
{
cd $systemdir/tazweb
make -j$corecount
make install
cd $tmpdir
}
2020-11-30 19:50:13 -08:00
lostirc()
{
cd $systemdir/lostirc
./configure --prefix=$freondir
make -j$corecount
make install
cd $tmpdir
}
2020-11-30 22:11:38 -08:00
pcmanfm()
{
cd $tmpdir
# Grab sources for PCManFM
if [ ! -d $pcmanfmsrcdir ]; then
wget $pcmanfmmirror/$pcmanfm
tar -xf $pcmanfm
fi
cd $pcmanfmsrcdir
./configure --prefix=$freondir \
2020-12-01 19:44:45 -08:00
--sysconfdir=$freondir/etc
make -j$corecount
make install
cd $tmp
}
notify()
{
cd $tmpdir
# Grab sources for PCManFM
if [ ! -d $notifysrcdir ]; then
wget $notifymirror/$notify
tar -xf $notify
fi
cd $notifysrcdir
2020-12-01 19:49:33 -08:00
sed -e 's/2.90/2.24/' -e 's/gtk+-3.0/gtk+-2.0/' -i configure.ac
autoreconf -fi
2020-12-01 19:44:45 -08:00
./configure --prefix=$freondir \
--disable-static
2020-11-30 22:11:38 -08:00
make -j$corecount
make install
cd $tmp
}
2020-11-30 23:45:33 -08:00
lynx()
2020-11-30 23:41:15 -08:00
{
cd $tmpdir
2020-11-30 23:45:33 -08:00
# Grab sources for Lynx
if [ ! -d $lynxsrcdir ]; then
wget $lynxmirror/$lynx
tar -xf $lynx
2020-11-30 23:41:15 -08:00
fi
2020-11-30 23:48:07 -08:00
cd $lynxsrcdir
2020-11-30 23:41:15 -08:00
./configure --prefix=$freondir
make -j$corecount
make install
cd $tmpdir
}
2020-12-01 17:36:52 -08:00
glib2()
{
cd $tmpdir
2020-12-01 17:43:17 -08:00
# Grab sources for libglib2
2020-12-01 17:36:52 -08:00
if [ ! -d $glib2srcdir ]; then
wget $glib2mirror/$glib2
tar -xf $glib2
fi
cd $glib2srcdir
if [ ! -d "make-glib" ]; then
mkdir make-glib
cd make-glib
2020-12-01 17:40:02 -08:00
else
2020-12-01 17:36:52 -08:00
cd make-glib
fi
meson --prefix=$freondir -Dwith-pcre=no -Dwith-docs=no .. &&
ninja
ninja install
2020-12-01 18:21:54 -08:00
cd $freondir/lib/x86_64-linux-gnu
mv * ../
cd ../
rm -r x86_64-linux-gnu
2020-12-01 17:36:52 -08:00
cd $tmpdir
}
atk()
{
cd $tmpdir
# Grab sources for libexpat
if [ ! -d $atksrcdir ]; then
wget $atkmirror/$atk
tar -xf $atk
fi
cd $atksrcdir
if [ ! -d "make-atk" ]; then
mkdir make-atk
cd make-atk
2020-12-01 17:40:02 -08:00
else
2020-12-01 17:36:52 -08:00
cd make-atk
fi
meson --prefix=$freondir .. &&
ninja
ninja install
cd $tmpdir
}
cairo()
{
cd $tmpdir
# Grab sources for cairo
if [ ! -d $cairosrcdir ]; then
wget $cairomirror/$cairo
tar -xf $cairo
fi
cd $cairosrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
}
2020-12-01 19:26:02 -08:00
menu-cache()
{
cd $tmpdir
# Grab sources for libmenu-cache
if [ ! -d $menucachesrcdir ]; then
wget $menucachemirror/$menucache
tar -xf $menucache
fi
cd $menucachesrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
}
2020-12-01 17:36:52 -08:00
pixman()
{
cd $tmpdir
# Grab sources for pixman
if [ ! -d $pixmansrcdir ]; then
wget $cairomirror/$pixman
tar -xf $pixman
fi
cd $pixmansrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
}
gobject-intro()
{
cd $tmpdir
# Grab sources for gobject introspect
if [ ! -d $gobjectintrosrcdir ]; then
wget $gobjectintromirror/$gobjectintro
tar -xf $gobjectintro
fi
cd $gobjectintrosrcdir
2020-12-01 18:10:57 -08:00
./configure --prefix=$freondir --disable-static --with-python=python3
2020-12-01 17:36:52 -08:00
make -j$corecount
make install
cd $tmpdir
}
gdk-pixbuf()
{
cd $tmpdir
# Grab sources for libexpat
if [ ! -d $gdkpixbufsrcdir ]; then
wget $gdkpixbufmirror/$gdkpixbuf
tar -xf $gdkpixbuf
fi
cd $gdkpixbufsrcdir
./configure --prefix=$freondir --with-x11
make -j$corecount
make install
cd $tmpdir
}
2020-12-01 00:35:53 -08:00
expat()
{
cd $tmpdir
# Grab sources for libexpat
if [ ! -d $expatsrcdir ]; then
wget $expatmirror/$expat
tar -xf $expat
fi
cd $expatsrcdir
./configure --prefix=$freondir
make -j$corecount
make install
cd $tmpdir
}
util-linux()
{
cd $tmpdir
# Grab sources for util-linux
if [ ! -d $utillinuxsrcdir ]; then
wget $utillinuxmirror/$utillinux
tar -xf $utillinux
fi
cd $utillinuxsrcdir
./configure --prefix=$freondir \
--without-python \
--disable-makeinstall-chown \
--without-systemdsystemunitdir \
--without-ncurses
make -j$corecount
make install
cd $tmpdir
}
pcre()
{
cd $tmpdir
# Grab sources for pcre
if [ ! -d $pcresrcdir ]; then
wget $pcremirror/$pcre
tar -xf $pcre
fi
cd $pcresrcdir
./configure --prefix=$freondir \
--docdir=$freondir/share/doc/pcre-8.41 \
--enable-unicode-properties \
--enable-pcre16 \
--enable-pcre32 \
--enable-pcregrep-libz \
--enable-pcregrep-libbz2 \
--disable-static
make -j$corecount
make install
cd $tmpdir
}
ffi()
{
cd $tmpdir
# Grab sources for libffi
if [ ! -d $ffisrcdir ]; then
wget $ffimirror/$ffi
tar -xf $ffi
fi
cd $ffisrcdir
./configure --prefix=$freondir --disable-static
make -j$corecount
make install
cd $tmpdir
}
selinux()
{
cd $tmpdir
# Grab sources for libidn
2020-12-01 19:08:22 -08:00
if [ ! -d libselinux-2.8 ]; then
wget $selinuxmirror/$selinux
tar -xf $selinux
fi
2020-12-01 19:08:22 -08:00
cd libselinux-2.8
2020-12-01 19:08:22 -08:00
make PREFIX=$freondir -j$corecount
2020-12-01 19:08:22 -08:00
make PREFIX=$freondir install
cd $tmpdir
}
2020-11-30 23:52:45 -08:00
idn()
{
cd $tmpdir
# Grab sources for libidn
2020-11-30 23:52:45 -08:00
if [ ! -d $idnsrcdir ]; then
wget $idnmirror/$idn
tar -xf $idn
fi
cd $idnsrcdir
./configure --prefix=$freondir
make -j$corecount
make install
cd $tmpdir
}
libfm()
{
cd $tmpdir
# Grab sources for libfm
if [ ! -d $fmsrcdir ]; then
wget $fmmirror/$fm
tar -xf $fm
fi
cd $fmsrcdir
./configure --prefix=$freondir \
--sysconfdir=$freondir/etc \
--disable-static
make -j$corecount
2020-11-30 23:52:45 -08:00
make install
cd $tmpdir
}
2020-11-30 20:58:54 -08:00
hexchat()
{
cd $tmpdir
# Grab sources for hexchat
if [ ! -d $hexchatsrcdir ]; then
wget $hexchatmirror/$hexchat
tar -xf $hexchat
fi
cd $hexchatsrcdir
./autogen.sh
2020-11-30 22:11:38 -08:00
./configure --prefix=$freondir --disable-python --disable-lua --disable-perl
2020-11-30 20:58:54 -08:00
make
make install
cd $tmpdir
}
2020-11-30 19:14:30 -08:00
gtk2()
2020-11-30 17:22:20 -08:00
{
cd $tmpdir
2020-11-30 20:58:54 -08:00
# Grab latest sources for gtk2
2020-11-30 19:14:30 -08:00
if [ ! -d $gtk2srcdir ]; then
wget $gtk2mirror/$gtk2
tar -xf $gtk2
2020-11-30 17:22:20 -08:00
fi
2020-11-30 19:14:30 -08:00
cd $gtk2srcdir
2020-11-30 17:22:20 -08:00
2020-11-30 19:14:30 -08:00
./configure --prefix=$freondir --sysconfdir=$freondir/etc
2020-11-30 17:22:20 -08:00
make -j$corecount
make install
cd $tmpdir
2020-11-30 17:30:35 -08:00
}
2020-11-30 17:22:20 -08:00
netsurf()
{
cd $tmpdir
# Grab latest sources for freetype
if [ ! -d $netsurfsrcdir ]; then
wget $netsurfmirror/$netsurf
tar -xf $netsurf
fi
cd $netsurfsrcdir
cat > env.sh <<'EOF'
#!/bin/sh
export PKG_CONFIG_PATH=/freon/lib/pkgconfig::
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/freon/lib
export PREFIX=/freon
EOF
chmod +x env.sh
./env.sh
make -j$corecount install
cd $tmpdir
}
# Beginning of debug too builds... not complete
2020-11-29 21:40:06 -08:00
strace()
{
2020-11-29 21:55:09 -08:00
cd $tmpdir
2020-11-29 21:40:06 -08:00
if [ ! -d "strace" ]; then
git clone $stracemirror
fi
cd strace
2020-11-29 22:07:32 -08:00
./build_static_example.sh
2020-11-29 21:40:06 -08:00
./configure --prefix=$freondir
make -j$corecount
make install
cd $tmpdir
}
2020-11-29 22:07:32 -08:00
elfutils()
{
cd $tmpdir
if [ ! -d "elfutils" ]; then
git clone $elfutilsmirror
fi
cd elfutils
./configure --prefix=$freondir --disable-static --enable-shared
make
make install
cd $tmpdir
}
2020-12-01 00:46:48 -08:00
fox()
{
cd $tmpdir
# Grab sources for libfox
if [ ! -d $foxsrcdir ]; then
wget $foxmirror/$fox
tar -xf $fox
fi
cd $foxsrcdir
2020-12-01 00:50:42 -08:00
./configure --prefix=$freondir \
--with-opengl=no \
--disable-jpeg \
--disable-tiff
2020-12-01 00:46:48 -08:00
make -j$corecount
make install
cd $tmpdir
}
case $1 in
all ) echo "Building all!"
2020-11-29 17:49:10 -08:00
ncurses; nano; chttpd; gmp; mpfr; binutils; mpc; gcc; bash; isl; termcap; ircii; openssl; dvtm;;
packages ) echo "Building useful essentials..."
2020-11-29 17:07:11 -08:00
ncurses; nano; bash; termcap;;
* ) echo "Building $1..."
$1;;
esac