commit:     b40447c39470be93739c443eec590434df922b27
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 16 18:18:00 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Sep 16 18:18:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b40447c3

dev-embedded/picasm: Port to EAPI 7

Closes: https://bugs.gentoo.org/742194
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../picasm/files/picasm-1.14-makefile.patch        | 27 ++++++++++++++++++++++
 dev-embedded/picasm/picasm-1.14.ebuild             | 23 +++++++++---------
 2 files changed, 38 insertions(+), 12 deletions(-)

diff --git a/dev-embedded/picasm/files/picasm-1.14-makefile.patch 
b/dev-embedded/picasm/files/picasm-1.14-makefile.patch
new file mode 100644
index 00000000000..0ac5bacd730
--- /dev/null
+++ b/dev-embedded/picasm/files/picasm-1.14-makefile.patch
@@ -0,0 +1,27 @@
+--- a/Makefile
++++ b/Makefile
+@@ -5,21 +5,19 @@
+ # See the file LICENSE for license terms.
+ #
+ 
+-DEFS=-DBUILTIN_INCLUDE1=\"/usr/local/share/picasm/include\"
++CPPFLAGS += -DBUILTIN_INCLUDE1=\"/usr/share/picasm/include\"
+ #DEFS=-DBUILTIN_INCLUDE1=\"/home/trossi/bin/picasm-include\"
+ 
+-CC = gcc
+-CFLAGS = -Wall -Wshadow -W -Werror -O2 $(DEFS)
++CFLAGS += -Wall -Wshadow -W
+ RM = /bin/rm -f
+ 
+ VERSION=114
+ 
+-OBJS = picasm.o config.o token.o symtab.o expr.o \
++OBJS = config.o token.o symtab.o expr.o \
+        pic12bit.o pic14bit.o pic16bit.o \
+        util.o
+ 
+ picasm: $(OBJS)
+-      $(CC) $(CFLAGS) $(OBJS) -o $@
+ 
+ clean:
+       $(RM) picasm *.o examples/*.hex examples/*.lst

diff --git a/dev-embedded/picasm/picasm-1.14.ebuild 
b/dev-embedded/picasm/picasm-1.14.ebuild
index c8fa9d90d9a..b0ac54ba35e 100644
--- a/dev-embedded/picasm/picasm-1.14.ebuild
+++ b/dev-embedded/picasm/picasm-1.14.ebuild
@@ -1,12 +1,13 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
-inherit toolchain-funcs flag-o-matic
+inherit toolchain-funcs
 
 MY_PV="${PV//.}"
 MY_P="${PN}${MY_PV}"
+
 DESCRIPTION="An assembler and disassembler for 12 and 14-bit PIC chips"
 HOMEPAGE="http://www.iki.fi/trossi/pic/";
 SRC_URI="http://www.iki.fi/trossi/pic/${MY_P}.tar.bz2";
@@ -14,17 +15,13 @@ SRC_URI="http://www.iki.fi/trossi/pic/${MY_P}.tar.bz2";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 x86"
-IUSE=""
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
 
-src_prepare() {
-       sed -i -e 's:$(CC):\0 $(LDFLAGS):' Makefile || die
-}
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
 
-src_compile() {
-       append-cflags -DBUILTIN_INCLUDE1=\\\"/usr/share/picasm/include\\\"
-       emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)"
+src_configure() {
+       tc-export CC
 }
 
 src_install() {
@@ -34,8 +31,10 @@ src_install() {
        insinto /usr/share/picasm/include
        doins device_definitions/*.i
 
-       dohtml picasm.html
        docinto examples
        dodoc examples/*.*
        docompress -x /usr/share/doc/${PF}/examples
+
+       docinto html
+       dodoc picasm.html
 }

Reply via email to