app-admin/integrit: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 17:53:01 +0000 (18:53 +0100)
committerDavid Seifert <soap@gentoo.org>
Fri, 29 Dec 2017 22:30:49 +0000 (23:30 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

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

diff --git a/app-admin/integrit/files/integrit-4.1-fix-build-system.patch b/app-admin/integrit/files/integrit-4.1-fix-build-system.patch
new file mode 100644 (file)
index 0000000..64b3d47
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/configure.in
++++ b/configure.in
+@@ -26,7 +26,6 @@
+ 
+ # ----- you can override these values by setting environment variables
+ # CC=my-compiler ./configure
+-CC=${CC:-"gcc"}
+ # CFLAGS="-g foo -x bar" ./configure
+ CFLAGS=${CFLAGS-"-g -Wall -O2"}
+ STATIC=${STATIC-"-static"}
+@@ -53,10 +52,9 @@
+ dnl AC_PROG_LEX
+ AC_PROG_MAKE_SET
+ AC_PROG_AWK
+-AC_PROGRAM_PATH(RM, rm , rm)
+ dnl syncing is the job of the O.S., and users can always do "make; sync"
+ dnl AC_PROGRAM_PATH(SYNC, sync, sync)
+-AC_PROGRAM_PATH(AR, ar, ar)
++AM_PROG_AR
+ AC_PROG_RANLIB
+ 
+ dnl ---------- let users override the install that configure finds
+--- a/hashtbl/configure.in
++++ b/hashtbl/configure.in
+@@ -25,17 +25,15 @@
+ 
+ # ----- you can override these values by setting environment variables
+ # CC=my-compiler ./configure
+-CC=${CC:-"gcc"}
+ # CFLAGS="-g foo -x bar" ./configure
+ CFLAGS=${CFLAGS:-"-g -Wall -O2"}
+ STATIC=${STATIC:-"-static"}
+ 
+ dnl Checks for programs.
+ AC_PROG_CC
+-AC_PROGRAM_PATH(RM, rm , rm)
+ dnl syncing is the job of the O.S., and users can always do "make; sync"
+ dnl AC_PROGRAM_PATH(SYNC, sync, sync)
+-AC_PROGRAM_PATH(AR, ar, ar)
++AM_PROG_AR
+ AC_PROG_MAKE_SET
+ AC_PROG_RANLIB
+ 
index d987937dc338abbbde5c1b196177ade722c4af42..3289a7bc8209381d58ec128b15592cc33a69bbae 100644 (file)
@@ -1,61 +1,61 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=6
 
-inherit autotools toolchain-funcs
+inherit autotools
 
 DESCRIPTION="file integrity verification program"
 HOMEPAGE="http://integrit.sourceforge.net/"
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86"
 IUSE=""
 
+PATCHES=( "${FILESDIR}"/${PN}-4.1-fix-build-system.patch )
+
 src_prepare() {
-       sed -i -e "/^CC/d" configure.in hashtbl/configure.in || die
-       sed -i -e "/^AC_PROGRAM_PATH/d" configure.in hashtbl/configure.in || die
+       default
+       mv configure.{in,ac} || die
+       mv hashtbl/configure.{in,ac} || die
+
+       # tests are not executable
+       chmod +x test/test || die
+
        eautoreconf
-       tc-export AR
 }
 
 src_compile() {
        emake
        emake utils
 
-       cd "${S}"/doc && emake
-       cd "${S}"/hashtbl && emake hashtest
-}
-
-src_test() {
-       chmod +x test/test || die
-       default
+       emake -C doc
+       emake -C hashtbl hashtest
 }
 
 src_install() {
        dosbin integrit
-       dolib libintegrit.a
+       dolib.a libintegrit.a
        dodoc Changes HACKING README todo.txt
 
-       cd "${S}"/utils
-       dosbin i-viewdb
-       dobin i-ls
+       # utils
+       dosbin utils/i-viewdb
+       dobin utils/i-ls
 
-       cd "${S}"/hashtbl
-       dolib libhashtbl.a
-       insinto /usr/include
-       doins hashtbl.h
-       dobin hashtest
-       newdoc README README.hashtbl
+       # hashtbl
+       dolib.a hashtbl/libhashtbl.a
+       doheader hashtbl/hashtbl.h
+       dobin hashtbl/hashtest
+       newdoc hashtbl/README README.hashtbl
 
-       cd "${S}"/doc
-       doman i-ls.1 i-viewdb.1 integrit.1
-       doinfo integrit.info
+       # doc
+       doman doc/{i-ls.1,i-viewdb.1,integrit.1}
+       doinfo doc/integrit.info
 
-       cd "${S}"/examples
-       docinto examples
-       dodoc *
+       # examples
+       dodoc -r examples
 }
 
 pkg_postinst() {