aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/gxditview/Makefile
blob: f454ee42991fda77310cf1d5bddbb8f0827f4c0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# New ports collection makefile for:    gxditview (part of ja-groff)
# Date created:     14 April 1995
# Whom:         Nobuhiro Yasutomi <nobu@psrc.isac.co.jp>
#
# $FreeBSD$
#

PORTNAME=   gxditview
PORTVERSION=    1.18.1
PORTREVISION=   3
CATEGORIES= japanese print
MASTER_SITES=   ${MASTER_SITE_DEBIAN}
MASTER_SITE_SUBDIR= pool/main/g/groff
DISTNAME=   groff-${PORTVERSION}
DISTFILES=  ${DISTNAME:S,-,_,}.orig${EXTRACT_SUFX}

PATCH_SITES=    ${MASTER_SITE_DEBIAN}
PATCH_SITE_SUBDIR=  pool/main/g/groff
PATCHFILES= ${DISTNAME:S,-,_,}-15.diff.gz
PATCH_DIST_STRIP=   -p1

MAINTAINER= okazaki@FreeBSD.org
COMMENT=    Japanese enhancement of GNU xditview

RUN_DEPENDS=    ${LOCALBASE}/bin/groff:${PORTSDIR}/japanese/groff

CONFLICTS=  gxditview-*

GNU_CONFIGURE=  yes
#USE_GMAKE= yes
USE_IMAKE=  yes
USE_ICONV=  yes
USE_REINPLACE=  yes

CONFIGURE_ARGS= --program-prefix=g --enable-multibyte
CONFIGURE_ENV=  INSTALL_MAN="${INSTALL_MAN}" \
        LIBS="-L${LOCALBASE}/lib -liconv"
CFLAGS+=    -I${LOCALBASE}/include

MAKE_ARGS=  GROFF_PREFIX=${LOCALBASE} \
        EXTRA_LIBRARIES="-L${LOCALBASE}/lib -liconv"
XDITVIEW_WRKSRC=${WRKDIR}/${DISTNAME}/src/xditview
BUILD_WRKSRC=   ${XDITVIEW_WRKSRC}
INSTALL_WRKSRC= ${XDITVIEW_WRKSRC}

MAN1=       gxditview.1

.include <bsd.port.pre.mk>

post-extract:
    ${CP} ${FILESDIR}/Imakefile ${WRKSRC}

post-patch:
    ${REINPLACE_CMD} -e 's|^\(GROFF_PREFIX =\) @prefix@|\1 ${LOCALBASE}|g;' \
        ${XDITVIEW_WRKSRC}/Imakefile.in
    ${REINPLACE_CMD} -e 's|-I$$(TOOLKITSRC)|-I${LOCALBASE}/include|g;' \
        ${XDITVIEW_WRKSRC}/Imakefile.in

post-configure:
    (cd ${XDITVIEW_WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF})

.include <bsd.port.post.mk>