mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-06 11:02:53 +00:00
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
#! /bin/bash
|
|
|
|
# WOFF2
|
|
# Source: https://github.com/google/woff2/archive/v1.0.2/woff2-1.0.2.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: Brotli, CMake
|
|
# Recommended: NONE
|
|
# Optional: NONE
|
|
|
|
# If coptimizing with GCC:
|
|
export CFLAGS="-march=native -pipe "
|
|
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
|
|
export CXXFLAGS=$CFLAGS
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
mkdir out &&
|
|
cd out &&
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release .. &&
|
|
read -p "Compile?" && make -j2 &&
|
|
|
|
sudo -S make DESTDIR=$BUILD 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------------------------------------------------------|
|
|
woff2: woff2 (WOFF File Format 2.0 library)
|
|
woff2:
|
|
woff2: WOFF2 is the Web Open Font Format 2 reference implementation.
|
|
woff2: See also: https://www.w3.org/TR/WOFF2/
|
|
woff2:
|
|
woff2: Homepage: https://github.com/google/woff2
|
|
woff2:
|
|
woff2:
|
|
woff2:
|
|
woff2:
|
|
woff2:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/woff2-1.0.2-$(uname -m)-mlfs.txz &&
|
|
sudo -S rm -rf ${BUILD}/*
|