summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@gentoo.org>2024-04-20 22:49:53 +0200
committerPetr Vaněk <arkamar@gentoo.org>2024-04-20 23:33:22 +0200
commit07cf4f6acae4827766ff465039c4bcfbe0fcbbf2 (patch)
treefe80536c94e97a711b7c67c1cb6a9d65fc320a38 /dev-libs/hiredis
parentsys-apps/inxi: add 3.3.34.1 (diff)
downloadgentoo-07cf4f6acae4827766ff465039c4bcfbe0fcbbf2.tar.gz
gentoo-07cf4f6acae4827766ff465039c4bcfbe0fcbbf2.tar.bz2
gentoo-07cf4f6acae4827766ff465039c4bcfbe0fcbbf2.zip
dev-libs/hiredis: avoid default -Werror
Upstream introduced unconditional addition of -Werror flag in hiredis-1.2.0 in commit [1]. This was changed to conditional addition controlled by USE_WERROR variable later in commit [2]. This change backports it in form of patch. Additionally, emake newly takes arguments from local myconf array. [1] https://github.com/redis/hiredis/commit/5cbd1f2960662c18b1d2b2dac7352f2b5b1ba776 [2] https://github.com/redis/hiredis/commit/bff171c9fc83f8abed9a283a3da2dc91a5671419 Closes: https://bugs.gentoo.org/930336 Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r--dev-libs/hiredis/files/hiredis-1.2.0-conditional-werror.patch24
-rw-r--r--dev-libs/hiredis/hiredis-1.2.0.ebuild23
2 files changed, 37 insertions, 10 deletions
diff --git a/dev-libs/hiredis/files/hiredis-1.2.0-conditional-werror.patch b/dev-libs/hiredis/files/hiredis-1.2.0-conditional-werror.patch
new file mode 100644
index 000000000000..2ab7cf86e089
--- /dev/null
+++ b/dev-libs/hiredis/files/hiredis-1.2.0-conditional-werror.patch
@@ -0,0 +1,24 @@
+From bff171c9fc83f8abed9a283a3da2dc91a5671419 Mon Sep 17 00:00:00 2001
+From: Romain Geissler <romain.geissler@amadeus.com>
+Date: Thu, 13 Jul 2023 12:39:45 +0000
+Subject: [PATCH] Allow disabling the -Werror flag.
+
+Upstream-commit: https://github.com/redis/hiredis/commit/bff171c9fc83f8abed9a283a3da2dc91a5671419
+
+diff --git a/Makefile b/Makefile
+index bd2106b1d..56e3d59be 100644
+--- a/Makefile
++++ b/Makefile
+@@ -39,7 +39,11 @@ export REDIS_TEST_CONFIG
+ CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
+ CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++')
+ OPTIMIZATION?=-O3
+-WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers
++WARNINGS=-Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers
++USE_WERROR?=1
++ifeq ($(USE_WERROR),1)
++ WARNINGS+=-Werror
++endif
+ DEBUG_FLAGS?= -g -ggdb
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(PLATFORM_FLAGS)
+ REAL_LDFLAGS=$(LDFLAGS)
diff --git a/dev-libs/hiredis/hiredis-1.2.0.ebuild b/dev-libs/hiredis/hiredis-1.2.0.ebuild
index 6c1b7be7b083..10071f0716a4 100644
--- a/dev-libs/hiredis/hiredis-1.2.0.ebuild
+++ b/dev-libs/hiredis/hiredis-1.2.0.ebuild
@@ -28,19 +28,22 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-1.1.0-disable-network-tests.patch
+ "${FILESDIR}"/${PN}-1.2.0-conditional-werror.patch # bug 930336
)
_build() {
- emake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- PREFIX="${EPREFIX}/usr" \
- LIBRARY_PATH="$(get_libdir)" \
- USE_SSL=$(usex ssl 1 0) \
- TEST_ASYNC=$(usex test 1 0) \
- DEBUG_FLAGS= \
- OPTIMIZATION= \
- "$@"
+ local myconf=(
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ PREFIX="${EPREFIX}/usr"
+ LIBRARY_PATH="$(get_libdir)"
+ USE_SSL=$(usex ssl 1 0)
+ TEST_ASYNC=$(usex test 1 0)
+ DEBUG_FLAGS=
+ OPTIMIZATION=
+ USE_WERROR=0
+ )
+ emake "${myconf[@]}" "$@"
}
src_compile() {