summaryrefslogtreecommitdiff
path: root/dev-embedded/sdcc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-embedded/sdcc
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-embedded/sdcc')
-rw-r--r--dev-embedded/sdcc/Manifest5
-rw-r--r--dev-embedded/sdcc/metadata.xml38
-rw-r--r--dev-embedded/sdcc/sdcc-3.5.0.ebuild120
-rw-r--r--dev-embedded/sdcc/sdcc-9999.ebuild120
4 files changed, 283 insertions, 0 deletions
diff --git a/dev-embedded/sdcc/Manifest b/dev-embedded/sdcc/Manifest
new file mode 100644
index 000000000000..ee166bdc38db
--- /dev/null
+++ b/dev-embedded/sdcc/Manifest
@@ -0,0 +1,5 @@
+DIST sdcc-doc-3.5.0.tar.bz2 1000775 BLAKE2B 30cd31990788060ebc792d98b072d4d72ce72176bf09374084246bfe02a8164ab083fb9cfe7fb6ee246b523dce7163d494f2161eb7537f972408f03bc9541426 SHA512 43de0c19ad538b4495218b04e5ab6a886fd9945c8a82c400e9a53314547f5d6ab0529989274faecc2d954f35f8fe60f338f09f93536b62a305203d2119df597e
+DIST sdcc-src-3.5.0.tar.bz2 10504517 BLAKE2B 16102ebd55026826100b453db20e00fa599ce6ad72f1466c32deb7211f09188048f35ac8ddd5987b7a3ad5fad79f2e2ee833da60e22a26b107c5e9e0e7c9be09 SHA512 a5842945da065ab566b7e073782e92f851da48c160990d49b76ab4773fe1c14286cab399fb7f2456432e4043ee7ce07c3b149aeb103c51f85a33fdc5f8798f4e
+EBUILD sdcc-3.5.0.ebuild 3263 BLAKE2B e52602faa59a8fd9ca9303725dbc5e05f37d90278810eb8aaa8f3c50cf1812d0ecb82ed539a387271a882679a2e3e2632d6162a7a2d69b270d21a1b718665603 SHA512 9a0674bbaf3b347a81862dcdc88c418077f4fbab509b616c31973605a9941096646378ba84c23a7853d067c2b1d3dca27ee6f644de5e3fdcbc6e3c0fce4dfbf1
+EBUILD sdcc-9999.ebuild 3265 BLAKE2B dc989a0a9e967c92726eaddda5b485b4611be831e06b638f4d7f9b918ceb6ac505186ede1b6dbf13b8715842e6b6b57f9505f1961223760d35b187896dd99e37 SHA512 c0cb7a7361d6de1796beec9db92285aab07748ffb80b003811f3d29694a2cf084e3f1fcd7980cefeaf1d719e199ae64a6b364221bf05a8adf48c955090e4d409
+MISC metadata.xml 2212 BLAKE2B 23e83037b2a6e932760e7f0eafdd34230c035dd5a5833335db0ea9c4c1e04e62e69a920e2c2f3492d45ddc014c76450ad05b4d7794d66cca261e294ac20555a0 SHA512 4af2667ae3006548904e9e13894a49c277744d6876e0a99c99e8ea2e89c9e3fc277cf851ae0856b3c3b64f41ef7fd7c255f1bb4f9f42de8917aad7c59e25a0f0
diff --git a/dev-embedded/sdcc/metadata.xml b/dev-embedded/sdcc/metadata.xml
new file mode 100644
index 000000000000..c0f3e2174edd
--- /dev/null
+++ b/dev-embedded/sdcc/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ <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.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">sdcc</remote-id>
+ </upstream>
+ <use>
+ <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="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="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="sdcdb">Enable SDCC source level debugger</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="z180">Add support for Zilog Z180</flag>
+ <flag name="z80">Add support for Zilog Z80</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-embedded/sdcc/sdcc-3.5.0.ebuild b/dev-embedded/sdcc/sdcc-3.5.0.ebuild
new file mode 100644
index 000000000000..3379d7019c12
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-3.5.0.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2018 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 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
+
+ # 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
+}
diff --git a/dev-embedded/sdcc/sdcc-9999.ebuild b/dev-embedded/sdcc/sdcc-9999.ebuild
new file mode 100644
index 000000000000..e0d3b94b8ec6
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-9999.ebuild
@@ -0,0 +1,120 @@
+# 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 ~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
+
+ # 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
+}