All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] hiredis: Add recipe
@ 2017-06-12 18:36 Marian Pritsak
  2017-06-13  5:00 ` Andrea Galbusera
  0 siblings, 1 reply; 10+ messages in thread
From: Marian Pritsak @ 2017-06-12 18:36 UTC (permalink / raw)
  To: openembedded-devel

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>
---
 .../0001-Makefile-remove-hardcoding-of-CC.patch    | 32 ++++++++++++++++++++++
 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | 21 ++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
 create mode 100644 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb

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 0000000..fef2bc7
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
@@ -0,0 +1,32 @@
+From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001
+From: Andrea Galbusera <gizero@gmail.com>
+Date: Fri, 31 Jul 2015 16:42:08 +0200
+Subject: [PATCH] Makefile: remove hardcoding of CC
+
+* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
+platforms which previously caused and issue due to -fPIC being lost
+
+Signed-off-by: Andrea Galbusera <gizero@gmail.com>
+---
+ Makefile | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8b0f0c2..66a4317 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG
+ endef
+ 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')
+-OPTIMIZATION?=-O3
+-WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
+-DEBUG?= -g -ggdb
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
+ REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
+ 
+-- 
+1.9.1
+
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 0000000..96b86f9
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Minimalistic C client library for Redis"
+HOMEPAGE = "http://github.com/redis/hiredis"
+LICENSE = "BSD-3-Clause"
+SECTION = "libs"
+DEPENDS = "redis"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
+SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=f58dd249d6ed47a7e835463c3b04722972281dbb \
+           file://0001-Makefile-remove-hardcoding-of-CC.patch"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig
+
+# By default INSTALL variable in Makefile is equal to 'cp -a', which preserves
+# ownership and causes host-user-contamination QA issue.
+# And PREFIX defaults to /usr/local.
+do_install_prepend() {
+  export PREFIX=${prefix}
+  export INSTALL='cp -r'
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] hiredis: Add recipe
  2017-06-12 18:36 [meta-oe][PATCH] hiredis: Add recipe Marian Pritsak
@ 2017-06-13  5:00 ` Andrea Galbusera
  0 siblings, 0 replies; 10+ messages in thread
From: Andrea Galbusera @ 2017-06-13  5:00 UTC (permalink / raw)
  To: Marian Pritsak; +Cc: openembeded-devel

On Mon, Jun 12, 2017 at 8:36 PM, Marian Pritsak <maryan.pricak@gmail.com>
wrote:

> 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>
> ---
>  .../0001-Makefile-remove-hardcoding-of-CC.patch    | 32
> ++++++++++++++++++++++
>  meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | 21 ++++++++++++++
>  2 files changed, 53 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/hiredis/files/0001-Makefile-
> remove-hardcoding-of-CC.patch
>  create mode 100644 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
>
> 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 0000000..fef2bc7
> --- /dev/null
> +++ b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-
> remove-hardcoding-of-CC.patch
> @@ -0,0 +1,32 @@
> +From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001
> +From: Andrea Galbusera <gizero@gmail.com>
> +Date: Fri, 31 Jul 2015 16:42:08 +0200
> +Subject: [PATCH] Makefile: remove hardcoding of CC
> +
> +* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
> +platforms which previously caused and issue due to -fPIC being lost
> +
> +Signed-off-by: Andrea Galbusera <gizero@gmail.com>
> +---
> + Makefile | 5 -----
> + 1 file changed, 5 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 8b0f0c2..66a4317 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG
> + endef
> + 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')
> +-OPTIMIZATION?=-O3
> +-WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
> +-DEBUG?= -g -ggdb
> + REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
> + REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
> +
> +--
> +1.9.1
> +
> 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 0000000..96b86f9
> --- /dev/null
> +++ b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
> @@ -0,0 +1,21 @@
> +DESCRIPTION = "Minimalistic C client library for Redis"
> +HOMEPAGE = "http://github.com/redis/hiredis"
> +LICENSE = "BSD-3-Clause"
> +SECTION = "libs"
> +DEPENDS = "redis"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
> +SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=
> f58dd249d6ed47a7e835463c3b04722972281dbb \
> +           file://0001-Makefile-remove-hardcoding-of-CC.patch"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit autotools-brokensep pkgconfig
> +
> +# By default INSTALL variable in Makefile is equal to 'cp -a', which
> preserves
> +# ownership and causes host-user-contamination QA issue.
> +# And PREFIX defaults to /usr/local.
> +do_install_prepend() {
> +  export PREFIX=${prefix}
> +  export INSTALL='cp -r'
> +}
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>

A recipe for hiredis is already available from at least two other meta
layers as per [1], one of which does provide the same version as yours.
Don't know what the policy is here, but to me it seems worth a try talking
to those layers' maintainers and see if they agree to move the recipe to
meta-oe (at least meta-intel-iot-middleware is already listing meta-oe as a
dependency): it would help reducing the maintenance effort in the future.

[1]
https://layers.openembedded.org/layerindex/branch/master/recipes/?q=hiredis


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] hiredis: Add recipe
  2017-06-11 20:36 Marian Pritsak
@ 2017-06-12  6:15 ` Koen Kooi
  0 siblings, 0 replies; 10+ messages in thread
From: Koen Kooi @ 2017-06-12  6:15 UTC (permalink / raw)
  To: openembedded-devel

Op 11-06-17 om 22:36 schreef Marian Pritsak:
> 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 /usr instead of
> default /usr/local.
> 
> Signed-off-by: Marian Pritsak <maryan.pricak@gmail.com>

[..[

> +# By default INSTALL variable in Makefile is equal to 'cp -a', which preserves
> +# ownership and causes host-user-contamination QA issue.
> +# And PREFIX defaults to /usr/local.
> +do_install_prepend() {
> +  export PREFIX=/usr
> +  export INSTALL='cp -r'
> +}

Don't hardcode '/usr', but use '${prefix}'




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [meta-oe][PATCH] hiredis: Add recipe
@ 2017-06-11 20:36 Marian Pritsak
  2017-06-12  6:15 ` Koen Kooi
  0 siblings, 1 reply; 10+ messages in thread
From: Marian Pritsak @ 2017-06-11 20:36 UTC (permalink / raw)
  To: openembedded-devel

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 /usr instead of
default /usr/local.

Signed-off-by: Marian Pritsak <maryan.pricak@gmail.com>
---
 .../0001-Makefile-remove-hardcoding-of-CC.patch    | 32 ++++++++++++++++++++++
 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | 21 ++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
 create mode 100644 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb

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 0000000..fef2bc7
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
@@ -0,0 +1,32 @@
+From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001
+From: Andrea Galbusera <gizero@gmail.com>
+Date: Fri, 31 Jul 2015 16:42:08 +0200
+Subject: [PATCH] Makefile: remove hardcoding of CC
+
+* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
+platforms which previously caused and issue due to -fPIC being lost
+
+Signed-off-by: Andrea Galbusera <gizero@gmail.com>
+---
+ Makefile | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8b0f0c2..66a4317 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG
+ endef
+ 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')
+-OPTIMIZATION?=-O3
+-WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
+-DEBUG?= -g -ggdb
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
+ REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
+ 
+-- 
+1.9.1
+
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 0000000..b2e8be8
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Minimalistic C client library for Redis"
+HOMEPAGE = "http://github.com/redis/hiredis"
+LICENSE = "BSD-3-Clause"
+SECTION = "libs"
+DEPENDS = "redis"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
+SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=f58dd249d6ed47a7e835463c3b04722972281dbb \
+           file://0001-Makefile-remove-hardcoding-of-CC.patch"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig
+
+# By default INSTALL variable in Makefile is equal to 'cp -a', which preserves
+# ownership and causes host-user-contamination QA issue.
+# And PREFIX defaults to /usr/local.
+do_install_prepend() {
+  export PREFIX=/usr
+  export INSTALL='cp -r'
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] hiredis: Add recipe
  2017-06-11 16:21   ` Мар'ян Пріцак
@ 2017-06-11 17:21     ` Khem Raj
  0 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2017-06-11 17:21 UTC (permalink / raw)
  To: Мар'ян
	Пріцак
  Cc: openembeded-devel

On Sun, Jun 11, 2017 at 9:21 AM, Мар'ян Пріцак <maryan.pricak@gmail.com> wrote:
>
>
> On Sun, Jun 11, 2017 at 7:01 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> On Sun, Jun 11, 2017 at 8:27 AM, Marian Pritsak <maryan.pricak@gmail.com>
>> wrote:
>> > +do_install_prepend() {
>> > +  export PREFIX=/usr
>> > +  export INSTALL='cp -r'
>> > +}
>>
>> can you explain why these changes are needed ?
>
>
> By default INSTALL variable in Makefile is equal to 'cp -a', which preserves
> ownership and causes host-user-contamination QA issue.
> And PREFIX defaults to /usr/local.

Thank you. Can you add this information to commit msg and send a new rev ?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] hiredis: Add recipe
  2017-06-11 16:00 ` Khem Raj
@ 2017-06-11 16:21   ` Мар'ян Пріцак
  2017-06-11 17:21     ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Мар'ян Пріцак @ 2017-06-11 16:21 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

On Sun, Jun 11, 2017 at 7:01 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Sun, Jun 11, 2017 at 8:27 AM, Marian Pritsak <maryan.pricak@gmail.com>
> wrote:
> > +do_install_prepend() {
> > +  export PREFIX=/usr
> > +  export INSTALL='cp -r'
> > +}
>
> can you explain why these changes are needed ?
>

By default INSTALL variable in Makefile is equal to 'cp -a', which
preserves ownership and causes host-user-contamination QA issue.
And PREFIX defaults to /usr/local.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] hiredis: Add recipe
  2017-06-11 15:27 Marian Pritsak
@ 2017-06-11 16:00 ` Khem Raj
  2017-06-11 16:21   ` Мар'ян Пріцак
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2017-06-11 16:00 UTC (permalink / raw)
  To: Marian Pritsak; +Cc: openembeded-devel

On Sun, Jun 11, 2017 at 8:27 AM, Marian Pritsak <maryan.pricak@gmail.com> wrote:
> +do_install_prepend() {
> +  export PREFIX=/usr
> +  export INSTALL='cp -r'
> +}

can you explain why these changes are needed ?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [meta-oe][PATCH] hiredis: Add recipe
@ 2017-06-11 15:27 Marian Pritsak
  2017-06-11 16:00 ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Marian Pritsak @ 2017-06-11 15:27 UTC (permalink / raw)
  To: openembedded-devel

Hiredis is a C client library for Redis database.

Signed-off-by: Marian Pritsak <maryan.pricak@gmail.com>
---
 .../0001-Makefile-remove-hardcoding-of-CC.patch    | 32 ++++++++++++++++++++++
 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | 18 ++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
 create mode 100644 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb

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 0000000..fef2bc7
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
@@ -0,0 +1,32 @@
+From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001
+From: Andrea Galbusera <gizero@gmail.com>
+Date: Fri, 31 Jul 2015 16:42:08 +0200
+Subject: [PATCH] Makefile: remove hardcoding of CC
+
+* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
+platforms which previously caused and issue due to -fPIC being lost
+
+Signed-off-by: Andrea Galbusera <gizero@gmail.com>
+---
+ Makefile | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8b0f0c2..66a4317 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG
+ endef
+ 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')
+-OPTIMIZATION?=-O3
+-WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
+-DEBUG?= -g -ggdb
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
+ REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
+ 
+-- 
+1.9.1
+
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 0000000..68ba90f
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Minimalistic C client library for Redis"
+HOMEPAGE = "http://github.com/redis/hiredis"
+LICENSE = "BSD-3-Clause"
+SECTION = "libs"
+DEPENDS = "redis"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
+SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=f58dd249d6ed47a7e835463c3b04722972281dbb \
+           file://0001-Makefile-remove-hardcoding-of-CC.patch"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig
+
+do_install_prepend() {
+  export PREFIX=/usr
+  export INSTALL='cp -r'
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] hiredis: Add recipe
  2017-06-10 22:19 Marian Pritsak
@ 2017-06-11  4:28 ` Khem Raj
  0 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2017-06-11  4:28 UTC (permalink / raw)
  To: Marian Pritsak; +Cc: openembeded-devel

On Sat, Jun 10, 2017 at 3:19 PM, Marian Pritsak <maryan.pricak@gmail.com> wrote:
> Hiredis is a C client library for Redis database.
>
> Signed-off-by: Marian Pritsak <maryan.pricak@gmail.com>
> ---
>  .../0001-Makefile-remove-hardcoding-of-CC.patch    | 32 ++++++++++++++++++++++
>  meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | 24 ++++++++++++++++
>  2 files changed, 56 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
>  create mode 100644 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
>
> 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 0000000..fef2bc7
> --- /dev/null
> +++ b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
> @@ -0,0 +1,32 @@
> +From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001
> +From: Andrea Galbusera <gizero@gmail.com>
> +Date: Fri, 31 Jul 2015 16:42:08 +0200
> +Subject: [PATCH] Makefile: remove hardcoding of CC
> +
> +* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
> +platforms which previously caused and issue due to -fPIC being lost
> +
> +Signed-off-by: Andrea Galbusera <gizero@gmail.com>
> +---
> + Makefile | 5 -----
> + 1 file changed, 5 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 8b0f0c2..66a4317 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG
> + endef
> + 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')
> +-OPTIMIZATION?=-O3
> +-WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
> +-DEBUG?= -g -ggdb
> + REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
> + REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
> +
> +--
> +1.9.1
> +
> 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 0000000..c1b905f
> --- /dev/null
> +++ b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
> @@ -0,0 +1,24 @@
> +DESCRIPTION = "Minimalistic C client library for Redis"
> +HOMEPAGE = "http://github.com/redis/hiredis"
> +LICENSE = "BSD-3-Clause"
> +SECTION = "libs"
> +DEPENDS = "redis"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
> +SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=f58dd249d6ed47a7e835463c3b04722972281dbb \
> +           file://0001-Makefile-remove-hardcoding-of-CC.patch"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit autotools
> +
> +do_compile() {
> +  cd ${S}
> +  oe_runmake
> +}

I think you can inherit autotools-brokensep instead of autotools and
completely get rid of
do_compile override

> +
> +do_install() {
> +  cd ${S}
> +  oe_runmake PREFIX=${D}/usr INSTALL='cp -r' install
> +  cp hiredis.pc ${D}/${libdir}/pkgconfig/
> +}

you dont need to cd into ${S} then. Can you explain why INSTALL needs to be
overridden ?

> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [meta-oe][PATCH] hiredis: Add recipe
@ 2017-06-10 22:19 Marian Pritsak
  2017-06-11  4:28 ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Marian Pritsak @ 2017-06-10 22:19 UTC (permalink / raw)
  To: openembedded-devel

Hiredis is a C client library for Redis database.

Signed-off-by: Marian Pritsak <maryan.pricak@gmail.com>
---
 .../0001-Makefile-remove-hardcoding-of-CC.patch    | 32 ++++++++++++++++++++++
 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb | 24 ++++++++++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
 create mode 100644 meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb

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 0000000..fef2bc7
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
@@ -0,0 +1,32 @@
+From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001
+From: Andrea Galbusera <gizero@gmail.com>
+Date: Fri, 31 Jul 2015 16:42:08 +0200
+Subject: [PATCH] Makefile: remove hardcoding of CC
+
+* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
+platforms which previously caused and issue due to -fPIC being lost
+
+Signed-off-by: Andrea Galbusera <gizero@gmail.com>
+---
+ Makefile | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8b0f0c2..66a4317 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG
+ endef
+ 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')
+-OPTIMIZATION?=-O3
+-WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
+-DEBUG?= -g -ggdb
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
+ REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
+ 
+-- 
+1.9.1
+
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 0000000..c1b905f
--- /dev/null
+++ b/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Minimalistic C client library for Redis"
+HOMEPAGE = "http://github.com/redis/hiredis"
+LICENSE = "BSD-3-Clause"
+SECTION = "libs"
+DEPENDS = "redis"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
+SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=f58dd249d6ed47a7e835463c3b04722972281dbb \
+           file://0001-Makefile-remove-hardcoding-of-CC.patch"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+do_compile() {
+  cd ${S}
+  oe_runmake
+}
+
+do_install() {
+  cd ${S}
+  oe_runmake PREFIX=${D}/usr INSTALL='cp -r' install
+  cp hiredis.pc ${D}/${libdir}/pkgconfig/
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-06-13  5:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 18:36 [meta-oe][PATCH] hiredis: Add recipe Marian Pritsak
2017-06-13  5:00 ` Andrea Galbusera
  -- strict thread matches above, loose matches on Subject: below --
2017-06-11 20:36 Marian Pritsak
2017-06-12  6:15 ` Koen Kooi
2017-06-11 15:27 Marian Pritsak
2017-06-11 16:00 ` Khem Raj
2017-06-11 16:21   ` Мар'ян Пріцак
2017-06-11 17:21     ` Khem Raj
2017-06-10 22:19 Marian Pritsak
2017-06-11  4:28 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.