aboutsummaryrefslogtreecommitdiffstats
path: root/lang/pike76/Makefile
blob: 1d09af5389cba98f45c31dc9a0b5e8f7ec731848 (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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# Created by: kiwi@oav.net
# $FreeBSD$

PORTNAME=   pike76
PORTVERSION=    7.6.132
PORTREVISION=   1
CATEGORIES= lang
MASTER_SITES=   ftp://pike.ida.liu.se/pub/pike/beta/${PORTVERSION}/ \
        http://pike.ida.liu.se/pub/pike/beta/${PORTVERSION}/ \
        ftp://pike.ida.liu.se/pub/pike/all/${PORTVERSION}/ \
        http://pike.ida.liu.se/pub/pike/all/${PORTVERSION}/ \
        ftp://ftp.oav.net/pike/7.6/ \
        ftp://ftp.caudium.net/pike/official_releases/${PORTVERSION}/
DISTNAME=   Pike-v${PORTVERSION}

MAINTAINER= johans@FreeBSD.org
COMMENT=    Dynamic programming language with a syntax similar to C++

LIB_DEPENDS=    libjpeg.so:${PORTSDIR}/graphics/jpeg \
        libtiff.so:${PORTSDIR}/graphics/tiff \
        libgdbm.so:${PORTSDIR}/databases/gdbm \
        libpcre.so:${PORTSDIR}/devel/pcre \
        libgmp.so:${PORTSDIR}/math/gmp

DEPRECATED= Outdated: Users should switch to lang/pike78
EXPIRATION_DATE=2014-07-01

CONFLICTS=  pike7[28]-[0-9]*
CONFLICTS_BUILD=nettle-[2-9]*

OPTIONS_DEFINE= TTF FREETYPE OPT_CFLAGS MYSQL FFMPEG PGSQL \
        SANE PDF SVG2 TDS FFTW ODBC
OPTIONS_DEFAULT=TTF FREETYPE OPT_CFLAGS MYSQL

TTF_DESC?=  Add FreeType 1 support
FREETYPE_DESC?= Add FreeType 2 support
OPT_CFLAGS_DESC?=   Enable additional compiliation optimizations
FFMPEG_DESC?=   Add FFmpeg support
ODBC_DESC?= Add ODBC support
SANE_DESC?= Add SANE support
PDF_DESC?=  Add PDF support
SVG2_DESC?= Add SVG2 support
TDS_DESC?=  Add FreeTDS (Sybase and MSSQL) support
FFTW_DESC?= Add libFFTW support

MAN1=       pike.1

WANT_MESA=  yes

CPPFLAGS+=  -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
CONFIGURE_ARGS+=--without-debug \
        --with-thread-library=${PTHREAD_LIBS} \
        --with-double-precision \
        --with-long-double-precision \
        --disable-rpath \
        --without-rtldebug \
        --without-cdebug \
        --without-copt \
        --without-security \
        --with-oob \
        --without-poll \
        --without-devpoll \
        --with-max-fd=60000 \
        --with-gmp \
        --with-zlib \
        --with-threads \
        --with-readline \
        --with-jpeg \
        --with-tiff \
        --with-gdbm \
        --without-java \
        --without-ssleay \
        --without-GTK \
        --without-gnome \
        --without-glade \
        --without-libglade-config \
        --without-krb5 \
        --without-machine-code \
        --with-perl \
        --with-relocatable-dumped-modules \
        --without-GL --without-GLUT \
        --prefix=${PREFIX}

MAKE_ARGS=  CONFIGUREARGS="${CONFIGURE_ARGS}"
MAKE_ENV=   "ac_cv_lib_nettle_nettle_md5_init=no"

USES=       bison gettext gmake perl5

PLIST_FILES=    bin/pike bin/pike76 bin/hilfe

NO_STAGE=   yes
MAKE_JOBS_UNSAFE=yes

.include <bsd.port.pre.mk>

ONLY_FOR_ARCHS= i386 amd64

.if ${PORT_OPTIONS:MEXPERIMENTAL_FEATURES}
CONFIGURE_ARGS+=    --with-computed-goto \
        --with-pg \
        --with-long-long-int \
        --with-long-int \
        --with-short-int \
        --with-keypair-loop \
        --without-lock \
        --with-new-multisets
.endif

.if ${PORT_OPTIONS:MOPT_CFLAGS}
.if (${MACHINE} == "i386")
CFLAGS+=    -O3 -ffast-math -fomit-frame-pointer
.else
CFLAGS+=    -ffast-math -fomit-frame-pointer
.endif
.endif

.if ${PORT_OPTIONS:MFFMPEG}
LIB_DEPENDS+=   libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
CONFIGURE_ARGS+=    --with-ffmpeg
.else
CONFIGURE_ARGS+=    --without-ffmpeg
.endif

.if ${PORT_OPTIONS:MFFTW}
LIB_DEPENDS+=   libfftw.so:${PORTSDIR}/math/fftw
.endif

.if ${PORT_OPTIONS:MTTF}
LIB_DEPENDS+=   libttf.so:${PORTSDIR}/print/freetype
CONFIGURE_ARGS+=    --with-ttflib
.else
CONFIGURE_ARGS+=    --without-ttflib
.endif

.if ${PORT_OPTIONS:MFREETYPE}
LIB_DEPENDS+=   libfreetype.so:${PORTSDIR}/print/freetype2
CONFIGURE_ARGS+=    --with-freetype
.else
CONFIGURE_ARGS+=    --without-freetype
.endif

.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL=  yes
CONFIGURE_ARGS+=    --with-mysql=${PREFIX}
.else
CONFIGURE_ARGS+=    --without-mysql
.endif

.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL=  yes
CONFIGURE_ARGS+=    --with-pgsql=${PREFIX}
.else
CONFIGURE_ARGS+=    --without-pgsql
.endif

.if ${PORT_OPTIONS:MODBC}
LIB_DEPENDS+=   libodbc.so:${PORTSDIR}/databases/unixODBC
CONFIGURE_ARGS+=    --with-odbc
.else
CONFIGURE_ARGS+=    --without-odbc
.endif

.if ${PORT_OPTIONS:MSANE}
LIB_DEPENDS+=   libsane.so:${PORTSDIR}/graphics/sane-backends
CONFIGURE_ARGS+=    --with-sane
.else
CONFIGURE_ARGS+=    --without-sane
.endif

.if ${PORT_OPTIONS:MPDF}
LIB_DEPENDS+=   libpdf.so:${PORTSDIR}/print/pdflib \
        libpanda.so:${PORTSDIR}/print/panda
CONFIGURE_ARGS+=    --with-libpdf --with-libpanda
.else
CONFIGURE_ARGS+=    --without-libpdf --without-libpanda
.endif

.if ${PORT_OPTIONS:MSVG2}
LIB_DEPENDS+=   librsvg-2.so:${PORTSDIR}/graphics/librsvg2
CONFIGURE_ARGS+=    --with-svg
.else
CONFIGURE_ARGS+=    --without-svg
.endif

.if ${PORT_OPTIONS:MTDS}
LIB_DEPENDS+=   libct.so:${PORTSDIR}/databases/freetds
CONFIGURE_ARGS+=    --with-sybase
PLIST_SUB+= SYBASE:=""
.else
CONFIGURE_ARGS+=    --without-sybase
PLIST_SUB+= SYBASE:="@comment "
.endif

INSTALL_TARGET= install_nodoc

pre-configure:
    @${ECHO} ${CONFIGURE_ARGS}

post-patch:
    @${REINPLACE_CMD} -e 's| -lgmp| -L${LOCALBASE}/lib -lgmp|' \
        ${WRKSRC}/src/modules/Gmp/configure ${WRKSRC}/src/modules/_Image_XFace/configure
    @${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|' \
            -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
            -e "s|/cc/|&'|" \
        ${WRKSRC}/src/configure

post-extract:
    @mv ${WRKSRC}/bundles/nettle-1.15.tar.gz \
        ${WRKSRC}/bundles/nettle-1.15.tar
    @gzip ${WRKSRC}/bundles/nettle-1.15.tar

post-install:
    @${STRIP_CMD} ${PREFIX}/pike/${PORTVERSION}/bin/pike
    @${INSTALL_SCRIPT} ${WRKSRC}/bin/hilfe ${PREFIX}/bin
    @${INSTALL_MAN} ${WRKSRC}/man/pike.1 ${MAN1PREFIX}/man/man1
    @cd ${PREFIX} && ${FIND} pike/${PORTVERSION} ! -type d >> ${TMPPLIST}
    @cd ${PREFIX} && ${FIND} pike/${PORTVERSION} -type d -empty -delete
    @cd ${PREFIX} && ${FIND} -d pike/${PORTVERSION} -type d | \
        ${SED} 's,^,@dirrm ,' >> ${TMPPLIST}
    @${ECHO} '@unexec rmdir %D/pike 2>/dev/null || true' >> ${TMPPLIST}

.include <bsd.port.post.mk>