1 |
commit: 61f1fce51e90b1832f5df8da028c4167f409a6f6 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 18 23:43:14 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 18 23:49:07 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61f1fce5 |
7 |
|
8 |
dev-embedded/sdcc: update to EAPI=7, use dostrip |
9 |
|
10 |
Package-Manager: Portage-2.3.60, Repoman-2.3.12 |
11 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
12 |
|
13 |
dev-embedded/sdcc/sdcc-3.8.0-r1.ebuild | 133 +++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 133 insertions(+) |
15 |
|
16 |
diff --git a/dev-embedded/sdcc/sdcc-3.8.0-r1.ebuild b/dev-embedded/sdcc/sdcc-3.8.0-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..7e84d1c8b75 |
19 |
--- /dev/null |
20 |
+++ b/dev-embedded/sdcc/sdcc-3.8.0-r1.ebuild |
21 |
@@ -0,0 +1,133 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+inherit autotools toolchain-funcs |
27 |
+ |
28 |
+if [[ ${PV} == "9999" ]] ; then |
29 |
+ ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc" |
30 |
+ inherit subversion |
31 |
+else |
32 |
+ SRC_URI=" |
33 |
+ mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2 |
34 |
+ doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 ) |
35 |
+ " |
36 |
+ KEYWORDS="~amd64 ~x86" |
37 |
+fi |
38 |
+ |
39 |
+DESCRIPTION="Small device C compiler (for various microprocessors)" |
40 |
+HOMEPAGE="http://sdcc.sourceforge.net/" |
41 |
+ |
42 |
+LICENSE=" |
43 |
+ GPL-2 ZLIB |
44 |
+ non-free? ( MicroChip-SDCC ) |
45 |
+ packihx? ( public-domain ) |
46 |
+" |
47 |
+SLOT="0" |
48 |
+SDCC_PORTS=" |
49 |
+ avr ds390 ds400 gbz80 hc08 mcs51 pic14 pic16 r2k r3ka s08 stm8 tlcs90 z180 |
50 |
+ z80 |
51 |
+" |
52 |
+IUSE=" |
53 |
+ ${SDCC_PORTS} |
54 |
+ +boehm-gc device-lib doc non-free packihx sdbinutils sdcdb +sdcpp ucsim |
55 |
+" |
56 |
+ |
57 |
+REQUIRED_USE=" |
58 |
+ ds390? ( sdbinutils ) |
59 |
+ ds400? ( sdbinutils ) |
60 |
+ hc08? ( sdbinutils ) |
61 |
+ mcs51? ( sdbinutils ) |
62 |
+ s08? ( sdbinutils ) |
63 |
+ || ( ${SDCC_PORTS} ) |
64 |
+" |
65 |
+ |
66 |
+RESTRICT="strip" |
67 |
+ |
68 |
+RDEPEND=" |
69 |
+ dev-libs/boost:= |
70 |
+ sys-libs/ncurses:= |
71 |
+ sys-libs/readline:0= |
72 |
+ >=dev-embedded/gputils-0.13.7 |
73 |
+ boehm-gc? ( dev-libs/boehm-gc:= ) |
74 |
+ !dev-embedded/sdcc-svn |
75 |
+" |
76 |
+DEPEND=" |
77 |
+ ${RDEPEND} |
78 |
+ dev-util/gperf |
79 |
+" |
80 |
+PATCHES=( |
81 |
+ "${FILESDIR}"/${PN}-3.8.0-override-override.patch |
82 |
+) |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ # Fix conflicting variable names between Gentoo and sdcc |
86 |
+ find \ |
87 |
+ '(' -name 'Makefile*.in' -o -name 'configure' ')' \ |
88 |
+ -exec sed -r -i \ |
89 |
+ -e 's:\<(PORTDIR|ARCH)\>:SDCC\1:g' \ |
90 |
+ {} + || die |
91 |
+ |
92 |
+ # https://sourceforge.net/p/sdcc/bugs/2398/ |
93 |
+ sed -i -e '1iAR = @AR@' Makefile.common.in || die |
94 |
+ sed -i \ |
95 |
+ -e "/^AR =/s:=.*:=$(tc-getAR):" \ |
96 |
+ support/cpp/Makefile.in || die |
97 |
+ |
98 |
+ # Make sure timestamps don't get messed up. |
99 |
+ [[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} + |
100 |
+ |
101 |
+ default |
102 |
+ eautoreconf |
103 |
+} |
104 |
+ |
105 |
+src_configure() { |
106 |
+ # sdbinutils subdir doesn't pass down --docdir properly, so need to |
107 |
+ # expand $(datarootdir) ourselves. |
108 |
+ econf \ |
109 |
+ ac_cv_prog_AR="$(tc-getAR)" \ |
110 |
+ ac_cv_prog_AS="$(tc-getAS)" \ |
111 |
+ ac_cv_prog_STRIP=true \ |
112 |
+ $(use_enable avr avr-port) \ |
113 |
+ $(use_enable boehm-gc libgc) \ |
114 |
+ $(use_enable device-lib) \ |
115 |
+ $(use_enable ds390 ds390-port) \ |
116 |
+ $(use_enable ds400 ds400-port) \ |
117 |
+ $(use_enable gbz80 gbz80-port) \ |
118 |
+ $(use_enable hc08 hc08-port) \ |
119 |
+ $(use_enable mcs51 mcs51-port) \ |
120 |
+ $(use_enable non-free) \ |
121 |
+ $(use_enable packihx) \ |
122 |
+ $(use_enable pic14 pic14-port) \ |
123 |
+ $(use_enable pic16 pic16-port) \ |
124 |
+ $(use_enable r2k r2k-port) \ |
125 |
+ $(use_enable r3ka r3ka-port) \ |
126 |
+ $(use_enable s08 s08-port) \ |
127 |
+ $(use_enable sdbinutils) \ |
128 |
+ $(use_enable sdcdb) \ |
129 |
+ $(use_enable sdcpp) \ |
130 |
+ $(use_enable stm8 stm8-port) \ |
131 |
+ $(use_enable tlcs90 tlcs90-port) \ |
132 |
+ $(use_enable ucsim) \ |
133 |
+ $(use_enable z180 z180-port) \ |
134 |
+ $(use_enable z80 z80-port) \ |
135 |
+ --disable-doc \ |
136 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
137 |
+ --without-ccache |
138 |
+} |
139 |
+ |
140 |
+src_install() { |
141 |
+ default |
142 |
+ dodoc doc/*.txt |
143 |
+ find "${D}" -name .deps -exec rm -rf {} + || die |
144 |
+ |
145 |
+ if use doc && [[ ${PV} != "9999" ]]; then |
146 |
+ cd "${WORKDIR}"/doc |
147 |
+ dodoc -r * |
148 |
+ fi |
149 |
+ |
150 |
+ # a bunch of archives (*.a) are built & installed by gputils |
151 |
+ # for PIC processors, but they do not work with standard `ar` |
152 |
+ # & `scanelf` utils and they're not for the host. |
153 |
+ dostrip "${D%/}"/usr/bin |
154 |
+} |