#! /bin/bash # SDL2_ttf # Source: https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-2.22.0.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: SDL2, FreeType, Mesa, LibSM # Recommended: NONE # Optional: NONE # autotools build system is broken. Use CMake instead #./configure --prefix=/usr --sysconfdir=/etc $BUILDTRUPLE && #read -p "Compile?" && make -j2 && #sudo -S make DESTDIR=$BUILD install && cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DSDL2TTF_HARFBUZZ=ON read -p "Compile?" && cmake --build build && \ sudo DESTDIR=$BUILD cmake --install build && \ cd $BUILD && sudo -S mkdir -v ${BUILD}/install && cat > /tmp/slack-desc << "EOF" # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| SDL2_ttf: SDL2_ttf (SDL2 truetype font library) SDL2_ttf: SDL2_ttf: This is a sample library which allows you to use SDL2_ttf: TrueType fonts in your SDL applications. SDL2_ttf: SDL2_ttf: SDL2_ttf: SDL2_ttf: SDL2_ttf: SDL2_ttf: SDL2_ttf: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/SDL2_ttf-2.22.0-$PSUFFIX && sudo -S rm -rf ${BUILD}/*