Upgrade from 1.0.2 to 1.0.4.

This commit is contained in:
Sergey A. Osokin 2018-04-12 00:30:20 +00:00
parent 91fe0d6ad7
commit 08df9bba32
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=467121
3 changed files with 4 additions and 125 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= brotli
PORTVERSION= 1.0.2
PORTVERSION= 1.0.4
DISTVERSIONPREFIX= v
PORTEPOCH= 1
CATEGORIES= archivers devel

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1511961437
SHA256 (google-brotli-v1.0.2_GH0.tar.gz) = c2cf2a16646b44771a4109bb21218c8e2d952babb827796eb8a800c1f94b7422
SIZE (google-brotli-v1.0.2_GH0.tar.gz) = 23736359
TIMESTAMP = 1523490759
SHA256 (google-brotli-v1.0.4_GH0.tar.gz) = 2268a3dff1cc36e18549e89a51ee0cd9513908a977d56d6a1f9d4c61c2af37c3
SIZE (google-brotli-v1.0.4_GH0.tar.gz) = 23819000

View File

@ -1,121 +0,0 @@
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 $