1
0
forked from ports/contrib

37 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-02-17 19:38:00 +11: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 19:38:00 +11:00
name=fontforge
2020-11-11 08:11:46 +00:00
version=20201107
2019-02-17 19:38:00 +11:00
release=1
2020-04-10 12:09:38 +10:00
source=(https://github.com/$name/$name/releases/download/$version/$name-$version.tar.xz)
2019-02-17 19:38:00 +11:00
build() {
2020-04-10 12:09:38 +10:00
if [ -e '/usr/lib/ccache' ]; then
2020-12-06 23:54:04 +00:00
PKGMK_FONTFORGE+=' -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_C_COMPILER_LAUNCHER=ccache'
2020-04-10 12:09:38 +10:00
PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')
fi
2019-02-17 19:38:00 +11:00
2020-11-08 11:10:17 +00: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-06 23:54:04 +00:00
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
2020-11-08 11:10:17 +00:00
-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
2020-11-07 16:22:12 +00:00
sed -i 's|-R/usr/lib||g' build/build.ninja
2020-04-10 12:09:38 +10:00
2020-10-16 21:16:33 +00:00
sed -i 's!-R/usr/lib!!g' build/build.ninja
cmake --build build
2020-07-08 13:01:36 +00:00
DESTDIR=$PKG cmake --install build
2020-04-10 12:09:38 +10:00
rm -r $PKG/usr/share/locale
2019-02-17 19:38:00 +11:00
}