diff --git a/media-libs/woff2/woff2-1.0.2.recipe b/media-libs/woff2/woff2-1.0.2.recipe new file mode 100644 index 000000000..70642eb18 --- /dev/null +++ b/media-libs/woff2/woff2-1.0.2.recipe @@ -0,0 +1,83 @@ +SUMMARY="Web Open Font Format 2 reference implementation" +DESCRIPTION="The Web Open Font Format (WOFF) is a font format for use in web pages. \ +WOFF files are OpenType or TrueType fonts, with format-specific compression applied \ +and additional XML metadata added. The two primary goals are first to distinguish font \ +files intended for use as web fonts from fonts files intended for use in desktop \ +applications via local installation, and second to reduce web font latency when \ +fonts are transferred from a server to a client over a network connection." +HOMEPAGE="https://github.com/google/woff2/" +COPYRIGHT="2013-2022 by the WOFF2 Authors" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/google/woff2/archive/refs/tags/v$portVersion.tar.gz" +CHECKSUM_SHA256="add272bb09e6384a4833ffca4896350fdb16e0ca22df68c0384773c67a175594" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + woff2$secondaryArchSuffix = $portVersion + lib:libwoff2enc$secondaryArchSuffix = $portVersion compat >= 1 + lib:libwoff2dec$secondaryArchSuffix = $portVersion compat >= 1 + lib:libwoff2common$secondaryArchSuffix = $portVersion compat >= 1 + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libbrotlidec$secondaryArchSuffix + lib:libbrotlienc$secondaryArchSuffix + " + +PROVIDES_devel=" + woff2${secondaryArchSuffix}_devel = $portVersion + devel:libwoff2enc$secondaryArchSuffix = $portVersion compat >= 1 + devel:libwoff2dec$secondaryArchSuffix = $portVersion compat >= 1 + devel:libwoff2common$secondaryArchSuffix = $portVersion compat >= 1 + " +REQUIRES_devel=" + woff2$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libbrotlidec$secondaryArchSuffix + devel:libbrotlienc$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:grep + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:sed + " + +BUILD() +{ + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DCMAKE_INSTALL_LIBDIR=$libDir \ + -DCMAKE_INSTALL_INCLUDEDIR=$includeDir \ + -DCMAKE_SKIP_RPATH=ON \ + -DCANONICAL_PREFIXES=ON \ + .. + make +} + +INSTALL() +{ + cd build + make install + + prepareInstalledDevelLibs \ + libwoff2enc \ + libwoff2dec \ + libwoff2common + + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir +}