summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul de Vrieze <pauldv@gentoo.org>2014-05-15 13:48:18 +0000
committerPaul de Vrieze <pauldv@gentoo.org>2014-05-15 13:48:18 +0000
commit757d1e5a49f30dc3b634724c48c08eed3c27cb28 (patch)
treecd3743b92301dd26e2d10645d2de0fcee30d7a19
parentTake into account new kde base (diff)
downloadpauldv-757d1e5a49f30dc3b634724c48c08eed3c27cb28.tar.gz
pauldv-757d1e5a49f30dc3b634724c48c08eed3c27cb28.tar.bz2
pauldv-757d1e5a49f30dc3b634724c48c08eed3c27cb28.zip
Add a newer firebird ebuild that also installs the fb_config script
svn path=/trunk/overlay/; revision=169
-rw-r--r--dev-db/firebird/Manifest12
-rw-r--r--dev-db/firebird/files/70firebird2
-rw-r--r--dev-db/firebird/files/firebird-2.5.1.26351.0-client.patch12
-rw-r--r--dev-db/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch59
-rw-r--r--dev-db/firebird/files/firebird-2.5.1.26351.0-superclassic.patch12
-rw-r--r--dev-db/firebird/files/firebird-update-valgrind.patch16
-rw-r--r--dev-db/firebird/files/firebird.conf.d.2.57
-rw-r--r--dev-db/firebird/files/firebird.init.d.2.531
-rw-r--r--dev-db/firebird/files/firebird.logrotate10
-rw-r--r--dev-db/firebird/files/firebird.xinetd11
-rw-r--r--dev-db/firebird/firebird-2.5.2.26540.ebuild302
11 files changed, 474 insertions, 0 deletions
diff --git a/dev-db/firebird/Manifest b/dev-db/firebird/Manifest
new file mode 100644
index 0000000..5c826a7
--- /dev/null
+++ b/dev-db/firebird/Manifest
@@ -0,0 +1,12 @@
+AUX 70firebird 50 SHA256 ca3ca56c53490ac6f849ce78cd1240fc52334f25c8d3841eef1560bed2a80d03 SHA512 0c2f7929331e786bd8f63c23d77e2e39c2217b3c36596661b9976016f7eb72ada465e312cc6ec6326615dcd3f684eb4ba5a1fb408528958351fa8ebdcb97a4bf WHIRLPOOL 560f8edb6681fbfcf0ac43ba49b2481eb4fdecaeef6c4607518ae97c25728c92dc910b173ccbafc1248e5e128bd6aaa184791ce747373771ffd82f315de44575
+AUX firebird-2.5.1.26351.0-client.patch 554 SHA256 afc61661c47dbedaac6b4d2582990712c8fbfe907340359c4eae12c4a66d1408 SHA512 dd1a62995b09f56db09b41b3a94bfb476b10018992b24e4cd19fb2ae95b557acb00b6a22c5bb28c4d2364aa424aca3ed717b9e9943e55fe8ef5412037b94c8f1 WHIRLPOOL fbe1281c31cace1cde2aad55f22203940e7c6703d68fee62f256dc7b4d5af54d5d2ec70d53b1c0a2d1584f7fcea05d59da2415160b8ef0fada86f8e21cce6be2
+AUX firebird-2.5.1.26351.0-deps-flags.patch 3025 SHA256 ff6d2c832b9b1705e14ba8f083a65a774742375c9d4588c3a921cb5806d72be2 SHA512 269d44934e0477283190802e887b6ddfe4eaaf44f878ae19ba1e473804163cfb55593cca9a6dc4ef8f86e25a6557383e13939907fdd3406d8469822a4586cb7a WHIRLPOOL 004c905e0029adaec69ae5bed4f6abec17adb616b4bf725f1635f1f13487acea933a8db2777cef46ccf94a4bda3af7c26cc2c3b96568626f2727049ce0abc204
+AUX firebird-2.5.1.26351.0-superclassic.patch 713 SHA256 dbf9b28a50772ec5c158ab8dfc6a06da5c72b179117ef5b6c6e1645d796f13bf SHA512 b1c0e253f25616ae6522f693e4a1202bcf290eab3d3cfc06f29e6822f8e55d1d316f0e45b89ebca2b4cd5c97bba07997a7e3aa7e5870ffaca28295d1f3d449cb WHIRLPOOL eef1837adac86b7bc21f8e240b753398a787e4e108243004ca34b6015c842e7ca91ce584ffa4e85e1f2e908b5b2d5a3af5fa04125c110b13ffe43b5dca63c5d6
+AUX firebird-update-valgrind.patch 507 SHA256 cc1f64d8263ed6ff32f441e4cc5a80654e59b8768ef218ec09cbda079e3a2a0f SHA512 2c2514cce1052470b7a83241481d69e68ccbdf21e93f9d34a745593d351cb7723875a66520690aea8443ad99dddbd524fca0e7a4b22ed71a28b537f719f35a56 WHIRLPOOL 66a5d3e27022be48c1e41b26a5da611cb5480ec31553f94e5e79268014e1232b5784712e063417360918c65fa58ac1191b73e531f8754110902ffb97bcf18813
+AUX firebird.conf.d.2.5 270 SHA256 c95575949a2509f61dfdad0b311319c15bc4fcf98397dbf86849a208e8e49cea SHA512 ac1410f45accae1beb845eb895592524be22fd0afb457aac4146dc6dc0a79c74c7e62eb814477797a10661a57bb731ade02a2a3b3fd8f5c5ef0c3b80e809bb64 WHIRLPOOL 3a842eb9ea3ab4c97e01eb24fc04f3f46ec4f60ceeda7b6e23d27b59cfde092ae5795790c3687aa41940837b215a358943c39e616804a3529e8f48014a560920
+AUX firebird.init.d.2.5 634 SHA256 6f542ea7a8067a101b1baae0d8b1b61d3bff65966a822e8c746838abb0890f6e SHA512 fc89029480bda6240befc4957e308656d0b13a8d840e30ce6d63953da40426b942896869ad3932ef72b9da568c95f6cebddba97f8d7d367ce8100257a1ee899d WHIRLPOOL 1afa1ae113d960557c1909cab1aa2ca18bba3860aea95bda752f3d9deef7f7bc3d5f639937886ef62c028bdb03f879d6221b97eab06803c3198c16c0372fdb90
+AUX firebird.logrotate 169 SHA256 462a7273c4881b66d31fe44349aae45d1f7085ff4db848eebc5e50b2bcb7f6da SHA512 f99edc010272af28f18e2b89e420aabc204feda918a1181e477edb56612b6af97ca6bab2e39989db401eb8296e3233a64853f824af437329e117f09aa9868823 WHIRLPOOL 0bbfe1cd410c42b137f11d3fb3b8c976c3fc89990650275dab135c66dcd78b35b6d4f73a2a767a56338a519393a33be6f64887f293528878ebe139896e3da49d
+AUX firebird.xinetd 199 SHA256 c0ea0c66e17c41633c19f7bed8cc8f818a3e1afad796d8d493c3b532b498da48 SHA512 4fc963b213e3cb13f1314129a7f5e04c44e3abd3b9cd6b28ea70219e34ecceda24995dc2f1a0a8ea342b016a897726f655604aa2ae6e7035e387d706515d1bfb WHIRLPOOL 4ac8ee679d07329143d9a98fb1acf432876c65695cd188748b3d4a2e4d693817fa6ea759f0e58ca7e75aa6cee8e902b097bcfe4a66715f825bb5379492fa8ad9
+DIST Firebird-2.5.2.26540-0.tar.bz2 13805637 SHA256 bbb9a408198898818d5be3c301dde0f8524fd8e2f509662121d7393e02520721 SHA512 a057f78825bcfe992f9e079704621a1c659588a906e200ed56e269d0a3d78f968553146f21bde1b680795c760b896af1ec689f33dd293dbbc2242ba77b491b3c WHIRLPOOL eb14e30caff8ce1f8fee3651311ce1976ca5041d6c0d739eb916c33d6dc2d810cc10be66dfddf869b0a1dce3171c14ff2db393b5d4b0c0bdf8523d7e73c19606
+DIST ib_b60_doc.zip 10530848 SHA256 8c0158678b2a2fe3ba3abfea1f5487fc5af2644d66837ab8a558f5ad6b6cfd6d SHA512 59eccf1d6b1f0410eddbc5967fd77a3d00e09749640b3f81e2f8b624f5a45461dffad4af5ec61488e941fb3d3af266fe86c0b56e6b7e023239537cb6557a145a WHIRLPOOL 5c3e17eec64d835bac8832a51acefe04c3a5ff818d1d1e69a032bae1a730fd73996a2be073d2e22bcd4ad4ee1ba2247da8271cd3a03c0326acf46eef1073033f
+EBUILD firebird-2.5.2.26540.ebuild 9011 SHA256 c7e81d83b9d5d0c9f9c2d4b1e01416b2f90fa1ec03fb359d7758694b5831f627 SHA512 7462a03ec9041643379ee33235c22dd4ff0d124569d64884c3c8525ed7b199ba14eba8f9c0df842d1f9957f83b4606132d87f8592b91c51fda88cfc205d40149 WHIRLPOOL 083f59bfc16e9a813034345acb68fcaa9b48464520df3197d65e1fd5a7a2c49f899ce1a9a8bf8592c3d0fc87f7b7ee42febccf1dab86ade248505f9005fba72f
diff --git a/dev-db/firebird/files/70firebird b/dev-db/firebird/files/70firebird
new file mode 100644
index 0000000..eebf96b
--- /dev/null
+++ b/dev-db/firebird/files/70firebird
@@ -0,0 +1,2 @@
+PATH=/opt/firebird/bin
+ROOTPATH=/opt/firebird/bin
diff --git a/dev-db/firebird/files/firebird-2.5.1.26351.0-client.patch b/dev-db/firebird/files/firebird-2.5.1.26351.0-client.patch
new file mode 100644
index 0000000..8331c81
--- /dev/null
+++ b/dev-db/firebird/files/firebird-2.5.1.26351.0-client.patch
@@ -0,0 +1,12 @@
+diff -Naur orig/builds/posix/Makefile.in.firebird builds/posix/Makefile.in.firebird
+--- orig/builds/posix/Makefile.in.firebird 2010-11-12 15:46:22.000000000 -0500
++++ builds/posix/Makefile.in.firebird 2010-11-12 16:36:22.000000000 -0500
+@@ -145,7 +145,7 @@
+
+ firebird : firebird_@FIREBIRD_ARCH_TYPE@ $(PLATFORM_POSTBUILD_TARGET)
+
+-firebird_classic firebird_embedded: firebird_basic classic_targets fbtrace
++firebird_classic firebird_embedded: firebird_boot libfbclient includes
+ firebird_super firebird_server: firebird_basic super_targets fbtrace
+
+
diff --git a/dev-db/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch b/dev-db/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch
new file mode 100644
index 0000000..8be521c
--- /dev/null
+++ b/dev-db/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch
@@ -0,0 +1,59 @@
+diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird
+--- Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird 2010-11-09 12:42:45.000000000 -0500
++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird 2011-03-28 15:10:09.814370706 -0400
+@@ -158,7 +158,7 @@
+ # some complications particularly for super in needing to start the server
+ # that you are currently building. MOD 28-July-2002
+
+-firebird_basic: btyacc_binary external_libraries firebird_boot basic_targets
++firebird_basic: firebird_boot basic_targets
+
+ firebird_boot: updateBuildNum boot_phase1 boot_phase2
+
+diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults
+--- Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults 2010-11-09 12:42:45.000000000 -0500
++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults 2011-03-28 15:21:26.904370708 -0400
+@@ -138,7 +138,7 @@
+ AR= ar @AR_OPTIONS@ crsu
+ LN= @LN_S@
+ RANLIB= @RANLIB@
+-BTYACC=$(ROOT)/extern/btyacc/btyacc
++BTYACC=/usr/bin/btyacc
+
+ CC = @CC@
+ CXX = @CXX@
+diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux
+--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux 2010-11-09 12:42:45.000000000 -0500
++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux 2011-03-25 21:38:29.031037374 -0400
+@@ -18,11 +18,10 @@
+ #
+ # 2 Oct 2002, Nickolay Samofatov - Major cleanup
+
+-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0
+-OPTIMIZE_FLAGS=-O3 -march=i586 -mtune=i686 -fno-omit-frame-pointer
++COMMON_FLAGS=-DLINUX -MMD -fPIC -fmessage-length=0
+ WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable
+
+-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS)
++PROD_FLAGS=$(COMMON_FLAGS)
+ #DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS)
+ DEV_FLAGS=-p $(COMMON_FLAGS) $(WARN_FLAGS)
+
+diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64
+--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 2010-11-09 12:42:45.000000000 -0500
++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 2011-03-25 21:39:15.134370707 -0400
+@@ -18,12 +18,11 @@
+ #
+ # 2 Oct 2002, Nickolay Samofatov - Major cleanup
+
+-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0
+-OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer
++COMMON_FLAGS=-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -MMD -fPIC -fmessage-length=0
+ WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable
+ CXXFLAGS:= $(CXXFLAGS) -fno-rtti
+
+-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS)
++PROD_FLAGS=$(COMMON_FLAGS)
+ #DEV_FLAGS=-DUSE_VALGRIND $(COMMON_FLAGS) $(WARN_FLAGS)
+ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
+
diff --git a/dev-db/firebird/files/firebird-2.5.1.26351.0-superclassic.patch b/dev-db/firebird/files/firebird-2.5.1.26351.0-superclassic.patch
new file mode 100644
index 0000000..3891cc7
--- /dev/null
+++ b/dev-db/firebird/files/firebird-2.5.1.26351.0-superclassic.patch
@@ -0,0 +1,12 @@
+diff -Naur orig/builds/posix/Makefile.in.firebird builds/posix/Makefile.in.firebird
+--- orig/builds/posix/Makefile.in.firebird 2010-11-09 12:42:45.000000000 -0500
++++ builds/posix/Makefile.in.firebird 2011-03-07 20:26:56.612573632 -0500
+@@ -332,7 +332,7 @@
+ .PHONY: libfbembed inet_server fb_smp_server embed_gfix embed_gbak embed_isql
+ .PHONY: embed_gpre embed_util
+
+-classic_targets: $(PLAT_CLASSIC_PRE_TARGET) libfbembed inet_server fb_smp_server embed_gfix embed_gbak embed_isql \
++classic_targets: $(PLAT_CLASSIC_PRE_TARGET) libfbembed fbserver fb_smp_server embed_gfix embed_gbak embed_isql \
+ embed_gpre libfbclient embed_util embed_gdef embed_qli embed_fbudf $(PLAT_CLASSIC_POST_TARGET)
+
+ libfbembed:
diff --git a/dev-db/firebird/files/firebird-update-valgrind.patch b/dev-db/firebird/files/firebird-update-valgrind.patch
new file mode 100644
index 0000000..7f8eab1
--- /dev/null
+++ b/dev-db/firebird/files/firebird-update-valgrind.patch
@@ -0,0 +1,16 @@
+--- src.old/common/classes/alloc.cpp 2009-08-20 09:41:15.000000000 -0700
++++ src/common/classes/alloc.cpp 2009-08-19 21:47:10.000000000 -0700
+@@ -42,7 +42,11 @@
+
+ #ifdef USE_VALGRIND
+ #include <valgrind/memcheck.h>
+-#endif
++#ifndef VALGRIND_MAKE_WRITABLE // VALGRIND 3.3
++#define VALGRIND_MAKE_WRITABLE VALGRIND_MAKE_MEM_UNDEFINED
++#define VALGRIND_MAKE_NOACCESS VALGRIND_MAKE_MEM_NOACCESS
++#endif // VALGRIND 3.3
++#endif // USE_VALGRIND
+
+ // Fill blocks with patterns
+ #define FREE_PATTERN 0xDEADBEEF
+
diff --git a/dev-db/firebird/files/firebird.conf.d.2.5 b/dev-db/firebird/files/firebird.conf.d.2.5
new file mode 100644
index 0000000..625963d
--- /dev/null
+++ b/dev-db/firebird/files/firebird.conf.d.2.5
@@ -0,0 +1,7 @@
+FBUSER=firebird
+FBGROUP=firebird
+FIREBIRD=/usr/lib/firebird
+FBGUARD=/usr/sbin/fbguard
+PIDFILE=/var/run/firebird/firebird.pid
+FB_OPTS="-forever -daemon -pidfile $PIDFILE"
+LD_LIBRARY_PATH=/usr/lib/:/usr/lib/firebird/intl/:/usr/lib/firebird/plugins/:/usr/lib/firebird/UDF/
diff --git a/dev-db/firebird/files/firebird.init.d.2.5 b/dev-db/firebird/files/firebird.init.d.2.5
new file mode 100644
index 0000000..20791f7
--- /dev/null
+++ b/dev-db/firebird/files/firebird.init.d.2.5
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/files/firebird.init.d.2.5,v 1.3 2013/01/24 04:52:13 pinkbyte Exp $
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -d -o $FBUSER "$(dirname $PIDFILE)"
+}
+
+start(){
+ ebegin "Starting Firebird server"
+ start-stop-daemon --start --pidfile $PIDFILE --user $FBUSER --group $FBGROUP --exec $FBGUARD -- $FB_OPTS
+ eend $?
+}
+
+stop(){
+ ebegin "Stopping Firebird server"
+ start-stop-daemon --stop --name fbguard
+ eend $?
+}
+
+restart(){
+ svc_stop
+ sleep 1
+ svc_start
+}
+
diff --git a/dev-db/firebird/files/firebird.logrotate b/dev-db/firebird/files/firebird.logrotate
new file mode 100644
index 0000000..c87cd43
--- /dev/null
+++ b/dev-db/firebird/files/firebird.logrotate
@@ -0,0 +1,10 @@
+/var/log/firebird/firebird.log {
+ compress
+ weekly
+ missingok
+ rotate 52
+ size=+1024k
+ delaycompress
+ notifempty
+ create 644 firebird
+ }
diff --git a/dev-db/firebird/files/firebird.xinetd b/dev-db/firebird/files/firebird.xinetd
new file mode 100644
index 0000000..01fc102
--- /dev/null
+++ b/dev-db/firebird/files/firebird.xinetd
@@ -0,0 +1,11 @@
+service gds_db
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = firebird
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = /usr/bin/fb_inet_server
+ disable = yes
+}
diff --git a/dev-db/firebird/firebird-2.5.2.26540.ebuild b/dev-db/firebird/firebird-2.5.2.26540.ebuild
new file mode 100644
index 0000000..cbc8f34
--- /dev/null
+++ b/dev-db/firebird/firebird-2.5.2.26540.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/firebird-2.5.2.26539.0.ebuild,v 1.2 2013/10/09 15:38:02 hasufell Exp $
+
+EAPI=4
+
+inherit flag-o-matic eutils autotools multilib user versionator
+
+MY_P=${PN/f/F}-$(replace_version_separator 4 -)-0
+#MY_P=${PN/f/F}-${PV/_rc/-ReleaseCandidate}
+
+DESCRIPTION="A relational database offering many ANSI SQL:2003 and some SQL:2008 features"
+HOMEPAGE="http://www.firebirdsql.org/"
+SRC_URI="mirror://sourceforge/firebird/${MY_P}.tar.bz2
+ doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )"
+
+LICENSE="IDPL Interbase-1.0"
+SLOT="0"
+KEYWORDS="~amd64 -ia64 ~x86"
+IUSE="doc client superserver xinetd examples debug"
+RESTRICT="userpriv"
+
+RDEPEND="dev-libs/libedit
+ dev-libs/icu"
+DEPEND="${RDEPEND}
+ >=dev-util/btyacc-3.0-r2
+ doc? ( app-arch/unzip )"
+RDEPEND="${RDEPEND}
+ xinetd? ( virtual/inetd )
+ !sys-cluster/ganglia"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ if use client && use superserver ; then
+ die "Use flags client and superserver cannot be used together"
+ fi
+ if use client && use xinetd ; then
+ die "Use flags client and xinetd cannot be used together"
+ fi
+ if use superserver && use xinetd ; then
+ die "Use flags superserver and xinetd cannot be used together"
+ fi
+}
+
+pkg_setup() {
+ enewgroup firebird 450
+ enewuser firebird 450 /bin/bash /usr/$(get_libdir)/firebird firebird
+}
+
+function check_sed() {
+ MSG="sed of $3, required $2 lines modified $1"
+ einfo "${MSG}"
+ [[ $1 -ge $2 ]] || die "${MSG}"
+}
+
+src_unpack() {
+ if use doc; then
+ # Unpack docs
+ mkdir "${WORKDIR}/manuals"
+ cd "${WORKDIR}/manuals"
+ unpack ib_b60_doc.zip
+ cd "${WORKDIR}"
+ fi
+ unpack "${MY_P}.tar.bz2"
+ cd "${S}"
+}
+
+src_prepare() {
+ # This patch might be portable, and not need to be duplicated per version
+ # also might no longer be necessary to patch deps or libs, just flags
+ epatch "${FILESDIR}/${PN}-2.5.1.26351.0-deps-flags.patch"
+
+ use client && epatch "${FILESDIR}/${PN}-2.5.1.26351.0-client.patch"
+ if ! use superserver ; then
+ epatch "${FILESDIR}/${PN}-2.5.1.26351.0-superclassic.patch"
+ fi
+
+ # Rename references to isql to fbsql
+ # sed vs patch for portability and addtional location changes
+ check_sed "$(sed -i -e 's:"isql :"fbsql :w /dev/stdout' \
+ src/isql/isql.epp | wc -l)" "1" "src/isql/isql.epp" # 1 line
+ check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \
+ src/msgs/history2.sql | wc -l)" "4" "src/msgs/history2.sql" # 4 lines
+ check_sed "$(sed -i -e 's:--- ISQL:--- FBSQL:w /dev/stdout' \
+ -e 's:isql :fbsql :w /dev/stdout' \
+ -e 's:ISQL :FBSQL :w /dev/stdout' \
+ src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines
+
+ find "${S}" -name \*.sh -print0 | xargs -0 chmod +x
+ rm -rf "${S}"/extern/{btyacc,editline,icu}
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -fprefetch-loop-arrays
+ filter-mfpmath sse
+
+ econf --prefix=/usr/$(get_libdir)/firebird \
+ $(use_enable superserver superserver) \
+ $(use_enable debug) \
+ --with-editline \
+ --with-system-editline \
+ --with-system-icu \
+ --with-fbbin=/usr/bin \
+ --with-fbsbin=/usr/sbin \
+ --with-fbconf=/etc/${PN} \
+ --with-fblib=/usr/$(get_libdir) \
+ --with-fbinclude=/usr/include \
+ --with-fbdoc=/usr/share/doc/${P} \
+ --with-fbudf=/usr/$(get_libdir)/${PN}/UDF \
+ --with-fbsample=/usr/share/doc/${P}/examples \
+ --with-fbsample-db=/usr/share/doc/${P}/examples/db \
+ --with-fbhelp=/usr/$(get_libdir)/${PN}/help \
+ --with-fbintl=/usr/$(get_libdir)/${PN}/intl \
+ --with-fbmisc=/usr/share/${PN} \
+ --with-fbsecure-db=/etc/${PN} \
+ --with-fbmsg=/usr/$(get_libdir)/${PN} \
+ --with-fblog=/var/log/${PN}/ \
+ --with-fbglock=/var/run/${PN} \
+ --with-fbplugins=/usr/$(get_libdir)/${PN}/plugins \
+ --with-gnu-ld \
+ ${myconf}
+}
+
+src_compile() {
+ MAKEOPTS="${MAKEOPTS/-j*/-j1} ${MAKEOPTS/-j/CPU=}"
+ emake
+}
+
+src_install() {
+ cd "${S}/gen/${PN}"
+
+ if use doc; then
+ dodoc "${S}"/doc/*.pdf
+ find "${WORKDIR}"/manuals -type f -iname "*.pdf" -exec dodoc '{}' + || die
+ fi
+
+ insinto /usr/include
+ doins include/*
+
+ rm lib/libfbstatic.a
+
+ insinto /usr/$(get_libdir)
+ dolib.so lib/*.so*
+
+ # links for backwards compatibility
+ dosym libfbclient.so /usr/$(get_libdir)/libgds.so
+ dosym libfbclient.so /usr/$(get_libdir)/libgds.so.0
+ dosym libfbclient.so /usr/$(get_libdir)/libfbclient.so.1
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins *.msg
+
+ use client && return
+
+ einfo "Renaming isql -> fbsql"
+ mv bin/isql bin/fbsql
+
+ local bins="fbsql fbsvcmgr fbtracemgr gbak gdef gfix gpre gsec gstat nbackup qli"
+ for bin in ${bins[@]}; do
+ dobin bin/${bin}
+ done
+
+ dosbin bin/fb_lock_print
+ # SuperServer
+ if use superserver ; then
+ dosbin bin/{fbguard,fbserver}
+ # ClassicServer
+ elif use xinetd ; then
+ dosbin bin/fb_inet_server
+ # SuperClassic
+ else
+ dosbin bin/{fbguard,fb_smp_server}
+
+ #Temp should not be necessary, need to patch/fix
+ dosym "${D}"/usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so
+ fi
+
+ exeinto /usr/bin
+ doexe ${S}/gen/firebird/bin/fb_config
+
+ exeinto /usr/bin/${PN}
+ exeopts -m0755
+ doexe bin/{changeRunUser,restoreRootRunUser,changeDBAPassword}.sh
+
+ insinto /usr/$(get_libdir)/${PN}/help
+ doins help/help.fdb
+
+ exeinto /usr/$(get_libdir)/firebird/intl
+ dolib.so intl/libfbintl.so
+ dosym "${D}"/usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl
+ dosym "${D}"/etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf
+
+ exeinto /usr/$(get_libdir)/${PN}/plugins
+ dolib.so plugins/libfbtrace.so
+ dosym "${D}"/usr/$(get_libdir)/libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so
+
+ exeinto /usr/$(get_libdir)/${PN}/UDF
+ doexe UDF/*.so
+
+ insinto /usr/share/${PN}/upgrade
+ doins "${S}"/src/misc/upgrade/v2/*
+
+ insinto /etc/${PN}
+ insopts -m0644 -o firebird -g firebird
+ doins ../install/misc/*.conf
+ insopts -m0660 -o firebird -g firebird
+ doins security2.fdb
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ else
+ newinitd "${FILESDIR}/${PN}.init.d.2.5" ${PN}
+ newconfd "${FILESDIR}/${PN}.conf.d.2.5" ${PN}
+ fperms 640 /etc/conf.d/${PN}
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ diropts -m 755 -o firebird -g firebird
+ dodir /var/log/${PN}
+ dodir /var/run/${PN}
+ keepdir /var/log/${PN}
+ keepdir /var/run/${PN}
+
+ use examples && docinto examples
+}
+
+pkg_postinst() {
+ use client && return
+
+ # Hack to fix ownership/perms
+ chown -fR firebird:firebird "${ROOT}/etc/${PN}" "${ROOT}/usr/$(get_libdir)/${PN}"
+ chmod 750 "${ROOT}/etc/${PN}"
+
+ elog
+ elog "Firebird is no longer installed in /opt. Binaries are in"
+ elog "/usr/bin. The core, udfs, etc are in /usr/lib/firebird. Logs"
+ elog "are in /var/log/firebird, and lock files in /var/run/firebird"
+ elog "The command line tool isql has been renamed to fbsql."
+ elog "Please report any problems or issues to bugs.gentoo.org."
+ elog
+}
+
+pkg_config() {
+ use client && return
+
+ # if found /etc/security.gdb from previous install, backup, and restore as
+ # /etc/security2.fdb
+ if [ -f "${ROOT}/etc/firebird/security.gdb" ] ; then
+ # if we have scurity2.fdb already, back it 1st
+ if [ -f "${ROOT}/etc/firebird/security2.fdb" ] ; then
+ cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old"
+ fi
+ gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk"
+ gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb"
+ mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old"
+ rm "${ROOT}/etc/firebird/security.gbk"
+
+ # make sure they are readable only to firebird
+ chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}"
+ chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}"
+
+ einfo
+ einfo "Converted old security.gdb to security2.fdb, security.gdb has been "
+ einfo "renamed to security.gdb.old. if you had previous security2.fdb, "
+ einfo "it's backed to security2.fdb.old (all under ${ROOT}/etc/firebird)."
+ einfo
+ fi
+
+ # we need to enable local access to the server
+ if [ ! -f "${ROOT}/etc/hosts.equiv" ] ; then
+ touch "${ROOT}/etc/hosts.equiv"
+ chown root:0 "${ROOT}/etc/hosts.equiv"
+ chmod u=rw,go=r "${ROOT}/etc/hosts.equiv"
+ fi
+
+ # add 'localhost.localdomain' to the hosts.equiv file...
+ if [ grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
+ echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv"
+ einfo "Added localhost.localdomain to ${ROOT}/etc/hosts.equiv"
+ fi
+
+ # add 'localhost' to the hosts.equiv file...
+ if [ grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
+ echo "localhost" >> "${ROOT}/etc/hosts.equiv"
+ einfo "Added localhost to ${ROOT}/etc/hosts.equiv"
+ fi
+
+ HS_NAME=`hostname`
+ if [ grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
+ echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv"
+ einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv"
+ fi
+
+ einfo "If you're using UDFs, please remember to move them"
+ einfo "to /usr/lib/firebird/UDF"
+}