Files
BMLFS/build-scripts/harfbuzz.build
2024-01-06 14:21:01 -06:00

59 lines
1.9 KiB
Bash

#! /bin/bash
# HarfBuzz
# Source: https://github.com/harfbuzz/harfbuzz/releases/download/8.3.0/harfbuzz-8.3.0.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: Glib, Graphite2, ICU, FreeType
# Optional: Cairo, gobject-introspection, GTK-Docs
# If optimizing, use these flags with GCC
export CFLAGS="-march=native -mtune=native -pipe "
export CFLAGS+="-O3 -falign-functions=32 -ffat-lto-objects -flto=4 "
export CFLAGS+="-fno-math-errno -fno-semantic-interposition -fno-trapping-math "
export CXXFLAGS=$CFLAGS
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
mkdir build && cd build &&
meson --prefix=/usr \
--buildtype=release \
-Dgraphite2=enabled \
-Dicu=enabled \
-Dfreetype=enabled \
-Dintrospection=enabled \
-Dtests=disabled
read -p "Compile?" && ninja -j2 &&
sudo -S DESTDIR=$BUILD ninja install &&
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------------------------------------------------------|
harfbuzz: harfbuzz (OpenType text shaping engine)
harfbuzz:
harfbuzz: HarfBuzz is an OpenType text shaping engine.
harfbuzz:
harfbuzz: http://www.freedesktop.org/software/harfbuzz/release
harfbuzz:
harfbuzz:
harfbuzz:
harfbuzz:
harfbuzz:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/harfbuzz-8.3.0-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*