PORTNAME=	udev-gothic-hs
PORTVERSION=	2.2.0
PORTREVISION=	0
CATEGORIES=	japanese x11-fonts
MASTER_SITES=	https://github.com/yuru7/udev-gothic/releases/download/v${PORTVERSION}/
PKGNAMEPREFIX=	ja-font-
DISTNAME=	UDEVGothic_HS_v${DISTVERSION}

MAINTAINER=	ume@FreeBSD.org
COMMENT=	UDEV Gothic (Full-width space invisible version)
WWW=		https://github.com/yuru7/udev-gothic

LICENSE=	OFL11

USES=		fonts:fc zip
NO_ARCH=	yes
NO_BUILD=	yes
WRKSRC=		${WRKDIR}/${DISTNAME}

OPTIONS_MULTI=			FONT_FAMILY
OPTIONS_MULTI_FONT_FAMILY=	UDEV_GOTHIC_HS UDEV_GOTHIC_HSJPDOC \
				UDEV_GOTHIC_HSLG UDEV_GOTHIC_35HS \
				UDEV_GOTHIC_35HSJPDOC UDEV_GOTHIC_35HSLG
OPTIONS_DEFAULT=		UDEV_GOTHIC_HS UDEV_GOTHIC_HSJPDOC \
				UDEV_GOTHIC_HSLG UDEV_GOTHIC_35HS \
				UDEV_GOTHIC_35HSJPDOC UDEV_GOTHIC_35HSLG
UDEV_GOTHIC_HS_DESC=		UDEVGothicHS
UDEV_GOTHIC_HSJPDOC_DESC=	UDEVGothicHSJPDOC
UDEV_GOTHIC_HSLG_DESC=		UDEVGothicHSLG
UDEV_GOTHIC_35HS_DESC=		UDEVGothic35HS
UDEV_GOTHIC_35HSJPDOC_DESC=	UDEVGothic35HSJPDOC
UDEV_GOTHIC_35HSLG_DESC=	UDEVGothic35HSLG

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MUDEV_GOTHIC_HS}
FONT_FAMILY+=	UDEVGothicHS
.endif
.if ${PORT_OPTIONS:MUDEV_GOTHIC_HSJPDOC}
FONT_FAMILY+=	UDEVGothicHSJPDOC
.endif
.if ${PORT_OPTIONS:MUDEV_GOTHIC_HSLG}
FONT_FAMILY+=	UDEVGothicHSLG
.endif
.if ${PORT_OPTIONS:MUDEV_GOTHIC_35HS}
FONT_FAMILY+=	UDEVGothic35HS
.endif
.if ${PORT_OPTIONS:MUDEV_GOTHIC_35HSJPDOC}
FONT_FAMILY+=	UDEVGothic35HSJPDOC
.endif
.if ${PORT_OPTIONS:MUDEV_GOTHIC_35HSLG}
FONT_FAMILY+=	UDEVGothic35HSLG
.endif

FONT_STYLE=	Bold BoldItalic Italic Regular

do-install:
	${MKDIR} ${STAGEDIR}${FONTSDIR}
.for FAMILY in ${FONT_FAMILY}
.  for STYLE in ${FONT_STYLE}
	${INSTALL_DATA} ${WRKSRC}/${FAMILY}-${STYLE}.ttf \
		${STAGEDIR}${FONTSDIR}
	@${ECHO_CMD} ${FONTSDIR}/${FAMILY}-${STYLE}.ttf >> ${TMPPLIST}
.  endfor
.endfor

.include <bsd.port.mk>
