| @@ -1,122 +1,126 @@ | | | @@ -1,122 +1,126 @@ |
1 | # $NetBSD: Makefile,v 1.26 2017/05/19 13:29:04 prlw1 Exp $ | | 1 | # $NetBSD: Makefile,v 1.27 2017/05/24 15:19:12 jperkin Exp $ |
2 | | | 2 | |
3 | DISTNAME= ghostscript-${GS_VERSION} | | 3 | DISTNAME= ghostscript-${GS_VERSION} |
4 | PKGNAME= ${DISTNAME:S/ghostscript/ghostscript-gpl/} | | 4 | PKGNAME= ${DISTNAME:S/ghostscript/ghostscript-gpl/} |
5 | PKGREVISION= 13 | | 5 | PKGREVISION= 13 |
6 | CATEGORIES= print | | 6 | CATEGORIES= print |
7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ghostscript/} | | 7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ghostscript/} |
8 | MASTER_SITES+= http://ghostscript.com/releases/ | | 8 | MASTER_SITES+= http://ghostscript.com/releases/ |
9 | EXTRACT_SUFX= .tar.bz2 | | 9 | EXTRACT_SUFX= .tar.bz2 |
10 | | | 10 | |
11 | MAINTAINER= pkgsrc-users@NetBSD.org | | 11 | MAINTAINER= pkgsrc-users@NetBSD.org |
12 | HOMEPAGE= http://ghostscript.sourceforge.net/ | | 12 | HOMEPAGE= http://ghostscript.sourceforge.net/ |
13 | COMMENT= Postscript interpreter | | 13 | COMMENT= Postscript interpreter |
14 | | | 14 | |
15 | # Plus adobe verbatim for Resources/CMap. | | 15 | # Plus adobe verbatim for Resources/CMap. |
16 | LICENSE= gnu-gpl-v3 | | 16 | LICENSE= gnu-gpl-v3 |
17 | | | 17 | |
18 | .include "Makefile.common" | | 18 | .include "Makefile.common" |
19 | | | 19 | |
20 | DEPENDS+= ghostscript-fonts>=6.0:../../fonts/ghostscript-fonts | | 20 | DEPENDS+= ghostscript-fonts>=6.0:../../fonts/ghostscript-fonts |
21 | | | 21 | |
22 | CONFLICTS+= ghostscript-afpl-[0-9]* | | 22 | CONFLICTS+= ghostscript-afpl-[0-9]* |
23 | # To avoid flag from pkglint | | 23 | # To avoid flag from pkglint |
24 | CONFLICTS+= ghostscript-esp-[0-9]* | | 24 | CONFLICTS+= ghostscript-esp-[0-9]* |
25 | CONFLICTS+= ghostscript-esp-nox11-[0-9]* | | 25 | CONFLICTS+= ghostscript-esp-nox11-[0-9]* |
26 | CONFLICTS+= ghostscript-gnu-x11-[0-9]* | | 26 | CONFLICTS+= ghostscript-gnu-x11-[0-9]* |
27 | CONFLICTS+= ghostscript-gnu-nox11-[0-9]* | | 27 | CONFLICTS+= ghostscript-gnu-nox11-[0-9]* |
28 | | | 28 | |
29 | USE_TOOLS+= gmake perl:run lex pkg-config | | 29 | USE_TOOLS+= gmake perl:run lex pkg-config |
30 | USE_LANGUAGES+= c c++ | | 30 | USE_LANGUAGES+= c c++ |
31 | GNU_CONFIGURE= yes | | 31 | GNU_CONFIGURE= yes |
32 | UNLIMIT_RESOURCES+= datasize # gsromfs1.c | | 32 | UNLIMIT_RESOURCES+= datasize # gsromfs1.c |
33 | | | 33 | |
34 | BUILD_TARGET= so | | 34 | BUILD_TARGET= so |
35 | INSTALL_TARGET= soinstall | | 35 | INSTALL_TARGET= soinstall |
36 | CONFIGURE_ARGS+= --with-omni=no # otherwise pulls in libstdc++ | | 36 | CONFIGURE_ARGS+= --with-omni=no # otherwise pulls in libstdc++ |
37 | | | 37 | |
38 | REPLACE_PERL+= toolbin/localcluster/clusterpush.pl | | 38 | REPLACE_PERL+= toolbin/localcluster/clusterpush.pl |
39 | REPLACE_PERL+= toolbin/checkdeps.pl | | 39 | REPLACE_PERL+= toolbin/checkdeps.pl |
40 | REPLACE_PERL+= toolbin/pscet_status.pl | | 40 | REPLACE_PERL+= toolbin/pscet_status.pl |
41 | REPLACE_PERL+= toolbin/performance.pl | | 41 | REPLACE_PERL+= toolbin/performance.pl |
42 | REPLACE_PERL+= toolbin/squeeze2html.pl | | 42 | REPLACE_PERL+= toolbin/squeeze2html.pl |
43 | REPLACE_PERL+= toolbin/bugsByEngineer.pl | | 43 | REPLACE_PERL+= toolbin/bugsByEngineer.pl |
44 | REPLACE_PERL+= toolbin/htmldiff.pl | | 44 | REPLACE_PERL+= toolbin/htmldiff.pl |
45 | | | 45 | |
46 | GS_RESOURCEDIR= ${PREFIX}/share/ghostscript/${PKGVERSION}/Resource | | 46 | GS_RESOURCEDIR= ${PREFIX}/share/ghostscript/${PKGVERSION}/Resource |
47 | # MESSAGE file substitution | | 47 | # MESSAGE file substitution |
48 | MESSAGE_SUBST+= GS_RESOURCEDIR=${GS_RESOURCEDIR} | | 48 | MESSAGE_SUBST+= GS_RESOURCEDIR=${GS_RESOURCEDIR} |
49 | | | 49 | |
50 | # XXX make sure the local jpeg headers are found before those pulled | | 50 | # XXX make sure the local jpeg headers are found before those pulled |
51 | # in indirectly by cups bl3 | | 51 | # in indirectly by cups bl3 |
52 | CPPFLAGS+= -Ijpeg | | 52 | CPPFLAGS+= -Ijpeg |
53 | | | 53 | |
54 | .include "../../mk/bsd.prefs.mk" | | 54 | .include "../../mk/bsd.prefs.mk" |
55 | .include "../../mk/compiler.mk" | | 55 | .include "../../mk/compiler.mk" |
56 | | | 56 | |
57 | .if defined(PAPERSIZE) && (${PAPERSIZE} == "A4" || ${PAPERSIZE} == "a4") | | 57 | .if defined(PAPERSIZE) && (${PAPERSIZE} == "A4" || ${PAPERSIZE} == "a4") |
58 | CFLAGS+= -DA4 | | 58 | CFLAGS+= -DA4 |
59 | .endif | | 59 | .endif |
60 | | | 60 | |
61 | REQD_DIRS+= share/ghostscript | | 61 | REQD_DIRS+= share/ghostscript |
62 | | | 62 | |
63 | SUBST_CLASSES+= resdir | | 63 | SUBST_CLASSES+= resdir |
64 | SUBST_STAGE.resdir= post-extract | | 64 | SUBST_STAGE.resdir= post-extract |
65 | SUBST_MESSAGE.resdir= Fixing resource directory path | | 65 | SUBST_MESSAGE.resdir= Fixing resource directory path |
66 | SUBST_FILES.resdir= Resource/Init/gs_res.ps | | 66 | SUBST_FILES.resdir= Resource/Init/gs_res.ps |
67 | SUBST_SED.resdir= -e "s|/Resource/|${GS_RESOURCEDIR}/|g" | | 67 | SUBST_SED.resdir= -e "s|/Resource/|${GS_RESOURCEDIR}/|g" |
68 | | | 68 | |
69 | CONFIGURE_ENV.HPUX+= ac_cv_func_fopen64=no | | 69 | CONFIGURE_ENV.HPUX+= ac_cv_func_fopen64=no |
70 | | | 70 | |
71 | # On Linux-*-x86_64, there was an error message: | | 71 | # On Linux-*-x86_64, there was an error message: |
72 | # gp_unix.o: relocation R_X86_64_32 against `a local symbol' can not be | | 72 | # gp_unix.o: relocation R_X86_64_32 against `a local symbol' can not be |
73 | # used when making a shared object; recompile with -fPIC | | 73 | # used when making a shared object; recompile with -fPIC |
74 | .if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang) | | 74 | .if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang) |
75 | CFLAGS+= -fPIC | | 75 | CFLAGS+= -fPIC |
76 | .endif | | 76 | .endif |
77 | | | 77 | |
| | | 78 | .if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc-[7-9]*) |
| | | 79 | CPPFLAGS+= -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ |
| | | 80 | .endif |
| | | 81 | |
78 | # Interim IRIX build fix, the real problem is that fontconfig.pc doesn't | | 82 | # Interim IRIX build fix, the real problem is that fontconfig.pc doesn't |
79 | # require linking against libiconv when it should do so. | | 83 | # require linking against libiconv when it should do so. |
80 | BUILDLINK_TRANSFORM.IRIX+= l:fontconfig:fontconfig:iconv | | 84 | BUILDLINK_TRANSFORM.IRIX+= l:fontconfig:fontconfig:iconv |
81 | | | 85 | |
82 | CONFIGURE_ENV+= LPLIBDIR=${PREFIX}/lib | | 86 | CONFIGURE_ENV+= LPLIBDIR=${PREFIX}/lib |
83 | | | 87 | |
84 | # On OpenBSD 5.3, libxcb is required libXt. | | 88 | # On OpenBSD 5.3, libxcb is required libXt. |
85 | LDFLAGS.OpenBSD+= -lxcb | | 89 | LDFLAGS.OpenBSD+= -lxcb |
86 | | | 90 | |
87 | .if ${OS_VARIANT} == "SCOOSR5" | | 91 | .if ${OS_VARIANT} == "SCOOSR5" |
88 | # SCO OpenServer 5.0.7/3.2 has windows.h, and configure expacts it for MS Windows. | | 92 | # SCO OpenServer 5.0.7/3.2 has windows.h, and configure expacts it for MS Windows. |
89 | CONFIGURE_ENV+= ac_cv_header_windows_h=no | | 93 | CONFIGURE_ENV+= ac_cv_header_windows_h=no |
90 | .endif | | 94 | .endif |
91 | | | 95 | |
92 | .include "options.mk" | | 96 | .include "options.mk" |
93 | | | 97 | |
94 | post-extract: | | 98 | post-extract: |
95 | ${MKDIR} ${WRKSRC}/bin | | 99 | ${MKDIR} ${WRKSRC}/bin |
96 | ${MKDIR} ${WRKSRC}/obj | | 100 | ${MKDIR} ${WRKSRC}/obj |
97 | # ${RM} -rf ${WRKSRC}/jasper | | 101 | # ${RM} -rf ${WRKSRC}/jasper |
98 | ${RM} -rf ${WRKSRC}/libpng | | 102 | ${RM} -rf ${WRKSRC}/libpng |
99 | # ${RM} -rf ${WRKSRC}/tiff | | 103 | # ${RM} -rf ${WRKSRC}/tiff |
100 | # UX:i386ld: ERROR: symbol: 'deflate_copyright' defined in two shared objects: libgs.so: size = 53, libz.so.1: size = 68 | | 104 | # UX:i386ld: ERROR: symbol: 'deflate_copyright' defined in two shared objects: libgs.so: size = 53, libz.so.1: size = 68 |
101 | .if ${OS_VARIANT} == "SCOOSR5" | | 105 | .if ${OS_VARIANT} == "SCOOSR5" |
102 | ${RM} -rf ${WRKSRC}/zlib | | 106 | ${RM} -rf ${WRKSRC}/zlib |
103 | .endif | | 107 | .endif |
104 | ${RM} -rf ${WRKSRC}/freetype | | 108 | ${RM} -rf ${WRKSRC}/freetype |
105 | # | | 109 | # |
106 | # To allow outside customization, rename cidfmap | | 110 | # To allow outside customization, rename cidfmap |
107 | # (if you look at inside of the file, it is logically empty) | | 111 | # (if you look at inside of the file, it is logically empty) |
108 | .if !empty(PKG_OPTIONS:Mdisable-compile-inits) | | 112 | .if !empty(PKG_OPTIONS:Mdisable-compile-inits) |
109 | (cd ${WRKSRC}/Resource/Init/; ${MV} cidfmap cidfmap.dist) | | 113 | (cd ${WRKSRC}/Resource/Init/; ${MV} cidfmap cidfmap.dist) |
110 | .endif | | 114 | .endif |
111 | | | 115 | |
112 | post-install: | | 116 | post-install: |
113 | ${LN} -sf gsc ${DESTDIR}${PREFIX}/bin/gs | | 117 | ${LN} -sf gsc ${DESTDIR}${PREFIX}/bin/gs |
114 | | | 118 | |
115 | .include "../../print/libpaper/buildlink3.mk" | | 119 | .include "../../print/libpaper/buildlink3.mk" |
116 | .include "../../graphics/png/buildlink3.mk" | | 120 | .include "../../graphics/png/buildlink3.mk" |
117 | .include "../../graphics/tiff/buildlink3.mk" | | 121 | .include "../../graphics/tiff/buildlink3.mk" |
118 | .include "../../devel/zlib/buildlink3.mk" | | 122 | .include "../../devel/zlib/buildlink3.mk" |
119 | .include "../../graphics/freetype2/buildlink3.mk" | | 123 | .include "../../graphics/freetype2/buildlink3.mk" |
120 | # pkgsrc jasper is too new | | 124 | # pkgsrc jasper is too new |
121 | #.include "../../graphics/jasper/buildlink3.mk" | | 125 | #.include "../../graphics/jasper/buildlink3.mk" |
122 | .include "../../mk/bsd.pkg.mk" | | 126 | .include "../../mk/bsd.pkg.mk" |