summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-04-08 19:10:06 +0000
committerpav <pav@FreeBSD.org>2005-04-08 19:10:06 +0000
commit20f3d4bd69b892925f5cd87054ad891be11e002d (patch)
treec522aab6dc92a527cf9d77cc0d3de86c4a307c3f
parent5feeb8673007ab5b9d7383205603f36fbaacee07 (diff)
downloadFreeBSD-ports-20f3d4bd69b892925f5cd87054ad891be11e002d.zip
FreeBSD-ports-20f3d4bd69b892925f5cd87054ad891be11e002d.tar.gz
- Update to 20b0
- Mark BROKEN on 4.x and !i386 (almost) PR: ports/79615 Submitted by: Sam Lawrance <boris@brooknet.com.au>
-rw-r--r--lang/scriba/Makefile165
-rw-r--r--lang/scriba/distinfo4
-rw-r--r--lang/scriba/files/patch-aa29
-rw-r--r--lang/scriba/files/patch-ab11
-rw-r--r--lang/scriba/files/patch-ac11
-rw-r--r--lang/scriba/files/patch-ad11
-rw-r--r--lang/scriba/files/patch-ae28
-rw-r--r--lang/scriba/files/patch-af58
-rw-r--r--lang/scriba/files/patch-ag11
-rw-r--r--lang/scriba/files/patch-cftc.c16
-rw-r--r--lang/scriba/files/patch-commands-environ.c13
-rw-r--r--lang/scriba/files/patch-extensions-bdb-interface.c20
-rw-r--r--lang/scriba/files/patch-extensions-curl-interface.c24
-rw-r--r--lang/scriba/files/patch-extensions-curses-interface.c11
-rw-r--r--lang/scriba/files/patch-extensions-psql-interface.c11
-rw-r--r--lang/scriba/files/patch-extensions-re-regex.h11
-rw-r--r--lang/scriba/files/patch-make_gcc.jim23
-rw-r--r--lang/scriba/files/patch-memory.c15
-rw-r--r--lang/scriba/files/patch-scriba.c11
-rw-r--r--lang/scriba/files/patch-setup.pl75
-rw-r--r--lang/scriba/pkg-plist41
21 files changed, 380 insertions, 219 deletions
diff --git a/lang/scriba/Makefile b/lang/scriba/Makefile
index 4a05abd..65c9edb 100644
--- a/lang/scriba/Makefile
+++ b/lang/scriba/Makefile
@@ -6,50 +6,147 @@
#
PORTNAME= scriba
-PORTVERSION= 10b21
-PORTREVISION= 1
+PORTVERSION= 20b0
CATEGORIES= lang
MASTER_SITES= http://www.scriptbasic.com/download/
-DISTNAME= ${PORTNAME}-v${PORTVERSION}
-# the filename of the current version has been re-styled as follows;
-# however, as of November 2003, the patches do not apply cleanly, so
-# this port needs further work.
-#PORTVERSION= 1.0b30
-#DISTNAME= ${PORTNAME}-v${PORTVERSION}-source
+DISTNAME= ${PORTNAME}-v2.0b0-source
MAINTAINER= ports@FreeBSD.org
COMMENT= A scripting implementation of the BASIC language
-PRFXFILES= variations/standard/basiccmd.c \
- variations/standalone/basicc.c \
- configurer.c scriba.c scriba.conf.unix.lsp \
- testconf.c
-
+USE_REINPLACE= yes
NO_WRKSUBDIR= yes
USE_PERL5= yes
CFLAGS+= -fPIC
-MAKE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}"
+PORTDOCS= *
+
+# Extensions that depend on external libs default to off
+
+OPTIONS= BDB "Berkeley DB extension" off \
+ CURL "CURL extension" off \
+ GD "gd extension" off \
+ MYSQL "MySQL extension (3.2.3 only)" off \
+ ODBC "ODBC extension" off \
+ PGSQL "PostgreSQL extension" off \
+ XML "libxml2 extension" off
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+BROKEN= coredumps a lot
+.endif
+
+.if ${ARCH} == "amd64"
+IGNORE= need base libraries built with -fPIC
+.endif
+
+# Dependencies for port options
+
+.if defined(WITH_BDB)
+LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41
+PLIST_SUB+= BDB=""
+.else
+PLIST_SUB+= BDB="@comment "
+.endif
+
+.if defined(WITH_CURL)
+LIB_DEPENDS+= curl.3:${PORTSDIR}/ftp/curl
+PLIST_SUB+= CURL=""
+.else
+PLIST_SUB+= CURL="@comment "
+.endif
+
+.if defined(WITH_GD)
+LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
+PLIST_SUB+= GD=""
+.else
+PLIST_SUB+= GD="@comment "
+.endif
+
+.if defined(WITH_MYSQL)
+LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+PLIST_SUB+= MYSQL=""
+.else
+PLIST_SUB+= MYSQL="@comment "
+.endif
+
+.if defined(WITH_ODBC)
+LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
+PLIST_SUB+= ODBC=""
+.else
+PLIST_SUB+= ODBC="@comment "
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PGSQL= yes
+PLIST_SUB+= PGSQL=""
+.else
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+.if defined(WITH_XML)
+LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2
+PLIST_SUB+= XML=""
+.else
+PLIST_SUB+= XML="@comment "
+.endif
post-patch:
-.for P in ${PRFXFILES}
- @(cd ${WRKSRC} && ${SED} -e 's,%%PREFIX%%,${PREFIX},g' $P > foo && \
- ${MV} foo $P)
-.endfor
+ # Put esd.pm in a directory where perl will find it
+ cd ${WRKSRC} && ${MKDIR} jamal && ${CP} esd.pm jamal
+ ${GREP} -Rl '^#!.*bin/perl' ${WRKSRC} | \
+ ${XARGS} ${REINPLACE_CMD} -e 's,^#!.*bin/perl,#!${PERL},'
+ ${REINPLACE_CMD} \
+ -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
+ -e 's,%%X11BASE%%,${X11BASE},g' \
+ -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
+ -e 's,%%DATADIR%%,${DATADIR},g' \
+ -e 's,%%CC%%,${CC},g' \
+ -e 's,%%CFLAGS%%,${CFLAGS},g' \
+ -e 's,%%LDFLAGS%%,${LDFLAGS},g' \
+ -e 's,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g' \
+ -e 's,root:root,root:wheel,g' \
+ ${WRKSRC}/setup.pl ${WRKSRC}/scriba.c ${WRKSRC}/make_gcc.jim
+
+# Remove extensions not selected as options
+
+.if !defined(WITH_BDB)
+ @${RM} -rf ${WRKSRC}/extensions/bdb
+.endif
+
+.if !defined(WITH_CURL)
+ @${RM} -rf ${WRKSRC}/extensions/curl
+.endif
+
+.if !defined(WITH_GD)
+ @${RM} -rf ${WRKSRC}/extensions/gd
+.endif
+
+.if !defined(WITH_MYSQL)
+ @${RM} -rf ${WRKSRC}/extensions/mysql
+.endif
+
+.if !defined(WITH_ODBC)
+ @${RM} -rf ${WRKSRC}/extensions/odbc
+.endif
+
+.if !defined(WITH_PGSQL)
+ @${RM} -rf ${WRKSRC}/extensions/psql
+.endif
+
+.if !defined(WITH_XML)
+ @${RM} -rf ${WRKSRC}/extensions/xml
+.endif
+
+do-build:
+# -I allows script to include the Jamal preprocessor
+ cd ${WRKSRC} && export PERL5OPT='-I${WRKSRC}' && \
+ ${PERL} setup.pl --unix
do-install:
- ${MKDIR} ${PREFIX}/etc/scriba
- ${MKDIR} ${PREFIX}/include/scriba
- ${MKDIR} ${PREFIX}/lib/scriba
- ${CHMOD} 1666 ${PREFIX}/lib/scriba
- ${INSTALL_PROGRAM} ${WRKSRC}/scriba ${PREFIX}/bin
-.for M in cgi hash re
- ${INSTALL_PROGRAM} ${WRKSRC}/$M.so ${PREFIX}/lib/scriba
-.endfor
-.for I in bdb cgi error gd hash heb md5 mysql re test time trial zlib ../heber
- ${INSTALL_DATA} ${WRKSRC}/include/$I.bas ${PREFIX}/include/scriba
-.endfor
- ${INSTALL_DATA} ${WRKSRC}/basicc.a ${PREFIX}/lib/scriba
- ${WRKSRC}/cftc ${WRKSRC}/scriba.conf.unix.lsp \
- ${PREFIX}/etc/scriba/basic.conf
-
-.include <bsd.port.mk>
+ cd ${WRKSRC} && \
+ ${PERL} setup.pl --unix --no-install-interactive --install && \
+ ${SH} install.sh
+
+.include <bsd.port.post.mk>
diff --git a/lang/scriba/distinfo b/lang/scriba/distinfo
index 9cea920..847c31f 100644
--- a/lang/scriba/distinfo
+++ b/lang/scriba/distinfo
@@ -1,2 +1,2 @@
-MD5 (scriba-v10b21.tar.gz) = d4098436120d030dead170804b8d2f03
-SIZE (scriba-v10b21.tar.gz) = 673549
+MD5 (scriba-v2.0b0-source.tar.gz) = c3cf4d8af5e4a3af46180c8237805ee2
+SIZE (scriba-v2.0b0-source.tar.gz) = 1246794
diff --git a/lang/scriba/files/patch-aa b/lang/scriba/files/patch-aa
deleted file mode 100644
index 6f8cfda..0000000
--- a/lang/scriba/files/patch-aa
+++ /dev/null
@@ -1,29 +0,0 @@
---- Makefile.orig Wed Dec 27 03:52:16 2000
-+++ Makefile Mon Feb 16 16:06:00 2004
-@@ -1,8 +1,8 @@
- CC=cc
- LDOPTIONS=-shared
- LD=ld
--CCFLAGS=
--LIBS=-lm -ldl -lpthread
-+CCFLAGS=$(CFLAGS) $(PTHREAD_CFLAGS)
-+LIBS=-lm $(PTHREAD_LIBS)
- OBJS=builder.o conftree.o dynlolib.o execute.o\
- expression.o filesys.o getopt.o lexer.o match.o\
- memory.o myalloc.o options.o reader.o report.o sym.o\
-@@ -20,7 +20,6 @@
- .PHONY: headers clean install all
-
- all: headers scriba cftc cgi.so hash.so re.so basicc.a
-- sh install.sh
-
- clean :
- rm *.so *.o *.h ./scriba
-@@ -39,7 +38,6 @@
-
- scriba : $(OBJS) $(COBJS) scribacmd.o
- $(CC) -o scriba $(LIBS) $(OBJS) $(COBJS) scribacmd.o
-- scriba -v
-
- cftc : cftc.o confpile.o conftree.o lsp.o
- $(CC) -o cftc $(LIBS) cftc.o confpile.o conftree.o lsp.o
diff --git a/lang/scriba/files/patch-ab b/lang/scriba/files/patch-ab
deleted file mode 100644
index 1396185..0000000
--- a/lang/scriba/files/patch-ab
+++ /dev/null
@@ -1,11 +0,0 @@
---- variations/standard/basiccmd.c.orig Sun Jan 7 19:39:44 2001
-+++ variations/standard/basiccmd.c Sun Jan 7 19:35:07 2001
-@@ -186,7 +186,7 @@
- "WINNT\\SCRIBA.INI",
- #else
- "SCRIBACONF",
-- "/etc/scriba/basic.conf",
-+ "%%PREFIX%%/etc/scriba/basic.conf",
- #endif
- pszForcedConfigurationFileName);
-
diff --git a/lang/scriba/files/patch-ac b/lang/scriba/files/patch-ac
deleted file mode 100644
index a05783d..0000000
--- a/lang/scriba/files/patch-ac
+++ /dev/null
@@ -1,11 +0,0 @@
---- variations/standalone/basicc.c.orig Fri Dec 29 11:23:20 2000
-+++ variations/standalone/basicc.c Sun Jan 7 19:35:17 2001
-@@ -57,7 +57,7 @@
- "SCRIBA.INI",
- #else
- "SCRIBACONF",
-- "/etc/scriba/basic.conf",
-+ "%%PREFIX%%/etc/scriba/basic.conf",
- #endif
- NULL);
-
diff --git a/lang/scriba/files/patch-ad b/lang/scriba/files/patch-ad
deleted file mode 100644
index f4546dd..0000000
--- a/lang/scriba/files/patch-ad
+++ /dev/null
@@ -1,11 +0,0 @@
---- configurer.c.orig Wed Dec 27 11:52:15 2000
-+++ configurer.c Sun Jan 7 19:34:59 2001
-@@ -130,7 +130,7 @@
- #else
- char *s;
- #define SCRIBACONF "SCRIBACONF"
--#define DEFAULTCONF "/etc/scriba/basic.conf"
-+#define DEFAULTCONF "%%PREFIX%%/etc/scriba/basic.conf"
-
- s = getenv(SCRIBACONF);
-
diff --git a/lang/scriba/files/patch-ae b/lang/scriba/files/patch-ae
deleted file mode 100644
index bf1e31f..0000000
--- a/lang/scriba/files/patch-ae
+++ /dev/null
@@ -1,28 +0,0 @@
---- scriba.c.orig Wed Dec 27 11:52:17 2000
-+++ scriba.c Sun Jan 7 20:30:15 2001
-@@ -518,16 +518,12 @@
- "SCRIBA.INI",
- #else
- "SCRIBACONF",
-- "/etc/scriba/basic.conf",
-+ "/usr/local/etc/scriba/basic.conf",
- #endif
- pszForcedConfigurationFileName);
- /*DEBUG*/
-- fp = fopen("e:\\MyProjects\\sb\\isapi.log","a");
-- if( fp ){
-- fprintf(fp,"LoadConfiguration returned %d.\n",iError);
-- fclose(fp);
-- fp = NULL;
-- }
-+ if(iError)
-+ fprintf(stderr,"LoadConfiguration returned %d.\n",iError);
-
- return iError;
- }
-@@ -1900,4 +1896,4 @@
-
- default: return SCRIBA_ERROR_FAIL;
- }
-- }
-+ }
diff --git a/lang/scriba/files/patch-af b/lang/scriba/files/patch-af
deleted file mode 100644
index 2b37a1f..0000000
--- a/lang/scriba/files/patch-af
+++ /dev/null
@@ -1,58 +0,0 @@
---- scriba.conf.unix.lsp.orig Wed Dec 27 19:52:17 2000
-+++ scriba.conf.unix.lsp Mon Jan 15 03:34:09 2001
-@@ -8,11 +8,11 @@
- dll ".so"
-
- ; where the modules are to be loaded from
--module "/etc/scriba/modules/"
-+module "/usr/local/lib/scriba/"
-
- ; where to search system and module include files
- ; trailing / or / is needed
--include "/etc/scriba/include/"
-+include "/usr/local/include/scriba/"
-
- ;
- ; define external preprocessors
-@@ -29,8 +29,8 @@
- ; the external preprocessors
- external (
- heb (
-- executable "/usr/bin/scriba /etc/scriba/source/heber.bas"
-- directory "/etc/scriba/hebtemp/"
-+ executable "/usr/local/bin/scriba /usr/local/include/scriba/heber.bas"
-+ directory "/usr/local/etc/scriba/hebtemp/"
- )
- )
- )
-@@ -67,13 +67,13 @@
- ; This is the directory where we store the compiled code
- ; to automatically avoid recompilation
- ;
--cache "/etc/scriba/cache/"
-+cache "/usr/local/lib/scriba/cache/"
-
- cgi (
- ;
- ; These are the keys used by the CGI module
- ;
-- debugfile "/etc/scriba/cgidebug.txt"
-+ debugfile "/usr/local/etc/scriba/cgidebug.txt"
- )
-
- ;
-@@ -83,7 +83,7 @@
-
- ; directories where to store the
- dir (
-- home "/etc/scriba/sampledb" ; the home directory of operation of the Berkerley DB
-+ home "/usr/local/etc/scriba/sampledb" ; the home directory of operation of the Berkerley DB
- data "db" ; database files
- log "log" ; log files
- temp "tmp" ; temporary files
-@@ -115,4 +115,4 @@
- )
- )
-
--;break
-+;break
diff --git a/lang/scriba/files/patch-ag b/lang/scriba/files/patch-ag
deleted file mode 100644
index 6da8431..0000000
--- a/lang/scriba/files/patch-ag
+++ /dev/null
@@ -1,11 +0,0 @@
---- testconf.c.orig Wed Dec 27 11:52:17 2000
-+++ testconf.c Sun Jan 7 19:34:59 2001
-@@ -15,7 +15,7 @@
- "WINNT\\SCRIBA.INI",
- #else
- "SCRIBACONF",
-- "/etc/scriba/basic.conf",
-+ "%%PREFIX%%/etc/scriba/basic.conf",
- #endif
- NULL));
-
diff --git a/lang/scriba/files/patch-cftc.c b/lang/scriba/files/patch-cftc.c
deleted file mode 100644
index 9e4ad04..0000000
--- a/lang/scriba/files/patch-cftc.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- cftc.c.orig Sat Jan 29 21:04:00 2005
-+++ cftc.c Sat Jan 29 21:06:09 2005
-@@ -4,6 +4,7 @@
- #include "confpile.h"
-
-
-+int
- main(int argc,char *argv[]){
- int iError;
- tConfigTree MyCONF;
-@@ -28,4 +29,5 @@
- fprintf(stderr,"The error code is %d\n",iError);
- exit(iError);
- }
-+ return 0;
- }
diff --git a/lang/scriba/files/patch-commands-environ.c b/lang/scriba/files/patch-commands-environ.c
new file mode 100644
index 0000000..1f316fc
--- /dev/null
+++ b/lang/scriba/files/patch-commands-environ.c
@@ -0,0 +1,13 @@
+--- commands/environ.c.orig Tue Mar 1 23:04:45 2005
++++ commands/environ.c Tue Mar 1 23:06:19 2005
+@@ -27,6 +27,10 @@
+ #define _environ environ
+ #endif
+
++#ifdef __FreeBSD__
++#define _environ environ
++#endif
++
+ extern char **_environ;
+
+ /**ENVIRON
diff --git a/lang/scriba/files/patch-extensions-bdb-interface.c b/lang/scriba/files/patch-extensions-bdb-interface.c
new file mode 100644
index 0000000..81e1178
--- /dev/null
+++ b/lang/scriba/files/patch-extensions-bdb-interface.c
@@ -0,0 +1,20 @@
+--- extensions/bdb/interface.c.orig Tue Mar 1 18:07:08 2005
++++ extensions/bdb/interface.c Tue Mar 1 19:36:14 2005
+@@ -11,7 +11,7 @@
+
+ These lines are needed by the configurator to generate the file 'libraries.jim'
+ NTLIBS: libdb41s.lib
+-UXLIBS: -lbdb
++UXLIBS: -ldb41
+
+ */
+ #include <sys/types.h>
+@@ -22,7 +22,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-#include <db.h>
++#include <db41/db.h>
+
+ #include "../../basext.h"
+
diff --git a/lang/scriba/files/patch-extensions-curl-interface.c b/lang/scriba/files/patch-extensions-curl-interface.c
new file mode 100644
index 0000000..ddac9c9
--- /dev/null
+++ b/lang/scriba/files/patch-extensions-curl-interface.c
@@ -0,0 +1,24 @@
+--- extensions/curl/interface.c.orig Tue Mar 1 19:38:05 2005
++++ extensions/curl/interface.c Tue Mar 1 19:47:08 2005
+@@ -18,7 +18,7 @@
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ NTLIBS: libcurl.lib ws2_32.lib
+-UXLIBS: -lcurl -lssl -lcrypto -ldl -lc
++UXLIBS: -lcurl -lssl -lcrypto -lc
+
+ */
+ #include <stdio.h>
+@@ -1352,10 +1352,10 @@
+ if( Argument == NULL )return COMMAND_ERROR_ARGUMENT_RANGE;
+ Argument = besCONVERT2STRING(Argument);
+ if( STRLEN(Argument) == 10 && memcmp(STRINGVALUE(Argument),"IFMODSINCE",10) == 0 ){
+- value = TIMECOND_IFMODSINCE;
++ value = CURL_TIMECOND_IFMODSINCE;
+ }else
+ if( STRLEN(Argument) == 12 && memcmp(STRINGVALUE(Argument),"IFUNMODSINCE",12) == 0 ){
+- value = TIMECOND_IFUNMODSINCE;
++ value = CURL_TIMECOND_IFUNMODSINCE;
+ }else return COMMAND_ERROR_ARGUMENT_RANGE;
+ res = curl_easy_setopt(pCon->myConnection,CURLOPT_TIMECONDITION,value);
+ if( res == CURLE_OK ) return COMMAND_ERROR_SUCCESS;
diff --git a/lang/scriba/files/patch-extensions-curses-interface.c b/lang/scriba/files/patch-extensions-curses-interface.c
new file mode 100644
index 0000000..390e0d6
--- /dev/null
+++ b/lang/scriba/files/patch-extensions-curses-interface.c
@@ -0,0 +1,11 @@
+--- extensions/curses/interface.c.orig Tue Mar 1 19:38:05 2005
++++ extensions/curses/interface.c Tue Mar 1 19:51:22 2005
+@@ -25,7 +25,7 @@
+
+ */
+ #include <curses.h>
+-#include <malloc.h>
++#include <stdlib.h>
+
+ /**
+ =H the module CURSES
diff --git a/lang/scriba/files/patch-extensions-psql-interface.c b/lang/scriba/files/patch-extensions-psql-interface.c
new file mode 100644
index 0000000..5c3f6d1
--- /dev/null
+++ b/lang/scriba/files/patch-extensions-psql-interface.c
@@ -0,0 +1,11 @@
+--- extensions/psql/interface.c.orig Tue Mar 1 21:47:06 2005
++++ extensions/psql/interface.c Tue Mar 1 22:08:58 2005
+@@ -24,7 +24,7 @@
+ #define PTS_MODULE "pgsqlinterf.c"
+
+ /* vvv Debian GNU/Linux: /usr/include/postgresql/libpq-fe.h */
+-#include <postgresql/libpq-fe.h>
++#include <libpq-fe.h>
+ #include "../../basext.h"
+ #include <stdio.h> /* simple debugging */
+ #include <string.h> /* memcmp() */
diff --git a/lang/scriba/files/patch-extensions-re-regex.h b/lang/scriba/files/patch-extensions-re-regex.h
new file mode 100644
index 0000000..b7997b6
--- /dev/null
+++ b/lang/scriba/files/patch-extensions-re-regex.h
@@ -0,0 +1,11 @@
+--- extensions/re/regex.h.orig Tue Mar 1 22:12:11 2005
++++ extensions/re/regex.h Tue Mar 1 22:14:55 2005
+@@ -53,6 +53,8 @@
+ #define __stdcall
+ #endif
+
++#include <unistd.h>
++
+ /* types */
+ typedef off_t regoff_t;
+
diff --git a/lang/scriba/files/patch-make_gcc.jim b/lang/scriba/files/patch-make_gcc.jim
new file mode 100644
index 0000000..301f4e1
--- /dev/null
+++ b/lang/scriba/files/patch-make_gcc.jim
@@ -0,0 +1,23 @@
+--- make_gcc.jim.orig Tue Mar 1 22:15:45 2005
++++ make_gcc.jim Tue Mar 1 22:18:31 2005
+@@ -15,7 +15,7 @@
+ -I where the include directories are
+ -L where the libraries are
+ }
+-{#define cc=gcc -w}
++{#define cc=cc -w %%CFLAGS%% -L%%LOCALBASE%%/lib -I%%LOCALBASE%%/include -L%%X11BASE%%/lib -I%%X11BASE%%/include -I%%LOCALBASE%%/include/libxml2 -L%%LOCALBASE%%/lib/mysql }
+ {#define CcOptOutput/X=-o X}
+ {#define CcOptInput/X=X}
+ {#define CcOptCompile=-c}
+@@ -26,9 +26,9 @@
+ {#define LibOptOutput/X=-r X}
+ {#define LibOptInput/X=X}
+
+-{#define ld=ld -shared -Bstatic}
++{#define ld=ld %%LDFLAGS%% -shared -Bstatic -L%%LOCALBASE%%/lib -L%%X11BASE%%/lib -L%%LOCALBASE%%/lib/mysql }
+ {#define LdOptOutput/X=-o X}
+ {#define LdOptInput/X=X}
+
+ {@comment the standard libraries that we need}
+-{#define StandardLibraries=-lc -lm -ldl -lpthread}
++{#define StandardLibraries=-lc -lm %%PTHREAD_LIBS%%}
diff --git a/lang/scriba/files/patch-memory.c b/lang/scriba/files/patch-memory.c
new file mode 100644
index 0000000..4246061
--- /dev/null
+++ b/lang/scriba/files/patch-memory.c
@@ -0,0 +1,15 @@
+--- memory.c.orig Mon Apr 22 01:40:39 2002
++++ memory.c Tue Mar 1 22:11:42 2005
+@@ -19,7 +19,11 @@
+
+ TO_HEADER:
+
+-typedef unsigned char BYTE, *PBYTE;
++#ifndef BYTE_TYPE_ALREADY_DEFINED
++typedef unsigned char BYTE;
++#endif
++
++typedef unsigned char *PBYTE;
+
+ typedef struct _FixSizeMemoryObject {
+
diff --git a/lang/scriba/files/patch-scriba.c b/lang/scriba/files/patch-scriba.c
new file mode 100644
index 0000000..87e1d6d
--- /dev/null
+++ b/lang/scriba/files/patch-scriba.c
@@ -0,0 +1,11 @@
+--- scriba.c.orig Tue Mar 1 23:06:45 2005
++++ scriba.c Wed Mar 2 01:07:07 2005
+@@ -98,7 +98,7 @@
+ #define CONFIG_FILE "SCRIBA.INI"
+ #else
+ #define CONFIG_ENVIR "SCRIBACONF"
+-#define CONFIG_FILE "/etc/scriba/basic.conf"
++#define CONFIG_FILE "%%PREFIX%%/etc/scriba/basic.conf"
+ #endif
+
+
diff --git a/lang/scriba/files/patch-setup.pl b/lang/scriba/files/patch-setup.pl
new file mode 100644
index 0000000..720f353
--- /dev/null
+++ b/lang/scriba/files/patch-setup.pl
@@ -0,0 +1,75 @@
+--- setup.pl.orig Wed Mar 2 19:06:18 2005
++++ setup.pl Wed Mar 2 19:08:02 2005
+@@ -176,7 +176,6 @@
+ #
+ $esdlocation = undef;
+ for (@INC){
+- next if /\./;
+ if( -e "$_/jamal/esd.pm" ){
+ $esdlocation = "$_/jamal/esd.pm";
+ }
+@@ -1152,7 +1151,7 @@
+ let ERRCOUNT = \$ERRCOUNT+1
+ fi
+
+-chown $owner:$owner $to 2>/dev/null
++chown $owner $to 2>/dev/null
+ if [ \$? -ne 0 ] ; then
+ echo "###ERROR setting the owner of the file $to to $owner"
+ let ERRCOUNT = \$ERRCOUNT+1
+@@ -1186,7 +1185,7 @@
+ let ERRCOUNT = \$ERRCOUNT+1
+ fi
+
+-chown $owner:$owner $tofils 2>/dev/null
++chown $owner $tofils 2>/dev/null
+ if [ \$? -ne 0 ] ; then
+ echo "###ERROR setting the owner of the file $tofils to $owner"
+ let ERRCOUNT = \$ERRCOUNT+1
+@@ -1410,7 +1409,7 @@
+ print F <<ENDSHELL;
+ #!/bin/sh
+ #
+-# Start/stops the ScriptBasic httpd daemon (/usr/bin/sbhttpd)
++# Start/stops the ScriptBasic httpd daemon (%%PREFIX%%/bin/sbhttpd)
+ #
+
+ PIDFILE=$LOG/pid.txt
+@@ -1453,7 +1452,7 @@
+ echo "\$0 \$ARG: sbhttpd (pid \$PID) already running"
+ continue
+ fi
+- if /usr/bin/sbhttpd -start ; then
++ if %%PREFIX%%/bin/sbhttpd -start ; then
+ echo "\$0 \$ARG: sbhttpd started"
+ else
+ echo "\$0 \$ARG: sbhttpd could not be started"
+@@ -1795,17 +1794,17 @@
+ #
+ # UNIX installation default configuration values
+ #
+-$INSTALL_DEFAULT_CONFIGDIR='/etc/scriba';
+-$INSTALL_DEFAULT_INCLUDE ='/usr/share/scriba/include';
+-$INSTALL_DEFAULT_SOURCE ='/usr/share/scriba/source';
+-$INSTALL_DEFAULT_MODULE ='/usr/local/lib/scriba';
+-$INSTALL_DEFAULT_DOCU ='/usr/share/scriba/source';
+-$INSTALL_DEFAULT_LIB ='/usr/local/lib';
+-$INSTALL_DEFAULT_CACHE ='/var/cache/scriba/cache';
+-$INSTALL_DEFAULT_HEBTEMP ='/var/cache/scriba/hebtemp';
+-$INSTALL_DEFAULT_BIN ='/usr/bin';
+-$INSTALL_DEFAULT_LOG ='/var/log/scriba';
+-$INSTALL_DEFAULT_ETC ='/etc/init.d';
++$INSTALL_DEFAULT_CONFIGDIR='%%PREFIX%%/etc/scriba';
++$INSTALL_DEFAULT_INCLUDE ='%%PREFIX%%/include/scriba';
++$INSTALL_DEFAULT_SOURCE ='%%DATADIR%%/source';
++$INSTALL_DEFAULT_MODULE ='%%PREFIX%%/lib/scriba';
++$INSTALL_DEFAULT_DOCU ='%%DOCSDIR%%';
++$INSTALL_DEFAULT_LIB ='%%PREFIX%%/lib';
++$INSTALL_DEFAULT_CACHE ='%%PREFIX%%/var/cache/scriba/cache';
++$INSTALL_DEFAULT_HEBTEMP ='%%PREFIX%%/var/cache/scriba/hebtemp';
++$INSTALL_DEFAULT_BIN ='%%PREFIX%%/bin';
++$INSTALL_DEFAULT_LOG ='%%PREFIX%%/var/log/scriba';
++$INSTALL_DEFAULT_ETC ='%%PREFIX%%/etc/rc.d';
+
+ %INSTALL_DEFAULT = (
+ '--install-configdir' => $INSTALL_DEFAULT_CONFIGDIR,
diff --git a/lang/scriba/pkg-plist b/lang/scriba/pkg-plist
index 1559921..855456a 100644
--- a/lang/scriba/pkg-plist
+++ b/lang/scriba/pkg-plist
@@ -1,23 +1,48 @@
+bin/sbhttpd
bin/scriba
+etc/rc.d/sbhttpd
etc/scriba/basic.conf
-include/scriba/bdb.bas
+%%BDB%%include/scriba/bdb.bas
include/scriba/cgi.bas
+%%CURL%%include/scriba/curl.bas
+include/scriba/curses.bas
+include/scriba/dbg.bas
include/scriba/error.bas
-include/scriba/gd.bas
+%%GD%%include/scriba/gd.bas
include/scriba/hash.bas
-include/scriba/heb.bas
-include/scriba/heber.bas
-include/scriba/md5.bas
-include/scriba/mysql.bas
+include/scriba/modinst.bas
+include/scriba/mt.bas
+%%MYSQL%%include/scriba/mysql.bas
+%%ODBC%%include/scriba/odbc.bas
+%%PGSQL%%include/scriba/psql.bas
include/scriba/re.bas
-include/scriba/test.bas
include/scriba/time.bas
+include/scriba/t.bas
include/scriba/trial.bas
+include/scriba/ux.bas
+%%XML%%include/scriba/xml.bas
include/scriba/zlib.bas
-lib/scriba/basicc.a
+lib/libscriba.a
+%%BDB%%lib/scriba/bdb.so
lib/scriba/cgi.so
+%%CURL%%lib/scriba/curl.so
+lib/scriba/curses.so
+lib/scriba/dbg.so
+%%GD%%lib/scriba/gd.so
lib/scriba/hash.so
+lib/scriba/mt.so
+%%MYSQL%%lib/scriba/mysql.so
+%%ODBC%%lib/scriba/odbc.so
+%%PGSQL%%lib/scriba/psql.so
lib/scriba/re.so
+lib/scriba/t.so
+lib/scriba/trial.so
+lib/scriba/ux.so
+%%XML%%lib/scriba/xml.so
+lib/scriba/zlib.so
+%%DATADIR%%/source/heber.bas
@dirrm etc/scriba
@dirrm include/scriba
@dirrm lib/scriba
+@dirrm share/scriba/source
+@dirrm share/scriba
OpenPOWER on IntegriCloud