aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/nicetext/Makefile
blob: 28e87c8cb25c6ec632caa90076d2d410ac107458 (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:    nicetext
# Date created:     20 February 1998
# Whom:         Mark Chapman <markc@ctgi.net>
#
# $FreeBSD$

PORTNAME=   nicetext
PORTVERSION=    0.9
PORTREVISION=   2
CATEGORIES= textproc
MASTER_SITES=   http://wiretapped.securax.org/security/steganography/nicetext/ \
        http://www.nicetext.com/pub/ctgi/nicetext/src/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Convert files to pseudo-natural-language text and back again

USE_REINPLACE=  yes
USE_GMAKE=  yes
CFLAGS+=    -fpermissive

MAN1=       bitcp.1 dct2mstr.1 expgram.1 genmodel.1 gramtest.1 impkimmo.1 \
        impmsc.1 impwbstr.1 listword.1 nicetext.1 nttpd.1 printint.1 \
        scramble.1 sortdct.1 txt2dct.1
PROGRAMS=   bitcp dct2mstr expgram genmodel gramtest impkimmo impmsc \
        impwbstr listword nicetext nttpd printint rinfo scramble \
        sortdct txt2dct

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 502126
USE_GCC=    3.3
.endif

post-patch:
    @${FIND} ${WRKSRC} -name "Makefile" | ${XARGS} ${REINPLACE_CMD} -e \
        's|gcc|$${CC}|g ; \
         s|g++|$${CXX}|g'

post-install:
    @${ECHO_CMD} "#!/bin/sh" > ${WRKSRC}/bin/qstart-nttpd
    @${ECHO_CMD} ${PREFIX}/bin/"nttpd -b " ${EXAMPLESDIR}/database >> ${WRKSRC}/bin/qstart-nttpd
    ${CHMOD} a+rx ${WRKSRC}/bin/qstart-nttpd
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/qstart-nttpd ${PREFIX}/bin/
.for f in ${MAN1}
    ${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${PREFIX}/man/man1
.endfor
.for f in ${PROGRAMS}
    ${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/bin/
.endfor
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_MAN} ${WRKSRC}/COPYRIGHT ${DOCSDIR}
    ${TAR} -C ${WRKSRC}/doc --exclude "*.bak" -cf - . | \
        ${TAR} -C ${DOCSDIR} --unlink -xf -
    @${CHOWN} -R ${SHAREOWN}:${SHAREMODE} ${DOCSDIR}
    @${MKDIR} ${EXAMPLESDIR}
    ${TAR} -C ${WRKSRC}/examples --exclude "*.bak" -cf - . | \
        ${TAR} -C ${EXAMPLESDIR} --unlink -xf -
    @${CHOWN} -R ${SHAREOWN}:${SHAREMODE} ${EXAMPLESDIR}
.endif

.include <bsd.port.post.mk>