app-arch/qpress: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Wed, 28 Aug 2019 09:11:01 +0000 (11:11 +0200)
committerDavid Seifert <soap@gentoo.org>
Wed, 28 Aug 2019 09:11:01 +0000 (11:11 +0200)
Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: David Seifert <soap@gentoo.org>
app-arch/qpress/files/makefile [deleted file]
app-arch/qpress/files/qpress-1.1-fix-build-system.patch [new file with mode: 0644]
app-arch/qpress/files/qpress-1.1-fix-includes.patch [new file with mode: 0644]
app-arch/qpress/qpress-1.1.ebuild

diff --git a/app-arch/qpress/files/makefile b/app-arch/qpress/files/makefile
deleted file mode 100644 (file)
index 63c1f91..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX ?= g++
-CXXFLAGS ?= -O3
-LIBS=-lpthread
-
-qpress:
-       $(CXX) $(CXXFLAGS) qpress.cpp aio.cpp quicklz.c utilities.cpp -o $@ $(LIBS)
diff --git a/app-arch/qpress/files/qpress-1.1-fix-build-system.patch b/app-arch/qpress/files/qpress-1.1-fix-build-system.patch
new file mode 100644 (file)
index 0000000..b6f7c0f
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/makefile
++++ b/makefile
+@@ -1,2 +1 @@
+-g++:  qpress.cpp aio.cpp quicklz.c utilities.cpp
+-      g++ -O3 -o qpress qpress.cpp aio.cpp quicklz.c utilities.cpp -lpthread
+\ No newline at end of file
++qpress: aio.o quicklz.o utilities.o
diff --git a/app-arch/qpress/files/qpress-1.1-fix-includes.patch b/app-arch/qpress/files/qpress-1.1-fix-includes.patch
new file mode 100644 (file)
index 0000000..51bfee4
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/qpress.cpp
++++ b/qpress.cpp
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ /*\r
+ qpress - portable high-speed file archiver\r
+ Copyright Lasse Reinhold 2006-2010\r
index e7787c7973a53df59a25e9775a635be088c67151..21904daf9eb30302593c4da16ef9a24603fe3756 100644 (file)
@@ -1,7 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
+
+inherit toolchain-funcs
 
 DESCRIPTION="A portable file archiver using QuickLZ algorithm"
 HOMEPAGE="http://www.quicklz.com/"
@@ -11,14 +13,18 @@ LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
+BDEPEND="app-arch/unzip"
+
 S="${WORKDIR}"
 
-src_prepare() {
-       default
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.1-fix-includes.patch
+       "${FILESDIR}"/${PN}-1.1-fix-build-system.patch
+)
 
-       # Fix compilation with newer gcc
-       sed -i '1i #include <unistd.h>' qpress.cpp || die
-       cp "${FILESDIR}/makefile" "${S}" || die
+src_configure() {
+       tc-export CC CXX
+       export LDLIBS="-lpthread"
 }
 
 src_install() {