blob: 6886b0c0f710a4174baf8e74d6de8ba72097e17b (
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
|
# New ports collection makefile for: clip
# Date created: Dec 23, 2001
# Whom: ijliao
#
# $FreeBSD$
#
PORTNAME= clip
DISTVERSION= 1.1.16-1
PORTREVISION= 5
CATEGORIES= databases lang
MASTER_SITES= ftp://ftp.linux.ru.net/mirrors/clip/ \
ftp://www.cis.by/pub/clip/pub/clip/ \
http://clip.cis.by/mirror/pub/clip/ \
ftp://ftp.itk.ru/pub/clip/ \
${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= x-clip
DISTNAME= ${PORTNAME}-prg-${DISTVERSION}
EXTRACT_SUFX= .tgz
DIST_SUBDIR= clip
MAINTAINER= ports@FreeBSD.org
COMMENT= xBase and Clipper language compatible compiler
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
wget:${PORTSDIR}/ftp/wget \
imake:${PORTSDIR}/devel/imake
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png \
freetype.9:${PORTSDIR}/print/freetype2 \
gtkextra.17:${PORTSDIR}/x11-toolkits/gtkextra \
gd.4:${PORTSDIR}/graphics/gd \
expat.6:${PORTSDIR}/textproc/expat2 \
glade-2.0:${PORTSDIR}/devel/libglade2 \
fcgi.0:${PORTSDIR}/www/fcgi
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \
wget:${PORTSDIR}/ftp/wget
WRKSRC= ${WRKDIR}/${PORTNAME}-prg-${DISTVERSION}
USE_GETTEXT= yes
USE_XORG+= x11 xau ice xproto xmu xpm
WANT_GNOME= yes
SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
OPTIONS= IODBC "iODBC support" on \
UNIXODBC "unixODBC support (not with iODBC)" off \
MYSQL "MySQL support" off \
PGSQL "PostgreSQL support" off \
FIREBIRD "Firebird (Interbase) support" off
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
BROKEN= Does not compile on !i386
.endif
# OPT_CLIPLIBS contains the optional subdirectories built by
# the patched ${WRKSRC}/cliplibs/Makefile
# Not currently built: clip-oracle
# Either IODBC or UNIXODBC
.if defined(WITH_IODBC)
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
PLIST_SUB= ODBC=""
OPT_CLIPLIBS+=clip-odbc
.elif defined(WITH_UNIXODBC)
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
PLIST_SUB= ODBC=""
OPT_CLIPLIBS+=clip-odbc
.else
PLIST_SUB= ODBC="@comment "
.endif
.if defined(WITH_MYSQL)
USE_MYSQL= yes
PLIST_SUB+= MYSQL=""
OPT_CLIPLIBS+=clip-mysql
.else
PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_PGSQL)
USE_PGSQL= yes
PLIST_SUB+= PGSQL=""
OPT_CLIPLIBS+=clip-postgres
.else
PLIST_SUB+= PGSQL="@comment "
.endif
.if defined(WITH_FIREBIRD)
LIB_DEPENDS+= gds.1:${PORTSDIR}/${FIREBIRD_PORT}
PLIST_SUB+= IBASE=""
OPT_CLIPLIBS+=clip-interbase
.else
PLIST_SUB+= IBASE="@comment "
.endif
USE_BISON= build
USE_GMAKE= yes
USE_ICONV= yes
REINPLACE_ARGS= -i ""
USE_XORG+= xpm xau ice xproto
USE_GNOME= gtk12 gtk20
HAS_CONFIGURE= yes
CONFIGURE_WRKSRC= ${WRKSRC}/clip
USE_LDCONFIG= ${LOCALBASE}/clip/lib
ALL_TARGET= local
MAKE_ENV= HOME="${WRKDIR}" \
LANG="C" \
PGLIBDIR="${LOCALBASE}/lib" \
PGINCDIR="${LOCALBASE}/include" \
OPT_CLIPLIBS="${OPT_CLIPLIBS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
LOCALBASE="${LOCALBASE}" \
WITH_IODBC="${WITH_IODBC}" \
CLIP_CONFIGURE_FLAGS="-l"
FIREBIRD_PORT?= databases/firebird-client
BIN2STRIP= bdbf clip clip_bl clip_blank clip_cld clip_conv clip_dbf2txt \
clip_dbg clip_fl clip_hashextract clip_hindex clip_hseek \
clip_hv clip_prg clip_run clip_trans clip_we clipar cliphash \
cobra_clnt1 cobra_serv codb_ab codb_addobj codb_load codb_export\
codb_make codb_pack codb_rcheck codb_reindex ctosgml dbc \
ftosgml gen_tbl po_compat po_extr po_subst pp_ron sqlrun \
wcl2prg www_clip xclip
DIR2PRUNE= include/memdebug doc/clip-com doc/clip-oasis/nanfor doc/clip-oasis
pre-everything::
@if [ ! -z "${CLIPROOT}" ]; then \
${ECHO} Please unset CLIPROOT in your environment! ; \
exit 1; \
fi
pre-configure:
@${FIND} ${WRKSRC} -name "Makefile*" -or -name Imakefile | \
${XARGS} ${REINPLACE_CMD} \
-e "s|-Wall -g|${CFLAGS}|;s|-g -Wall|${CFLAGS}|;s|-Wall|${CFLAGS}|" \
-e "s|gcc|${CC}|;s|-O2||;s|-O ||;"
@${FIND} ${WRKSRC} -name configure | ${XARGS} ${REINPLACE_CMD} \
-e "s|-Wall -g|${CFLAGS}|;s|-g -Wall|${CFLAGS}|;s|-Wall|${CFLAGS}|" \
-e "s|-O2||"
@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} \
-e "s|#include.*<malloc.h>|#include <stdlib.h>|" \
-e "s|#!/bin/sh|#!${LOCALBASE}/bin/bash|" \
-e "s|/usr/local|${LOCALBASE}|g" \
-e "s|/usr/X11R6|${LOCALBASE}|g"
${REINPLACE_CMD} "s|-I/usr/include|-I${LOCALBASE}/include -L${LOCALBASE}/lib|" \
${WRKSRC}/cliplibs/clip-xml/configure
${REINPLACE_CMD} -e "s|-I/usr/include|-I${LOCALBASE}/include|" \
-e "s|-lexpat|-L${LOCALBASE}/lib -lexpat|" \
${WRKSRC}/cliplibs/clip-xml/Makefile.in
post-build: # don't include emppty directories
${RMDIR} ${DIR2PRUNE:S|^|${WRKDIR}/cliproot/|}
do-install:
@${MKDIR} ${PREFIX}/clip
@${CP} -R ${WRKDIR}/cliproot/* ${PREFIX}/clip
.for FILE in ${BIN2STRIP}
@${STRIP_CMD} ${PREFIX}/clip/bin/${FILE}
.endfor
@for f in `${LS} ${PREFIX}/clip/lib/*.so` ; \
do \
${STRIP_CMD} $$f ; \
done
post-install:
@${CAT} ${PKGMESSAGE}
.if defined(MAINTAINER_MODE)
regression-test: install
(cd ${WRKSRC}/clip/tests && \
CLIPROOT=${PREFIX}/clip PATH="${PATH}:${PREFIX}/clip/bin" ${GMAKE} all)
.endif
.include <bsd.port.post.mk>
|