aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/kterm/Makefile
blob: d367a66d2bc812701e066913e5fc7fdeb1e84b80 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# $FreeBSD$

PORTNAME=   kterm
PORTVERSION=    6.2.0
DISTVERSIONPREFIX=  v
DISTVERSIONSUFFIX=  .fb6
PORTREVISION=   14
CATEGORIES= japanese x11
MASTER_SITES=   LOCAL/hrs:pcemu
DISTFILES=  pcemu1.01alpha.tar.gz:pcemu
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= hrs@FreeBSD.org
COMMENT=    Xterm variant with Japanese support

LICENSE=    MIT

BUILD_DEPENDS=  nkf:japanese/nkf

BROKEN_aarch64= Fails to build: fatal error: kfontlist.c file not found

USES=       imake
USE_XORG=   ice sm x11 xaw xext xmu xpm xt
USE_GITHUB= yes
GH_ACCOUNT= hrs-allbsd
VGAFONT_USES=   fonts
CFLAGS+=    -Wno-return-type
PORTDOCS=   README.kt README.wallpaper.ja dot.termcap

OPTIONS_DEFINE= TEKTRONIXEMU VGAFONT
OPTIONS_DEFAULT=DEFAULT
OPTIONS_SINGLE= SCROLLBAR
OPTIONS_SINGLE_SCROLLBAR=   DEFAULT XAW3DLIB NEXTAWLIB
OPTIONS_SUB=    yes

XAW3DLIB_DESC=  with Xaw3d scrollbar
XAW3DLIB_LIB_DEPENDS=   libXaw3d.so:x11-toolkits/Xaw3d

NEXTAWLIB_DESC= with neXtaw scrollbar
NEXTAWLIB_LIB_DEPENDS=  libneXtaw.so:x11-toolkits/neXtaw

TEKTRONIXEMU_DESC=  Tektronix emulation

VGAFONT_DESC=   install VGA font
VGAFONT_EXTRACT_DEPENDS= \
    ${LOCALBASE}/bin/bdftopcf:x11-fonts/bdftopcf
VGAFONT_BUILD_DEPENDS= \
    ${LOCALBASE}/bin/mkfontdir:x11-fonts/mkfontdir \
    ${LOCALBASE}/bin/mkfontscale:x11-fonts/mkfontscale

NKFCMD=     ${LOCALBASE}/bin/nkf

post-extract-VGAFONT-on:
    ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
        ${DISTDIR}/${DIST_SUBDIR}/pcemu1.01alpha.tar.gz \
        ${EXTRACT_AFTER_ARGS} -C ${WRKDIR} pcemu1.01alpha/vga.bdf
    cd ${WRKDIR}/pcemu1.01alpha && \
        ${LOCALBASE}/bin/bdftopcf vga.bdf | ${GZIP_CMD} > vga.pcf.gz

post-extract-TEKTRONIXEMU-on:
    echo "#undef  KTERM_NOTEK" >> ${WRKSRC}/kterm.h
post-extract-TEKTRONIXEMU-off:
    echo "#undef  KTERM_NOTEK" >> ${WRKSRC}/kterm.h
    echo "#define KTERM_NOTEK" >> ${WRKSRC}/kterm.h

post-extract-XAW3DLIB-on:
    echo "#undef KTERM_XAW3D" >> ${WRKSRC}/kterm.h
    echo "#undef USE_XAW3DLIB" >> ${WRKSRC}/kterm.h
    echo "#define KTERM_XAW3D" >> ${WRKSRC}/kterm.h
    echo "#define USE_XAW3DLIB" >> ${WRKSRC}/kterm.h
post-extract-XAW3DLIB-off:
    echo "#undef  KTERM_XAW3D" >> ${WRKSRC}/kterm.h

post-extract-NEXTAWLIB-on:
    echo "#undef KTERM_XAW3D" >> ${WRKSRC}/kterm.h
    echo "#undef USE_NEXTAWLIB" >> ${WRKSRC}/kterm.h
    echo "#define KTERM_XAW3D" >> ${WRKSRC}/kterm.h
    echo "#define USE_NEXTAWLIB" >> ${WRKSRC}/kterm.h
post-extract-NEXTAWLIB-off:
    echo "#undef  KTERM_XAW3D" >> ${WRKSRC}/kterm.h

post-extract:
    ${ECHO_CMD} "#undef InstallXtermSetUID" >> ${WRKSRC}/kterm.h
    ${ECHO_CMD} "#define InstallXtermSetUID 0" >> ${WRKSRC}/kterm.h

post-build:
    ${NKFCMD} -e -u ${WRKSRC}/kterm.jman \
        | ${GZIP_CMD} > ${WRKSRC}/kterm.1.gz
post-install:
    ${INSTALL_MAN} ${WRKSRC}/kterm.1.gz ${STAGEDIR}${MANPREFIX}/man/ja/man1
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} \
        ${WRKSRC}/README.kt \
        ${WRKSRC}/README.wallpaper.ja \
        ${FILESDIR}/dot.termcap \
        ${STAGEDIR}${DOCSDIR}
post-install-VGAFONT-on:
    ${MKDIR} ${STAGEDIR}${FONTSDIR}
    ${INSTALL_DATA} ${WRKDIR}/pcemu1.01alpha/vga.pcf.gz \
        ${STAGEDIR}${FONTSDIR}

.include <bsd.port.mk>