From 0228bd6d8f5544c08b10f531513d44f6f01dacd1 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 21 Jan 2023 18:37:51 +0100 Subject: [PATCH] Add mingw-w64-ftgl --- ftgl/mingw-w64/.gitignore | 1 + ftgl/mingw-w64/PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 ftgl/mingw-w64/.gitignore create mode 100644 ftgl/mingw-w64/PKGBUILD diff --git a/ftgl/mingw-w64/.gitignore b/ftgl/mingw-w64/.gitignore new file mode 100644 index 00000000..da2717a1 --- /dev/null +++ b/ftgl/mingw-w64/.gitignore @@ -0,0 +1 @@ +ftgl \ No newline at end of file diff --git a/ftgl/mingw-w64/PKGBUILD b/ftgl/mingw-w64/PKGBUILD new file mode 100644 index 00000000..797db2f0 --- /dev/null +++ b/ftgl/mingw-w64/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Martchus + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +_pkgname=ftgl +pkgname=mingw-w64-$_pkgname +pkgver=2.4.0 +pkgrel=1 +pkgdesc='OpenGL library to use arbitrary fonts (mingw-w64)' +arch=('any') +url='https://github.com/frankheckenbach/ftgl' +license=('MIT') +depends=(mingw-w64-crt mingw-w64-freetype2) +makedepends=(mingw-w64-gcc mingw-w64-cmake git ninja) +options=(!strip !buildflags !libtool staticlibs) +_commit=483639219095ad080538e07ceb5996de901d4e74 # tags/v2.4.0 +source=("git+https://github.com/frankheckenbach/ftgl#commit=$_commit") +sha256sums=('SKIP') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +prepare() { + cd $_pkgname + git cherry-pick -n 835f2ba7911a6c15a1a314d5e3267fa089b5a319 +} + +build() { + for _arch in ${_architectures}; do + export PKG_CONFIG=/usr/bin/$_arch-pkg-config + $_arch-cmake -G Ninja -B build-$_arch -S $_pkgname + VERBOSE=1 cmake --build build-$_arch + done +} + +package() { + for _arch in ${_architectures}; do + DESTDIR="$pkgdir" cmake --install build-$_arch + install -Dm644 $_pkgname/COPYING -t "$pkgdir"/usr/share/licenses/$pkgname + + find "$pkgdir/usr/$_arch" -iname '*.exe' -exec $_arch-strip --strip-all {} \; + find "$pkgdir/usr/$_arch" -iname '*.dll' -exec $_arch-strip --strip-unneeded {} \; + find "$pkgdir/usr/$_arch" -iname '*.a' -exec $_arch-strip -g {} \; + done +}