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-fs/dmraid
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-fs/dmraid')
-rw-r--r--sys-fs/dmraid/Manifest3
-rw-r--r--sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild72
-rw-r--r--sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild72
-rw-r--r--sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild99
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch24
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch13
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch11
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch11
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch110
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch13
-rw-r--r--sys-fs/dmraid/files/dmraid-destdir-fix.patch34
-rw-r--r--sys-fs/dmraid/metadata.xml16
12 files changed, 478 insertions, 0 deletions
diff --git a/sys-fs/dmraid/Manifest b/sys-fs/dmraid/Manifest
new file mode 100644
index 000000000000..a89aedad182c
--- /dev/null
+++ b/sys-fs/dmraid/Manifest
@@ -0,0 +1,3 @@
+DIST dmraid-1.0.0.rc14.tar.bz2 164234 SHA256 a777354d6d69a9b58d84966cc7b37bc3f5c89539f885ad25fd874ed1c388fbec SHA512 0804e1bf91f4707b8845affeb987e68c5a85d97119af27ddba2927c87735a59b86b1fec4f03ac0fbdcde89d779d77e21cab4e6936dd1a82b53a0d8b16eb59768 WHIRLPOOL c5612139d3f24be710fb8e6d51eb6ebe0847dcf804c0c0ba1a5f3142a2680de2b33bfae74bbf3cff704b0da5d9d273c432906f1b7fd46e1057b8ef53cc89ca1e
+DIST dmraid-1.0.0.rc15.tar.bz2 190475 SHA256 30847258b7f946ed908e79af4058bbf2c9a3791728b8231f7c490ca601566c05
+DIST dmraid-1.0.0.rc16-3.tar.bz2 232743 SHA256 93421bd169d71ff5e7d2db95b62b030bfa205a12010b6468dcdef80337d6fbd8 SHA512 7c45e5117adc52fc2094b1b2bad4f4c518a46317a2196611966d72085ba3587c4ac8d1080f9d934888c01788f2b2d3d621c6f0d3e2a023c0fb1f9f3fa7fc127e WHIRLPOOL 87915ea0013766da8a9722b437bfe146b4b2c7560a7814ac6caab92054ddc3b4b59ceb4d413609d5eaab92b5cee67886ade7924455f1dba19f1b8dabc25d3498
diff --git a/sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild b/sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild
new file mode 100644
index 000000000000..be58d8d95f43
--- /dev/null
+++ b/sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-info flag-o-matic eutils
+
+MY_PV=${PV/_/.}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Device-mapper RAID tool and library"
+HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"
+SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/old/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static selinux"
+
+DEPEND=">=sys-fs/lvm2-2.02.45
+ selinux? ( sys-libs/libselinux
+ sys-libs/libsepol )"
+S=${WORKDIR}/${PN}/${MY_PV}
+
+pkg_setup() {
+ if kernel_is lt 2 6 ; then
+ ewarn "You are using a kernel < 2.6"
+ ewarn "DMraid uses recently introduced Device-Mapper features."
+ ewarn "These might be unavailable in the kernel you are running now."
+ fi
+ if use static && use selinux ; then
+ eerror "ERROR - cannot compile static with libselinux / libsepol"
+ die "USE flag conflicts."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/dmraid-destdir-fix.patch
+}
+
+src_compile() {
+ econf \
+ $(use_enable static static_link) \
+ $(use_enable selinux libselinux) \
+ $(use_enable selinux libsepol) \
+ || die "econf failed"
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc CHANGELOG README TODO KNOWN_BUGS doc/*
+}
+
+pkg_postinst() {
+ einfo "For booting Gentoo from Device-Mapper RAID you can use Genkernel."
+ einfo " "
+ einfo "Genkernel will generate the kernel and the initrd with a statically "
+ einfo "linked dmraid binary (its own version which may not be the same as this version):"
+ einfo "emerge -av sys-kernel/genkernel"
+ einfo "genkernel --dmraid --udev all"
+ einfo " "
+ einfo "If you would rather use this version of DMRAID with Genkernel, copy the distfile"
+ einfo "from your distdir to '/usr/share/genkernel/pkg/' and update the following"
+ einfo "in /etc/genkernel.conf:"
+ einfo "DMRAID_VER=\"${MY_PV/_/.}\""
+ einfo "DMRAID_SRCTAR=\"\${GK_SHARE}/pkg/${A}\""
+ einfo " "
+ ewarn "DMRAID should be safe to use, but no warranties can be given"
+ einfo " "
+}
diff --git a/sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild b/sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild
new file mode 100644
index 000000000000..4f72bc28b0c9
--- /dev/null
+++ b/sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-info flag-o-matic eutils
+
+MY_PV=${PV/_/.}
+
+DESCRIPTION="Device-mapper RAID tool and library"
+HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"
+SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/${PN}-${MY_PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~x86"
+IUSE="static selinux"
+
+DEPEND=">=sys-fs/lvm2-2.02.45
+ selinux? ( sys-libs/libselinux
+ sys-libs/libsepol )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}/${MY_PV}
+
+pkg_setup() {
+ if kernel_is lt 2 6 ; then
+ ewarn "You are using a kernel < 2.6"
+ ewarn "DMraid uses recently introduced Device-Mapper features."
+ ewarn "These might be unavailable in the kernel you are running now."
+ fi
+ if use static && use selinux ; then
+ eerror "ERROR - cannot compile static with libselinux / libsepol"
+ die "USE flag conflicts."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-destdir-fix.patch"
+}
+
+src_compile() {
+ econf \
+ $(use_enable static static_link) \
+ $(use_enable selinux libselinux) \
+ $(use_enable selinux libsepol)
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc CHANGELOG README TODO KNOWN_BUGS doc/* || die "dodoc failed"
+}
+
+pkg_postinst() {
+ einfo "For booting Gentoo from Device-Mapper RAID you can use Genkernel."
+ einfo " "
+ einfo "Genkernel will generate the kernel and the initrd with a statically "
+ einfo "linked dmraid binary (its own version which may not be the same as this version):"
+ einfo " emerge -av sys-kernel/genkernel"
+ einfo " genkernel --dmraid --udev all"
+ einfo " "
+ einfo "If you would rather use this version of DMRAID with Genkernel, copy the distfile"
+ einfo "from your distdir to '/usr/share/genkernel/pkg/' and update the following"
+ einfo "in /etc/genkernel.conf:"
+ einfo " DMRAID_VER=\"${MY_PV/_/.}\""
+ einfo " DMRAID_SRCTAR=\"\${GK_SHARE}/pkg/${A}\""
+ einfo " "
+ ewarn "DMRAID should be safe to use, but no warranties can be given"
+ einfo " "
+}
diff --git a/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild b/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild
new file mode 100644
index 000000000000..48de3497b796
--- /dev/null
+++ b/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools linux-info flag-o-matic eutils
+
+MY_PV=${PV/_/.}-3
+
+DESCRIPTION="Device-mapper RAID tool and library"
+HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"
+SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/${PN}-${MY_PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ia64 ppc ppc64 sparc x86"
+IUSE="dietlibc intel_led klibc led mini static"
+REQUIRED_USE="klibc? ( !dietlibc )"
+
+RDEPEND=">=sys-fs/lvm2-2.02.45
+ klibc? ( dev-libs/klibc )
+ dietlibc? ( dev-libs/dietlibc )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( sys-fs/lvm2[static-libs] )"
+
+S=${WORKDIR}/${PN}/${MY_PV}/${PN}
+
+pkg_setup() {
+ if kernel_is lt 2 6 ; then
+ ewarn "You are using a kernel < 2.6"
+ ewarn "DMraid uses recently introduced Device-Mapper features."
+ ewarn "These might be unavailable in the kernel you are running now."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-undo-p-rename.patch \
+ "${FILESDIR}"/${P}-return-all-sets.patch \
+ "${FILESDIR}"/${P}-static-build-fixes.patch
+ # pkg_check_modules is not in aclocal.m4 by default, and eautoreconf doesnt add it
+ einfo "Appending pkg.m4 from system to aclocal.m4"
+ cat "${ROOT}"/usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 || die "Could not append pkg.m4"
+ epatch_user
+ eautoreconf
+
+ einfo "Creating prepatched source archive for use with Genkernel"
+ # archive the patched source for use with genkernel
+ cd "${WORKDIR}" || die
+ mkdir -p "tmp/${PN}" || die
+ cp -a "${PN}/${MY_PV}/${PN}" "tmp/${PN}" || die
+ mv "tmp/${PN}/${PN}" "tmp/${PN}/${MY_PV}" || die
+ cd tmp || die
+ tar -jcf ${PN}-${MY_PV}-prepatched.tar.bz2 ${PN} || die
+ mv ${PN}-${MY_PV}-prepatched.tar.bz2 .. || die
+}
+
+src_configure() {
+ econf --with-usrlibdir='${prefix}'/$(get_libdir) \
+ $(use_enable static static_link) \
+ $(use_enable mini) \
+ $(use_enable led) \
+ $(use_enable intel_led) \
+ $(use_enable klibc) \
+ $(use_enable dietlibc)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc CHANGELOG README TODO KNOWN_BUGS doc/*
+ insinto /usr/share/${PN}
+ doins "${WORKDIR}"/${PN}-${MY_PV}-prepatched.tar.bz2
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "For booting Gentoo from Device-Mapper RAID you can use a Genkernel initramfs."
+ elog
+ elog "Genkernel will generate the kernel and the initramfs with a statically "
+ elog "linked dmraid binary (its own version which may not be the same as this version):"
+ elog "\t emerge -av sys-kernel/genkernel"
+ elog "\t genkernel --dmraid all"
+ fi
+ if [[ ${REPLACING_VERSIONS} != ${PVR} ]]; then
+ elog
+ elog "A pre-patched distfile of this version of DMRAID has been installed at"
+ elog "/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2 , to support using it within a"
+ elog "Genkernel initramfs."
+ elog
+ fi
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "If you would rather use this version of DMRAID with Genkernel, update the following"
+ elog "in /etc/genkernel.conf:"
+ elog "\t DMRAID_VER=\"${MY_PV}\""
+ elog "\t DMRAID_SRCTAR=\"/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2\""
+ elog
+ fi
+}
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch
new file mode 100644
index 000000000000..1ce8834ebadd
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch
@@ -0,0 +1,24 @@
+--- ./lib/device/scsi.c.org 2009-06-25 15:22:26.605895909 -0700
++++ ./lib/device/scsi.c 2009-06-25 15:56:39.784749181 -0700
+@@ -110,7 +110,9 @@
+ }
+
+ ret = ret &&
+- (di->serial = dbg_strdup((char *) &response[p->start + 1]));
++ (di->serial = dbg_strdup(remove_white_space
++ (lc, (char *)&response[p->start + 1],
++ MAX_RESPONSE_LEN)));
+ }
+
+ dbg_free(response);
+--- ./lib/metadata/metadata.c.org 2009-06-25 17:32:19.856309659 -0700
++++ ./lib/metadata/metadata.c 2009-06-25 17:32:35.502920755 -0700
+@@ -839,7 +839,7 @@
+ */
+ if (T_GROUP(rs)) {
+ _discover_partitions(lc, &rs->sets);
+- return;
++ continue;
+ }
+
+ /*
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch
new file mode 100644
index 000000000000..6636b0563086
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch
@@ -0,0 +1,13 @@
+Author: Giuseppe Iuculano <giuseppe@iuculano.it>
+Description: Removed "p" from device name. A proper upgrade script is needed before using it.
+--- a/1.0.0.rc15/lib/format/partition/dos.c
++++ b/1.0.0.rc15/lib/format/partition/dos.c
+@@ -31,7 +31,7 @@ _name(struct lib_context *lc, struct rai
+ {
+ const char *base = get_basename(lc, rd->di->path);
+
+- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc),
++ return type ? snprintf(str, len, "%s%u", base,
+ partition) : snprintf(str, len, "%s", base);
+ }
+
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch
new file mode 100644
index 000000000000..cf3018863ffd
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch
@@ -0,0 +1,11 @@
+--- 1.0.0.rc16/make.tmpl.in 2010-08-16 10:22:32.000000000 -0400
++++ 1.0.0.rc16/make.tmpl.in 2010-08-16 10:42:49.000000000 -0400
+@@ -136,7 +136,7 @@
+
+ %.so: $(OBJECTS)
+ $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
+- -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event
++ $(LDFLAGS) -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event -ldl
+
+ $(LIB_STATIC): $(OBJECTS)
+ $(RM) $@
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch
new file mode 100644
index 000000000000..1e6c71322498
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch
@@ -0,0 +1,11 @@
+--- a/1.0.0.rc16/lib/metadata/metadata.c 2009-11-27 21:57:50.182129589 -0800
++++ b/1.0.0.rc16/lib/metadata/metadata.c 2009-11-27 21:57:58.950964293 -0800
+@@ -839,7 +839,7 @@
+ */
+ if (T_GROUP(rs)) {
+ _discover_partitions(lc, &rs->sets);
+- return;
++ continue;
+ }
+
+ /*
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch
new file mode 100644
index 000000000000..298811701e4e
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch
@@ -0,0 +1,110 @@
+--- tools/Makefile.in.old 2010-05-31 07:18:31.000000000 -0400
++++ tools/Makefile.in 2010-12-13 13:15:22.000000000 -0500
+@@ -60,17 +60,23 @@
+ ifeq ("@KLIBC@", "no")
+ ifeq ("@STATIC_LINK@", "no")
+ LDFLAGS += -rdynamic
++ MYLIBOBJ=$(top_builddir)/lib/libdmraid.so
+ else
+ LDFLAGS += -static
++ MYLIBOBJ=$(top_builddir)/lib/libdmraid.a
++ DMRAIDLIBS += \
++ $(DEVMAPPEREVENT_LIBS) \
++ $(DEVMAPPER_LIBS) \
++ $(DL_LIBS)
+ endif
+ endif
+
+ .PHONY: install_dmraid_tools
+
+-dmraid: $(OBJECTS) $(top_builddir)/lib/libdmraid.a
++dmraid: $(OBJECTS) $(MYLIBOBJ)
+ $(CC) -o $@ $(OBJECTS) $(LDFLAGS) -L$(top_builddir)/lib $(DMRAIDLIBS) $(LIBS)
+
+-dmevent_tool: $(OBJECTS2) $(top_builddir)/lib/libdmraid.a
++dmevent_tool: $(OBJECTS2) $(MYLIBOBJ)
+ $(CC) -o $@ $(OBJECTS2) $(INCLUDES) $(LDFLAGS) -L$(top_builddir)/lib \
+ $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
+
+--- lib/Makefile.in.old 2010-10-27 07:31:46.000000000 -0400
++++ lib/Makefile.in 2010-12-13 13:04:16.000000000 -0500
+@@ -60,11 +60,11 @@
+ USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
+ $(AWK) -f $(top_srcdir)/tools/relpath.awk)
+
+-TARGETS = $(LIB_STATIC)
++TARGETS = $(LIB_STATIC) $(LIB_SHARED) $(LIB_EVENTS_SHARED)
+
+ ifeq ("@KLIBC@", "no")
+ ifeq ("@STATIC_LINK@", "no")
+- TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
++ TARGETS = $(LIB_SHARED) $(LIB_EVENTS_SHARED)
+ endif
+ endif
+
+--- configure.in 2010-05-31 07:18:30.000000000 -0400
++++ configure.in.new 2010-12-07 13:30:40.000000000 -0500
+@@ -155,6 +155,15 @@
+ Default is dynamic linking]),
+ [STATIC_LINK=$enableval], [STATIC_LINK=no])
+
++if test "x$STATIC_LINK" != "xno"; then
++ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++ fi
++ PKG_CONFIG="${PKG_CONFIG} --static"
++ ac_cv_env_PKG_CONFIG_set=set
++fi
++PKG_PROG_PKG_CONFIG([0.2])
++
+ dnl Enables shared libdmraid
+ AC_ARG_ENABLE(shared_lib,
+ AC_HELP_STRING([--enable-shared_lib], [Use this to generate shared
+@@ -248,23 +257,31 @@
+ AC_HELP_STRING([--with-devmapper-prefix=PFX],
+ [Where is devmapper library installed]),
+ [DEVMAPPER_LIBS="-L$withval/lib"
+- DEVMAPPER_CFLAGS="-I$withval/include"],
++ DEVMAPPER_CFLAGS="-I$withval/include"
++ dmprefix=$withval],
+ [DEVMAPPER_LIBS=
+- DEVMAPPER_CFLAGS=])
+-save_LDFLAGS=$LDFLAGS
+-save_CPPFLAGS=$CPPFLAGS
+-LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
+-CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
+-AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
+- [DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
+- [AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
+-AC_CHECK_LIB(devmapper, dm_task_set_name,
+- [DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
+- [AC_MSG_ERROR([device-mapper library is missing])])
+-AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
+- [AC_MSG_ERROR([Missing headers device-mapper headers])])
+-CPPFLAGS=$save_CPPFLAGS
+-LDFLAGS=$save_LDFLAGS
++ DEVMAPPER_CFLAGS=
++ dmprefix=no])
++if test "x$dmprefix" = xno ; then
++ PKG_CHECK_MODULES([DEVMAPPER],[devmapper],
++ [PKG_CHECK_MODULES([DEVMAPPEREVENT],[devmapper-event])
++ ])
++else
++ save_LDFLAGS=$LDFLAGS
++ save_CPPFLAGS=$CPPFLAGS
++ LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
++ CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
++ AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
++ [DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
++ [AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
++ AC_CHECK_LIB(devmapper, dm_task_set_name,
++ [DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
++ [AC_MSG_ERROR([device-mapper library is missing])])
++ AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
++ [AC_MSG_ERROR([Missing headers device-mapper headers])])
++ CPPFLAGS=$save_CPPFLAGS
++ LDFLAGS=$save_LDFLAGS
++fi
+
+ VERSION=$srcdir/tools/VERSION
+ DMRAID_LIB_MAJOR=$(cut -d. -f1 $VERSION) \ No newline at end of file
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch
new file mode 100644
index 000000000000..6636b0563086
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch
@@ -0,0 +1,13 @@
+Author: Giuseppe Iuculano <giuseppe@iuculano.it>
+Description: Removed "p" from device name. A proper upgrade script is needed before using it.
+--- a/1.0.0.rc15/lib/format/partition/dos.c
++++ b/1.0.0.rc15/lib/format/partition/dos.c
+@@ -31,7 +31,7 @@ _name(struct lib_context *lc, struct rai
+ {
+ const char *base = get_basename(lc, rd->di->path);
+
+- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc),
++ return type ? snprintf(str, len, "%s%u", base,
+ partition) : snprintf(str, len, "%s", base);
+ }
+
diff --git a/sys-fs/dmraid/files/dmraid-destdir-fix.patch b/sys-fs/dmraid/files/dmraid-destdir-fix.patch
new file mode 100644
index 000000000000..07c6b442f9a6
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-destdir-fix.patch
@@ -0,0 +1,34 @@
+--- make.tmpl.in.old 2006-09-03 14:38:36.000000000 -0400
++++ make.tmpl.in 2006-09-03 14:37:43.000000000 -0400
+@@ -21,21 +21,21 @@
+ SOFLAG += @SOFLAG@
+
+ # Setup directory variables
+-prefix = $(DESTDIR)@prefix@
+-exec_prefix = $(DESTDIR)@exec_prefix@
+-bindir = @bindir@
++prefix = @prefix@
++exec_prefix = @exec_prefix@
++bindir = $(DESTDIR)@bindir@
+ ifeq ("@KLIBC@", "no")
+- libdir = @libdir@
+- sbindir = @sbindir@
+- includedir = @includedir@
+- infodir = @infodir@
+- mandir = @mandir@
++ libdir = $(DESTDIR)@libdir@
++ sbindir = $(DESTDIR)@sbindir@
++ includedir = $(DESTDIR)@includedir@
++ infodir = $(DESTDIR)@infodir@
++ mandir = $(DESTDIR)@mandir@
+ else
+ libdir = $(DESTDIR)@KLIBC_LIB_DIR@
+ sbindir = $(DESTDIR)@KLIBC_SBIN_DIR@
+ includedir = $(DESTDIR)@KLIBC_INCLUDE_DIR@
+- infodir = @infodir@
+- mandir = @mandir@
++ infodir = $(DESTDIR)@infodir@
++ mandir = $(DESTDIR)@mandir@
+ endif
+
+
diff --git a/sys-fs/dmraid/metadata.xml b/sys-fs/dmraid/metadata.xml
new file mode 100644
index 000000000000..e357fd86cf1d
--- /dev/null
+++ b/sys-fs/dmraid/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name='dietlibc'>Compile against <pkg>dev-libs/dietlibc</pkg></flag>
+ <flag name='intel_led'>Enable Intel LED support</flag>
+ <flag name='klibc'>Compile against <pkg>dev-libs/klibc</pkg></flag>
+ <flag name='led'>Enable LED support</flag>
+ <flag name='mini'>Create a minimal binary suitable for early boot environments</flag>
+ </use>
+ <maintainer>
+ <email>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+ </maintainer>
+ <longdescription>This software discovers, activates, deactivates and displays properties of software RAID sets eg: ATARAID and contained DOS partitions.</longdescription>
+</pkgmetadata>