summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-09-03 01:26:48 -0700
committerKhem Raj <raj.khem@gmail.com>2022-09-05 22:49:35 -0700
commitaca683fb18c3a62874e6687e36fb4c35a25d0615 (patch)
tree408a83f10abce10362b1ea7291e5984e56beb754
parentc5f7b7eb69df7b710461e97aab6c443b567fb995 (diff)
downloadmeta-openembedded-aca683fb18c3a62874e6687e36fb4c35a25d0615.tar.gz
augeas: Check for __GLIBC__ to use gnu extention for strerror_r
Merge .bb and .inc Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/augeas/augeas.inc33
-rw-r--r--meta-oe/recipes-support/augeas/augeas/0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch34
-rw-r--r--meta-oe/recipes-support/augeas/augeas_1.12.0.bb34
3 files changed, 67 insertions, 34 deletions
diff --git a/meta-oe/recipes-support/augeas/augeas.inc b/meta-oe/recipes-support/augeas/augeas.inc
deleted file mode 100644
index d46f3888bd..0000000000
--- a/meta-oe/recipes-support/augeas/augeas.inc
+++ /dev/null
@@ -1,33 +0,0 @@
1SUMMARY = "Augeas configuration API"
2HOMEPAGE = "http://augeas.net/"
3BUGTRACKER = "https://fedorahosted.org/augeas/report/1"
4
5LICENSE = "LGPL-2.1-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
7
8SRC_URI = "http://download.augeas.net/${BP}.tar.gz \
9 file://sepbuildfix.patch \
10 "
11
12DEPENDS = "readline libxml2"
13
14inherit autotools pkgconfig
15
16PACKAGES =+ "${PN}-lenses lib${BPN}"
17
18FILES:${PN}-lenses = "${datadir}/augeas/lenses"
19FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}"
20
21RDEPENDS:lib${BPN} += "${PN}-lenses"
22RRECOMMENDS:lib${BPN} += "${PN}"
23
24LEAD_SONAME = "libaugeas.so"
25
26do_install:append() {
27 rm -fr ${D}${datadir}/vim
28}
29
30PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
31PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
32
33EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
diff --git a/meta-oe/recipes-support/augeas/augeas/0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch b/meta-oe/recipes-support/augeas/augeas/0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch
new file mode 100644
index 0000000000..9424be2aa6
--- /dev/null
+++ b/meta-oe/recipes-support/augeas/augeas/0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch
@@ -0,0 +1,34 @@
1From e5ccf769c2dc7283b56a597fffdb5dc1558e3ce8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 3 Sep 2022 01:23:28 -0700
4Subject: [PATCH] src/internal: Use __GLIBC__ to check for GNU extention
5 implementation
6
7__USE_GNU is defined by _GNU_SOURCE and configure explicitly sets this
8macro and it does have meaning on musl too, where it may have some level
9of GNU compatibility but strerror_r is not one of them. Therefore we
10have to check for libc implementation for this to be sure.
11
12Upstream-Status: Pending
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 src/internal.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/src/internal.c b/src/internal.c
20index ef83b71..fb326fa 100644
21--- a/src/internal.c
22+++ b/src/internal.c
23@@ -431,7 +431,7 @@ char *cleanpath(char *path) {
24
25 const char *xstrerror(int errnum, char *buf, size_t len) {
26 #ifdef HAVE_STRERROR_R
27-# ifdef __USE_GNU
28+# ifdef __GLIBC__
29 /* Annoying linux specific API contract */
30 return strerror_r(errnum, buf, len);
31 # else
32--
332.37.3
34
diff --git a/meta-oe/recipes-support/augeas/augeas_1.12.0.bb b/meta-oe/recipes-support/augeas/augeas_1.12.0.bb
index d32c4691d2..2c6d4cdc88 100644
--- a/meta-oe/recipes-support/augeas/augeas_1.12.0.bb
+++ b/meta-oe/recipes-support/augeas/augeas_1.12.0.bb
@@ -1,4 +1,36 @@
1require augeas.inc 1SUMMARY = "Augeas configuration API"
2HOMEPAGE = "http://augeas.net/"
3BUGTRACKER = "https://fedorahosted.org/augeas/report/1"
2 4
5LICENSE = "LGPL-2.1-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
7
8SRC_URI = "http://download.augeas.net/${BP}.tar.gz \
9 file://sepbuildfix.patch \
10 file://0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch \
11 "
3SRC_URI[md5sum] = "74f1c7b8550f4e728486091f6b907175" 12SRC_URI[md5sum] = "74f1c7b8550f4e728486091f6b907175"
4SRC_URI[sha256sum] = "321942c9cc32185e2e9cb72d0a70eea106635b50269075aca6714e3ec282cb87" 13SRC_URI[sha256sum] = "321942c9cc32185e2e9cb72d0a70eea106635b50269075aca6714e3ec282cb87"
14
15DEPENDS = "readline libxml2"
16
17inherit autotools pkgconfig
18
19PACKAGES =+ "${PN}-lenses lib${BPN}"
20
21FILES:${PN}-lenses = "${datadir}/augeas/lenses"
22FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}"
23
24RDEPENDS:lib${BPN} += "${PN}-lenses"
25RRECOMMENDS:lib${BPN} += "${PN}"
26
27LEAD_SONAME = "libaugeas.so"
28
29do_install:append() {
30 rm -fr ${D}${datadir}/vim
31}
32
33PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
34PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
35
36EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"