diff options
| author | Marian Pritsak <maryan.pricak@gmail.com> | 2017-06-12 21:36:50 +0300 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-06-14 14:51:17 +0200 |
| commit | 93b75f16d476ce4f9d6967efb6d41ada1ca6f387 (patch) | |
| tree | 005b57a2d658aacce6ed2a4f4dfb22e7dc8cb5d1 | |
| parent | b37a1cb625e9e3230a8bd21676f38a6850da95ec (diff) | |
| download | meta-openembedded-93b75f16d476ce4f9d6967efb6d41ada1ca6f387.tar.gz | |
hiredis: Add recipe
Hiredis is a C client library for Redis database.
Hiredis does not use autotools, but plane Makefile instead,
so few changes had to be made, including removing hard coded
compiler, setting INSTALL to 'cp -r' to to avoid host user
comtamination QA issue, and setting PREFIX to ${prefix} instead of
default /usr/local.
Signed-off-by: Marian Pritsak <maryan.pricak@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch | 32 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | 21 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch new file mode 100644 index 0000000000..fef2bc7541 --- /dev/null +++ b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrea Galbusera <gizero@gmail.com> | ||
| 3 | Date: Fri, 31 Jul 2015 16:42:08 +0200 | ||
| 4 | Subject: [PATCH] Makefile: remove hardcoding of CC | ||
| 5 | |||
| 6 | * upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm | ||
| 7 | platforms which previously caused and issue due to -fPIC being lost | ||
| 8 | |||
| 9 | Signed-off-by: Andrea Galbusera <gizero@gmail.com> | ||
| 10 | --- | ||
| 11 | Makefile | 5 ----- | ||
| 12 | 1 file changed, 5 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/Makefile b/Makefile | ||
| 15 | index 8b0f0c2..66a4317 100644 | ||
| 16 | --- a/Makefile | ||
| 17 | +++ b/Makefile | ||
| 18 | @@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG | ||
| 19 | endef | ||
| 20 | export REDIS_TEST_CONFIG | ||
| 21 | |||
| 22 | -# Fallback to gcc when $CC is not in $PATH. | ||
| 23 | -CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc') | ||
| 24 | -OPTIMIZATION?=-O3 | ||
| 25 | -WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings | ||
| 26 | -DEBUG?= -g -ggdb | ||
| 27 | REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH) | ||
| 28 | REAL_LDFLAGS=$(LDFLAGS) $(ARCH) | ||
| 29 | |||
| 30 | -- | ||
| 31 | 1.9.1 | ||
| 32 | |||
diff --git a/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb new file mode 100644 index 0000000000..96b86f9a0c --- /dev/null +++ b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | DESCRIPTION = "Minimalistic C client library for Redis" | ||
| 2 | HOMEPAGE = "http://github.com/redis/hiredis" | ||
| 3 | LICENSE = "BSD-3-Clause" | ||
| 4 | SECTION = "libs" | ||
| 5 | DEPENDS = "redis" | ||
| 6 | |||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51" | ||
| 8 | SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=f58dd249d6ed47a7e835463c3b04722972281dbb \ | ||
| 9 | file://0001-Makefile-remove-hardcoding-of-CC.patch" | ||
| 10 | |||
| 11 | S = "${WORKDIR}/git" | ||
| 12 | |||
| 13 | inherit autotools-brokensep pkgconfig | ||
| 14 | |||
| 15 | # By default INSTALL variable in Makefile is equal to 'cp -a', which preserves | ||
| 16 | # ownership and causes host-user-contamination QA issue. | ||
| 17 | # And PREFIX defaults to /usr/local. | ||
| 18 | do_install_prepend() { | ||
| 19 | export PREFIX=${prefix} | ||
| 20 | export INSTALL='cp -r' | ||
| 21 | } | ||
