summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ghostscript/ghostscript_9.07.bb
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-extended/ghostscript/ghostscript_9.07.bb
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript_9.07.bb')
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.07.bb130
1 files changed, 130 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.07.bb b/meta/recipes-extended/ghostscript/ghostscript_9.07.bb
new file mode 100644
index 0000000000..64dc6f267f
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.07.bb
@@ -0,0 +1,130 @@
1SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
2DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
3a back-end to a program such as ghostview, it can display PostScript and PDF \
4documents in an X11 environment. \
5\
6Furthermore, it can render PostScript and PDF files as graphics to be printed \
7on non-PostScript printers. Supported printers include common \
8dot-matrix, inkjet and laser models. \
9\
10Package gsfonts contains a set of standard fonts for Ghostscript. \
11"
12HOMEPAGE = "http://www.ghostscript.com"
13SECTION = "console/utils"
14
15LICENSE = "GPLv3"
16LIC_FILES_CHKSUM = "file://LICENSE;md5=a5146dadaa8cd9f5f913b7577d49bf19"
17
18DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
19DEPENDS_class-native = ""
20
21SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz"
22
23SRC_URI = "${SRC_URI_BASE} \
24 file://ghostscript-9.02-prevent_recompiling.patch \
25 file://ghostscript-9.02-genarch.patch \
26 file://objarch.h \
27 file://ghostscript-9.02-parallel-make.patch \
28 file://ghostscript-9.05-NOT-check-endian.patch \
29 "
30
31SRC_URI_class-native = "${SRC_URI_BASE} \
32 file://ghostscript-native-fix-disable-system-libtiff.patch \
33 "
34
35SRC_URI[md5sum] = "57ebf17c5abcf0fc95a386bfff08c1a4"
36SRC_URI[sha256sum] = "44800d004c53f13192d1b5db413119198ddfc8a11c4d2a030aac2f2fda822ebf"
37
38EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
39 --with-fontpath=${datadir}/fonts --with-install-cups \
40 --without-libidn \
41 "
42
43# Explicity disable libtiff, fontconfig,
44# freetype, cups for ghostscript-native
45EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
46 --without-jbig2dec \
47 --with-fontpath=${datadir}/fonts \
48 --without-libidn --disable-fontconfig \
49 --disable-freetype --disable-cups"
50
51# This has been fixed upstream but for now we need to subvert the check for time.h
52# http://bugs.ghostscript.com/show_bug.cgi?id=692443
53# http://bugs.ghostscript.com/show_bug.cgi?id=692426
54CFLAGS += "-DHAVE_SYS_TIME_H=1"
55BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
56
57inherit autotools-brokensep
58
59do_configure_prepend () {
60 mkdir -p obj
61 mkdir -p soobj
62 if [ -e ${WORKDIR}/objarch.h ]; then
63 cp ${WORKDIR}/objarch.h obj/arch.h
64 fi
65 if [ ${SITEINFO_ENDIANNESS} = "le" ]; then
66 export BIGENDIAN="0"
67 export BIGENDIAN="0"
68 else
69 export BIGENDIAN="1"
70 export BIGENDIAN="1"
71 fi
72}
73
74do_configure_append () {
75 # copy tools from the native ghostscript build
76 if [ "${PN}" != "ghostscript-native" ]; then
77 mkdir -p obj/aux soobj
78 for i in genarch genconf mkromfs echogs gendev genht; do
79 cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
80 done
81 fi
82
83 # replace cups paths from sysroots/.../usr/bin/crossscripts/cups-config with target paths
84 # CUPSDATA is compiled into a utility, and CUPSSERVERBIN is used as an install path
85 CUPSSERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir
86 CUPSDATA=${datadir}/cups
87
88 sed -e "s#^CUPSSERVERBIN=.*#CUPSSERVERBIN=${CUPSSERVERBIN}#" -i Makefile
89 sed -e "s#^CUPSDATA=.*#CUPSDATA=${CUPSDATA}#" -i Makefile
90}
91
92do_install_append () {
93 mkdir -p ${D}${datadir}/ghostscript/${PV}/
94 cp -r Resource ${D}${datadir}/ghostscript/${PV}/
95 cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/
96
97 chown -R root:lp ${D}${sysconfdir}/cups
98}
99
100do_compile_class-native () {
101 mkdir -p obj
102 for i in genarch genconf mkromfs echogs gendev genht; do
103 oe_runmake obj/aux/$i
104 done
105}
106
107do_install_class-native () {
108 install -d ${D}${bindir}/ghostscript-${PV}
109 for i in genarch genconf mkromfs echogs gendev genht; do
110 install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
111 done
112}
113
114BBCLASSEXTEND = "native"
115
116# Ghostscript install tool 'instcopy' tries to remove already created
117# directories during install and parallel make causes problems.
118PARALLEL_MAKEINST=""
119
120PACKAGES =+ "${PN}-cups"
121
122FILES_${PN}-dbg += "${exec_prefix}/lib/cups/filter/.debug"
123
124FILES_${PN}-cups += "${exec_prefix}/lib/cups/filter/gstoraster \
125 ${exec_prefix}/lib/cups/filter/gstopxl \
126 ${datadir}/cups \
127 ${sysconfdir}/cups \
128 "
129
130RDEPENDS_${PN}-cups = "${PN}"