app-admin/sud: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 19:01:42 +0000 (20:01 +0100)
committerDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 22:31:52 +0000 (23:31 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

app-admin/sud/files/sud-1.3-fix-build-system.patch [new file with mode: 0644]
app-admin/sud/sud-1.3-r1.ebuild

diff --git a/app-admin/sud/files/sud-1.3-fix-build-system.patch b/app-admin/sud/files/sud-1.3-fix-build-system.patch
new file mode 100644 (file)
index 0000000..5937d3f
--- /dev/null
@@ -0,0 +1,30 @@
+--- a/login/Makefile.am
++++ b/login/Makefile.am
+@@ -2,5 +2,5 @@
+ ilogin_SOURCES = login.c
+ ilogin_CFLAGS = -Wall
+-install-data-hook:
+-      chmod 500 $(sbindir)/ilogin
++install-exec-hook:
++      chmod 500 $(DESTDIR)$(sbindir)/ilogin
+--- a/su/Makefile.am
++++ b/su/Makefile.am
+@@ -4,5 +4,5 @@
+ INCLUDES = -I../sud
+-install-data-hook:
+-      chmod 555 $(bindir)/suz
++install-exec-hook:
++      chmod 555 $(DESTDIR)$(bindir)/suz
+--- a/sud/Makefile.am
++++ b/sud/Makefile.am
+@@ -7,5 +7,5 @@
+ #INCLUDES = -I..
+ CLEANFILES = conf_lexer.c conf_parser.h conf_parser.c
+-install-data-hook:
+-      chmod 500 $(sbindir)/sud
++install-exec-hook:
++      chmod 500 $(DESTDIR)$(sbindir)/sud
index ef9d6f7005decc20938647485a18c8d9dd862edd..7c72435d9c4df0de57b5e0245c681f3b8603309f 100644 (file)
@@ -1,9 +1,9 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=2
+EAPI=6
 
-inherit eutils flag-o-matic
+inherit autotools flag-o-matic
 
 DESCRIPTION="A daemon to execute processes with special privileges in a nosuid environment"
 HOMEPAGE="http://s0ftpj.org/projects/sud/index.htm"
@@ -14,32 +14,21 @@ SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86"
 IUSE=""
 
+PATCHES=( "${FILESDIR}"/${PN}-1.3-fix-build-system.patch )
+
 src_prepare() {
-       sed -i -e \
-               's/install-data-hook:$/& install-exec/' \
-               -e \
-               's:chmod 500 $(sbindir)/ilogin:chmod 500 $(DESTDIR)$(sbindir)/ilogin:' \
-               "${S}"/login/Makefile.in || die "sed failed."
-       sed -i -e \
-               's/install-data-hook:$/& install-exec/' \
-               -e \
-               's:chmod 555 $(bindir)/suz:chmod 500 $(DESTDIR)$(bindir)/suz:' \
-               "${S}"/su/Makefile.in || die "sed failed."
-       sed -i -e \
-               's/install-data-hook:$/& install-exec/' \
-               -e \
-               's:chmod 500 $(sbindir)/sud:chmod 500 $(DESTDIR)$(sbindir)/sud:' \
-               "${S}"/sud/Makefile.in || die "sed failed."
+       default
+       eautoreconf
 }
 
 src_configure() {
-       append-flags -D_GNU_SOURCE
-       default_src_configure
+       append-cppflags -D_GNU_SOURCE
+       default
 }
 
 src_install() {
-       emake DESTDIR="${D}" install || die "emake install failed."
-       dodoc AUTHORS ChangeLog* README NEWS TODO
+       default
+
        doman ilogin.1 sud.1 suz.1
        insinto /etc
        doins miscs/sud.conf*