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. Work is in progress on supporting the Microchip PIC16 and PIC18 targets. It can be retargeted for other microprocessors. Version 3.5.0 is out since the 24 June 2015 Reproducible: Always
Created attachment 406048 [details] ebuild for dev-embedded/sdcc-3.5.0
The attached ebuild is a rewritten ebuild from (really) old one and add choice for user to enable the wanted microcontrollers ports. There's also the USE flag "non-free" that enable the installation of PIC port libs from MICROCHIP. Compiles fine on ~amd64.
I forgot to mention that of course this line in ebuild : >=dev-embedded/gputils-1.4.0-r1 can be for backward compatibility replaced by : dev-embedded/gputils I've opened a bug for latest version of gputils-1.4.0, it just add more and recent devices support.
Created attachment 406156 [details] dev-embedded/sdcc-3.5.0.ebuild There are a few issues with this that need to be fixed. 1) in src_install: find "${D}" -name .deps -exec rm -rf {} + Is that required? If it is, there needs to be an || die at the end, if its not required just remove it. What are the .deps files for? 2) the non-free useflag, does it affect LICENSE? It almost certainly does so you need to figure out what license and then do: LICENSE="GPL-2 non-free? ( FOO )" 3) The new use-flags need to have a description in the metadata.xml. Also, are the ones that are default (+) a good set? are the ones that are not enabled by default not as common? 4) libraries in DEPENDS should usually have subslot deps (:= at the end) so when the lib is updated things get rebuilt. Good work so far tho :)
Created attachment 406510 [details, diff] Patch for sdcc-3.5.0.ebuild >1) in src_install: find "${D}" -name .deps -exec rm -rf {} + >Is that required? If it is, there needs to be an || die at the end, if its not required >just remove it. What are the .deps files for? This is required because some Makefiles generate theses directory with *.Po files that contains only "# dummy" inside. So that is a quicker way of remove them than find where is that generated and from wich Makefile.* >2) the non-free useflag, does it affect LICENSE? It almost certainly does so you >need to figure out what license and then do: LICENSE="GPL-2 non-free? ( FOO )" Found the GPL-2-with-exceptions that fits like a charm with the non-free part. I also added the ZLIB license because of the "makebin" included in the suite and the "public-domain" one required for packihx. >3) The new use-flags need to have a description in the metadata.xml. Also, >are the ones that are default (+) a good set? are the ones that are not >enabled by default not as common? Fixed in the attached patch, but be aware that without device-lib you wont be able to compile anything with PICs ports :). For boehm-gc, I left it as it was in oldest ebuild as it looks to be some kind of optimization. And sdcpp, it may not be required but only in special cases. >4) libraries in DEPENDS should usually have subslot deps (:= at the end) so >when the lib is updated things get rebuilt. I've added it to others dependency, but I'm not sure about the dev-libs/boost, as it is required for built runtime only.
Created attachment 406512 [details] USE flags description file
+ 12 Jul 2015; Jason Zaman <perfinion@gentoo.org> license_groups: + Add MicroChip-SDCC license to BINARY-REDISTRIBUTABLE + 12 Jul 2015; Jason Zaman perfinion@gentoo.org +sdcc-3.5.0.ebuild, + metadata.xml: + version bump bug 553754, thanks to Tiger All committed now, thanks! (In reply to Tiger from comment #5) > >2) the non-free useflag, does it affect LICENSE? It almost certainly does so you >need to figure out what license and then do: LICENSE="GPL-2 non-free? ( FOO )" > > Found the GPL-2-with-exceptions that fits like a charm with the non-free > part. > I also added the ZLIB license because of the "makebin" included in the > suite and the "public-domain" one required for packihx. I checked with ulm regarding this. "GPL-with-exceptions" is not right. That is a specific license that does not match the one in the header files. I added the section from the headers as a new license called MicroChip-SDCC. (In reply to Tiger from comment #6) > Created attachment 406512 [details] > USE flags description file One of the closing tags was missing, I fixed it. for future reference, repoman full --xmlparse will check the file
*** Bug 344535 has been marked as a duplicate of this bug. ***
*** Bug 456828 has been marked as a duplicate of this bug. ***
Commit message: Clean up style in new ebuild http://sources.gentoo.org/dev-embedded/sdcc/sdcc-3.5.0.ebuild?r1=1.1&r2=1.2
Commit message: Drop redundant --prefix and fix --docdir definition http://sources.gentoo.org/dev-embedded/sdcc/sdcc-3.5.0.ebuild?r1=1.2&r2=1.3
Commit message: Restore combined live/non-live ebuild logic http://sources.gentoo.org/dev-embedded/sdcc/sdcc-3.5.0.ebuild?r1=1.3&r2=1.4
Commit message: Restore USE=doc support http://sources.gentoo.org/dev-embedded/sdcc/sdcc-3.5.0.ebuild?r1=1.4&r2=1.5
Commit message: Revert invalid CTARGET munging and restore proper stripping logic -- the scanelf ar warning is fixed with newer pax-utils http://sources.gentoo.org/dev-embedded/sdcc/sdcc-3.5.0.ebuild?r1=1.9&r2=1.10
Commit message: Fix up depend settings (gperf is only needed at compile time & readline should use the 0 SLOT), and restore min gputils version and sdcc-svn blocker; also sync the live/release ebuilds http://sources.gentoo.org/dev-embedded/sdcc/sdcc-3.5.0.ebuild?r1=1.10&r2=1.11 http://sources.gentoo.org/dev-embedded/sdcc/sdcc-9999.ebuild?r1=1.8&r2=1.9
Commit message: Revert style change w/find+sed as the indented flags are for sed, not find http://sources.gentoo.org/dev-embedded/sdcc/sdcc-3.5.0.ebuild?r1=1.11&r2=1.12