All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graham Gower <graham.gower@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH] gs: Clean up and break into two recipes.
Date: Thu, 28 Oct 2010 11:35:01 +1030	[thread overview]
Message-ID: <4CC8CC3D.3010905@gmail.com> (raw)

* 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 <graham.gower@gmail.com>
---
 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 0000000..ea5f5fa
--- /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 74cdcbf..499758e 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"
-- 
1.7.1




                 reply	other threads:[~2010-10-28  1:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC8CC3D.3010905@gmail.com \
    --to=graham.gower@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.