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