brotli: bump version (#10008)

This commit is contained in:
kenmays
2024-02-16 00:30:44 -08:00
committed by GitHub
parent 2aaf2e71ff
commit d168d51cd3
2 changed files with 15 additions and 88 deletions

View File

@@ -5,17 +5,12 @@ Huffman coding and 2nd order context modeling, with a compression ratio \
comparable to the best currently available general-purpose compression \
methods. It is similar in speed with deflate but offers more dense compression."
HOMEPAGE="https://github.com/google/brotli"
COPYRIGHT="2009, 2010, 2013-2018 Brotli Authors"
COPYRIGHT="2009, 2010, 2013-2023 Brotli Authors"
LICENSE="MIT"
REVISION="4"
REVISION="1"
SOURCE_URI="https://github.com/google/brotli/archive/v$portVersion.tar.gz"
# Testdata missing in Tarball, see https://github.com/google/brotli/issues/850
# For tests 1/ use the git URL
# 2/ add --worktree-attributes to 'git archive' in HaikuPorter/SourceFetcher.py
#SOURCE_URI="git+${HOMEPAGE}.git#v$portVersion"
CHECKSUM_SHA256="f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46"
CHECKSUM_SHA256="e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff"
SOURCE_FILENAME="brotli-$portVersion.tar.gz"
PATCHES="brotli-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
@@ -59,8 +54,8 @@ BUILD_PREREQUIRES="
cmd:make
"
PYTHON_PACKAGES+=(python39)
PYTHON_VERSIONS+=(3.9)
PYTHON_PACKAGES+=(python310)
PYTHON_VERSIONS+=(3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
@@ -83,14 +78,21 @@ done
BUILD()
{
runConfigure --omit-buildspec ./configure-cmake --disable-debug
make $jobArgs
cmake \
-B build -S . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=$libDir \
-DCMAKE_INSTALL_BINDIR=$binDir \
-DCMAKE_INSTALL_INCLUDEDIR=$includeDir \
-DBROTLI_DISABLE_TESTS=OFF
make -C build $jobArgs
}
INSTALL()
{
make install
make -C build install
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
@@ -114,9 +116,6 @@ INSTALL()
install -t "$manDir/man1" docs/brotli.1
install -t "$manDir/man3" docs/*.3
# remove static libraries
rm $libDir/*.a
prepareInstalledDevelLibs libbrotli{common,dec,enc}
fixPkgconfig
@@ -128,14 +127,11 @@ INSTALL()
TEST()
{
make test
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
rm -rf build
$python setup.py test
rm python/_brotli.so
done
}

View File

@@ -1,69 +0,0 @@
From 6c76022bdd932a046d38bf4e4936d02a95d48466 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 19 Oct 2020 17:31:53 +0200
Subject: fix pkgconfig scripts regression
diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in
index 10ca969..2a8cf7a 100644
--- a/scripts/libbrotlicommon.pc.in
+++ b/scripts/libbrotlicommon.pc.in
@@ -7,5 +7,5 @@ Name: libbrotlicommon
URL: https://github.com/google/brotli
Description: Brotli common dictionary library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlicommon
+Libs: -L${libdir} -lbrotlicommon
Cflags: -I${includedir}
diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in
index e7c3124..6f8ef2e 100644
--- a/scripts/libbrotlidec.pc.in
+++ b/scripts/libbrotlidec.pc.in
@@ -7,6 +7,6 @@ Name: libbrotlidec
URL: https://github.com/google/brotli
Description: Brotli decoder library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlidec
+Libs: -L${libdir} -lbrotlidec
Requires.private: libbrotlicommon >= 1.0.2
Cflags: -I${includedir}
diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in
index 4dd0811..2098afe 100644
--- a/scripts/libbrotlienc.pc.in
+++ b/scripts/libbrotlienc.pc.in
@@ -7,6 +7,6 @@ Name: libbrotlienc
URL: https://github.com/google/brotli
Description: Brotli encoder library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlienc
+Libs: -L${libdir} -lbrotlienc
Requires.private: libbrotlicommon >= 1.0.2
Cflags: -I${includedir}
--
2.28.0
From 7741f18ea2f7baac29f67d421ce9dfb88be27a22 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 20 Oct 2020 16:56:04 +0200
Subject: c89 fix
diff --git a/c/tools/brotli.c b/c/tools/brotli.c
index 7c678d3..c4efc43 100644
--- a/c/tools/brotli.c
+++ b/c/tools/brotli.c
@@ -889,8 +889,9 @@ static BROTLI_BOOL DecompressFile(Context* context, BrotliDecoderState* s) {
} else if (result == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) {
if (!ProvideOutput(context)) return BROTLI_FALSE;
} else if (result == BROTLI_DECODER_RESULT_SUCCESS) {
+ int has_more_input;
if (!FlushOutput(context)) return BROTLI_FALSE;
- int has_more_input =
+ has_more_input =
(context->available_in != 0) || (fgetc(context->fin) != EOF);
if (has_more_input) {
fprintf(stderr, "corrupt input [%s]\n",
--
2.28.0