app-admin/sysrqd: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 16:23:46 +0000 (17:23 +0100)
committerDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 17:02:08 +0000 (18:02 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

app-admin/sysrqd/files/sysrqd-14-fix-build-system.patch [new file with mode: 0644]
app-admin/sysrqd/files/sysrqd-config.patch
app-admin/sysrqd/metadata.xml
app-admin/sysrqd/sysrqd-14.ebuild

diff --git a/app-admin/sysrqd/files/sysrqd-14-fix-build-system.patch b/app-admin/sysrqd/files/sysrqd-14-fix-build-system.patch
new file mode 100644 (file)
index 0000000..2668c3c
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/Makefile
++++ b/Makefile
+@@ -5,15 +5,15 @@
+         -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare \
+         -Wunused -Winit-self -Wpointer-arith -Wredundant-decls \
+         -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn \
+-        -std=gnu99 -pipe -DSYSRQD_VERSION="\"$(VERSION)\"" -O3
++        -std=gnu99
++CPPFLAGS += -DSYSRQD_VERSION="\"$(VERSION)\""
+ 
+ SBINDIR=$(DESTDIR)/usr/sbin
+ #MANDIR=$(DESTDIR)/usr/share/man/man1
+ INSTALL = install
+ #MAN=sysrqd.1
+ 
+-$(BIN): $(O)
+-      $(CC) $(LDFLAGS) -o $(BIN) $(O)
++all: $(BIN)
+ 
+ install: $(BIN)
+       $(INSTALL) -d -m 755 $(SBINDIR)
index ce463814d1e389c81028e5605f7356175f4b3889..56c6afb608049a04fc66238be742b216c52a0920 100644 (file)
@@ -1,5 +1,5 @@
---- sysrqd.c.orig      2009-11-05 14:58:21.644471772 +0100
-+++ sysrqd.c   2009-11-05 14:58:43.276472005 +0100
+--- a/sysrqd.c
++++ b/sysrqd.c
 @@ -40,8 +40,8 @@
  #define BIND_MAX_LEN 16
  #define PROMPT "sysrq> "
index b86ebd13ff32908e2a85c1d560d4650c3a3d5272..97a6a018180fa4b5d0f59512f68ed6777d2313fc 100644 (file)
@@ -1,14 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="person">
-       <email>wschlich@gentoo.org</email>
-       <name>Wolfram Schlich</name>
-       <description>Primary maintainer</description>
-</maintainer>
-<longdescription>
-sysrqd is a small daemon intended to manage Linux Sysrq over network.
-Its philosophy is to be very responsive under heavy load and try to
-be somehow reliable. Authentication is made by clear password.
-</longdescription>
+       <maintainer type="person">
+               <email>wschlich@gentoo.org</email>
+               <name>Wolfram Schlich</name>
+       </maintainer>
+       <longdescription>
+               sysrqd is a small daemon intended to manage Linux Sysrq over network.
+               Its philosophy is to be very responsive under heavy load and try to
+               be somehow reliable. Authentication is made by clear password.
+       </longdescription>
 </pkgmetadata>
index 3475122a580716adf4334cc8780469536c0bc039..249bbce77e12e0551c3ae421c35c013d613c26da 100644 (file)
@@ -1,27 +1,27 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-inherit eutils toolchain-funcs
+EAPI=6
+
+inherit toolchain-funcs
 
-IUSE=""
 DESCRIPTION="daemon providing access to the kernel sysrq functions via network"
 HOMEPAGE="http://julien.danjou.info/projects/sysrqd"
 #SRC_URI="http://julien.danjou.info/${PN}/${P}.tar.gz"
 SRC_URI="https://dev.gentoo.org/~wschlich/src/${CATEGORY}/${PN}/${P}.tar.gz"
+
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~x86 ~amd64"
-DEPEND=""
-RDEPEND="${DEPEND}"
-
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
-       epatch "${FILESDIR}/${PN}-config.patch"
-}
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-config.patch
+       "${FILESDIR}"/${PN}-14-fix-build-system.patch
+)
 
-src_compile() {
-       $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o sysrqd sysrqd.c
+src_configure() {
+       tc-export CC
 }
 
 src_install() {
@@ -31,8 +31,8 @@ src_install() {
        local bindip='127.0.0.1' secret
        declare -i secret
        let secret=${RANDOM}*${RANDOM}*${RANDOM}*${RANDOM}
-       echo ${bindip} > sysrqd.bind
-       echo ${secret} > sysrqd.secret
+       echo ${bindip} > sysrqd.bind || die
+       echo ${secret} > sysrqd.secret || die
 
        diropts -m 0700 -o root -g root
        dodir /etc/sysrqd
@@ -41,7 +41,7 @@ src_install() {
        doins sysrqd.bind
        doins sysrqd.secret
 
-       dodoc README ChangeLog
+       einstalldocs
 }
 
 pkg_postinst() {