aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2002-11-12 01:23:49 +0800
committerijliao <ijliao@FreeBSD.org>2002-11-12 01:23:49 +0800
commit2d489c174b1ccd9d4042812b931ab16e2925173d (patch)
tree719b3c8bb578a358f1c3b69165ade6158c93736b /databases
parentc3a5353098ba8e85e16a85befcff11da7f5522be (diff)
downloadfreebsd-ports-gnome-2d489c174b1ccd9d4042812b931ab16e2925173d.tar.gz
freebsd-ports-gnome-2d489c174b1ccd9d4042812b931ab16e2925173d.tar.zst
freebsd-ports-gnome-2d489c174b1ccd9d4042812b931ab16e2925173d.zip
Add SuperServer build
Remove perl from scripts Remove scripts + consolidate into pkg-install PR: 45185 Submitted by: maintainer
Diffstat (limited to 'databases')
-rw-r--r--databases/firebird-client/Makefile31
-rw-r--r--databases/firebird-client/files/RELNOTES9
-rw-r--r--databases/firebird-client/files/buildit.sh3
-rw-r--r--databases/firebird-client/files/patch-builds::original::boot.sfx.interbase38
-rw-r--r--databases/firebird-client/files/patch-builds::original::edit_make32
-rw-r--r--databases/firebird-client/files/patch-builds::original::platform13
-rw-r--r--databases/firebird-client/files/patch-builds::original::prefix.freebsd102
-rw-r--r--databases/firebird-client/files/patch-jrd::gds.c24
-rw-r--r--databases/firebird-client/files/patch-jrd::isc_file.c15
-rw-r--r--databases/firebird-client/files/patch-jrd::isc_sync.c38
-rw-r--r--databases/firebird-client/files/patch-jrd::jrd.h12
-rw-r--r--databases/firebird-client/files/patch-jrd::thd.c20
-rw-r--r--databases/firebird-client/files/patch-jrd::thd.h14
-rw-r--r--databases/firebird-client/files/patch-lock::lock.h13
-rw-r--r--databases/firebird-client/pkg-install132
-rw-r--r--databases/firebird-client/pkg-plist8
-rw-r--r--databases/firebird-client/scripts/addservice9
-rw-r--r--databases/firebird-client/scripts/createuser50
-rw-r--r--databases/firebird-client/scripts/pre-build15
-rw-r--r--databases/firebird-client/scripts/pre-install20
-rw-r--r--databases/firebird-client/scripts/rmservice8
-rw-r--r--databases/firebird-server/Makefile31
-rw-r--r--databases/firebird-server/files/RELNOTES9
-rw-r--r--databases/firebird-server/files/buildit.sh3
-rw-r--r--databases/firebird-server/files/patch-builds::original::boot.sfx.interbase38
-rw-r--r--databases/firebird-server/files/patch-builds::original::edit_make32
-rw-r--r--databases/firebird-server/files/patch-builds::original::platform13
-rw-r--r--databases/firebird-server/files/patch-builds::original::prefix.freebsd102
-rw-r--r--databases/firebird-server/files/patch-jrd::gds.c24
-rw-r--r--databases/firebird-server/files/patch-jrd::isc_file.c15
-rw-r--r--databases/firebird-server/files/patch-jrd::isc_sync.c38
-rw-r--r--databases/firebird-server/files/patch-jrd::jrd.h12
-rw-r--r--databases/firebird-server/files/patch-jrd::thd.c20
-rw-r--r--databases/firebird-server/files/patch-jrd::thd.h14
-rw-r--r--databases/firebird-server/files/patch-lock::lock.h13
-rw-r--r--databases/firebird-server/pkg-install132
-rw-r--r--databases/firebird-server/pkg-plist8
-rw-r--r--databases/firebird-server/scripts/addservice9
-rw-r--r--databases/firebird-server/scripts/createuser50
-rw-r--r--databases/firebird-server/scripts/pre-build15
-rw-r--r--databases/firebird-server/scripts/pre-install20
-rw-r--r--databases/firebird-server/scripts/rmservice8
-rw-r--r--databases/firebird/Makefile31
-rw-r--r--databases/firebird/files/RELNOTES9
-rw-r--r--databases/firebird/files/buildit.sh3
-rw-r--r--databases/firebird/files/patch-builds::original::boot.sfx.interbase38
-rw-r--r--databases/firebird/files/patch-builds::original::edit_make32
-rw-r--r--databases/firebird/files/patch-builds::original::platform13
-rw-r--r--databases/firebird/files/patch-builds::original::prefix.freebsd102
-rw-r--r--databases/firebird/files/patch-jrd::gds.c24
-rw-r--r--databases/firebird/files/patch-jrd::isc_file.c15
-rw-r--r--databases/firebird/files/patch-jrd::isc_sync.c38
-rw-r--r--databases/firebird/files/patch-jrd::jrd.h12
-rw-r--r--databases/firebird/files/patch-jrd::thd.c20
-rw-r--r--databases/firebird/files/patch-jrd::thd.h14
-rw-r--r--databases/firebird/files/patch-lock::lock.h13
-rw-r--r--databases/firebird/pkg-install132
-rw-r--r--databases/firebird/pkg-plist8
-rw-r--r--databases/firebird/scripts/addservice9
-rw-r--r--databases/firebird/scripts/createuser50
-rw-r--r--databases/firebird/scripts/pre-build15
-rw-r--r--databases/firebird/scripts/pre-install20
-rw-r--r--databases/firebird/scripts/rmservice8
-rw-r--r--databases/firebird2-server/Makefile31
-rw-r--r--databases/firebird2-server/files/RELNOTES9
-rw-r--r--databases/firebird2-server/files/buildit.sh3
-rw-r--r--databases/firebird2-server/files/patch-builds::original::boot.sfx.interbase38
-rw-r--r--databases/firebird2-server/files/patch-builds::original::edit_make32
-rw-r--r--databases/firebird2-server/files/patch-builds::original::platform13
-rw-r--r--databases/firebird2-server/files/patch-builds::original::prefix.freebsd102
-rw-r--r--databases/firebird2-server/files/patch-jrd::gds.c24
-rw-r--r--databases/firebird2-server/files/patch-jrd::isc_file.c15
-rw-r--r--databases/firebird2-server/files/patch-jrd::isc_sync.c38
-rw-r--r--databases/firebird2-server/files/patch-jrd::jrd.h12
-rw-r--r--databases/firebird2-server/files/patch-jrd::thd.c20
-rw-r--r--databases/firebird2-server/files/patch-jrd::thd.h14
-rw-r--r--databases/firebird2-server/files/patch-lock::lock.h13
-rw-r--r--databases/firebird2-server/pkg-install132
-rw-r--r--databases/firebird2-server/pkg-plist8
-rw-r--r--databases/firebird2-server/scripts/addservice9
-rw-r--r--databases/firebird2-server/scripts/createuser50
-rw-r--r--databases/firebird2-server/scripts/pre-build15
-rw-r--r--databases/firebird2-server/scripts/pre-install20
-rw-r--r--databases/firebird2-server/scripts/rmservice8
-rw-r--r--databases/firebird20-server/Makefile31
-rw-r--r--databases/firebird20-server/files/RELNOTES9
-rw-r--r--databases/firebird20-server/files/buildit.sh3
-rw-r--r--databases/firebird20-server/files/patch-builds::original::boot.sfx.interbase38
-rw-r--r--databases/firebird20-server/files/patch-builds::original::edit_make32
-rw-r--r--databases/firebird20-server/files/patch-builds::original::platform13
-rw-r--r--databases/firebird20-server/files/patch-builds::original::prefix.freebsd102
-rw-r--r--databases/firebird20-server/files/patch-jrd::gds.c24
-rw-r--r--databases/firebird20-server/files/patch-jrd::isc_file.c15
-rw-r--r--databases/firebird20-server/files/patch-jrd::isc_sync.c38
-rw-r--r--databases/firebird20-server/files/patch-jrd::jrd.h12
-rw-r--r--databases/firebird20-server/files/patch-jrd::thd.c20
-rw-r--r--databases/firebird20-server/files/patch-jrd::thd.h14
-rw-r--r--databases/firebird20-server/files/patch-lock::lock.h13
-rw-r--r--databases/firebird20-server/pkg-install132
-rw-r--r--databases/firebird20-server/pkg-plist8
-rw-r--r--databases/firebird20-server/scripts/addservice9
-rw-r--r--databases/firebird20-server/scripts/createuser50
-rw-r--r--databases/firebird20-server/scripts/pre-build15
-rw-r--r--databases/firebird20-server/scripts/pre-install20
-rw-r--r--databases/firebird20-server/scripts/rmservice8
105 files changed, 2120 insertions, 910 deletions
diff --git a/databases/firebird-client/Makefile b/databases/firebird-client/Makefile
index 1606fc389e38..bc151970f413 100644
--- a/databases/firebird-client/Makefile
+++ b/databases/firebird-client/Makefile
@@ -7,6 +7,7 @@
PORTNAME= firebird
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://firebird.sourceforge.net/download/ \
http://www.aims.com.au/chris/ \
@@ -25,7 +26,6 @@ LDCONFIG_DIRS= %%PREFIX%%/firebird/lib
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
USE_REINPLACE= yes
-USE_PERL5= yes
ONLY_FOR_ARCHS= i386
@@ -55,7 +55,7 @@ do-configure:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
${SH} buildBootDatabases; \
NOPROMPT_SETUP=yes; export NOPROMPT_SETUP; \
FIREBIRD_64_BIT_IO=yes; export FIREBIRD_64_BIT_IO; \
@@ -68,24 +68,27 @@ do-configure:
do-build:
@( \
- ${ECHO_CMD} '#!/bin/sh'; ${ECHO_CMD} \
- '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \
- ) > ${WRKDIR}/000.${PORTNAME}.sh
- @( \
- ${LN} -sf ${WRKDIR}/refDatabases/jrd/isc.gdb \
+ ${REINPLACE_CMD} -e 's,opt,usr,' \
+ ${WRKSRC}/firebird/install/linux/misc/ibmgr; \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/jrd/isc.gdb \
${WRKDIR}/firebird-1.0.0.796/interbase/isc4.gdb; \
- ${LN} -sf ${WRKDIR}/refDatabases/msgs/msg.gdb \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/msgs/msg.gdb \
${WRKDIR}/firebird-1.0.0.796/msg.gdb; \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
- ${SH} boot.freebsd; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
+ ${CP} ${PKGDIR}/files/buildit.sh ${WRKDIR}/firebird-1.0.0.796; \
+ ${SH} buildit.sh; \
)
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
do-install:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
- ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb || ${TRUE}; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/lib/gds.so.1 || ${TRUE}; \
${CP} /dev/null interbase/interbase.log; \
${CP} -Rp interbase ${PREFIX}/firebird; \
${RM} ${PREFIX}/firebird/install; \
@@ -94,7 +97,11 @@ do-install:
cd ${PREFIX}/firebird/examples; \
${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \
${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \
- ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \
+ ${CP} ${WRKSRC}/firebird/install/linux/misc/ibmgr \
+ ${PREFIX}/firebird/bin; \
)
+post-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.post.mk>
diff --git a/databases/firebird-client/files/RELNOTES b/databases/firebird-client/files/RELNOTES
index 5434347e24d2..a452990122ee 100644
--- a/databases/firebird-client/files/RELNOTES
+++ b/databases/firebird-client/files/RELNOTES
@@ -1,4 +1,4 @@
-Firebird 1.0.0 FreeBSD Release Notes 13-Mar-2002
+Firebird 1.0.0 FreeBSD Release Notes 10-Nov-2002
--------------------------------------
FB-T6.2.796 Firebird Final Release
@@ -64,6 +64,13 @@ try stopping PostgreSQL:
and see if that helps.
+ Super Server support has recently been added. However, there is
+anecdotal evidence that it is not as reliable nor as scalable as the
+Classic Server version. For this reason, I have not included a
+start up method for Super Server. For those that are interested,
+traversing to /usr/interbase/misc will find the startup scripts for
+the various flavours of Linux.
+
Complete documentation for InterBase(tm) is available (free of
charge) from http://www.interbase.com/ in PDF format. While
InterBase and Firebird are two distinct entities, all InterBase
diff --git a/databases/firebird-client/files/buildit.sh b/databases/firebird-client/files/buildit.sh
new file mode 100644
index 000000000000..d48627c0e21e
--- /dev/null
+++ b/databases/firebird-client/files/buildit.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+. Configure_SetupEnv.sh
+make super_firebird
diff --git a/databases/firebird-client/files/patch-builds::original::boot.sfx.interbase b/databases/firebird-client/files/patch-builds::original::boot.sfx.interbase
new file mode 100644
index 000000000000..62d0b483a07d
--- /dev/null
+++ b/databases/firebird-client/files/patch-builds::original::boot.sfx.interbase
@@ -0,0 +1,38 @@
+--- builds/original/boot.sfx.interbase.orig Tue Dec 18 01:40:08 2001
++++ builds/original/boot.sfx.interbase Sat Nov 9 17:44:54 2002
+@@ -68,7 +68,7 @@
+ #added completed according to inprise tree
+ #FSG 093000
+
+-firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib examples completed
++firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib completed
+
+ # burp wanted to build gpre
+ # we break this dependency
+@@ -159,14 +159,14 @@
+ # 1995-June-7 David Schnepper
+ # removed pyxis 3-Aug-00 TMC
+ #executables: alice burp dudley gpre miscFiles $(INTL) isql locks \
+- $(SUPER_SERVER) qli remote spit utilities \
+- $(SHARED_AM) $(LINKABLE_LIBS)
++# $(SUPER_SERVER) qli remote spit utilities \
++# $(SHARED_AM) $(LINKABLE_LIBS)
+
+ executables: alice dudley miscFiles $(INTL) isql locks \
+ $(SUPER_SERVER) qli remote spit utilities \
+ $(SHARED_AM) $(LINKABLE_LIBS)
+
+-super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix gsec security_db extlib examples completed
++super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix relay gsec security_db extlib completed
+
+ super_targets: s_run_codes s_alice s_burp s_dba s_security_c super_client super_server super_utils
+
+@@ -195,7 +195,7 @@
+
+ super_client: force
+ $(QUIET_ECHO) "Building super/client..."
+- $(SH) '$(CD) source/super/client; $(MAKE) CFLAGS="$(CFLAGS) -DSUPERCLIENT" SYSTEM="$(SYSTEM)" super_client'
++ $(SH) '$(CD) source/super/client; $(MAKE) SYSTEM="$(SYSTEM)" super_client'
+
+ csu gcsu: $(ACCESS_METHOD) force
+ $(QUIET_ECHO) "Building GCSU..."
diff --git a/databases/firebird-client/files/patch-builds::original::edit_make b/databases/firebird-client/files/patch-builds::original::edit_make
new file mode 100644
index 000000000000..d107078c7a59
--- /dev/null
+++ b/databases/firebird-client/files/patch-builds::original::edit_make
@@ -0,0 +1,32 @@
+--- builds/original/edit_make.orig Fri Aug 4 06:42:41 2000
++++ builds/original/edit_make Sat Nov 9 16:06:59 2002
+@@ -16,13 +16,25 @@
+ # Contributor(s): ______________________________________.
+ if [ "$SYS_TYPE" != "NOLINK_OS" -a "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then
+ if [ "$3" = "make.client" ]; then
+- sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
+- -e "s/\$(SYSTEM)/$1/g" \
+- -e "s/\$(VERSION)/$2/g" \
+- -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ if [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT -D_REENTRANT -D_THREAD_SAFE/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ else
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ fi
+ elif [ "$3" = "make.dsql_ss" -o "$3" = "make.intl_ss" -o "$3" = "make.journal_ss" -o "$3" = "make.jrd_ss" -o "$3" = "make.lock_ss" -o "$3" = "make.remote_ss" -o "$3" = "make.wal_ss" -o "$3" = "make.burp_ss" -o "$3" = "make.alice_ss" -o "$3" = "make.utilities_ss" ]; then
+ if [ "$1" = "HP10" -o "$1" = "LINUX" ]; then
+ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ elif [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT -D_THREAD_SAFE/g" \
+ -e "s/\$(SYSTEM)/$1/g" \
+ -e "s/\$(VERSION)/$2/g" \
+ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
diff --git a/databases/firebird-client/files/patch-builds::original::platform b/databases/firebird-client/files/patch-builds::original::platform
new file mode 100644
index 000000000000..149f2fe3a4f6
--- /dev/null
+++ b/databases/firebird-client/files/patch-builds::original::platform
@@ -0,0 +1,13 @@
+--- builds/original/platform.orig Sun Sep 16 22:15:14 2001
++++ builds/original/platform Sat Nov 9 16:16:23 2002
+@@ -32,6 +32,10 @@
+ SYS_TYPE=GENERIC
+ fi
+ export SYS_TYPE
++if [ $1 = 'FREEBSD' ]; then
++ FBBUILDHACK=$1
++ export FBBUILDHACK
++fi
+ #
+ if [ $1 = 'SUN3_4' -o $1 = 'SUN4' -o $1 = 'AP' -o $1 = 'AX' ]; then
+ TR='tr "A-Z" "a-z"'
diff --git a/databases/firebird-client/files/patch-builds::original::prefix.freebsd b/databases/firebird-client/files/patch-builds::original::prefix.freebsd
new file mode 100644
index 000000000000..ec8d8343f61d
--- /dev/null
+++ b/databases/firebird-client/files/patch-builds::original::prefix.freebsd
@@ -0,0 +1,102 @@
+--- builds/original/prefix.freebsd.orig Sat Jan 13 05:18:13 2001
++++ builds/original/prefix.freebsd Sat Nov 9 16:49:17 2002
+@@ -28,20 +28,20 @@
+
+
+ PROD_DEBUG_OBJECTS= nodebug.o
+-PROD_SHRLIB_DIR= -Lsource/jrd
++PROD_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ PROD_VERSION_FLAG= -DPROD_BUILD
+-PROD_CFLAGS= -O -m486 -fpic -DFLINTSTONE
++PROD_CFLAGS= -O -pipe -march=i486 -fpic -DFLINTSTONE
+
+
+ DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o
+-DEV_SHRLIB_DIR= -Lsource/jrd
++DEV_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ DEV_VERSION_FLAG= -DDEV_BUILD
+ DEV_CFLAGS= -ggdb
+
+ DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS)
+ SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR)
+ VERSION_FLAG= $($(VERSION)_VERSION_FLAG)
+-CFLAGS_COMMON= $($(VERSION)_CFLAGS) -Isource/interbase/include -DFREEBSD -w -fwritable-strings
++CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DFREEBSD -w -fwritable-strings -Isource/interbase/include
+ CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG)
+ PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC
+ SPECIAL_OBJECTS= j
+@@ -62,21 +62,21 @@
+ BIN_PATH= interbase/bin
+ BRIDGE_MISC= head5.o allp.o
+ CHMOD_VAL= 666
+-CURSES_LIB= -lncurses
++CURSES_LIB=
+ DSQL_P_OBJS= dsql_p_objects
+-FORM_OBJECTS= form.o
+-FORM_TRN_OBJECTS= form_trn.o
++FORM_OBJECTS= noform.o
++FORM_TRN_OBJECTS=
+ FUNCTIONS= functions.bin
+ FUNCSHR= source/interbase/lib/gdsf.so
+ GDS_LINK= $(GDSSHR_LINK)
+-GDS_PYXIS= gds_pyxis.a
++GDS_PYXIS=
+ GDSLIB_BACKEND= source/interbase/lib/gds_b.a
+ GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -ldescrypt
+
+ GDSSHR= source/interbase/lib/gds.so
+ LINUX_GDSSHR= $(GDSSHR)
+-GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -ldescrypt
+-PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis
++GDSSHR_LINK= $(SHRLIB_DIR) -lgds -ldescrypt
++PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds
+ HLPDIR= source/qli/
+ HOSTNAME= `hostname | cut -d'.' -f1`
+ INCLUDES= include_so include_so_ada
+@@ -92,7 +92,7 @@
+ JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j
+ JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin
+ LANG_OBJECTS= ada.o ftn.o cob.o
+-LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn
++LANGUAGES= cc cxx ada microfocus_cob make16 gdl1 sun_ftn
+ LD_LIBS= -lc
+ LD_LIBS_J= -lc
+ LD_OPTS= -shared
+@@ -104,28 +104,28 @@
+ MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm
+ PIC_FLAGS= $(CFLAGS) -fPIC
+ PIPE= gds.a gds_pipe
+-PYXIS= pyxis
+-PYXIS_MISC_OBJS= $(PYXIS_MISC)
+-PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC)
+-PYXIS_OBJECTS= pyxis_objects
+-PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o
++PYXIS=
++PYXIS_MISC_OBJS=
++PYXIS_P_MISC_OBJS=
++PYXIS_OBJECTS=
++PYXIS_MISC_OBJECTS=
+ REG_HELP= isc_ins_hlp.dat
+ REMOTE_GDSSHR= $(GDSSHR)
+ REMOTE_GDSSHR_LINK= $(SERVER_LINK)
+ REMOTE_P_OBJS= rem_p_objects
+-SCREEN_LIBS=
+-#SCREEN_LIBS= -lncurses
++#SCREEN_LIBS=
++SCREEN_LIBS= -lncurses
+ SERVER_LINK= $(GDSSHR_LINK)
+ SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD;
+ SPECIAL_OPT= source/special_opt
+ NETWORK_LIB=
+ SOCKET_LIB= -lc
+-THREAD_LIB= -llthread
++THREAD_LIB= -pthread
+ SUN_FUNCSHR= $(FUNCSHR)
+ LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1
+ SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR)
+ SUPER_BACKEND= source/jrd/gds_ss.a
+-SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldescrypt -L/usr/local/lib -llthread
++SUPER_LINK= -pthread -Lsource/jrd -lgds_ss -ldescrypt
+ SUPER_SERVER=
+ UTILITIES=
+ WAL_P_OBJS= wal_p_objects
diff --git a/databases/firebird-client/files/patch-jrd::gds.c b/databases/firebird-client/files/patch-jrd::gds.c
new file mode 100644
index 000000000000..523abb725403
--- /dev/null
+++ b/databases/firebird-client/files/patch-jrd::gds.c
@@ -0,0 +1,24 @@
+--- jrd/gds.c.orig Sat Mar 2 00:15:11 2002
++++ jrd/gds.c Sun Jul 7 14:27:44 2002
+@@ -159,7 +159,7 @@
+ engine and this change may imply side effect I haven't known
+ about yet. Tomas Nejedlik (tomas@nejedlik.cz)
+ */
+-#if (defined(LINUX) && defined(SUPERCLIENT))
++#if ((defined(LINUX) || defined(FREEBSD)) && defined(SUPERCLIENT))
+ #define V4_THREADING
+ #endif
+
+@@ -3510,9 +3510,9 @@
+ #else
+ (MAP_ANON |
+ #endif
+-#if (!defined LINUX && !defined DARWIN)
+-/* In LINUX, Solaris, and Darwin there is no such thing as MAP_VARIABLE. Hence, it gives
+- compilation error. The equivalent functionality is default,
++#if (!defined LINUX && !defined DARWIN && !defined FREEBSD)
++/* In LINUX, Solaris, FreeBSD and Darwin there is no such thing as MAP_VARIABLE.
++ Hence, it gives compilation error. The equivalent functionality is default,
+ if you do not specify MAP_FIXED */
+ MAP_VARIABLE |
+ #endif /* LINUX */
diff --git a/databases/firebird-client/files/patch-jrd::isc_file.c b/databases/firebird-client/files/patch-jrd::isc_file.c
new file mode 100644
index 000000000000..7047f182d59c
--- /dev/null
+++ b/databases/firebird-client/files/patch-jrd::isc_file.c
@@ -0,0 +1,15 @@
+--- jrd/isc_file.c.orig Tue Dec 18 01:40:18 2001
++++ jrd/isc_file.c Sat Jul 6 18:04:55 2002
+@@ -106,6 +106,12 @@
+ #define MTAB_CLOSE(stream) ib_fclose (stream)
+ #endif
+
++#ifdef FREEBSD
++#define MTAB "/etc/fstab"
++#define MTAB_OPEN(path,type) ib_fopen (path, type)
++#define MTAB_CLOSE(stream) ib_fclose (stream)
++#endif
++
+ #ifdef DARWIN
+ #define MTAB "/etc/fstab.hd"
+ #define MTAB_OPEN(path,type) ib_fopen (path, type)
diff --git a/databases/firebird-client/files/patch-jrd::isc_sync.c b/databases/firebird-client/files/patch-jrd::isc_sync.c
new file mode 100644
index 000000000000..19e327a1705f
--- /dev/null
+++ b/databases/firebird-client/files/patch-jrd::isc_sync.c
@@ -0,0 +1,38 @@
+--- jrd/isc_sync.c.orig Tue Mar 5 21:11:25 2002
++++ jrd/isc_sync.c Sat Jul 6 18:06:30 2002
+@@ -1467,7 +1467,7 @@
+ pthread_mutex_init (event->event_mutex, pthread_mutexattr_default);
+ pthread_cond_init (event->event_semnum, pthread_condattr_default);
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ pthread_mutex_init (event->event_mutex, NULL);
+ pthread_cond_init (event->event_semnum, NULL);
+ #else
+@@ -1596,7 +1596,7 @@
+ #ifdef HP10
+ if (micro_seconds > 0 && (ret == -1) && (errno == EAGAIN))
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ if (micro_seconds > 0 && (ret == ETIMEDOUT))
+ #else
+ if (micro_seconds > 0 && (ret == ETIME))
+@@ -5198,7 +5198,7 @@
+ **************************************/
+ int state;
+
+-#if (!defined HP10 && !defined linux && !defined DARWIN)
++#if (!defined HP10 && !defined linux && !defined DARWIN && !defined FREEBSD)
+
+ pthread_mutexattr_t mattr;
+
+@@ -5218,7 +5218,7 @@
+ server (until we are to implement local IPC using shared
+ memory in which case we need interprocess thread sync.
+ */
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ return pthread_mutex_init (mutex->mtx_mutex, NULL);
+ #else
+ state = pthread_mutex_init (mutex->mtx_mutex, pthread_mutexattr_default);
diff --git a/databases/firebird-client/files/patch-jrd::jrd.h b/databases/firebird-client/files/patch-jrd::jrd.h
new file mode 100644
index 000000000000..0a280080c74a
--- /dev/null
+++ b/databases/firebird-client/files/patch-jrd::jrd.h
@@ -0,0 +1,12 @@
+--- jrd/jrd.h.orig Tue May 14 19:01:06 2002
++++ jrd/jrd.h Tue May 14 19:23:44 2002
+@@ -717,7 +717,8 @@
+ #ifdef MULTI_THREAD
+ #if (defined APOLLO || defined DECOSF || defined NETWARE_386 || \
+ defined NeXT || defined SOLARIS_MT || defined WIN_NT || \
+- defined OS2_ONLY || defined HP10 || defined LINUX || defined DARWIN)
++ defined OS2_ONLY || defined HP10 || defined LINUX || \
++ defined DARWIN || defined FREEBSD)
+ #define PLATFORM_GET_THREAD_DATA ((TDBB) THD_get_specific())
+ #endif
+ #endif
diff --git a/databases/firebird-client/files/patch-jrd::thd.c b/databases/firebird-client/files/patch-jrd::thd.c
new file mode 100644
index 000000000000..a09c3fe4e1c3
--- /dev/null
+++ b/databases/firebird-client/files/patch-jrd::thd.c
@@ -0,0 +1,20 @@
+--- jrd/thd.c.orig Thu May 24 14:11:11 2001
++++ jrd/thd.c Sun Jul 7 14:52:07 2002
+@@ -2605,7 +2605,7 @@
+ int detach_state=PTHREAD_CREATE_DETACHED
+ #endif
+
+-#if ( !defined HP10 && !defined linux )
++#if ( !defined HP10 && !defined linux && !defined FREEBSD )
+
+ state = pthread_attr_init (&pattr);
+ if (state)
+@@ -2628,7 +2628,7 @@
+ return state;
+
+ #else
+-#ifdef linux
++#if ( defined linux || defined FREEBSD )
+ if (state = pthread_create (&thread, NULL, routine, arg))
+ return state;
+ return pthread_detach (thread);
diff --git a/databases/firebird-client/files/patch-jrd::thd.h b/databases/firebird-client/files/patch-jrd::thd.h
new file mode 100644
index 000000000000..b4e74ecfbe59
--- /dev/null
+++ b/databases/firebird-client/files/patch-jrd::thd.h
@@ -0,0 +1,14 @@
+--- jrd/thd.h.orig Sat Mar 2 00:16:31 2002
++++ jrd/thd.h Mon May 13 19:10:37 2002
+@@ -98,6 +98,11 @@
+ #define MULTI_THREAD 1
+ #endif
+
++#if (defined(FREEBSD) && defined(SUPERSERVER))
++#define POSIX_THREADS 1
++#define MULTI_THREAD 1
++#endif
++
+ #ifdef VMS
+ #ifndef GATEWAY
+ #define MULTI_THREAD 1
diff --git a/databases/firebird-client/files/patch-lock::lock.h b/databases/firebird-client/files/patch-lock::lock.h
new file mode 100644
index 000000000000..fe7ad684d99e
--- /dev/null
+++ b/databases/firebird-client/files/patch-lock::lock.h
@@ -0,0 +1,13 @@
+--- lock/lock.h.orig Wed Jun 6 05:43:58 2001
++++ lock/lock.h Sat Jul 6 18:08:56 2002
+@@ -65,8 +65,10 @@
+ #ifndef SOLARIS_MT
+ #if !(defined(HP10) && defined(SUPERSERVER))
+ #if !(defined(LINUX) && defined(SUPERSERVER))
++#if !(defined(FREEBSD) && defined(SUPERSERVER))
+ #ifndef DARWIN
+ #define MANAGER_PROCESS
++#endif
+ #endif
+ #endif
+ #endif
diff --git a/databases/firebird-client/pkg-install b/databases/firebird-client/pkg-install
index af43f63a3943..6fd18e94bd21 100644
--- a/databases/firebird-client/pkg-install
+++ b/databases/firebird-client/pkg-install
@@ -1,9 +1,8 @@
#!/bin/sh
-# Created in haste by smashing together various
-# files from the port scripts.
+case $2 in
+PRE-INSTALL)
-if [ "$2" = "PRE-INSTALL" ]; then
if [ -d $PKG_PREFIX/firebird ]; then
if [ -d $PKG_PREFIX/firebird.old ]; then
rm -rf $PKG_PREFIX/firebird.old
@@ -21,60 +20,51 @@ fi
ln -fs $PKG_PREFIX/firebird /usr/interbase
-perl <<EOF
-eval '(exit \$?0)' && eval 'exec /usr/bin/perl -S \$0 \${1+"\$@"}'
-& eval 'exec /usr/bin/perl -S \$0 \$argv:q'
-if 0;
-
-if( \$> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" );
-} else {
- \$fbUID = 90;
- while( getpwuid( \$fbUID ) ) {
- \$fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" );
-} else {
- \$fbGID = 90;
- while( getgrgid( \$fbGID ) ) {
- \$fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:\$fbGID:" );
-}
-
-print "firebird user using uid \$fbUID\n";
-print "firebird user using gid \$fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local(\$file,@list) = @_;
- local(\$LOCK_EX) = 2;
- local(\$LOCK_NB) = 4;
- local(\$LOCK_UN) = 8;
-
- open(F, ">> \$file") || die "\$file: \$!\n";
- while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, \$LOCK_UN );
-}
-EOF
-elif [ "$2" = "POST-INSTALL" ]; then
-chown -R firebird:firebird $PKG_PREFIX/firebird
+if [ `id -u` -ne 0 ]; then
+ echo; echo "You must be root to run this step!"; echo; echo
+ exit 1
+fi
+
+nofbuid=0
+fbUID=`id -u firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbUID=90
+ while [ ! -z `id -un $fbUID 2>/dev/null` ]
+ do
+ fbUID=$(($fbUID+1))
+ done
+ nofbuid=1
+fi
+
+fbGID=`pw groupshow firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbGID=90
+ while [ ! -z `id -gn $fbGID 2>/dev/null` ]
+ do
+ fbGID=$(($fbGID+1))
+ done
+ echo "firebird:*:$fbGID" >> /etc/group
+else
+ fbGID=`echo $fbGID | awk -F: '{print $3}'`
+fi
+
+echo "firebird user using uid $fbUID"
+echo "firebird user using gid $fbGID"
-# Turn everybody to read only.
-chmod -R o=r $PKG_PREFIX/firebird
+if which -s pw; then
+ if [ $nofbuid -ne 0 ]; then
+ pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \
+ -d $PKG_PREFIX/firebird -c "Firebird pseudo-user"
+ fi
+else
+ echo -n "unable to create user firebird - please create it manually,"
+ echo " before reinstalling this package."
+ exit 1
+fi
+;;
+
+POST-INSTALL)
+chown -R firebird:firebird $PKG_PREFIX/firebird
# Now fix up the mess.
@@ -84,22 +74,28 @@ for i in `find $PKG_PREFIX/firebird -print`
FileName=$i
if [ -d $FileName ]
then
- chmod o=rx $FileName
+ chmod u=rwx,go=rx $FileName
fi
done
# make lib ldconfig-compatible
chown -R root:wheel $PKG_PREFIX/firebird/lib
-chmod -R g-w $PKG_PREFIX/firebird/lib
+
+# make the following read-only
+chmod -R a=r $PKG_PREFIX/firebird/UDF/*
+chmod -R a=r $PKG_PREFIX/firebird/include/*
+chmod -R a=r $PKG_PREFIX/firebird/intl/*
+chmod -R a=r $PKG_PREFIX/firebird/lib/*
# Fix UDF load problem
cd $PKG_PREFIX/firebird/lib
ln -sf ib_util.so libib_util.so
+ln -sf gds.so libgds.so.1
cd $PKG_PREFIX/firebird/bin
# all users can run everything.
-chmod o=rx *
+chmod a=rx *
# SUID is needed for running server programs.
@@ -121,14 +117,15 @@ for i in isc_init1 isc_lock1 isc_event1
chown firebird:firebird $FileName
done
-
touch interbase.log
-chmod ugo=rw interbase.log
+chmod u=rw,go= interbase.log
+chmod a=r interbase.msg
-# make databases writable by all
-chmod ugo=rw examples/v5/*.gdb
-chmod ugo=rw help/*.gdb
-chmod ugo=rw isc4.gdb
+# make databases writable by interbase only
+# local database connections are not a good idea
+chmod u=rw,go= examples/v5/*.gdb
+chmod u=rw,go= help/*.gdb
+chmod u=rw,go= isc4.gdb
# remove any existing gds service
cp /etc/services /etc/services.old
@@ -154,6 +151,7 @@ if [ -d $PKG_PREFIX/etc/rc.d ]; then
(
echo "#!/bin/sh"; echo "[ -d $PKG_PREFIX/firebird/lib ] && /sbin/ldconfig -m $PKG_PREFIX/firebird/lib"
) > $PKG_PREFIX/etc/rc.d/000.firebird.sh
+ chmod a=rx $PKG_PREFIX/etc/rc.d/000.firebird.sh
fi
-
-fi
+;;
+esac
diff --git a/databases/firebird-client/pkg-plist b/databases/firebird-client/pkg-plist
index 10f152fcbc82..4108b6237053 100644
--- a/databases/firebird-client/pkg-plist
+++ b/databases/firebird-client/pkg-plist
@@ -70,6 +70,10 @@ firebird/lib/libib_util.so
firebird/lib/gds_pyxis.a
firebird/help/help.gbak
firebird/help/help.gdb
+firebird/bin/ibguard
+firebird/bin/ibmgr
+firebird/bin/ibmgr.bin
+firebird/bin/ibserver
firebird/bin/isc4.gbak
firebird/bin/gpre
firebird/bin/gds_pipe
@@ -86,12 +90,15 @@ firebird/bin/gstat
firebird/bin/gds_relay
firebird/bin/gsec
firebird/bin/gbak
+firebird/misc/firebird.init.d.generic
+firebird/misc/firebird.init.d.mandrake
firebird/services.isc
firebird/isc_config
firebird/isc4.gdb
firebird/interbase.msg
firebird/interbase.log
firebird/inetd.conf.isc
+firebird/README
firebird/RELNOTES
@dirrm firebird
@dirrm firebird/intl
@@ -104,3 +111,4 @@ firebird/RELNOTES
@dirrm firebird/lib
@dirrm firebird/help
@dirrm firebird/bin
+@dirrm firebird/misc
diff --git a/databases/firebird-client/scripts/addservice b/databases/firebird-client/scripts/addservice
deleted file mode 100644
index df9aea5e91de..000000000000
--- a/databases/firebird-client/scripts/addservice
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-cat >>/etc/services <<EOF
-gds_db 3050/tcp #InterBase Database Remote Protocol
-EOF
-cat >>/etc/inetd.conf <<EOF
-gds_db stream tcp nowait firebird /usr/interbase/bin/gds_inet_server gds_inet_server
-EOF
-kill -HUP `cat /var/run/inetd.pid`
diff --git a/databases/firebird-client/scripts/createuser b/databases/firebird-client/scripts/createuser
deleted file mode 100644
index eba7ce1b887d..000000000000
--- a/databases/firebird-client/scripts/createuser
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-#
-
-eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
-& eval 'exec /usr/bin/perl -S $0 $argv:q'
-if 0;
-
-if( $> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( $null, $null, $fbUID ) = getpwnam( "firebird" );
-} else {
- $fbUID = 90;
- while( getpwuid( $fbUID ) ) {
- $fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( $null, $null, $fbGID ) = getgrnam( "firebird" );
-} else {
- $fbGID = 90;
- while( getgrgid( $fbGID ) ) {
- $fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:$fbGID:" );
-}
-
-print "firebird user using uid $fbUID\n";
-print "firebird user using gid $fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:$fbUID:$fbGID\:\:0:0:Firebird pseudo-user:$ENV{'PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local($file,@list) = @_;
- local($LOCK_EX) = 2;
- local($LOCK_NB) = 4;
- local($LOCK_UN) = 8;
-
- open(F, ">> $file") || die "$file: $!\n";
- while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, $LOCK_UN );
-}
diff --git a/databases/firebird-client/scripts/pre-build b/databases/firebird-client/scripts/pre-build
deleted file mode 100644
index 6605df7770fd..000000000000
--- a/databases/firebird-client/scripts/pre-build
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-GDS_LOCK_MGR=`ps ax |grep gds_lock_mgr |grep -v grep`;
-
-if [ "$GDS_LOCK_MGR" != "" ]; then
- echo "It appears you have a gds_lock_manager already running.";
- echo;
- echo "You must cease all InterBase operations to build this port.";
- echo "Make sure nobody is connected to any databases, then use";
- echo "'gds_drop -a' and manually verify (with ipcs) that the";
- echo "semaphores were removed.";
- exit 1;
-fi
-exit 0
-
diff --git a/databases/firebird-client/scripts/pre-install b/databases/firebird-client/scripts/pre-install
deleted file mode 100644
index a6e1b37a9008..000000000000
--- a/databases/firebird-client/scripts/pre-install
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if [ -d $PREFIX/firebird ]; then
- if [ -d $PREFIX/firebird.old ]; then
- rm -rf $PREFIX/firebird.old
- fi
- mv $PREFIX/firebird $PREFIX/firebird.old
-fi
-
-if [ -L /usr/interbase ]; then
- rm -f /usr/interbase
-fi
-
-if [ -d /usr/interbase ]; then
- mv /usr/interbase /usr/interbase.old
-fi
-
-ln -fs $PREFIX/firebird /usr/interbase
-
-perl $SCRIPTDIR/createuser
diff --git a/databases/firebird-client/scripts/rmservice b/databases/firebird-client/scripts/rmservice
deleted file mode 100644
index 58adfc17419d..000000000000
--- a/databases/firebird-client/scripts/rmservice
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cp /etc/services /etc/services.old
-cp /etc/inetd.conf /etc/inetd.conf.old
-cat /etc/services |grep -v gds_db >/etc/services.new
-cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new
-mv /etc/services.new /etc/services
-mv /etc/inetd.conf.new /etc/inetd.conf
diff --git a/databases/firebird-server/Makefile b/databases/firebird-server/Makefile
index 1606fc389e38..bc151970f413 100644
--- a/databases/firebird-server/Makefile
+++ b/databases/firebird-server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= firebird
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://firebird.sourceforge.net/download/ \
http://www.aims.com.au/chris/ \
@@ -25,7 +26,6 @@ LDCONFIG_DIRS= %%PREFIX%%/firebird/lib
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
USE_REINPLACE= yes
-USE_PERL5= yes
ONLY_FOR_ARCHS= i386
@@ -55,7 +55,7 @@ do-configure:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
${SH} buildBootDatabases; \
NOPROMPT_SETUP=yes; export NOPROMPT_SETUP; \
FIREBIRD_64_BIT_IO=yes; export FIREBIRD_64_BIT_IO; \
@@ -68,24 +68,27 @@ do-configure:
do-build:
@( \
- ${ECHO_CMD} '#!/bin/sh'; ${ECHO_CMD} \
- '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \
- ) > ${WRKDIR}/000.${PORTNAME}.sh
- @( \
- ${LN} -sf ${WRKDIR}/refDatabases/jrd/isc.gdb \
+ ${REINPLACE_CMD} -e 's,opt,usr,' \
+ ${WRKSRC}/firebird/install/linux/misc/ibmgr; \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/jrd/isc.gdb \
${WRKDIR}/firebird-1.0.0.796/interbase/isc4.gdb; \
- ${LN} -sf ${WRKDIR}/refDatabases/msgs/msg.gdb \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/msgs/msg.gdb \
${WRKDIR}/firebird-1.0.0.796/msg.gdb; \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
- ${SH} boot.freebsd; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
+ ${CP} ${PKGDIR}/files/buildit.sh ${WRKDIR}/firebird-1.0.0.796; \
+ ${SH} buildit.sh; \
)
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
do-install:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
- ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb || ${TRUE}; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/lib/gds.so.1 || ${TRUE}; \
${CP} /dev/null interbase/interbase.log; \
${CP} -Rp interbase ${PREFIX}/firebird; \
${RM} ${PREFIX}/firebird/install; \
@@ -94,7 +97,11 @@ do-install:
cd ${PREFIX}/firebird/examples; \
${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \
${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \
- ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \
+ ${CP} ${WRKSRC}/firebird/install/linux/misc/ibmgr \
+ ${PREFIX}/firebird/bin; \
)
+post-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.post.mk>
diff --git a/databases/firebird-server/files/RELNOTES b/databases/firebird-server/files/RELNOTES
index 5434347e24d2..a452990122ee 100644
--- a/databases/firebird-server/files/RELNOTES
+++ b/databases/firebird-server/files/RELNOTES
@@ -1,4 +1,4 @@
-Firebird 1.0.0 FreeBSD Release Notes 13-Mar-2002
+Firebird 1.0.0 FreeBSD Release Notes 10-Nov-2002
--------------------------------------
FB-T6.2.796 Firebird Final Release
@@ -64,6 +64,13 @@ try stopping PostgreSQL:
and see if that helps.
+ Super Server support has recently been added. However, there is
+anecdotal evidence that it is not as reliable nor as scalable as the
+Classic Server version. For this reason, I have not included a
+start up method for Super Server. For those that are interested,
+traversing to /usr/interbase/misc will find the startup scripts for
+the various flavours of Linux.
+
Complete documentation for InterBase(tm) is available (free of
charge) from http://www.interbase.com/ in PDF format. While
InterBase and Firebird are two distinct entities, all InterBase
diff --git a/databases/firebird-server/files/buildit.sh b/databases/firebird-server/files/buildit.sh
new file mode 100644
index 000000000000..d48627c0e21e
--- /dev/null
+++ b/databases/firebird-server/files/buildit.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+. Configure_SetupEnv.sh
+make super_firebird
diff --git a/databases/firebird-server/files/patch-builds::original::boot.sfx.interbase b/databases/firebird-server/files/patch-builds::original::boot.sfx.interbase
new file mode 100644
index 000000000000..62d0b483a07d
--- /dev/null
+++ b/databases/firebird-server/files/patch-builds::original::boot.sfx.interbase
@@ -0,0 +1,38 @@
+--- builds/original/boot.sfx.interbase.orig Tue Dec 18 01:40:08 2001
++++ builds/original/boot.sfx.interbase Sat Nov 9 17:44:54 2002
+@@ -68,7 +68,7 @@
+ #added completed according to inprise tree
+ #FSG 093000
+
+-firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib examples completed
++firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib completed
+
+ # burp wanted to build gpre
+ # we break this dependency
+@@ -159,14 +159,14 @@
+ # 1995-June-7 David Schnepper
+ # removed pyxis 3-Aug-00 TMC
+ #executables: alice burp dudley gpre miscFiles $(INTL) isql locks \
+- $(SUPER_SERVER) qli remote spit utilities \
+- $(SHARED_AM) $(LINKABLE_LIBS)
++# $(SUPER_SERVER) qli remote spit utilities \
++# $(SHARED_AM) $(LINKABLE_LIBS)
+
+ executables: alice dudley miscFiles $(INTL) isql locks \
+ $(SUPER_SERVER) qli remote spit utilities \
+ $(SHARED_AM) $(LINKABLE_LIBS)
+
+-super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix gsec security_db extlib examples completed
++super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix relay gsec security_db extlib completed
+
+ super_targets: s_run_codes s_alice s_burp s_dba s_security_c super_client super_server super_utils
+
+@@ -195,7 +195,7 @@
+
+ super_client: force
+ $(QUIET_ECHO) "Building super/client..."
+- $(SH) '$(CD) source/super/client; $(MAKE) CFLAGS="$(CFLAGS) -DSUPERCLIENT" SYSTEM="$(SYSTEM)" super_client'
++ $(SH) '$(CD) source/super/client; $(MAKE) SYSTEM="$(SYSTEM)" super_client'
+
+ csu gcsu: $(ACCESS_METHOD) force
+ $(QUIET_ECHO) "Building GCSU..."
diff --git a/databases/firebird-server/files/patch-builds::original::edit_make b/databases/firebird-server/files/patch-builds::original::edit_make
new file mode 100644
index 000000000000..d107078c7a59
--- /dev/null
+++ b/databases/firebird-server/files/patch-builds::original::edit_make
@@ -0,0 +1,32 @@
+--- builds/original/edit_make.orig Fri Aug 4 06:42:41 2000
++++ builds/original/edit_make Sat Nov 9 16:06:59 2002
+@@ -16,13 +16,25 @@
+ # Contributor(s): ______________________________________.
+ if [ "$SYS_TYPE" != "NOLINK_OS" -a "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then
+ if [ "$3" = "make.client" ]; then
+- sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
+- -e "s/\$(SYSTEM)/$1/g" \
+- -e "s/\$(VERSION)/$2/g" \
+- -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ if [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT -D_REENTRANT -D_THREAD_SAFE/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ else
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ fi
+ elif [ "$3" = "make.dsql_ss" -o "$3" = "make.intl_ss" -o "$3" = "make.journal_ss" -o "$3" = "make.jrd_ss" -o "$3" = "make.lock_ss" -o "$3" = "make.remote_ss" -o "$3" = "make.wal_ss" -o "$3" = "make.burp_ss" -o "$3" = "make.alice_ss" -o "$3" = "make.utilities_ss" ]; then
+ if [ "$1" = "HP10" -o "$1" = "LINUX" ]; then
+ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ elif [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT -D_THREAD_SAFE/g" \
+ -e "s/\$(SYSTEM)/$1/g" \
+ -e "s/\$(VERSION)/$2/g" \
+ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
diff --git a/databases/firebird-server/files/patch-builds::original::platform b/databases/firebird-server/files/patch-builds::original::platform
new file mode 100644
index 000000000000..149f2fe3a4f6
--- /dev/null
+++ b/databases/firebird-server/files/patch-builds::original::platform
@@ -0,0 +1,13 @@
+--- builds/original/platform.orig Sun Sep 16 22:15:14 2001
++++ builds/original/platform Sat Nov 9 16:16:23 2002
+@@ -32,6 +32,10 @@
+ SYS_TYPE=GENERIC
+ fi
+ export SYS_TYPE
++if [ $1 = 'FREEBSD' ]; then
++ FBBUILDHACK=$1
++ export FBBUILDHACK
++fi
+ #
+ if [ $1 = 'SUN3_4' -o $1 = 'SUN4' -o $1 = 'AP' -o $1 = 'AX' ]; then
+ TR='tr "A-Z" "a-z"'
diff --git a/databases/firebird-server/files/patch-builds::original::prefix.freebsd b/databases/firebird-server/files/patch-builds::original::prefix.freebsd
new file mode 100644
index 000000000000..ec8d8343f61d
--- /dev/null
+++ b/databases/firebird-server/files/patch-builds::original::prefix.freebsd
@@ -0,0 +1,102 @@
+--- builds/original/prefix.freebsd.orig Sat Jan 13 05:18:13 2001
++++ builds/original/prefix.freebsd Sat Nov 9 16:49:17 2002
+@@ -28,20 +28,20 @@
+
+
+ PROD_DEBUG_OBJECTS= nodebug.o
+-PROD_SHRLIB_DIR= -Lsource/jrd
++PROD_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ PROD_VERSION_FLAG= -DPROD_BUILD
+-PROD_CFLAGS= -O -m486 -fpic -DFLINTSTONE
++PROD_CFLAGS= -O -pipe -march=i486 -fpic -DFLINTSTONE
+
+
+ DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o
+-DEV_SHRLIB_DIR= -Lsource/jrd
++DEV_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ DEV_VERSION_FLAG= -DDEV_BUILD
+ DEV_CFLAGS= -ggdb
+
+ DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS)
+ SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR)
+ VERSION_FLAG= $($(VERSION)_VERSION_FLAG)
+-CFLAGS_COMMON= $($(VERSION)_CFLAGS) -Isource/interbase/include -DFREEBSD -w -fwritable-strings
++CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DFREEBSD -w -fwritable-strings -Isource/interbase/include
+ CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG)
+ PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC
+ SPECIAL_OBJECTS= j
+@@ -62,21 +62,21 @@
+ BIN_PATH= interbase/bin
+ BRIDGE_MISC= head5.o allp.o
+ CHMOD_VAL= 666
+-CURSES_LIB= -lncurses
++CURSES_LIB=
+ DSQL_P_OBJS= dsql_p_objects
+-FORM_OBJECTS= form.o
+-FORM_TRN_OBJECTS= form_trn.o
++FORM_OBJECTS= noform.o
++FORM_TRN_OBJECTS=
+ FUNCTIONS= functions.bin
+ FUNCSHR= source/interbase/lib/gdsf.so
+ GDS_LINK= $(GDSSHR_LINK)
+-GDS_PYXIS= gds_pyxis.a
++GDS_PYXIS=
+ GDSLIB_BACKEND= source/interbase/lib/gds_b.a
+ GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -ldescrypt
+
+ GDSSHR= source/interbase/lib/gds.so
+ LINUX_GDSSHR= $(GDSSHR)
+-GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -ldescrypt
+-PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis
++GDSSHR_LINK= $(SHRLIB_DIR) -lgds -ldescrypt
++PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds
+ HLPDIR= source/qli/
+ HOSTNAME= `hostname | cut -d'.' -f1`
+ INCLUDES= include_so include_so_ada
+@@ -92,7 +92,7 @@
+ JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j
+ JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin
+ LANG_OBJECTS= ada.o ftn.o cob.o
+-LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn
++LANGUAGES= cc cxx ada microfocus_cob make16 gdl1 sun_ftn
+ LD_LIBS= -lc
+ LD_LIBS_J= -lc
+ LD_OPTS= -shared
+@@ -104,28 +104,28 @@
+ MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm
+ PIC_FLAGS= $(CFLAGS) -fPIC
+ PIPE= gds.a gds_pipe
+-PYXIS= pyxis
+-PYXIS_MISC_OBJS= $(PYXIS_MISC)
+-PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC)
+-PYXIS_OBJECTS= pyxis_objects
+-PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o
++PYXIS=
++PYXIS_MISC_OBJS=
++PYXIS_P_MISC_OBJS=
++PYXIS_OBJECTS=
++PYXIS_MISC_OBJECTS=
+ REG_HELP= isc_ins_hlp.dat
+ REMOTE_GDSSHR= $(GDSSHR)
+ REMOTE_GDSSHR_LINK= $(SERVER_LINK)
+ REMOTE_P_OBJS= rem_p_objects
+-SCREEN_LIBS=
+-#SCREEN_LIBS= -lncurses
++#SCREEN_LIBS=
++SCREEN_LIBS= -lncurses
+ SERVER_LINK= $(GDSSHR_LINK)
+ SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD;
+ SPECIAL_OPT= source/special_opt
+ NETWORK_LIB=
+ SOCKET_LIB= -lc
+-THREAD_LIB= -llthread
++THREAD_LIB= -pthread
+ SUN_FUNCSHR= $(FUNCSHR)
+ LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1
+ SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR)
+ SUPER_BACKEND= source/jrd/gds_ss.a
+-SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldescrypt -L/usr/local/lib -llthread
++SUPER_LINK= -pthread -Lsource/jrd -lgds_ss -ldescrypt
+ SUPER_SERVER=
+ UTILITIES=
+ WAL_P_OBJS= wal_p_objects
diff --git a/databases/firebird-server/files/patch-jrd::gds.c b/databases/firebird-server/files/patch-jrd::gds.c
new file mode 100644
index 000000000000..523abb725403
--- /dev/null
+++ b/databases/firebird-server/files/patch-jrd::gds.c
@@ -0,0 +1,24 @@
+--- jrd/gds.c.orig Sat Mar 2 00:15:11 2002
++++ jrd/gds.c Sun Jul 7 14:27:44 2002
+@@ -159,7 +159,7 @@
+ engine and this change may imply side effect I haven't known
+ about yet. Tomas Nejedlik (tomas@nejedlik.cz)
+ */
+-#if (defined(LINUX) && defined(SUPERCLIENT))
++#if ((defined(LINUX) || defined(FREEBSD)) && defined(SUPERCLIENT))
+ #define V4_THREADING
+ #endif
+
+@@ -3510,9 +3510,9 @@
+ #else
+ (MAP_ANON |
+ #endif
+-#if (!defined LINUX && !defined DARWIN)
+-/* In LINUX, Solaris, and Darwin there is no such thing as MAP_VARIABLE. Hence, it gives
+- compilation error. The equivalent functionality is default,
++#if (!defined LINUX && !defined DARWIN && !defined FREEBSD)
++/* In LINUX, Solaris, FreeBSD and Darwin there is no such thing as MAP_VARIABLE.
++ Hence, it gives compilation error. The equivalent functionality is default,
+ if you do not specify MAP_FIXED */
+ MAP_VARIABLE |
+ #endif /* LINUX */
diff --git a/databases/firebird-server/files/patch-jrd::isc_file.c b/databases/firebird-server/files/patch-jrd::isc_file.c
new file mode 100644
index 000000000000..7047f182d59c
--- /dev/null
+++ b/databases/firebird-server/files/patch-jrd::isc_file.c
@@ -0,0 +1,15 @@
+--- jrd/isc_file.c.orig Tue Dec 18 01:40:18 2001
++++ jrd/isc_file.c Sat Jul 6 18:04:55 2002
+@@ -106,6 +106,12 @@
+ #define MTAB_CLOSE(stream) ib_fclose (stream)
+ #endif
+
++#ifdef FREEBSD
++#define MTAB "/etc/fstab"
++#define MTAB_OPEN(path,type) ib_fopen (path, type)
++#define MTAB_CLOSE(stream) ib_fclose (stream)
++#endif
++
+ #ifdef DARWIN
+ #define MTAB "/etc/fstab.hd"
+ #define MTAB_OPEN(path,type) ib_fopen (path, type)
diff --git a/databases/firebird-server/files/patch-jrd::isc_sync.c b/databases/firebird-server/files/patch-jrd::isc_sync.c
new file mode 100644
index 000000000000..19e327a1705f
--- /dev/null
+++ b/databases/firebird-server/files/patch-jrd::isc_sync.c
@@ -0,0 +1,38 @@
+--- jrd/isc_sync.c.orig Tue Mar 5 21:11:25 2002
++++ jrd/isc_sync.c Sat Jul 6 18:06:30 2002
+@@ -1467,7 +1467,7 @@
+ pthread_mutex_init (event->event_mutex, pthread_mutexattr_default);
+ pthread_cond_init (event->event_semnum, pthread_condattr_default);
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ pthread_mutex_init (event->event_mutex, NULL);
+ pthread_cond_init (event->event_semnum, NULL);
+ #else
+@@ -1596,7 +1596,7 @@
+ #ifdef HP10
+ if (micro_seconds > 0 && (ret == -1) && (errno == EAGAIN))
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ if (micro_seconds > 0 && (ret == ETIMEDOUT))
+ #else
+ if (micro_seconds > 0 && (ret == ETIME))
+@@ -5198,7 +5198,7 @@
+ **************************************/
+ int state;
+
+-#if (!defined HP10 && !defined linux && !defined DARWIN)
++#if (!defined HP10 && !defined linux && !defined DARWIN && !defined FREEBSD)
+
+ pthread_mutexattr_t mattr;
+
+@@ -5218,7 +5218,7 @@
+ server (until we are to implement local IPC using shared
+ memory in which case we need interprocess thread sync.
+ */
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ return pthread_mutex_init (mutex->mtx_mutex, NULL);
+ #else
+ state = pthread_mutex_init (mutex->mtx_mutex, pthread_mutexattr_default);
diff --git a/databases/firebird-server/files/patch-jrd::jrd.h b/databases/firebird-server/files/patch-jrd::jrd.h
new file mode 100644
index 000000000000..0a280080c74a
--- /dev/null
+++ b/databases/firebird-server/files/patch-jrd::jrd.h
@@ -0,0 +1,12 @@
+--- jrd/jrd.h.orig Tue May 14 19:01:06 2002
++++ jrd/jrd.h Tue May 14 19:23:44 2002
+@@ -717,7 +717,8 @@
+ #ifdef MULTI_THREAD
+ #if (defined APOLLO || defined DECOSF || defined NETWARE_386 || \
+ defined NeXT || defined SOLARIS_MT || defined WIN_NT || \
+- defined OS2_ONLY || defined HP10 || defined LINUX || defined DARWIN)
++ defined OS2_ONLY || defined HP10 || defined LINUX || \
++ defined DARWIN || defined FREEBSD)
+ #define PLATFORM_GET_THREAD_DATA ((TDBB) THD_get_specific())
+ #endif
+ #endif
diff --git a/databases/firebird-server/files/patch-jrd::thd.c b/databases/firebird-server/files/patch-jrd::thd.c
new file mode 100644
index 000000000000..a09c3fe4e1c3
--- /dev/null
+++ b/databases/firebird-server/files/patch-jrd::thd.c
@@ -0,0 +1,20 @@
+--- jrd/thd.c.orig Thu May 24 14:11:11 2001
++++ jrd/thd.c Sun Jul 7 14:52:07 2002
+@@ -2605,7 +2605,7 @@
+ int detach_state=PTHREAD_CREATE_DETACHED
+ #endif
+
+-#if ( !defined HP10 && !defined linux )
++#if ( !defined HP10 && !defined linux && !defined FREEBSD )
+
+ state = pthread_attr_init (&pattr);
+ if (state)
+@@ -2628,7 +2628,7 @@
+ return state;
+
+ #else
+-#ifdef linux
++#if ( defined linux || defined FREEBSD )
+ if (state = pthread_create (&thread, NULL, routine, arg))
+ return state;
+ return pthread_detach (thread);
diff --git a/databases/firebird-server/files/patch-jrd::thd.h b/databases/firebird-server/files/patch-jrd::thd.h
new file mode 100644
index 000000000000..b4e74ecfbe59
--- /dev/null
+++ b/databases/firebird-server/files/patch-jrd::thd.h
@@ -0,0 +1,14 @@
+--- jrd/thd.h.orig Sat Mar 2 00:16:31 2002
++++ jrd/thd.h Mon May 13 19:10:37 2002
+@@ -98,6 +98,11 @@
+ #define MULTI_THREAD 1
+ #endif
+
++#if (defined(FREEBSD) && defined(SUPERSERVER))
++#define POSIX_THREADS 1
++#define MULTI_THREAD 1
++#endif
++
+ #ifdef VMS
+ #ifndef GATEWAY
+ #define MULTI_THREAD 1
diff --git a/databases/firebird-server/files/patch-lock::lock.h b/databases/firebird-server/files/patch-lock::lock.h
new file mode 100644
index 000000000000..fe7ad684d99e
--- /dev/null
+++ b/databases/firebird-server/files/patch-lock::lock.h
@@ -0,0 +1,13 @@
+--- lock/lock.h.orig Wed Jun 6 05:43:58 2001
++++ lock/lock.h Sat Jul 6 18:08:56 2002
+@@ -65,8 +65,10 @@
+ #ifndef SOLARIS_MT
+ #if !(defined(HP10) && defined(SUPERSERVER))
+ #if !(defined(LINUX) && defined(SUPERSERVER))
++#if !(defined(FREEBSD) && defined(SUPERSERVER))
+ #ifndef DARWIN
+ #define MANAGER_PROCESS
++#endif
+ #endif
+ #endif
+ #endif
diff --git a/databases/firebird-server/pkg-install b/databases/firebird-server/pkg-install
index af43f63a3943..6fd18e94bd21 100644
--- a/databases/firebird-server/pkg-install
+++ b/databases/firebird-server/pkg-install
@@ -1,9 +1,8 @@
#!/bin/sh
-# Created in haste by smashing together various
-# files from the port scripts.
+case $2 in
+PRE-INSTALL)
-if [ "$2" = "PRE-INSTALL" ]; then
if [ -d $PKG_PREFIX/firebird ]; then
if [ -d $PKG_PREFIX/firebird.old ]; then
rm -rf $PKG_PREFIX/firebird.old
@@ -21,60 +20,51 @@ fi
ln -fs $PKG_PREFIX/firebird /usr/interbase
-perl <<EOF
-eval '(exit \$?0)' && eval 'exec /usr/bin/perl -S \$0 \${1+"\$@"}'
-& eval 'exec /usr/bin/perl -S \$0 \$argv:q'
-if 0;
-
-if( \$> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" );
-} else {
- \$fbUID = 90;
- while( getpwuid( \$fbUID ) ) {
- \$fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" );
-} else {
- \$fbGID = 90;
- while( getgrgid( \$fbGID ) ) {
- \$fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:\$fbGID:" );
-}
-
-print "firebird user using uid \$fbUID\n";
-print "firebird user using gid \$fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local(\$file,@list) = @_;
- local(\$LOCK_EX) = 2;
- local(\$LOCK_NB) = 4;
- local(\$LOCK_UN) = 8;
-
- open(F, ">> \$file") || die "\$file: \$!\n";
- while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, \$LOCK_UN );
-}
-EOF
-elif [ "$2" = "POST-INSTALL" ]; then
-chown -R firebird:firebird $PKG_PREFIX/firebird
+if [ `id -u` -ne 0 ]; then
+ echo; echo "You must be root to run this step!"; echo; echo
+ exit 1
+fi
+
+nofbuid=0
+fbUID=`id -u firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbUID=90
+ while [ ! -z `id -un $fbUID 2>/dev/null` ]
+ do
+ fbUID=$(($fbUID+1))
+ done
+ nofbuid=1
+fi
+
+fbGID=`pw groupshow firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbGID=90
+ while [ ! -z `id -gn $fbGID 2>/dev/null` ]
+ do
+ fbGID=$(($fbGID+1))
+ done
+ echo "firebird:*:$fbGID" >> /etc/group
+else
+ fbGID=`echo $fbGID | awk -F: '{print $3}'`
+fi
+
+echo "firebird user using uid $fbUID"
+echo "firebird user using gid $fbGID"
-# Turn everybody to read only.
-chmod -R o=r $PKG_PREFIX/firebird
+if which -s pw; then
+ if [ $nofbuid -ne 0 ]; then
+ pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \
+ -d $PKG_PREFIX/firebird -c "Firebird pseudo-user"
+ fi
+else
+ echo -n "unable to create user firebird - please create it manually,"
+ echo " before reinstalling this package."
+ exit 1
+fi
+;;
+
+POST-INSTALL)
+chown -R firebird:firebird $PKG_PREFIX/firebird
# Now fix up the mess.
@@ -84,22 +74,28 @@ for i in `find $PKG_PREFIX/firebird -print`
FileName=$i
if [ -d $FileName ]
then
- chmod o=rx $FileName
+ chmod u=rwx,go=rx $FileName
fi
done
# make lib ldconfig-compatible
chown -R root:wheel $PKG_PREFIX/firebird/lib
-chmod -R g-w $PKG_PREFIX/firebird/lib
+
+# make the following read-only
+chmod -R a=r $PKG_PREFIX/firebird/UDF/*
+chmod -R a=r $PKG_PREFIX/firebird/include/*
+chmod -R a=r $PKG_PREFIX/firebird/intl/*
+chmod -R a=r $PKG_PREFIX/firebird/lib/*
# Fix UDF load problem
cd $PKG_PREFIX/firebird/lib
ln -sf ib_util.so libib_util.so
+ln -sf gds.so libgds.so.1
cd $PKG_PREFIX/firebird/bin
# all users can run everything.
-chmod o=rx *
+chmod a=rx *
# SUID is needed for running server programs.
@@ -121,14 +117,15 @@ for i in isc_init1 isc_lock1 isc_event1
chown firebird:firebird $FileName
done
-
touch interbase.log
-chmod ugo=rw interbase.log
+chmod u=rw,go= interbase.log
+chmod a=r interbase.msg
-# make databases writable by all
-chmod ugo=rw examples/v5/*.gdb
-chmod ugo=rw help/*.gdb
-chmod ugo=rw isc4.gdb
+# make databases writable by interbase only
+# local database connections are not a good idea
+chmod u=rw,go= examples/v5/*.gdb
+chmod u=rw,go= help/*.gdb
+chmod u=rw,go= isc4.gdb
# remove any existing gds service
cp /etc/services /etc/services.old
@@ -154,6 +151,7 @@ if [ -d $PKG_PREFIX/etc/rc.d ]; then
(
echo "#!/bin/sh"; echo "[ -d $PKG_PREFIX/firebird/lib ] && /sbin/ldconfig -m $PKG_PREFIX/firebird/lib"
) > $PKG_PREFIX/etc/rc.d/000.firebird.sh
+ chmod a=rx $PKG_PREFIX/etc/rc.d/000.firebird.sh
fi
-
-fi
+;;
+esac
diff --git a/databases/firebird-server/pkg-plist b/databases/firebird-server/pkg-plist
index 10f152fcbc82..4108b6237053 100644
--- a/databases/firebird-server/pkg-plist
+++ b/databases/firebird-server/pkg-plist
@@ -70,6 +70,10 @@ firebird/lib/libib_util.so
firebird/lib/gds_pyxis.a
firebird/help/help.gbak
firebird/help/help.gdb
+firebird/bin/ibguard
+firebird/bin/ibmgr
+firebird/bin/ibmgr.bin
+firebird/bin/ibserver
firebird/bin/isc4.gbak
firebird/bin/gpre
firebird/bin/gds_pipe
@@ -86,12 +90,15 @@ firebird/bin/gstat
firebird/bin/gds_relay
firebird/bin/gsec
firebird/bin/gbak
+firebird/misc/firebird.init.d.generic
+firebird/misc/firebird.init.d.mandrake
firebird/services.isc
firebird/isc_config
firebird/isc4.gdb
firebird/interbase.msg
firebird/interbase.log
firebird/inetd.conf.isc
+firebird/README
firebird/RELNOTES
@dirrm firebird
@dirrm firebird/intl
@@ -104,3 +111,4 @@ firebird/RELNOTES
@dirrm firebird/lib
@dirrm firebird/help
@dirrm firebird/bin
+@dirrm firebird/misc
diff --git a/databases/firebird-server/scripts/addservice b/databases/firebird-server/scripts/addservice
deleted file mode 100644
index df9aea5e91de..000000000000
--- a/databases/firebird-server/scripts/addservice
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-cat >>/etc/services <<EOF
-gds_db 3050/tcp #InterBase Database Remote Protocol
-EOF
-cat >>/etc/inetd.conf <<EOF
-gds_db stream tcp nowait firebird /usr/interbase/bin/gds_inet_server gds_inet_server
-EOF
-kill -HUP `cat /var/run/inetd.pid`
diff --git a/databases/firebird-server/scripts/createuser b/databases/firebird-server/scripts/createuser
deleted file mode 100644
index eba7ce1b887d..000000000000
--- a/databases/firebird-server/scripts/createuser
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-#
-
-eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
-& eval 'exec /usr/bin/perl -S $0 $argv:q'
-if 0;
-
-if( $> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( $null, $null, $fbUID ) = getpwnam( "firebird" );
-} else {
- $fbUID = 90;
- while( getpwuid( $fbUID ) ) {
- $fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( $null, $null, $fbGID ) = getgrnam( "firebird" );
-} else {
- $fbGID = 90;
- while( getgrgid( $fbGID ) ) {
- $fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:$fbGID:" );
-}
-
-print "firebird user using uid $fbUID\n";
-print "firebird user using gid $fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:$fbUID:$fbGID\:\:0:0:Firebird pseudo-user:$ENV{'PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local($file,@list) = @_;
- local($LOCK_EX) = 2;
- local($LOCK_NB) = 4;
- local($LOCK_UN) = 8;
-
- open(F, ">> $file") || die "$file: $!\n";
- while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, $LOCK_UN );
-}
diff --git a/databases/firebird-server/scripts/pre-build b/databases/firebird-server/scripts/pre-build
deleted file mode 100644
index 6605df7770fd..000000000000
--- a/databases/firebird-server/scripts/pre-build
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-GDS_LOCK_MGR=`ps ax |grep gds_lock_mgr |grep -v grep`;
-
-if [ "$GDS_LOCK_MGR" != "" ]; then
- echo "It appears you have a gds_lock_manager already running.";
- echo;
- echo "You must cease all InterBase operations to build this port.";
- echo "Make sure nobody is connected to any databases, then use";
- echo "'gds_drop -a' and manually verify (with ipcs) that the";
- echo "semaphores were removed.";
- exit 1;
-fi
-exit 0
-
diff --git a/databases/firebird-server/scripts/pre-install b/databases/firebird-server/scripts/pre-install
deleted file mode 100644
index a6e1b37a9008..000000000000
--- a/databases/firebird-server/scripts/pre-install
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if [ -d $PREFIX/firebird ]; then
- if [ -d $PREFIX/firebird.old ]; then
- rm -rf $PREFIX/firebird.old
- fi
- mv $PREFIX/firebird $PREFIX/firebird.old
-fi
-
-if [ -L /usr/interbase ]; then
- rm -f /usr/interbase
-fi
-
-if [ -d /usr/interbase ]; then
- mv /usr/interbase /usr/interbase.old
-fi
-
-ln -fs $PREFIX/firebird /usr/interbase
-
-perl $SCRIPTDIR/createuser
diff --git a/databases/firebird-server/scripts/rmservice b/databases/firebird-server/scripts/rmservice
deleted file mode 100644
index 58adfc17419d..000000000000
--- a/databases/firebird-server/scripts/rmservice
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cp /etc/services /etc/services.old
-cp /etc/inetd.conf /etc/inetd.conf.old
-cat /etc/services |grep -v gds_db >/etc/services.new
-cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new
-mv /etc/services.new /etc/services
-mv /etc/inetd.conf.new /etc/inetd.conf
diff --git a/databases/firebird/Makefile b/databases/firebird/Makefile
index 1606fc389e38..bc151970f413 100644
--- a/databases/firebird/Makefile
+++ b/databases/firebird/Makefile
@@ -7,6 +7,7 @@
PORTNAME= firebird
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://firebird.sourceforge.net/download/ \
http://www.aims.com.au/chris/ \
@@ -25,7 +26,6 @@ LDCONFIG_DIRS= %%PREFIX%%/firebird/lib
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
USE_REINPLACE= yes
-USE_PERL5= yes
ONLY_FOR_ARCHS= i386
@@ -55,7 +55,7 @@ do-configure:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
${SH} buildBootDatabases; \
NOPROMPT_SETUP=yes; export NOPROMPT_SETUP; \
FIREBIRD_64_BIT_IO=yes; export FIREBIRD_64_BIT_IO; \
@@ -68,24 +68,27 @@ do-configure:
do-build:
@( \
- ${ECHO_CMD} '#!/bin/sh'; ${ECHO_CMD} \
- '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \
- ) > ${WRKDIR}/000.${PORTNAME}.sh
- @( \
- ${LN} -sf ${WRKDIR}/refDatabases/jrd/isc.gdb \
+ ${REINPLACE_CMD} -e 's,opt,usr,' \
+ ${WRKSRC}/firebird/install/linux/misc/ibmgr; \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/jrd/isc.gdb \
${WRKDIR}/firebird-1.0.0.796/interbase/isc4.gdb; \
- ${LN} -sf ${WRKDIR}/refDatabases/msgs/msg.gdb \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/msgs/msg.gdb \
${WRKDIR}/firebird-1.0.0.796/msg.gdb; \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
- ${SH} boot.freebsd; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
+ ${CP} ${PKGDIR}/files/buildit.sh ${WRKDIR}/firebird-1.0.0.796; \
+ ${SH} buildit.sh; \
)
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
do-install:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
- ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb || ${TRUE}; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/lib/gds.so.1 || ${TRUE}; \
${CP} /dev/null interbase/interbase.log; \
${CP} -Rp interbase ${PREFIX}/firebird; \
${RM} ${PREFIX}/firebird/install; \
@@ -94,7 +97,11 @@ do-install:
cd ${PREFIX}/firebird/examples; \
${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \
${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \
- ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \
+ ${CP} ${WRKSRC}/firebird/install/linux/misc/ibmgr \
+ ${PREFIX}/firebird/bin; \
)
+post-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.post.mk>
diff --git a/databases/firebird/files/RELNOTES b/databases/firebird/files/RELNOTES
index 5434347e24d2..a452990122ee 100644
--- a/databases/firebird/files/RELNOTES
+++ b/databases/firebird/files/RELNOTES
@@ -1,4 +1,4 @@
-Firebird 1.0.0 FreeBSD Release Notes 13-Mar-2002
+Firebird 1.0.0 FreeBSD Release Notes 10-Nov-2002
--------------------------------------
FB-T6.2.796 Firebird Final Release
@@ -64,6 +64,13 @@ try stopping PostgreSQL:
and see if that helps.
+ Super Server support has recently been added. However, there is
+anecdotal evidence that it is not as reliable nor as scalable as the
+Classic Server version. For this reason, I have not included a
+start up method for Super Server. For those that are interested,
+traversing to /usr/interbase/misc will find the startup scripts for
+the various flavours of Linux.
+
Complete documentation for InterBase(tm) is available (free of
charge) from http://www.interbase.com/ in PDF format. While
InterBase and Firebird are two distinct entities, all InterBase
diff --git a/databases/firebird/files/buildit.sh b/databases/firebird/files/buildit.sh
new file mode 100644
index 000000000000..d48627c0e21e
--- /dev/null
+++ b/databases/firebird/files/buildit.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+. Configure_SetupEnv.sh
+make super_firebird
diff --git a/databases/firebird/files/patch-builds::original::boot.sfx.interbase b/databases/firebird/files/patch-builds::original::boot.sfx.interbase
new file mode 100644
index 000000000000..62d0b483a07d
--- /dev/null
+++ b/databases/firebird/files/patch-builds::original::boot.sfx.interbase
@@ -0,0 +1,38 @@
+--- builds/original/boot.sfx.interbase.orig Tue Dec 18 01:40:08 2001
++++ builds/original/boot.sfx.interbase Sat Nov 9 17:44:54 2002
+@@ -68,7 +68,7 @@
+ #added completed according to inprise tree
+ #FSG 093000
+
+-firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib examples completed
++firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib completed
+
+ # burp wanted to build gpre
+ # we break this dependency
+@@ -159,14 +159,14 @@
+ # 1995-June-7 David Schnepper
+ # removed pyxis 3-Aug-00 TMC
+ #executables: alice burp dudley gpre miscFiles $(INTL) isql locks \
+- $(SUPER_SERVER) qli remote spit utilities \
+- $(SHARED_AM) $(LINKABLE_LIBS)
++# $(SUPER_SERVER) qli remote spit utilities \
++# $(SHARED_AM) $(LINKABLE_LIBS)
+
+ executables: alice dudley miscFiles $(INTL) isql locks \
+ $(SUPER_SERVER) qli remote spit utilities \
+ $(SHARED_AM) $(LINKABLE_LIBS)
+
+-super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix gsec security_db extlib examples completed
++super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix relay gsec security_db extlib completed
+
+ super_targets: s_run_codes s_alice s_burp s_dba s_security_c super_client super_server super_utils
+
+@@ -195,7 +195,7 @@
+
+ super_client: force
+ $(QUIET_ECHO) "Building super/client..."
+- $(SH) '$(CD) source/super/client; $(MAKE) CFLAGS="$(CFLAGS) -DSUPERCLIENT" SYSTEM="$(SYSTEM)" super_client'
++ $(SH) '$(CD) source/super/client; $(MAKE) SYSTEM="$(SYSTEM)" super_client'
+
+ csu gcsu: $(ACCESS_METHOD) force
+ $(QUIET_ECHO) "Building GCSU..."
diff --git a/databases/firebird/files/patch-builds::original::edit_make b/databases/firebird/files/patch-builds::original::edit_make
new file mode 100644
index 000000000000..d107078c7a59
--- /dev/null
+++ b/databases/firebird/files/patch-builds::original::edit_make
@@ -0,0 +1,32 @@
+--- builds/original/edit_make.orig Fri Aug 4 06:42:41 2000
++++ builds/original/edit_make Sat Nov 9 16:06:59 2002
+@@ -16,13 +16,25 @@
+ # Contributor(s): ______________________________________.
+ if [ "$SYS_TYPE" != "NOLINK_OS" -a "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then
+ if [ "$3" = "make.client" ]; then
+- sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
+- -e "s/\$(SYSTEM)/$1/g" \
+- -e "s/\$(VERSION)/$2/g" \
+- -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ if [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT -D_REENTRANT -D_THREAD_SAFE/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ else
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ fi
+ elif [ "$3" = "make.dsql_ss" -o "$3" = "make.intl_ss" -o "$3" = "make.journal_ss" -o "$3" = "make.jrd_ss" -o "$3" = "make.lock_ss" -o "$3" = "make.remote_ss" -o "$3" = "make.wal_ss" -o "$3" = "make.burp_ss" -o "$3" = "make.alice_ss" -o "$3" = "make.utilities_ss" ]; then
+ if [ "$1" = "HP10" -o "$1" = "LINUX" ]; then
+ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ elif [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT -D_THREAD_SAFE/g" \
+ -e "s/\$(SYSTEM)/$1/g" \
+ -e "s/\$(VERSION)/$2/g" \
+ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
diff --git a/databases/firebird/files/patch-builds::original::platform b/databases/firebird/files/patch-builds::original::platform
new file mode 100644
index 000000000000..149f2fe3a4f6
--- /dev/null
+++ b/databases/firebird/files/patch-builds::original::platform
@@ -0,0 +1,13 @@
+--- builds/original/platform.orig Sun Sep 16 22:15:14 2001
++++ builds/original/platform Sat Nov 9 16:16:23 2002
+@@ -32,6 +32,10 @@
+ SYS_TYPE=GENERIC
+ fi
+ export SYS_TYPE
++if [ $1 = 'FREEBSD' ]; then
++ FBBUILDHACK=$1
++ export FBBUILDHACK
++fi
+ #
+ if [ $1 = 'SUN3_4' -o $1 = 'SUN4' -o $1 = 'AP' -o $1 = 'AX' ]; then
+ TR='tr "A-Z" "a-z"'
diff --git a/databases/firebird/files/patch-builds::original::prefix.freebsd b/databases/firebird/files/patch-builds::original::prefix.freebsd
new file mode 100644
index 000000000000..ec8d8343f61d
--- /dev/null
+++ b/databases/firebird/files/patch-builds::original::prefix.freebsd
@@ -0,0 +1,102 @@
+--- builds/original/prefix.freebsd.orig Sat Jan 13 05:18:13 2001
++++ builds/original/prefix.freebsd Sat Nov 9 16:49:17 2002
+@@ -28,20 +28,20 @@
+
+
+ PROD_DEBUG_OBJECTS= nodebug.o
+-PROD_SHRLIB_DIR= -Lsource/jrd
++PROD_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ PROD_VERSION_FLAG= -DPROD_BUILD
+-PROD_CFLAGS= -O -m486 -fpic -DFLINTSTONE
++PROD_CFLAGS= -O -pipe -march=i486 -fpic -DFLINTSTONE
+
+
+ DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o
+-DEV_SHRLIB_DIR= -Lsource/jrd
++DEV_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ DEV_VERSION_FLAG= -DDEV_BUILD
+ DEV_CFLAGS= -ggdb
+
+ DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS)
+ SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR)
+ VERSION_FLAG= $($(VERSION)_VERSION_FLAG)
+-CFLAGS_COMMON= $($(VERSION)_CFLAGS) -Isource/interbase/include -DFREEBSD -w -fwritable-strings
++CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DFREEBSD -w -fwritable-strings -Isource/interbase/include
+ CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG)
+ PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC
+ SPECIAL_OBJECTS= j
+@@ -62,21 +62,21 @@
+ BIN_PATH= interbase/bin
+ BRIDGE_MISC= head5.o allp.o
+ CHMOD_VAL= 666
+-CURSES_LIB= -lncurses
++CURSES_LIB=
+ DSQL_P_OBJS= dsql_p_objects
+-FORM_OBJECTS= form.o
+-FORM_TRN_OBJECTS= form_trn.o
++FORM_OBJECTS= noform.o
++FORM_TRN_OBJECTS=
+ FUNCTIONS= functions.bin
+ FUNCSHR= source/interbase/lib/gdsf.so
+ GDS_LINK= $(GDSSHR_LINK)
+-GDS_PYXIS= gds_pyxis.a
++GDS_PYXIS=
+ GDSLIB_BACKEND= source/interbase/lib/gds_b.a
+ GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -ldescrypt
+
+ GDSSHR= source/interbase/lib/gds.so
+ LINUX_GDSSHR= $(GDSSHR)
+-GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -ldescrypt
+-PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis
++GDSSHR_LINK= $(SHRLIB_DIR) -lgds -ldescrypt
++PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds
+ HLPDIR= source/qli/
+ HOSTNAME= `hostname | cut -d'.' -f1`
+ INCLUDES= include_so include_so_ada
+@@ -92,7 +92,7 @@
+ JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j
+ JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin
+ LANG_OBJECTS= ada.o ftn.o cob.o
+-LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn
++LANGUAGES= cc cxx ada microfocus_cob make16 gdl1 sun_ftn
+ LD_LIBS= -lc
+ LD_LIBS_J= -lc
+ LD_OPTS= -shared
+@@ -104,28 +104,28 @@
+ MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm
+ PIC_FLAGS= $(CFLAGS) -fPIC
+ PIPE= gds.a gds_pipe
+-PYXIS= pyxis
+-PYXIS_MISC_OBJS= $(PYXIS_MISC)
+-PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC)
+-PYXIS_OBJECTS= pyxis_objects
+-PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o
++PYXIS=
++PYXIS_MISC_OBJS=
++PYXIS_P_MISC_OBJS=
++PYXIS_OBJECTS=
++PYXIS_MISC_OBJECTS=
+ REG_HELP= isc_ins_hlp.dat
+ REMOTE_GDSSHR= $(GDSSHR)
+ REMOTE_GDSSHR_LINK= $(SERVER_LINK)
+ REMOTE_P_OBJS= rem_p_objects
+-SCREEN_LIBS=
+-#SCREEN_LIBS= -lncurses
++#SCREEN_LIBS=
++SCREEN_LIBS= -lncurses
+ SERVER_LINK= $(GDSSHR_LINK)
+ SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD;
+ SPECIAL_OPT= source/special_opt
+ NETWORK_LIB=
+ SOCKET_LIB= -lc
+-THREAD_LIB= -llthread
++THREAD_LIB= -pthread
+ SUN_FUNCSHR= $(FUNCSHR)
+ LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1
+ SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR)
+ SUPER_BACKEND= source/jrd/gds_ss.a
+-SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldescrypt -L/usr/local/lib -llthread
++SUPER_LINK= -pthread -Lsource/jrd -lgds_ss -ldescrypt
+ SUPER_SERVER=
+ UTILITIES=
+ WAL_P_OBJS= wal_p_objects
diff --git a/databases/firebird/files/patch-jrd::gds.c b/databases/firebird/files/patch-jrd::gds.c
new file mode 100644
index 000000000000..523abb725403
--- /dev/null
+++ b/databases/firebird/files/patch-jrd::gds.c
@@ -0,0 +1,24 @@
+--- jrd/gds.c.orig Sat Mar 2 00:15:11 2002
++++ jrd/gds.c Sun Jul 7 14:27:44 2002
+@@ -159,7 +159,7 @@
+ engine and this change may imply side effect I haven't known
+ about yet. Tomas Nejedlik (tomas@nejedlik.cz)
+ */
+-#if (defined(LINUX) && defined(SUPERCLIENT))
++#if ((defined(LINUX) || defined(FREEBSD)) && defined(SUPERCLIENT))
+ #define V4_THREADING
+ #endif
+
+@@ -3510,9 +3510,9 @@
+ #else
+ (MAP_ANON |
+ #endif
+-#if (!defined LINUX && !defined DARWIN)
+-/* In LINUX, Solaris, and Darwin there is no such thing as MAP_VARIABLE. Hence, it gives
+- compilation error. The equivalent functionality is default,
++#if (!defined LINUX && !defined DARWIN && !defined FREEBSD)
++/* In LINUX, Solaris, FreeBSD and Darwin there is no such thing as MAP_VARIABLE.
++ Hence, it gives compilation error. The equivalent functionality is default,
+ if you do not specify MAP_FIXED */
+ MAP_VARIABLE |
+ #endif /* LINUX */
diff --git a/databases/firebird/files/patch-jrd::isc_file.c b/databases/firebird/files/patch-jrd::isc_file.c
new file mode 100644
index 000000000000..7047f182d59c
--- /dev/null
+++ b/databases/firebird/files/patch-jrd::isc_file.c
@@ -0,0 +1,15 @@
+--- jrd/isc_file.c.orig Tue Dec 18 01:40:18 2001
++++ jrd/isc_file.c Sat Jul 6 18:04:55 2002
+@@ -106,6 +106,12 @@
+ #define MTAB_CLOSE(stream) ib_fclose (stream)
+ #endif
+
++#ifdef FREEBSD
++#define MTAB "/etc/fstab"
++#define MTAB_OPEN(path,type) ib_fopen (path, type)
++#define MTAB_CLOSE(stream) ib_fclose (stream)
++#endif
++
+ #ifdef DARWIN
+ #define MTAB "/etc/fstab.hd"
+ #define MTAB_OPEN(path,type) ib_fopen (path, type)
diff --git a/databases/firebird/files/patch-jrd::isc_sync.c b/databases/firebird/files/patch-jrd::isc_sync.c
new file mode 100644
index 000000000000..19e327a1705f
--- /dev/null
+++ b/databases/firebird/files/patch-jrd::isc_sync.c
@@ -0,0 +1,38 @@
+--- jrd/isc_sync.c.orig Tue Mar 5 21:11:25 2002
++++ jrd/isc_sync.c Sat Jul 6 18:06:30 2002
+@@ -1467,7 +1467,7 @@
+ pthread_mutex_init (event->event_mutex, pthread_mutexattr_default);
+ pthread_cond_init (event->event_semnum, pthread_condattr_default);
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ pthread_mutex_init (event->event_mutex, NULL);
+ pthread_cond_init (event->event_semnum, NULL);
+ #else
+@@ -1596,7 +1596,7 @@
+ #ifdef HP10
+ if (micro_seconds > 0 && (ret == -1) && (errno == EAGAIN))
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ if (micro_seconds > 0 && (ret == ETIMEDOUT))
+ #else
+ if (micro_seconds > 0 && (ret == ETIME))
+@@ -5198,7 +5198,7 @@
+ **************************************/
+ int state;
+
+-#if (!defined HP10 && !defined linux && !defined DARWIN)
++#if (!defined HP10 && !defined linux && !defined DARWIN && !defined FREEBSD)
+
+ pthread_mutexattr_t mattr;
+
+@@ -5218,7 +5218,7 @@
+ server (until we are to implement local IPC using shared
+ memory in which case we need interprocess thread sync.
+ */
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ return pthread_mutex_init (mutex->mtx_mutex, NULL);
+ #else
+ state = pthread_mutex_init (mutex->mtx_mutex, pthread_mutexattr_default);
diff --git a/databases/firebird/files/patch-jrd::jrd.h b/databases/firebird/files/patch-jrd::jrd.h
new file mode 100644
index 000000000000..0a280080c74a
--- /dev/null
+++ b/databases/firebird/files/patch-jrd::jrd.h
@@ -0,0 +1,12 @@
+--- jrd/jrd.h.orig Tue May 14 19:01:06 2002
++++ jrd/jrd.h Tue May 14 19:23:44 2002
+@@ -717,7 +717,8 @@
+ #ifdef MULTI_THREAD
+ #if (defined APOLLO || defined DECOSF || defined NETWARE_386 || \
+ defined NeXT || defined SOLARIS_MT || defined WIN_NT || \
+- defined OS2_ONLY || defined HP10 || defined LINUX || defined DARWIN)
++ defined OS2_ONLY || defined HP10 || defined LINUX || \
++ defined DARWIN || defined FREEBSD)
+ #define PLATFORM_GET_THREAD_DATA ((TDBB) THD_get_specific())
+ #endif
+ #endif
diff --git a/databases/firebird/files/patch-jrd::thd.c b/databases/firebird/files/patch-jrd::thd.c
new file mode 100644
index 000000000000..a09c3fe4e1c3
--- /dev/null
+++ b/databases/firebird/files/patch-jrd::thd.c
@@ -0,0 +1,20 @@
+--- jrd/thd.c.orig Thu May 24 14:11:11 2001
++++ jrd/thd.c Sun Jul 7 14:52:07 2002
+@@ -2605,7 +2605,7 @@
+ int detach_state=PTHREAD_CREATE_DETACHED
+ #endif
+
+-#if ( !defined HP10 && !defined linux )
++#if ( !defined HP10 && !defined linux && !defined FREEBSD )
+
+ state = pthread_attr_init (&pattr);
+ if (state)
+@@ -2628,7 +2628,7 @@
+ return state;
+
+ #else
+-#ifdef linux
++#if ( defined linux || defined FREEBSD )
+ if (state = pthread_create (&thread, NULL, routine, arg))
+ return state;
+ return pthread_detach (thread);
diff --git a/databases/firebird/files/patch-jrd::thd.h b/databases/firebird/files/patch-jrd::thd.h
new file mode 100644
index 000000000000..b4e74ecfbe59
--- /dev/null
+++ b/databases/firebird/files/patch-jrd::thd.h
@@ -0,0 +1,14 @@
+--- jrd/thd.h.orig Sat Mar 2 00:16:31 2002
++++ jrd/thd.h Mon May 13 19:10:37 2002
+@@ -98,6 +98,11 @@
+ #define MULTI_THREAD 1
+ #endif
+
++#if (defined(FREEBSD) && defined(SUPERSERVER))
++#define POSIX_THREADS 1
++#define MULTI_THREAD 1
++#endif
++
+ #ifdef VMS
+ #ifndef GATEWAY
+ #define MULTI_THREAD 1
diff --git a/databases/firebird/files/patch-lock::lock.h b/databases/firebird/files/patch-lock::lock.h
new file mode 100644
index 000000000000..fe7ad684d99e
--- /dev/null
+++ b/databases/firebird/files/patch-lock::lock.h
@@ -0,0 +1,13 @@
+--- lock/lock.h.orig Wed Jun 6 05:43:58 2001
++++ lock/lock.h Sat Jul 6 18:08:56 2002
+@@ -65,8 +65,10 @@
+ #ifndef SOLARIS_MT
+ #if !(defined(HP10) && defined(SUPERSERVER))
+ #if !(defined(LINUX) && defined(SUPERSERVER))
++#if !(defined(FREEBSD) && defined(SUPERSERVER))
+ #ifndef DARWIN
+ #define MANAGER_PROCESS
++#endif
+ #endif
+ #endif
+ #endif
diff --git a/databases/firebird/pkg-install b/databases/firebird/pkg-install
index af43f63a3943..6fd18e94bd21 100644
--- a/databases/firebird/pkg-install
+++ b/databases/firebird/pkg-install
@@ -1,9 +1,8 @@
#!/bin/sh
-# Created in haste by smashing together various
-# files from the port scripts.
+case $2 in
+PRE-INSTALL)
-if [ "$2" = "PRE-INSTALL" ]; then
if [ -d $PKG_PREFIX/firebird ]; then
if [ -d $PKG_PREFIX/firebird.old ]; then
rm -rf $PKG_PREFIX/firebird.old
@@ -21,60 +20,51 @@ fi
ln -fs $PKG_PREFIX/firebird /usr/interbase
-perl <<EOF
-eval '(exit \$?0)' && eval 'exec /usr/bin/perl -S \$0 \${1+"\$@"}'
-& eval 'exec /usr/bin/perl -S \$0 \$argv:q'
-if 0;
-
-if( \$> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" );
-} else {
- \$fbUID = 90;
- while( getpwuid( \$fbUID ) ) {
- \$fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" );
-} else {
- \$fbGID = 90;
- while( getgrgid( \$fbGID ) ) {
- \$fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:\$fbGID:" );
-}
-
-print "firebird user using uid \$fbUID\n";
-print "firebird user using gid \$fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local(\$file,@list) = @_;
- local(\$LOCK_EX) = 2;
- local(\$LOCK_NB) = 4;
- local(\$LOCK_UN) = 8;
-
- open(F, ">> \$file") || die "\$file: \$!\n";
- while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, \$LOCK_UN );
-}
-EOF
-elif [ "$2" = "POST-INSTALL" ]; then
-chown -R firebird:firebird $PKG_PREFIX/firebird
+if [ `id -u` -ne 0 ]; then
+ echo; echo "You must be root to run this step!"; echo; echo
+ exit 1
+fi
+
+nofbuid=0
+fbUID=`id -u firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbUID=90
+ while [ ! -z `id -un $fbUID 2>/dev/null` ]
+ do
+ fbUID=$(($fbUID+1))
+ done
+ nofbuid=1
+fi
+
+fbGID=`pw groupshow firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbGID=90
+ while [ ! -z `id -gn $fbGID 2>/dev/null` ]
+ do
+ fbGID=$(($fbGID+1))
+ done
+ echo "firebird:*:$fbGID" >> /etc/group
+else
+ fbGID=`echo $fbGID | awk -F: '{print $3}'`
+fi
+
+echo "firebird user using uid $fbUID"
+echo "firebird user using gid $fbGID"
-# Turn everybody to read only.
-chmod -R o=r $PKG_PREFIX/firebird
+if which -s pw; then
+ if [ $nofbuid -ne 0 ]; then
+ pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \
+ -d $PKG_PREFIX/firebird -c "Firebird pseudo-user"
+ fi
+else
+ echo -n "unable to create user firebird - please create it manually,"
+ echo " before reinstalling this package."
+ exit 1
+fi
+;;
+
+POST-INSTALL)
+chown -R firebird:firebird $PKG_PREFIX/firebird
# Now fix up the mess.
@@ -84,22 +74,28 @@ for i in `find $PKG_PREFIX/firebird -print`
FileName=$i
if [ -d $FileName ]
then
- chmod o=rx $FileName
+ chmod u=rwx,go=rx $FileName
fi
done
# make lib ldconfig-compatible
chown -R root:wheel $PKG_PREFIX/firebird/lib
-chmod -R g-w $PKG_PREFIX/firebird/lib
+
+# make the following read-only
+chmod -R a=r $PKG_PREFIX/firebird/UDF/*
+chmod -R a=r $PKG_PREFIX/firebird/include/*
+chmod -R a=r $PKG_PREFIX/firebird/intl/*
+chmod -R a=r $PKG_PREFIX/firebird/lib/*
# Fix UDF load problem
cd $PKG_PREFIX/firebird/lib
ln -sf ib_util.so libib_util.so
+ln -sf gds.so libgds.so.1
cd $PKG_PREFIX/firebird/bin
# all users can run everything.
-chmod o=rx *
+chmod a=rx *
# SUID is needed for running server programs.
@@ -121,14 +117,15 @@ for i in isc_init1 isc_lock1 isc_event1
chown firebird:firebird $FileName
done
-
touch interbase.log
-chmod ugo=rw interbase.log
+chmod u=rw,go= interbase.log
+chmod a=r interbase.msg
-# make databases writable by all
-chmod ugo=rw examples/v5/*.gdb
-chmod ugo=rw help/*.gdb
-chmod ugo=rw isc4.gdb
+# make databases writable by interbase only
+# local database connections are not a good idea
+chmod u=rw,go= examples/v5/*.gdb
+chmod u=rw,go= help/*.gdb
+chmod u=rw,go= isc4.gdb
# remove any existing gds service
cp /etc/services /etc/services.old
@@ -154,6 +151,7 @@ if [ -d $PKG_PREFIX/etc/rc.d ]; then
(
echo "#!/bin/sh"; echo "[ -d $PKG_PREFIX/firebird/lib ] && /sbin/ldconfig -m $PKG_PREFIX/firebird/lib"
) > $PKG_PREFIX/etc/rc.d/000.firebird.sh
+ chmod a=rx $PKG_PREFIX/etc/rc.d/000.firebird.sh
fi
-
-fi
+;;
+esac
diff --git a/databases/firebird/pkg-plist b/databases/firebird/pkg-plist
index 10f152fcbc82..4108b6237053 100644
--- a/databases/firebird/pkg-plist
+++ b/databases/firebird/pkg-plist
@@ -70,6 +70,10 @@ firebird/lib/libib_util.so
firebird/lib/gds_pyxis.a
firebird/help/help.gbak
firebird/help/help.gdb
+firebird/bin/ibguard
+firebird/bin/ibmgr
+firebird/bin/ibmgr.bin
+firebird/bin/ibserver
firebird/bin/isc4.gbak
firebird/bin/gpre
firebird/bin/gds_pipe
@@ -86,12 +90,15 @@ firebird/bin/gstat
firebird/bin/gds_relay
firebird/bin/gsec
firebird/bin/gbak
+firebird/misc/firebird.init.d.generic
+firebird/misc/firebird.init.d.mandrake
firebird/services.isc
firebird/isc_config
firebird/isc4.gdb
firebird/interbase.msg
firebird/interbase.log
firebird/inetd.conf.isc
+firebird/README
firebird/RELNOTES
@dirrm firebird
@dirrm firebird/intl
@@ -104,3 +111,4 @@ firebird/RELNOTES
@dirrm firebird/lib
@dirrm firebird/help
@dirrm firebird/bin
+@dirrm firebird/misc
diff --git a/databases/firebird/scripts/addservice b/databases/firebird/scripts/addservice
deleted file mode 100644
index df9aea5e91de..000000000000
--- a/databases/firebird/scripts/addservice
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-cat >>/etc/services <<EOF
-gds_db 3050/tcp #InterBase Database Remote Protocol
-EOF
-cat >>/etc/inetd.conf <<EOF
-gds_db stream tcp nowait firebird /usr/interbase/bin/gds_inet_server gds_inet_server
-EOF
-kill -HUP `cat /var/run/inetd.pid`
diff --git a/databases/firebird/scripts/createuser b/databases/firebird/scripts/createuser
deleted file mode 100644
index eba7ce1b887d..000000000000
--- a/databases/firebird/scripts/createuser
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-#
-
-eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
-& eval 'exec /usr/bin/perl -S $0 $argv:q'
-if 0;
-
-if( $> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( $null, $null, $fbUID ) = getpwnam( "firebird" );
-} else {
- $fbUID = 90;
- while( getpwuid( $fbUID ) ) {
- $fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( $null, $null, $fbGID ) = getgrnam( "firebird" );
-} else {
- $fbGID = 90;
- while( getgrgid( $fbGID ) ) {
- $fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:$fbGID:" );
-}
-
-print "firebird user using uid $fbUID\n";
-print "firebird user using gid $fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:$fbUID:$fbGID\:\:0:0:Firebird pseudo-user:$ENV{'PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local($file,@list) = @_;
- local($LOCK_EX) = 2;
- local($LOCK_NB) = 4;
- local($LOCK_UN) = 8;
-
- open(F, ">> $file") || die "$file: $!\n";
- while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, $LOCK_UN );
-}
diff --git a/databases/firebird/scripts/pre-build b/databases/firebird/scripts/pre-build
deleted file mode 100644
index 6605df7770fd..000000000000
--- a/databases/firebird/scripts/pre-build
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-GDS_LOCK_MGR=`ps ax |grep gds_lock_mgr |grep -v grep`;
-
-if [ "$GDS_LOCK_MGR" != "" ]; then
- echo "It appears you have a gds_lock_manager already running.";
- echo;
- echo "You must cease all InterBase operations to build this port.";
- echo "Make sure nobody is connected to any databases, then use";
- echo "'gds_drop -a' and manually verify (with ipcs) that the";
- echo "semaphores were removed.";
- exit 1;
-fi
-exit 0
-
diff --git a/databases/firebird/scripts/pre-install b/databases/firebird/scripts/pre-install
deleted file mode 100644
index a6e1b37a9008..000000000000
--- a/databases/firebird/scripts/pre-install
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if [ -d $PREFIX/firebird ]; then
- if [ -d $PREFIX/firebird.old ]; then
- rm -rf $PREFIX/firebird.old
- fi
- mv $PREFIX/firebird $PREFIX/firebird.old
-fi
-
-if [ -L /usr/interbase ]; then
- rm -f /usr/interbase
-fi
-
-if [ -d /usr/interbase ]; then
- mv /usr/interbase /usr/interbase.old
-fi
-
-ln -fs $PREFIX/firebird /usr/interbase
-
-perl $SCRIPTDIR/createuser
diff --git a/databases/firebird/scripts/rmservice b/databases/firebird/scripts/rmservice
deleted file mode 100644
index 58adfc17419d..000000000000
--- a/databases/firebird/scripts/rmservice
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cp /etc/services /etc/services.old
-cp /etc/inetd.conf /etc/inetd.conf.old
-cat /etc/services |grep -v gds_db >/etc/services.new
-cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new
-mv /etc/services.new /etc/services
-mv /etc/inetd.conf.new /etc/inetd.conf
diff --git a/databases/firebird2-server/Makefile b/databases/firebird2-server/Makefile
index 1606fc389e38..bc151970f413 100644
--- a/databases/firebird2-server/Makefile
+++ b/databases/firebird2-server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= firebird
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://firebird.sourceforge.net/download/ \
http://www.aims.com.au/chris/ \
@@ -25,7 +26,6 @@ LDCONFIG_DIRS= %%PREFIX%%/firebird/lib
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
USE_REINPLACE= yes
-USE_PERL5= yes
ONLY_FOR_ARCHS= i386
@@ -55,7 +55,7 @@ do-configure:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
${SH} buildBootDatabases; \
NOPROMPT_SETUP=yes; export NOPROMPT_SETUP; \
FIREBIRD_64_BIT_IO=yes; export FIREBIRD_64_BIT_IO; \
@@ -68,24 +68,27 @@ do-configure:
do-build:
@( \
- ${ECHO_CMD} '#!/bin/sh'; ${ECHO_CMD} \
- '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \
- ) > ${WRKDIR}/000.${PORTNAME}.sh
- @( \
- ${LN} -sf ${WRKDIR}/refDatabases/jrd/isc.gdb \
+ ${REINPLACE_CMD} -e 's,opt,usr,' \
+ ${WRKSRC}/firebird/install/linux/misc/ibmgr; \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/jrd/isc.gdb \
${WRKDIR}/firebird-1.0.0.796/interbase/isc4.gdb; \
- ${LN} -sf ${WRKDIR}/refDatabases/msgs/msg.gdb \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/msgs/msg.gdb \
${WRKDIR}/firebird-1.0.0.796/msg.gdb; \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
- ${SH} boot.freebsd; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
+ ${CP} ${PKGDIR}/files/buildit.sh ${WRKDIR}/firebird-1.0.0.796; \
+ ${SH} buildit.sh; \
)
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
do-install:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
- ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb || ${TRUE}; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/lib/gds.so.1 || ${TRUE}; \
${CP} /dev/null interbase/interbase.log; \
${CP} -Rp interbase ${PREFIX}/firebird; \
${RM} ${PREFIX}/firebird/install; \
@@ -94,7 +97,11 @@ do-install:
cd ${PREFIX}/firebird/examples; \
${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \
${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \
- ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \
+ ${CP} ${WRKSRC}/firebird/install/linux/misc/ibmgr \
+ ${PREFIX}/firebird/bin; \
)
+post-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.post.mk>
diff --git a/databases/firebird2-server/files/RELNOTES b/databases/firebird2-server/files/RELNOTES
index 5434347e24d2..a452990122ee 100644
--- a/databases/firebird2-server/files/RELNOTES
+++ b/databases/firebird2-server/files/RELNOTES
@@ -1,4 +1,4 @@
-Firebird 1.0.0 FreeBSD Release Notes 13-Mar-2002
+Firebird 1.0.0 FreeBSD Release Notes 10-Nov-2002
--------------------------------------
FB-T6.2.796 Firebird Final Release
@@ -64,6 +64,13 @@ try stopping PostgreSQL:
and see if that helps.
+ Super Server support has recently been added. However, there is
+anecdotal evidence that it is not as reliable nor as scalable as the
+Classic Server version. For this reason, I have not included a
+start up method for Super Server. For those that are interested,
+traversing to /usr/interbase/misc will find the startup scripts for
+the various flavours of Linux.
+
Complete documentation for InterBase(tm) is available (free of
charge) from http://www.interbase.com/ in PDF format. While
InterBase and Firebird are two distinct entities, all InterBase
diff --git a/databases/firebird2-server/files/buildit.sh b/databases/firebird2-server/files/buildit.sh
new file mode 100644
index 000000000000..d48627c0e21e
--- /dev/null
+++ b/databases/firebird2-server/files/buildit.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+. Configure_SetupEnv.sh
+make super_firebird
diff --git a/databases/firebird2-server/files/patch-builds::original::boot.sfx.interbase b/databases/firebird2-server/files/patch-builds::original::boot.sfx.interbase
new file mode 100644
index 000000000000..62d0b483a07d
--- /dev/null
+++ b/databases/firebird2-server/files/patch-builds::original::boot.sfx.interbase
@@ -0,0 +1,38 @@
+--- builds/original/boot.sfx.interbase.orig Tue Dec 18 01:40:08 2001
++++ builds/original/boot.sfx.interbase Sat Nov 9 17:44:54 2002
+@@ -68,7 +68,7 @@
+ #added completed according to inprise tree
+ #FSG 093000
+
+-firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib examples completed
++firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib completed
+
+ # burp wanted to build gpre
+ # we break this dependency
+@@ -159,14 +159,14 @@
+ # 1995-June-7 David Schnepper
+ # removed pyxis 3-Aug-00 TMC
+ #executables: alice burp dudley gpre miscFiles $(INTL) isql locks \
+- $(SUPER_SERVER) qli remote spit utilities \
+- $(SHARED_AM) $(LINKABLE_LIBS)
++# $(SUPER_SERVER) qli remote spit utilities \
++# $(SHARED_AM) $(LINKABLE_LIBS)
+
+ executables: alice dudley miscFiles $(INTL) isql locks \
+ $(SUPER_SERVER) qli remote spit utilities \
+ $(SHARED_AM) $(LINKABLE_LIBS)
+
+-super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix gsec security_db extlib examples completed
++super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix relay gsec security_db extlib completed
+
+ super_targets: s_run_codes s_alice s_burp s_dba s_security_c super_client super_server super_utils
+
+@@ -195,7 +195,7 @@
+
+ super_client: force
+ $(QUIET_ECHO) "Building super/client..."
+- $(SH) '$(CD) source/super/client; $(MAKE) CFLAGS="$(CFLAGS) -DSUPERCLIENT" SYSTEM="$(SYSTEM)" super_client'
++ $(SH) '$(CD) source/super/client; $(MAKE) SYSTEM="$(SYSTEM)" super_client'
+
+ csu gcsu: $(ACCESS_METHOD) force
+ $(QUIET_ECHO) "Building GCSU..."
diff --git a/databases/firebird2-server/files/patch-builds::original::edit_make b/databases/firebird2-server/files/patch-builds::original::edit_make
new file mode 100644
index 000000000000..d107078c7a59
--- /dev/null
+++ b/databases/firebird2-server/files/patch-builds::original::edit_make
@@ -0,0 +1,32 @@
+--- builds/original/edit_make.orig Fri Aug 4 06:42:41 2000
++++ builds/original/edit_make Sat Nov 9 16:06:59 2002
+@@ -16,13 +16,25 @@
+ # Contributor(s): ______________________________________.
+ if [ "$SYS_TYPE" != "NOLINK_OS" -a "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then
+ if [ "$3" = "make.client" ]; then
+- sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
+- -e "s/\$(SYSTEM)/$1/g" \
+- -e "s/\$(VERSION)/$2/g" \
+- -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ if [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT -D_REENTRANT -D_THREAD_SAFE/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ else
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ fi
+ elif [ "$3" = "make.dsql_ss" -o "$3" = "make.intl_ss" -o "$3" = "make.journal_ss" -o "$3" = "make.jrd_ss" -o "$3" = "make.lock_ss" -o "$3" = "make.remote_ss" -o "$3" = "make.wal_ss" -o "$3" = "make.burp_ss" -o "$3" = "make.alice_ss" -o "$3" = "make.utilities_ss" ]; then
+ if [ "$1" = "HP10" -o "$1" = "LINUX" ]; then
+ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ elif [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT -D_THREAD_SAFE/g" \
+ -e "s/\$(SYSTEM)/$1/g" \
+ -e "s/\$(VERSION)/$2/g" \
+ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
diff --git a/databases/firebird2-server/files/patch-builds::original::platform b/databases/firebird2-server/files/patch-builds::original::platform
new file mode 100644
index 000000000000..149f2fe3a4f6
--- /dev/null
+++ b/databases/firebird2-server/files/patch-builds::original::platform
@@ -0,0 +1,13 @@
+--- builds/original/platform.orig Sun Sep 16 22:15:14 2001
++++ builds/original/platform Sat Nov 9 16:16:23 2002
+@@ -32,6 +32,10 @@
+ SYS_TYPE=GENERIC
+ fi
+ export SYS_TYPE
++if [ $1 = 'FREEBSD' ]; then
++ FBBUILDHACK=$1
++ export FBBUILDHACK
++fi
+ #
+ if [ $1 = 'SUN3_4' -o $1 = 'SUN4' -o $1 = 'AP' -o $1 = 'AX' ]; then
+ TR='tr "A-Z" "a-z"'
diff --git a/databases/firebird2-server/files/patch-builds::original::prefix.freebsd b/databases/firebird2-server/files/patch-builds::original::prefix.freebsd
new file mode 100644
index 000000000000..ec8d8343f61d
--- /dev/null
+++ b/databases/firebird2-server/files/patch-builds::original::prefix.freebsd
@@ -0,0 +1,102 @@
+--- builds/original/prefix.freebsd.orig Sat Jan 13 05:18:13 2001
++++ builds/original/prefix.freebsd Sat Nov 9 16:49:17 2002
+@@ -28,20 +28,20 @@
+
+
+ PROD_DEBUG_OBJECTS= nodebug.o
+-PROD_SHRLIB_DIR= -Lsource/jrd
++PROD_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ PROD_VERSION_FLAG= -DPROD_BUILD
+-PROD_CFLAGS= -O -m486 -fpic -DFLINTSTONE
++PROD_CFLAGS= -O -pipe -march=i486 -fpic -DFLINTSTONE
+
+
+ DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o
+-DEV_SHRLIB_DIR= -Lsource/jrd
++DEV_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ DEV_VERSION_FLAG= -DDEV_BUILD
+ DEV_CFLAGS= -ggdb
+
+ DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS)
+ SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR)
+ VERSION_FLAG= $($(VERSION)_VERSION_FLAG)
+-CFLAGS_COMMON= $($(VERSION)_CFLAGS) -Isource/interbase/include -DFREEBSD -w -fwritable-strings
++CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DFREEBSD -w -fwritable-strings -Isource/interbase/include
+ CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG)
+ PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC
+ SPECIAL_OBJECTS= j
+@@ -62,21 +62,21 @@
+ BIN_PATH= interbase/bin
+ BRIDGE_MISC= head5.o allp.o
+ CHMOD_VAL= 666
+-CURSES_LIB= -lncurses
++CURSES_LIB=
+ DSQL_P_OBJS= dsql_p_objects
+-FORM_OBJECTS= form.o
+-FORM_TRN_OBJECTS= form_trn.o
++FORM_OBJECTS= noform.o
++FORM_TRN_OBJECTS=
+ FUNCTIONS= functions.bin
+ FUNCSHR= source/interbase/lib/gdsf.so
+ GDS_LINK= $(GDSSHR_LINK)
+-GDS_PYXIS= gds_pyxis.a
++GDS_PYXIS=
+ GDSLIB_BACKEND= source/interbase/lib/gds_b.a
+ GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -ldescrypt
+
+ GDSSHR= source/interbase/lib/gds.so
+ LINUX_GDSSHR= $(GDSSHR)
+-GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -ldescrypt
+-PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis
++GDSSHR_LINK= $(SHRLIB_DIR) -lgds -ldescrypt
++PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds
+ HLPDIR= source/qli/
+ HOSTNAME= `hostname | cut -d'.' -f1`
+ INCLUDES= include_so include_so_ada
+@@ -92,7 +92,7 @@
+ JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j
+ JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin
+ LANG_OBJECTS= ada.o ftn.o cob.o
+-LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn
++LANGUAGES= cc cxx ada microfocus_cob make16 gdl1 sun_ftn
+ LD_LIBS= -lc
+ LD_LIBS_J= -lc
+ LD_OPTS= -shared
+@@ -104,28 +104,28 @@
+ MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm
+ PIC_FLAGS= $(CFLAGS) -fPIC
+ PIPE= gds.a gds_pipe
+-PYXIS= pyxis
+-PYXIS_MISC_OBJS= $(PYXIS_MISC)
+-PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC)
+-PYXIS_OBJECTS= pyxis_objects
+-PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o
++PYXIS=
++PYXIS_MISC_OBJS=
++PYXIS_P_MISC_OBJS=
++PYXIS_OBJECTS=
++PYXIS_MISC_OBJECTS=
+ REG_HELP= isc_ins_hlp.dat
+ REMOTE_GDSSHR= $(GDSSHR)
+ REMOTE_GDSSHR_LINK= $(SERVER_LINK)
+ REMOTE_P_OBJS= rem_p_objects
+-SCREEN_LIBS=
+-#SCREEN_LIBS= -lncurses
++#SCREEN_LIBS=
++SCREEN_LIBS= -lncurses
+ SERVER_LINK= $(GDSSHR_LINK)
+ SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD;
+ SPECIAL_OPT= source/special_opt
+ NETWORK_LIB=
+ SOCKET_LIB= -lc
+-THREAD_LIB= -llthread
++THREAD_LIB= -pthread
+ SUN_FUNCSHR= $(FUNCSHR)
+ LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1
+ SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR)
+ SUPER_BACKEND= source/jrd/gds_ss.a
+-SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldescrypt -L/usr/local/lib -llthread
++SUPER_LINK= -pthread -Lsource/jrd -lgds_ss -ldescrypt
+ SUPER_SERVER=
+ UTILITIES=
+ WAL_P_OBJS= wal_p_objects
diff --git a/databases/firebird2-server/files/patch-jrd::gds.c b/databases/firebird2-server/files/patch-jrd::gds.c
new file mode 100644
index 000000000000..523abb725403
--- /dev/null
+++ b/databases/firebird2-server/files/patch-jrd::gds.c
@@ -0,0 +1,24 @@
+--- jrd/gds.c.orig Sat Mar 2 00:15:11 2002
++++ jrd/gds.c Sun Jul 7 14:27:44 2002
+@@ -159,7 +159,7 @@
+ engine and this change may imply side effect I haven't known
+ about yet. Tomas Nejedlik (tomas@nejedlik.cz)
+ */
+-#if (defined(LINUX) && defined(SUPERCLIENT))
++#if ((defined(LINUX) || defined(FREEBSD)) && defined(SUPERCLIENT))
+ #define V4_THREADING
+ #endif
+
+@@ -3510,9 +3510,9 @@
+ #else
+ (MAP_ANON |
+ #endif
+-#if (!defined LINUX && !defined DARWIN)
+-/* In LINUX, Solaris, and Darwin there is no such thing as MAP_VARIABLE. Hence, it gives
+- compilation error. The equivalent functionality is default,
++#if (!defined LINUX && !defined DARWIN && !defined FREEBSD)
++/* In LINUX, Solaris, FreeBSD and Darwin there is no such thing as MAP_VARIABLE.
++ Hence, it gives compilation error. The equivalent functionality is default,
+ if you do not specify MAP_FIXED */
+ MAP_VARIABLE |
+ #endif /* LINUX */
diff --git a/databases/firebird2-server/files/patch-jrd::isc_file.c b/databases/firebird2-server/files/patch-jrd::isc_file.c
new file mode 100644
index 000000000000..7047f182d59c
--- /dev/null
+++ b/databases/firebird2-server/files/patch-jrd::isc_file.c
@@ -0,0 +1,15 @@
+--- jrd/isc_file.c.orig Tue Dec 18 01:40:18 2001
++++ jrd/isc_file.c Sat Jul 6 18:04:55 2002
+@@ -106,6 +106,12 @@
+ #define MTAB_CLOSE(stream) ib_fclose (stream)
+ #endif
+
++#ifdef FREEBSD
++#define MTAB "/etc/fstab"
++#define MTAB_OPEN(path,type) ib_fopen (path, type)
++#define MTAB_CLOSE(stream) ib_fclose (stream)
++#endif
++
+ #ifdef DARWIN
+ #define MTAB "/etc/fstab.hd"
+ #define MTAB_OPEN(path,type) ib_fopen (path, type)
diff --git a/databases/firebird2-server/files/patch-jrd::isc_sync.c b/databases/firebird2-server/files/patch-jrd::isc_sync.c
new file mode 100644
index 000000000000..19e327a1705f
--- /dev/null
+++ b/databases/firebird2-server/files/patch-jrd::isc_sync.c
@@ -0,0 +1,38 @@
+--- jrd/isc_sync.c.orig Tue Mar 5 21:11:25 2002
++++ jrd/isc_sync.c Sat Jul 6 18:06:30 2002
+@@ -1467,7 +1467,7 @@
+ pthread_mutex_init (event->event_mutex, pthread_mutexattr_default);
+ pthread_cond_init (event->event_semnum, pthread_condattr_default);
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ pthread_mutex_init (event->event_mutex, NULL);
+ pthread_cond_init (event->event_semnum, NULL);
+ #else
+@@ -1596,7 +1596,7 @@
+ #ifdef HP10
+ if (micro_seconds > 0 && (ret == -1) && (errno == EAGAIN))
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ if (micro_seconds > 0 && (ret == ETIMEDOUT))
+ #else
+ if (micro_seconds > 0 && (ret == ETIME))
+@@ -5198,7 +5198,7 @@
+ **************************************/
+ int state;
+
+-#if (!defined HP10 && !defined linux && !defined DARWIN)
++#if (!defined HP10 && !defined linux && !defined DARWIN && !defined FREEBSD)
+
+ pthread_mutexattr_t mattr;
+
+@@ -5218,7 +5218,7 @@
+ server (until we are to implement local IPC using shared
+ memory in which case we need interprocess thread sync.
+ */
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ return pthread_mutex_init (mutex->mtx_mutex, NULL);
+ #else
+ state = pthread_mutex_init (mutex->mtx_mutex, pthread_mutexattr_default);
diff --git a/databases/firebird2-server/files/patch-jrd::jrd.h b/databases/firebird2-server/files/patch-jrd::jrd.h
new file mode 100644
index 000000000000..0a280080c74a
--- /dev/null
+++ b/databases/firebird2-server/files/patch-jrd::jrd.h
@@ -0,0 +1,12 @@
+--- jrd/jrd.h.orig Tue May 14 19:01:06 2002
++++ jrd/jrd.h Tue May 14 19:23:44 2002
+@@ -717,7 +717,8 @@
+ #ifdef MULTI_THREAD
+ #if (defined APOLLO || defined DECOSF || defined NETWARE_386 || \
+ defined NeXT || defined SOLARIS_MT || defined WIN_NT || \
+- defined OS2_ONLY || defined HP10 || defined LINUX || defined DARWIN)
++ defined OS2_ONLY || defined HP10 || defined LINUX || \
++ defined DARWIN || defined FREEBSD)
+ #define PLATFORM_GET_THREAD_DATA ((TDBB) THD_get_specific())
+ #endif
+ #endif
diff --git a/databases/firebird2-server/files/patch-jrd::thd.c b/databases/firebird2-server/files/patch-jrd::thd.c
new file mode 100644
index 000000000000..a09c3fe4e1c3
--- /dev/null
+++ b/databases/firebird2-server/files/patch-jrd::thd.c
@@ -0,0 +1,20 @@
+--- jrd/thd.c.orig Thu May 24 14:11:11 2001
++++ jrd/thd.c Sun Jul 7 14:52:07 2002
+@@ -2605,7 +2605,7 @@
+ int detach_state=PTHREAD_CREATE_DETACHED
+ #endif
+
+-#if ( !defined HP10 && !defined linux )
++#if ( !defined HP10 && !defined linux && !defined FREEBSD )
+
+ state = pthread_attr_init (&pattr);
+ if (state)
+@@ -2628,7 +2628,7 @@
+ return state;
+
+ #else
+-#ifdef linux
++#if ( defined linux || defined FREEBSD )
+ if (state = pthread_create (&thread, NULL, routine, arg))
+ return state;
+ return pthread_detach (thread);
diff --git a/databases/firebird2-server/files/patch-jrd::thd.h b/databases/firebird2-server/files/patch-jrd::thd.h
new file mode 100644
index 000000000000..b4e74ecfbe59
--- /dev/null
+++ b/databases/firebird2-server/files/patch-jrd::thd.h
@@ -0,0 +1,14 @@
+--- jrd/thd.h.orig Sat Mar 2 00:16:31 2002
++++ jrd/thd.h Mon May 13 19:10:37 2002
+@@ -98,6 +98,11 @@
+ #define MULTI_THREAD 1
+ #endif
+
++#if (defined(FREEBSD) && defined(SUPERSERVER))
++#define POSIX_THREADS 1
++#define MULTI_THREAD 1
++#endif
++
+ #ifdef VMS
+ #ifndef GATEWAY
+ #define MULTI_THREAD 1
diff --git a/databases/firebird2-server/files/patch-lock::lock.h b/databases/firebird2-server/files/patch-lock::lock.h
new file mode 100644
index 000000000000..fe7ad684d99e
--- /dev/null
+++ b/databases/firebird2-server/files/patch-lock::lock.h
@@ -0,0 +1,13 @@
+--- lock/lock.h.orig Wed Jun 6 05:43:58 2001
++++ lock/lock.h Sat Jul 6 18:08:56 2002
+@@ -65,8 +65,10 @@
+ #ifndef SOLARIS_MT
+ #if !(defined(HP10) && defined(SUPERSERVER))
+ #if !(defined(LINUX) && defined(SUPERSERVER))
++#if !(defined(FREEBSD) && defined(SUPERSERVER))
+ #ifndef DARWIN
+ #define MANAGER_PROCESS
++#endif
+ #endif
+ #endif
+ #endif
diff --git a/databases/firebird2-server/pkg-install b/databases/firebird2-server/pkg-install
index af43f63a3943..6fd18e94bd21 100644
--- a/databases/firebird2-server/pkg-install
+++ b/databases/firebird2-server/pkg-install
@@ -1,9 +1,8 @@
#!/bin/sh
-# Created in haste by smashing together various
-# files from the port scripts.
+case $2 in
+PRE-INSTALL)
-if [ "$2" = "PRE-INSTALL" ]; then
if [ -d $PKG_PREFIX/firebird ]; then
if [ -d $PKG_PREFIX/firebird.old ]; then
rm -rf $PKG_PREFIX/firebird.old
@@ -21,60 +20,51 @@ fi
ln -fs $PKG_PREFIX/firebird /usr/interbase
-perl <<EOF
-eval '(exit \$?0)' && eval 'exec /usr/bin/perl -S \$0 \${1+"\$@"}'
-& eval 'exec /usr/bin/perl -S \$0 \$argv:q'
-if 0;
-
-if( \$> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" );
-} else {
- \$fbUID = 90;
- while( getpwuid( \$fbUID ) ) {
- \$fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" );
-} else {
- \$fbGID = 90;
- while( getgrgid( \$fbGID ) ) {
- \$fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:\$fbGID:" );
-}
-
-print "firebird user using uid \$fbUID\n";
-print "firebird user using gid \$fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local(\$file,@list) = @_;
- local(\$LOCK_EX) = 2;
- local(\$LOCK_NB) = 4;
- local(\$LOCK_UN) = 8;
-
- open(F, ">> \$file") || die "\$file: \$!\n";
- while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, \$LOCK_UN );
-}
-EOF
-elif [ "$2" = "POST-INSTALL" ]; then
-chown -R firebird:firebird $PKG_PREFIX/firebird
+if [ `id -u` -ne 0 ]; then
+ echo; echo "You must be root to run this step!"; echo; echo
+ exit 1
+fi
+
+nofbuid=0
+fbUID=`id -u firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbUID=90
+ while [ ! -z `id -un $fbUID 2>/dev/null` ]
+ do
+ fbUID=$(($fbUID+1))
+ done
+ nofbuid=1
+fi
+
+fbGID=`pw groupshow firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbGID=90
+ while [ ! -z `id -gn $fbGID 2>/dev/null` ]
+ do
+ fbGID=$(($fbGID+1))
+ done
+ echo "firebird:*:$fbGID" >> /etc/group
+else
+ fbGID=`echo $fbGID | awk -F: '{print $3}'`
+fi
+
+echo "firebird user using uid $fbUID"
+echo "firebird user using gid $fbGID"
-# Turn everybody to read only.
-chmod -R o=r $PKG_PREFIX/firebird
+if which -s pw; then
+ if [ $nofbuid -ne 0 ]; then
+ pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \
+ -d $PKG_PREFIX/firebird -c "Firebird pseudo-user"
+ fi
+else
+ echo -n "unable to create user firebird - please create it manually,"
+ echo " before reinstalling this package."
+ exit 1
+fi
+;;
+
+POST-INSTALL)
+chown -R firebird:firebird $PKG_PREFIX/firebird
# Now fix up the mess.
@@ -84,22 +74,28 @@ for i in `find $PKG_PREFIX/firebird -print`
FileName=$i
if [ -d $FileName ]
then
- chmod o=rx $FileName
+ chmod u=rwx,go=rx $FileName
fi
done
# make lib ldconfig-compatible
chown -R root:wheel $PKG_PREFIX/firebird/lib
-chmod -R g-w $PKG_PREFIX/firebird/lib
+
+# make the following read-only
+chmod -R a=r $PKG_PREFIX/firebird/UDF/*
+chmod -R a=r $PKG_PREFIX/firebird/include/*
+chmod -R a=r $PKG_PREFIX/firebird/intl/*
+chmod -R a=r $PKG_PREFIX/firebird/lib/*
# Fix UDF load problem
cd $PKG_PREFIX/firebird/lib
ln -sf ib_util.so libib_util.so
+ln -sf gds.so libgds.so.1
cd $PKG_PREFIX/firebird/bin
# all users can run everything.
-chmod o=rx *
+chmod a=rx *
# SUID is needed for running server programs.
@@ -121,14 +117,15 @@ for i in isc_init1 isc_lock1 isc_event1
chown firebird:firebird $FileName
done
-
touch interbase.log
-chmod ugo=rw interbase.log
+chmod u=rw,go= interbase.log
+chmod a=r interbase.msg
-# make databases writable by all
-chmod ugo=rw examples/v5/*.gdb
-chmod ugo=rw help/*.gdb
-chmod ugo=rw isc4.gdb
+# make databases writable by interbase only
+# local database connections are not a good idea
+chmod u=rw,go= examples/v5/*.gdb
+chmod u=rw,go= help/*.gdb
+chmod u=rw,go= isc4.gdb
# remove any existing gds service
cp /etc/services /etc/services.old
@@ -154,6 +151,7 @@ if [ -d $PKG_PREFIX/etc/rc.d ]; then
(
echo "#!/bin/sh"; echo "[ -d $PKG_PREFIX/firebird/lib ] && /sbin/ldconfig -m $PKG_PREFIX/firebird/lib"
) > $PKG_PREFIX/etc/rc.d/000.firebird.sh
+ chmod a=rx $PKG_PREFIX/etc/rc.d/000.firebird.sh
fi
-
-fi
+;;
+esac
diff --git a/databases/firebird2-server/pkg-plist b/databases/firebird2-server/pkg-plist
index 10f152fcbc82..4108b6237053 100644
--- a/databases/firebird2-server/pkg-plist
+++ b/databases/firebird2-server/pkg-plist
@@ -70,6 +70,10 @@ firebird/lib/libib_util.so
firebird/lib/gds_pyxis.a
firebird/help/help.gbak
firebird/help/help.gdb
+firebird/bin/ibguard
+firebird/bin/ibmgr
+firebird/bin/ibmgr.bin
+firebird/bin/ibserver
firebird/bin/isc4.gbak
firebird/bin/gpre
firebird/bin/gds_pipe
@@ -86,12 +90,15 @@ firebird/bin/gstat
firebird/bin/gds_relay
firebird/bin/gsec
firebird/bin/gbak
+firebird/misc/firebird.init.d.generic
+firebird/misc/firebird.init.d.mandrake
firebird/services.isc
firebird/isc_config
firebird/isc4.gdb
firebird/interbase.msg
firebird/interbase.log
firebird/inetd.conf.isc
+firebird/README
firebird/RELNOTES
@dirrm firebird
@dirrm firebird/intl
@@ -104,3 +111,4 @@ firebird/RELNOTES
@dirrm firebird/lib
@dirrm firebird/help
@dirrm firebird/bin
+@dirrm firebird/misc
diff --git a/databases/firebird2-server/scripts/addservice b/databases/firebird2-server/scripts/addservice
deleted file mode 100644
index df9aea5e91de..000000000000
--- a/databases/firebird2-server/scripts/addservice
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-cat >>/etc/services <<EOF
-gds_db 3050/tcp #InterBase Database Remote Protocol
-EOF
-cat >>/etc/inetd.conf <<EOF
-gds_db stream tcp nowait firebird /usr/interbase/bin/gds_inet_server gds_inet_server
-EOF
-kill -HUP `cat /var/run/inetd.pid`
diff --git a/databases/firebird2-server/scripts/createuser b/databases/firebird2-server/scripts/createuser
deleted file mode 100644
index eba7ce1b887d..000000000000
--- a/databases/firebird2-server/scripts/createuser
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-#
-
-eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
-& eval 'exec /usr/bin/perl -S $0 $argv:q'
-if 0;
-
-if( $> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( $null, $null, $fbUID ) = getpwnam( "firebird" );
-} else {
- $fbUID = 90;
- while( getpwuid( $fbUID ) ) {
- $fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( $null, $null, $fbGID ) = getgrnam( "firebird" );
-} else {
- $fbGID = 90;
- while( getgrgid( $fbGID ) ) {
- $fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:$fbGID:" );
-}
-
-print "firebird user using uid $fbUID\n";
-print "firebird user using gid $fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:$fbUID:$fbGID\:\:0:0:Firebird pseudo-user:$ENV{'PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local($file,@list) = @_;
- local($LOCK_EX) = 2;
- local($LOCK_NB) = 4;
- local($LOCK_UN) = 8;
-
- open(F, ">> $file") || die "$file: $!\n";
- while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, $LOCK_UN );
-}
diff --git a/databases/firebird2-server/scripts/pre-build b/databases/firebird2-server/scripts/pre-build
deleted file mode 100644
index 6605df7770fd..000000000000
--- a/databases/firebird2-server/scripts/pre-build
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-GDS_LOCK_MGR=`ps ax |grep gds_lock_mgr |grep -v grep`;
-
-if [ "$GDS_LOCK_MGR" != "" ]; then
- echo "It appears you have a gds_lock_manager already running.";
- echo;
- echo "You must cease all InterBase operations to build this port.";
- echo "Make sure nobody is connected to any databases, then use";
- echo "'gds_drop -a' and manually verify (with ipcs) that the";
- echo "semaphores were removed.";
- exit 1;
-fi
-exit 0
-
diff --git a/databases/firebird2-server/scripts/pre-install b/databases/firebird2-server/scripts/pre-install
deleted file mode 100644
index a6e1b37a9008..000000000000
--- a/databases/firebird2-server/scripts/pre-install
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if [ -d $PREFIX/firebird ]; then
- if [ -d $PREFIX/firebird.old ]; then
- rm -rf $PREFIX/firebird.old
- fi
- mv $PREFIX/firebird $PREFIX/firebird.old
-fi
-
-if [ -L /usr/interbase ]; then
- rm -f /usr/interbase
-fi
-
-if [ -d /usr/interbase ]; then
- mv /usr/interbase /usr/interbase.old
-fi
-
-ln -fs $PREFIX/firebird /usr/interbase
-
-perl $SCRIPTDIR/createuser
diff --git a/databases/firebird2-server/scripts/rmservice b/databases/firebird2-server/scripts/rmservice
deleted file mode 100644
index 58adfc17419d..000000000000
--- a/databases/firebird2-server/scripts/rmservice
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cp /etc/services /etc/services.old
-cp /etc/inetd.conf /etc/inetd.conf.old
-cat /etc/services |grep -v gds_db >/etc/services.new
-cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new
-mv /etc/services.new /etc/services
-mv /etc/inetd.conf.new /etc/inetd.conf
diff --git a/databases/firebird20-server/Makefile b/databases/firebird20-server/Makefile
index 1606fc389e38..bc151970f413 100644
--- a/databases/firebird20-server/Makefile
+++ b/databases/firebird20-server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= firebird
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://firebird.sourceforge.net/download/ \
http://www.aims.com.au/chris/ \
@@ -25,7 +26,6 @@ LDCONFIG_DIRS= %%PREFIX%%/firebird/lib
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
USE_REINPLACE= yes
-USE_PERL5= yes
ONLY_FOR_ARCHS= i386
@@ -55,7 +55,7 @@ do-configure:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
${SH} buildBootDatabases; \
NOPROMPT_SETUP=yes; export NOPROMPT_SETUP; \
FIREBIRD_64_BIT_IO=yes; export FIREBIRD_64_BIT_IO; \
@@ -68,24 +68,27 @@ do-configure:
do-build:
@( \
- ${ECHO_CMD} '#!/bin/sh'; ${ECHO_CMD} \
- '[ -d ${LDCONFIG_RUNLIST} ] && ${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \
- ) > ${WRKDIR}/000.${PORTNAME}.sh
- @( \
- ${LN} -sf ${WRKDIR}/refDatabases/jrd/isc.gdb \
+ ${REINPLACE_CMD} -e 's,opt,usr,' \
+ ${WRKSRC}/firebird/install/linux/misc/ibmgr; \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/jrd/isc.gdb \
${WRKDIR}/firebird-1.0.0.796/interbase/isc4.gdb; \
- ${LN} -sf ${WRKDIR}/refDatabases/msgs/msg.gdb \
+ ${LN} -sf ${WRKDIR}/firebird-1.0.0.796/refDatabases/msgs/msg.gdb \
${WRKDIR}/firebird-1.0.0.796/msg.gdb; \
cd ${WRKDIR}/firebird-1.0.0.796; \
INTERBASE=${WRKDIR}/firebird-1.0.0.796/interbase; export INTERBASE; \
- REFDBPATH=${WRKDIR}/refDatabases; export REFDBPATH; \
- ${SH} boot.freebsd; \
+ REFDBPATH=${WRKDIR}/firebird-1.0.0.796/refDatabases; export REFDBPATH; \
+ ${CP} ${PKGDIR}/files/buildit.sh ${WRKDIR}/firebird-1.0.0.796; \
+ ${SH} buildit.sh; \
)
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
do-install:
@( \
cd ${WRKDIR}/firebird-1.0.0.796; \
- ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/isc4_tmp.gdb || ${TRUE}; \
+ ${RM} ${WRKDIR}/firebird-1.0.0.796/interbase/lib/gds.so.1 || ${TRUE}; \
${CP} /dev/null interbase/interbase.log; \
${CP} -Rp interbase ${PREFIX}/firebird; \
${RM} ${PREFIX}/firebird/install; \
@@ -94,7 +97,11 @@ do-install:
cd ${PREFIX}/firebird/examples; \
${TAR} -xzf ${DISTDIR}/interbase0.9-4-v5examples.tar.gz; \
${CP} ${FILESDIR}/RELNOTES ${PREFIX}/firebird/; \
- ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ \
+ ${CP} ${WRKSRC}/firebird/install/linux/misc/ibmgr \
+ ${PREFIX}/firebird/bin; \
)
+post-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.post.mk>
diff --git a/databases/firebird20-server/files/RELNOTES b/databases/firebird20-server/files/RELNOTES
index 5434347e24d2..a452990122ee 100644
--- a/databases/firebird20-server/files/RELNOTES
+++ b/databases/firebird20-server/files/RELNOTES
@@ -1,4 +1,4 @@
-Firebird 1.0.0 FreeBSD Release Notes 13-Mar-2002
+Firebird 1.0.0 FreeBSD Release Notes 10-Nov-2002
--------------------------------------
FB-T6.2.796 Firebird Final Release
@@ -64,6 +64,13 @@ try stopping PostgreSQL:
and see if that helps.
+ Super Server support has recently been added. However, there is
+anecdotal evidence that it is not as reliable nor as scalable as the
+Classic Server version. For this reason, I have not included a
+start up method for Super Server. For those that are interested,
+traversing to /usr/interbase/misc will find the startup scripts for
+the various flavours of Linux.
+
Complete documentation for InterBase(tm) is available (free of
charge) from http://www.interbase.com/ in PDF format. While
InterBase and Firebird are two distinct entities, all InterBase
diff --git a/databases/firebird20-server/files/buildit.sh b/databases/firebird20-server/files/buildit.sh
new file mode 100644
index 000000000000..d48627c0e21e
--- /dev/null
+++ b/databases/firebird20-server/files/buildit.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+. Configure_SetupEnv.sh
+make super_firebird
diff --git a/databases/firebird20-server/files/patch-builds::original::boot.sfx.interbase b/databases/firebird20-server/files/patch-builds::original::boot.sfx.interbase
new file mode 100644
index 000000000000..62d0b483a07d
--- /dev/null
+++ b/databases/firebird20-server/files/patch-builds::original::boot.sfx.interbase
@@ -0,0 +1,38 @@
+--- builds/original/boot.sfx.interbase.orig Tue Dec 18 01:40:08 2001
++++ builds/original/boot.sfx.interbase Sat Nov 9 17:44:54 2002
+@@ -68,7 +68,7 @@
+ #added completed according to inprise tree
+ #FSG 093000
+
+-firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib examples completed
++firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib completed
+
+ # burp wanted to build gpre
+ # we break this dependency
+@@ -159,14 +159,14 @@
+ # 1995-June-7 David Schnepper
+ # removed pyxis 3-Aug-00 TMC
+ #executables: alice burp dudley gpre miscFiles $(INTL) isql locks \
+- $(SUPER_SERVER) qli remote spit utilities \
+- $(SHARED_AM) $(LINKABLE_LIBS)
++# $(SUPER_SERVER) qli remote spit utilities \
++# $(SHARED_AM) $(LINKABLE_LIBS)
+
+ executables: alice dudley miscFiles $(INTL) isql locks \
+ $(SUPER_SERVER) qli remote spit utilities \
+ $(SHARED_AM) $(LINKABLE_LIBS)
+
+-super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix gsec security_db extlib examples completed
++super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix relay gsec security_db extlib completed
+
+ super_targets: s_run_codes s_alice s_burp s_dba s_security_c super_client super_server super_utils
+
+@@ -195,7 +195,7 @@
+
+ super_client: force
+ $(QUIET_ECHO) "Building super/client..."
+- $(SH) '$(CD) source/super/client; $(MAKE) CFLAGS="$(CFLAGS) -DSUPERCLIENT" SYSTEM="$(SYSTEM)" super_client'
++ $(SH) '$(CD) source/super/client; $(MAKE) SYSTEM="$(SYSTEM)" super_client'
+
+ csu gcsu: $(ACCESS_METHOD) force
+ $(QUIET_ECHO) "Building GCSU..."
diff --git a/databases/firebird20-server/files/patch-builds::original::edit_make b/databases/firebird20-server/files/patch-builds::original::edit_make
new file mode 100644
index 000000000000..d107078c7a59
--- /dev/null
+++ b/databases/firebird20-server/files/patch-builds::original::edit_make
@@ -0,0 +1,32 @@
+--- builds/original/edit_make.orig Fri Aug 4 06:42:41 2000
++++ builds/original/edit_make Sat Nov 9 16:06:59 2002
+@@ -16,13 +16,25 @@
+ # Contributor(s): ______________________________________.
+ if [ "$SYS_TYPE" != "NOLINK_OS" -a "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then
+ if [ "$3" = "make.client" ]; then
+- sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
+- -e "s/\$(SYSTEM)/$1/g" \
+- -e "s/\$(VERSION)/$2/g" \
+- -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ if [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT -D_REENTRANT -D_THREAD_SAFE/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ else
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ fi
+ elif [ "$3" = "make.dsql_ss" -o "$3" = "make.intl_ss" -o "$3" = "make.journal_ss" -o "$3" = "make.jrd_ss" -o "$3" = "make.lock_ss" -o "$3" = "make.remote_ss" -o "$3" = "make.wal_ss" -o "$3" = "make.burp_ss" -o "$3" = "make.alice_ss" -o "$3" = "make.utilities_ss" ]; then
+ if [ "$1" = "HP10" -o "$1" = "LINUX" ]; then
+ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT/g" \
++ -e "s/\$(SYSTEM)/$1/g" \
++ -e "s/\$(VERSION)/$2/g" \
++ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
++ elif [ "$FBBUILDHACK" = "FREEBSD" ]; then
++ sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT -D_THREAD_SAFE/g" \
+ -e "s/\$(SYSTEM)/$1/g" \
+ -e "s/\$(VERSION)/$2/g" \
+ -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4
diff --git a/databases/firebird20-server/files/patch-builds::original::platform b/databases/firebird20-server/files/patch-builds::original::platform
new file mode 100644
index 000000000000..149f2fe3a4f6
--- /dev/null
+++ b/databases/firebird20-server/files/patch-builds::original::platform
@@ -0,0 +1,13 @@
+--- builds/original/platform.orig Sun Sep 16 22:15:14 2001
++++ builds/original/platform Sat Nov 9 16:16:23 2002
+@@ -32,6 +32,10 @@
+ SYS_TYPE=GENERIC
+ fi
+ export SYS_TYPE
++if [ $1 = 'FREEBSD' ]; then
++ FBBUILDHACK=$1
++ export FBBUILDHACK
++fi
+ #
+ if [ $1 = 'SUN3_4' -o $1 = 'SUN4' -o $1 = 'AP' -o $1 = 'AX' ]; then
+ TR='tr "A-Z" "a-z"'
diff --git a/databases/firebird20-server/files/patch-builds::original::prefix.freebsd b/databases/firebird20-server/files/patch-builds::original::prefix.freebsd
new file mode 100644
index 000000000000..ec8d8343f61d
--- /dev/null
+++ b/databases/firebird20-server/files/patch-builds::original::prefix.freebsd
@@ -0,0 +1,102 @@
+--- builds/original/prefix.freebsd.orig Sat Jan 13 05:18:13 2001
++++ builds/original/prefix.freebsd Sat Nov 9 16:49:17 2002
+@@ -28,20 +28,20 @@
+
+
+ PROD_DEBUG_OBJECTS= nodebug.o
+-PROD_SHRLIB_DIR= -Lsource/jrd
++PROD_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ PROD_VERSION_FLAG= -DPROD_BUILD
+-PROD_CFLAGS= -O -m486 -fpic -DFLINTSTONE
++PROD_CFLAGS= -O -pipe -march=i486 -fpic -DFLINTSTONE
+
+
+ DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o
+-DEV_SHRLIB_DIR= -Lsource/jrd
++DEV_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib
+ DEV_VERSION_FLAG= -DDEV_BUILD
+ DEV_CFLAGS= -ggdb
+
+ DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS)
+ SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR)
+ VERSION_FLAG= $($(VERSION)_VERSION_FLAG)
+-CFLAGS_COMMON= $($(VERSION)_CFLAGS) -Isource/interbase/include -DFREEBSD -w -fwritable-strings
++CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DFREEBSD -w -fwritable-strings -Isource/interbase/include
+ CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG)
+ PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC
+ SPECIAL_OBJECTS= j
+@@ -62,21 +62,21 @@
+ BIN_PATH= interbase/bin
+ BRIDGE_MISC= head5.o allp.o
+ CHMOD_VAL= 666
+-CURSES_LIB= -lncurses
++CURSES_LIB=
+ DSQL_P_OBJS= dsql_p_objects
+-FORM_OBJECTS= form.o
+-FORM_TRN_OBJECTS= form_trn.o
++FORM_OBJECTS= noform.o
++FORM_TRN_OBJECTS=
+ FUNCTIONS= functions.bin
+ FUNCSHR= source/interbase/lib/gdsf.so
+ GDS_LINK= $(GDSSHR_LINK)
+-GDS_PYXIS= gds_pyxis.a
++GDS_PYXIS=
+ GDSLIB_BACKEND= source/interbase/lib/gds_b.a
+ GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -ldescrypt
+
+ GDSSHR= source/interbase/lib/gds.so
+ LINUX_GDSSHR= $(GDSSHR)
+-GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -ldescrypt
+-PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis
++GDSSHR_LINK= $(SHRLIB_DIR) -lgds -ldescrypt
++PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds
+ HLPDIR= source/qli/
+ HOSTNAME= `hostname | cut -d'.' -f1`
+ INCLUDES= include_so include_so_ada
+@@ -92,7 +92,7 @@
+ JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j
+ JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin
+ LANG_OBJECTS= ada.o ftn.o cob.o
+-LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn
++LANGUAGES= cc cxx ada microfocus_cob make16 gdl1 sun_ftn
+ LD_LIBS= -lc
+ LD_LIBS_J= -lc
+ LD_OPTS= -shared
+@@ -104,28 +104,28 @@
+ MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm
+ PIC_FLAGS= $(CFLAGS) -fPIC
+ PIPE= gds.a gds_pipe
+-PYXIS= pyxis
+-PYXIS_MISC_OBJS= $(PYXIS_MISC)
+-PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC)
+-PYXIS_OBJECTS= pyxis_objects
+-PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o
++PYXIS=
++PYXIS_MISC_OBJS=
++PYXIS_P_MISC_OBJS=
++PYXIS_OBJECTS=
++PYXIS_MISC_OBJECTS=
+ REG_HELP= isc_ins_hlp.dat
+ REMOTE_GDSSHR= $(GDSSHR)
+ REMOTE_GDSSHR_LINK= $(SERVER_LINK)
+ REMOTE_P_OBJS= rem_p_objects
+-SCREEN_LIBS=
+-#SCREEN_LIBS= -lncurses
++#SCREEN_LIBS=
++SCREEN_LIBS= -lncurses
+ SERVER_LINK= $(GDSSHR_LINK)
+ SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD;
+ SPECIAL_OPT= source/special_opt
+ NETWORK_LIB=
+ SOCKET_LIB= -lc
+-THREAD_LIB= -llthread
++THREAD_LIB= -pthread
+ SUN_FUNCSHR= $(FUNCSHR)
+ LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1
+ SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR)
+ SUPER_BACKEND= source/jrd/gds_ss.a
+-SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldescrypt -L/usr/local/lib -llthread
++SUPER_LINK= -pthread -Lsource/jrd -lgds_ss -ldescrypt
+ SUPER_SERVER=
+ UTILITIES=
+ WAL_P_OBJS= wal_p_objects
diff --git a/databases/firebird20-server/files/patch-jrd::gds.c b/databases/firebird20-server/files/patch-jrd::gds.c
new file mode 100644
index 000000000000..523abb725403
--- /dev/null
+++ b/databases/firebird20-server/files/patch-jrd::gds.c
@@ -0,0 +1,24 @@
+--- jrd/gds.c.orig Sat Mar 2 00:15:11 2002
++++ jrd/gds.c Sun Jul 7 14:27:44 2002
+@@ -159,7 +159,7 @@
+ engine and this change may imply side effect I haven't known
+ about yet. Tomas Nejedlik (tomas@nejedlik.cz)
+ */
+-#if (defined(LINUX) && defined(SUPERCLIENT))
++#if ((defined(LINUX) || defined(FREEBSD)) && defined(SUPERCLIENT))
+ #define V4_THREADING
+ #endif
+
+@@ -3510,9 +3510,9 @@
+ #else
+ (MAP_ANON |
+ #endif
+-#if (!defined LINUX && !defined DARWIN)
+-/* In LINUX, Solaris, and Darwin there is no such thing as MAP_VARIABLE. Hence, it gives
+- compilation error. The equivalent functionality is default,
++#if (!defined LINUX && !defined DARWIN && !defined FREEBSD)
++/* In LINUX, Solaris, FreeBSD and Darwin there is no such thing as MAP_VARIABLE.
++ Hence, it gives compilation error. The equivalent functionality is default,
+ if you do not specify MAP_FIXED */
+ MAP_VARIABLE |
+ #endif /* LINUX */
diff --git a/databases/firebird20-server/files/patch-jrd::isc_file.c b/databases/firebird20-server/files/patch-jrd::isc_file.c
new file mode 100644
index 000000000000..7047f182d59c
--- /dev/null
+++ b/databases/firebird20-server/files/patch-jrd::isc_file.c
@@ -0,0 +1,15 @@
+--- jrd/isc_file.c.orig Tue Dec 18 01:40:18 2001
++++ jrd/isc_file.c Sat Jul 6 18:04:55 2002
+@@ -106,6 +106,12 @@
+ #define MTAB_CLOSE(stream) ib_fclose (stream)
+ #endif
+
++#ifdef FREEBSD
++#define MTAB "/etc/fstab"
++#define MTAB_OPEN(path,type) ib_fopen (path, type)
++#define MTAB_CLOSE(stream) ib_fclose (stream)
++#endif
++
+ #ifdef DARWIN
+ #define MTAB "/etc/fstab.hd"
+ #define MTAB_OPEN(path,type) ib_fopen (path, type)
diff --git a/databases/firebird20-server/files/patch-jrd::isc_sync.c b/databases/firebird20-server/files/patch-jrd::isc_sync.c
new file mode 100644
index 000000000000..19e327a1705f
--- /dev/null
+++ b/databases/firebird20-server/files/patch-jrd::isc_sync.c
@@ -0,0 +1,38 @@
+--- jrd/isc_sync.c.orig Tue Mar 5 21:11:25 2002
++++ jrd/isc_sync.c Sat Jul 6 18:06:30 2002
+@@ -1467,7 +1467,7 @@
+ pthread_mutex_init (event->event_mutex, pthread_mutexattr_default);
+ pthread_cond_init (event->event_semnum, pthread_condattr_default);
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ pthread_mutex_init (event->event_mutex, NULL);
+ pthread_cond_init (event->event_semnum, NULL);
+ #else
+@@ -1596,7 +1596,7 @@
+ #ifdef HP10
+ if (micro_seconds > 0 && (ret == -1) && (errno == EAGAIN))
+ #else
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ if (micro_seconds > 0 && (ret == ETIMEDOUT))
+ #else
+ if (micro_seconds > 0 && (ret == ETIME))
+@@ -5198,7 +5198,7 @@
+ **************************************/
+ int state;
+
+-#if (!defined HP10 && !defined linux && !defined DARWIN)
++#if (!defined HP10 && !defined linux && !defined DARWIN && !defined FREEBSD)
+
+ pthread_mutexattr_t mattr;
+
+@@ -5218,7 +5218,7 @@
+ server (until we are to implement local IPC using shared
+ memory in which case we need interprocess thread sync.
+ */
+-#if (defined linux || defined DARWIN)
++#if (defined linux || defined DARWIN || defined FREEBSD)
+ return pthread_mutex_init (mutex->mtx_mutex, NULL);
+ #else
+ state = pthread_mutex_init (mutex->mtx_mutex, pthread_mutexattr_default);
diff --git a/databases/firebird20-server/files/patch-jrd::jrd.h b/databases/firebird20-server/files/patch-jrd::jrd.h
new file mode 100644
index 000000000000..0a280080c74a
--- /dev/null
+++ b/databases/firebird20-server/files/patch-jrd::jrd.h
@@ -0,0 +1,12 @@
+--- jrd/jrd.h.orig Tue May 14 19:01:06 2002
++++ jrd/jrd.h Tue May 14 19:23:44 2002
+@@ -717,7 +717,8 @@
+ #ifdef MULTI_THREAD
+ #if (defined APOLLO || defined DECOSF || defined NETWARE_386 || \
+ defined NeXT || defined SOLARIS_MT || defined WIN_NT || \
+- defined OS2_ONLY || defined HP10 || defined LINUX || defined DARWIN)
++ defined OS2_ONLY || defined HP10 || defined LINUX || \
++ defined DARWIN || defined FREEBSD)
+ #define PLATFORM_GET_THREAD_DATA ((TDBB) THD_get_specific())
+ #endif
+ #endif
diff --git a/databases/firebird20-server/files/patch-jrd::thd.c b/databases/firebird20-server/files/patch-jrd::thd.c
new file mode 100644
index 000000000000..a09c3fe4e1c3
--- /dev/null
+++ b/databases/firebird20-server/files/patch-jrd::thd.c
@@ -0,0 +1,20 @@
+--- jrd/thd.c.orig Thu May 24 14:11:11 2001
++++ jrd/thd.c Sun Jul 7 14:52:07 2002
+@@ -2605,7 +2605,7 @@
+ int detach_state=PTHREAD_CREATE_DETACHED
+ #endif
+
+-#if ( !defined HP10 && !defined linux )
++#if ( !defined HP10 && !defined linux && !defined FREEBSD )
+
+ state = pthread_attr_init (&pattr);
+ if (state)
+@@ -2628,7 +2628,7 @@
+ return state;
+
+ #else
+-#ifdef linux
++#if ( defined linux || defined FREEBSD )
+ if (state = pthread_create (&thread, NULL, routine, arg))
+ return state;
+ return pthread_detach (thread);
diff --git a/databases/firebird20-server/files/patch-jrd::thd.h b/databases/firebird20-server/files/patch-jrd::thd.h
new file mode 100644
index 000000000000..b4e74ecfbe59
--- /dev/null
+++ b/databases/firebird20-server/files/patch-jrd::thd.h
@@ -0,0 +1,14 @@
+--- jrd/thd.h.orig Sat Mar 2 00:16:31 2002
++++ jrd/thd.h Mon May 13 19:10:37 2002
+@@ -98,6 +98,11 @@
+ #define MULTI_THREAD 1
+ #endif
+
++#if (defined(FREEBSD) && defined(SUPERSERVER))
++#define POSIX_THREADS 1
++#define MULTI_THREAD 1
++#endif
++
+ #ifdef VMS
+ #ifndef GATEWAY
+ #define MULTI_THREAD 1
diff --git a/databases/firebird20-server/files/patch-lock::lock.h b/databases/firebird20-server/files/patch-lock::lock.h
new file mode 100644
index 000000000000..fe7ad684d99e
--- /dev/null
+++ b/databases/firebird20-server/files/patch-lock::lock.h
@@ -0,0 +1,13 @@
+--- lock/lock.h.orig Wed Jun 6 05:43:58 2001
++++ lock/lock.h Sat Jul 6 18:08:56 2002
+@@ -65,8 +65,10 @@
+ #ifndef SOLARIS_MT
+ #if !(defined(HP10) && defined(SUPERSERVER))
+ #if !(defined(LINUX) && defined(SUPERSERVER))
++#if !(defined(FREEBSD) && defined(SUPERSERVER))
+ #ifndef DARWIN
+ #define MANAGER_PROCESS
++#endif
+ #endif
+ #endif
+ #endif
diff --git a/databases/firebird20-server/pkg-install b/databases/firebird20-server/pkg-install
index af43f63a3943..6fd18e94bd21 100644
--- a/databases/firebird20-server/pkg-install
+++ b/databases/firebird20-server/pkg-install
@@ -1,9 +1,8 @@
#!/bin/sh
-# Created in haste by smashing together various
-# files from the port scripts.
+case $2 in
+PRE-INSTALL)
-if [ "$2" = "PRE-INSTALL" ]; then
if [ -d $PKG_PREFIX/firebird ]; then
if [ -d $PKG_PREFIX/firebird.old ]; then
rm -rf $PKG_PREFIX/firebird.old
@@ -21,60 +20,51 @@ fi
ln -fs $PKG_PREFIX/firebird /usr/interbase
-perl <<EOF
-eval '(exit \$?0)' && eval 'exec /usr/bin/perl -S \$0 \${1+"\$@"}'
-& eval 'exec /usr/bin/perl -S \$0 \$argv:q'
-if 0;
-
-if( \$> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( \$null, \$null, \$fbUID ) = getpwnam( "firebird" );
-} else {
- \$fbUID = 90;
- while( getpwuid( \$fbUID ) ) {
- \$fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( \$null, \$null, \$fbGID ) = getgrnam( "firebird" );
-} else {
- \$fbGID = 90;
- while( getgrgid( \$fbGID ) ) {
- \$fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:\$fbGID:" );
-}
-
-print "firebird user using uid \$fbUID\n";
-print "firebird user using gid \$fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:\$fbUID:\$fbGID\:\:0:0:Firebird pseudo-user:\$ENV{'PKG_PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local(\$file,@list) = @_;
- local(\$LOCK_EX) = 2;
- local(\$LOCK_NB) = 4;
- local(\$LOCK_UN) = 8;
-
- open(F, ">> \$file") || die "\$file: \$!\n";
- while( ! flock( F, \$LOCK_EX | \$LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, \$LOCK_UN );
-}
-EOF
-elif [ "$2" = "POST-INSTALL" ]; then
-chown -R firebird:firebird $PKG_PREFIX/firebird
+if [ `id -u` -ne 0 ]; then
+ echo; echo "You must be root to run this step!"; echo; echo
+ exit 1
+fi
+
+nofbuid=0
+fbUID=`id -u firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbUID=90
+ while [ ! -z `id -un $fbUID 2>/dev/null` ]
+ do
+ fbUID=$(($fbUID+1))
+ done
+ nofbuid=1
+fi
+
+fbGID=`pw groupshow firebird 2>/dev/null`
+if [ $? -ne 0 ]; then
+ fbGID=90
+ while [ ! -z `id -gn $fbGID 2>/dev/null` ]
+ do
+ fbGID=$(($fbGID+1))
+ done
+ echo "firebird:*:$fbGID" >> /etc/group
+else
+ fbGID=`echo $fbGID | awk -F: '{print $3}'`
+fi
+
+echo "firebird user using uid $fbUID"
+echo "firebird user using gid $fbGID"
-# Turn everybody to read only.
-chmod -R o=r $PKG_PREFIX/firebird
+if which -s pw; then
+ if [ $nofbuid -ne 0 ]; then
+ pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \
+ -d $PKG_PREFIX/firebird -c "Firebird pseudo-user"
+ fi
+else
+ echo -n "unable to create user firebird - please create it manually,"
+ echo " before reinstalling this package."
+ exit 1
+fi
+;;
+
+POST-INSTALL)
+chown -R firebird:firebird $PKG_PREFIX/firebird
# Now fix up the mess.
@@ -84,22 +74,28 @@ for i in `find $PKG_PREFIX/firebird -print`
FileName=$i
if [ -d $FileName ]
then
- chmod o=rx $FileName
+ chmod u=rwx,go=rx $FileName
fi
done
# make lib ldconfig-compatible
chown -R root:wheel $PKG_PREFIX/firebird/lib
-chmod -R g-w $PKG_PREFIX/firebird/lib
+
+# make the following read-only
+chmod -R a=r $PKG_PREFIX/firebird/UDF/*
+chmod -R a=r $PKG_PREFIX/firebird/include/*
+chmod -R a=r $PKG_PREFIX/firebird/intl/*
+chmod -R a=r $PKG_PREFIX/firebird/lib/*
# Fix UDF load problem
cd $PKG_PREFIX/firebird/lib
ln -sf ib_util.so libib_util.so
+ln -sf gds.so libgds.so.1
cd $PKG_PREFIX/firebird/bin
# all users can run everything.
-chmod o=rx *
+chmod a=rx *
# SUID is needed for running server programs.
@@ -121,14 +117,15 @@ for i in isc_init1 isc_lock1 isc_event1
chown firebird:firebird $FileName
done
-
touch interbase.log
-chmod ugo=rw interbase.log
+chmod u=rw,go= interbase.log
+chmod a=r interbase.msg
-# make databases writable by all
-chmod ugo=rw examples/v5/*.gdb
-chmod ugo=rw help/*.gdb
-chmod ugo=rw isc4.gdb
+# make databases writable by interbase only
+# local database connections are not a good idea
+chmod u=rw,go= examples/v5/*.gdb
+chmod u=rw,go= help/*.gdb
+chmod u=rw,go= isc4.gdb
# remove any existing gds service
cp /etc/services /etc/services.old
@@ -154,6 +151,7 @@ if [ -d $PKG_PREFIX/etc/rc.d ]; then
(
echo "#!/bin/sh"; echo "[ -d $PKG_PREFIX/firebird/lib ] && /sbin/ldconfig -m $PKG_PREFIX/firebird/lib"
) > $PKG_PREFIX/etc/rc.d/000.firebird.sh
+ chmod a=rx $PKG_PREFIX/etc/rc.d/000.firebird.sh
fi
-
-fi
+;;
+esac
diff --git a/databases/firebird20-server/pkg-plist b/databases/firebird20-server/pkg-plist
index 10f152fcbc82..4108b6237053 100644
--- a/databases/firebird20-server/pkg-plist
+++ b/databases/firebird20-server/pkg-plist
@@ -70,6 +70,10 @@ firebird/lib/libib_util.so
firebird/lib/gds_pyxis.a
firebird/help/help.gbak
firebird/help/help.gdb
+firebird/bin/ibguard
+firebird/bin/ibmgr
+firebird/bin/ibmgr.bin
+firebird/bin/ibserver
firebird/bin/isc4.gbak
firebird/bin/gpre
firebird/bin/gds_pipe
@@ -86,12 +90,15 @@ firebird/bin/gstat
firebird/bin/gds_relay
firebird/bin/gsec
firebird/bin/gbak
+firebird/misc/firebird.init.d.generic
+firebird/misc/firebird.init.d.mandrake
firebird/services.isc
firebird/isc_config
firebird/isc4.gdb
firebird/interbase.msg
firebird/interbase.log
firebird/inetd.conf.isc
+firebird/README
firebird/RELNOTES
@dirrm firebird
@dirrm firebird/intl
@@ -104,3 +111,4 @@ firebird/RELNOTES
@dirrm firebird/lib
@dirrm firebird/help
@dirrm firebird/bin
+@dirrm firebird/misc
diff --git a/databases/firebird20-server/scripts/addservice b/databases/firebird20-server/scripts/addservice
deleted file mode 100644
index df9aea5e91de..000000000000
--- a/databases/firebird20-server/scripts/addservice
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-cat >>/etc/services <<EOF
-gds_db 3050/tcp #InterBase Database Remote Protocol
-EOF
-cat >>/etc/inetd.conf <<EOF
-gds_db stream tcp nowait firebird /usr/interbase/bin/gds_inet_server gds_inet_server
-EOF
-kill -HUP `cat /var/run/inetd.pid`
diff --git a/databases/firebird20-server/scripts/createuser b/databases/firebird20-server/scripts/createuser
deleted file mode 100644
index eba7ce1b887d..000000000000
--- a/databases/firebird20-server/scripts/createuser
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-#
-
-eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
-& eval 'exec /usr/bin/perl -S $0 $argv:q'
-if 0;
-
-if( $> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
-if( getpwnam( "firebird" ) ) {
- ( $null, $null, $fbUID ) = getpwnam( "firebird" );
-} else {
- $fbUID = 90;
- while( getpwuid( $fbUID ) ) {
- $fbUID++;
- }
-}
-
-if( getgrnam( "firebird" ) ) {
- ( $null, $null, $fbGID ) = getgrnam( "firebird" );
-} else {
- $fbGID = 90;
- while( getgrgid( $fbGID ) ) {
- $fbGID++;
- }
- &append_file( "/etc/group", "firebird:*:$fbGID:" );
-}
-
-print "firebird user using uid $fbUID\n";
-print "firebird user using gid $fbGID\n";
-
-system( "/usr/bin/chpass -a \"firebird:*:$fbUID:$fbGID\:\:0:0:Firebird pseudo-user:$ENV{'PREFIX'}/firebird:/bin/sh\"" );
-
-sub append_file {
- local($file,@list) = @_;
- local($LOCK_EX) = 2;
- local($LOCK_NB) = 4;
- local($LOCK_UN) = 8;
-
- open(F, ">> $file") || die "$file: $!\n";
- while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) {
- exit 1;
- }
- print F join( "\n", @list) . "\n";
- close F;
- flock( F, $LOCK_UN );
-}
diff --git a/databases/firebird20-server/scripts/pre-build b/databases/firebird20-server/scripts/pre-build
deleted file mode 100644
index 6605df7770fd..000000000000
--- a/databases/firebird20-server/scripts/pre-build
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-GDS_LOCK_MGR=`ps ax |grep gds_lock_mgr |grep -v grep`;
-
-if [ "$GDS_LOCK_MGR" != "" ]; then
- echo "It appears you have a gds_lock_manager already running.";
- echo;
- echo "You must cease all InterBase operations to build this port.";
- echo "Make sure nobody is connected to any databases, then use";
- echo "'gds_drop -a' and manually verify (with ipcs) that the";
- echo "semaphores were removed.";
- exit 1;
-fi
-exit 0
-
diff --git a/databases/firebird20-server/scripts/pre-install b/databases/firebird20-server/scripts/pre-install
deleted file mode 100644
index a6e1b37a9008..000000000000
--- a/databases/firebird20-server/scripts/pre-install
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if [ -d $PREFIX/firebird ]; then
- if [ -d $PREFIX/firebird.old ]; then
- rm -rf $PREFIX/firebird.old
- fi
- mv $PREFIX/firebird $PREFIX/firebird.old
-fi
-
-if [ -L /usr/interbase ]; then
- rm -f /usr/interbase
-fi
-
-if [ -d /usr/interbase ]; then
- mv /usr/interbase /usr/interbase.old
-fi
-
-ln -fs $PREFIX/firebird /usr/interbase
-
-perl $SCRIPTDIR/createuser
diff --git a/databases/firebird20-server/scripts/rmservice b/databases/firebird20-server/scripts/rmservice
deleted file mode 100644
index 58adfc17419d..000000000000
--- a/databases/firebird20-server/scripts/rmservice
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cp /etc/services /etc/services.old
-cp /etc/inetd.conf /etc/inetd.conf.old
-cat /etc/services |grep -v gds_db >/etc/services.new
-cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new
-mv /etc/services.new /etc/services
-mv /etc/inetd.conf.new /etc/inetd.conf