Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-embedded/uisp/, dev-embedded/uisp/files/
Date: Wed, 16 Sep 2020 18:19:26
Message-Id: 1600280294.7fb382134282417f5054121d6bd61d60ae9a8e56.soap@gentoo
1 commit: 7fb382134282417f5054121d6bd61d60ae9a8e56
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 16 18:18:14 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 16 18:18:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fb38213
7
8 dev-embedded/uisp: Port to EAPI 7
9
10 Closes: https://bugs.gentoo.org/729704
11 Closes: https://bugs.gentoo.org/742209
12 Package-Manager: Portage-3.0.7, Repoman-3.0.1
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 .../uisp/files/uisp-20050207-autotools.patch | 35 +++++++++
16 dev-embedded/uisp/files/uisp-20050207-clang.patch | 84 ++++++++++++++++++++++
17 ...68.patch => uisp-20050207-mega-48-88-168.patch} | 0
18 dev-embedded/uisp/uisp-20050207-r1.ebuild | 22 +++---
19 4 files changed, 131 insertions(+), 10 deletions(-)
20
21 diff --git a/dev-embedded/uisp/files/uisp-20050207-autotools.patch b/dev-embedded/uisp/files/uisp-20050207-autotools.patch
22 new file mode 100644
23 index 00000000000..824ccf3b2b5
24 --- /dev/null
25 +++ b/dev-embedded/uisp/files/uisp-20050207-autotools.patch
26 @@ -0,0 +1,35 @@
27 +--- a/Makefile.am
28 ++++ b/Makefile.am
29 +@@ -44,20 +44,8 @@
30 + MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure src/config-h.in \
31 + src/stamp-h.in $(AUX_DIST)
32 +
33 +-install_aux_files = AUTHORS COPYING INSTALL CHANGES CHANGES.old TODO \
34 ++dist_doc_DATA = AUTHORS CHANGES CHANGES.old TODO \
35 + ChangeLog ChangeLog-2003 ChangeLog-2002
36 +
37 +-DOC_INST_DIR = $(DESTDIR)$(datadir)/doc/uisp-$(VERSION)
38 +-
39 +-install-data-local:
40 +- $(mkinstalldirs) $(DOC_INST_DIR)
41 +- for file in $(install_aux_files) ; do \
42 +- echo " $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file"; \
43 +- $(INSTALL_DATA) $(srcdir)/$$file $(DOC_INST_DIR)/$$file; \
44 +- done
45 +-
46 +-uninstall-local:
47 +- rm -rf $(DOC_INST_DIR)
48 +-
49 + dist-hook: uisp.spec
50 + cp uisp.spec $(distdir)/uisp.spec
51 +--- a/src/Makefile.am
52 ++++ b/src/Makefile.am
53 +@@ -31,7 +31,7 @@
54 + # Turn on all warnings and consider them errors. This kinda forces you to have
55 + # to use gcc, but I'd rather have all warnings eliminated.
56 +
57 +-AM_CXXFLAGS = -Wall -Werror
58 ++AM_CXXFLAGS = -Wall
59 +
60 + bin_PROGRAMS = uisp
61 + uisp_SOURCES = \
62
63 diff --git a/dev-embedded/uisp/files/uisp-20050207-clang.patch b/dev-embedded/uisp/files/uisp-20050207-clang.patch
64 new file mode 100644
65 index 00000000000..c08943b9d9b
66 --- /dev/null
67 +++ b/dev-embedded/uisp/files/uisp-20050207-clang.patch
68 @@ -0,0 +1,84 @@
69 +--- a/src/AvrAtmel.C
70 ++++ b/src/AvrAtmel.C
71 +@@ -185,7 +185,7 @@
72 +
73 + void TAvrAtmel::SetAddress(TAddr addr){
74 + apc_address = addr;
75 +- TByte setAddr [3] = { 'A', (addr>>8)&0xff, addr&0xff};
76 ++ TByte setAddr [3] = { 'A', static_cast<TByte>((addr>>8)&0xff), static_cast<TByte>(addr&0xff)};
77 + Send(setAddr, 3, 1);
78 + CheckResponse(setAddr [0]);
79 + }
80 +@@ -294,7 +294,7 @@
81 + if (flush_buffer){WriteProgramMemoryPage();}
82 + }
83 +
84 +- TByte wrF [2] = { (addr&1)?'C':'c', byte };
85 ++ TByte wrF [2] = { static_cast<TByte>((addr&1)?'C':'c'), byte };
86 +
87 + if (apc_address!=(addr>>1) || apc_autoinc==false) SetAddress (addr>>1);
88 + if (wrF[0]=='C') apc_address++;
89 +@@ -346,7 +346,7 @@
90 + */
91 + void TAvrAtmel::WriteOldFuseBits (TByte val)
92 + {
93 +- TByte buf[5] = {'.', 0xac, (val & 0x1f) | 0xa0, 0x00, 0xd2 };
94 ++ TByte buf[5] = {'.', 0xac, static_cast<TByte>((val & 0x1f) | 0xa0), 0x00, 0xd2 };
95 + Info (2, "Write fuse high bits: %02x\n", (int)val);
96 + Send (buf, 5, 2);
97 + CheckResponse (buf[1]);
98 +@@ -423,7 +423,7 @@
99 + }
100 +
101 + void TAvrAtmel::WriteLockBits(TByte bits){
102 +- TByte lockTarget [2] = { 'l', 0xF9 | ((bits << 1) & 0x06) };
103 ++ TByte lockTarget [2] = { 'l', static_cast<TByte>(0xF9 | ((bits << 1) & 0x06)) };
104 + Send (lockTarget, 2, 1);
105 + CheckResponse(lockTarget [0]);
106 + Info(1, "Writing lock bits ...\nReinitializing device\n");
107 +--- a/src/AvrDummy.C
108 ++++ b/src/AvrDummy.C
109 +@@ -81,12 +81,12 @@
110 + TAvrDummy::GetPartInfo(TAddr addr)
111 + {
112 + if (at89) {
113 +- TByte info [4] = { 0x28, addr & 0x1f, 0, 0 };
114 ++ TByte info [4] = { 0x28, static_cast<TByte>(addr & 0x1f), 0, 0 };
115 + Send(info, 4);
116 + return info[3];
117 + }
118 +
119 +- TByte info [4] = { 0x30, 0, addr, 0 };
120 ++ TByte info [4] = { 0x30, 0, static_cast<TByte>(addr), 0 };
121 + Send(info, 4);
122 + return info[3];
123 + }
124 +@@ -289,7 +289,7 @@
125 + void
126 + TAvrDummy::WriteOldFuseBits(TByte val)
127 + {
128 +- TByte oldfuse[4] = { 0xAC, (val & 0x1F) | 0xA0, 0, 0xD2 };
129 ++ TByte oldfuse[4] = { 0xAC, static_cast<TByte>((val & 0x1F) | 0xA0), 0, 0xD2 };
130 + Send(oldfuse, 4);
131 + }
132 +
133 +@@ -533,7 +533,7 @@
134 + {
135 + /* This handles both old (byte 2, bits 1-2)
136 + and new (byte 4, bits 0-5) devices. */
137 +- TByte lock[4] = { 0xAC, 0xF9 | ((bits << 1) & 0x06), 0xFF, bits };
138 ++ TByte lock[4] = { 0xAC, static_cast<TByte>(0xF9 | ((bits << 1) & 0x06)), 0xFF, bits };
139 + TByte rbits;
140 +
141 + if (at89)
142 +--- a/src/Stk500.C
143 ++++ b/src/Stk500.C
144 +@@ -518,7 +518,7 @@
145 +
146 + TByte TStk500::ReadCalFuseBits(int addr)
147 + {
148 +- TByte cmd[] = { 0x38, 0x00, addr, 0x00 };
149 ++ TByte cmd[] = { 0x38, 0x00, static_cast<TByte>(addr), 0x00 };
150 +
151 + return UniversalCmd(cmd);
152 + }
153
154 diff --git a/dev-embedded/uisp/files/mega-48-88-168.patch b/dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch
155 similarity index 100%
156 rename from dev-embedded/uisp/files/mega-48-88-168.patch
157 rename to dev-embedded/uisp/files/uisp-20050207-mega-48-88-168.patch
158
159 diff --git a/dev-embedded/uisp/uisp-20050207-r1.ebuild b/dev-embedded/uisp/uisp-20050207-r1.ebuild
160 index 2a92a428cdd..3db55410303 100644
161 --- a/dev-embedded/uisp/uisp-20050207-r1.ebuild
162 +++ b/dev-embedded/uisp/uisp-20050207-r1.ebuild
163 @@ -1,9 +1,9 @@
164 -# Copyright 1999-2017 Gentoo Foundation
165 +# Copyright 1999-2020 Gentoo Authors
166 # Distributed under the terms of the GNU General Public License v2
167
168 -EAPI="4"
169 +EAPI=7
170
171 -inherit eutils
172 +inherit autotools
173
174 DESCRIPTION="Tool for programming AVR microcontroller through the parallel port"
175 HOMEPAGE="https://savannah.nongnu.org/projects/uisp"
176 @@ -12,17 +12,19 @@ SRC_URI="https://savannah.nongnu.org/download/uisp/${P}.tar.gz"
177 LICENSE="GPL-2"
178 SLOT="0"
179 KEYWORDS="amd64 ~ppc x86"
180 -IUSE=""
181 +
182 +PATCHES=(
183 + "${FILESDIR}"/${P}-autotools.patch
184 + "${FILESDIR}"/${P}-mega-48-88-168.patch
185 + "${FILESDIR}"/${P}-clang.patch
186 +)
187
188 src_prepare() {
189 - sed -i -e "/^DOC_INST_DIR/s:/[^/]*$:/${PF}:" Makefile.in || die
190 - cd src
191 - epatch "${FILESDIR}"/mega-48-88-168.patch
192 - sed -i -e 's: -Werror::' Makefile.in || die
193 + default
194 + eautoreconf
195 }
196
197 src_install() {
198 default
199 - dodoc doc/*
200 - rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
201 + dodoc -r doc/.
202 }