2014-01-08 14:16:18 +01:00
|
|
|
# $NetBSD: Makefile,v 1.12 2014/01/08 13:16:18 makoto Exp $
|
2011-02-23 14:40:10 +01:00
|
|
|
|
|
|
|
DISTNAME= ghostscript-cidfonts-ryumin-${GS_VERSION}
|
|
|
|
DISTFILES= # empty
|
2014-01-04 15:59:36 +01:00
|
|
|
PKGREVISION= 6
|
2012-10-07 15:10:30 +02:00
|
|
|
CATEGORIES= fonts
|
2011-02-23 14:40:10 +01:00
|
|
|
|
2011-11-02 16:46:46 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2011-04-04 17:19:10 +02:00
|
|
|
COMMENT= Enable Ryumin-Light and GothicBBB for ghostscript
|
2014-01-04 15:59:36 +01:00
|
|
|
LICENSE= 2-clause-bsd
|
2011-02-23 14:40:10 +01:00
|
|
|
|
2014-01-08 14:16:18 +01:00
|
|
|
# in PLIST, just use PKGVERSION_NOREV for the same value
|
2014-01-04 15:59:36 +01:00
|
|
|
GS_RESOURCEDIR= share/ghostscript/${GS_VERSION}/Resource
|
2011-02-23 14:40:10 +01:00
|
|
|
WRKSRC= ${WRKDIR}/gcr
|
|
|
|
INSTALLATION_DIRS+= ${GS_RESOURCEDIR}/Font
|
|
|
|
INSTALLATION_DIRS+= ${GS_RESOURCEDIR}/Init
|
|
|
|
|
2014-01-04 15:59:36 +01:00
|
|
|
DEPENDS+= ghostscript>=9.05:../../print/ghostscript
|
|
|
|
DEPENDS+= ghostscript-cidfonts>=20000901nb3:../../fonts/ghostscript-cidfonts
|
2011-11-02 16:46:46 +01:00
|
|
|
BUILD_DEFS+= GS_CIDFMAP
|
2011-03-30 14:49:24 +02:00
|
|
|
# used in options.mk to switch adobe or ttf
|
2011-02-23 14:40:10 +01:00
|
|
|
SUBST_VARS= GCR_INSTALL_TYPE
|
2014-01-04 15:59:36 +01:00
|
|
|
PLIST_SUBST= PKGVERSION_NOREV=${PKGVERSION_NOREV}
|
2011-02-23 14:40:10 +01:00
|
|
|
|
2014-01-08 14:16:18 +01:00
|
|
|
# Set following two variables and buildlink appropriate fonts
|
|
|
|
# GS_CIDFMAP
|
|
|
|
# GCR_INSTALL_TYPE
|
2011-02-23 14:40:10 +01:00
|
|
|
.include "options.mk"
|
|
|
|
|
|
|
|
.if !empty(GS_CIDFMAP)
|
|
|
|
SUBST_CLASSES+= ttf_path
|
|
|
|
SUBST_STAGE.ttf_path= post-build
|
2011-11-02 16:46:46 +01:00
|
|
|
SUBST_MESSAGE.ttf_path=Fixing ttf install directory in cidfmap
|
2011-04-04 17:19:10 +02:00
|
|
|
SUBST_FILES.ttf_path= ${GS_CIDFMAP}
|
|
|
|
SUBST_SED.ttf_path= -e 's|%%PREFIX%%|${PREFIX}|'
|
2011-02-23 14:40:10 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# To edit %%PREFIX%% in cidfmap before installation by SUBST,
|
|
|
|
do-build:
|
|
|
|
.if !empty(GS_CIDFMAP)
|
|
|
|
${MKDIR} ${WRKSRC}
|
|
|
|
${CP} files/${GS_CIDFMAP} ${WRKSRC}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
.if !empty(GS_CIDFMAP)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${GS_CIDFMAP} ${DESTDIR}${PREFIX}/${GS_RESOURCEDIR}/Init/cidfmap
|
|
|
|
.endif
|
|
|
|
# mainly Ryumin and GothicBBB
|
|
|
|
${INSTALL_DATA} files/${GCR_INSTALL_TYPE}/[GR]* ${DESTDIR}${PREFIX}/${GS_RESOURCEDIR}/Font
|
|
|
|
|
|
|
|
# no need to edit cidfmap
|
|
|
|
.if empty(GS_CIDFMAP)
|
|
|
|
NO_BUILD= yes
|
|
|
|
.endif
|
|
|
|
|
2011-04-04 17:19:10 +02:00
|
|
|
NO_CHECKSUM= yes
|
|
|
|
NO_CONFIGURE= yes
|
2011-02-23 14:40:10 +01:00
|
|
|
|
2014-01-04 15:59:36 +01:00
|
|
|
PKG_OPTIONS.ghostscript-agpl+= disable-compile-inits
|
|
|
|
PKG_OPTIONS.ghostscript-gpl+= disable-compile-inits
|
|
|
|
.include "../../print/ghostscript/buildlink3.mk"
|
2012-10-07 15:10:30 +02:00
|
|
|
|
2014-01-04 15:59:36 +01:00
|
|
|
# Following logic is flakey, for looking at PKG_OPTIONS.gs_type now NOT at build time
|
|
|
|
.if !empty(PKG_OPTIONS.gs_type:Mghostscript-gpl)
|
|
|
|
. include "../../print/ghostscript-gpl/Makefile.common"
|
|
|
|
. if empty(PKG_BUILD_OPTIONS.ghostscript-gpl:Mdisable-compile-inits)
|
|
|
|
PKG_FAIL_REASON+= '(gpl) You need to set PKG_OPTIONS.ghostscript+= disable-compile-inits, at its compile time.'
|
|
|
|
. endif
|
|
|
|
.else
|
|
|
|
. include "../../print/ghostscript-agpl/Makefile.common"
|
|
|
|
. if empty(PKG_BUILD_OPTIONS.ghostscript-agpl:Mdisable-compile-inits)
|
|
|
|
PKG_FAIL_REASON+= '(agpl) You need to set PKG_OPTIONS.ghostscript+= disable-compile-inits, at its compile time.'
|
|
|
|
. endif
|
2012-10-07 15:10:30 +02:00
|
|
|
.endif
|
|
|
|
|
2011-02-23 14:40:10 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|