Initial import (rhbz#1499676)

This commit is contained in:
Tomas Popela 2017-10-10 15:29:50 +02:00
parent 96e225df3a
commit 5b401c4cca
5 changed files with 120 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/woff2-1.0.1.tar.gz

View File

@ -1,3 +0,0 @@
# woff2
The woff2 package

View File

@ -0,0 +1,52 @@
From 86040accb25e655a5c5617876eaf0878133af7c4 Mon Sep 17 00:00:00 2001
From: Tomas Popela <tpopela@redhat.com>
Date: Mon, 9 Oct 2017 15:27:01 +0200
Subject: [PATCH] Require specific brotli libraries in pkg-config files
---
CMakeLists.txt | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61663bd..68d1c62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,7 +158,7 @@ endfunction(generate_pkg_config_path)
function(generate_pkg_config output_file)
set (options)
set (oneValueArgs NAME DESCRIPTION URL VERSION PREFIX LIBDIR INCLUDEDIR)
- set (multiValueArgs DEPENDS_PRIVATE CFLAGS LIBRARIES)
+ set (multiValueArgs DEPENDS DEPENDS_PRIVATE CFLAGS LIBRARIES)
cmake_parse_arguments(GEN_PKG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
unset (options)
unset (oneValueArgs)
@@ -203,6 +203,10 @@ function(generate_pkg_config output_file)
file(APPEND "${output_file}" "Version: ${GEN_PKG_VERSION}\n")
endif()
+ if(GEN_PKG_DEPENDS)
+ file(APPEND "${output_file}" "Requires: ${GEN_PKG_DEPENDS}\n")
+ endif()
+
if(GEN_PKG_DEPENDS_PRIVATE)
file(APPEND "${output_file}" "Requires.private:")
foreach(lib ${GEN_PKG_DEPENDS_PRIVATE})
@@ -242,6 +246,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2dec.pc"
DESCRIPTION "WOFF2 decoder library"
URL "https://github.com/google/woff2"
VERSION "${WOFF2_VERSION}"
+ DEPENDS libbrotlidec
DEPENDS_PRIVATE libwoff2common
LIBRARIES woff2dec)
@@ -250,6 +255,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2enc.pc"
DESCRIPTION "WOFF2 encoder library"
URL "https://github.com/google/woff2"
VERSION "${WOFF2_VERSION}"
+ DEPENDS libbrotlienc
DEPENDS_PRIVATE libwoff2common
LIBRARIES woff2enc)
--
2.14.2

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (woff2-1.0.1.tar.gz) = d3257164e004e3319001a6e7015050b894ecff751da01a1f2eea226f0730f142c6001b04a959af2e16546a63fab216706b32b0d543cade210ecd54fa70f6e55c

66
woff2.spec Normal file
View File

@ -0,0 +1,66 @@
Name: woff2
Version: 1.0.1
Release: 1%{?dist}
Summary: Web Open Font Format 2.0 library
License: MIT
URL: https://github.com/google/woff2
Source0: https://github.com/google/woff2/archive/v%{version}/%{name}-%{version}.tar.gz
# https://github.com/google/woff2/pull/95
Patch0: Require-specific-brotli-libraries-in-pkg-config-file.patch
BuildRequires: cmake
BuildRequires: brotli-devel >= 1.0
%description
Web Open Font Format (WOFF) 2.0 is an update to the existing WOFF 1.0 with
improved compression that is achieved by using the Brotli algorithm. The primary
purpose of the WOFF2 format is to efficiently package fonts linked to Web
documents by means of CSS @font-face rules.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files and utils for %{name}
%prep
%autosetup -n %{name}-%{version}
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake .. \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DCMAKE_INSTALL_LIBDIR="%{_libdir}"
popd
make %{?_smp_mflags} -C %{_target_platform}
%install
%make_install -C %{_target_platform}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license LICENSE
%{_libdir}/libwoff2common.so.*
%{_libdir}/libwoff2dec.so.*
%{_libdir}/libwoff2enc.so.*
%files devel
%{_includedir}/woff2
%{_libdir}/libwoff2common.so
%{_libdir}/libwoff2dec.so
%{_libdir}/libwoff2enc.so
%{_libdir}/pkgconfig/libwoff2common.pc
%{_libdir}/pkgconfig/libwoff2dec.pc
%{_libdir}/pkgconfig/libwoff2enc.pc
%changelog
* Mon Oct 09 2017 Tomas Popela <tpopela@redhat.com> 1.0.1-1
- Initial import (rhbz#1499676)