-
Notifications
You must be signed in to change notification settings - Fork 72
Building Linux x86_64 Third Party Dependencies
Pablo Tesone edited this page Nov 28, 2022
·
1 revision
export BUILD_DIR=$(pwd)
cd ${BUILD_DIR}
wget https://libsdl.org/release/SDL2-2.24.1.tar.gz
tar xvfz SDL2-2.24.1.tar.gz
cd SDL2-2.24.1
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure --prefix=${BUILD_DIR}
make install
cd ${BUILD_DIR}/lib
zip -y SDL2-2.24.1.zip libSDL2*.so*
wget https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz
tar xvfz libpng-1.6.37.tar.gz
cd libpng-1.6.37
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
cmake . -DCMAKE_PREFIX_PATH=${BUILD_DIR} -DCMAKE_INSTALL_PREFIX:PATH=${BUILD_DIR} \
-G 'Unix Makefiles'
make install
cd ${BUILD_DIR}/lib
zip -y libpng-1.6.37.zip libpng*.so*
wget https://zlib.net/fossils/zlib-1.2.11.tar.gz
tar xvfz zlib-1.2.11.tar.gz
cd zlib-1.2.11
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure --prefix=${BUILD_DIR}
make install
Required by freetype, it is included in the zip of freetype.
wget https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
tar xvfz bzip2-1.0.8.tar.gz
cd bzip2-1.0.8
# Patch needed for having a configure script
wget https://raw.githubusercontent.com/msys2/MINGW-packages/master/mingw-w64-bzip2/bzip2-buildsystem.all.patch
patch -p1 -i bzip2-buildsystem.all.patch
autoreconf -fi
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
CFLAGS=-fPIC \
./configure --prefix=${BUILD_DIR} --enable-shared
make install
It requires zlib, but it is using the system wide It requires bzip2 and we are including it in this zip.
wget https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.gz
tar xvfz freetype-2.12.1.tar.gz
cd freetype-2.12.1
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure --prefix=${BUILD_DIR} --enable-freetype-config --without-harfbuzz --without-brotli
make install
cd ${BUILD_DIR}/lib
zip -y freetype-2.12.1.zip libbz2.so* libfreetype.so*
It is required by fontconfig, and I will ship it with fontconfig.
wget https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.gz
tar xvfz expat-2.5.0.tar.gz
cd expat-2.5.0
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure --prefix=${BUILD_DIR} --enable-shared
make install
wget https://freedesktop.org/software/fontconfig/release/fontconfig-2.13.1.tar.gz
tar xvfz fontconfig-2.13.1.tar.gz
cd fontconfig-2.13.1
autoreconf -fi
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure \
--prefix=${BUILD_DIR} --disable-docs --disable-nls
#Do not build tests
sed -i 's,all-am: Makefile $(PROGRAMS),all-am:,' test/Makefile
make install
cd ${BUILD_DIR}/lib
zip -y fontconfig-2.13.1.zip libfontconfig.so* libexpat.so*
wget https://www.cairographics.org/releases/pixman-0.40.0.tar.gz
tar xvfz pixman-0.40.0.tar.gz
cd pixman-0.40.0
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure \
--prefix=${BUILD_DIR}
make install
cd ${BUILD_DIR}/lib
zip -y pixman-0.40.0.zip libpixman*.so*
wget https://cairographics.org/snapshots/cairo-1.17.4.tar.xz
tar xvf cairo-1.17.4.tar.xz
cd cairo-1.17.4
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure \
--prefix=${BUILD_DIR}
make install
cd ${BUILD_DIR}/lib
zip -y cairo-1.17.4.zip libcairo-2.dll
wget https://github.com/harfbuzz/harfbuzz/releases/download/5.3.1/harfbuzz-5.3.1.tar.xz
tar xvf harfbuzz-5.3.1.tar.xz
cd harfbuzz-5.3.1
PKG_CONFIG_PATH="${BUILD_DIR}/lib/pkgconfig" \
./configure --prefix=${BUILD_DIR} --with-glib=no --with-icu-no
make install
cd ${BUILD_DIR}/lib
zip -y harfbuzz-5.3.1.zip libharfbuzz.so*