blob: 7be3e2ca8e8130138d307e544a5ce9a1b21b35bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
DESCRIPTION = "An interpreter of the Postscript language"
LICENSE = "GPL"
SECTION = "console/utils"
HOMEPAGE = "http://www.gnu.org/software/ghostscript/ghostscript.html"
DEPENDS = "jpeg fontconfig cups"
PR = "r0"
SRC_URI = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz;name=tarball \
file://unix-aux.mak \
"
SRC_URI[tarball.md5sum] = "5352c1c542cfabe928cfd3a17db051ad"
SRC_URI[tarball.sha256sum] = "2259d2b6a819d8a6daed274681c8de43996ae1767b20bfa0fc78e37a5be96a8b"
S = "${WORKDIR}/ghostscript-${PV}"
inherit autotools
EXTRA_OECONF = "--without-x --with-jasper --with-fontpath=${datadir}/fonts"
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
}
do_configure_append() {
if [ ! -d obj ]; then
mkdir obj
fi
if [ ! -d soobj ]; then
mkdir soobj
fi
for i in genarch genconf mkromfs echogs gendev genht; do
cp obj_host/$i obj/$i
cp obj_host/$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
}
do_install_prepend () {
sed -e 's#CUPSSERVERBIN=${STAGING_LIBDIR}/cups#CUPSSERVERBIN=${libdir}/cups#g' -i ${S}/Makefile
sed -e 's#CUPSDATA=${STAGING_DATADIR}/cups#CUPSDATA=${datadir}/cups#g' -i ${S}/Makefile
# 64 bit Ubuntu cp fails if file exists, so use -f option
sed -e 's#CP_=cp#CP_=cp -f#g' -i ${S}/base/unixhead.mak
}
do_install_append () {
oe_runmake 'DESTDIR=${D}' soinstall
# recent cups expects this file in /usr/share/cups/mime
# so duplicate it for compatibility
mkdir -p ${D}/${datadir}/cups/mime/
cp ${D}/etc/cups/pstoraster.convs ${D}/${datadir}/cups/mime/
}
FILES_${PN} += "${datadir}/ghostscript "
FILES_${PN}-dbg += "${libdir}/cups/filter/.debug/ "
FILES_cups-gs += "${libdir}/cups/filter/ ${datadir}/cups/ ${sysconfdir}/cups/*.convs "
RDEPENDS_cups-gs += "gs"
|