dev-util/rats: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Thu, 28 Dec 2017 10:28:16 +0000 (11:28 +0100)
committerDavid Seifert <soap@gentoo.org>
Thu, 28 Dec 2017 12:02:45 +0000 (13:02 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

dev-util/rats/files/rats-2.4-fix-build-system.patch [new file with mode: 0644]
dev-util/rats/rats-2.4.ebuild

diff --git a/dev-util/rats/files/rats-2.4-fix-build-system.patch b/dev-util/rats/files/rats-2.4-fix-build-system.patch
new file mode 100644 (file)
index 0000000..4297287
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -50,15 +50,15 @@
+       $(LEX) $(LEXFLAGS) -Pyyruby ruby-lex.l     \r
\r
+ install:      $(BIN)\r
+-      ./mkinstalldirs $(BINDIR) $(LIBDIR) $(MANDIR) $(MANDIR)/man1 $(SHAREDIR)\r
+-      $(INSTALL_PROGRAM) $(BIN) $(BINDIR)\r
+-      $(INSTALL_DATA) rats-python.xml $(SHAREDIR)\r
+-      $(INSTALL_DATA) rats-c.xml $(SHAREDIR)\r
+-      $(INSTALL_DATA) rats-perl.xml $(SHAREDIR)\r
+-      $(INSTALL_DATA) rats-php.xml $(SHAREDIR)\r
+-      $(INSTALL_DATA) rats-ruby.xml $(SHAREDIR)\r
+-      $(INSTALL_DATA) rats-openssl.xml $(SHAREDIR)\r
+-      $(INSTALL_DATA) rats.1  $(MANDIR)/man1\r
++      ./mkinstalldirs $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(SHAREDIR)\r
++      $(INSTALL_PROGRAM) $(BIN) $(DESTDIR)$(BINDIR)\r
++      $(INSTALL_DATA) rats-python.xml $(DESTDIR)$(SHAREDIR)\r
++      $(INSTALL_DATA) rats-c.xml $(DESTDIR)$(SHAREDIR)\r
++      $(INSTALL_DATA) rats-perl.xml $(DESTDIR)$(SHAREDIR)\r
++      $(INSTALL_DATA) rats-php.xml $(DESTDIR)$(SHAREDIR)\r
++      $(INSTALL_DATA) rats-ruby.xml $(DESTDIR)$(SHAREDIR)\r
++      $(INSTALL_DATA) rats-openssl.xml $(DESTDIR)$(SHAREDIR)\r
++      $(INSTALL_DATA) rats.1  $(DESTDIR)$(MANDIR)/man1\r
\r
+ clean:\r
+       rm -f $(OBJ) *~ $(BIN) core\r
index 1c49b7c4df49764baa082b871f8792a130e20fd8..0a41658a990709c49d0a72a7e65334c6c0fed1c9 100644 (file)
@@ -1,7 +1,8 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=3
+EAPI=6
+
 inherit eutils
 
 DESCRIPTION="RATS - Rough Auditing Tool for Security"
@@ -13,23 +14,25 @@ SLOT="0"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
 IUSE=""
 
-DEPEND="dev-libs/expat"
+RDEPEND="dev-libs/expat:="
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.4-fix-build-system.patch )
 
 src_prepare() {
-       edos2unix $(find "${S}" -name '*.[chl]' -o -name '*.in' -o -name '*.am')
-       #epatch "${FILESDIR}"/${PN}-2.1-add-getopt-trailing-null.patch
-       #epatch "${FILESDIR}"/${PN}-2.1-fix-null-pointers.patch
+       default
+
+       local f
+       while IFS="" read -d $'\0' -r f; do
+               einfo "Converting ${f} from CRLF to LF"
+               edos2unix "${f}"
+       done < <(find \( -name '*.[chl]' -o -name '*.in' -o -name '*.am' \) -print0)
 }
 
 src_configure() {
        econf --datadir="${EPREFIX}/usr/share/${PN}/"
 }
 
-src_install () {
-       einstall SHAREDIR="${ED}/usr/share/${PN}" MANDIR="${ED}/usr/share/man"
-       dodoc README README.win32
-}
-
 pkg_postinst() {
        ewarn "Please be careful when using this program with it's force language"
        ewarn "option, '--language <LANG>' it may take huge amounts of memory when"