contrib/fontforge/Pkgfile

37 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-02-17 09:38:00 +01:00
# Description: Outline and bitmap font editor.
# URL: https://fontforge.github.io/
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
# Depends on: giflib gtk3 libspiro libuninameslist libwebp potrace woff2
2019-02-17 09:38:00 +01:00
name=fontforge
2020-11-11 09:11:46 +01:00
version=20201107
2019-02-17 09:38:00 +01:00
release=1
2020-04-10 04:09:38 +02:00
source=(https://github.com/$name/$name/releases/download/$version/$name-$version.tar.xz)
2019-02-17 09:38:00 +01:00
build() {
2020-04-10 04:09:38 +02:00
if [ -e '/usr/lib/ccache' ]; then
2020-12-07 00:54:04 +01:00
PKGMK_FONTFORGE+=' -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_C_COMPILER_LAUNCHER=ccache'
2020-04-10 04:09:38 +02:00
PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')
fi
2019-02-17 09:38:00 +01:00
2020-11-08 12:10:17 +01: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 \
2020-12-07 00:54:04 +01:00
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
2020-11-08 12:10:17 +01:00
-D ENABLE_MAINTAINER_TOOLS=TRUE \
-D ENABLE_FONTFORGE_EXTRAS=TRUE \
-D UNIX=TRUE \
-D ENABLE_DOCS=FALSE \
-Wno-dev
2020-04-10 04:09:38 +02:00
2020-11-07 17:22:12 +01:00
sed -i 's|-R/usr/lib||g' build/build.ninja
2020-04-10 04:09:38 +02:00
2020-10-16 23:16:33 +02:00
sed -i 's!-R/usr/lib!!g' build/build.ninja
cmake --build build
2020-07-08 15:01:36 +02:00
DESTDIR=$PKG cmake --install build
2020-04-10 04:09:38 +02:00
rm -r $PKG/usr/share/locale
2019-02-17 09:38:00 +01:00
}