2023-06-30 15:12:21 +02:00
|
|
|
# Description: Outline and bitmap font editor
|
2019-02-17 19:38:00 +11:00
|
|
|
# URL: https://fontforge.github.io/
|
2023-06-30 15:12:21 +02:00
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2019-08-09 22:34:46 +10:00
|
|
|
# Depends on: giflib gtk3 libspiro libuninameslist libwebp potrace woff2
|
2019-02-17 19:38:00 +11:00
|
|
|
|
|
|
|
name=fontforge
|
2023-01-03 13:15:30 +00:00
|
|
|
version=20230101
|
2023-06-30 15:12:21 +02:00
|
|
|
release=2
|
|
|
|
source=(https://github.com/$name/$name/releases/download/$version/$name-$version.tar.xz
|
|
|
|
fontforge-20230101-workaround-broken-translations.patch)
|
2019-02-17 19:38:00 +11:00
|
|
|
|
|
|
|
build() {
|
2023-06-30 15:12:21 +02:00
|
|
|
if [ -e '/usr/lib/ccache' ]; then
|
|
|
|
PKGMK_FONTFORGE+=' -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_C_COMPILER_LAUNCHER=ccache'
|
|
|
|
PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')
|
|
|
|
fi
|
2019-02-17 19:38:00 +11:00
|
|
|
|
2023-06-30 15:12:21 +02:00
|
|
|
patch -Np1 -d $name-$version -i $SRC/fontforge-20230101-workaround-broken-translations.patch
|
2020-04-10 12:09:38 +10:00
|
|
|
|
2023-06-30 15:12:21 +02:00
|
|
|
cmake -S $name-$version -B build -G Ninja $PKGMK_FONTFORGE \
|
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
|
|
-D ENABLE_MAINTAINER_TOOLS=TRUE \
|
|
|
|
-D ENABLE_FONTFORGE_EXTRAS=TRUE \
|
|
|
|
-D UNIX=TRUE \
|
|
|
|
-D ENABLE_DOCS=FALSE \
|
|
|
|
-Wno-dev
|
2020-04-10 12:09:38 +10:00
|
|
|
|
2023-06-30 15:12:21 +02:00
|
|
|
sed -i 's!-R/usr/lib!!g' build/build.ninja
|
2020-04-10 12:09:38 +10:00
|
|
|
|
2023-06-30 15:12:21 +02:00
|
|
|
cmake --build build
|
|
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
|
|
|
|
rm -r $PKG/usr/share/locale
|
2019-02-17 19:38:00 +11:00
|
|
|
}
|