| @@ -1,64 +1,84 @@ | | | @@ -1,64 +1,84 @@ |
1 | # $NetBSD: Makefile,v 1.10 2013/06/04 22:16:03 tron Exp $ | | 1 | # $NetBSD: Makefile,v 1.11 2014/01/09 08:08:55 mef Exp $ |
2 | | | 2 | |
3 | DISTNAME= ghostscript-cidfonts-ryumin-${GS_VERSION} | | 3 | DISTNAME= ghostscript-cidfonts-ryumin-${GS_VERSION} |
4 | DISTFILES= # empty | | 4 | DISTFILES= # empty |
5 | PKGREVISION= 6 | | 5 | PKGREVISION= 6 |
6 | CATEGORIES= fonts | | 6 | CATEGORIES= fonts |
7 | | | 7 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= makoto@ki.nu |
9 | COMMENT= Enable Ryumin-Light and GothicBBB for ghostscript | | 9 | COMMENT= Enable Ryumin-Light and GothicBBB for ghostscript |
10 | LICENSE= generic-nonlicense | | 10 | LICENSE= 2-clause-bsd |
11 | | | 11 | |
12 | .include "../../print/ghostscript-gpl/Makefile.common" | | 12 | # in PLIST, just use PKGVERSION_NOREV for the same value |
13 | | | 13 | GS_RESOURCEDIR= share/ghostscript/${GS_VERSION}/Resource |
14 | GS_RESOURCEDIR= share/ghostscript/${PKGVERSION}/Resource | | | |
15 | WRKSRC= ${WRKDIR}/gcr | | 14 | WRKSRC= ${WRKDIR}/gcr |
16 | INSTALLATION_DIRS+= ${GS_RESOURCEDIR}/Font | | 15 | INSTALLATION_DIRS+= ${GS_RESOURCEDIR}/Font |
17 | INSTALLATION_DIRS+= ${GS_RESOURCEDIR}/Init | | 16 | INSTALLATION_DIRS+= ${GS_RESOURCEDIR}/Init |
18 | | | 17 | |
19 | DEPENDS+= ghostscript-gpl>=9.05:../../print/ghostscript-gpl | | 18 | DEPENDS+= ghostscript>=9.05:../../print/ghostscript |
20 | DEPENDS+= ghostscript-cidfonts>=20000901nb3:../../fonts/ghostscript-cidfonts | | 19 | DEPENDS+= ghostscript-cidfonts>=20000901nb3:../../fonts/ghostscript-cidfonts |
21 | BUILD_DEFS+= GS_CIDFMAP | | 20 | BUILD_DEFS+= GS_CIDFMAP |
22 | # used in options.mk to switch adobe or ttf | | 21 | # used in options.mk to switch adobe or ttf |
23 | SUBST_VARS= GCR_INSTALL_TYPE | | 22 | SUBST_VARS= GCR_INSTALL_TYPE |
| | | 23 | PLIST_SUBST= PKGVERSION_NOREV=${PKGVERSION_NOREV} |
24 | | | 24 | |
| | | 25 | # Set following two variables and buildlink appropriate fonts |
| | | 26 | # GS_CIDFMAP |
| | | 27 | # GCR_INSTALL_TYPE |
25 | .include "options.mk" | | 28 | .include "options.mk" |
26 | | | 29 | |
27 | .if !empty(GS_CIDFMAP) | | 30 | .if !empty(GS_CIDFMAP) |
28 | SUBST_CLASSES+= ttf_path | | 31 | SUBST_CLASSES+= ttf_path |
29 | SUBST_STAGE.ttf_path= post-build | | 32 | SUBST_STAGE.ttf_path= post-build |
30 | SUBST_MESSAGE.ttf_path=Fixing ttf install directory in cidfmap | | 33 | SUBST_MESSAGE.ttf_path=Fixing ttf install directory in cidfmap |
31 | SUBST_FILES.ttf_path= ${GS_CIDFMAP} | | 34 | SUBST_FILES.ttf_path= ${GS_CIDFMAP} |
32 | SUBST_SED.ttf_path= -e 's|%%PREFIX%%|${PREFIX}|' | | 35 | SUBST_SED.ttf_path= -e 's|%%PREFIX%%|${PREFIX}|' |
33 | .endif | | 36 | .endif |
34 | | | 37 | |
35 | # To edit %%PREFIX%% in cidfmap before installation by SUBST, | | 38 | # To edit %%PREFIX%% in cidfmap before installation by SUBST, |
36 | do-build: | | 39 | do-build: |
37 | .if !empty(GS_CIDFMAP) | | 40 | .if !empty(GS_CIDFMAP) |
38 | ${MKDIR} ${WRKSRC} | | 41 | ${MKDIR} ${WRKSRC} |
39 | ${CP} files/${GS_CIDFMAP} ${WRKSRC} | | 42 | ${CP} files/${GS_CIDFMAP} ${WRKSRC} |
40 | .endif | | 43 | .endif |
41 | | | 44 | |
42 | do-install: | | 45 | do-install: |
43 | .if !empty(GS_CIDFMAP) | | 46 | .if !empty(GS_CIDFMAP) |
44 | ${INSTALL_DATA} ${WRKSRC}/${GS_CIDFMAP} ${DESTDIR}${PREFIX}/${GS_RESOURCEDIR}/Init/cidfmap | | 47 | ${INSTALL_DATA} ${WRKSRC}/${GS_CIDFMAP} ${DESTDIR}${PREFIX}/${GS_RESOURCEDIR}/Init/cidfmap |
45 | .endif | | 48 | .endif |
46 | # mainly Ryumin and GothicBBB | | 49 | # mainly Ryumin and GothicBBB |
47 | ${INSTALL_DATA} files/${GCR_INSTALL_TYPE}/[GR]* ${DESTDIR}${PREFIX}/${GS_RESOURCEDIR}/Font | | 50 | ${INSTALL_DATA} files/${GCR_INSTALL_TYPE}/[GR]* ${DESTDIR}${PREFIX}/${GS_RESOURCEDIR}/Font |
48 | | | 51 | |
49 | # no need to edit cidfmap | | 52 | # no need to edit cidfmap |
50 | .if empty(GS_CIDFMAP) | | 53 | .if empty(GS_CIDFMAP) |
51 | NO_BUILD= yes | | 54 | NO_BUILD= yes |
52 | .endif | | 55 | .endif |
53 | | | 56 | |
54 | NO_CHECKSUM= yes | | 57 | NO_CHECKSUM= yes |
55 | NO_CONFIGURE= yes | | 58 | NO_CONFIGURE= yes |
56 | | | 59 | |
57 | .include "../../print/ghostscript-gpl/buildlink3.mk" | | 60 | # Set options for ghostscript in case the package are not built yet: |
58 | | | 61 | # But for pbulk, it will override default binary package with this option (?) |
59 | .if empty(PKG_BUILD_OPTIONS.ghostscript-gpl:Mdisable-compile-inits) | | 62 | # No. Probably fails because build already done, and stops with FAIL_REASON being checked below. |
60 | PKG_FAIL_REASON+= 'You need to set PKG_OPTIONS.ghostscript+= disable-compile-inits, at its compile time.' | | 63 | ## PKGSRC_MAKE_ENV+= PKG_OPTIONS.ghostscript+=disable-compile-inits |
| | | 64 | ## PKG_OPTIONS.ghostscript+= disable-compile-inits |
| | | 65 | # Either above gives no effect, you need set manually on /etc/mk.conf or so. |
| | | 66 | # You may check if this option is enabled or not, by looking the string |
| | | 67 | # 'Initialization file are compiled into the executable.' when 'gs --help |grep Init' |
| | | 68 | # (String above shown means option is NOT selected). |
| | | 69 | .include "../../print/ghostscript/buildlink3.mk" |
| | | 70 | |
| | | 71 | # Following logic is flaky, for looking at PKG_OPTIONS.gs_type now NOT at build time |
| | | 72 | .if !empty(PKG_OPTIONS.gs_type:Mghostscript-agpl) |
| | | 73 | . include "../../print/ghostscript-agpl/Makefile.common" |
| | | 74 | . if empty(PKG_BUILD_OPTIONS.ghostscript-agpl:Mdisable-compile-inits) |
| | | 75 | PKG_FAIL_REASON+= '(agpl) You need to set PKG_OPTIONS.ghostscript+= disable-compile-inits, at its compile time.' |
| | | 76 | . endif |
| | | 77 | .else |
| | | 78 | . include "../../print/ghostscript-gpl/Makefile.common" |
| | | 79 | . if empty(PKG_BUILD_OPTIONS.ghostscript-gpl:Mdisable-compile-inits) |
| | | 80 | PKG_FAIL_REASON+= '(gpl) You need to set PKG_OPTIONS.ghostscript+= disable-compile-inits, at its compile time.' |
| | | 81 | . endif |
61 | .endif | | 82 | .endif |
62 | | | 83 | |
63 | #.include "../../fonts/adobe-cidfonts/buildlink3.mk" | | | |
64 | .include "../../mk/bsd.pkg.mk" | | 84 | .include "../../mk/bsd.pkg.mk" |