hiredis: fix pkg-config

This commit is contained in:
Đoàn Trần Công Danh 2021-03-27 15:01:33 +07:00
parent 439151419f
commit dec04a4481
3 changed files with 44 additions and 1 deletions

View file

@ -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)

View file

@ -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. >> $@

View file

@ -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 <gottox@voidlinux.org>"