Some packages (e.g. ttfautohint) rely on freetype-config for their configuration, so create a wrapper using pkg-config. Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
56 lines
1.5 KiB
Bash
56 lines
1.5 KiB
Bash
# Template file for 'freetype'
|
|
pkgname=freetype
|
|
version=2.9.1
|
|
revision=2
|
|
build_style=gnu-configure
|
|
hostmakedepends="pkg-config"
|
|
makedepends="bzip2-devel libpng-devel"
|
|
short_desc="Font rendering engine and library API"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://www.freetype.org/"
|
|
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
|
|
checksum=db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
|
|
|
|
build_options="v35 v38 v40"
|
|
build_options_default="v40"
|
|
desc_option_v35="Use default interpreter version 35 (Classic mode)"
|
|
desc_option_v38="Use default interpreter version 38 (Infinality mode)"
|
|
desc_option_v40="Use default interpreter version 40 (Minimal mode)"
|
|
vopt_conflict v35 v38
|
|
vopt_conflict v35 v40
|
|
vopt_conflict v38 v40
|
|
|
|
pre_configure() {
|
|
CFLAGS+=" -DDEFAULT_TT_INTERPRETER_VERSION=TT_INTERPRETER_VERSION_"
|
|
if [ "$build_option_v35" ]; then
|
|
CFLAGS+="35"
|
|
elif [ "$build_option_v38" ]; then
|
|
CFLAGS+="38"
|
|
elif [ "$build_option_v40" ]; then
|
|
CFLAGS+="40"
|
|
fi
|
|
}
|
|
|
|
post_build() {
|
|
# Create a legacy /usr/bin/freetype-config script
|
|
vmkdir usr/bin
|
|
cat >> "${DESTDIR}"/usr/bin/freetype-config <<EOF
|
|
#!/bin/sh
|
|
pkg-config "\$@" freetype2
|
|
EOF
|
|
chmod 755 "${DESTDIR}"/usr/bin/freetype-config
|
|
}
|
|
|
|
freetype-devel_package() {
|
|
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
for f in bin include share; do
|
|
vmove usr/${f}
|
|
done
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|