From 7fb382134282417f5054121d6bd61d60ae9a8e56 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Wed, 16 Sep 2020 20:18:14 +0200 Subject: dev-embedded/uisp: Port to EAPI 7 Closes: https://bugs.gentoo.org/729704 Closes: https://bugs.gentoo.org/742209 Package-Manager: Portage-3.0.7, Repoman-3.0.1 Signed-off-by: David Seifert --- dev-embedded/uisp/files/mega-48-88-168.patch | 29 -------- .../uisp/files/uisp-20050207-autotools.patch | 35 +++++++++ dev-embedded/uisp/files/uisp-20050207-clang.patch | 84 ++++++++++++++++++++++ .../uisp/files/uisp-20050207-mega-48-88-168.patch | 29 ++++++++ dev-embedded/uisp/uisp-20050207-r1.ebuild | 22 +++--- 5 files changed, 160 insertions(+), 39 deletions(-) delete mode 100644 dev-embedded/uisp/files/mega-48-88-168.patch create mode 100644 dev-embedded/uisp/files/uisp-20050207-autotools.patch create mode 100644 dev-embedded/uisp/files/uisp-20050207-clang.patch create mode 100644 dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch (limited to 'dev-embedded') diff --git a/dev-embedded/uisp/files/mega-48-88-168.patch b/dev-embedded/uisp/files/mega-48-88-168.patch deleted file mode 100644 index dad337b740a7..000000000000 --- a/dev-embedded/uisp/files/mega-48-88-168.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Nura uisp-20050207/src/Avr.C uisp-20050207+mega-48-88-168/src/Avr.C ---- uisp-20050207/src/Avr.C 2005-02-07 19:55:08.000000000 -0300 -+++ uisp-20050207+mega-48-88-168/src/Avr.C 2005-06-28 17:11:15.000000000 -0300 -@@ -77,7 +77,7 @@ - /* no longer in production? -> use 8515, 8535 instead */ - { "AT90S4414", 0x92, 0x01, 4096, 0, 256, 4000, 4000, AVR_2313 }, - { "AT90S4434", 0x92, 0x02, 4096, 0, 256, 4000, 4000, AVR_8535 }, -- { "ATmega48", 0x92, 0x05, 4096, 0, 256, 4000, 4000, AVR_M163 }, -+ { "ATmega48", 0x92, 0x05, 4096, 32, 256, 2000, 1500, AVR_M163 }, - - { "AT90S8515", 0x93, 0x01, 8192, 0, 512, 4000, 4000, AVR_2313 }, - { "AT90S8535", 0x93, 0x03, 8192, 0, 512, 4000, 4000, AVR_8535 }, -@@ -90,7 +90,7 @@ - { "ATmega8515", 0x93, 0x06, 8192, 64, 512, 4500, 9000, AVR_M163 }, - { "ATmega8", 0x93, 0x07, 8192, 64, 512, 4500, 9000, AVR_M163 }, - { "ATmega8535", 0x93, 0x08, 8192, 64, 512, 4500, 9000, AVR_M163 }, -- { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 4000, 4000, AVR_M163 }, -+ { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 2000, 1500, AVR_M163 }, - - #if 0 - /* 12V parallel programming only; here just for the evidence */ -@@ -101,6 +101,7 @@ - { "ATmega163", 0x94, 0x02, 16384, 128, 512, 15000, 3800, AVR_M163 }, - { "ATmega16", 0x94, 0x03, 16384, 128, 512, 4500, 9000, AVR_M163 }, - { "ATmega162", 0x94, 0x04, 16384, 128, 512, 4500, 9000, AVR_M128 }, -+ { "ATmega168", 0x94, 0x06, 16384, 128, 512, 2000, 1500, AVR_M163 }, - { "ATmega169", 0x94, 0x05, 16384, 128, 512, 4500, 9000, AVR_M128 }, - - { "ATmega323", 0x95, 0x01, 32768, 128, 1024, 15000, 3800, AVR_M163 }, diff --git a/dev-embedded/uisp/files/uisp-20050207-autotools.patch b/dev-embedded/uisp/files/uisp-20050207-autotools.patch new file mode 100644 index 000000000000..824ccf3b2b57 --- /dev/null +++ b/dev-embedded/uisp/files/uisp-20050207-autotools.patch @@ -0,0 +1,35 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -44,20 +44,8 @@ + MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure src/config-h.in \ + src/stamp-h.in $(AUX_DIST) + +-install_aux_files = AUTHORS COPYING INSTALL CHANGES CHANGES.old TODO \ ++dist_doc_DATA = AUTHORS CHANGES CHANGES.old TODO \ + ChangeLog ChangeLog-2003 ChangeLog-2002 + +-DOC_INST_DIR = $(DESTDIR)$(datadir)/doc/uisp-$(VERSION) +- +-install-data-local: +- $(mkinstalldirs) $(DOC_INST_DIR) +- for file in $(install_aux_files) ; do \ +- echo " $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file"; \ +- $(INSTALL_DATA) $(srcdir)/$$file $(DOC_INST_DIR)/$$file; \ +- done +- +-uninstall-local: +- rm -rf $(DOC_INST_DIR) +- + dist-hook: uisp.spec + cp uisp.spec $(distdir)/uisp.spec +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -31,7 +31,7 @@ + # Turn on all warnings and consider them errors. This kinda forces you to have + # to use gcc, but I'd rather have all warnings eliminated. + +-AM_CXXFLAGS = -Wall -Werror ++AM_CXXFLAGS = -Wall + + bin_PROGRAMS = uisp + uisp_SOURCES = \ diff --git a/dev-embedded/uisp/files/uisp-20050207-clang.patch b/dev-embedded/uisp/files/uisp-20050207-clang.patch new file mode 100644 index 000000000000..c08943b9d9b1 --- /dev/null +++ b/dev-embedded/uisp/files/uisp-20050207-clang.patch @@ -0,0 +1,84 @@ +--- a/src/AvrAtmel.C ++++ b/src/AvrAtmel.C +@@ -185,7 +185,7 @@ + + void TAvrAtmel::SetAddress(TAddr addr){ + apc_address = addr; +- TByte setAddr [3] = { 'A', (addr>>8)&0xff, addr&0xff}; ++ TByte setAddr [3] = { 'A', static_cast((addr>>8)&0xff), static_cast(addr&0xff)}; + Send(setAddr, 3, 1); + CheckResponse(setAddr [0]); + } +@@ -294,7 +294,7 @@ + if (flush_buffer){WriteProgramMemoryPage();} + } + +- TByte wrF [2] = { (addr&1)?'C':'c', byte }; ++ TByte wrF [2] = { static_cast((addr&1)?'C':'c'), byte }; + + if (apc_address!=(addr>>1) || apc_autoinc==false) SetAddress (addr>>1); + if (wrF[0]=='C') apc_address++; +@@ -346,7 +346,7 @@ + */ + void TAvrAtmel::WriteOldFuseBits (TByte val) + { +- TByte buf[5] = {'.', 0xac, (val & 0x1f) | 0xa0, 0x00, 0xd2 }; ++ TByte buf[5] = {'.', 0xac, static_cast((val & 0x1f) | 0xa0), 0x00, 0xd2 }; + Info (2, "Write fuse high bits: %02x\n", (int)val); + Send (buf, 5, 2); + CheckResponse (buf[1]); +@@ -423,7 +423,7 @@ + } + + void TAvrAtmel::WriteLockBits(TByte bits){ +- TByte lockTarget [2] = { 'l', 0xF9 | ((bits << 1) & 0x06) }; ++ TByte lockTarget [2] = { 'l', static_cast(0xF9 | ((bits << 1) & 0x06)) }; + Send (lockTarget, 2, 1); + CheckResponse(lockTarget [0]); + Info(1, "Writing lock bits ...\nReinitializing device\n"); +--- a/src/AvrDummy.C ++++ b/src/AvrDummy.C +@@ -81,12 +81,12 @@ + TAvrDummy::GetPartInfo(TAddr addr) + { + if (at89) { +- TByte info [4] = { 0x28, addr & 0x1f, 0, 0 }; ++ TByte info [4] = { 0x28, static_cast(addr & 0x1f), 0, 0 }; + Send(info, 4); + return info[3]; + } + +- TByte info [4] = { 0x30, 0, addr, 0 }; ++ TByte info [4] = { 0x30, 0, static_cast(addr), 0 }; + Send(info, 4); + return info[3]; + } +@@ -289,7 +289,7 @@ + void + TAvrDummy::WriteOldFuseBits(TByte val) + { +- TByte oldfuse[4] = { 0xAC, (val & 0x1F) | 0xA0, 0, 0xD2 }; ++ TByte oldfuse[4] = { 0xAC, static_cast((val & 0x1F) | 0xA0), 0, 0xD2 }; + Send(oldfuse, 4); + } + +@@ -533,7 +533,7 @@ + { + /* This handles both old (byte 2, bits 1-2) + and new (byte 4, bits 0-5) devices. */ +- TByte lock[4] = { 0xAC, 0xF9 | ((bits << 1) & 0x06), 0xFF, bits }; ++ TByte lock[4] = { 0xAC, static_cast(0xF9 | ((bits << 1) & 0x06)), 0xFF, bits }; + TByte rbits; + + if (at89) +--- a/src/Stk500.C ++++ b/src/Stk500.C +@@ -518,7 +518,7 @@ + + TByte TStk500::ReadCalFuseBits(int addr) + { +- TByte cmd[] = { 0x38, 0x00, addr, 0x00 }; ++ TByte cmd[] = { 0x38, 0x00, static_cast(addr), 0x00 }; + + return UniversalCmd(cmd); + } diff --git a/dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch b/dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch new file mode 100644 index 000000000000..dad337b740a7 --- /dev/null +++ b/dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch @@ -0,0 +1,29 @@ +diff -Nura uisp-20050207/src/Avr.C uisp-20050207+mega-48-88-168/src/Avr.C +--- uisp-20050207/src/Avr.C 2005-02-07 19:55:08.000000000 -0300 ++++ uisp-20050207+mega-48-88-168/src/Avr.C 2005-06-28 17:11:15.000000000 -0300 +@@ -77,7 +77,7 @@ + /* no longer in production? -> use 8515, 8535 instead */ + { "AT90S4414", 0x92, 0x01, 4096, 0, 256, 4000, 4000, AVR_2313 }, + { "AT90S4434", 0x92, 0x02, 4096, 0, 256, 4000, 4000, AVR_8535 }, +- { "ATmega48", 0x92, 0x05, 4096, 0, 256, 4000, 4000, AVR_M163 }, ++ { "ATmega48", 0x92, 0x05, 4096, 32, 256, 2000, 1500, AVR_M163 }, + + { "AT90S8515", 0x93, 0x01, 8192, 0, 512, 4000, 4000, AVR_2313 }, + { "AT90S8535", 0x93, 0x03, 8192, 0, 512, 4000, 4000, AVR_8535 }, +@@ -90,7 +90,7 @@ + { "ATmega8515", 0x93, 0x06, 8192, 64, 512, 4500, 9000, AVR_M163 }, + { "ATmega8", 0x93, 0x07, 8192, 64, 512, 4500, 9000, AVR_M163 }, + { "ATmega8535", 0x93, 0x08, 8192, 64, 512, 4500, 9000, AVR_M163 }, +- { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 4000, 4000, AVR_M163 }, ++ { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 2000, 1500, AVR_M163 }, + + #if 0 + /* 12V parallel programming only; here just for the evidence */ +@@ -101,6 +101,7 @@ + { "ATmega163", 0x94, 0x02, 16384, 128, 512, 15000, 3800, AVR_M163 }, + { "ATmega16", 0x94, 0x03, 16384, 128, 512, 4500, 9000, AVR_M163 }, + { "ATmega162", 0x94, 0x04, 16384, 128, 512, 4500, 9000, AVR_M128 }, ++ { "ATmega168", 0x94, 0x06, 16384, 128, 512, 2000, 1500, AVR_M163 }, + { "ATmega169", 0x94, 0x05, 16384, 128, 512, 4500, 9000, AVR_M128 }, + + { "ATmega323", 0x95, 0x01, 32768, 128, 1024, 15000, 3800, AVR_M163 }, diff --git a/dev-embedded/uisp/uisp-20050207-r1.ebuild b/dev-embedded/uisp/uisp-20050207-r1.ebuild index 2a92a428cdd4..3db55410303d 100644 --- a/dev-embedded/uisp/uisp-20050207-r1.ebuild +++ b/dev-embedded/uisp/uisp-20050207-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=7 -inherit eutils +inherit autotools DESCRIPTION="Tool for programming AVR microcontroller through the parallel port" HOMEPAGE="https://savannah.nongnu.org/projects/uisp" @@ -12,17 +12,19 @@ SRC_URI="https://savannah.nongnu.org/download/uisp/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc x86" -IUSE="" + +PATCHES=( + "${FILESDIR}"/${P}-autotools.patch + "${FILESDIR}"/${P}-mega-48-88-168.patch + "${FILESDIR}"/${P}-clang.patch +) src_prepare() { - sed -i -e "/^DOC_INST_DIR/s:/[^/]*$:/${PF}:" Makefile.in || die - cd src - epatch "${FILESDIR}"/mega-48-88-168.patch - sed -i -e 's: -Werror::' Makefile.in || die + default + eautoreconf } src_install() { default - dodoc doc/* - rm "${ED}"/usr/share/doc/${PF}/COPYING* || die + dodoc -r doc/. } -- cgit v1.2.3-65-gdbad