diff mbox series

[oe,meta-oe,3/6] poppler: Fix build on musl

Message ID 20180520223517.9869-3-raj.khem@gmail.com
State New
Headers show
Series [oe,meta-gnome,1/6] network-manager-applet: Package gir-1.0 files into devel package | expand

Commit Message

Khem Raj May 20, 2018, 10:35 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../poppler/poppler/basename-include.patch    | 20 +++++++++++++++++++
 .../recipes-support/poppler/poppler_0.64.0.bb |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta-oe/recipes-support/poppler/poppler/basename-include.patch

-- 
2.17.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/poppler/poppler/basename-include.patch b/meta-oe/recipes-support/poppler/poppler/basename-include.patch
new file mode 100644
index 0000000000..528528ae7c
--- /dev/null
+++ b/meta-oe/recipes-support/poppler/poppler/basename-include.patch
@@ -0,0 +1,20 @@ 
+Minic GNU basename() API for non-glibc library e.g. musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: poppler-0.64.0/utils/pdfsig.cc
+===================================================================
+--- poppler-0.64.0.orig/utils/pdfsig.cc
++++ poppler-0.64.0/utils/pdfsig.cc
+@@ -35,6 +35,10 @@
+ #include "Win32Console.h"
+ #include "numberofcharacters.h"
+ 
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ static const char * getReadableSigState(SignatureValidationStatus sig_vs)
+ {
+   switch(sig_vs) {
diff --git a/meta-oe/recipes-support/poppler/poppler_0.64.0.bb b/meta-oe/recipes-support/poppler/poppler_0.64.0.bb
index 1e87ae6e6c..b90f3fa359 100644
--- a/meta-oe/recipes-support/poppler/poppler_0.64.0.bb
+++ b/meta-oe/recipes-support/poppler/poppler_0.64.0.bb
@@ -6,6 +6,7 @@  SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \
            file://0001-Do-not-overwrite-all-our-build-flags.patch \
            file://0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch \
            file://0001-glib-CMakeLists.txt-Add-libpoppler-to-link-along-wit.patch \
+           file://basename-include.patch \
            "
 SRC_URI[md5sum] = "f7f687ebb60004f8ad61994575018044"
 SRC_URI[sha256sum] = "b21df92ca99f78067785cf2dc8e06deb04726b62389c0ee1f5d8b103c77f64b1"