diff options
author | Kevin McCarthy <signals@gentoo.org> | 2011-02-22 16:51:41 +0000 |
---|---|---|
committer | Kevin McCarthy <signals@gentoo.org> | 2011-02-22 16:51:41 +0000 |
commit | 21732b170e9570ebf9e9901f53dbefb8de343953 (patch) | |
tree | e6de1d4297c279ea427b2152339e83c82130855e /dev-libs | |
parent | Remove old versions. (diff) | |
download | gentoo-2-21732b170e9570ebf9e9901f53dbefb8de343953.tar.gz gentoo-2-21732b170e9570ebf9e9901f53dbefb8de343953.tar.bz2 gentoo-2-21732b170e9570ebf9e9901f53dbefb8de343953.zip |
New ebuild for libbsd
(Portage version: 2.2.0_alpha24/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/libbsd/ChangeLog | 11 | ||||
-rw-r--r-- | dev-libs/libbsd/files/libbsd-0.2.0-arc4random-prototypes.patch | 15 | ||||
-rw-r--r-- | dev-libs/libbsd/files/libbsd-0.2.0-move-nlist.patch | 16 | ||||
-rw-r--r-- | dev-libs/libbsd/libbsd-0.2.0.ebuild | 79 | ||||
-rw-r--r-- | dev-libs/libbsd/metadata.xml | 9 |
5 files changed, 130 insertions, 0 deletions
diff --git a/dev-libs/libbsd/ChangeLog b/dev-libs/libbsd/ChangeLog new file mode 100644 index 000000000000..b76971bbe07b --- /dev/null +++ b/dev-libs/libbsd/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-libs/libbsd +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libbsd/ChangeLog,v 1.1 2011/02/22 16:51:41 signals Exp $ + +*libbsd-0.2.0 (22 Feb 2011) + + 22 Feb 2011; signals <signals@gentoo.org> +libbsd-0.2.0.ebuild, + +files/libbsd-0.2.0-arc4random-prototypes.patch, + +files/libbsd-0.2.0-move-nlist.patch, +metadata.xml: + New ebuild for libbsd. Ebuild by Kevin McCarthy. See bug #354271 + diff --git a/dev-libs/libbsd/files/libbsd-0.2.0-arc4random-prototypes.patch b/dev-libs/libbsd/files/libbsd-0.2.0-arc4random-prototypes.patch new file mode 100644 index 000000000000..7587cf7efd8a --- /dev/null +++ b/dev-libs/libbsd/files/libbsd-0.2.0-arc4random-prototypes.patch @@ -0,0 +1,15 @@ +Add missing prototypes for arc4random_buf and arc4random_uniform + +Patch by Kevin McCarthy <signals@gentoo.org> + +--- include/bsd/stdlib.h ++++ include/bsd/stdlib.h +@@ -45,6 +45,8 @@ + u_int32_t arc4random(); + void arc4random_stir(); + void arc4random_addrandom(u_char *dat, int datlen); ++void arc4random_buf(void *_buf, size_t n); ++u_int32_t arc4random_uniform(u_int32_t upper_bound); + + int dehumanize_number(const char *str, int64_t *size); + diff --git a/dev-libs/libbsd/files/libbsd-0.2.0-move-nlist.patch b/dev-libs/libbsd/files/libbsd-0.2.0-move-nlist.patch new file mode 100644 index 000000000000..226e66d144fd --- /dev/null +++ b/dev-libs/libbsd/files/libbsd-0.2.0-move-nlist.patch @@ -0,0 +1,16 @@ +Update Makefile to use bsd/nlist.h instead of nlist.h so it won't +conflict with dev-libs/elfutils + +Patch by Kevin McCarthy <signals@gentoo.org> + +--- Makefile ++++ Makefile +@@ -65,7 +65,7 @@ + bsd/stdlib.h \ + bsd/readpassphrase.h \ + bsd/unistd.h \ +- nlist.h \ ++ bsd/nlist.h \ + vis.h \ + libutil.h + diff --git a/dev-libs/libbsd/libbsd-0.2.0.ebuild b/dev-libs/libbsd/libbsd-0.2.0.ebuild new file mode 100644 index 000000000000..bdd7014d66da --- /dev/null +++ b/dev-libs/libbsd/libbsd-0.2.0.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libbsd/libbsd-0.2.0.ebuild,v 1.1 2011/02/22 16:51:41 signals Exp $ + +EAPI=4 +inherit eutils multilib toolchain-funcs + +DESCRIPTION="A BSD compatibility library" +HOMEPAGE="http://libbsd.freedesktop.org/wiki/" +SRC_URI="http://libbsd.freedesktop.org/releases/${P}.tar.gz" + +LICENSE="BSD BSD-2 BSD-4 ISC" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +pkg_setup() { + mylibbsdconf=( + libdir=/usr/$(get_libdir) + usrlibdir=/usr/$(get_libdir) + pkgconfigdir=/usr/$(get_libdir)/pkgconfig + ) + if ! has_version "dev-libs/libbsd"; then + if [[ -e ${ROOT}/usr/$(get_libdir)/libbsd.a ]]; then + eerror + eerror "Sorry, you will need to rebuild sys-libs/glibc before" + eerror "installing dev-libs/libbsd. (emerge -1 sys-libs/glibc)" + eerror + die "Unable to install until glibc rebuilt." + fi + fi +} + +src_prepare() { + mv include/nlist.h include/bsd/nlist.h + epatch "${FILESDIR}"/${P}-arc4random-prototypes.patch \ + "${FILESDIR}"/${P}-move-nlist.patch + sed -i \ + -e 's/gcc /$(CC) ${LDFLAGS} /' \ + -e 's/^ ar / $(AR) /' \ + Makefile || die "Fix Makefile" + # Fix header paths in manpages. Has to be done in steps because + # not every reference in every man page is wrong. + sed -i \ + -e 's^\.In stdio.h^.In bsd/stdio.h^' \ + src/fgetln.3 \ + src/fmtcheck.3 || die "Fix stdio.h man pages" + sed -i \ + -e 's^\.In stdlib.h^.In bsd/stdlib.h^' \ + src/humanize_number.3 \ + src/strtonum.3 \ + src/arc4random.3 || die "Fix stdlib.h man pages" + sed -i \ + -e 's^\.In unistd.h^.In bsd/unistd.h^' \ + src/setmode.3 || die "Fix unistd.h man pages" + sed -i \ + -e 's^\.In string.h^.In bsd/string.h^' \ + src/strlcpy.3 \ + src/strmode.3 || die "Fix string.h man pages" + sed -i \ + -e 's^\.Fd #include <mdX.h>^.Fd #include <bsd/mdX.h>^' \ + src/mdX.3 || die "Fix md5.h man pages" + sed -i \ + -e 's^\.Fd #include <readpassphrase.h>^.Fd #include <bsd/readpassphrase.h>^' \ + src/readpassphrase.3 || die "Fix readpassphrase man page" + sed -i \ + -e 's^\.In nlist.h^.In bsd/nlist.h^' \ + src/nlist.3 +} + +src_compile() { + tc-export CC AR + emake ${mylibbsdconf[@]} +} + +src_install() { + emake DESTDIR="${D}" ${mylibbsdconf[@]} install + dodoc ChangeLog README TODO Versions +} diff --git a/dev-libs/libbsd/metadata.xml b/dev-libs/libbsd/metadata.xml new file mode 100644 index 000000000000..be589b3905ad --- /dev/null +++ b/dev-libs/libbsd/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>signals@gentoo.org</email> + <name>Kevin McCarthy</name> + </maintainer> +</pkgmetadata> |