PKGBUILDs/freetype2/mingw-w64/PKGBUILD

73 lines
2.6 KiB
Bash
Raw Normal View History

2015-11-30 21:17:01 +01:00
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
2015-11-30 21:17:01 +01:00
pkgname=mingw-w64-freetype2
2020-12-29 20:21:49 +01:00
pkgver=2.10.4
2016-02-11 16:09:33 +01:00
pkgrel=1
2017-05-20 15:53:34 +02:00
pkgdesc='Font rasterization library (mingw-w64)'
2015-11-30 21:17:01 +01:00
arch=('any')
2017-05-20 15:53:34 +02:00
url='https://www.freetype.org/'
2015-11-30 21:17:01 +01:00
license=('GPL')
2016-07-12 17:36:14 +02:00
depends=(mingw-w64-crt mingw-w64-zlib mingw-w64-bzip2)
2015-11-30 21:17:01 +01:00
makedepends=(mingw-w64-gcc mingw-w64-configure)
2016-07-12 17:36:14 +02:00
provides=(mingw-w64-freetype)
replaces=(mingw-w64-freetype)
conflicts=(mingw-w64-freetype)
2015-11-30 21:17:01 +01:00
options=(!strip !buildflags !libtool staticlibs)
2020-12-29 20:21:49 +01:00
source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz{,.sig}
0001-Enable-table-validation-modules.patch
0002-Enable-subpixel-rendering.patch
0003-Enable-infinality-subpixel-hinting.patch
0004-Enable-long-PCF-family-names.patch)
sha256sums=('86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784'
'SKIP'
'f41df4f336d5e82e58733c7a4594476c9216cfc85c096327745a7e1b559e17e1'
'dc77c1cfee4bf8e7e0690628c95d211df09e0d0750e4c8f075b78b5f105514f7'
'21a62bc12b848320c686d602d8d4e3bcd51294a9def4dc9c301736e077b59f3f'
'266384222f87a02fb02b2179828f6c26fe6d7b1fd09d1f7e3734e7fcb09cda2e')
validpgpkeys=(58E0C111E39F5408C5D3EC76C1A60EACE707FDA5) # Werner Lemberg <wl@gnu.org>
2015-11-30 21:17:01 +01:00
2017-01-06 22:32:35 +01:00
if [[ $pkgname = 'mingw-w64-freetype2-bootstrap' ]]; then
2016-07-12 17:36:14 +02:00
_provides=${pkgname%-bootstrap}
else
_provides=${pkgname}-bootstrap
# adding harfbuzz for improved OpenType features auto-hinting
# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream
depends+=(mingw-w64-harfbuzz)
2016-07-12 18:14:17 +02:00
replaces+=(${_provides})
2016-07-12 17:36:14 +02:00
fi
provides+=(${_provides})
conflicts+=(${_provides})
2017-01-06 22:32:35 +01:00
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
2015-11-30 21:17:01 +01:00
prepare() {
2015-12-24 16:50:30 +01:00
cd "${srcdir}/freetype-${pkgver}"
2016-09-23 17:21:14 +02:00
2016-07-12 17:36:14 +02:00
patch -Np1 -i ../0001-Enable-table-validation-modules.patch
2020-12-29 20:21:49 +01:00
patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch
patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch
2015-11-30 21:17:01 +01:00
}
build() {
2015-12-24 16:50:30 +01:00
for _arch in ${_architectures}; do
mkdir -p "${srcdir}/freetype-${pkgver}/build-${_arch}"
cd "${srcdir}/freetype-${pkgver}/build-${_arch}"
${_arch}-configure --with-zlib=/usr/${_arch} --without-png
make
done
2015-11-30 21:17:01 +01:00
}
package() {
2015-12-24 16:50:30 +01:00
for _arch in ${_architectures}; do
cd "${srcdir}/freetype-${pkgver}/build-${_arch}"
make DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}/usr/${_arch}/share/"
${_arch}-strip -g "${pkgdir}/usr/${_arch}/lib/"*.a
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
done
2015-11-30 21:17:01 +01:00
}