]> Pileus Git - ~andy/sunrise/blobdiff - net-misc/sambascanner/sambascanner-0.22.ebuild
net-misc/sambascanner: Migrate to EAPI2 in order to replace deprecated built_with_use...
[~andy/sunrise] / net-misc / sambascanner / sambascanner-0.22.ebuild
index 8ec62aba6dd3d1dcf7594b09e4ab4a3c457fe520..f663445625e9bd4e2d3c8f173893bfb4fc824de8 100644 (file)
@@ -1,7 +1,9 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
+EAPI="2"
+
 inherit autotools eutils toolchain-funcs
 
 MY_P="SambaScanner-${PV}"
@@ -16,16 +18,12 @@ IUSE="debug linguas_de"
 
 RDEPEND=">=net-fs/samba-3"
 DEPEND="${RDEPEND}
+       sys-libs/glibc[nptl]
        sys-devel/gettext"
 
 S=${WORKDIR}/${MY_P}
 
-src_unpack() {
-       if ! built_with_use --missing true sys-libs/glibc nptl; then
-               die "Sambascanner requires an NPTL system"
-       fi
-       unpack ${A}
-       cd "${S}"
+src_prepare() {
        if use debug; then
                #prevent configure from completely replacing our CFLAGS
                sed 's:CFLAGS="-O0 -g -pthread":CFLAGS="${CFLAGS} -g -pthread":' -i configure.ac
@@ -33,8 +31,11 @@ src_unpack() {
        fi
 }
 
-src_compile() {
+src_configure() {
        econf CFLAGS="${CFLAGS} -pthread" $(use_enable debug)
+}
+
+src_compile() {
        emake CC=$(tc-getCC) || die "emake failed"
 }