Download raw body.
archivers/woff2: enable tool installation
I need woff2_decompress for the upcoming Blender update. Unfortunately
Upstream hides the installation step behind BUILD_SHARED_LIBS (which is
stupid). I added a new option to install the tools. This also means that
the tools are already built in the current port.
OK?
diff --git a/archivers/woff2/Makefile b/archivers/woff2/Makefile
index 200936f6eed..75fc3fcfa1e 100644
--- a/archivers/woff2/Makefile
+++ b/archivers/woff2/Makefile
@@ -3,7 +3,7 @@ COMMENT= Web Open Font Format 2.0 library
GH_ACCOUNT= google
GH_PROJECT= woff2
GH_TAGNAME= v1.0.2
-REVISION= 0
+REVISION= 1
SHARED_LIBS += woff2common 0.0 # 1.0
SHARED_LIBS += woff2dec 0.0 # 1.0
@@ -14,7 +14,7 @@ CATEGORIES= archivers
# MIT
PERMIT_PACKAGE= Yes
-WANTLIB += ${COMPILER_LIBCXX} brotlidec brotlienc m
+WANTLIB += ${COMPILER_LIBCXX} brotlidec brotlienc c m
# C++11
COMPILER= base-clang ports-gcc base-gcc
diff --git a/archivers/woff2/patches/patch-CMakeLists_txt b/archivers/woff2/patches/patch-CMakeLists_txt
new file mode 100644
index 00000000000..d60dce56cfd
--- /dev/null
+++ b/archivers/woff2/patches/patch-CMakeLists_txt
@@ -0,0 +1,20 @@
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -14,6 +14,7 @@ project(woff2)
+ include(GNUInstallDirs)
+
+ # Build options
++option(INSTALL_TOOLS "Install tools" ON)
+ option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+ option(CANONICAL_PREFIXES "Canonical prefixes" OFF)
+ option(NOISY_LOGGING "Noisy logging" ON)
+@@ -260,7 +261,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libw
+ LIBRARIES woff2enc)
+
+ # Installation
+-if (NOT BUILD_SHARED_LIBS)
++if (INSTALL_TOOLS)
+ install(
+ TARGETS woff2_decompress woff2_compress woff2_info
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
diff --git a/archivers/woff2/pkg/PLIST b/archivers/woff2/pkg/PLIST
index b6bbcf126e1..e079c3c59ba 100644
--- a/archivers/woff2/pkg/PLIST
+++ b/archivers/woff2/pkg/PLIST
@@ -1,3 +1,6 @@
+@bin bin/woff2_compress
+@bin bin/woff2_decompress
+@bin bin/woff2_info
include/woff2/
include/woff2/decode.h
include/woff2/encode.h
archivers/woff2: enable tool installation