diff options
author | William L. Thomson Jr <wlt@o-sinc.com> | 2015-10-04 17:44:18 -0400 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-10-05 18:53:56 +0200 |
commit | 9b00135f4696e539a3cbee711ac687f4f9ded105 (patch) | |
tree | ae8eea2e4a7c905a7140fd12dcad5afabafb7959 /dev-db | |
parent | sys-cluster/gearmand: Add -std=c++11 flag, bug #503538 (diff) | |
download | gentoo-9b00135f4696e539a3cbee711ac687f4f9ded105.tar.gz gentoo-9b00135f4696e539a3cbee711ac687f4f9ded105.tar.bz2 gentoo-9b00135f4696e539a3cbee711ac687f4f9ded105.zip |
dev-db/firebird: Various syntax improvements and fixes
With second batch of fixes by Michał Górny.
Pull-Request: https://github.com/gentoo/gentoo/pull/154
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/firebird/firebird-2.5.3.26780.0-r3.ebuild (renamed from dev-db/firebird/firebird-2.5.3.26780.0-r2.ebuild) | 83 |
1 files changed, 40 insertions, 43 deletions
diff --git a/dev-db/firebird/firebird-2.5.3.26780.0-r2.ebuild b/dev-db/firebird/firebird-2.5.3.26780.0-r3.ebuild index 281bae682ea2..6b824a6547c0 100644 --- a/dev-db/firebird/firebird-2.5.3.26780.0-r2.ebuild +++ b/dev-db/firebird/firebird-2.5.3.26780.0-r3.ebuild @@ -4,7 +4,7 @@ EAPI=5 -inherit flag-o-matic eutils autotools multilib user readme.gentoo versionator +inherit autotools eutils flag-o-matic multilib readme.gentoo user versionator MY_P=${PN/f/F}-$(replace_version_separator 4 -) #MY_P=${PN/f/F}-${PV/_rc/-ReleaseCandidate} @@ -13,18 +13,14 @@ DESCRIPTION="A relational database offering many ANSI SQL:2003 and some SQL:2008 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 )" + doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )" LICENSE="IDPL Interbase-1.0" SLOT="0" -KEYWORDS="~amd64 -ia64 ~x86" +KEYWORDS="~amd64 ~x86" -IUSE="doc client superserver xinetd examples debug" -REQUIRED_USE=" - client? ( !superserver ) - client? ( !xinetd ) - superserver? ( !xinetd ) -" +IUSE="debug doc client examples superserver xinetd" +REQUIRED_USE="^^ ( client superserver xinetd )" CDEPEND=" dev-libs/libedit @@ -45,10 +41,10 @@ S="${WORKDIR}/${MY_P}" pkg_setup() { enewgroup firebird 450 - enewuser firebird 450 /bin/bash /usr/$(get_libdir)/firebird firebird + enewuser firebird 450 /bin/sh /usr/$(get_libdir)/firebird firebird } -function check_sed() { +check_sed() { MSG="sed of $3, required $2 lines modified $1" einfo "${MSG}" [[ $1 -ge $2 ]] || die "${MSG}" @@ -58,7 +54,8 @@ src_unpack() { unpack "${MY_P}.tar.bz2" if use doc; then # Unpack docs - mkdir "${WORKDIR}/manuals" && cd "${WORKDIR}/manuals" || die + mkdir "manuals" || die + cd "manuals" || die unpack ib_b60_doc.zip fi } @@ -82,8 +79,8 @@ src_prepare() { -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 || die - rm -rf "${S}"/extern/{btyacc,editline,icu} || die + find "${S}" -name \*.sh -exec chmod +x {} + || die + rm -r "${S}"/extern/{btyacc,editline,icu} || die eautoreconf } @@ -94,7 +91,7 @@ src_configure() { econf \ --prefix=/usr/$(get_libdir)/firebird \ - $(use_enable superserver superserver) \ + $(use_enable superserver) \ $(use_enable debug) \ --with-editline \ --with-system-editline \ @@ -126,7 +123,7 @@ src_compile() { } src_install() { - cd "${S}/gen/${PN}" || die + cd "gen/${PN}" || die if use doc; then dodoc "${S}"/doc/*.pdf @@ -135,7 +132,7 @@ src_install() { doheader include/* - rm lib/libfbstatic.a + rm lib/libfbstatic.a || die "failed to remove libfbstatic.a" insinto /usr/$(get_libdir) dolib.so lib/*.so* @@ -151,10 +148,10 @@ src_install() { use client && return einfo "Renaming isql -> fbsql" - mv bin/isql bin/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 + for bin in ${bins}; do dobin bin/${bin} done @@ -170,7 +167,7 @@ src_install() { 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 + dosym usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so fi exeinto /usr/bin/${PN} @@ -182,18 +179,18 @@ src_install() { 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 + dosym usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl + dosym 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 + dosym 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/* + doins -r "${S}"/src/misc/upgrade/v2/* insinto /etc/${PN} insopts -m0644 -o firebird -g firebird @@ -236,19 +233,19 @@ 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 [[ -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" + 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" - 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" + 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.*}" - chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" + 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 " @@ -258,27 +255,27 @@ pkg_config() { 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" + 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" 2>/dev/null ] ; then - echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" + 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" 2>/dev/null ] ; then - echo "localhost" >> "${ROOT}/etc/hosts.equiv" + 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" 2>/dev/null ] ; then - echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" + 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 |