From 74d7b8e7a0c52178a8a111415586eb15d802a88b Mon Sep 17 00:00:00 2001 From: Graham Gower Date: Wed, 27 Oct 2010 15:05:01 +0000 Subject: gs: Clean up and break into two recipes. * Break the native compilation steps into a separate native recipe. * Fix license * Convert to new style staging * Fix build on mipsel due to missing -fPIC for objects linked into so files. Signed-off-by: Graham Gower Signed-off-by: Khem Raj --- recipes/gs/gs-tools-native_8.64.bb | 30 +++++++++++++++++++++++ recipes/gs/gs_8.64.bb | 49 ++++++++++++-------------------------- 2 files changed, 45 insertions(+), 34 deletions(-) create mode 100644 recipes/gs/gs-tools-native_8.64.bb diff --git a/recipes/gs/gs-tools-native_8.64.bb b/recipes/gs/gs-tools-native_8.64.bb new file mode 100644 index 0000000000..ea5f5fad0e --- /dev/null +++ b/recipes/gs/gs-tools-native_8.64.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Tools needed for cross building Ghostscript" +LICENSE = "GPLv2" +HOMEPAGE = "http://www.gnu.org/software/ghostscript/ghostscript.html" +DEPENDS = "zlib-native fontconfig-native" + +S = "${WORKDIR}/ghostscript-${PV}~dfsg" +SRC_URI = "${DEBIAN_MIRROR}/main/g/ghostscript/ghostscript_${PV}~dfsg.orig.tar.gz;name=tarball" + +inherit autotools native + +SRC_URI[tarball.md5sum] = "e42706c2409815df5c959484080fd4a3" +SRC_URI[tarball.sha256sum] = "cc856d33cb781cdc3383b8eb4e0f390997f8359fe144a906b84297b5d377f03d" + +EXTRA_OECONF = "--without-x --without-jasper" + +do_compile() { + mkdir -p obj + for i in genarch genconf mkromfs echogs gendev genht; do + oe_runmake obj/$i + done +} + +NATIVE_INSTALL_WORKS = "1" + +do_install () { + install -d ${D}${bindir}/gs-tools-${PV} + for i in genarch genconf mkromfs echogs gendev genht; do + install -m 755 obj/$i ${D}${bindir}/gs-tools-${PV}/$i + done +} diff --git a/recipes/gs/gs_8.64.bb b/recipes/gs/gs_8.64.bb index 74cdcbf167..499758e80c 100644 --- a/recipes/gs/gs_8.64.bb +++ b/recipes/gs/gs_8.64.bb @@ -1,9 +1,9 @@ DESCRIPTION = "An interpreter of the Postscript language" -LICENSE = "GPL" +LICENSE = "GPLv2" SECTION = "console/utils" HOMEPAGE = "http://www.gnu.org/software/ghostscript/ghostscript.html" -DEPENDS = "jpeg zlib fontconfig cups" -PR = "r3" +DEPENDS = "jpeg zlib fontconfig cups gs-tools-native" +PR = "r4" SRC_URI = "${DEBIAN_MIRROR}/main/g/ghostscript/ghostscript_${PV}~dfsg.orig.tar.gz;name=tarball \ file://0001_svn_snapshot.patch \ @@ -22,7 +22,6 @@ SRC_URI = "${DEBIAN_MIRROR}/main/g/ghostscript/ghostscript_${PV}~dfsg.orig.tar.g SRC_URI[tarball.md5sum] = "e42706c2409815df5c959484080fd4a3" SRC_URI[tarball.sha256sum] = "cc856d33cb781cdc3383b8eb4e0f390997f8359fe144a906b84297b5d377f03d" - S = "${WORKDIR}/ghostscript-${PV}~dfsg" inherit autotools @@ -33,47 +32,26 @@ TARGET_CC_ARCH += "${LDFLAGS}" PACKAGES += "cups-gs" -do_configure_prepend() { - CC="${BUILD_CC}" LD="${BUILD_LD}" ./configure - mkdir obj - for i in genarch genconf mkromfs echogs gendev genht; do - make obj/$i - done - mv obj obj_host - make clean -} - do_configure() { - # hack script to allow for cross compiling - sed 's,&& ./configure$,& --host=\$host --build=\$build --target=\$target,g' -i configure - - gnu-configize - oe_runconf + # hack script to allow for cross compiling jasper + sed 's,&& ./configure$,& --host=\$host --build=\$build --target=\$target,g' -i configure + gnu-configize + CFLAGS="${CFLAGS} -fPIC" oe_runconf } do_configure_append() { - if [ ! -d obj ]; then - mkdir obj - fi - if [ ! -d soobj ]; then - mkdir soobj - fi + # copy tools from the native gs build + mkdir -p obj soobj for i in genarch genconf mkromfs echogs gendev genht; do - cp obj_host/$i obj/$i - cp obj_host/$i soobj/$i + cp ${STAGING_BINDIR_NATIVE}/gs-tools-${PV}/$i obj/$i + cp ${STAGING_BINDIR_NATIVE}/gs-tools-${PV}/$i soobj/$i done # Prevent mkromfs from being recompiled for the target cp ${WORKDIR}/unix-aux.mak base/ } -do_stage () { - install -d ${STAGING_INCDIR}/ghostscript - install -m 755 ${S}/psi/*.h ${STAGING_INCDIR}/ghostscript/ - oe_libinstall -so -C sobin libgs ${STAGING_LIBDIR} -} - do_compile_append () { - oe_runmake so + oe_runmake CFLAGS="${CFLAGS} -fPIC" so } do_install_prepend () { @@ -87,6 +65,9 @@ do_install_append () { # so duplicate it for compatibility mkdir -p ${D}/${datadir}/cups/mime/ cp ${D}/etc/cups/pstoraster.convs ${D}/${datadir}/cups/mime/ + + install -d ${D}${incluedir}/ghostscript + install -m 644 ${S}/psi/*.h ${D}${includedir}/ghostscript/ } FILES_${PN} += "${datadir}/ghostscript" -- cgit 1.2.3-korg