summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin McCarthy <signals@gentoo.org>2011-02-22 16:51:41 +0000
committerKevin McCarthy <signals@gentoo.org>2011-02-22 16:51:41 +0000
commit6c6ee8f2f9fae65cb3ee844fb402df235260c91a (patch)
tree6d6cd1c2663682fa731ca039b1a2f0ee2efb7fee /dev-libs/libbsd
parentRemove old versions. (diff)
downloadhistorical-6c6ee8f2f9fae65cb3ee844fb402df235260c91a.tar.gz
historical-6c6ee8f2f9fae65cb3ee844fb402df235260c91a.tar.bz2
historical-6c6ee8f2f9fae65cb3ee844fb402df235260c91a.zip
New ebuild for libbsd
Package-Manager: portage-2.2.0_alpha24/cvs/Linux x86_64
Diffstat (limited to 'dev-libs/libbsd')
-rw-r--r--dev-libs/libbsd/ChangeLog11
-rw-r--r--dev-libs/libbsd/Manifest6
-rw-r--r--dev-libs/libbsd/files/libbsd-0.2.0-arc4random-prototypes.patch15
-rw-r--r--dev-libs/libbsd/files/libbsd-0.2.0-move-nlist.patch16
-rw-r--r--dev-libs/libbsd/libbsd-0.2.0.ebuild79
-rw-r--r--dev-libs/libbsd/metadata.xml9
6 files changed, 136 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/Manifest b/dev-libs/libbsd/Manifest
new file mode 100644
index 000000000000..8e61438d7827
--- /dev/null
+++ b/dev-libs/libbsd/Manifest
@@ -0,0 +1,6 @@
+AUX libbsd-0.2.0-arc4random-prototypes.patch 441 RMD160 2b82340b4b97615e97c58298b488b79353d31af5 SHA1 7102fa9bebb57e9b087c5853dc300004e80e0edc SHA256 0e7010d1221f920c3fb7e602e290721d3ef540b8ba3da70d57085f303374da72
+AUX libbsd-0.2.0-move-nlist.patch 300 RMD160 294d9f532b6ba26ffb8556f0726b7cc7f6bf3f0b SHA1 717f58375dd03d2129c236974950cd040d2f23d6 SHA256 66b08838c41c7d008ca8d8f4c1e6964108203f37e013b35bfa147363e8ab1696
+DIST libbsd-0.2.0.tar.gz 81824 RMD160 e0038f00313ab07e7185ce180bcd3e624b0c7d97 SHA1 048f8522d15df9f160c17e43a45485bcd617bb0d SHA256 5c7920d4d3d0e253f4698b42b7b67130295d59df61c5a0e04e2d1787d543f0f1
+EBUILD libbsd-0.2.0.ebuild 2287 RMD160 65f4eba73378ab8c6049f5970caeeb6f9c5a4e13 SHA1 7404ff3534576eb9772dd7ea87fb71dad219328e SHA256 778409adb5a8ebe6a5939050d1888bdb5a478a7938d02531bb7b4ddfb6ced2e6
+MISC ChangeLog 473 RMD160 bc4b84a4c7d75c3a992371d4479a08b134b7a67f SHA1 9499b8439a677734fbcf6d597e08e0e6722ab9c7 SHA256 935ee93c7dbdd4db3f3679958b893553cdd910e33179f11294fde506827db9fa
+MISC metadata.xml 263 RMD160 571f40cc98b200fae41e8dc6c65948fc49e9fa3c SHA1 dea743a69ea07681b30932b9e2df4279473e4503 SHA256 d2a2e100ddbc82cce41fdeba9fc01b5749354898a7db47713831c5d265a84b78
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>