NAME="ghostscript" VERSION=9.21 RELEASE=1 CATEGORY="Graphics" SUMMARY="GPL PostScript interpreter" DESCRIPTION="GNU Ghostscript is a Postscript interpreter capable of converting PS files into a number of printer output formats. Ghostscript can also render PS files into a number of graphics file formats." ORIG_PN="ghostscript" GENTOO_PN="ghostscript-gpl" HOMEPAGE="https://www.ghostscript.com/" SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs`echo ${VERSION} | sed 's/\.//'`/${NAME}-${VERSION}.tar.gz" PATCH_URI="ghostscript-unixlpr.patch" DEPEND=" libfontconfig-devel libfreetype-devel libiconv-devel libidn-devel libjpeg-devel liblcms2-devel libpaper-devel libpng-devel libtiff-devel libX11-devel libXt-devel zlib-devel " abi=9 PKG_NAMES="${PN} libgs${abi} libgs-devel" ghostscript_SUMMARY="${SUMMARY} (utilities)" ghostscript_REQUIRES="ghostscript-fonts-other ghostscript-fonts-std" ghostscript_CONTENTS=" --exclude=usr/bin/cyggs-${abi}.dll usr/bin/ usr/share/ " libgs9_CATEGORY="Libs ${CATEGORY}" libgs9_SUMMARY="${SUMMARY} (runtime)" libgs9_CONTENTS="usr/bin/cyggs-${abi}.dll" libgs_devel_CATEGORY="Devel Libs ${CATEGORY}" libgs_devel_SUMMARY="${SUMMARY} (development)" libgs_devel_CONTENTS=" usr/include/ usr/lib/ " DISTCLEANFILES="cups/pstopxl cups/pstoraster" CYGPORT_USE_UNSTABLE_API=1 src_unpack_hook() { rm -rf expat/ freetype/ jpeg/ lcms{,2}/ libpng/ tiff/ zlib/ } src_compile() { cd ${S} cygautoreconf lndirs cd ${B} cygconf \ --enable-fontconfig \ --enable-freetype \ --disable-cups \ --disable-gtk \ --disable-compile-inits \ --with-libidn \ --with-libpaper \ --with-system-libtiff \ --with-ijs \ --with-jbig2dec \ --with-x \ --with-drivers=ALL \ --with-fontpath=/usr/share/${ORIG_PN}/fonts:/usr/share/fonts/TTF:/usr/share/fonts/Type1 cygmake -j1 so \ GLSRCDIR=${S}/base \ PSSRCDIR=${S}/psi \ PSLIBDIR=${S}/lib \ CONTRIBDIR=${S}/contrib \ ICCSRCDIR=${S}/icclib \ IJSSRCDIR=${S}/ijs \ IMDISRCDIR=${S}/imdi \ JBIG2SRCDIR=${B}/jbig2dec \ LCMS2SRCDIR=/usr \ WHICH_CMS=lcms2 \ GS=gs \ GS_SONAME='libgs-$(GS_VERSION_MAJOR).dll.a' \ GS_SONAME_MAJOR='libgs-$(GS_VERSION_MAJOR).dll.a' \ GS_SONAME_MAJOR_MINOR='cyggs-$(GS_VERSION_MAJOR).dll' \ GS_LDFLAGS_SO='-shared -Wl,--out-implib,sobin/libgs.dll.a' } src_test() { : } src_install() { cd ${B} cygmake soinstall \ DESTDIR=${D} \ docdir=/usr/share/doc/${PN} \ GLSRCDIR=${S}/base \ PSSRCDIR=${S}/psi \ PSLIBDIR=${S}/lib \ CONTRIBDIR=${S}/contrib \ ICCSRCDIR=${S}/icclib \ IJSSRCDIR=${S}/ijs \ IMDISRCDIR=${S}/imdi \ JBIG2SRCDIR=${S}/jbig2dec \ LCMS2SRCDIR=/usr \ WHICH_CMS=lcms2 \ GS=gs \ GS_SONAME='libgs-$(GS_VERSION_MAJOR).dll.a' \ GS_SONAME_MAJOR='libgs-$(GS_VERSION_MAJOR).dll.a' \ GS_SONAME_MAJOR_MINOR='cyggs-$(GS_VERSION_MAJOR).dll' \ GS_LDFLAGS_SO='-shared -Wl,--out-implib,sobin/libgs.dll.a' mv ${D}/usr/bin/gs{c,}.exe rm -f ${D}/usr/bin/gsx.exe mv ${D}/usr/lib/*.dll ${D}/usr/bin rm ${D}/usr/lib/*.a dolib ${B}/sobin/libgs.dll.a } DOCS="doc/COPYING doc/Details9.htm doc/History9.htm doc/Ps2ps2.htm "