Annotation of pkgsrc/print/ghostscript-agpl/Makefile, Revision 1.69
1.69 ! wiz 1: # $NetBSD: Makefile,v 1.68 2022/07/14 23:46:26 dholland Exp $
1.1 dholland 2:
1.22 wiz 3: DISTNAME= ghostscript-${GS_VERSION}
1.1 dholland 4: PKGNAME= ${DISTNAME:S/ghostscript/ghostscript-agpl/}
1.69 ! wiz 5: PKGREVISION= 3
1.1 dholland 6: CATEGORIES= print
1.31 adam 7: MASTER_SITES= ${MASTER_SITE_GITHUB:=ArtifexSoftware/}
8: GITHUB_PROJECT= ghostpdl-downloads
1.59 leot 9: GITHUB_RELEASE= gs${GS_VERSION:S/.//g}
1.31 adam 10: EXTRACT_SUFX= .tar.xz
1.1 dholland 11:
12: MAINTAINER= pkgsrc-users@NetBSD.org
1.26 wiz 13: HOMEPAGE= https://ghostscript.com/
1.1 dholland 14: COMMENT= Postscript interpreter
1.38 gdt 15:
1.40 gdt 16: # Upstream calls this "GPL Ghostscript", which is confusing;
17: # see https://bugs.ghostscript.com/show_bug.cgi?id=700877
1.1 dholland 18: # Plus adobe verbatim for Resources/CMap.
19: LICENSE= gnu-agpl-v3
20:
1.38 gdt 21: .include "Makefile.common"
22:
1.1 dholland 23: DEPENDS+= ghostscript-fonts>=6.0:../../fonts/ghostscript-fonts
24:
1.38 gdt 25: USE_LANGUAGES+= c c++
1.1 dholland 26: USE_TOOLS+= gmake perl:run lex pkg-config
27: GNU_CONFIGURE= yes
1.38 gdt 28: UNLIMIT_RESOURCES+= datasize # gsromfs1.c
29:
30: BUILD_TARGET= so
31: INSTALL_TARGET= soinstall
32:
1.37 leot 33: CONFIGURE_ARGS+= --enable-openjpeg
1.1 dholland 34: CONFIGURE_ARGS+= --with-system-libtiff
1.62 adam 35: CONFIGURE_ARGS+= --without-tesseract
1.24 adam 36: CONFIGURE_ENV+= LPLIBDIR=${PREFIX}/lib
37: CONFIGURE_ENV.HPUX+= ac_cv_func_fopen64=no
1.1 dholland 38:
39: REPLACE_PERL+= toolbin/localcluster/clusterpush.pl
40: REPLACE_PERL+= toolbin/checkdeps.pl
41: REPLACE_PERL+= toolbin/pscet_status.pl
42: REPLACE_PERL+= toolbin/performance.pl
43: REPLACE_PERL+= toolbin/squeeze2html.pl
44: REPLACE_PERL+= toolbin/bugsByEngineer.pl
45: REPLACE_PERL+= toolbin/htmldiff.pl
46:
47: GS_RESOURCEDIR= ${PREFIX}/share/ghostscript/${PKGVERSION}/Resource
48: # MESSAGE file substitution
49: MESSAGE_SUBST+= GS_RESOURCEDIR=${GS_RESOURCEDIR}
50:
51: .include "../../mk/bsd.prefs.mk"
52: .include "../../mk/compiler.mk"
53:
1.65 triaxx 54: .if defined(PAPERSIZE) && ${PAPERSIZE} == "A4"
1.36 gdt 55: BUILD_DEFS+= PAPERSIZE
1.1 dholland 56: CFLAGS+= -DA4
57: .endif
58:
59: REQD_DIRS+= share/ghostscript
60:
61: SUBST_CLASSES+= resdir
62: SUBST_STAGE.resdir= post-extract
63: SUBST_MESSAGE.resdir= Fixing resource directory path
64: SUBST_FILES.resdir= Resource/Init/gs_res.ps
65: SUBST_SED.resdir= -e "s|/Resource/|${GS_RESOURCEDIR}/|g"
66:
67: # On Linux-*-x86_64, there was an error message:
68: # gp_unix.o: relocation R_X86_64_32 against `a local symbol' can not be
69: # used when making a shared object; recompile with -fPIC
70: .if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang)
71: CFLAGS+= -fPIC
72: .endif
73:
1.29 jperkin 74: # Not ideal but too many files hardcode _XOPEN_SOURCE=500.
1.63 jperkin 75: .if !empty(CC_VERSION:Mgcc-[6-9]*) || !empty(CC_VERSION:Mgcc-1[0-9].*) || !empty(PKGSRC_COMPILER:Mclang)
1.29 jperkin 76: CPPFLAGS.SunOS+= -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
1.32 jperkin 77: .else
78: CPPFLAGS.SunOS+= -D__C99FEATURES__
1.29 jperkin 79: .endif
80:
1.1 dholland 81: # Interim IRIX build fix, the real problem is that fontconfig.pc doesn't
82: # require linking against libiconv when it should do so.
1.18 jperkin 83: BUILDLINK_TRANSFORM.IRIX+= l:fontconfig:fontconfig:iconv
1.1 dholland 84:
85: .include "options.mk"
86:
87: post-extract:
88: ${MKDIR} ${WRKSRC}/bin
89: ${MKDIR} ${WRKSRC}/obj
90: ${RM} -rf ${WRKSRC}/freetype
1.6 adam 91: ${RM} -rf ${WRKSRC}/jbig2dec
1.1 dholland 92: ${RM} -rf ${WRKSRC}/jpeg
1.6 adam 93: ${RM} -rf ${WRKSRC}/lcms2
1.48 leot 94: ${RM} -rf ${WRKSRC}/lcms2mt
1.1 dholland 95: ${RM} -rf ${WRKSRC}/libpng
1.37 leot 96: ${RM} -rf ${WRKSRC}/openjpeg
1.9 adam 97: ${RM} -rf ${WRKSRC}/tiff
1.1 dholland 98: ${RM} -rf ${WRKSRC}/zlib
99:
100: # To allow outside customization, rename cidfmap
101: # (if you look at inside of the file, it is logically empty)
102: .if !empty(PKG_OPTIONS:Mdisable-compile-inits)
1.13 adam 103: (cd ${WRKSRC}/Resource/Init/; ${MV} cidfmap cidfmap.dist)
1.1 dholland 104: .endif
105:
106: post-install:
107: ${LN} -sf gsc ${DESTDIR}${PREFIX}/bin/gs
1.50 mef 108: ${RM} -f ${DESTDIR}${PREFIX}/share/ghostscript/${PKGVERSION_NOREV}/Resource/Init/gs_ttf.ps.orig
1.1 dholland 109:
1.6 adam 110: .include "../../devel/libidn/buildlink3.mk"
1.1 dholland 111: .include "../../devel/zlib/buildlink3.mk"
1.43 gavan 112: BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.10.0
1.1 dholland 113: .include "../../graphics/freetype2/buildlink3.mk"
1.59 leot 114: BUILDLINK_API_DEPENDS.jbig2dec+= jbig2dec>=0.19
1.6 adam 115: .include "../../graphics/jbig2dec/buildlink3.mk"
116: .include "../../graphics/lcms2/buildlink3.mk"
1.37 leot 117: .include "../../graphics/openjpeg/buildlink3.mk"
1.1 dholland 118: .include "../../graphics/png/buildlink3.mk"
119: .include "../../graphics/tiff/buildlink3.mk"
120: .include "../../print/libpaper/buildlink3.mk"
1.6 adam 121: .include "../../mk/jpeg.buildlink3.mk"
1.1 dholland 122: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>