From dec04a4481778118277d16350d5b2cb2d42797f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 27 Mar 2021 15:01:33 +0700 Subject: [PATCH] hiredis: fix pkg-config --- srcpkgs/hiredis/patches/fix-cflags.patch | 16 +++++++++++++ srcpkgs/hiredis/patches/fix-pkgconfig.patch | 26 +++++++++++++++++++++ srcpkgs/hiredis/template | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/hiredis/patches/fix-cflags.patch create mode 100644 srcpkgs/hiredis/patches/fix-pkgconfig.patch diff --git a/srcpkgs/hiredis/patches/fix-cflags.patch b/srcpkgs/hiredis/patches/fix-cflags.patch new file mode 100644 index 0000000000..87521610b0 --- /dev/null +++ b/srcpkgs/hiredis/patches/fix-cflags.patch @@ -0,0 +1,16 @@ +Index: Makefile +=================================================================== +--- Makefile.orig ++++ Makefile +@@ -44,9 +44,9 @@ export REDIS_TEST_CONFIG + # Fallback to gcc when $CC is not in $PATH. + 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 ++OPTIMIZATION?= + WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers +-DEBUG_FLAGS?= -g -ggdb ++DEBUG_FLAGS?= + REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) + REAL_LDFLAGS=$(LDFLAGS) + diff --git a/srcpkgs/hiredis/patches/fix-pkgconfig.patch b/srcpkgs/hiredis/patches/fix-pkgconfig.patch new file mode 100644 index 0000000000..3107ed35a9 --- /dev/null +++ b/srcpkgs/hiredis/patches/fix-pkgconfig.patch @@ -0,0 +1,26 @@ +Index: Makefile +=================================================================== +--- Makefile.orig ++++ Makefile +@@ -234,8 +234,8 @@ $(PKGCONFNAME): hiredis.h + @echo "Generating $@ for pkgconfig..." + @echo prefix=$(PREFIX) > $@ + @echo exec_prefix=\$${prefix} >> $@ +- @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@ +- @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ ++ @echo libdir=\$${prefix}/$(LIBRARY_PATH) >> $@ ++ @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@ + @echo >> $@ + @echo Name: hiredis >> $@ + @echo Description: Minimalistic C client library for Redis. >> $@ +@@ -247,8 +247,8 @@ $(SSL_PKGCONFNAME): hiredis_ssl.h + @echo "Generating $@ for pkgconfig..." + @echo prefix=$(PREFIX) > $@ + @echo exec_prefix=\$${prefix} >> $@ +- @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@ +- @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ ++ @echo libdir=\$${prefix}/$(LIBRARY_PATH) >> $@ ++ @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@ + @echo >> $@ + @echo Name: hiredis_ssl >> $@ + @echo Description: SSL Support for hiredis. >> $@ diff --git a/srcpkgs/hiredis/template b/srcpkgs/hiredis/template index 15da33a9c7..05e5d6cf56 100644 --- a/srcpkgs/hiredis/template +++ b/srcpkgs/hiredis/template @@ -1,8 +1,9 @@ # Template file for 'hiredis' pkgname=hiredis version=1.0.0 -revision=1 +revision=2 build_style=gnu-makefile +make_build_args="PREFIX=/usr" checkdepends="redis" short_desc="Minimalistic C client for Redis" maintainer="Enno Boland "