Lines 6-55
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= scriba |
8 |
PORTNAME= scriba |
9 |
PORTVERSION= 10b21 |
9 |
PORTVERSION= 20b0 |
10 |
PORTREVISION= 1 |
|
|
11 |
CATEGORIES= lang |
10 |
CATEGORIES= lang |
12 |
MASTER_SITES= http://www.scriptbasic.com/download/ |
11 |
MASTER_SITES= http://www.scriptbasic.com/download/ |
13 |
DISTNAME= ${PORTNAME}-v${PORTVERSION} |
12 |
DISTNAME= ${PORTNAME}-v2.0b0-source |
14 |
# the filename of the current version has been re-styled as follows; |
|
|
15 |
# however, as of November 2003, the patches do not apply cleanly, so |
16 |
# this port needs further work. |
17 |
#PORTVERSION= 1.0b30 |
18 |
#DISTNAME= ${PORTNAME}-v${PORTVERSION}-source |
19 |
|
13 |
|
20 |
MAINTAINER= ports@FreeBSD.org |
14 |
MAINTAINER= ports@FreeBSD.org |
21 |
COMMENT= A scripting implementation of the BASIC language |
15 |
COMMENT= A scripting implementation of the BASIC language |
22 |
|
16 |
|
23 |
PRFXFILES= variations/standard/basiccmd.c \ |
17 |
USE_REINPLACE= yes |
24 |
variations/standalone/basicc.c \ |
|
|
25 |
configurer.c scriba.c scriba.conf.unix.lsp \ |
26 |
testconf.c |
27 |
|
28 |
NO_WRKSUBDIR= yes |
18 |
NO_WRKSUBDIR= yes |
29 |
USE_PERL5= yes |
19 |
USE_PERL5= yes |
30 |
CFLAGS+= -fPIC |
20 |
CFLAGS+= -fPIC |
31 |
MAKE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}" |
21 |
PORTDOCS= * |
|
|
22 |
|
23 |
# Extensions that depend on external libs default to off |
24 |
|
25 |
OPTIONS= BDB "Berkeley DB extension" off \ |
26 |
CURL "CURL extension" off \ |
27 |
GD "gd extension" off \ |
28 |
MYSQL "MySQL extension (3.2.3 only)" off \ |
29 |
ODBC "ODBC extension" off \ |
30 |
PGSQL "PostgreSQL extension" off \ |
31 |
XML "libxml2 extension" off |
32 |
|
33 |
.include <bsd.port.pre.mk> |
34 |
|
35 |
# Dependencies for port options |
36 |
|
37 |
.if defined(WITH_BDB) |
38 |
LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 |
39 |
PLIST_SUB+= BDB="" |
40 |
.else |
41 |
PLIST_SUB+= BDB="@comment " |
42 |
.endif |
43 |
|
44 |
.if defined(WITH_CURL) |
45 |
LIB_DEPENDS+= curl.3:${PORTSDIR}/ftp/curl |
46 |
PLIST_SUB+= CURL="" |
47 |
.else |
48 |
PLIST_SUB+= CURL="@comment " |
49 |
.endif |
50 |
|
51 |
.if defined(WITH_GD) |
52 |
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd |
53 |
PLIST_SUB+= GD="" |
54 |
.else |
55 |
PLIST_SUB+= GD="@comment " |
56 |
.endif |
57 |
|
58 |
.if defined(WITH_MYSQL) |
59 |
LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client |
60 |
PLIST_SUB+= MYSQL="" |
61 |
.else |
62 |
PLIST_SUB+= MYSQL="@comment " |
63 |
.endif |
64 |
|
65 |
.if defined(WITH_ODBC) |
66 |
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC |
67 |
PLIST_SUB+= ODBC="" |
68 |
.else |
69 |
PLIST_SUB+= ODBC="@comment " |
70 |
.endif |
71 |
|
72 |
.if defined(WITH_PGSQL) |
73 |
USE_PGSQL= yes |
74 |
PLIST_SUB+= PGSQL="" |
75 |
.else |
76 |
PLIST_SUB+= PGSQL="@comment " |
77 |
.endif |
78 |
|
79 |
.if defined(WITH_XML) |
80 |
LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2 |
81 |
PLIST_SUB+= XML="" |
82 |
.else |
83 |
PLIST_SUB+= XML="@comment " |
84 |
.endif |
32 |
|
85 |
|
33 |
post-patch: |
86 |
post-patch: |
34 |
.for P in ${PRFXFILES} |
87 |
# Put esd.pm in a directory where perl will find it |
35 |
@(cd ${WRKSRC} && ${SED} -e 's,%%PREFIX%%,${PREFIX},g' $P > foo && \ |
88 |
cd ${WRKSRC} && ${MKDIR} jamal && ${CP} esd.pm jamal |
36 |
${MV} foo $P) |
89 |
${GREP} -Rl '^#!.*bin/perl' ${WRKSRC} | \ |
37 |
.endfor |
90 |
${XARGS} ${REINPLACE_CMD} -e 's,^#!.*bin/perl,#!${PERL},' |
|
|
91 |
${REINPLACE_CMD} \ |
92 |
-e 's,%%PREFIX%%,${PREFIX},g' \ |
93 |
-e 's,%%LOCALBASE%%,${LOCALBASE},g' \ |
94 |
-e 's,%%X11BASE%%,${X11BASE},g' \ |
95 |
-e 's,%%DOCSDIR%%,${DOCSDIR},g' \ |
96 |
-e 's,%%DATADIR%%,${DATADIR},g' \ |
97 |
-e 's,%%CC%%,${CC},g' \ |
98 |
-e 's,%%CFLAGS%%,${CFLAGS},g' \ |
99 |
-e 's,%%LDFLAGS%%,${LDFLAGS},g' \ |
100 |
-e 's,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g' \ |
101 |
-e 's,root:root,root:wheel,g' \ |
102 |
${WRKSRC}/setup.pl ${WRKSRC}/scriba.c ${WRKSRC}/make_gcc.jim |
103 |
|
104 |
# Remove extensions not selected as options |
105 |
|
106 |
.if !defined(WITH_BDB) |
107 |
@${RM} -rf ${WRKSRC}/extensions/bdb |
108 |
.endif |
109 |
|
110 |
.if !defined(WITH_CURL) |
111 |
@${RM} -rf ${WRKSRC}/extensions/curl |
112 |
.endif |
113 |
|
114 |
.if !defined(WITH_GD) |
115 |
@${RM} -rf ${WRKSRC}/extensions/gd |
116 |
.endif |
117 |
|
118 |
.if !defined(WITH_MYSQL) |
119 |
@${RM} -rf ${WRKSRC}/extensions/mysql |
120 |
.endif |
121 |
|
122 |
.if !defined(WITH_ODBC) |
123 |
@${RM} -rf ${WRKSRC}/extensions/odbc |
124 |
.endif |
125 |
|
126 |
.if !defined(WITH_PGSQL) |
127 |
@${RM} -rf ${WRKSRC}/extensions/psql |
128 |
.endif |
129 |
|
130 |
.if !defined(WITH_XML) |
131 |
@${RM} -rf ${WRKSRC}/extensions/xml |
132 |
.endif |
133 |
|
134 |
do-build: |
135 |
# -I allows script to include the Jamal preprocessor |
136 |
cd ${WRKSRC} && export PERL5OPT='-I${WRKSRC}' && \ |
137 |
${PERL} setup.pl --unix |
38 |
|
138 |
|
39 |
do-install: |
139 |
do-install: |
40 |
${MKDIR} ${PREFIX}/etc/scriba |
140 |
cd ${WRKSRC} && \ |
41 |
${MKDIR} ${PREFIX}/include/scriba |
141 |
${PERL} setup.pl --unix --no-install-interactive --install && \ |
42 |
${MKDIR} ${PREFIX}/lib/scriba |
142 |
${SH} install.sh |
43 |
${CHMOD} 1666 ${PREFIX}/lib/scriba |
|
|
44 |
${INSTALL_PROGRAM} ${WRKSRC}/scriba ${PREFIX}/bin |
45 |
.for M in cgi hash re |
46 |
${INSTALL_PROGRAM} ${WRKSRC}/$M.so ${PREFIX}/lib/scriba |
47 |
.endfor |
48 |
.for I in bdb cgi error gd hash heb md5 mysql re test time trial zlib ../heber |
49 |
${INSTALL_DATA} ${WRKSRC}/include/$I.bas ${PREFIX}/include/scriba |
50 |
.endfor |
51 |
${INSTALL_DATA} ${WRKSRC}/basicc.a ${PREFIX}/lib/scriba |
52 |
${WRKSRC}/cftc ${WRKSRC}/scriba.conf.unix.lsp \ |
53 |
${PREFIX}/etc/scriba/basic.conf |
54 |
|
143 |
|
55 |
.include <bsd.port.mk> |
144 |
.include <bsd.port.post.mk> |