Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | HOMEPAGE = "http://www.ghostscript.com" |
| 11 | SECTION = "console/utils" |
| 12 | |
| 13 | LICENSE = "GPLv3" |
| 14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a" |
| 15 | |
| 16 | DEPENDS = "ghostscript-native tiff jpeg fontconfig cups" |
| 17 | DEPENDS_class-native = "" |
| 18 | |
| 19 | SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz \ |
| 20 | file://ghostscript-9.15-parallel-make.patch \ |
| 21 | file://ghostscript-9.16-Werror-return-type.patch \ |
| 22 | " |
| 23 | |
| 24 | SRC_URI = "${SRC_URI_BASE} \ |
| 25 | file://ghostscript-9.02-prevent_recompiling.patch \ |
| 26 | file://ghostscript-9.02-genarch.patch \ |
| 27 | file://objarch.h \ |
| 28 | file://cups-no-gcrypt.patch \ |
| 29 | " |
| 30 | |
| 31 | SRC_URI_class-native = "${SRC_URI_BASE} \ |
| 32 | file://ghostscript-native-fix-disable-system-libtiff.patch \ |
| 33 | file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \ |
| 34 | " |
| 35 | |
| 36 | SRC_URI[md5sum] = "829319325bbdb83f5c81379a8f86f38f" |
| 37 | SRC_URI[sha256sum] = "746d77280cca8afdd3d4c2c1389e332ed9b0605bd107bcaae1d761b061d1a68d" |
| 38 | |
| 39 | EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \ |
| 40 | --with-fontpath=${datadir}/fonts \ |
| 41 | --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \ |
| 42 | --with-cups-datadir=${datadir}/cups \ |
| 43 | ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \ |
| 44 | " |
| 45 | |
| 46 | EXTRA_OECONF_append_mips = " --with-large_color_index=0" |
| 47 | EXTRA_OECONF_append_mipsel = " --with-large_color_index=0" |
| 48 | |
| 49 | # Explicity disable libtiff, fontconfig, |
| 50 | # freetype, cups for ghostscript-native |
| 51 | EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \ |
| 52 | --without-jbig2dec \ |
| 53 | --with-fontpath=${datadir}/fonts \ |
| 54 | --without-libidn --disable-fontconfig \ |
| 55 | --disable-freetype --disable-cups" |
| 56 | |
| 57 | # This has been fixed upstream but for now we need to subvert the check for time.h |
| 58 | # http://bugs.ghostscript.com/show_bug.cgi?id=692443 |
| 59 | # http://bugs.ghostscript.com/show_bug.cgi?id=692426 |
| 60 | CFLAGS += "-DHAVE_SYS_TIME_H=1" |
| 61 | BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1" |
| 62 | |
| 63 | inherit autotools |
| 64 | |
| 65 | do_configure_prepend () { |
| 66 | mkdir -p obj |
| 67 | mkdir -p soobj |
| 68 | if [ -e ${WORKDIR}/objarch.h ]; then |
| 69 | cp ${WORKDIR}/objarch.h obj/arch.h |
| 70 | fi |
| 71 | } |
| 72 | |
| 73 | do_configure_append () { |
| 74 | # copy tools from the native ghostscript build |
| 75 | if [ "${PN}" != "ghostscript-native" ]; then |
| 76 | mkdir -p obj/aux soobj |
| 77 | for i in genarch genconf mkromfs echogs gendev genht; do |
| 78 | cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i |
| 79 | done |
| 80 | fi |
| 81 | } |
| 82 | |
| 83 | do_install_append () { |
| 84 | mkdir -p ${D}${datadir}/ghostscript/${PV}/ |
| 85 | cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/ |
| 86 | cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/ |
| 87 | } |
| 88 | |
| 89 | do_compile_class-native () { |
| 90 | mkdir -p obj |
| 91 | for i in genarch genconf mkromfs echogs gendev genht; do |
| 92 | oe_runmake obj/aux/$i |
| 93 | done |
| 94 | } |
| 95 | |
| 96 | do_install_class-native () { |
| 97 | install -d ${D}${bindir}/ghostscript-${PV} |
| 98 | for i in genarch genconf mkromfs echogs gendev genht; do |
| 99 | install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i |
| 100 | done |
| 101 | } |
| 102 | |
| 103 | BBCLASSEXTEND = "native" |