aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ncurses-devel/Makefile
blob: 49111d62bea0d5f8568861adb87ec644187a954b (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# New ports collection makefile for:    ncurses-devel
# Date created:             Jan 28 2006
# Whom:                 Rong-En Fan <rafan@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   ncurses
PORTVERSION=    ${RELEASE}.${PATCHDATE}
CATEGORIES= devel
MASTER_SITES=   ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMESUFFIX=  -devel
DISTNAME=   ${PORTNAME}-${RELEASE}
DIST_SUBDIR=    ${PORTNAME}

PATCH_SITES=    ftp://invisible-island.net/ncurses/${RELEASE}/ \
        ${MASTER_SITE_LOCAL:S/$/:local/}
PATCH_SITE_SUBDIR=  rafan/ncurses/:local

MAINTAINER= rafan@FreeBSD.org
COMMENT=    Library for terminal-independent, full-screen output (development version)

CONFLICTS=  ncurses-[0-9]*

PATCHES=    20061223 20061230 20070106 20070113 20070120 20070127 20070128 \
        20070203 20070210 20070217 20070224 20070303 20070310 20070311 \
        20070317 20070324 20070331 20070407 20070414 20070421 20070428 \
        20070505 20070512 20070526 20070602 20070609 20070612 20070623 \
        20070630 20070707 20070714 20070716 20070721 20070728 20070812 \
        20070818 20070825 20070901 20070908 20070915 20070929 20071006 \
        20071013 20071020 20071103 20071117 20071124 20071201 20071215 \
        20071222 20080105 20080112 20080119 20080203 20080209 20080223 \
        20080301 20080308 20080322 20080329 20080405 20080412 20080419 \
        20080503 20080517 20080524 20080531 20080607 20080614 20080621 \
        20080628 20080705 20080712 20080713 20080726 20080804 20080816 \
        20080823 20080830 20080906 20080907 20080913 20080920 20080925 \
        20080927 20081004

RELEASE=    5.6

.for i in ${PATCHES}
PATCHFILES+=    ${PORTNAME}-${RELEASE}-${i}.patch.gz:DEFAULT,local
PATCHDATE=  ${i}
.endfor

GNU_CONFIGURE=  yes
CONFIGURE_SCRIPT=../configure
CONFIGURE_ARGS= --datadir=${PREFIX}/share/misc --disable-overwrite \
        --enable-termcap --enable-bsdpad --enable-getcap \
        --enable-colorfgbg --disable-home-terminfo \
        --includedir=${PREFIX}/include/ncurses \
        --with-shared \
        --without-curses-h --with-termlib --program-prefix= \
        --enable-rpath --disable-root-environ \
        --with-manpage-format=gzip --srcdir=../

# needed by devel/py-ncurses port
.if defined(WITH_TRACE)
CONFIGURE_ARGS+=    --with-trace
.endif

CONFIGURE_ENV=  gnat_exists="no"

USE_LDCONFIG=   yes

WIDEC_WRKSRC=   ${WRKSRC}/build.widec
NOWIDEC_WRKSRC= ${WRKSRC}/build.nowidec
WIDEC_EXAMPLESDIR=  ${EXAMPLESDIR}/widec
NOWIDEC_EXAMPLESDIR=    ${EXAMPLESDIR}/nowidec
EXAMPLES_TARGETS=   NOWIDEC

CONFIGURE_WRKSRC=   ${NOWIDEC_WRKSRC}
BUILD_WRKSRC=   ${NOWIDEC_WRKSRC}
INSTALL_WRKSRC= ${NOWIDEC_WRKSRC}

PLIST_SUB+= PORTVERSION=${RELEASE} \
        WIDEC_EXAMPLESDIR=${WIDEC_EXAMPLESDIR:S,${PREFIX}/,,} \
        NOWIDEC_EXAMPLESDIR=${NOWIDEC_EXAMPLESDIR:S,${PREFIX}/,,}

PORTDOCS=   *
PORTEXAMPLES=   *

DOCS=   ANNOUNCE INSTALL NEWS README TO-DO doc/html/announce.html \
    doc/hackguide.doc doc/html/hackguide.html \
    doc/html/index.html doc/ncurses-intro.doc \
    doc/html/ncurses-intro.html
EXAMPLES=   Makefile README blue.c bs.6 bs.c cardfile.c cardfile.dat \
        ditto.c dots.c filter.c firework.c firstlast.c gdc.6 \
        gdc.c hanoi.c hashtest.c knight.c lrtest.c ncurses.c \
        newdemo.c railroad.c rain.c tclock.c test.priv.h \
        testaddch.c testcurs.c testscanw.c view.c worm.c \
        xmas.c
EXAMPLES_CPP=   Makefile NEWS PROBLEMS README-first cursesapp.cc \
        cursesapp.h cursesf.cc cursesf.h cursesm.cc cursesm.h \
        cursesmain.cc cursesp.cc cursesp.h cursesw.cc \
        cursesw.h cursslk.cc cursslk.h demo.cc etip.h \
        internal.h

.include <bsd.port.pre.mk>

.include "${.CURDIR}/Makefile.man"

.if ${OSVERSION} < 503000
WITHOUT_WIDEC=  yes
.endif

.if !defined(WITHOUT_PROFILE) && !defined(NO_PROFILE) && !defined(NOPROFILE)
CONFIGURE_ARGS+=--with-profile
PLIST_SUB+= PROFILE=""
.else
CONFIGURE_ARGS+=--without-profile
PLIST_SUB+= PROFILE="@comment "
.endif

.if !defined(WITH_DEBUG)
CONFIGURE_ARGS+=--without-debug
PLIST_SUB+= DEBUG="@comment "
.else
CONFIGURE_ARGS+=--with-debug
PLIST_SUB+= DEBUG=""
.endif

.if !defined(WITHOUT_TERMINFO)
CONFIGURE_ARGS+=--with-hashed-db
PLIST_SUB+= TERMINFO=""
.else # termcap only, easier for updating ncurses in base
CONFIGURE_ARGS+=--disable-database
PLIST_SUB+= TERMINFO="@comment "
.endif

.if !defined(WITHOUT_WIDEC)
PLIST_SUB+= WIDEC=""
EXAMPLES_TARGETS+=  WIDEC
.else
PLIST_SUB+= WIDEC="@comment "
.endif

post-extract:
    @${MKDIR} ${WIDEC_WRKSRC}
    @${MKDIR} ${NOWIDEC_WRKSRC}

post-patch:
    @${REINPLACE_CMD} -e 's,$$(INSTALL_PROG) ncurses-config,@INSTALL_SCRIPT@ ncurses-config,' ${WRKSRC}/misc/Makefile.in
    @${RM} -rf ${WRKSRC}/tack \
     ${WRKSRC}/Ada95/src/terminal_interface-curses.adb \
     ${WRKSRC}/mkinstalldirs

post-configure:
.if !defined(WITHOUT_WIDEC)
    cd ${.CURDIR} && \
        ${MAKE} ${.MAKEFLAGS} CONFIGURE_WRKSRC=${WIDEC_WRKSRC} \
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-widec" \
        do-configure
.endif
.for d in test c++
.if !defined(WITHOUT_WIDEC)
    ${CP} ${WRKSRC}/${d}/* ${WIDEC_WRKSRC}/${d}/
.endif
    ${CP} ${WRKSRC}/${d}/* ${NOWIDEC_WRKSRC}/${d}/
.endfor

post-build:
.if !defined(WITHOUT_WIDEC)
    cd ${.CURDIR} && \
        ${MAKE} ${.MAKEFLAGS} BUILD_WRKSRC=${WIDEC_WRKSRC} do-build
.endif

post-install:
.if !defined(WITHOUT_WIDEC)
    cd ${.CURDIR} && \
        ${MAKE} ${.MAKEFLAGS} INSTALL_WRKSRC=${WIDEC_WRKSRC} do-install
.endif

.if !defined(NOPORTEXAMPLES)
. for i in ${EXAMPLES_TARGETS}
    ${MKDIR} ${${i}_EXAMPLESDIR}/c++
.  for f in ${EXAMPLES}
    ${INSTALL_DATA} ${${i}_WRKSRC}/test/${f} ${${i}_EXAMPLESDIR}/
.  endfor
    ${INSTALL_SCRIPT} ${${i}_WRKSRC}/test/tracemunch ${${i}_EXAMPLESDIR}/
.  for f in ${EXAMPLES_CPP}
    ${INSTALL_DATA} ${${i}_WRKSRC}/c++/${f} ${${i}_EXAMPLESDIR}/c++/
.  endfor
. endfor
.endif

.if !defined(WITHOUT_TERMINFO)
    ${FIND} ${PREFIX}/share/misc -name "*.terminfo" -print0 |   \
        ${XARGS} -0 ${PREFIX}/bin/tic
.endif

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
. for f in ${DOCS}
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/
. endfor
.endif

.include <bsd.port.post.mk>