summaryrefslogtreecommitdiffabout
diff options
context:
space:
mode:
authorGraham Gower <graham.gower@gmail.com>2010-10-27 15:05:01 (GMT)
committer Khem Raj <raj.khem@gmail.com>2010-10-28 04:40:11 (GMT)
commit74d7b8e7a0c52178a8a111415586eb15d802a88b (patch)
tree3956a2033533bc3958a9f5dba8b9b12c97390907
parent9ccba6c9c0212abc2e9414c09932d6daab29fd8c (diff)
downloadopenembedded-74d7b8e7a0c52178a8a111415586eb15d802a88b.zip
openembedded-74d7b8e7a0c52178a8a111415586eb15d802a88b.tar.gz
openembedded-74d7b8e7a0c52178a8a111415586eb15d802a88b.tar.bz2
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 <graham.gower@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes/gs/gs-tools-native_8.64.bb30
-rw-r--r--recipes/gs/gs_8.64.bb49
2 files changed, 45 insertions, 34 deletions
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"