mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-02 01:20:54 +00:00
archivers/brotli: Update to 1.0.2
PR: 223966 Approved by: osa (maintainer)
This commit is contained in:
parent
3b43001e28
commit
e6b0953e15
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=456110
@ -2,8 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= brotli
|
||||
PORTVERSION= 0.6.0
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 1.0.2
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= archivers devel
|
||||
@ -17,14 +16,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= google
|
||||
|
||||
USES= cmake compiler:c++0x pkgconfig
|
||||
USES= autoreconf:build compiler:c++0x gmake libtool pkgconfig
|
||||
USE_LDCONFIG= yes
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
CMAKE_ARGS= -DBUILD_TESTING:BOOL=OFF
|
||||
INSTALL_TARGET= install-strip
|
||||
PLIST_SUB= SHLIBVER=${PORTVERSION}
|
||||
|
||||
post-install:
|
||||
${LN} -s libbrotlicommon.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libbrotlicommon.so.0
|
||||
${LN} -s libbrotlidec.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libbrotlidec.so.0
|
||||
${LN} -s libbrotlienc.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libbrotlienc.so.0
|
||||
pre-configure:
|
||||
(cd ${WRKSRC} && ./bootstrap)
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1498054439
|
||||
SHA256 (google-brotli-v0.6.0_GH0.tar.gz) = 69cdbdf5709051dd086a2f020f5abf9e32519eafe0ad6be820c667c3a9c9ee0f
|
||||
SIZE (google-brotli-v0.6.0_GH0.tar.gz) = 19838761
|
||||
TIMESTAMP = 1511961437
|
||||
SHA256 (google-brotli-v1.0.2_GH0.tar.gz) = c2cf2a16646b44771a4109bb21218c8e2d952babb827796eb8a800c1f94b7422
|
||||
SIZE (google-brotli-v1.0.2_GH0.tar.gz) = 23736359
|
||||
|
121
archivers/brotli/files/patch-freebsd-upstream
Normal file
121
archivers/brotli/files/patch-freebsd-upstream
Normal file
@ -0,0 +1,121 @@
|
||||
From 1ca15159d6a7d4b202de17a94abf52c6c1d5988a Mon Sep 17 00:00:00 2001
|
||||
From: Bernard Spil <Sp1l@users.noreply.github.com>
|
||||
Date: Wed, 29 Nov 2017 22:38:16 +0100
|
||||
Subject: [PATCH 1/4] Fix missing symbols errors in libbrotlienc and dec (#623)
|
||||
|
||||
When using autotools to build the binary and libraries, the resulting libraries don't link `brotlicommon` or `m`.
|
||||
This was detected when building cURL 7.57.0 which has now has brotli support. During configure it was failing
|
||||
```
|
||||
checking run-time libs availability... failed
|
||||
configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lbrotlidec -lz -L/usr/local/lib
|
||||
```
|
||||
inspection of config.log showed missing symbols from libbrotlicommon as the cause.
|
||||
|
||||
This patch results in the encryption and decryption libs to be properly linked against libbrotlicommon and libm.
|
||||
See also https://bugs.freebsd.org/223966
|
||||
---
|
||||
Makefile.am | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index c4ced6da..ace7a850 100644
|
||||
--- Makefile.am.orig
|
||||
+++ Makefile.am
|
||||
@@ -23,8 +23,10 @@ libbrotlicommon_la_SOURCES = $(BROTLI_COMMON_C) $(BROTLI_COMMON_H)
|
||||
libbrotlicommon_la_LDFLAGS = $(AM_LDFLAGS) $(LIBBROTLI_VERSION_INFO) $(LDFLAGS)
|
||||
libbrotlidec_la_SOURCES = $(BROTLI_DEC_C) $(BROTLI_DEC_H)
|
||||
libbrotlidec_la_LDFLAGS = $(AM_LDFLAGS) $(LIBBROTLI_VERSION_INFO) $(LDFLAGS)
|
||||
+libbrotlidec_la_LIBADD = libbrotlicommon.la -lm
|
||||
libbrotlienc_la_SOURCES = $(BROTLI_ENC_C) $(BROTLI_ENC_H)
|
||||
libbrotlienc_la_LDFLAGS = $(AM_LDFLAGS) $(LIBBROTLI_VERSION_INFO) $(LDFLAGS)
|
||||
+libbrotlienc_la_LIBADD = libbrotlicommon.la -lm
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
|
||||
From c8c8389ed3101279b79d93210b33f63dca8af74c Mon Sep 17 00:00:00 2001
|
||||
From: Eugene Kliuchnikov <eustas@google.com>
|
||||
Date: Thu, 30 Nov 2017 11:02:54 +0100
|
||||
Subject: [PATCH 2/4] Do not rely on bash arithmetic in `bootstrap` (#625)
|
||||
|
||||
---
|
||||
bootstrap | 21 +++++++++++++--------
|
||||
1 file changed, 13 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/bootstrap b/bootstrap
|
||||
index 2f43f50e..7c7020d3 100755
|
||||
--- bootstrap.orig
|
||||
+++ bootstrap
|
||||
@@ -1,19 +1,24 @@
|
||||
# !/bin/sh -e
|
||||
|
||||
+REQUIRED='is required, but not installed.'
|
||||
+bc -v >/dev/null 2>&1 || { echo >&2 "'bc' $REQUIRED"; exit 1; }
|
||||
+sed --version >/dev/null 2>&1 || { echo >&2 "'sed' $REQUIRED"; exit 1; }
|
||||
+autoreconf --version >/dev/null 2>&1 || { echo >&2 "'autoconf' $REQUIRED"; exit 1; }
|
||||
+
|
||||
mkdir m4 2>/dev/null
|
||||
|
||||
BROTLI_ABI_HEX=`sed -n 's/#define BROTLI_ABI_VERSION 0x//p' c/common/version.h`
|
||||
-BROTLI_ABI_INT=`echo $((16#$BROTLI_ABI_HEX))`
|
||||
-BROTLI_ABI_CURRENT=$(($BROTLI_ABI_INT >> 24))
|
||||
-BROTLI_ABI_REVISION=$((($BROTLI_ABI_INT >> 12) & 4095))
|
||||
-BROTLI_ABI_AGE=$(($BROTLI_ABI_INT & 4095))
|
||||
+BROTLI_ABI_INT=`echo "ibase=16;$BROTLI_ABI_HEX" | bc`
|
||||
+BROTLI_ABI_CURRENT=`expr $BROTLI_ABI_INT / 16777216`
|
||||
+BROTLI_ABI_REVISION=`expr $BROTLI_ABI_INT / 4096 % 4096`
|
||||
+BROTLI_ABI_AGE=`expr $BROTLI_ABI_INT % 4096`
|
||||
BROTLI_ABI_INFO="$BROTLI_ABI_CURRENT:$BROTLI_ABI_REVISION:$BROTLI_ABI_AGE"
|
||||
|
||||
BROTLI_VERSION_HEX=`sed -n 's/#define BROTLI_VERSION 0x//p' c/common/version.h`
|
||||
-BROTLI_VERSION_INT=`echo $((16#$BROTLI_VERSION_HEX))`
|
||||
-BROTLI_VERSION_MAJOR=$(($BROTLI_VERSION_INT >> 24))
|
||||
-BROTLI_VERSION_MINOR=$((($BROTLI_VERSION_INT >> 12) & 4095))
|
||||
-BROTLI_VERSION_PATCH=$(($BROTLI_VERSION_INT & 4095))
|
||||
+BROTLI_VERSION_INT=`echo "ibase=16;$BROTLI_VERSION_HEX" | bc`
|
||||
+BROTLI_VERSION_MAJOR=`expr $BROTLI_VERSION_INT / 16777216`
|
||||
+BROTLI_VERSION_MINOR=`expr $BROTLI_VERSION_INT / 4096 % 4096`
|
||||
+BROTLI_VERSION_PATCH=`expr $BROTLI_VERSION_INT % 4096`
|
||||
BROTLI_VERSION="$BROTLI_VERSION_MAJOR.$BROTLI_VERSION_MINOR.$BROTLI_VERSION_PATCH"
|
||||
|
||||
sed -r "s/[0-9]+:[0-9]+:[0-9]+/$BROTLI_ABI_INFO/" Makefile.am -i
|
||||
|
||||
From 62194f204d90a5a95310a6949f00a0c6c5ca07bd Mon Sep 17 00:00:00 2001
|
||||
From: Bernard Spil <Sp1l@users.noreply.github.com>
|
||||
Date: Mon, 4 Dec 2017 15:17:49 +0100
|
||||
Subject: [PATCH 4/4] Work around Linuxisms (#627)
|
||||
|
||||
Missed this in my previous tests. Sorry for that.
|
||||
|
||||
On BSDs, both bc and sed are part of the base operating system. For sed this results in an error as the check construct (--version) is a GNU-ism and only works for GNU sed, not for bsd sed.
|
||||
Similarly, BSD sed does not take parameters after the filename(s) operated on. Moving `-i` to the front fixes that. `-r` is provided for GNU compat in BSD sed as an alias of `-E`. The `-i` option in BSD sed requires an extension to work in-place.
|
||||
|
||||
(thank you for picking up the nginx module too!)
|
||||
---
|
||||
bootstrap | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bootstrap b/bootstrap
|
||||
index 7c7020d3..dbaea15d 100755
|
||||
--- bootstrap.orig
|
||||
+++ bootstrap
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
REQUIRED='is required, but not installed.'
|
||||
bc -v >/dev/null 2>&1 || { echo >&2 "'bc' $REQUIRED"; exit 1; }
|
||||
+if [ `uname -s` != "FreeBSD" ]; then
|
||||
sed --version >/dev/null 2>&1 || { echo >&2 "'sed' $REQUIRED"; exit 1; }
|
||||
+fi
|
||||
autoreconf --version >/dev/null 2>&1 || { echo >&2 "'autoconf' $REQUIRED"; exit 1; }
|
||||
|
||||
mkdir m4 2>/dev/null
|
||||
@@ -21,7 +23,7 @@ BROTLI_VERSION_MINOR=`expr $BROTLI_VERSION_INT / 4096 % 4096`
|
||||
BROTLI_VERSION_PATCH=`expr $BROTLI_VERSION_INT % 4096`
|
||||
BROTLI_VERSION="$BROTLI_VERSION_MAJOR.$BROTLI_VERSION_MINOR.$BROTLI_VERSION_PATCH"
|
||||
|
||||
-sed -r "s/[0-9]+:[0-9]+:[0-9]+/$BROTLI_ABI_INFO/" Makefile.am -i
|
||||
-sed -r "s/\[[0-9]+\.[0-9]+\.[0-9]+\]/[$BROTLI_VERSION]/" configure.ac -i
|
||||
+sed -i.bak -r "s/[0-9]+:[0-9]+:[0-9]+/$BROTLI_ABI_INFO/" Makefile.am
|
||||
+sed -i.bak -r "s/\[[0-9]+\.[0-9]+\.[0-9]+\]/[$BROTLI_VERSION]/" configure.ac
|
||||
|
||||
autoreconf --install --force --symlink || exit $
|
@ -1,17 +1,21 @@
|
||||
bin/bro
|
||||
bin/brotli
|
||||
include/brotli/decode.h
|
||||
include/brotli/encode.h
|
||||
include/brotli/port.h
|
||||
include/brotli/types.h
|
||||
lib/libbrotlicommon.a
|
||||
lib/libbrotlicommon.so
|
||||
lib/libbrotlicommon.so.0
|
||||
lib/libbrotlicommon.so.0.6.0
|
||||
lib/libbrotlicommon.so.1
|
||||
lib/libbrotlicommon.so.%%SHLIBVER%%
|
||||
lib/libbrotlidec.a
|
||||
lib/libbrotlidec.so
|
||||
lib/libbrotlidec.so.0
|
||||
lib/libbrotlidec.so.0.6.0
|
||||
lib/libbrotlidec.so.1
|
||||
lib/libbrotlidec.so.%%SHLIBVER%%
|
||||
lib/libbrotlienc.a
|
||||
lib/libbrotlienc.so
|
||||
lib/libbrotlienc.so.0
|
||||
lib/libbrotlienc.so.0.6.0
|
||||
lib/libbrotlienc.so.1
|
||||
lib/libbrotlienc.so.%%SHLIBVER%%
|
||||
libdata/pkgconfig/libbrotlicommon.pc
|
||||
libdata/pkgconfig/libbrotlidec.pc
|
||||
libdata/pkgconfig/libbrotlienc.pc
|
||||
%%PORTDOCS%%%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
|
Loading…
Reference in New Issue
Block a user