From: Joshua Lock <[email protected]>

Build and install libgs library, which is a build dependency
of a few other libraries, such as libspectre.

We don't want to ship the executable binaries, only the library and its
headers, hence oe_runmake install-so + rm -rf, not e.g. oe_libinstall.

Signed-off-by: Joshua Lock <[email protected]>
Signed-off-by: Andrew Shadura <[email protected]>
---
 meta/recipes-extended/ghostscript/ghostscript_9.20.bb | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.20.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.20.bb
index 210e9a7..3c95ed9 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.20.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.20.bb
@@ -70,15 +70,17 @@ do_configure_prepend () {
        mkdir -p soobj
        if [ -e ${WORKDIR}/objarch.h ]; then
                cp ${WORKDIR}/objarch.h obj/arch.h
+               cp ${WORKDIR}/objarch.h soobj/arch.h
        fi
 }
 
 do_configure_append () {
        # copy tools from the native ghostscript build
        if [ "${PN}" != "ghostscript-native" ]; then
-               mkdir -p obj/aux soobj
+               mkdir -p obj/aux soobj/aux
                for i in genarch genconf mkromfs echogs gendev genht; do
                        cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i 
obj/aux/$i
+                       cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i 
soobj/aux/$i
                done
        fi
 }
@@ -96,6 +98,10 @@ do_compile_class-native () {
     done
 }
 
+do_compile_class-target_append () {
+    oe_runmake so
+}
+
 do_install_class-native () {
     install -d ${D}${bindir}/ghostscript-${PV}
     for i in genarch genconf mkromfs echogs gendev genht; do
@@ -103,4 +109,13 @@ do_install_class-native () {
     done
 }
 
+do_install_class-target_append () {
+    oe_runmake install-so DESTDIR=${D}
+    rm -rf ${D}${bindir}
+}
+
+PACKAGES =+ "${PN}-lib"
+
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+
 BBCLASSEXTEND = "native"
-- 
1.8.3.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to