[v3,2/2] ghostscript: build and install libgs

Submitted by Andrew Shadura on March 9, 2017, 2:31 p.m. | Patch ID: 137914

Details

Message ID 20170309143139.2785-2-andrew.shadura@collabora.co.uk
State New
Headers show

Commit Message

Andrew Shadura March 9, 2017, 2:31 p.m.
From: Joshua Lock <joshua.lock@collabora.co.uk>

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 <joshua.lock@collabora.co.uk>
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
---
 meta/recipes-extended/ghostscript/ghostscript_9.20.bb | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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"

Comments

Ross Burton March 9, 2017, 4:36 p.m.
On 9 March 2017 at 14:31, Andrew Shadura <andrew.shadura@collabora.co.uk>
wrote:

> 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.
>

This does *way* more:

packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: PKGSIZE changed
from 0 to 38856 (+100%)
  * FILELIST: added "/usr/include/ghostscript/gdevdsp.h
/usr/include/ghostscript/iapi.h /usr/lib/libgs.so
/usr/include/ghostscript/gserrors.h /usr/include/ghostscript/ierrors.h"
packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: RDEPENDS: added
"ghostscript-lib"
packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: FILELIST: added
"/usr/include/ghostscript/gdevdsp.h /usr/include/ghostscript/iapi.h
/usr/lib/libgs.so /usr/include/ghostscript/gserrors.h
/usr/include/ghostscript/ierrors.h"
packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: RRECOMMENDS:
added "ghostscript-lib-dev"

That's all good.

packages/corei7-64-poky-linux/ghostscript/ghostscript-doc: PKGSIZE changed
from 45465 to 0 (-100%)
  * FILELIST: removed all items "/usr/share/man/de/man1/ps2pdf.1 ...
/usr/share/man/man1/pdf2ps.1"

All the man pages disappeared

packages/corei7-64-poky-linux/ghostscript/ghostscript: PKGSIZE changed from
61037876 to 16376087 (-73%)
  * FILELIST: removed "/usr/share/ghostscript/9.20/doc/index.html
/usr/share/ghostscript/9.20/doc/gs.css
/usr/share/ghostscript/9.20/lib/bjc610a0.upp ...
/usr/share/ghostscript/9.20/doc/Make.htm /usr/share/ghostscript/9.20/lib/
wrfont.ps"

Pretty much all of ghostscript disappeared.

packages/corei7-64-poky-linux/ghostscript/ghostscript: RDEPENDS: removed
all items "cups-libimage (['>= 2.2.2']) glibc (['>= 2.25']) cups-lib (['>=
2.2.2']) libpng (['>= 1.6.28']) tiff (['>= 4.0.7']) fontconfig (['>=
2.12.1'])"

Was that the intention?  Having libgs sounds sensible but surely both
should be packaged.

Ross
Andrew Shadura March 10, 2017, 7:13 p.m.
On 09/03/17 17:36, Burton, Ross wrote:
> On 9 March 2017 at 14:31, Andrew Shadura <andrew.shadura@collabora.co.uk>
> wrote:
> 
>> 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.
>>
> 
> This does *way* more:
> 
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: PKGSIZE changed
> from 0 to 38856 (+100%)
>   * FILELIST: added "/usr/include/ghostscript/gdevdsp.h
> /usr/include/ghostscript/iapi.h /usr/lib/libgs.so
> /usr/include/ghostscript/gserrors.h /usr/include/ghostscript/ierrors.h"
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: RDEPENDS: added
> "ghostscript-lib"
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: FILELIST: added
> "/usr/include/ghostscript/gdevdsp.h /usr/include/ghostscript/iapi.h
> /usr/lib/libgs.so /usr/include/ghostscript/gserrors.h
> /usr/include/ghostscript/ierrors.h"
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: RRECOMMENDS:
> added "ghostscript-lib-dev"
> 
> That's all good.
> 
> packages/corei7-64-poky-linux/ghostscript/ghostscript-doc: PKGSIZE changed
> from 45465 to 0 (-100%)
>   * FILELIST: removed all items "/usr/share/man/de/man1/ps2pdf.1 ...
> /usr/share/man/man1/pdf2ps.1"
> 
> All the man pages disappeared
> 
> packages/corei7-64-poky-linux/ghostscript/ghostscript: PKGSIZE changed from
> 61037876 to 16376087 (-73%)
>   * FILELIST: removed "/usr/share/ghostscript/9.20/doc/index.html
> /usr/share/ghostscript/9.20/doc/gs.css
> /usr/share/ghostscript/9.20/lib/bjc610a0.upp ...
> /usr/share/ghostscript/9.20/doc/Make.htm /usr/share/ghostscript/9.20/lib/
> wrfont.ps"
> 
> Pretty much all of ghostscript disappeared.

Right. I'm probably removing way too much.

> packages/corei7-64-poky-linux/ghostscript/ghostscript: RDEPENDS: removed
> all items "cups-libimage (['>= 2.2.2']) glibc (['>= 2.25']) cups-lib (['>=
> 2.2.2']) libpng (['>= 1.6.28']) tiff (['>= 4.0.7']) fontconfig (['>=
> 2.12.1'])"
> 
> Was that the intention?  Having libgs sounds sensible but surely both
> should be packaged.

The intention was what I said, probably I misunderstood what the
original packages had, so I haven't noticed things disappearing.

Will investigate and resubmit.