* [PATCH] gs: Clean up and break into two recipes.
@ 2010-10-28 1:05 Graham Gower
0 siblings, 0 replies; only message in thread
From: Graham Gower @ 2010-10-28 1:05 UTC (permalink / raw)
To: openembedded-devel
* 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-28 1:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 1:05 [PATCH] gs: Clean up and break into two recipes Graham Gower
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.