diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-05-01 01:31:09 -0300 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-05-03 17:35:25 +0000 |
commit | 5fd122be81534df7251b7908f8a9e7edc88acd4f (patch) | |
tree | 4703a33f18a76f0d4169fbf91ac8a81e876d26d7 | |
parent | b7cdc1d551f335d43dc3dcbcf84a4616d847ab2e (diff) | |
download | aports-5fd122be81534df7251b7908f8a9e7edc88acd4f.tar.bz2 aports-5fd122be81534df7251b7908f8a9e7edc88acd4f.tar.xz |
community/woff2: new aport
Web Open Font Format 2 reference implementation
https://github.com/google/woff2
To be used on webkit2gtk
-rw-r--r-- | community/woff2/APKBUILD | 52 | ||||
-rw-r--r-- | community/woff2/dont-set-rpath.patch | 30 | ||||
-rw-r--r-- | community/woff2/install-executables.patch | 31 |
3 files changed, 113 insertions, 0 deletions
diff --git a/community/woff2/APKBUILD b/community/woff2/APKBUILD new file mode 100644 index 0000000000..a66601cc68 --- /dev/null +++ b/community/woff2/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Leo <thinkabit.ukim@gmail.com> +# Maintainer: Leo <thinkabit.ukim@gmail.com> +pkgname=woff2 +pkgver=1.0.2 +pkgrel=0 +pkgdesc="Web Open Font Format 2 reference implementation" +options="!check" # No testsuite +url="https://github.com/google/woff2" +arch="all" +license="GPL-3.0-or-later" +makedepends="brotli-dev cmake" +subpackages="$pkgname-dev lib${pkgname}common:_common lib${pkgname}enc:_enc + lib${pkgname}dec:_dec" +source="$pkgname-$pkgver.tar.gz::https://github.com/google/woff2/archive/v${pkgver}.tar.gz + dont-set-rpath.patch + install-executables.patch + " + +build() { + cmake . \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_SKIP_BUILD_RPATH=ON + make +} + +package() { + make DESTDIR="$pkgdir" PREFIX=/usr install +} + +_common() { + pkgdesc="$pkgdesc (common library)" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libwoff2common.so.* "$subpkgdir"/usr/lib +} + +_dec() { + pkgdesc="$pkgdesc (encoder library)" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libwoff2enc.so.* "$subpkgdir"/usr/lib +} + +_enc() { + pkgdesc="$pkgdesc (decoder library)" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libwoff2dec.so.* "$subpkgdir"/usr/lib +} + +sha512sums="c788bba1530aec463e755e901f9342f4b599e3a07f54645fef1dc388ab5d5c30625535e5dd38e9e792e04a640574baa50eeefb6b7338ab403755f4a4e0c3044d woff2-1.0.2.tar.gz +e60add16905b597ed3b10cfe3f4c90d43db28c86466bb65e880a91e84f388e9f03e3a16d0012e717ca170456d91b748c8de5ade4882e8f31e2a60620c183df5f dont-set-rpath.patch +49bd21014c427a13fd19dd80f821a48ed290bb4978b77ccf72ba424e90deb11db604b452cbd315f0d372c176d3093a685c892a8088f9d54a28bdb5a3bb6f0adb install-executables.patch" diff --git a/community/woff2/dont-set-rpath.patch b/community/woff2/dont-set-rpath.patch new file mode 100644 index 0000000000..dbc76e1af6 --- /dev/null +++ b/community/woff2/dont-set-rpath.patch @@ -0,0 +1,30 @@ +From: Jeremy Bicha <jeremy@bicha.net> +Date: Thu, 7 Dec 2017 13:40:57 -0500 +Subject: [PATCH] Don't set rpath + +https://github.com/google/woff2/pull/106 +--- + CMakeLists.txt | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ecfbb83..da8ecf1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,16 +21,6 @@ option(NOISY_LOGGING "Noisy logging" ON) + # Version information + set(WOFF2_VERSION 1.0.2) + +-# When building shared libraries it is important to set the correct rpath +-# See https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH +-set(CMAKE_SKIP_BUILD_RPATH FALSE) +-set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +-list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_LIBDIR}" isSystemDir) +-if ("${isSystemDir}" STREQUAL "-1") +- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}") +-endif() +- + # Find Brotli dependencies + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + find_package(BrotliDec) diff --git a/community/woff2/install-executables.patch b/community/woff2/install-executables.patch new file mode 100644 index 0000000000..18616a0342 --- /dev/null +++ b/community/woff2/install-executables.patch @@ -0,0 +1,31 @@ +From b64df1afa8be8bf784e970aa47973ec420ac4381 Mon Sep 17 00:00:00 2001 +From: Jeremy Bicha <jbicha@ubuntu.com> +Date: Thu, 7 Dec 2017 17:18:05 -0500 +Subject: [PATCH] Always install executables + +https://github.com/google/woff2/pull/106 +--- + CMakeLists.txt | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ecfbb83..29c45b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -260,12 +260,10 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2enc.pc" + LIBRARIES woff2enc) + + # Installation +-if (NOT BUILD_SHARED_LIBS) +- install( +- TARGETS woff2_decompress woff2_compress woff2_info +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ) +-endif() ++install( ++ TARGETS woff2_decompress woff2_compress woff2_info ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++) + + install( + TARGETS woff2common woff2dec woff2enc |