e17c79a947
Version 9.52: Highlights in this release include: The 9.52 release replaces the 9.51 release after a problem was reported with 9.51 which warranted the quick turnaround. Thus, like 9.51, 9.52 is primarily a maintenance release, consolidating the changes we introduced in 9.50. We have continued our work on code hygiene for this release, with a focus on the static analysis tool Coverity (from Synopsys, Inc) and we have now adopted a policy of maintaining zero Coverity issues in the Ghostscript/GhostPDL source base. IMPORTANT: In consultation with a representative of (OpenPrinting) it is our intention to deprecate and, in the not distant future, remove the OpenPrinting Vector/Raster Printer Drivers (that is, the opvp and oprp devices). If you rely on either of these devices, please get in touch with us, so we can discuss your use case, and revise our plans accordingly. IMPORTANT: We have forked LittleCMS2 into LittleCMS2mt (the "mt" indicating "multi-thread"). LCMS2 is not thread-safe, and cannot be made thread-safe without breaking the ABI. Our fork will be thread-safe and include performance enhancements (these changes have all be been offered and rejected upstream). We will maintain compatibility between Ghostscript and LCMS2 for a time, but not in perpetuity. If there is sufficient interest, our fork will be available as its own package separately from Ghostscript (and MuPDF). The usual round of bug fixes, compatibility changes, and incremental improvements.
124 lines
4 KiB
Makefile
124 lines
4 KiB
Makefile
# $NetBSD: Makefile,v 1.54 2020/03/24 16:34:45 adam Exp $
|
|
|
|
DISTNAME= ghostscript-${GS_VERSION}
|
|
PKGNAME= ${DISTNAME:S/ghostscript/ghostscript-agpl/}
|
|
CATEGORIES= print
|
|
MASTER_SITES= ${MASTER_SITE_GITHUB:=ArtifexSoftware/}
|
|
GITHUB_PROJECT= ghostpdl-downloads
|
|
GITHUB_RELEASE= gs${GS_VERSION:S/.//}
|
|
EXTRACT_SUFX= .tar.xz
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= https://ghostscript.com/
|
|
COMMENT= Postscript interpreter
|
|
|
|
# Upstream calls this "GPL Ghostscript", which is confusing;
|
|
# see https://bugs.ghostscript.com/show_bug.cgi?id=700877
|
|
# Plus adobe verbatim for Resources/CMap.
|
|
LICENSE= gnu-agpl-v3
|
|
|
|
.include "Makefile.common"
|
|
|
|
DEPENDS+= ghostscript-fonts>=6.0:../../fonts/ghostscript-fonts
|
|
|
|
USE_LANGUAGES+= c c++
|
|
USE_TOOLS+= gmake perl:run lex pkg-config
|
|
GNU_CONFIGURE= yes
|
|
UNLIMIT_RESOURCES+= datasize # gsromfs1.c
|
|
|
|
BUILD_TARGET= so
|
|
INSTALL_TARGET= soinstall
|
|
|
|
CONFIGURE_ARGS+= --enable-openjpeg
|
|
CONFIGURE_ARGS+= --with-system-libtiff
|
|
CONFIGURE_ENV+= LPLIBDIR=${PREFIX}/lib
|
|
CONFIGURE_ENV.HPUX+= ac_cv_func_fopen64=no
|
|
|
|
REPLACE_PERL+= toolbin/localcluster/clusterpush.pl
|
|
REPLACE_PERL+= toolbin/checkdeps.pl
|
|
REPLACE_PERL+= toolbin/pscet_status.pl
|
|
REPLACE_PERL+= toolbin/performance.pl
|
|
REPLACE_PERL+= toolbin/squeeze2html.pl
|
|
REPLACE_PERL+= toolbin/bugsByEngineer.pl
|
|
REPLACE_PERL+= toolbin/htmldiff.pl
|
|
|
|
GS_RESOURCEDIR= ${PREFIX}/share/ghostscript/${PKGVERSION}/Resource
|
|
# MESSAGE file substitution
|
|
MESSAGE_SUBST+= GS_RESOURCEDIR=${GS_RESOURCEDIR}
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
.include "../../mk/compiler.mk"
|
|
|
|
# \todo Remove "a4" as that is not valid according to pkglint.
|
|
.if defined(PAPERSIZE) && (${PAPERSIZE} == "A4" || ${PAPERSIZE} == "a4")
|
|
BUILD_DEFS+= PAPERSIZE
|
|
CFLAGS+= -DA4
|
|
.endif
|
|
|
|
REQD_DIRS+= share/ghostscript
|
|
|
|
SUBST_CLASSES+= resdir
|
|
SUBST_STAGE.resdir= post-extract
|
|
SUBST_MESSAGE.resdir= Fixing resource directory path
|
|
SUBST_FILES.resdir= Resource/Init/gs_res.ps
|
|
SUBST_SED.resdir= -e "s|/Resource/|${GS_RESOURCEDIR}/|g"
|
|
|
|
# On Linux-*-x86_64, there was an error message:
|
|
# gp_unix.o: relocation R_X86_64_32 against `a local symbol' can not be
|
|
# used when making a shared object; recompile with -fPIC
|
|
.if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang)
|
|
CFLAGS+= -fPIC
|
|
.endif
|
|
|
|
# Not ideal but too many files hardcode _XOPEN_SOURCE=500.
|
|
.if !empty(CC_VERSION:Mgcc-[6-9]*) || !empty(PKGSRC_COMPILER:Mclang)
|
|
CPPFLAGS.SunOS+= -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
|
|
.else
|
|
CPPFLAGS.SunOS+= -D__C99FEATURES__
|
|
.endif
|
|
|
|
# Interim IRIX build fix, the real problem is that fontconfig.pc doesn't
|
|
# require linking against libiconv when it should do so.
|
|
BUILDLINK_TRANSFORM.IRIX+= l:fontconfig:fontconfig:iconv
|
|
|
|
.include "options.mk"
|
|
|
|
post-extract:
|
|
${MKDIR} ${WRKSRC}/bin
|
|
${MKDIR} ${WRKSRC}/obj
|
|
${RM} -rf ${WRKSRC}/freetype
|
|
${RM} -rf ${WRKSRC}/jbig2dec
|
|
${RM} -rf ${WRKSRC}/jpeg
|
|
${RM} -rf ${WRKSRC}/lcms2
|
|
${RM} -rf ${WRKSRC}/lcms2mt
|
|
${RM} -rf ${WRKSRC}/libpng
|
|
${RM} -rf ${WRKSRC}/openjpeg
|
|
${RM} -rf ${WRKSRC}/tiff
|
|
${RM} -rf ${WRKSRC}/zlib
|
|
|
|
# To allow outside customization, rename cidfmap
|
|
# (if you look at inside of the file, it is logically empty)
|
|
.if !empty(PKG_OPTIONS:Mdisable-compile-inits)
|
|
(cd ${WRKSRC}/Resource/Init/; ${MV} cidfmap cidfmap.dist)
|
|
.endif
|
|
|
|
post-install:
|
|
${LN} -sf gsc ${DESTDIR}${PREFIX}/bin/gs
|
|
${RM} -f ${DESTDIR}${PREFIX}/share/ghostscript/${PKGVERSION_NOREV}/Resource/Init/gs_ttf.ps.orig
|
|
|
|
.include "../../devel/libidn/buildlink3.mk"
|
|
.include "../../devel/zlib/buildlink3.mk"
|
|
BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.10.0
|
|
.include "../../graphics/freetype2/buildlink3.mk"
|
|
# XXX: Strictly speaking jbig2dec>=0.16, however now jbig2dec is only checked
|
|
# XXX: via pkg-config and jbig2dec-0.17 is the first version that provides a
|
|
# XXX: .pc file.
|
|
BUILDLINK_API_DEPENDS.jbig2dec+= jbig2dec>=0.17
|
|
.include "../../graphics/jbig2dec/buildlink3.mk"
|
|
.include "../../graphics/lcms2/buildlink3.mk"
|
|
.include "../../graphics/openjpeg/buildlink3.mk"
|
|
.include "../../graphics/png/buildlink3.mk"
|
|
.include "../../graphics/tiff/buildlink3.mk"
|
|
.include "../../print/libpaper/buildlink3.mk"
|
|
.include "../../mk/jpeg.buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|