diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2017-05-14 01:45:26 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2017-05-14 01:45:40 +0200 |
commit | 2ee359baae6e5853d90f0ae511bdd9cb48d5aac2 (patch) | |
tree | fafd6e53b5990e5b889574c5511b44919de7a8a4 /dev-db | |
parent | app-emulation/spice: ebuild maintenance v.2 (diff) | |
download | gentoo-2ee359baae6e5853d90f0ae511bdd9cb48d5aac2.tar.gz gentoo-2ee359baae6e5853d90f0ae511bdd9cb48d5aac2.tar.bz2 gentoo-2ee359baae6e5853d90f0ae511bdd9cb48d5aac2.zip |
dev-db/firebird: Work in progress. Build fails so far.
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/firebird/Manifest | 1 | ||||
-rw-r--r-- | dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch | 51 | ||||
-rw-r--r-- | dev-db/firebird/firebird-3.0.2.32703.0.ebuild | 276 |
3 files changed, 328 insertions, 0 deletions
diff --git a/dev-db/firebird/Manifest b/dev-db/firebird/Manifest index feadd1192eff..b7e1145f12f5 100644 --- a/dev-db/firebird/Manifest +++ b/dev-db/firebird/Manifest @@ -1,2 +1,3 @@ DIST Firebird-2.5.7.27050-0.tar.bz2 13402538 SHA256 0a3b68c94e9d4eab0e56c98312f0955a0ec69ec4e9e801e0a81be758f032171a SHA512 793d47a8c8395dfb6f8417253950034dcd61b6b8337e654510d2d133396e5d1fccf615fc614bbe3129a64a101e956cb8b54d7460b06e72b245518f1b5af99327 WHIRLPOOL d162deb478fcee737aa973c3d87498a8fc418cf8facabf72a4d4cbc00db213ba0f6d98a29dc9bfd00a545e55cdb702770a3e10b7db0d0211b4cb60286c63105a +DIST Firebird-3.0.2.32703-0.tar.bz2 9536416 SHA256 1eb4ca57538b03cf1f7504f19d10c86f5b0238604d72df7fbd7f24927a66ad2d SHA512 5950d1689c77fbcda22f1bd8015321d887dec3c7ef39665428a8bda9122838e767b168442ce7d8fb3b9b80cbd1206725b0f54bd215c5c9eb1d322b546cb042e6 WHIRLPOOL 2cba1a0d395147b730d7d97e7226edcaf3b90f816a18cb9fe46fb6914771bf74d1339c956b91b8a7b5da25c354dc33899a430ae53775b941720c203010fc52dd DIST ib_b60_doc.zip 10530848 SHA256 8c0158678b2a2fe3ba3abfea1f5487fc5af2644d66837ab8a558f5ad6b6cfd6d SHA512 59eccf1d6b1f0410eddbc5967fd77a3d00e09749640b3f81e2f8b624f5a45461dffad4af5ec61488e941fb3d3af266fe86c0b56e6b7e023239537cb6557a145a WHIRLPOOL 5c3e17eec64d835bac8832a51acefe04c3a5ff818d1d1e69a032bae1a730fd73996a2be073d2e22bcd4ad4ee1ba2247da8271cd3a03c0326acf46eef1073033f diff --git a/dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch b/dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch new file mode 100644 index 000000000000..6fdd657223d4 --- /dev/null +++ b/dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch @@ -0,0 +1,51 @@ +diff -ruN Firebird-3.0.2.32703-0.orig/builds/posix/Makefile.in Firebird-3.0.2.32703-0/builds/posix/Makefile.in +--- Firebird-3.0.2.32703-0.orig/builds/posix/Makefile.in 2017-03-21 10:11:35.000000000 +0100 ++++ Firebird-3.0.2.32703-0/builds/posix/Makefile.in 2017-05-14 01:32:34.032241679 +0200 +@@ -123,7 +123,6 @@ + # + + extern: +- $(MAKE) -C $(ROOT)/extern/btyacc + $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop + + ifeq ($(TOMBUILD_FLG),Y) +@@ -648,7 +647,7 @@ + # various cleaning + # + .PHONY: clean clean_objects clean_dependancies clean_extern_objects clean_build \ +- clean_gpre_gen clean_icu clean_dbs clean_examples clean_makefiles \ ++ clean_gpre_gen clean_dbs clean_examples clean_makefiles \ + clean_editline clean_all + + +@@ -669,8 +668,6 @@ + $(RM) $(ROOT)/libtool + $(RM_R) $(ROOT)/autom4te.cache + -$(MAKE) -C $(ROOT)/extern/editline distclean +-# -$(MAKE) -C $(ROOT)/extern/icu/source distclean +- -$(MAKE) -C $(ROOT)/extern/btyacc distclean + + clean_dbs: + $(RM) *.fdb *.FDB msg.timestamp +@@ -687,9 +684,6 @@ + clean_editline: + -$(MAKE) -C $(ROOT)/extern/editline clean + +-#clean_icu: +-# -$(MAKE) -C $(ROOT)/extern/icu/source clean +- + clean_tommath: + -$(MAKE) -C $(ROOT)/extern/libtommath clean + +diff -ruN Firebird-3.0.2.32703-0.orig/builds/posix/make.defaults Firebird-3.0.2.32703-0/builds/posix/make.defaults +--- Firebird-3.0.2.32703-0.orig/builds/posix/make.defaults 2017-03-21 10:11:35.000000000 +0100 ++++ Firebird-3.0.2.32703-0/builds/posix/make.defaults 2017-05-14 01:29:54.590235045 +0200 +@@ -155,7 +155,7 @@ + AR= ar @AR_OPTIONS@ + LN= @LN_S@ + RANLIB= @RANLIB@ +-BTYACC=$(ROOT)/extern/btyacc/btyacc ++BTYACC=/usr/bin/btyacc + CLOOP=$(GEN_ROOT)/$(TARGET)/cloop/release/bin/cloop + + CC = @CC@ diff --git a/dev-db/firebird/firebird-3.0.2.32703.0.ebuild b/dev-db/firebird/firebird-3.0.2.32703.0.ebuild new file mode 100644 index 000000000000..345fb30b3155 --- /dev/null +++ b/dev-db/firebird/firebird-3.0.2.32703.0.ebuild @@ -0,0 +1,276 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools flag-o-matic user versionator + +MY_P=${PN/f/F}-$(replace_version_separator 4 -) + +DESCRIPTION="Relational database offering many ANSI SQL:2003 and some SQL:2008 features" +HOMEPAGE="https://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="" + +IUSE="debug doc examples +superserver xinetd" +REQUIRED_USE="?? ( superserver xinetd )" + +CDEPEND=" + dev-libs/icu:= + dev-libs/libedit +" +DEPEND="${CDEPEND} + >=dev-util/btyacc-3.0-r2 + doc? ( app-arch/unzip ) +" +RDEPEND="${CDEPEND} + xinetd? ( virtual/inetd ) + !sys-cluster/ganglia +" + +RESTRICT="userpriv" + +S="${WORKDIR}/${MY_P}" + +# this is work in progress and likely does not build yet +PATCHES=( + "${FILESDIR}/${P}-unbundle.patch" +) + +pkg_setup() { + enewgroup firebird 450 + enewuser firebird 450 /bin/sh /usr/$(get_libdir)/firebird firebird +} + +check_sed() { + MSG="sed of $3, required $2 line(s) modified $1" + einfo "${MSG}" + [[ $1 -ge $2 ]] || die "${MSG}" +} + +src_unpack() { + unpack "${MY_P}.tar.bz2" + if use doc; then + # Unpack docs + mkdir "manuals" || die + cd "manuals" || die + unpack ib_b60_doc.zip + fi +} + +src_prepare() { + default + + # 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 -exec chmod +x {} + || die + rm -r "${S}"/extern/{btyacc,editline,icu} || die + + eautoreconf +} + +src_configure() { + filter-flags -fprefetch-loop-arrays + filter-mfpmath sse + + econf \ + --prefix=/usr/$(get_libdir)/firebird \ + $(use_enable 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 "gen/${PN}" || die + + if use doc; then + dodoc "${S}"/doc/*.pdf + find "${WORKDIR}"/manuals -type f -iname "*.pdf" -exec dodoc '{}' + || die + fi + + doheader include/* + + rm lib/libfbstatic.a || die "failed to remove 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 + + einfo "Renaming isql -> fbsql" + mv bin/isql bin/fbsql || die "failed to rename isql -> 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 ../../libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so + fi + + 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 ../../libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl + dosym libfbintl.so /usr/$(get_libdir)/libfbintl.so.1 + dosym /etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf + + exeinto /usr/$(get_libdir)/${PN}/plugins + dolib.so plugins/libfbtrace.so + dosym ../../libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so + dosym libfbtrace.so /usr/$(get_libdir)/libfbtrace.so.0 + + exeinto /usr/$(get_libdir)/${PN}/UDF + doexe UDF/*.so + + insinto /usr/share/${PN}/upgrade + doins -r "${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} + fperms 0644 /etc/logrotate.d/${PN} + + diropts -m 755 -o firebird -g firebird + dodir /var/log/${PN} + keepdir /var/log/${PN} + + use examples && docinto examples +} + +pkg_postinst() { + # Hack to fix ownership/perms + chown -fR firebird:firebird "${ROOT}/etc/${PN}" "${ROOT}/usr/$(get_libdir)/${PN}" + chmod 750 "${ROOT}/etc/${PN}" +} + +pkg_config() { + # 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" || die + fi + gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk" || die + gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb" || die + mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old" || die + rm "${ROOT}/etc/firebird/security.gbk" || die + + # make sure they are readable only to firebird + chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}" || die + chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" || die + + echo + 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)." + echo + fi + + # we need to enable local access to the server + if [[ ! -f "${ROOT}/etc/hosts.equiv" ]] ; then + touch "${ROOT}/etc/hosts.equiv" || die + chown root:0 "${ROOT}/etc/hosts.equiv" || die + chmod u=rw,go=r "${ROOT}/etc/hosts.equiv" || die + fi + + # add 'localhost.localdomain' to the hosts.equiv file... + if grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" ; then + echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" || die + 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" ; then + echo "localhost" >> "${ROOT}/etc/hosts.equiv" || die + einfo "Added localhost to ${ROOT}/etc/hosts.equiv" + fi + + HS_NAME=`hostname` + if grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" ; then + echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" || die + einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv" + fi + + einfo "If you're using UDFs, please remember to move them" + einfo "to /usr/$(get_libdir)/firebird/UDF" +} |