Updated SDCC

This commit is contained in:
layman 2022-07-29 17:25:36 +02:00
parent 670bbbea18
commit 4fed63b001
5 changed files with 361 additions and 141 deletions

View File

@ -1,12 +1,13 @@
AUX sdcc-3.8.0-override-override.patch 1078 BLAKE2B f1e1e135b9ee972e8f7f6a08af736de227c8534d181f160b00f6eecef0e7f4366e39fc5a8f6034bfffa64531423d28377c778055d6be8671527971ce183ebab5 SHA512 fbc13832bea859409f2ae525a82927424dd474db9c6077d1311b9775d0a4a8728d79db7465c928271faa54221b53982ee539537e4fe8a70209c0f453b95105aa AUX sdcc-3.8.0-override-override.patch 1078 BLAKE2B f1e1e135b9ee972e8f7f6a08af736de227c8534d181f160b00f6eecef0e7f4366e39fc5a8f6034bfffa64531423d28377c778055d6be8671527971ce183ebab5 SHA512 fbc13832bea859409f2ae525a82927424dd474db9c6077d1311b9775d0a4a8728d79db7465c928271faa54221b53982ee539537e4fe8a70209c0f453b95105aa
DIST sdcc-doc-3.6.0.tar.bz2 1016273 BLAKE2B e2f0f90cfe47f08466c859ba63efe85a5047139c0cc4394148c0d78b84d2ee9ad64611279bad8bd92fda9dd67d22a65bd10fadc4142c2817510f075c26d0c55b SHA512 3fce1508e10321f00d209fc25c716a08726c3fd5c714c727b8db458da81450463a67f40079f310c1e4236dda7bb8873223f1b77414a8e1a3df19b6ed52baddbd
DIST sdcc-doc-4.0.0.tar.bz2 980999 BLAKE2B 6f9478c095e6b4fec27c6ab7a10a8564ae46d754709848b3a7a26a7a2dfecd3833ce3cfe7a41f9033b5a34a1b6e962090d91c9688294dd347e1c98658761c019 SHA512 83bed77b46ad2f028725a3ffe6090d71185f73d4e99c241e7ebd1c509ba1be1911f4b9130c344fa4eb928f48122179b6b71e9d5a27d9f18ff74017c61fae77ff DIST sdcc-doc-4.0.0.tar.bz2 980999 BLAKE2B 6f9478c095e6b4fec27c6ab7a10a8564ae46d754709848b3a7a26a7a2dfecd3833ce3cfe7a41f9033b5a34a1b6e962090d91c9688294dd347e1c98658761c019 SHA512 83bed77b46ad2f028725a3ffe6090d71185f73d4e99c241e7ebd1c509ba1be1911f4b9130c344fa4eb928f48122179b6b71e9d5a27d9f18ff74017c61fae77ff
DIST sdcc-doc-4.1.0.tar.bz2 991207 BLAKE2B fd1ab82c8cc65031a8231bc4aba1e0562ed4b3178612a4d915568cb5600ba9159d89f905e261e860da9e0f4aa5a24fbd7ab1364f2f9f7b3078bcf3aa01d71ba5 SHA512 01686e590d0168108099d3c6c9bdb0885a25abccc9b6c87739eafec7103054424da1a5960a8d4566462dca9bf00cdd8b103ab6026523833d9aaa4d4bcdc5b620 DIST sdcc-doc-4.1.0.tar.bz2 991207 BLAKE2B fd1ab82c8cc65031a8231bc4aba1e0562ed4b3178612a4d915568cb5600ba9159d89f905e261e860da9e0f4aa5a24fbd7ab1364f2f9f7b3078bcf3aa01d71ba5 SHA512 01686e590d0168108099d3c6c9bdb0885a25abccc9b6c87739eafec7103054424da1a5960a8d4566462dca9bf00cdd8b103ab6026523833d9aaa4d4bcdc5b620
DIST sdcc-src-3.6.0.tar.bz2 17993788 BLAKE2B 2a03e5f8d270206812c9f66334bf1c20dd8c5824e16db1bf0b0e31c6b8d0d7d6f582d942f61e00320442ed4f48577fc404e1917fc5b2733bba86de246d3e9743 SHA512 fd05cf13f7acf0b71a35a99f99dc6ef8abcb4f41fbe1ab0cf25348842b57317217410b4a521ea1a70db93d8e7e4e6dac272ec14d893cdbcfa584ee963f42ad2f DIST sdcc-doc-4.2.0.tar.bz2 1244684 BLAKE2B d6ee4001ee0d2dde61dd1e8567499909fa6373eac93f3731fa1d6628f6e488742cc0798b1ebb908769d4cc52e091d4d685b3891d7c15a519294240643e528b02 SHA512 8494de35991e9a38ca138545b7c2396d353b21d67a4f321afa9187a5c117c6ce7d3c0850e95c981ccc7a3c8fa1e470f5e2351b84ccbe1634b1f8bf085cd45f76
DIST sdcc-src-4.0.0.tar.bz2 19204540 BLAKE2B 2192a7dc7418826440209dd8c7a73fd5ced491b799975b953368daeabb429327a6c518a1212a2fd49c34c6e5ab7d84f240cbf6ff8b3779e2d38f5ad81499ee71 SHA512 41a92711a9278261879caec1a01425104b7c75346b3c6ad9617cab025309c9b38f79eea2d04122f5ae6ce273fcd61fbde8a0d23756313a4593394230b51a1d4c DIST sdcc-src-4.0.0.tar.bz2 19204540 BLAKE2B 2192a7dc7418826440209dd8c7a73fd5ced491b799975b953368daeabb429327a6c518a1212a2fd49c34c6e5ab7d84f240cbf6ff8b3779e2d38f5ad81499ee71 SHA512 41a92711a9278261879caec1a01425104b7c75346b3c6ad9617cab025309c9b38f79eea2d04122f5ae6ce273fcd61fbde8a0d23756313a4593394230b51a1d4c
DIST sdcc-src-4.1.0.tar.bz2 19400609 BLAKE2B 9754d70026af595a5456f0d7c1b375df2716c6400ca59affcadbfd3588f4d51c45a3d52c235d6efc9b7512b5f94f023d8d2964cc0365cdff4586edf71fc51af1 SHA512 a9c3fee427cbc66b56a286c8d66b2922f79c9dfb42d2ed2843b2e192a6b314a04de4c82f1083d8625b49756b5f1d99f8fb706402b5f1284110760ec346303779 DIST sdcc-src-4.1.0.tar.bz2 19400609 BLAKE2B 9754d70026af595a5456f0d7c1b375df2716c6400ca59affcadbfd3588f4d51c45a3d52c235d6efc9b7512b5f94f023d8d2964cc0365cdff4586edf71fc51af1 SHA512 a9c3fee427cbc66b56a286c8d66b2922f79c9dfb42d2ed2843b2e192a6b314a04de4c82f1083d8625b49756b5f1d99f8fb706402b5f1284110760ec346303779
EBUILD sdcc-3.6.0.ebuild 3306 BLAKE2B 625516717c5a0347d31cc8abf2e23287d922f15e68a994e3e768ccb4b1324e9c4aa8a90fc9ba0a89e65637a5668e45ab33af8072136e92f6b0ebe027183bc352 SHA512 f770eda02c29b97b536114ee672c8d8cf47c286bd6f5c5f1bb05cda61d57afda8724938228696e04e352e472ebf661857d9ad714b31c9c8c997f37f0fefa8564 DIST sdcc-src-4.2.0.tar.bz2 19662367 BLAKE2B a11d6b3af2552e0508bb1d0644d3e6db385634237fc93079716a5e3aa710bac25fd888e10dce76e6891ebe524f4d81d8318492001d8ce9ade0ef16d114adf14b SHA512 7ca4037d526b5fed7bbca4433835d0299ced7315dd69c1ec66cff873ec7caa41b69927363bf5850e2ad4f27ef6286e57f9ccd40bb6792308be6c3073c5238cba
EBUILD sdcc-4.0.0-r1.ebuild 3521 BLAKE2B 48ad40b6ffc3271110075e3ba18c468335d24eed4c15c7580f257fd6261890529a95e5291b205be3ce2480436371bcb00141a7e99bccdbecc2ef7a39d6f65d20 SHA512 4a84125b1c5193eb618b76bd7ca6c948f6204dba654c1209513214bf9a01698c49b6163f8433150b2c149529484300d157baa8adfa681f1aee801f3c514fed3e EBUILD sdcc-4.0.0-r1.ebuild 3521 BLAKE2B 48ad40b6ffc3271110075e3ba18c468335d24eed4c15c7580f257fd6261890529a95e5291b205be3ce2480436371bcb00141a7e99bccdbecc2ef7a39d6f65d20 SHA512 4a84125b1c5193eb618b76bd7ca6c948f6204dba654c1209513214bf9a01698c49b6163f8433150b2c149529484300d157baa8adfa681f1aee801f3c514fed3e
EBUILD sdcc-4.0.0.ebuild 3467 BLAKE2B f91878482f72eb29c13fbd59ff1689254612dca9d249323e44264ef1d4b332fa7801da0207ebd7f54bf40c454023a696cf0c31720a043456d9ab5f31b81013b0 SHA512 21222a73d804a3f56c36845ae4ea0dad4319df6550c0081c82d740b8aeaeb16fe03451fbe27ce5a97b63e4854fee299b3876b9fcd08fb5872ed0a02476eade30 EBUILD sdcc-4.0.0.ebuild 3467 BLAKE2B f91878482f72eb29c13fbd59ff1689254612dca9d249323e44264ef1d4b332fa7801da0207ebd7f54bf40c454023a696cf0c31720a043456d9ab5f31b81013b0 SHA512 21222a73d804a3f56c36845ae4ea0dad4319df6550c0081c82d740b8aeaeb16fe03451fbe27ce5a97b63e4854fee299b3876b9fcd08fb5872ed0a02476eade30
EBUILD sdcc-4.1.0.ebuild 3677 BLAKE2B d34aab5e78d263f0fb2f48755b40b5ef533fb64a5c3119da3c32eaa904f2a31b2dcb5e01ecaedbe98962fccc684ffd25955e1c6a6851d32251da5522b96007f4 SHA512 255c826df7458b7b834626e15a75ef4e129fd7f0516e84f551af0032395f905183e5867fab6e8b46ce4be82393cbf5d834722bae6588cadcde2412e585fae5ef EBUILD sdcc-4.1.0.ebuild 3677 BLAKE2B d34aab5e78d263f0fb2f48755b40b5ef533fb64a5c3119da3c32eaa904f2a31b2dcb5e01ecaedbe98962fccc684ffd25955e1c6a6851d32251da5522b96007f4 SHA512 255c826df7458b7b834626e15a75ef4e129fd7f0516e84f551af0032395f905183e5867fab6e8b46ce4be82393cbf5d834722bae6588cadcde2412e585fae5ef
MISC metadata.xml 2212 BLAKE2B 23e83037b2a6e932760e7f0eafdd34230c035dd5a5833335db0ea9c4c1e04e62e69a920e2c2f3492d45ddc014c76450ad05b4d7794d66cca261e294ac20555a0 SHA512 4af2667ae3006548904e9e13894a49c277744d6876e0a99c99e8ea2e89c9e3fc277cf851ae0856b3c3b64f41ef7fd7c255f1bb4f9f42de8917aad7c59e25a0f0 EBUILD sdcc-4.2.0.ebuild 3817 BLAKE2B e4d3cab1212cd1499ada220607e0d3cc77a6812253202ad18ee13c694be314750e3753ff7b2d6f4814e37871c877f5959aab66eec3c9c5c53796de2303094e55 SHA512 887b1968d49a38a334ffc0ae49bf6fa1d4122a2a41eb9dc9596bf620c0a938874220e65e1b6dda000fa43ff20ab7dfcc3190ba8de95bf3a353aaa3eaee4f0e88
EBUILD sdcc-9999.ebuild 3663 BLAKE2B 67e9547414cac809cda9ca2a11fd1b45bb58902f2e6d13a417b2ab78e4fa60ffbd9fab02779579c4ffd56f85f187b24601450b1f79a26146c66ca41281aab708 SHA512 6690382b974b13930073042c7fddac7b04ee92b60d6453a9bfed48a369aea4fcdd8ef3108c71d60e8602245c8b09eb65f0383307d46eaad9267c4602dbf5b921
MISC metadata.xml 2888 BLAKE2B bf15f465cbe744c110b98ae15726fbd9ea1fb6544d5ff7a53d479b6003de937eeb79a1d2f620a92945c285557353a4fff4063e57f25f5dbe8cf908cc3b5885f3 SHA512 71067fd414aefa5d5cf3855b0295c97cfcfeef4d49c987af2c71c1782234fdc2f13e91322feecfff8238751c093569335c3e3e2ee6888c8bd553cbdee4482162

View File

@ -1,12 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata> <pkgmetadata>
<maintainer type="project"> <maintainer type="project">
<email>embedded@gentoo.org</email> <email>embedded@gentoo.org</email>
<name>Embedded Gentoo</name> <name>Embedded Gentoo</name>
</maintainer> </maintainer>
<longdescription> <longdescription>
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based (hc08, s08), Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8. It can be retargeted for other microprocessors. SDCC is a retargettable, optimizing ANSI - C compiler suite that targets the
Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
(formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based
(hc08, s08), Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000, Rabbit
3000A, TLCS-90) and STMicroelectronics STM8. It can be retargeted for other
microprocessors.
</longdescription> </longdescription>
<upstream> <upstream>
<remote-id type="sourceforge">sdcc</remote-id> <remote-id type="sourceforge">sdcc</remote-id>
@ -14,25 +19,37 @@ SDCC is a retargettable, optimizing ANSI - C compiler suite that targets the Int
<use> <use>
<flag name="boehm-gc">Enable Hans Boehm's garbage collector <pkg>dev-libs/boehm-gc</pkg></flag> <flag name="boehm-gc">Enable Hans Boehm's garbage collector <pkg>dev-libs/boehm-gc</pkg></flag>
<flag name="device-lib">Enable built of devices libraries</flag> <flag name="device-lib">Enable built of devices libraries</flag>
<flag name="ds390">Add support for Dallas DS390</flag>
<flag name="ds400">Add support for Dallas DS400</flag>
<flag name="gbz80">Add support for Gameboy gbz80</flag>
<flag name="hc08">Add support for Freescale/Motorola HC08 based</flag>
<flag name="mcs51">Add support for Intel mcs51</flag>
<flag name="non-free">Enable non-free runtime library parts</flag> <flag name="non-free">Enable non-free runtime library parts</flag>
<flag name="packihx">Enable Intel HEX files pack utility</flag> <flag name="packihx">Enable Intel HEX files pack utility</flag>
<flag name="pic14">Add support for Microchip 14 bits PICs</flag>
<flag name="pic16">Add support for Microchip 16 bits PICs</flag>
<flag name="r2k">Add support for Rabbit 2000</flag>
<flag name="r3ka">Add support for Rabbit 3000A</flag>
<flag name="s08">Add support for Freescale/Motorola S08</flag>
<flag name="sdbinutils">Enable SDCC library archive utilities sdar, sdranlib, sdnm</flag> <flag name="sdbinutils">Enable SDCC library archive utilities sdar, sdranlib, sdnm</flag>
<flag name="sdcdb">Enable SDCC source level debugger</flag> <flag name="sdcdb">Enable SDCC source level debugger</flag>
<flag name="sdcpp">Enable SDCC preprocessor based on GCC cpp</flag> <flag name="sdcpp">Enable SDCC preprocessor based on GCC cpp</flag>
<flag name="stm8">Add support for STMicroelectronics STM8</flag>
<flag name="tlcs90">Add support for TLCS-90</flag>
<flag name="ucsim">Enable software simulator for microcontrollers</flag> <flag name="ucsim">Enable software simulator for microcontrollers</flag>
<flag name="z180">Add support for Zilog Z180</flag>
<!-- ports in order defined by configure.ac -->
<flag name="avr">Add support for AVR -- not supported upstream</flag>
<flag name="mcs51">Add support for Intel mcs51</flag>
<flag name="z80">Add support for Zilog Z80</flag> <flag name="z80">Add support for Zilog Z80</flag>
<flag name="z180">Add support for Zilog Z180</flag>
<flag name="r2k">Add support for Rabbit 2000</flag>
<flag name="r2ka">Add support for Rabbit 2000A</flag>
<flag name="r3ka">Add support for Rabbit 3000A</flag>
<flag name="sm83">Add support for Sharp LR35902 (Gameboy CPU, previously known as gbz80)</flag>
<flag name="tlcs90">Add support for TLCS-90</flag>
<flag name="ez80-z80">Add support for EZ80-Z80</flag>
<flag name="z80n">Add support for Zilog Z80N</flag>
<flag name="ds390">Add support for Dallas DS390</flag>
<flag name="ds400">Add support for Dallas DS400</flag>
<flag name="pic14">Add support for Microchip 14 bits PICs</flag>
<flag name="pic16">Add support for Microchip 16 bits PICs</flag>
<flag name="hc08">Add support for Freescale/Motorola HC08 based</flag>
<flag name="s08">Add support for Freescale/Motorola S08</flag>
<flag name="stm8">Add support for STMicroelectronics STM8</flag>
<flag name="pdk13">Add support for PDK13</flag>
<flag name="pdk14">Add support for PDK14</flag>
<flag name="pdk15">Add support for PDK15</flag>
<flag name="pdk16">Add support for PDK16</flag>
<flag name="mos6502">Add support for MOS 6502 (in-development)</flag>
<flag name="mos65c02">Add support for WDC 65C02 (in-development)</flag>
</use> </use>
</pkgmetadata> </pkgmetadata>

View File

@ -1,122 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
inherit eutils toolchain-funcs
if [[ ${PV} == "9999" ]] ; then
ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc"
inherit subversion
docs_compile() { return 0; }
else
SRC_URI="mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )"
KEYWORDS="~amd64 ~ppc ~x86"
docs_compile() { return 1; }
fi
DESCRIPTION="Small device C compiler (for various microprocessors)"
HOMEPAGE="http://sdcc.sourceforge.net/"
LICENSE="GPL-2 ZLIB
non-free? ( MicroChip-SDCC )
packihx? ( public-domain )"
SLOT="0"
IUSE="mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
ucsim device-lib packihx +sdcpp sdcdb sdbinutils non-free +boehm-gc doc"
REQUIRED_USE="
mcs51? ( sdbinutils )
ds390? ( sdbinutils )
ds400? ( sdbinutils )
hc08? ( sdbinutils )
s08? ( sdbinutils )"
RESTRICT="strip"
RDEPEND="dev-libs/boost:=
sys-libs/ncurses:=
sys-libs/readline:0=
>=dev-embedded/gputils-0.13.7
boehm-gc? ( dev-libs/boehm-gc:= )
!dev-embedded/sdcc-svn"
DEPEND="${RDEPEND}
dev-util/gperf"
if docs_compile ; then
DEPEND+="
doc? (
>=app-office/lyx-1.3.4
dev-tex/latex2html
)"
fi
src_prepare() {
# Fix conflicting variable names between Gentoo and sdcc
find \
'(' -name 'Makefile*.in' -o -name 'configure' ')' \
-exec sed -r -i \
-e 's:\<(PORTDIR|ARCH)\>:SDCC\1:g' \
{} + || die
# https://sourceforge.net/p/sdcc/bugs/2398/
sed -i '1iAR = @AR@' Makefile.common.in || die
sed -i \
-e "/^AR =/s:=.*:=$(tc-getAR):" \
support/cpp/Makefile.in || die
# Make sure timestamps don't get messed up.
[[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} +
}
src_configure() {
# sdbinutils subdir doesn't pass down --docdir properly, so need to
# expand $(datarootdir) ourselves.
econf \
ac_cv_prog_STRIP=true \
ac_cv_prog_AS="$(tc-getAS)" \
ac_cv_prog_AR="$(tc-getAR)" \
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
--without-ccache \
$(use_enable mcs51 mcs51-port) \
$(use_enable z80 z80-port) \
$(use_enable z180 z180-port) \
$(use_enable r2k r2k-port) \
$(use_enable r3ka r3ka-port) \
$(use_enable gbz80 gbz80-port) \
$(use_enable tlcs90 tlcs90-port) \
$(use_enable ds390 ds390-port) \
$(use_enable ds400 ds400-port) \
$(use_enable pic14 pic14-port) \
$(use_enable pic16 pic16-port) \
$(use_enable hc08 hc08-port) \
$(use_enable s08 s08-port) \
$(use_enable stm8 stm8-port) \
$(use_enable ucsim ucsim) \
$(use_enable device-lib device-lib) \
$(use_enable packihx packihx) \
$(use_enable sdcpp sdcpp) \
$(use_enable sdcdb sdcdb) \
$(use_enable sdbinutils sdbinutils) \
$(use_enable non-free non-free) \
$(use_enable boehm-gc libgc) \
$(docs_compile && use_enable doc || echo --disable-doc)
}
src_install() {
default
dodoc doc/*.txt
find "${D}" -name .deps -exec rm -rf {} + || die
if use doc ; then
docs_compile || cd "${WORKDIR}"/doc
dohtml -r *
fi
rm "${D}"/usr/share/info/bfd.info
# a bunch of archives (*.a) are built & installed by gputils
# for PIC processors, but they do not work with standard `ar`
# & `scanelf` utils and they're not for the host.
env RESTRICT="" prepstrip "${D%/}"/usr/bin
}

View File

@ -0,0 +1,162 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools toolchain-funcs
if [[ ${PV} == "9999" ]] ; then
ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc"
inherit subversion
else
SRC_URI="
mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )
"
KEYWORDS="~amd64 ~x86"
fi
DESCRIPTION="Small device C compiler (for various microprocessors)"
HOMEPAGE="http://sdcc.sourceforge.net/"
LICENSE="
GPL-2 ZLIB
non-free? ( MicroChip-SDCC )
packihx? ( public-domain )
"
SLOT="0"
# in order of configure.ac's AC_DO_PORT stanzas
SDCC_PORTS="
avr
mcs51
z80 z180
r2k r2ka r3ka
sm83
tlcs90
ez80-z80
z80n
ds390 ds400
pic14 pic16
hc08
s08
stm8
pdk13 pdk14 pdk15 pdk16
mos6502
mos65c02
"
IUSE="
${SDCC_PORTS}
+boehm-gc device-lib doc non-free packihx +sdbinutils sdcdb +sdcpp ucsim
"
for port in ${SDCC_PORTS}; do
REQUIRED_USE="${REQUIRED_USE}
${port}? ( sdbinutils )
"
done
REQUIRED_USE="${REQUIRED_USE}
|| ( ${SDCC_PORTS} )
"
RESTRICT="strip"
RDEPEND="
dev-libs/boost:=
sys-libs/ncurses:=
sys-libs/readline:0=
pic14? ( >=dev-embedded/gputils-0.13.7 )
pic16? ( >=dev-embedded/gputils-0.13.7 )
boehm-gc? ( dev-libs/boehm-gc:= )
!dev-embedded/sdcc-svn
"
DEPEND="
${RDEPEND}
dev-util/gperf
"
PATCHES=(
"${FILESDIR}"/${PN}-3.8.0-override-override.patch
)
src_prepare() {
# Fix conflicting variable names between Gentoo and sdcc
find \
'(' -name 'Makefile*.in' -o -name 'configure' ')' \
-exec sed -r -i \
-e 's:\<(PORTDIR|ARCH)\>:SDCC\1:g' \
{} + || die
# Make sure timestamps don't get messed up.
[[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} +
default
eautoreconf
# Avoid 'bfd.info' rebuild with 'makeinfo': bug #705424
# Build dependencies are: eautoreconf->Makefile.in->bfdver.texi->bfd.info
touch support/sdbinutils/bfd/doc/bfdver.texi || die
touch support/sdbinutils/bfd/doc/bfd.info || die
sed -i -e 's/@CURSES_LIBS@ @LIBS@/@CURSES_LIBS@ @LIBS@ -ltinfo/' \
sim/ucsim/gui.src/serio.src/Makefile.in || die
}
src_configure() {
# sdbinutils subdir doesn't pass down --docdir properly, so need to
# expand $(datarootdir) ourselves.
econf \
ac_cv_prog_AR="$(tc-getAR)" \
ac_cv_prog_AS="$(tc-getAS)" \
ac_cv_prog_STRIP=true \
$(use_enable boehm-gc libgc) \
$(use_enable device-lib) \
$(use_enable non-free) \
$(use_enable packihx) \
$(use_enable sdbinutils) \
$(use_enable sdcdb) \
$(use_enable sdcpp) \
$(use_enable ucsim) \
\
$(use_enable avr avr-port) \
$(use_enable mcs51 mcs51-port) \
$(use_enable z80 z80-port) \
$(use_enable z180 z180-port) \
$(use_enable r2k r2k-port) \
$(use_enable r2ka r2ka-port) \
$(use_enable r3ka r3ka-port) \
$(use_enable sm83 sm83-port) \
$(use_enable tlcs90 tlcs90-port) \
$(use_enable ez80-z80 ez80_z80-port) \
$(use_enable z80n z80n-port) \
$(use_enable ds390 ds390-port) \
$(use_enable ds400 ds400-port) \
$(use_enable pic14 pic14-port) \
$(use_enable pic16 pic16-port) \
$(use_enable hc08 hc08-port) \
$(use_enable s08 s08-port) \
$(use_enable stm8 stm8-port) \
$(use_enable pdk13 pdk13-port) \
$(use_enable pdk14 pdk14-port) \
$(use_enable pdk15 pdk15-port) \
$(use_enable pdk16 pdk16-port) \
$(use_enable mos6502 mos6502-port) \
$(use_enable mos65c02 mos65c02-port) \
\
--disable-doc \
--without-ccache
}
src_install() {
default
dodoc doc/*.txt
find "${D}" -name .deps -exec rm -rf {} + || die
if use doc && [[ ${PV} != "9999" ]]; then
cd "${WORKDIR}"/doc
dodoc -r *
fi
# a bunch of archives (*.a) are built & installed by gputils
# for PIC processors, but they do not work with standard `ar`
# & `scanelf` utils and they're not for the host.
dostrip -x /usr/bin
}

View File

@ -0,0 +1,162 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools toolchain-funcs
if [[ ${PV} == "9999" ]] ; then
ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc"
inherit subversion
else
SRC_URI="
mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )
"
KEYWORDS="~amd64 ~x86"
PATCHES=(
"${FILESDIR}"/${PN}-3.8.0-override-override.patch
)
fi
DESCRIPTION="Small device C compiler (for various microprocessors)"
HOMEPAGE="http://sdcc.sourceforge.net/"
LICENSE="
GPL-2 ZLIB
non-free? ( MicroChip-SDCC )
packihx? ( public-domain )
"
SLOT="0"
# in order of configure.ac's AC_DO_PORT stanzas
SDCC_PORTS="
avr
mcs51
z80 z180
r2k r2ka r3ka
gbz80
tlcs90
ez80-z80
z80n
ds390 ds400
pic14 pic16
hc08
s08
stm8
pdk13 pdk14 pdk15 pdk16
"
IUSE="
${SDCC_PORTS}
+boehm-gc device-lib doc non-free packihx +sdbinutils sdcdb +sdcpp ucsim
"
for port in ${SDCC_PORTS}; do
REQUIRED_USE="${REQUIRED_USE}
${port}? ( sdbinutils )
"
done
REQUIRED_USE="${REQUIRED_USE}
|| ( ${SDCC_PORTS} )
"
RESTRICT="strip"
RDEPEND="
dev-libs/boost:=
sys-libs/ncurses:=
sys-libs/readline:0=
pic14? ( >=dev-embedded/gputils-0.13.7 )
pic16? ( >=dev-embedded/gputils-0.13.7 )
boehm-gc? ( dev-libs/boehm-gc:= )
!dev-embedded/sdcc-svn
"
DEPEND="
${RDEPEND}
dev-util/gperf
"
src_prepare() {
# Fix conflicting variable names between Gentoo and sdcc
find \
'(' -name 'Makefile*.in' -o -name 'configure' ')' \
-exec sed -r -i \
-e 's:\<(PORTDIR|ARCH)\>:SDCC\1:g' \
{} + || die
# Make sure timestamps don't get messed up.
[[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} +
default
eautoreconf
# Avoid 'bfd.info' rebuild with 'makeinfo': bug #705424
# Build dependencies are: eautoreconf->Makefile.in->bfdver.texi->bfd.info
touch support/sdbinutils/bfd/doc/bfdver.texi || die
touch support/sdbinutils/bfd/doc/bfd.info || die
}
src_configure() {
# sdbinutils subdir doesn't pass down --docdir properly, so need to
# expand $(datarootdir) ourselves.
unset ARCH
econf \
ac_cv_prog_AR="$(tc-getAR)" \
ac_cv_prog_AS="$(tc-getAS)" \
ac_cv_prog_STRIP=true \
$(use_enable boehm-gc libgc) \
$(use_enable device-lib) \
$(use_enable non-free) \
$(use_enable packihx) \
$(use_enable sdbinutils) \
$(use_enable sdcdb) \
$(use_enable sdcpp) \
$(use_enable ucsim) \
\
$(use_enable avr avr-port) \
$(use_enable mcs51 mcs51-port) \
$(use_enable z80 z80-port) \
$(use_enable z180 z180-port) \
$(use_enable r2k r2k-port) \
$(use_enable r2ka r2ka-port) \
$(use_enable r3ka r3ka-port) \
$(use_enable gbz80 gbz80-port) \
$(use_enable tlcs90 tlcs90-port) \
$(use_enable ez80-z80 ez80_z80-port) \
$(use_enable z80n z80n-port) \
$(use_enable ds390 ds390-port) \
$(use_enable ds400 ds400-port) \
$(use_enable pic14 pic14-port) \
$(use_enable pic16 pic16-port) \
$(use_enable hc08 hc08-port) \
$(use_enable s08 s08-port) \
$(use_enable stm8 stm8-port) \
$(use_enable pdk13 pdk13-port) \
$(use_enable pdk14 pdk14-port) \
$(use_enable pdk15 pdk15-port) \
$(use_enable pdk16 pdk16-port) \
\
--disable-doc \
--without-ccache
}
#src_compile() {
# unset ARCH
# default
#}
src_install() {
default
dodoc doc/*.txt
find "${D}" -name .deps -exec rm -rf {} + || die
if use doc && [[ ${PV} != "9999" ]]; then
cd "${WORKDIR}"/doc
dodoc -r *
fi
# a bunch of archives (*.a) are built & installed by gputils
# for PIC processors, but they do not work with standard `ar`
# & `scanelf` utils and they're not for the host.
dostrip -x /usr/bin
}