summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild')
-rw-r--r--sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild111
1 files changed, 111 insertions, 0 deletions
diff --git a/sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild b/sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild
new file mode 100644
index 000000000000..69d8766567f6
--- /dev/null
+++ b/sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator multilib autotools
+
+MY_PN="${PN/-/_}"
+MY_PV="${PV/_}"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Allows important system files to be stored in a fast database file rather than plain text"
+HOMEPAGE="http://sources.redhat.com/glibc/"
+SRC_URI="ftp://sources.redhat.com/pub/glibc/old-releases/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-external.patch.bz2
+ mirror://gentoo/${MY_P}-dbupgrade.patch.bz2
+ mirror://gentoo/${MY_P}-dbopen.patch.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="nls"
+
+# awk and make ARE needed at runtime!
+# and this didn't compile on BSD libc either
+RDEPEND=">=sys-libs/db-4
+ sys-devel/make
+ >=sys-libs/glibc-2.3
+ !>=sys-libs/glibc-2.15"
+# We really do need gettext to compile always :-(
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+S="${WORKDIR}/${MY_P}"
+
+db_getver() {
+ local DBPKG
+ DBPKG="$(best_version '>=sys-libs/db-4')"
+ echo "${DBPKG//sys-libs\/db-}"
+}
+
+db_getversym() {
+ local DBVER DBSYMSUFFIX
+ [ -n "${1}" ] && DBVER="${1}" || DBVER="$(db_getver)"
+ DBVER=($(get_version_components "${DBVER}"))
+ if has_version '>=sys-libs/db-4.3'; then
+ DBSYMSUFFIX=""
+ else
+ let DBSYMSUFFIX=(${DBVER[0]}*1000)+${DBVER[1]}
+ DBSYMSUFFIX=_${DBSYMSUFFIX}
+ fi
+ echo "${DBSYMSUFFIX}"
+}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${DISTDIR}/${MY_P}-external.patch.bz2
+ EPATCH_OPTS="-p0 -d ${S}" epatch ${DISTDIR}/${MY_P}-dbupgrade.patch.bz2
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${DISTDIR}/${MY_P}-dbopen.patch.bz2
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${P}-root-upgrade-only.patch
+
+ # make sure we use the correct version of DB
+ cd "${S}"
+ DB_PV="$(db_getver)"
+ DB_SYM="$(db_getversym ${DB_PV})"
+ DB_PV_MAJORMINOR="$(get_version_component_range 1-2 ${DB_PV})"
+ sed -i configure.in \
+ -e "s!db.h!db${DB_PV_MAJORMINOR}/db.h!g" \
+ -e "s!db, db_version!db-${DB_PV_MAJORMINOR}, db_version${DB_SYM}!g"
+
+ # fix ancient broken-ness
+ for f in po/Makefile.in.in ./intl/Makefile.in; do
+ egrep -q '^mkinstalldirs = .*case.*esac' ${f} && \
+ sed -i ${f} \
+ -e '/^mkinstalldirs = /s,\(mkinstalldirs =\).*,\1 $(top_builddir)/./mkinstalldirs,'
+ done
+
+ # Fixes thanks to Flameeyes
+ # missing
+ cp /usr/share/gettext/config.rpath .
+ sed -i -e '/makedb_LDADD/i makedb_CFLAGS=$(AM_CFLAGS)' src/Makefile.am
+ sed -i -e '/AC_PROG_CC/a AC_PROG_CC_C_O' configure.in
+ eautoreconf
+
+ # This is an evil target and we don't like it
+ sed -i -e '/^install-data-am:.*install-data-local/s,install-data-local,,g' "${S}"/src/Makefile.in
+}
+
+src_compile() {
+ econf -C --libdir=/$(get_libdir) `use_enable nls` || die
+ emake || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" slibdir="/$(get_libdir)" install || \
+ die "failed emake install"
+
+ into /usr
+ insinto /usr/share/${PN}
+ doins db-Makefile
+
+ dosbin "${FILESDIR}"/remake-all-db
+
+ dodoc AUTHORS COPYING* ChangeLog INSTALL NEWS README THANKS
+
+ dodir /usr/$(get_libdir)/
+ mv "${D}"/$(get_libdir)/*.la "${D}"/usr/$(get_libdir)/ || \
+ die "failed to set up .la"
+
+ insinto /etc/sandbox.d/
+ newins "${FILESDIR}"/sandbox.d_50nss-db 50nss-db
+}