summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-embedded
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/arduino/Manifest2
-rw-r--r--dev-embedded/arduino/arduino-1.0.5-r1.ebuild99
-rw-r--r--dev-embedded/arduino/files/arduino-1.0.1-build.xml.patch38
-rw-r--r--dev-embedded/arduino/files/arduino-1.0.3-script.patch20
-rw-r--r--dev-embedded/arduino/files/arduino.desktop10
-rw-r--r--dev-embedded/arduino/metadata.xml8
-rw-r--r--dev-embedded/avarice/Manifest3
-rw-r--r--dev-embedded/avarice/avarice-2.11.ebuild16
-rw-r--r--dev-embedded/avarice/avarice-2.12.ebuild16
-rw-r--r--dev-embedded/avarice/avarice-2.13.ebuild16
-rw-r--r--dev-embedded/avarice/metadata.xml8
-rw-r--r--dev-embedded/avr-libc/Manifest14
-rw-r--r--dev-embedded/avr-libc/avr-libc-1.6.2.ebuild74
-rw-r--r--dev-embedded/avr-libc/avr-libc-1.6.4.ebuild74
-rw-r--r--dev-embedded/avr-libc/avr-libc-1.6.8.ebuild73
-rw-r--r--dev-embedded/avr-libc/avr-libc-1.7.0.ebuild69
-rw-r--r--dev-embedded/avr-libc/avr-libc-1.7.1.ebuild75
-rw-r--r--dev-embedded/avr-libc/avr-libc-1.8.0.ebuild76
-rw-r--r--dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch25
-rw-r--r--dev-embedded/avr-libc/metadata.xml9
-rw-r--r--dev-embedded/avra/Manifest1
-rw-r--r--dev-embedded/avra/avra-1.3.0.ebuild41
-rw-r--r--dev-embedded/avra/metadata.xml15
-rw-r--r--dev-embedded/avrdude/Manifest9
-rw-r--r--dev-embedded/avrdude/avrdude-5.11.1.ebuild56
-rw-r--r--dev-embedded/avrdude/avrdude-6.0.1.ebuild54
-rw-r--r--dev-embedded/avrdude/avrdude-6.1.ebuild59
-rw-r--r--dev-embedded/avrdude/metadata.xml8
-rw-r--r--dev-embedded/bitbake/Manifest1
-rw-r--r--dev-embedded/bitbake/bitbake-1.17.0.ebuild39
-rw-r--r--dev-embedded/bitbake/bitbake-9999.ebuild39
-rw-r--r--dev-embedded/bitbake/metadata.xml8
-rw-r--r--dev-embedded/cpik/Manifest1
-rw-r--r--dev-embedded/cpik/cpik-0.7.2_p4.ebuild40
-rw-r--r--dev-embedded/cpik/metadata.xml15
-rw-r--r--dev-embedded/dc-tool-ip/Manifest1
-rw-r--r--dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild43
-rw-r--r--dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch22
-rw-r--r--dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-headers.patch22
-rw-r--r--dev-embedded/dc-tool-ip/metadata.xml11
-rw-r--r--dev-embedded/dfu-programmer/Manifest3
-rw-r--r--dev-embedded/dfu-programmer/dfu-programmer-0.5.4-r1.ebuild40
-rw-r--r--dev-embedded/dfu-programmer/dfu-programmer-0.6.1.ebuild44
-rw-r--r--dev-embedded/dfu-programmer/dfu-programmer-0.6.2.ebuild44
-rw-r--r--dev-embedded/dfu-programmer/files/0.5.4-as-needed.patch12
-rw-r--r--dev-embedded/dfu-programmer/metadata.xml12
-rw-r--r--dev-embedded/ftdi_eeprom/Manifest1
-rw-r--r--dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.2-chip-type.patch15
-rw-r--r--dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-chip-type.patch15
-rw-r--r--dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-newer-chips.patch23
-rw-r--r--dev-embedded/ftdi_eeprom/ftdi_eeprom-0.3-r1.ebuild29
-rw-r--r--dev-embedded/ftdi_eeprom/ftdi_eeprom-1.0.ebuild20
-rw-r--r--dev-embedded/ftdi_eeprom/metadata.xml5
-rw-r--r--dev-embedded/gnap-dev/Manifest3
-rw-r--r--dev-embedded/gnap-dev/gnap-dev-2.0.ebuild38
-rw-r--r--dev-embedded/gnap-dev/metadata.xml7
-rw-r--r--dev-embedded/gnap-ext/Manifest3
-rw-r--r--dev-embedded/gnap-ext/gnap-ext-2.0.ebuild40
-rw-r--r--dev-embedded/gnap-ext/metadata.xml7
-rw-r--r--dev-embedded/gnap/Manifest2
-rw-r--r--dev-embedded/gnap/gnap-2.0.ebuild39
-rw-r--r--dev-embedded/gnap/metadata.xml7
-rw-r--r--dev-embedded/gnome-avrdude/Manifest1
-rw-r--r--dev-embedded/gnome-avrdude/gnome-avrdude-0.1.ebuild50
-rw-r--r--dev-embedded/gnome-avrdude/metadata.xml16
-rw-r--r--dev-embedded/gnusim8085/Manifest1
-rw-r--r--dev-embedded/gnusim8085/files/gnusim8085-1.3.7-cflags.patch13
-rw-r--r--dev-embedded/gnusim8085/files/gnusim8085-1.3.7-docs.patch22
-rw-r--r--dev-embedded/gnusim8085/gnusim8085-1.3.7.ebuild46
-rw-r--r--dev-embedded/gnusim8085/metadata.xml8
-rw-r--r--dev-embedded/gpsim/Manifest2
-rw-r--r--dev-embedded/gpsim/files/gpsim-0.26.1-glib-single-include.patch13
-rw-r--r--dev-embedded/gpsim/files/gpsim-0.26.1-gtkextra.patch29
-rw-r--r--dev-embedded/gpsim/gpsim-0.26.1.ebuild49
-rw-r--r--dev-embedded/gpsim/gpsim-0.27.0.ebuild41
-rw-r--r--dev-embedded/gpsim/metadata.xml8
-rw-r--r--dev-embedded/gputils/Manifest7
-rw-r--r--dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch182
-rw-r--r--dev-embedded/gputils/files/gputils-0.13.7-strncat.patch94
-rw-r--r--dev-embedded/gputils/gputils-0.13.6-r1.ebuild30
-rw-r--r--dev-embedded/gputils/gputils-0.13.7.ebuild27
-rw-r--r--dev-embedded/gputils/gputils-0.14.0.ebuild19
-rw-r--r--dev-embedded/gputils/gputils-0.14.1.ebuild19
-rw-r--r--dev-embedded/gputils/gputils-0.14.2.ebuild19
-rw-r--r--dev-embedded/gputils/gputils-1.2.0.ebuild19
-rw-r--r--dev-embedded/gputils/gputils-1.4.0.ebuild26
-rw-r--r--dev-embedded/gputils/metadata.xml8
-rw-r--r--dev-embedded/icdprog/Manifest1
-rw-r--r--dev-embedded/icdprog/icdprog-0.5.ebuild36
-rw-r--r--dev-embedded/icdprog/metadata.xml11
-rw-r--r--dev-embedded/include/Manifest1
-rw-r--r--dev-embedded/include/include-0.4.2.ebuild14
-rw-r--r--dev-embedded/include/metadata.xml8
-rw-r--r--dev-embedded/jal/Manifest2
-rw-r--r--dev-embedded/jal/jal-0.4.60.ebuild16
-rw-r--r--dev-embedded/jal/jal-0.4.62.ebuild19
-rw-r--r--dev-embedded/jal/metadata.xml12
-rw-r--r--dev-embedded/jtag/Manifest1
-rw-r--r--dev-embedded/jtag/files/jtag-0.5.1-no-erase-overshoot.diff34
-rw-r--r--dev-embedded/jtag/jtag-0.5.1-r1.ebuild24
-rw-r--r--dev-embedded/jtag/metadata.xml8
-rw-r--r--dev-embedded/kobs-ng/Manifest1
-rw-r--r--dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch13
-rw-r--r--dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch75
-rw-r--r--dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch13
-rw-r--r--dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild27
-rw-r--r--dev-embedded/kobs-ng/metadata.xml5
-rw-r--r--dev-embedded/libdisasm/Manifest1
-rw-r--r--dev-embedded/libdisasm/libdisasm-0.23.ebuild14
-rw-r--r--dev-embedded/libdisasm/metadata.xml14
-rw-r--r--dev-embedded/libftd2xx/Manifest3
-rw-r--r--dev-embedded/libftd2xx/libftd2xx-0.4.16-r1.ebuild48
-rw-r--r--dev-embedded/libftd2xx/libftd2xx-1.1.12-r1.ebuild44
-rw-r--r--dev-embedded/libftd2xx/metadata.xml10
-rw-r--r--dev-embedded/libftdi/Manifest4
-rw-r--r--dev-embedded/libftdi/files/libftdi-1.0-staticlibs.patch123
-rw-r--r--dev-embedded/libftdi/libftdi-0.19.ebuild57
-rw-r--r--dev-embedded/libftdi/libftdi-0.20.ebuild65
-rw-r--r--dev-embedded/libftdi/libftdi-1.0.ebuild66
-rw-r--r--dev-embedded/libftdi/libftdi-1.2.ebuild65
-rw-r--r--dev-embedded/libftdi/libftdi-9999.ebuild65
-rw-r--r--dev-embedded/libftdi/metadata.xml8
-rw-r--r--dev-embedded/lpc21isp/Manifest1
-rw-r--r--dev-embedded/lpc21isp/lpc21isp-1.85.ebuild27
-rw-r--r--dev-embedded/lpc21isp/metadata.xml11
-rw-r--r--dev-embedded/metadata.xml40
-rw-r--r--dev-embedded/mspdebug/Manifest3
-rw-r--r--dev-embedded/mspdebug/files/mspdebug-0.21-glibc-2.17.patch11
-rw-r--r--dev-embedded/mspdebug/metadata.xml14
-rw-r--r--dev-embedded/mspdebug/mspdebug-0.20.ebuild36
-rw-r--r--dev-embedded/mspdebug/mspdebug-0.21.ebuild34
-rw-r--r--dev-embedded/mspdebug/mspdebug-0.22.ebuild33
-rw-r--r--dev-embedded/openocd/Manifest5
-rw-r--r--dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch66
-rw-r--r--dev-embedded/openocd/metadata.xml27
-rw-r--r--dev-embedded/openocd/openocd-0.5.0.ebuild77
-rw-r--r--dev-embedded/openocd/openocd-0.6.1.ebuild104
-rw-r--r--dev-embedded/openocd/openocd-0.7.0-r1.ebuild119
-rw-r--r--dev-embedded/openocd/openocd-0.8.0.ebuild132
-rw-r--r--dev-embedded/openocd/openocd-0.9.0.ebuild128
-rw-r--r--dev-embedded/openocd/openocd-9999.ebuild129
-rw-r--r--dev-embedded/parapin/Manifest1
-rw-r--r--dev-embedded/parapin/metadata.xml15
-rw-r--r--dev-embedded/parapin/parapin-1.0.0.ebuild40
-rw-r--r--dev-embedded/picasm/Manifest1
-rw-r--r--dev-embedded/picasm/metadata.xml5
-rw-r--r--dev-embedded/picasm/picasm-1.14.ebuild42
-rw-r--r--dev-embedded/picp/Manifest1
-rw-r--r--dev-embedded/picp/files/picp-0.6.8-errno.patch10
-rw-r--r--dev-embedded/picp/metadata.xml5
-rw-r--r--dev-embedded/picp/picp-0.6.8.ebuild42
-rw-r--r--dev-embedded/picprog/Manifest1
-rw-r--r--dev-embedded/picprog/metadata.xml7
-rw-r--r--dev-embedded/picprog/picprog-1.9.1.ebuild27
-rw-r--r--dev-embedded/pikdev/Manifest1
-rw-r--r--dev-embedded/pikdev/metadata.xml13
-rw-r--r--dev-embedded/pikdev/pikdev-1.4.0.ebuild47
-rw-r--r--dev-embedded/pista/Manifest1
-rw-r--r--dev-embedded/pista/metadata.xml5
-rw-r--r--dev-embedded/pista/pista-0.70.ebuild26
-rw-r--r--dev-embedded/pk2-la/Manifest1
-rw-r--r--dev-embedded/pk2-la/metadata.xml16
-rw-r--r--dev-embedded/pk2-la/pk2-la-1.1-r2.ebuild32
-rw-r--r--dev-embedded/pk2cmd/Manifest1
-rw-r--r--dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch16
-rw-r--r--dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch17
-rw-r--r--dev-embedded/pk2cmd/metadata.xml12
-rw-r--r--dev-embedded/pk2cmd/pk2cmd-1.20.ebuild50
-rw-r--r--dev-embedded/ponyprog/Manifest1
-rw-r--r--dev-embedded/ponyprog/files/ponyprog-2.07a-gcc43.patch57
-rw-r--r--dev-embedded/ponyprog/files/ponyprog-2.07c-build.patch45
-rw-r--r--dev-embedded/ponyprog/metadata.xml8
-rw-r--r--dev-embedded/ponyprog/ponyprog-2.07c-r1.ebuild63
-rw-r--r--dev-embedded/powersoftplus-libftdi/Manifest1
-rw-r--r--dev-embedded/powersoftplus-libftdi/metadata.xml7
-rw-r--r--dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild39
-rw-r--r--dev-embedded/scratchbox-devkit-apt-https/Manifest2
-rw-r--r--dev-embedded/scratchbox-devkit-apt-https/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.10.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.11.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-cputransp/Manifest2
-rw-r--r--dev-embedded/scratchbox-devkit-cputransp/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.7.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.9.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-debian-squeeze/Manifest2
-rw-r--r--dev-embedded/scratchbox-devkit-debian-squeeze/metadata.xml8
-rw-r--r--dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.4.ebuild26
-rw-r--r--dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.5.ebuild26
-rw-r--r--dev-embedded/scratchbox-devkit-debian/Manifest2
-rw-r--r--dev-embedded/scratchbox-devkit-debian/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.10.ebuild30
-rw-r--r--dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.11.ebuild30
-rw-r--r--dev-embedded/scratchbox-devkit-doctools/Manifest3
-rw-r--r--dev-embedded/scratchbox-devkit-doctools/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.13.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.14.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.9.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-git/Manifest2
-rw-r--r--dev-embedded/scratchbox-devkit-git/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild30
-rw-r--r--dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.2.ebuild30
-rw-r--r--dev-embedded/scratchbox-devkit-maemo3/Manifest1
-rw-r--r--dev-embedded/scratchbox-devkit-maemo3/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-maemo3/scratchbox-devkit-maemo3-1.0.3.ebuild31
-rw-r--r--dev-embedded/scratchbox-devkit-perl/Manifest2
-rw-r--r--dev-embedded/scratchbox-devkit-perl/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.4.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.5.ebuild28
-rw-r--r--dev-embedded/scratchbox-devkit-qemu/Manifest3
-rw-r--r--dev-embedded/scratchbox-devkit-qemu/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.10.0.0.10.ebuild31
-rw-r--r--dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.11.50.0.5.ebuild31
-rw-r--r--dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.12.50.0.3.ebuild31
-rw-r--r--dev-embedded/scratchbox-devkit-svn/Manifest1
-rw-r--r--dev-embedded/scratchbox-devkit-svn/metadata.xml8
-rw-r--r--dev-embedded/scratchbox-devkit-svn/scratchbox-devkit-svn-1.0.ebuild30
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/Manifest2
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/scratchbox-toolchain-cs2005q3_2-glibc2_5-1.0.7.ebuild32
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/Manifest7
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/metadata.xml5
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.12.ebuild32
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14-r1.ebuild30
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14.ebuild32
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.16.ebuild30
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/Manifest2
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/metadata.xml8
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/scratchbox-toolchain-cs2009q1-203sb1-1.0.13.ebuild33
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/Manifest4
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/metadata.xml8
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.17.ebuild30
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.19.ebuild30
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/Manifest5
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/metadata.xml8
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.17-r1.ebuild32
-rw-r--r--dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.18.ebuild32
-rw-r--r--dev-embedded/scratchbox/Manifest4
-rw-r--r--dev-embedded/scratchbox/files/scratchbox.rc23
-rw-r--r--dev-embedded/scratchbox/metadata.xml5
-rw-r--r--dev-embedded/scratchbox/scratchbox-1.0.19.ebuild103
-rw-r--r--dev-embedded/scratchbox/scratchbox-1.0.20.ebuild103
-rw-r--r--dev-embedded/scratchbox2/Manifest1
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch22
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch88
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch39
-rw-r--r--dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch77
-rw-r--r--dev-embedded/scratchbox2/metadata.xml8
-rw-r--r--dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild61
-rw-r--r--dev-embedded/sdcc/Manifest12
-rw-r--r--dev-embedded/sdcc/files/sdcc-2.8.0-flags.patch74
-rw-r--r--dev-embedded/sdcc/files/sdcc-2.8.0-gcc44.patch9
-rw-r--r--dev-embedded/sdcc/files/sdcc-2.9.0-build.patch51
-rw-r--r--dev-embedded/sdcc/files/sdcc-2.9.0-gcc44.patch15
-rw-r--r--dev-embedded/sdcc/files/sdcc-2.9.0-getline.patch16
-rw-r--r--dev-embedded/sdcc/files/sdcc-2.9.0-headers.patch209
-rw-r--r--dev-embedded/sdcc/metadata.xml35
-rw-r--r--dev-embedded/sdcc/sdcc-2.5.0_p20060502.ebuild51
-rw-r--r--dev-embedded/sdcc/sdcc-2.6.0.ebuild47
-rw-r--r--dev-embedded/sdcc/sdcc-2.7.0.ebuild47
-rw-r--r--dev-embedded/sdcc/sdcc-2.8.0.ebuild75
-rw-r--r--dev-embedded/sdcc/sdcc-2.9.0.ebuild97
-rw-r--r--dev-embedded/sdcc/sdcc-3.5.0.ebuild121
-rw-r--r--dev-embedded/sdcc/sdcc-9999.ebuild98
-rw-r--r--dev-embedded/sgpp-lite-arm-eabi-bin/Manifest1
-rw-r--r--dev-embedded/sgpp-lite-arm-eabi-bin/metadata.xml5
-rw-r--r--dev-embedded/sgpp-lite-arm-eabi-bin/sgpp-lite-arm-eabi-bin-2010.09.51.ebuild48
-rw-r--r--dev-embedded/sgpp-lite-arm-linux-bin/Manifest1
-rw-r--r--dev-embedded/sgpp-lite-arm-linux-bin/metadata.xml5
-rw-r--r--dev-embedded/sgpp-lite-arm-linux-bin/sgpp-lite-arm-linux-bin-2010.09.50.ebuild48
-rw-r--r--dev-embedded/sgpp-lite-arm-uclinux-bin/Manifest1
-rw-r--r--dev-embedded/sgpp-lite-arm-uclinux-bin/metadata.xml5
-rw-r--r--dev-embedded/sgpp-lite-arm-uclinux-bin/sgpp-lite-arm-uclinux-bin-2010.09.58.ebuild48
-rw-r--r--dev-embedded/smdk-dltool/Manifest1
-rw-r--r--dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch66
-rw-r--r--dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch20
-rw-r--r--dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch359
-rw-r--r--dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0.patch338
-rw-r--r--dev-embedded/smdk-dltool/metadata.xml5
-rw-r--r--dev-embedded/smdk-dltool/smdk-dltool-0.20-r3.ebuild35
-rw-r--r--dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild35
-rw-r--r--dev-embedded/srecord/Manifest6
-rw-r--r--dev-embedded/srecord/files/srecord-1.57-libtool.patch70
-rw-r--r--dev-embedded/srecord/metadata.xml11
-rw-r--r--dev-embedded/srecord/srecord-1.59.ebuild39
-rw-r--r--dev-embedded/srecord/srecord-1.60.ebuild39
-rw-r--r--dev-embedded/srecord/srecord-1.61.ebuild39
-rw-r--r--dev-embedded/srecord/srecord-1.62.ebuild39
-rw-r--r--dev-embedded/srecord/srecord-1.63.ebuild39
-rw-r--r--dev-embedded/srecord/srecord-1.64.ebuild39
-rw-r--r--dev-embedded/tavrasm/Manifest1
-rw-r--r--dev-embedded/tavrasm/files/tavrasm-1.22-gentoo.patch25
-rw-r--r--dev-embedded/tavrasm/metadata.xml5
-rw-r--r--dev-embedded/tavrasm/tavrasm-1.22-r1.ebuild39
-rw-r--r--dev-embedded/tigcc/Manifest6
-rw-r--r--dev-embedded/tigcc/metadata.xml5
-rw-r--r--dev-embedded/tigcc/tigcc-0.96_beta7.ebuild244
-rw-r--r--dev-embedded/tigcc/tigcc-0.96_beta8-r1.ebuild245
-rw-r--r--dev-embedded/u-boot-tools/Manifest4
-rw-r--r--dev-embedded/u-boot-tools/files/u-boot-no-config.h.patch92
-rw-r--r--dev-embedded/u-boot-tools/metadata.xml5
-rw-r--r--dev-embedded/u-boot-tools/u-boot-tools-2013.07.ebuild46
-rw-r--r--dev-embedded/u-boot-tools/u-boot-tools-2014.01.ebuild46
-rw-r--r--dev-embedded/u-boot-tools/u-boot-tools-2015.01.ebuild42
-rw-r--r--dev-embedded/u-boot-tools/u-boot-tools-2015.04.ebuild44
-rw-r--r--dev-embedded/uisp/Manifest1
-rw-r--r--dev-embedded/uisp/files/mega-48-88-168.patch29
-rw-r--r--dev-embedded/uisp/metadata.xml5
-rw-r--r--dev-embedded/uisp/uisp-20050207-r1.ebuild29
-rw-r--r--dev-embedded/upslug2/Manifest1
-rw-r--r--dev-embedded/upslug2/metadata.xml9
-rw-r--r--dev-embedded/upslug2/upslug2-11.ebuild19
-rw-r--r--dev-embedded/urjtag/Manifest1
-rw-r--r--dev-embedded/urjtag/metadata.xml12
-rw-r--r--dev-embedded/urjtag/urjtag-0.10.ebuild29
-rw-r--r--dev-embedded/urjtag/urjtag-9999.ebuild58
-rw-r--r--dev-embedded/usbprog/Manifest1
-rw-r--r--dev-embedded/usbprog/metadata.xml5
-rw-r--r--dev-embedded/usbprog/usbprog-0.2.0.ebuild33
-rw-r--r--dev-embedded/zmac/Manifest1
-rw-r--r--dev-embedded/zmac/metadata.xml16
-rw-r--r--dev-embedded/zmac/zmac-1.3.ebuild29
321 files changed, 9910 insertions, 0 deletions
diff --git a/dev-embedded/arduino/Manifest b/dev-embedded/arduino/Manifest
new file mode 100644
index 000000000000..de225ccf6748
--- /dev/null
+++ b/dev-embedded/arduino/Manifest
@@ -0,0 +1,2 @@
+DIST arduino-1.0.5-src.tar.gz 40526292 SHA256 2f222c944d317dcae40c2d9a1e8ca8c2092f1fff4e3d1814c609209ffc9afe17 SHA512 0401bf6051a48d343f9e4e822446a846b2c6446c68949efe5daf5f5445114312eecb9c99a4565ab2e2f80831aaa32122ecc21f81c8a97136704482cd0f1f1c00 WHIRLPOOL 9176557007b039dae097dd96fc6a56956117ec879f3689005493bb19f54909e6f502672c92e81cb8bdc24b3a661881ffd696e7179b4dfc4a68af38a8d05cee93
+DIST arduino-icons.tar.bz2 58775 SHA256 9086ae27a13cc19e428ed7e6434366752b33a7d066b5620bfdd371709277390e SHA512 b750e79d6117f5df619f2b765dad6e64f0ba4aa3314b0b6e00801577e3ea1f15951ba15efe7a00f5317285a19ac29ac41c78b71342f45cd164c794a42bafcdd9 WHIRLPOOL b53ab3ff2981ca9f6d45311b9f885ca831700a7a49fef4a376cdc489f7cc3a6c39fbb93994b962b6854b0833d7342b951b5c6327422aafce762f92952b7a5876
diff --git a/dev-embedded/arduino/arduino-1.0.5-r1.ebuild b/dev-embedded/arduino/arduino-1.0.5-r1.ebuild
new file mode 100644
index 000000000000..2c9fa48a4ddb
--- /dev/null
+++ b/dev-embedded/arduino/arduino-1.0.5-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+JAVA_PKG_IUSE="doc examples"
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="An open-source AVR electronics prototyping platform"
+HOMEPAGE="http://arduino.cc/ http://arduino.googlecode.com/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}-src.tar.gz
+mirror://gentoo/arduino-icons.tar.bz2"
+LICENSE="GPL-2 GPL-2+ LGPL-2 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="strip binchecks"
+IUSE=""
+
+COMMONDEP="
+dev-java/jna:0
+>dev-java/rxtx-2.1:2"
+
+RDEPEND="${COMMONDEP}
+dev-embedded/avrdude
+dev-embedded/uisp
+sys-devel/crossdev
+>=virtual/jre-1.5"
+
+DEPEND="${COMMONDEP}
+>=virtual/jdk-1.5"
+
+EANT_GENTOO_CLASSPATH="jna,rxtx-2"
+EANT_EXTRA_ARGS="-Dversion=${PV}"
+EANT_BUILD_TARGET="build"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+
+java_prepare() {
+ # Remove the libraries to ensure the system
+ # libraries are used
+ rm build/linux/dist/tools/avrdude* || die
+ rm build/linux/dist/lib/* || die
+ rm app/lib/* || die
+ rm -rf app/src/processing/app/macosx || die
+ # Patch build/build.xml - remove local jar files
+ # for rxtx and ecj (use system wide versions)
+ epatch "${FILESDIR}"/${PN}-1.0.1-build.xml.patch
+
+ # Patch launcher script to include rxtx class/ld paths
+ epatch "${FILESDIR}"/${PN}-1.0.3-script.patch
+}
+
+src_compile() {
+ eant -f core/build.xml
+ EANT_GENTOO_CLASSPATH_EXTRA="../core/core.jar"
+ eant -f app/build.xml
+ eant "${EANT_EXTRA_ARGS}" -f build/build.xml
+}
+
+src_install() {
+ cd "${S}"/build/linux/work || die
+ java-pkg_dojar lib/core.jar lib/pde.jar
+ java-pkg_dolauncher ${PN} --pwd /usr/share/${PN} --main processing.app.Base
+
+ if use examples; then
+ java-pkg_doexamples examples
+ docompress -x /usr/share/doc/${P}/examples/
+ fi
+
+ if use doc; then
+ dodoc revisions.txt "${S}"/readme.txt
+ dohtml -r reference
+ java-pkg_dojavadoc "${S}"/build/javadoc/everything
+ fi
+
+ insinto "/usr/share/${PN}/"
+ doins -r hardware libraries
+ fowners -R root:uucp "/usr/share/${PN}/hardware"
+
+ insinto "/usr/share/${PN}/lib"
+ doins -r lib/*.txt lib/theme lib/*.jpg
+
+ # use system avrdude
+ # patching class files is too hard
+ dosym /usr/bin/avrdude "/usr/share/${PN}/hardware/tools/avrdude"
+ dosym /etc/avrdude.conf "/usr/share/${PN}/hardware/tools/avrdude.conf"
+
+ # install menu and icons
+ domenu "${FILESDIR}/${PN}.desktop"
+ for sz in 16 24 32 48 128 256; do
+ newicon -s $sz \
+ "${WORKDIR}/${PN}-icons/debian_icons_${sz}x${sz}_apps_${PN}.png" \
+ "${PN}.png"
+ done
+}
+
+pkg_postinst() {
+ [ ! -x /usr/bin/avr-g++ ] && ewarn "Missing avr-g++; you need to crossdev -s4 avr"
+}
diff --git a/dev-embedded/arduino/files/arduino-1.0.1-build.xml.patch b/dev-embedded/arduino/files/arduino-1.0.1-build.xml.patch
new file mode 100644
index 000000000000..afde2e05b661
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino-1.0.1-build.xml.patch
@@ -0,0 +1,38 @@
+--- arduino-1.0.1/build/build.xml 2012-04-09 00:16:12.000000000 +0100
++++ arduino-1.0.1/build/build.xml 2012-06-25 06:12:09.000000000 +0100
+@@ -24,9 +24,9 @@
+ <fileset dir=".." id="runtime.jars">
+ <include name="core/core.jar" />
+ <include name="app/pde.jar" />
+- <include name="app/lib/ecj.jar" />
++<!-- <include name="app/lib/ecj.jar" /> -->
+ <include name="app/lib/jna.jar" />
+- <include name="app/lib/RXTXcomm.jar" />
++<!-- <include name="app/lib/RXTXcomm.jar" /> -->
+ <include name="app/lib/ant.jar" />
+ <include name="app/lib/ant-launcher.jar" />
+ </fileset>
+@@ -361,16 +361,18 @@
+ </target>
+
+ <target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
+- <copy tofile="linux/work/hardware/tools/avrdude" file="linux/dist/tools/avrdude64" overwrite="true" />
+- <copy tofile="linux/work/lib/librxtxSerial.so" file="linux/dist/lib/librxtxSerial64.so" overwrite="true" />
++<!-- <copy tofile="linux/work/hardware/tools/avrdude" file="linux/dist/tools/avrdude64" overwrite="true" /> -->
++<!-- <copy tofile="linux/work/lib/librxtxSerial.so" file="linux/dist/lib/librxtxSerial64.so" overwrite="true" /> -->
+
+- <chmod perm="755" file="linux/work/hardware/tools/avrdude" />
++<!-- <chmod perm="755" file="linux/work/hardware/tools/avrdude" /> -->
+
+ <!-- Unzip AVR tools -->
+- <exec executable="tar" dir="linux/work/hardware">
++<!-- Removed by Paulj - use system installed instead -->
++<!-- <exec executable="tar" dir="linux/work/hardware">
+ <arg value="-xjf"/>
+ <arg value="../../avr_tools_linux64.tar.bz2"/>
+- </exec>
++ </exec>
++-->
+ </target>
+
+ <target name="linux32-run" depends="linux32-build"
diff --git a/dev-embedded/arduino/files/arduino-1.0.3-script.patch b/dev-embedded/arduino/files/arduino-1.0.3-script.patch
new file mode 100644
index 000000000000..b4accc8959a1
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino-1.0.3-script.patch
@@ -0,0 +1,20 @@
+diff --git a/build/linux/dist/arduino b/build/linux/dist/arduino
+index b5eb9db..3f3b4aa 100644
+--- a/build/linux/dist/arduino
++++ b/build/linux/dist/arduino
+@@ -10,11 +10,13 @@ for LIB in \
+ lib/*.jar \
+ ;
+ do
+- CLASSPATH="${CLASSPATH}:${LIB}"
++ CLASSPATH="${CLASSPATH+$CLASSPATH:}${LIB}"
++
+ done
++CLASSPATH="${CLASSPATH+$CLASSPATH:}:$(java-config -dp rxtx-2)"
+ export CLASSPATH
+
+-LD_LIBRARY_PATH=`pwd`/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
++LD_LIBRARY_PATH="$(java-config -di rxtx-2)${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH
+
+ export PATH="${APPDIR}/java/bin:${PATH}"
diff --git a/dev-embedded/arduino/files/arduino.desktop b/dev-embedded/arduino/files/arduino.desktop
new file mode 100644
index 000000000000..b75dea564b5d
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=arduino
+Comment=Open-source electronics prototyping platform
+Exec=arduino
+Icon=arduino
+Terminal=false
+Type=Application
+Categories=Development;
+StartupNotify=false
diff --git a/dev-embedded/arduino/metadata.xml b/dev-embedded/arduino/metadata.xml
new file mode 100644
index 000000000000..70282d0d7284
--- /dev/null
+++ b/dev-embedded/arduino/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <maintainer>
+ <email>miknix@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/avarice/Manifest b/dev-embedded/avarice/Manifest
new file mode 100644
index 000000000000..8097b10fe0f1
--- /dev/null
+++ b/dev-embedded/avarice/Manifest
@@ -0,0 +1,3 @@
+DIST avarice-2.11.tar.bz2 172566 SHA256 69c27998e4a2dbade1478bbce42e60df697baf79344f85c3b0f43a43c6ac8b86 SHA512 5f9bbbf861660fa8bf8e1dedd570d98c4209386e20469bf22bcb9618b5ee18a845317acb0ad5aca027b72c91410cf3fda162ba64fc3db6017c6871099263c546 WHIRLPOOL 03e02ae116556c9db988b293dac6dfd7c8a7fe2939ae44a484a6e19f8a37125de0e861a9220af97f2ae985c783c915bb37bf0f09c0d25a0407616e31cc324ba4
+DIST avarice-2.12.tar.bz2 183588 SHA256 d9352faf7d6237e483653d87ac4af41aa372dcbca2fba3a01f9d1d07a0e4a69f SHA512 97fc47eccd1c88a7709df392f351e0293ca812c5a60b59f75f75f94c06419163138c3307852f219a9f5a54cc7168e2c546d4b8c7f6d82746e1efff9593dde266 WHIRLPOOL 9aa22a20bf1f8c74b9da041594c3863e3be21ce151291e972f99f42be741d0bfad8dd32aeac9140d69176bfa2bec6060bfdc1b7d6285d9615fe8b7281ef60ab1
+DIST avarice-2.13.tar.bz2 196063 SHA256 a14738fe78e1a0a9321abcca7e685a00ce3ced207622ccbcd881ac32030c104a SHA512 fa67e46061e32ec9db10bed961484ee050b219e92c2e9900ad35861b3c45161cc6ea6f2a9e63b0303242ef9992193cd963ac5871583db434409c10995b420b5f WHIRLPOOL 8298615abb4a1fa6615d24c86da304478aec1de89399d66459220a87e7a8053804d49f13367239ca8b6bd975a229b5416f8ccaa47e8f537e72dc3f3e87472892
diff --git a/dev-embedded/avarice/avarice-2.11.ebuild b/dev-embedded/avarice/avarice-2.11.ebuild
new file mode 100644
index 000000000000..ba35d826e3e1
--- /dev/null
+++ b/dev-embedded/avarice/avarice-2.11.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Interface for GDB to Atmel AVR JTAGICE in circuit emulator"
+HOMEPAGE="http://avarice.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog doc/*.txt"
diff --git a/dev-embedded/avarice/avarice-2.12.ebuild b/dev-embedded/avarice/avarice-2.12.ebuild
new file mode 100644
index 000000000000..ba35d826e3e1
--- /dev/null
+++ b/dev-embedded/avarice/avarice-2.12.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Interface for GDB to Atmel AVR JTAGICE in circuit emulator"
+HOMEPAGE="http://avarice.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog doc/*.txt"
diff --git a/dev-embedded/avarice/avarice-2.13.ebuild b/dev-embedded/avarice/avarice-2.13.ebuild
new file mode 100644
index 000000000000..6ec7328d3008
--- /dev/null
+++ b/dev-embedded/avarice/avarice-2.13.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Interface for GDB to Atmel AVR JTAGICE in circuit emulator"
+HOMEPAGE="http://avarice.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog doc/*.txt"
diff --git a/dev-embedded/avarice/metadata.xml b/dev-embedded/avarice/metadata.xml
new file mode 100644
index 000000000000..884fee636149
--- /dev/null
+++ b/dev-embedded/avarice/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <upstream>
+ <remote-id type="sourceforge">avarice</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/avr-libc/Manifest b/dev-embedded/avr-libc/Manifest
new file mode 100644
index 000000000000..5f7d27ddde1d
--- /dev/null
+++ b/dev-embedded/avr-libc/Manifest
@@ -0,0 +1,14 @@
+DIST avr-libc-1.6.2.tar.bz2 1044977 SHA256 b70112efb9e66def5789ea9cfaad8d050a6af284b2f503fc81b479cec15cbbd7 SHA512 9c79450c87b6a74b88dc9628984388c0d0e0a78639bdafae29fb84bf19daae250f8e21f65e269de25ed935bdfe0edf0671e025c81870909dfaff4ec6e68b370e WHIRLPOOL 62fbc8c30ac51eecd4cdf91cd788f7043f73fccb5dfc48357f5dd7f390f6f200e22a0d2a956112e4bf19a5c1bfd7b1bdcc180b2d58eb11a1a29e83400d11e895
+DIST avr-libc-1.6.4.tar.bz2 1137818 SHA256 965fbe12bc882836c419f8c5c7b8261b04c7bbb463ad9fd0899c8165eed5477c SHA512 eef74396040990a930f504c05dfb9ab319ee5815411cdc48bdc389cf8e8bf33b8936cc52b1437f9a41fa965d9aa9503cf062bb9246b62af51d11abd84b2fbb53 WHIRLPOOL d3fc5fb263edb55068cbee4f6786a2461c971587d2f44a3f05a1163acd612dd741ff65e8601d9c798abe4e66df1ee1cf0c6199f1ff2edf74a63632232a88975e
+DIST avr-libc-1.6.8.tar.bz2 1345899 SHA256 9c35ff8569703786a9b919e9a6e3a703e9977223853691b17d8333242a9bc12b SHA512 31ca1969bdbb0725aa19de8e84cfa5a2868403a454a828c915dd754d53965feed7a6441564a8b5c6e54e5879771d4e03dce086b2e699a088474c7e71968b9159 WHIRLPOOL 440863f5d58897c8708b488c00aecec6cf70ef9848290329e88ef3fad50b252f5750be0bf13ac1c5be67fa7bf4389072437241a9ce0b797653d1795b80b41bef
+DIST avr-libc-1.7.0.tar.bz2 1409160 SHA256 27499f59e7e2d8c1dedfabdd0a9ec9aa243ba3a2e72eee0fa21375e054938e9f SHA512 7343c16aaf9760fdba10f5f3319e1b8698c7b87b0d6de03d6a34b7cc69741aa6a89ef84b6c952254541cf3ed90a26e22364254d06f170a8b67dce1e8e1cb3095 WHIRLPOOL 2a68486dc5c65332fa45c718a2bd13740ad28c5af3ab452ee421625f70394f2d5babeb89baeb3034d33c3643613e0bc625b8fdb4f0d5166dcbae001daff450c8
+DIST avr-libc-1.7.1.tar.bz2 1417545 SHA256 c6fe3f0fc0e7b1703e173ff265de1a7cac9fffdc9b249047a53f1e741c233aac SHA512 814e41b84b62213782ef886140d6aae99a76495ad3c06796038e3c58a138a3ef55076b7809dab8f4ce856b2b49a29d23952230a7784a914e20507ce06a6f99ed WHIRLPOOL dd61eb4038c3fb5cf58ce884156f30dcd4d5e6d8378c871addb2545010dcc3e4716f2326523bf12e4af1a4159d8a1a385f41ca3dabb18d9403870271da02fe81
+DIST avr-libc-1.8.0.tar.bz2 1428776 SHA256 67a36bdb43a16f9b0512ba09584d4785f9bce6c057393f1020a5552e096e34ce SHA512 932cd41be062c5930cf4d2c555b1748a6916cf8e901e2bdb6d79fec3193d8b142c32e26b9b48c680fd909cd4bafb5ed74c346846f0a4200386db6ddc2651567a WHIRLPOOL bad84f40625371eca9c87a890edba2df20a7613c34e9826e370d7a96747690c79a6fd78f560f8864ebb5fa45edfd8515ef488e939820e739234d18c2e7fc4082
+DIST avr-libc-manpages-1.6.2.tar.bz2 133249 SHA256 1c2ab29c62e308ebbb906691d0197f4b3f45fb03439c6ed674babb171104943f SHA512 8eb4aa0aedb20613253e4f17424251752fd61c5095690e69b2a4a0d6072460a0015379c04b9f01946d1063942ec876b6c6f2c0689878bfd8473a5e1cd31a534b WHIRLPOOL 1da3e7ebdf640c33c42a2ca01e822ae5fe6a9c506c9d87887f239f30e8fe9ec2a3395645e14bd413d5841a6b3b82aa1591484db19773d0975568ff676bfd219a
+DIST avr-libc-manpages-1.7.0.tar.bz2 143540 SHA256 d97ec03a075b331b957ffe968e7236cf79260ae22195036e644b1ba5279d7fcf SHA512 4422deb8778be3e617d6059ba9c40f7cd4069f3f3d8343944f8aa370fc88aa5934c6f5bb375c130ff59bb7450599bb13da4cf127a87f8057abb85eb68001d702 WHIRLPOOL cb5ec836aa3d29f11262c370aa50d2a343eafdbb21f4bef97de20315767c1630719169e00d83ef1579503d2875526bca58df08094028dfc49631ccf0b156aad6
+DIST avr-libc-manpages-1.7.1.tar.bz2 143831 SHA256 13a17b8e7522045a88a49b972f8861e8350ba0403cf692087f86525f401fe404 SHA512 c77f60be472a26ec7a158dcbfc38960dcde7bc192518bf5a35d339c628cf39030f44c56785770a3e0c01ced568e6ca7fff0f655e4a396348464c9d23cc1ccd3e WHIRLPOOL ec58b4cf18f6dbd031d19b365b969b38198a88273e383b548a77d94bdc6657cad96f24cfd255a7945069e4435461e42f44763d6365e32cd76c488a143e46f82e
+DIST avr-libc-manpages-1.8.0.tar.bz2 127217 SHA256 14589188581a7ecd9684b34d52326d8b5ff77b8ac4cdc21e316b293e90e24c12 SHA512 8b7d5734ded698f0f136b8a38785efc87d288ece7fbed943e7da0d1c6aa21ffd73707e63d54757df47da687d5e6d70d781bf9b4947624976921b5fb5c9cffc86 WHIRLPOOL f86f91a0d6987d419ff56d0a91c1e395e453acadd63563431daa9b92b8b3af0bd420bc4ba20b036658072b58e22034cf66e8bbf088487f0a642885285e0bc3a0
+DIST avr-libc-user-manual-1.6.2.tar.bz2 511408 SHA256 cc02a2a1a69870add0a69178e06f6ee1c972f139d39826aefbc0ed46febde4ee SHA512 09d531d612b72fff9dc3f0bbdf34866ed9f2b979d7d00adfd9e6d52557bb1500f18936c3b859ce7a477df6cf63bfbfab53871b6c4565f3127faa67ad912704e1 WHIRLPOOL ef001fdf58fa13389b7852087a81f45ca9ffdc90c5cfa918a66007ab66d2a2d8babe6e64cd0eef65790899267db195ad17c38af51b0525dbb4ad7589bb41fa9e
+DIST avr-libc-user-manual-1.7.0.tar.bz2 690477 SHA256 85bc2d7f4fcacfc727a5c026705b7d7545fb8886e1333e18a3c358571344145f SHA512 d8fd5e9c35b840f094c06620836744982c2302a024499f4dcbfaa107a52dac3eaaaaa58ce49529d31a60cf6c1ecdfb9b2c9313febc7cb82c7577b7da22db65a4 WHIRLPOOL 4b5106c9242330ae7df80e045255570ad8264b7709615390b19e8a78b6e2527ae05baa104e44eb484f4365ec2acee2b3665d6ba10669b7a3f8deaf1f0a55315e
+DIST avr-libc-user-manual-1.7.1.tar.bz2 692262 SHA256 25a47084f312b553f12e19d401dc63e26d36ce1821bfd38d168908f6f04a008a SHA512 9996ed97aac12a37c589beb32d761dc0740b321bb219d316091f9b3a763b8a96401c2de6cf99f89744d337a482e8be88104778deb6d8b9a76e96870526139d5e WHIRLPOOL e1a78eed29dd168a86ad32fcd9b4ae0648efacfe03b5b2b5460e9b7b63553b63548a417d06018a97aa3958a382bd55c4cc682b64137c587977c9a86e13b51c6f
+DIST avr-libc-user-manual-1.8.0.tar.bz2 705087 SHA256 ecfb970067ce5a19bd5c93501f5480e6824834d449bd53dc61cf8597a4c0b601 SHA512 731fbc45e9184b70f28001a9427d72ab5385017f1d8f197b2c942e458a6542632420f11e57a81949586d6fd8d4f4cd401b5fc76595ab7d95ccad7b158ceef59b WHIRLPOOL eea3f807208ccf5e3ada13f327898098eaf70594f9c8bff073f7143a80380cc90af4619e476dc7b1b77e752f0568829d000b5f04b110616ae72fbe813a594b39
diff --git a/dev-embedded/avr-libc/avr-libc-1.6.2.ebuild b/dev-embedded/avr-libc/avr-libc-1.6.2.ebuild
new file mode 100644
index 000000000000..adfbe9b9e7a7
--- /dev/null
+++ b/dev-embedded/avr-libc/avr-libc-1.6.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CHOST="avr"
+CTARGET="avr"
+
+inherit flag-o-matic
+
+DOCS_PV="1.6.2"
+
+DESCRIPTION="C library for Atmel AVR microcontrollers"
+HOMEPAGE="http://www.nongnu.org/avr-libc/"
+SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
+ http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${DOCS_PV}.tar.bz2
+ doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${DOCS_PV}.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="doc nls crosscompile_opts_headers-only"
+
+DEPEND=">=sys-devel/crossdev-0.9.1"
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
+ && RDEPEND="!dev-embedded/avr-libc" \
+ || RDEPEND=""
+
+pkg_setup() {
+ # check for avr-gcc, bug #134738
+ ebegin "Checking for avr-gcc"
+ if type -p avr-gcc > /dev/null ; then
+ eend 0
+ else
+ eend 1
+
+ eerror
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
+ eerror " $ crossdev -t avr"
+ eerror
+ die "AVR toolchain not found"
+ fi
+}
+
+src_compile() {
+ strip-flags
+ strip-unsupported-flags
+
+ mkdir obj-avr
+ cd "${S}"/obj-avr
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable nls) \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd "${S}"/obj-avr
+ make DESTDIR="${D}" install || die "make install failed"
+
+ cd "${S}"
+ dodoc AUTHORS ChangeLog* NEWS README
+
+ # man pages can not go into standard locations
+ # as they would then overwrite libc man pages
+ dosed "s:\$(VERSION):${PVR}:" /usr/bin/avr-man
+ insinto /usr/share/doc/${PF}/man/man3
+ doins "${WORKDIR}"/man/man3/*
+ prepman /usr/share/doc/${PF}
+
+ use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${DOCS_PV}/*
+}
diff --git a/dev-embedded/avr-libc/avr-libc-1.6.4.ebuild b/dev-embedded/avr-libc/avr-libc-1.6.4.ebuild
new file mode 100644
index 000000000000..7a8e1f2972c2
--- /dev/null
+++ b/dev-embedded/avr-libc/avr-libc-1.6.4.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CHOST="avr"
+CTARGET="avr"
+
+inherit flag-o-matic
+
+DOCS_PV="1.6.2"
+
+DESCRIPTION="C library for Atmel AVR microcontrollers"
+HOMEPAGE="http://www.nongnu.org/avr-libc/"
+SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
+ http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${DOCS_PV}.tar.bz2
+ doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${DOCS_PV}.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc nls crosscompile_opts_headers-only"
+
+DEPEND=">=sys-devel/crossdev-0.9.1"
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
+ && RDEPEND="!dev-embedded/avr-libc" \
+ || RDEPEND=""
+
+pkg_setup() {
+ # check for avr-gcc, bug #134738
+ ebegin "Checking for avr-gcc"
+ if type -p avr-gcc > /dev/null ; then
+ eend 0
+ else
+ eend 1
+
+ eerror
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
+ eerror " $ crossdev -t avr"
+ eerror
+ die "AVR toolchain not found"
+ fi
+}
+
+src_compile() {
+ strip-flags
+ strip-unsupported-flags
+
+ mkdir obj-avr
+ cd "${S}"/obj-avr
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable nls) \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd "${S}"/obj-avr
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ cd "${S}"
+ dodoc AUTHORS ChangeLog* NEWS README
+
+ # man pages can not go into standard locations
+ # as they would then overwrite libc man pages
+ dosed "s:\$(VERSION):${PVR}:" /usr/bin/avr-man
+ insinto /usr/share/doc/${PF}/man/man3
+ doins "${WORKDIR}"/man/man3/*
+ prepman /usr/share/doc/${PF}
+
+ use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${DOCS_PV}/*
+}
diff --git a/dev-embedded/avr-libc/avr-libc-1.6.8.ebuild b/dev-embedded/avr-libc/avr-libc-1.6.8.ebuild
new file mode 100644
index 000000000000..619fedfa72f4
--- /dev/null
+++ b/dev-embedded/avr-libc/avr-libc-1.6.8.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CHOST="avr"
+CTARGET="avr"
+
+inherit flag-o-matic
+
+DOCS_PV="1.6.2"
+
+DESCRIPTION="C library for Atmel AVR microcontrollers"
+HOMEPAGE="http://www.nongnu.org/avr-libc/"
+SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
+ http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${DOCS_PV}.tar.bz2
+ doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${DOCS_PV}.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc crosscompile_opts_headers-only"
+
+DEPEND=">=sys-devel/crossdev-0.9.1"
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
+ && RDEPEND="!dev-embedded/avr-libc" \
+ || RDEPEND=""
+
+pkg_setup() {
+ # check for avr-gcc, bug #134738
+ ebegin "Checking for avr-gcc"
+ if type -p avr-gcc > /dev/null ; then
+ eend 0
+ else
+ eend 1
+
+ eerror
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
+ eerror " $ crossdev -t avr"
+ eerror
+ die "AVR toolchain not found"
+ fi
+}
+
+src_compile() {
+ strip-flags
+ strip-unsupported-flags
+
+ mkdir obj-avr
+ cd "${S}"/obj-avr
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd "${S}"/obj-avr
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ cd "${S}"
+ dodoc AUTHORS ChangeLog* NEWS README
+
+ # man pages can not go into standard locations
+ # as they would then overwrite libc man pages
+ dosed "s:\$(VERSION):${PVR}:" /usr/bin/avr-man
+ insinto /usr/share/doc/${PF}/man/man3
+ doins "${WORKDIR}"/man/man3/*
+ prepman /usr/share/doc/${PF}
+
+ use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${DOCS_PV}/*
+}
diff --git a/dev-embedded/avr-libc/avr-libc-1.7.0.ebuild b/dev-embedded/avr-libc/avr-libc-1.7.0.ebuild
new file mode 100644
index 000000000000..85adec4b512d
--- /dev/null
+++ b/dev-embedded/avr-libc/avr-libc-1.7.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+CHOST="avr"
+CTARGET="avr"
+
+inherit flag-o-matic
+
+DESCRIPTION="C library for Atmel AVR microcontrollers"
+HOMEPAGE="http://www.nongnu.org/avr-libc/"
+SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
+ http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2
+ doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${PV}.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc crosscompile_opts_headers-only"
+
+DEPEND=">=sys-devel/crossdev-0.9.1"
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
+ && RDEPEND="!dev-embedded/avr-libc" \
+ || RDEPEND=""
+
+pkg_setup() {
+ # check for avr-gcc, bug #134738
+ ebegin "Checking for avr-gcc"
+ if type -p avr-gcc > /dev/null ; then
+ eend 0
+ else
+ eend 1
+
+ eerror
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
+ eerror " $ crossdev -t avr"
+ eerror
+ die "AVR toolchain not found"
+ fi
+}
+
+src_prepare() {
+ # work around broken gcc versions PR45261
+ local mcu
+ for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do
+ if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then
+ sed -i "/HAS_${mcu}=yes/s:yes:no:" configure
+ fi
+ done
+
+ strip-flags
+ strip-unsupported-flags
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog* NEWS README
+
+ # man pages can not go into standard locations
+ # as they would then overwrite libc man pages
+ dosed "s:\$(VERSION):${PVR}:" /usr/bin/avr-man
+ insinto /usr/share/doc/${PF}/man/man3
+ doins "${WORKDIR}"/man/man3/*
+ prepman /usr/share/doc/${PF}
+
+ use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/*
+}
diff --git a/dev-embedded/avr-libc/avr-libc-1.7.1.ebuild b/dev-embedded/avr-libc/avr-libc-1.7.1.ebuild
new file mode 100644
index 000000000000..24f72b21a6bc
--- /dev/null
+++ b/dev-embedded/avr-libc/avr-libc-1.7.1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+CHOST="avr"
+CTARGET="avr"
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="C library for Atmel AVR microcontrollers"
+HOMEPAGE="http://www.nongnu.org/avr-libc/"
+SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
+ http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2
+ doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${PV}.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc crosscompile_opts_headers-only"
+
+DEPEND=">=sys-devel/crossdev-0.9.1"
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
+ && RDEPEND="!dev-embedded/avr-libc" \
+ || RDEPEND=""
+
+DOCS="AUTHORS ChangeLog* NEWS README"
+
+pkg_setup() {
+ # check for avr-gcc, bug #134738
+ ebegin "Checking for avr-gcc"
+ if type -p avr-gcc > /dev/null ; then
+ eend 0
+ else
+ eend 1
+
+ eerror
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
+ eerror " $ crossdev -t avr"
+ eerror
+ die "AVR toolchain not found"
+ fi
+}
+
+src_prepare() {
+ # Fix avr-libc bug #32988 causing an ICE with gcc-4.6.0
+ epatch "${FILESDIR}/${P}-gcc46.patch"
+
+ # work around broken gcc versions PR45261
+ local mcu
+ for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do
+ if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then
+ sed -i "/HAS_${mcu}=yes/s:yes:no:" configure
+ fi
+ done
+
+ # Install docs in correct directory
+ sed -i -e "/DOC_INST_DIR/s:\$(VERSION):${PVR}:" configure || die
+
+ strip-flags
+ strip-unsupported-flags
+}
+
+src_install() {
+ default
+
+ # man pages can not go into standard locations
+ # as they would then overwrite libc man pages
+ insinto /usr/share/doc/${PF}/man/man3
+ doins "${WORKDIR}"/man/man3/*
+ prepman /usr/share/doc/${PF}
+
+ use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/*
+}
diff --git a/dev-embedded/avr-libc/avr-libc-1.8.0.ebuild b/dev-embedded/avr-libc/avr-libc-1.8.0.ebuild
new file mode 100644
index 000000000000..86bdd5c0cea2
--- /dev/null
+++ b/dev-embedded/avr-libc/avr-libc-1.8.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+CHOST="avr"
+CTARGET="avr"
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="C library for Atmel AVR microcontrollers"
+HOMEPAGE="http://www.nongnu.org/avr-libc/"
+SRC_URI="http://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
+ http://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2
+ doc? ( http://savannah.nongnu.org/download/avr-libc/${PN}-user-manual-${PV}.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="doc crosscompile_opts_headers-only"
+
+DEPEND=">=sys-devel/crossdev-0.9.1"
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
+ && RDEPEND="!dev-embedded/avr-libc" \
+ || RDEPEND=""
+
+DOCS="AUTHORS ChangeLog* NEWS README"
+
+pkg_setup() {
+ # check for avr-gcc, bug #134738
+ ebegin "Checking for avr-gcc"
+ if type -p avr-gcc > /dev/null ; then
+ eend 0
+ else
+ eend 1
+
+ eerror
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
+ eerror " $ crossdev -t avr"
+ eerror
+ die "AVR toolchain not found"
+ fi
+}
+
+src_prepare() {
+ epatch_user #455828
+
+ # work around broken gcc versions PR45261
+ local mcu
+ for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do
+ if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then
+ sed -i "/HAS_${mcu}=yes/s:yes:no:" configure
+ fi
+ done
+
+ # Install docs in correct directory
+ sed -i -e "/DOC_INST_DIR/s:\$(VERSION):${PVR}:" configure || die
+
+ strip-flags
+ strip-unsupported-flags
+}
+
+src_install() {
+ default
+
+ # man pages can not go into standard locations
+ # as they would then overwrite libc man pages
+ insinto /usr/share/doc/${PF}/man/man3
+ doins "${WORKDIR}"/man/man3/*
+
+ use doc && dohtml "${WORKDIR}"/${PN}-user-manual-${PV}/*
+
+ # Make sure diff cross-compilers don't collide #414075
+ mv "${ED}"/usr/share/doc/{${PF},${CTARGET}-${PF}} || die
+}
diff --git a/dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch b/dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch
new file mode 100644
index 000000000000..1f0922196c36
--- /dev/null
+++ b/dev-embedded/avr-libc/files/avr-libc-1.7.1-gcc46.patch
@@ -0,0 +1,25 @@
+--- avr-libc-1.7.1.orig/include/avr/pgmspace.h
++++ avr-libc-1.7.1/include/avr/pgmspace.h
+@@ -252,7 +252,7 @@
+ # define PSTR(s) ((const PROGMEM char *)(s))
+ #else /* !DOXYGEN */
+ /* The real thing. */
+-# define PSTR(s) (__extension__({static char __c[] PROGMEM = (s); &__c[0];}))
++# define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
+ #endif /* DOXYGEN */
+
+ #define __LPM_classic__(addr) \
+--- avr-libc-1.7.1.orig/libc/stdlib/dtostre.c
++++ avr-libc-1.7.1/libc/stdlib/dtostre.c
+@@ -37,9 +37,9 @@
+ char *
+ dtostre (double val, char *sbeg, unsigned char prec, unsigned char flags)
+ {
+- __attribute__((progmem)) static char str_nan[2][4] =
++ __attribute__((progmem)) static const char str_nan[2][4] =
+ {"nan", "NAN"};
+- __attribute__((progmem)) static char str_inf[2][sizeof(str_nan[0])] =
++ __attribute__((progmem)) static const char str_inf[2][sizeof(str_nan[0])] =
+ {"inf", "INF"};
+ char *d; /* dst */
+ char *s; /* src */
diff --git a/dev-embedded/avr-libc/metadata.xml b/dev-embedded/avr-libc/metadata.xml
new file mode 100644
index 000000000000..cc92317f8819
--- /dev/null
+++ b/dev-embedded/avr-libc/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription>
+ This package is part of the avr- binutils, -gcc, -lib toolchain for the Atmel microcontrollers.
+ These ebuilds have been created and submitted by Scott L. Price (dflytech.com).
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-embedded/avra/Manifest b/dev-embedded/avra/Manifest
new file mode 100644
index 000000000000..2cf0676f28a7
--- /dev/null
+++ b/dev-embedded/avra/Manifest
@@ -0,0 +1 @@
+DIST avra-1.3.0.tar.bz2 314903 SHA256 a62cbf8662caf9cc4e75da6c634efce402778639202a65eb2d149002c1049712 SHA512 4215b87379a6c2a9b81048dfd717a05881e2dc38359e49812be44bb64ac3e45911367fdf73f0c9f753e67e9ea23d19f33365dc4140ec94d13f1d8077b978fb93 WHIRLPOOL 58b67d129eb839a80d8b7aad0e580e022dd488c0dc9f9197d32ee65c0a5f24067c4db82691d5e9511b8619f7c63e082c856c824ecc30f2d9c410dc40459df602
diff --git a/dev-embedded/avra/avra-1.3.0.ebuild b/dev-embedded/avra/avra-1.3.0.ebuild
new file mode 100644
index 000000000000..4c5910591cab
--- /dev/null
+++ b/dev-embedded/avra/avra-1.3.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools
+
+DESCRIPTION="Atmel AVR Assembler"
+HOMEPAGE="http://avra.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc examples"
+
+S="${WORKDIR}/${P}/src/"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_install() {
+ local datadir="${WORKDIR}/${P}"
+
+ default
+
+ dodoc ${datadir}/{AUTHORS,INSTALL,README,TODO}
+
+ # install headers
+ insinto /usr/include/avr
+ doins "${datadir}/includes/"*
+
+ use doc && dohtml -r "${datadir}/doc/"*
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${datadir}/examples/"*
+ fi
+}
diff --git a/dev-embedded/avra/metadata.xml b/dev-embedded/avra/metadata.xml
new file mode 100644
index 000000000000..a4645995f39e
--- /dev/null
+++ b/dev-embedded/avra/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>raxas@pavouk-v-rohu.net</email>
+ <name>Petr Kocmid</name>
+ </maintainer>
+ <longdescription lang="en">
+ Assembler for Atmel AVR microprocessors
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">avra</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/avrdude/Manifest b/dev-embedded/avrdude/Manifest
new file mode 100644
index 000000000000..658c1f3799aa
--- /dev/null
+++ b/dev-embedded/avrdude/Manifest
@@ -0,0 +1,9 @@
+DIST avrdude-5.11.1.tar.gz 570880 SHA256 52cd4586ec28e892407ae09e81bb8e719df08ee79acd88e5110fa890c82cec90 SHA512 af0154a54011490194aabe5a3d4f40ebf33404d73d41d2c25f01f3f3606f5cdb4de9377b83dc19fc7743e448f8385e3602654deaea9ed5f8dd9f037c7fa53978 WHIRLPOOL 902eff357778e3944ec8c6ee90f3f619473726e9ebac4b1b6f8fc68c95dea529218db53140c533c7bb2775efbb92ee75df6123bb9cf4b561cf84dca8bc28685a
+DIST avrdude-6.0.1.tar.gz 692284 SHA256 c6804668dfa96b23185dfe2e8239089af4e4ae0b11aa7435bebb28c3260ede41 SHA512 5d067c283b06e0e17b68bdcabc55ff848364c9d89aa2f9e95ef60b5b5c3f81418c2c416ef47e1c5895b27152f8b6c8f6e25e20af0c59d2a2e9a62e0da90c5905 WHIRLPOOL b00460d49f0e08af5aa1e0b13d919afb0f1fcf04a6d3e3f411b6f7cc22ffcbaa4b1eeffddcc4c7a639ab37732e8f1c8e0b075131f35409946713d687a5dee669
+DIST avrdude-6.1.tar.gz 714595 SHA256 9e98baca8e57cad402aaa1c7b61c8de750ed4f6fed577f7e4935db0430783d3b SHA512 7d9d12f1597308dd059a1ab43dca31ad145601c59f8655d7edb596224a754694202c0838f2b907398f796ef7bed90c5dc6a58d811481dd775da1e07b842362de WHIRLPOOL 714b13834b87ec759eb1d5c87848d7ff8a404dc0d1d8ab5dd5b98731de51302af2f01afbdb1a060d8ed92d158eabbf3ea656afc29ce9b865fb7c7574751e65a9
+DIST avrdude-doc-5.11.1.pdf 242953 SHA256 2f017acf39bb64256f424671b0a839b2d7544639d1a57702d5de2cb4d534ed1d SHA512 9250b304273857cb40550958765f97697fc4d0e500d5b58eca76f30215699f4f48db27e65eec7437e1d8f059f3162491c7cae535b76dfc474fd3bae8133616ae WHIRLPOOL 5d59567f3f8c7e1e8d238a11fe7370a5ec5fafca1d815a82d52a50692032e774c077941c685dd8d2477b14d7c09ca85d2ac7a6baaa8f57c085c3f17a6c336f45
+DIST avrdude-doc-5.11.1.tar.gz 35915 SHA256 62b645282bd87ffedeac4b94b15fb868dfbadfaa4a63373a25ede9c7c53d4217 SHA512 baae5afb1596af1e4c8df321352bd4edb18095ecd3c7ad79c760200a8067573e92f3ce6300a3db518d44734cf8951a4c088835ca4aa6168c8725adddff640848 WHIRLPOOL b2f3e74aac6b466ede0873b3f7b6b75ca8e2cb25ce7b94277a76e600200dabd9ae8640ce15f5ab64785da5fb0555152b29ce7c1b5332b7fd320c71295aa0fe2a
+DIST avrdude-doc-6.0.1.pdf 256686 SHA256 9aa5fdda4c6eafb6b1df2b8097db61896a47a514d2e23dc7858608388607dc35 SHA512 187809725916ea37a203f55ba44d8ef1f9af651413a75169a54465d367823cde008b7bcf77cd53937e1b0bbb1e33071e6f45564b2f03c31247bb666befe2126a WHIRLPOOL 6b3fae078ba1972fb5368801b049f48ce6f457a1b221e1ccde0329a223a8b017b72f519d6ab1bfc3d2f5a19b57237335d9bc98cb8e373d18963ea632f079bde7
+DIST avrdude-doc-6.0.1.tar.gz 40339 SHA256 19d4323bd3768ced807edf225d8129475ba83785ea0f74c29b6bfaddd459a7ef SHA512 a9744784650751b8e601bb3fce45e3e0816db9971d7e32e5d7075997f4662a94ea38a3e372480b28f2e109c12e37914496077f2698946ffd92dea9d1fe8676f0 WHIRLPOOL 4bc3caef70a380e5ad8e792a53de04ed3b1236d4438b405370a528b8fa06342476b34a0487534a1bc16acb5ce32d82f9fc8db09e370dfc33c5306fe698278d19
+DIST avrdude-doc-6.1.pdf 259286 SHA256 b1734f0cd718bfb83398bbb2c2e69c392694300b0e3b281d1c8c59b3d37f7599 SHA512 97db435758e5d9d8173180dd860a28008b050988b81651b383b5b13ff081e79985b5b18c245a855221e773dbbe1dddbc2e69bf91211aae4429415b53be56d769 WHIRLPOOL d9c7a786523260491edf1978f2bc540e6ca5ba677eb7a4cf0725037d9373e0e319d1e3c1136efaaed7f6d86caa2de5a1468de974e1c66621a82108ebfcf7edbf
+DIST avrdude-doc-6.1.tar.gz 41567 SHA256 e34cd4282e86da0f791575fd1fd6db250524cf1c7b14952ddf1ccc113952b9de SHA512 9a667c007203b577fce722beaf77b1b38e68de05ce256745fe3bd53397145aa3f2526b8ac8664c8192c368098d171704ba78d81cfcbe99384050702461f012bf WHIRLPOOL 658e62d74c1d2b8f7f1dae316d8966d4136bd4e24853620bb07faab87b02c7d7d32bbe2406ba46700758584bc3e80a16e6cd1e247a5fd8280f80ad15f6daa5f4
diff --git a/dev-embedded/avrdude/avrdude-5.11.1.ebuild b/dev-embedded/avrdude/avrdude-5.11.1.ebuild
new file mode 100644
index 000000000000..e3c22276066e
--- /dev/null
+++ b/dev-embedded/avrdude/avrdude-5.11.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="AVR Downloader/UploaDEr"
+HOMEPAGE="http://savannah.nongnu.org/projects/avrdude"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz
+ doc? (
+ mirror://nongnu/${PN}/${PN}-doc-${PV}.tar.gz
+ mirror://nongnu/${PN}/${PN}-doc-${PV}.pdf
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 x86"
+IUSE="doc ftdi ncurses readline"
+
+RDEPEND="virtual/libusb:1
+ ftdi? ( dev-embedded/libftdi )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS ChangeLog* NEWS README"
+
+src_prepare() {
+ # let the build system re-generate these, bug #120194
+ rm -f lexer.c config_gram.c config_gram.h
+}
+
+src_configure() {
+ export ac_cv_lib_ftdi_ftdi_usb_get_strings=$(usex ftdi)
+ export ac_cv_lib_ncurses_tputs=$(usex ncurses)
+ export ac_cv_lib_readline_readline=$(usex readline)
+ default
+}
+
+src_compile() {
+ # The automake target for these files does not use tempfiles or create
+ # these atomically, confusing a parallel build. So we force them first.
+ emake lexer.c config_gram.c config_gram.h
+ emake
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ newdoc "${DISTDIR}/${PN}-doc-${PV}.pdf" avrdude.pdf
+ dohtml -r "${WORKDIR}/avrdude-html/"
+ fi
+}
diff --git a/dev-embedded/avrdude/avrdude-6.0.1.ebuild b/dev-embedded/avrdude/avrdude-6.0.1.ebuild
new file mode 100644
index 000000000000..ced4d2c5385a
--- /dev/null
+++ b/dev-embedded/avrdude/avrdude-6.0.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="AVR Downloader/UploaDEr"
+HOMEPAGE="http://savannah.nongnu.org/projects/avrdude"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz
+ doc? (
+ mirror://nongnu/${PN}/${PN}-doc-${PV}.tar.gz
+ mirror://nongnu/${PN}/${PN}-doc-${PV}.pdf
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="doc ftdi ncurses readline"
+
+RDEPEND="virtual/libusb:1
+ ftdi? ( dev-embedded/libftdi )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS ChangeLog* NEWS README"
+
+src_prepare() {
+ # let the build system re-generate these, bug #120194
+ rm -f lexer.c config_gram.c config_gram.h || die
+}
+
+src_configure() {
+ export ac_cv_lib_ftdi_ftdi_usb_get_strings=$(usex ftdi)
+ export ac_cv_lib_ncurses_tputs=$(usex ncurses)
+ export ac_cv_lib_readline_readline=$(usex readline)
+ default
+}
+
+src_compile() {
+ # The automake target for these files does not use tempfiles or create
+ # these atomically, confusing a parallel build. So we force them first.
+ emake lexer.c config_gram.c config_gram.h
+ emake
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ newdoc "${DISTDIR}/${PN}-doc-${PV}.pdf" avrdude.pdf
+ dohtml -r "${WORKDIR}/avrdude-html/"
+ fi
+}
diff --git a/dev-embedded/avrdude/avrdude-6.1.ebuild b/dev-embedded/avrdude/avrdude-6.1.ebuild
new file mode 100644
index 000000000000..7965fea5f4e2
--- /dev/null
+++ b/dev-embedded/avrdude/avrdude-6.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="AVR Downloader/UploaDEr"
+HOMEPAGE="http://savannah.nongnu.org/projects/avrdude"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz
+ doc? (
+ mirror://nongnu/${PN}/${PN}-doc-${PV}.tar.gz
+ mirror://nongnu/${PN}/${PN}-doc-${PV}.pdf
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="doc ftdi ncurses readline"
+
+RDEPEND="virtual/libusb:1
+ virtual/libusb:0
+ ftdi? ( dev-embedded/libftdi )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS ChangeLog* NEWS README"
+
+src_prepare() {
+ # let the build system re-generate these, bug #120194
+ rm -f lexer.c config_gram.c config_gram.h || die
+}
+
+src_configure() {
+ # somehow this doesnt get set when cross-compiling and breaks build
+ tc-export AR
+ export ac_cv_lib_ftdi_ftdi_usb_get_strings=$(usex ftdi)
+ export ac_cv_lib_ncurses_tputs=$(usex ncurses)
+ export ac_cv_lib_readline_readline=$(usex readline)
+ default
+}
+
+src_compile() {
+ # The automake target for these files does not use tempfiles or create
+ # these atomically, confusing a parallel build. So we force them first.
+ emake lexer.c config_gram.c config_gram.h
+ emake
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ newdoc "${DISTDIR}/${PN}-doc-${PV}.pdf" avrdude.pdf
+ dohtml -r "${WORKDIR}/avrdude-html/"
+ fi
+}
diff --git a/dev-embedded/avrdude/metadata.xml b/dev-embedded/avrdude/metadata.xml
new file mode 100644
index 000000000000..1962441214e1
--- /dev/null
+++ b/dev-embedded/avrdude/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+<use>
+ <flag name='ftdi'>Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/dev-embedded/bitbake/Manifest b/dev-embedded/bitbake/Manifest
new file mode 100644
index 000000000000..7018256caa66
--- /dev/null
+++ b/dev-embedded/bitbake/Manifest
@@ -0,0 +1 @@
+DIST bitbake-1.17.0.tar.gz 455029 SHA256 37b874a7fcefca03cc549b5ce7115aa31269da15c4d80427a0ce3347f305484b SHA512 2e01c6c48179ad09c0bd62e393c22bbfe9e35df4f3c014f279ee82bc38d61f1c0c7dc7442bad556d00cf1a46c33121d415ffa1ef522d42451a6752ba414580ea WHIRLPOOL 05a9da7cdf40676f45afc38eecd1e7c4a1381b3ba057a8aae92719664959fb6ac1c3b3ca946c7f304886e1a4f82cf36330c760c5a1b86466f9f5dd1004cf79fe
diff --git a/dev-embedded/bitbake/bitbake-1.17.0.ebuild b/dev-embedded/bitbake/bitbake-1.17.0.ebuild
new file mode 100644
index 000000000000..92efdbb58ab4
--- /dev/null
+++ b/dev-embedded/bitbake/bitbake-1.17.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 vcs-snapshot
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.openembedded.org/bitbake.git"
+ inherit git-2
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/openembedded/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 ppc x86"
+fi
+
+DESCRIPTION="package management tool for OpenEmbedded"
+HOMEPAGE="http://git.openembedded.org/bitbake/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="doc"
+
+RDEPEND="dev-python/ply
+ dev-python/progressbar"
+DEPEND="doc? ( dev-libs/libxslt )"
+
+src_prepare() {
+ if ! use doc ; then
+ sed -i -e 's:doctype = "html":doctype = "none":' \
+ -e 's:("share/doc/bitbake-%s/manual.*))::' setup.py || die
+ echo "none:" >> doc/manual/Makefile || die
+ else
+ sed -i -e "s:\(share/doc/bitbake-%s.* %\) __version__:\1 \"${PV}\":" setup.py || die
+ fi
+}
diff --git a/dev-embedded/bitbake/bitbake-9999.ebuild b/dev-embedded/bitbake/bitbake-9999.ebuild
new file mode 100644
index 000000000000..7b09cd5ac087
--- /dev/null
+++ b/dev-embedded/bitbake/bitbake-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 vcs-snapshot
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.openembedded.org/bitbake.git"
+ inherit git-2
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/openembedded/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+fi
+
+DESCRIPTION="package management tool for OpenEmbedded"
+HOMEPAGE="http://git.openembedded.org/bitbake/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="doc"
+
+RDEPEND="dev-python/ply
+ dev-python/progressbar"
+DEPEND="doc? ( dev-libs/libxslt )"
+
+src_prepare() {
+ if ! use doc ; then
+ sed -i -e 's:doctype = "html":doctype = "none":' \
+ -e 's:("share/doc/bitbake-%s/manual.*))::' setup.py || die
+ echo "none:" >> doc/manual/Makefile || die
+ else
+ sed -i -e "s:\(share/doc/bitbake-%s.* %\) __version__:\1 \"${PV}\":" setup.py || die
+ fi
+}
diff --git a/dev-embedded/bitbake/metadata.xml b/dev-embedded/bitbake/metadata.xml
new file mode 100644
index 000000000000..5db9f42b508d
--- /dev/null
+++ b/dev-embedded/bitbake/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <upstream>
+ <remote-id type="github">openembedded/bitbake</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/cpik/Manifest b/dev-embedded/cpik/Manifest
new file mode 100644
index 000000000000..593647971283
--- /dev/null
+++ b/dev-embedded/cpik/Manifest
@@ -0,0 +1 @@
+DIST cpik-0.7.2-4.tar.gz 5960822 SHA256 66f82678cf70e75ae774d74655d45e8e43a5752faa38df64797393499d2ee2b3 SHA512 e1ea5ebdd8eb2481dbfebb14c6e194d277755fbbd58388c089d0127006485a3a8b66b79e58135903ea41d4f7b1ccc49263519b741e680f29c0aa486240b12df3 WHIRLPOOL ebc4a33b5dcc890f363911933c462bdf1789618883bb9a1c36be413119736e8346a63be46cf9b1d3894abbb8084dc3f05ea3e6c060e17bb56dc344b9766d95a6
diff --git a/dev-embedded/cpik/cpik-0.7.2_p4.ebuild b/dev-embedded/cpik/cpik-0.7.2_p4.ebuild
new file mode 100644
index 000000000000..66cd04cb0d5b
--- /dev/null
+++ b/dev-embedded/cpik/cpik-0.7.2_p4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+MY_PV="${PV/_p/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="C compiler for PIC18 devices"
+HOMEPAGE="http://pikdev.free.fr/"
+SRC_URI="http://pikdev.free.fr/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtcore:4"
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="${MY_PV/-*/}/doc/*.pdf"
+HTML_DOCS="${MY_PV/-*/}/doc/html/."
+
+src_prepare() {
+ # does not install docs in wrong path
+ sed -i -e '/INSTALLS += docs/d' "${PN}"*.pro || die 'sed failed.'
+
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ dosym "${PN}-${MY_PV/-*/}" "/usr/bin/${PN}"
+}
diff --git a/dev-embedded/cpik/metadata.xml b/dev-embedded/cpik/metadata.xml
new file mode 100644
index 000000000000..2281edb992d7
--- /dev/null
+++ b/dev-embedded/cpik/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <longdescription lang="en">
+ CPIK (the C compiler for PIC18 devices) is released under the GPL licence.
+ CPIK is an easy to use, near ANSI C compiler which is fully integrated with
+ PikDev. This project is still in progress but near to be finished and the
+ current version is perfectly usable. (from Pikdev or from a command-line
+ interpreter).
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-embedded/dc-tool-ip/Manifest b/dev-embedded/dc-tool-ip/Manifest
new file mode 100644
index 000000000000..42b2c4dd5f54
--- /dev/null
+++ b/dev-embedded/dc-tool-ip/Manifest
@@ -0,0 +1 @@
+DIST dcload-ip-1.0.4-src.tar.gz 104758 SHA256 dc81c28abf11899f22cb53d9de21bb99209e703acca7ae52ea48438b36012946 SHA512 c58f574bf13dd44a00395060af4c718593471242366d09dddb234490d20a6e0322a2c3853613aa1c8a5269802cf6434407d3f6c62c934e8b66f8fc1e86a12536 WHIRLPOOL 4287a318a60495c33dc6ffa0e396b52cc2a6d95f194dbbe800f44a3cff992064a11ac295777edfbe45d35bf095ace6693ba0e67ccc6aec12966a3192ff04ee09
diff --git a/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild b/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild
new file mode 100644
index 000000000000..9c1c2103e299
--- /dev/null
+++ b/dev-embedded/dc-tool-ip/dc-tool-ip-1.0.4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="ethernet program loader for the Dreamcast"
+HOMEPAGE="http://cadcdev.sourceforge.net/"
+SRC_URI="mirror://sourceforge/cadcdev/dcload-ip-${PV}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+S=${WORKDIR}/dcload-ip-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-bfd-update.patch
+ epatch "${FILESDIR}"/${P}-headers.patch
+ append-cppflags -DPACKAGE -DPACKAGE_VERSION #465952
+ sed -i \
+ -e "/^HOSTCC/s:gcc:$(tc-getCC):" \
+ -e "/^HOSTCFLAGS/s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ -e 's:-L/usr/local/dcdev/lib:$(LDFLAGS):' \
+ -e 's:/usr/local/dcdev/include:.:' \
+ Makefile.cfg || die "sed"
+}
+
+src_compile() {
+ emake -C host-src/tool
+}
+
+src_install() {
+ dobin host-src/tool/dc-tool
+ dodoc README NETWORK CHANGES
+ dodoc -r make-cd
+ if use doc ; then
+ dodoc -r example-src
+ fi
+}
diff --git a/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch b/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch
new file mode 100644
index 000000000000..62da02f12e98
--- /dev/null
+++ b/dev-embedded/dc-tool-ip/files/1.0.4-bfd-update.patch
@@ -0,0 +1,22 @@
+--- host-src/tool/dc-tool.c.orig 2004-11-13 19:38:50.007151024 -0500
++++ host-src/tool/dc-tool.c 2004-11-13 19:38:58.320887144 -0500
+@@ -431,13 +431,13 @@
+ if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_LOAD)) {
+ printf("Section %s, ",section->name);
+ printf("lma 0x%x, ",section->lma);
+- printf("size %d\n",section->_raw_size);
+- if (section->_raw_size) {
+- size += section->_raw_size;
+- inbuf = malloc(section->_raw_size);
+- bfd_get_section_contents(somebfd, section, inbuf, 0, section->_raw_size);
++ printf("size %d\n",section->rawsize);
++ if (section->rawsize) {
++ size += section->rawsize;
++ inbuf = malloc(section->rawsize);
++ bfd_get_section_contents(somebfd, section, inbuf, 0, section->rawsize);
+
+- send_data(inbuf, section->lma, section->_raw_size);
++ send_data(inbuf, section->lma, section->rawsize);
+
+ free(inbuf);
+ }
diff --git a/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-headers.patch b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-headers.patch
new file mode 100644
index 000000000000..678278262900
--- /dev/null
+++ b/dev-embedded/dc-tool-ip/files/dc-tool-ip-1.0.4-headers.patch
@@ -0,0 +1,22 @@
+--- a/host-src/tool/dc-tool.c
++++ b/host-src/tool/dc-tool.c
+@@ -24,6 +24,7 @@
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #ifdef _WIN32
+ #include <string.h>
+ #include <windows.h>
+--- a/host-src/tool/syscalls.c
++++ b/host-src/tool/syscalls.c
+@@ -24,6 +24,9 @@
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
++#include <arpa/inet.h>
++#include <time.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+ #include <utime.h>
diff --git a/dev-embedded/dc-tool-ip/metadata.xml b/dev-embedded/dc-tool-ip/metadata.xml
new file mode 100644
index 000000000000..9d638b815e71
--- /dev/null
+++ b/dev-embedded/dc-tool-ip/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <maintainer>
+ <email>sh@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">cadcdev</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/dfu-programmer/Manifest b/dev-embedded/dfu-programmer/Manifest
new file mode 100644
index 000000000000..5eeaddff7b33
--- /dev/null
+++ b/dev-embedded/dfu-programmer/Manifest
@@ -0,0 +1,3 @@
+DIST dfu-programmer-0.5.4.tar.gz 126700 SHA256 c0fb08fead3d4379368d0e4af5a5aa99c7acee32fa8696cd3e27d2f7856a20de SHA512 c6e0000e7d849144ff4d9191b09540f6a7c7414221952b26898421622079c1fd300e1a4d0f35db6f867e539f59c129850c6a9c745bc0f9916723e8e89fe2fd63 WHIRLPOOL bd8f7c6831544209e4513bd4231e4e1f6f43fadff05d319c22551d8cc99e1b0b5b0b98515175baaf3cf8e6baf79ff140b714f314f39063a80583dcce6dec7404
+DIST dfu-programmer-0.6.1.tar.gz 134394 SHA256 6c4c0ac8860894b970ffeef9f5b579a3465846d013e5c0d9c7fd19bb828ea857 SHA512 feb54119496013b8e77b793d8df0d68bf58de5a7d68ff0cf7a70c0bb63c70c4a43d169ecb71761df96bb07f6a23cd959c20132f5446361045f46df965b8b1e43 WHIRLPOOL a86fed7c6b623182487048f8db555ffa1f9a123bdb912df7adebd0f3742dadcdb1d4a778da4e607f63114944077742cf3cdc44bb9e98fc421e624ba69c2ea905
+DIST dfu-programmer-0.6.2.tar.gz 134941 SHA256 0120966a424dd98124962055750e90cbd6c7b6b0fbf5b187bf435daa0a24af65 SHA512 e3905a71c7b6e0a6e322d9fb781c636caa4431166bf032ad2c14db764a4f9ec952d25bd431ed04a41550fca9a8afcae7aa939a015f3b78361f430ad36c26c381 WHIRLPOOL 00d0f28a31ddc567add1d9d4ab7f3fed35a239f1a6ad01cdcf3d3c8fd51b64b9367cc086f5d122ec511be2681c43a0a77756743702a3ae0201ebac6e2a8078aa
diff --git a/dev-embedded/dfu-programmer/dfu-programmer-0.5.4-r1.ebuild b/dev-embedded/dfu-programmer/dfu-programmer-0.5.4-r1.ebuild
new file mode 100644
index 000000000000..1b3e74b50f4e
--- /dev/null
+++ b/dev-embedded/dfu-programmer/dfu-programmer-0.5.4-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools base udev
+
+DESCRIPTION="A Device Firmware Update based USB programmer for Atmel chips"
+HOMEPAGE="http://dfu-programmer.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="virtual/libusb:1
+ virtual/udev"
+DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/${PV}-as-needed.patch" )
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ ebegin "Generating UDEV rules..."
+ UDEV_RULES="$(get_udevdir)/rules.d/70-dfu-programmer.rules"
+ mkdir -p "${D}"/${UDEV_RULES%/*}
+ echo -e "#\n# do not edit this file, it will be overwritten on update\n#" \
+ > "${D}"/${UDEV_RULES}
+ for prodid in "2ffa" "2ffb" "2ff9" "2ff7" "2ff4" "2ff3" ;
+ do
+ echo "SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"03eb\", \
+ ATTRS{idProduct}==\"${prodid}\", MODE=\"660\", GROUP=\"plugdev\", \
+ SYMLINK+=\"dfu-%n\"" >> "${D}"${UDEV_RULES}
+ done
+ eend $?
+}
diff --git a/dev-embedded/dfu-programmer/dfu-programmer-0.6.1.ebuild b/dev-embedded/dfu-programmer/dfu-programmer-0.6.1.ebuild
new file mode 100644
index 000000000000..3dabd19089c8
--- /dev/null
+++ b/dev-embedded/dfu-programmer/dfu-programmer-0.6.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit udev
+
+DESCRIPTION="A Device Firmware Update based USB programmer for Atmel chips"
+HOMEPAGE="http://dfu-programmer.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="virtual/libusb:1
+ virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Upstream has fixed this in their configure already.
+ tc-export CPP PKG_CONFIG
+ sed -i \
+ -e "/LIBUSB_1_0_CFLAGS=/s:=.*:='$(${PKG_CONFIG} --cflags libusb-1.0)':" \
+ -e "/LIBUSB_1_0_LIBS=/s:=.*:='$(${PKG_CONFIG} --libs libusb-1.0)':" \
+ configure || die
+}
+
+src_install() {
+ default
+
+ cat <<-EOF > 70-dfu-programmer.rules
+ #
+ # do not edit this file, it will be overwritten on update
+ #
+ EOF
+ printf 'SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="%s", MODE="660", GROUP="plugdev", SYMLINK+="dfu-%%n"\n' \
+ 2ff{a,b,9,7,4,3} >> 70-dfu-programmer.rules
+
+ udev_dorules 70-dfu-programmer.rules
+}
diff --git a/dev-embedded/dfu-programmer/dfu-programmer-0.6.2.ebuild b/dev-embedded/dfu-programmer/dfu-programmer-0.6.2.ebuild
new file mode 100644
index 000000000000..3dabd19089c8
--- /dev/null
+++ b/dev-embedded/dfu-programmer/dfu-programmer-0.6.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit udev
+
+DESCRIPTION="A Device Firmware Update based USB programmer for Atmel chips"
+HOMEPAGE="http://dfu-programmer.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="virtual/libusb:1
+ virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Upstream has fixed this in their configure already.
+ tc-export CPP PKG_CONFIG
+ sed -i \
+ -e "/LIBUSB_1_0_CFLAGS=/s:=.*:='$(${PKG_CONFIG} --cflags libusb-1.0)':" \
+ -e "/LIBUSB_1_0_LIBS=/s:=.*:='$(${PKG_CONFIG} --libs libusb-1.0)':" \
+ configure || die
+}
+
+src_install() {
+ default
+
+ cat <<-EOF > 70-dfu-programmer.rules
+ #
+ # do not edit this file, it will be overwritten on update
+ #
+ EOF
+ printf 'SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="%s", MODE="660", GROUP="plugdev", SYMLINK+="dfu-%%n"\n' \
+ 2ff{a,b,9,7,4,3} >> 70-dfu-programmer.rules
+
+ udev_dorules 70-dfu-programmer.rules
+}
diff --git a/dev-embedded/dfu-programmer/files/0.5.4-as-needed.patch b/dev-embedded/dfu-programmer/files/0.5.4-as-needed.patch
new file mode 100644
index 000000000000..6b9bd5afa4fa
--- /dev/null
+++ b/dev-embedded/dfu-programmer/files/0.5.4-as-needed.patch
@@ -0,0 +1,12 @@
+diff -u dfu-programmer-0.5.4.ORIG/configure.ac dfu-programmer-0.5.4/configure.ac
+--- dfu-programmer-0.5.4.ORIG/configure.ac 2012-11-15 11:54:24.938577990 +0000
++++ dfu-programmer-0.5.4/configure.ac 2012-11-15 11:55:47.730575031 +0000
+@@ -27,7 +27,7 @@
+ PKG_CHECK_MODULES(LIBUSB_1_0, [ libusb-1.0 >= 1.0.0 ], have_libusb_1_0=yes, have_libusb_1_0=no)
+ if test "$have_libusb_1_0" = "yes"; then
+ CFLAGS="$CFLAGS $LIBUSB_1_0_CFLAGS"
+- LDFLAGS="$LDFLAGS $LIBUSB_1_0_LIBS"
++ LIBS="$LIBS $LIBUSB_1_0_LIBS"
+ HAVE_USB=yes
+ fi
+ fi
diff --git a/dev-embedded/dfu-programmer/metadata.xml b/dev-embedded/dfu-programmer/metadata.xml
new file mode 100644
index 000000000000..59eaedb921de
--- /dev/null
+++ b/dev-embedded/dfu-programmer/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dfu-programmer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/ftdi_eeprom/Manifest b/dev-embedded/ftdi_eeprom/Manifest
new file mode 100644
index 000000000000..b890cbac0420
--- /dev/null
+++ b/dev-embedded/ftdi_eeprom/Manifest
@@ -0,0 +1 @@
+DIST ftdi_eeprom-0.3.tar.gz 103723 SHA256 7b40ec5abb2c93362b9636974e4e4715cb588121c1e1da09d7f499ac7f12d056 SHA512 292617434d618c1f47fd94922cff1c32da271a9262b70ee56a8931b7a07ec1ae2cfe92a0ddfe14d9516d295188dc0a750c0cf7f5a26bb4c3fd384f252aeda18d WHIRLPOOL ccc68295e4d1af063623f359f07918ff2bb916932b02333509ff9f5ea5d66ac4f435026ca9a1ed8942520dbd8956bac9adbc5163967429e96ccc14041c5a3c4a
diff --git a/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.2-chip-type.patch b/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.2-chip-type.patch
new file mode 100644
index 000000000000..4b8aa8543960
--- /dev/null
+++ b/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.2-chip-type.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/390805
+
+fix by Egor Y. Egorov for building with newer libftdi versions
+
+--- a/ftdi_eeprom/main.c
++++ b/ftdi_eeprom/main.c
+@@ -106,7 +106,7 @@ int main(int argc, char *argv[]) {
+
+ eeprom.vendor_id = cfg_getint(cfg, "vendor_id");
+ eeprom.product_id = cfg_getint(cfg, "product_id");
+- eeprom.BM_type_chip = cfg_getbool(cfg, "BM_type_chip");
++ eeprom.chip_type = cfg_getbool(cfg, "BM_type_chip");
+
+ eeprom.self_powered = cfg_getbool(cfg, "self_powered");
+ eeprom.remote_wakeup = cfg_getbool(cfg, "remote_wakeup");
diff --git a/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-chip-type.patch b/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-chip-type.patch
new file mode 100644
index 000000000000..1492194045ab
--- /dev/null
+++ b/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-chip-type.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/390805
+
+fix by Egor Y. Egorov for building with newer libftdi versions
+
+--- a/src/main.c
++++ b/src/main.c
+@@ -106,7 +106,7 @@ int main(int argc, char *argv[]) {
+
+ eeprom.vendor_id = cfg_getint(cfg, "vendor_id");
+ eeprom.product_id = cfg_getint(cfg, "product_id");
+- eeprom.BM_type_chip = cfg_getbool(cfg, "BM_type_chip");
++ eeprom.chip_type = cfg_getbool(cfg, "BM_type_chip");
+
+ eeprom.self_powered = cfg_getbool(cfg, "self_powered");
+ eeprom.remote_wakeup = cfg_getbool(cfg, "remote_wakeup");
diff --git a/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-newer-chips.patch b/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-newer-chips.patch
new file mode 100644
index 000000000000..7a678cd4bce2
--- /dev/null
+++ b/dev-embedded/ftdi_eeprom/files/ftdi_eeprom-0.3-newer-chips.patch
@@ -0,0 +1,23 @@
+latest upstream vcs tree supports this stuff in a diff way
+
+https://bugs.gentoo.org/376117
+
+patch by Robert Pearce
+
+--- ftdi_eeprom-0.2/src/main.c
++++ ftdi_eeprom-0.2/src/main.c
+@@ -131,9 +131,13 @@
+
+ if (i != 0) {
+ printf("Unable to find FTDI devices under given vendor/product id: 0x%X/0x%X\n", eeprom.vendor_id, eeprom.product_id);
+- printf("Retrying with default FTDI id.\n");
++ printf("Retrying with default FTDI ids.\n");
+
+ i = ftdi_usb_open(&ftdi, 0x0403, 0x6001);
++ if (i != 0)
++ i = ftdi_usb_open(&ftdi, 0x0403, 0x6010);
++ if (i != 0)
++ i = ftdi_usb_open(&ftdi, 0x0403, 0x6011);
+ if (i != 0) {
+ printf("Sorry, unable to find FTDI USB chip\n");
+ exit (-1);
diff --git a/dev-embedded/ftdi_eeprom/ftdi_eeprom-0.3-r1.ebuild b/dev-embedded/ftdi_eeprom/ftdi_eeprom-0.3-r1.ebuild
new file mode 100644
index 000000000000..207d4e758d9f
--- /dev/null
+++ b/dev-embedded/ftdi_eeprom/ftdi_eeprom-0.3-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Utility to program external EEPROM for FTDI USB chips"
+HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
+SRC_URI="http://www.intra2net.com/en/developer/libftdi/download/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="<dev-embedded/libftdi-1
+ dev-libs/confuse"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-newer-chips.patch #376117
+ epatch "${FILESDIR}"/${PN}-0.3-chip-type.patch #390805
+}
+
+src_install() {
+ default
+ dodoc src/example.conf
+}
diff --git a/dev-embedded/ftdi_eeprom/ftdi_eeprom-1.0.ebuild b/dev-embedded/ftdi_eeprom/ftdi_eeprom-1.0.ebuild
new file mode 100644
index 000000000000..6ff4bbe32866
--- /dev/null
+++ b/dev-embedded/ftdi_eeprom/ftdi_eeprom-1.0.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Utility to program external EEPROM for FTDI USB chips"
+HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-embedded/libftdi[tools]"
+
+pkg_setup() {
+ elog "This tool has moved to libftdi itself (via USE=tools)."
+ elog "Please install that package and remove this one."
+}
diff --git a/dev-embedded/ftdi_eeprom/metadata.xml b/dev-embedded/ftdi_eeprom/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/ftdi_eeprom/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/gnap-dev/Manifest b/dev-embedded/gnap-dev/Manifest
new file mode 100644
index 000000000000..1f618aee9b03
--- /dev/null
+++ b/dev-embedded/gnap-dev/Manifest
@@ -0,0 +1,3 @@
+DIST gnap-portagesnapshot-2.0.tar.bz2 1528216 SHA256 9297b429abd9d042342dbd5de4db28bbb3555dd5858e53b24b4dbbbcf9dc2928 SHA512 0cfba05ccf8f4137b56bda6aa309f0b209c6818faca446db037c03373fdcd7b02c456c0a0ca0e88b0bf379d5f3fe3df688fb1b6b58cd3ab40b2bd8b6af403b5a WHIRLPOOL 98bd5262c477a4ab925e4b37c0d489e0a9df1fb17e6b2b2d9bbf5ce152ecdec1ebf387b589aa5a5ed61c31e10f43280240e334babda6200d8bc729d3297c43f3
+DIST gnap-sources-2.0.tar.bz2 18924 SHA256 cedcdaa10cd0c6942b1ea14baad822caca86964f29bf177118c4fccc2a1702bb SHA512 b8890a952bedaaaea2231c3da92a1512a4a738d877f4247e1e2bb8d6d7e97f3327240fa465ff2294541a05553fba4ca104bdf3fa54deef98ed7d0a436a86fb93 WHIRLPOOL 0e037e93bc23cbff95e07b74706fb72970a0542c862a4184b7c199a1a6904d3e6ba445e7700a24b27361e82ce94282e0023b43b31ccbf0968ec796eb48d02752
+DIST gnap-stageseed-2.0.tar.bz2 55210922 SHA256 6ed640379c40f4ba16ba5061e780d15d392a4bc2ab02ff8fdd03cb69ca10afc3 SHA512 d0368388fb52c5297679b7136d0b4d25f3b1ddcfa114005921a3172e15bcef2f39336735f746c94a78b633bcb08dcc66f25ffbb691bb4b5a780b7cbe8d789578 WHIRLPOOL ae762436e81a6934b909067d75ff56df8c5ed7505942272a7cabfa32ef50ac938a1ec2227934c413964f2ee5532d39ef808024fa23679025cf88204c7fd8adf1
diff --git a/dev-embedded/gnap-dev/gnap-dev-2.0.ebuild b/dev-embedded/gnap-dev/gnap-dev-2.0.ebuild
new file mode 100644
index 000000000000..3ee1990f0ebc
--- /dev/null
+++ b/dev-embedded/gnap-dev/gnap-dev-2.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P=${P/gnap-dev/gnap-sources}
+S="${WORKDIR}/gnap-${PV}"
+DESCRIPTION="Gentoo-based Network Appliance building system development tools"
+HOMEPAGE="http://embedded.gentoo.org/gnap.xml"
+
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
+ !minimal? ( mirror://gentoo/gnap-stageseed-${PV}.tar.bz2
+ mirror://gentoo/gnap-portagesnapshot-${PV}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="minimal"
+
+RDEPEND=">=dev-util/catalyst-2.0_rc40
+ sys-fs/squashfs-tools
+ app-cdr/cdrtools"
+
+src_unpack() {
+ unpack ${MY_P}.tar.bz2
+}
+
+src_install() {
+ dobin gnap_make
+ doman gnap_make.1
+
+ dodir /usr/lib/gnap
+ tar jc -f ${D}/usr/lib/gnap/gnap-specs.tar.bz2 -C specs .
+ if ! use minimal; then
+ insinto /usr/lib/gnap
+ newins ${DISTDIR}/gnap-stageseed-${PV}.tar.bz2 gnap-stage3seed.tar.bz2
+ newins ${DISTDIR}/gnap-portagesnapshot-${PV}.tar.bz2 gnap-portagesnapshot.tar.bz2
+ fi
+}
diff --git a/dev-embedded/gnap-dev/metadata.xml b/dev-embedded/gnap-dev/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/dev-embedded/gnap-dev/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/gnap-ext/Manifest b/dev-embedded/gnap-ext/Manifest
new file mode 100644
index 000000000000..49e1b74e9d1d
--- /dev/null
+++ b/dev-embedded/gnap-ext/Manifest
@@ -0,0 +1,3 @@
+DIST gnap-basefs-2.0.tar.bz2 8689764 SHA256 2611fb11442ced916966b7f57927114ba993bbe258e89424242bc427473acf69 SHA512 84a208197d6f5bee42f07eb1f4a02d3d64a4e938e51c7aaa503729ef40f8d7847de2563676e7a14c35fc381905b9da45e89357283060c75c997f3ff52049abeb WHIRLPOOL 49173ded09c98ddafcb25918d16f49995dc7c5062c8ec2316c070d96e9386a82b84245a591b8d06eab2f3cff745435a99f06bf7b1df11d36695ad94144e981cb
+DIST gnap-extensions-2.0.tar 1198080 SHA256 905bba34a307f94ff63fa9c9eac5c7fad31b15ca2471bfd47a78a59bb2028995 SHA512 08266d2b71fd1f170e9ae01fa9c0b3fa898dde7220b1b1d9828fa4bc51b08bcb5af4c7eab75eabc3b3c110ff3e24b2fd193ab36b5579b2507da1a09a90bd4044 WHIRLPOOL 731a47c321a10ee0419e3de21befc473b90cb535616ae542a82a3a6089036a8c24a83d4d243c6fb50e40c59513e5d110ed8630dc3c7ffed1015af3380e7b1cc7
+DIST gnap-tools-2.0.tar.bz2 26874 SHA256 925083618f6d19d70b0c3d4236a374ea1ea72abb1ee7999973b653751bda4a6b SHA512 cd8de371aaeee9b5dac5bebb4961855e78cd173a1de99056671e0071be2376c3fd45fb7d635786ad22f3ff413fbcd6d2b710b7c8ca4e99bdfbb09b31e7bf4b52 WHIRLPOOL eb5434a7ca3ac1f7ff5f3d2377a771e865600085d957287892eb0648cd4c3dac7101bff4e144d80197de9b4acd1455e0f59fdaead51e4a1d8a515a01ab4c5477
diff --git a/dev-embedded/gnap-ext/gnap-ext-2.0.ebuild b/dev-embedded/gnap-ext/gnap-ext-2.0.ebuild
new file mode 100644
index 000000000000..2084a68c390c
--- /dev/null
+++ b/dev-embedded/gnap-ext/gnap-ext-2.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="${P/gnap-ext/gnap-tools}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="Gentoo-based Network Appliance extensions and remastering tool"
+HOMEPAGE="http://embedded.gentoo.org/gnap.xml"
+
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
+ !minimal? ( mirror://gentoo/gnap-basefs-${PV}.tar.bz2
+ mirror://gentoo/gnap-extensions-${PV}.tar )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="minimal"
+
+RDEPEND="sys-fs/squashfs-tools"
+
+src_unpack() {
+ unpack ${MY_P}.tar.bz2
+ if ! use minimal; then
+ unpack gnap-extensions-${PV}.tar
+ fi
+}
+
+src_install() {
+ dobin gnap_remaster
+ doman gnap_remaster.1
+
+ if ! use minimal; then
+ dodir /usr/lib/gnap
+ insinto /usr/lib/gnap
+ newins ${DISTDIR}/gnap-basefs-${PV}.tar.bz2 gnap-basefs.tar.bz2
+ dodir /usr/lib/gnap/extensions
+ insinto /usr/lib/gnap/extensions
+ doins ${WORKDIR}/gnapext_*.tbz2
+ fi
+}
diff --git a/dev-embedded/gnap-ext/metadata.xml b/dev-embedded/gnap-ext/metadata.xml
new file mode 100644
index 000000000000..2d5a14582e95
--- /dev/null
+++ b/dev-embedded/gnap-ext/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>gnap@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/gnap/Manifest b/dev-embedded/gnap/Manifest
new file mode 100644
index 000000000000..22e66d2d663c
--- /dev/null
+++ b/dev-embedded/gnap/Manifest
@@ -0,0 +1,2 @@
+DIST gnap-core-2.0.tar 12257280 SHA256 84c279c1305db560f5e78c3a182202b0b32383ef3e6e3e02afd74782b9f3a857 SHA512 3da9ea5a1a64ff9b1dc58b1efca33079bc48823a96c2e47c878d3651276943be7ec03be2d9ad402818263faaf2415dad0b45f479f60b2fd37f8a7d8a4433ffeb WHIRLPOOL e5aedcd99586e6a8cf7c3e2207f02a9e24d5d3bb82e8480fe0fb25f5817457e4e8a40807bfd32efdaafdf5c91e768868d55c047bea90f91e9a859f1511524d20
+DIST gnap-tools-2.0.tar.bz2 26874 SHA256 925083618f6d19d70b0c3d4236a374ea1ea72abb1ee7999973b653751bda4a6b SHA512 cd8de371aaeee9b5dac5bebb4961855e78cd173a1de99056671e0071be2376c3fd45fb7d635786ad22f3ff413fbcd6d2b710b7c8ca4e99bdfbb09b31e7bf4b52 WHIRLPOOL eb5434a7ca3ac1f7ff5f3d2377a771e865600085d957287892eb0648cd4c3dac7101bff4e144d80197de9b4acd1455e0f59fdaead51e4a1d8a515a01ab4c5477
diff --git a/dev-embedded/gnap/gnap-2.0.ebuild b/dev-embedded/gnap/gnap-2.0.ebuild
new file mode 100644
index 000000000000..a214fb60cf6a
--- /dev/null
+++ b/dev-embedded/gnap/gnap-2.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="${P/gnap/gnap-tools}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="Gentoo-based Network Appliance building system"
+HOMEPAGE="http://embedded.gentoo.org/gnap.xml"
+
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
+ !minimal? ( mirror://gentoo/${PN}-core-${PV}.tar )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="minimal"
+
+RDEPEND="app-cdr/cdrtools
+ sys-fs/dosfstools
+ <sys-boot/syslinux-5"
+
+src_unpack() {
+ unpack ${MY_P}.tar.bz2
+}
+
+src_install() {
+ dobin gnap_overlay
+ doman gnap_overlay.1
+
+ dodoc README.upgrading
+
+ dodir /usr/lib/gnap
+ insinto /usr/lib/gnap
+ if ! use minimal; then
+ newins "${DISTDIR}"/${PN}-core-${PV}.tar ${PN}-core.tar
+ doins -r mbr
+ doins -r examples
+ fi
+}
diff --git a/dev-embedded/gnap/metadata.xml b/dev-embedded/gnap/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/dev-embedded/gnap/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/gnome-avrdude/Manifest b/dev-embedded/gnome-avrdude/Manifest
new file mode 100644
index 000000000000..bf448fe10cbd
--- /dev/null
+++ b/dev-embedded/gnome-avrdude/Manifest
@@ -0,0 +1 @@
+DIST gnome-avrdude-0.1.tar.gz 105608 SHA256 c5a7cbf1cd8b1adb55fcd130413ac80bcb18007734ae8fd30412a926f21fb9cc SHA512 9b9bbb5fe8247ea33482d7d40089a23b1c2aa9f3709d96e0f008e6cc60a7313468fb22829391b175cd51916b5335811dae0263de553f7c8f3c447acdb39f8198 WHIRLPOOL 16b42217282aff4fb8d8d5d75b97c18768ee3c94238d691b7ac9f4d29989875a9b9d7dec84ace7260bd5a20e923649e39bff0dec0902c4f433c48fdc4746d15e
diff --git a/dev-embedded/gnome-avrdude/gnome-avrdude-0.1.ebuild b/dev-embedded/gnome-avrdude/gnome-avrdude-0.1.ebuild
new file mode 100644
index 000000000000..ab175af0497b
--- /dev/null
+++ b/dev-embedded/gnome-avrdude/gnome-avrdude-0.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit gnome2 autotools
+
+DESCRIPTION="GNOME GUI for avrdude"
+HOMEPAGE="http://www.sourceforge.net/projects/gnome-avrdude/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2
+ x11-libs/gtk+:2
+ gnome-base/gconf
+ gnome-base/libgnome
+ gnome-base/libgnomeui
+ gnome-base/libglade
+ x11-libs/pango"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+RDEPEND="${RDEPEND}
+ dev-embedded/avrdude"
+
+DOCS="AUTHORS NEWS README"
+
+src_prepare() {
+ sed -i \
+ -e :a -e '/\\$/N; s/\\\n//; ta' \
+ -e 's/^gnome_avrdude/#gnome_avrdude/' \
+ "${S}"/Makefile.am \
+ || die "sed failed"
+ sed -i \
+ -e 's/Wall\\/Wall/' \
+ -e 's/^[\t ]*-g//' \
+ "${S}"/src/Makefile.am \
+ || die "sed failed"
+
+ # Remove Application category from .desktop file.
+ sed -i 's/;Application;/;/' gnome-avrdude.desktop
+
+ eautoreconf
+}
diff --git a/dev-embedded/gnome-avrdude/metadata.xml b/dev-embedded/gnome-avrdude/metadata.xml
new file mode 100644
index 000000000000..a0883f5ea252
--- /dev/null
+++ b/dev-embedded/gnome-avrdude/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <maintainer>
+ <email>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+ </maintainer>
+ <longdescription>
+ gnome-avrdude is a GNOME graphical user interface (GUI) for the command-line
+ Atmel AVR microcontroller programming software avrdude
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gnome-avrdude</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/gnusim8085/Manifest b/dev-embedded/gnusim8085/Manifest
new file mode 100644
index 000000000000..e2ca248c99ee
--- /dev/null
+++ b/dev-embedded/gnusim8085/Manifest
@@ -0,0 +1 @@
+DIST gnusim8085-1.3.7.tar.gz 365127 SHA256 e09b56089276eed91fb9df3c1e7e2aa4bf091859cfc62612521b45617167d525 SHA512 b1b701ef3292c2b3ea7a599f450ee495fdec730fa53e2ad9ea27c716a7de61d503f32345ed3cf6eeef3ef698ed4f0b957cb7ae207df0bee46363e76b5176b822 WHIRLPOOL 06c33af76c75eec7693180f411e83b174049a77ada4c9bda4da05bbb1e7db1df1ba43ba2436b5ec105f61e5182852e9e0f9c3b6e93e2e660686a79d9bbb4f1ed
diff --git a/dev-embedded/gnusim8085/files/gnusim8085-1.3.7-cflags.patch b/dev-embedded/gnusim8085/files/gnusim8085-1.3.7-cflags.patch
new file mode 100644
index 000000000000..ce118779ce01
--- /dev/null
+++ b/dev-embedded/gnusim8085/files/gnusim8085-1.3.7-cflags.patch
@@ -0,0 +1,13 @@
+--- gnusim8085-1.3.7/src/Makefile.am.orig
++++ gnusim8085-1.3.7/src/Makefile.am
+@@ -11,9 +11,7 @@
+
+ gnusim8085_CFLAGS =\
+ -DPACKAGE_DOC_DIR=\"$(docdir)\"\
+- -Wall\
+- -O1\
+- -g
++ -Wall
+
+ if WIN32
+ gnusim8085_CFLAGS += \
diff --git a/dev-embedded/gnusim8085/files/gnusim8085-1.3.7-docs.patch b/dev-embedded/gnusim8085/files/gnusim8085-1.3.7-docs.patch
new file mode 100644
index 000000000000..6ae26b892db4
--- /dev/null
+++ b/dev-embedded/gnusim8085/files/gnusim8085-1.3.7-docs.patch
@@ -0,0 +1,22 @@
+--- gnusim8085-1.3.7/Makefile.am.orig
++++ gnusim8085-1.3.7/Makefile.am
+@@ -3,17 +3,9 @@
+ ## If you don't want it to overwrite it,
+ ## Please disable it in the Anjuta project configuration
+
+-SUBDIRS = po src pixmaps doc data
++SUBDIRS = po src pixmaps data
+
+-gnusim8085_docdir = $(docdir)
+-gnusim8085_doc_DATA = \
+- README\
+- AUTHORS\
+- NEWS\
+- TODO\
+- ABOUT-NLS
+-
+-EXTRA_DIST = config.rpath m4/ChangeLog $(gnusim8085doc_DATA)
++EXTRA_DIST = config.rpath m4/ChangeLog
+
+ DISTCLEANFILES = *.exe *.gz
+
diff --git a/dev-embedded/gnusim8085/gnusim8085-1.3.7.ebuild b/dev-embedded/gnusim8085/gnusim8085-1.3.7.ebuild
new file mode 100644
index 000000000000..7415201b7c56
--- /dev/null
+++ b/dev-embedded/gnusim8085/gnusim8085-1.3.7.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="A GTK2 8085 Simulator"
+HOMEPAGE="http://gnusim8085.org"
+SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="nls examples"
+
+RDEPEND=">=x11-libs/gtk+-2.12:2
+ x11-libs/gdk-pixbuf:2
+ dev-libs/glib:2
+ x11-libs/gtksourceview:2.0
+ x11-libs/pango"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-docs.patch
+ epatch "${FILESDIR}"/${P}-cflags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ default
+ doman doc/gnusim8085.1
+
+ if use examples ; then
+ docompress -x /usr/share/doc/${PF}/examples
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/examples/*.asm doc/asm-guide.txt
+ fi
+}
diff --git a/dev-embedded/gnusim8085/metadata.xml b/dev-embedded/gnusim8085/metadata.xml
new file mode 100644
index 000000000000..11f8bc9daa48
--- /dev/null
+++ b/dev-embedded/gnusim8085/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <upstream>
+ <remote-id type="launchpad">gnusim8085</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/gpsim/Manifest b/dev-embedded/gpsim/Manifest
new file mode 100644
index 000000000000..fe883ce7a114
--- /dev/null
+++ b/dev-embedded/gpsim/Manifest
@@ -0,0 +1,2 @@
+DIST gpsim-0.26.1.tar.gz 2350841 SHA256 509120f13971108f2f3e75706a354fb91cc777ad6b05244f26bded5e40a8b974 SHA512 ab710d57e5699e680674b97fb6c4eed19e45ee0bac05e40c2f8b4d58338b1023735e96aa7f9ce0c21048478d291a14fa41f216709b23d85d047d7c2b3e5e7d15 WHIRLPOOL 770f822c4547ef60e3dacc83b9d60db5bd7c0fb7819f3fc2e57b2841b4bbb53fd5f10da4d6da660c945be3497eee2f534c617b064c67a76d2c3f7c3d79524c66
+DIST gpsim-0.27.0.tar.gz 2465642 SHA256 204ed2a8aaf1b3021617544330997f4a508b811afce71fb9628b94406d5e59a2 SHA512 769a49d069cf24f0555ed6b34241139e69398fae1e01981298cd49a6096b8f196dfd9e6d8dfebf3f93294b3ca2acf9c4b1b21be600b5d0dd65dd99b6b159f06b WHIRLPOOL 2146a2cfa79a93b84d5caa014c7c639a4b9d97fbe179f18af697fadee7454aa4c4f379d4d0fe1e48c446bf411faffeef5aa6c4caeb268aa7c37c1f5b8953ba63
diff --git a/dev-embedded/gpsim/files/gpsim-0.26.1-glib-single-include.patch b/dev-embedded/gpsim/files/gpsim-0.26.1-glib-single-include.patch
new file mode 100644
index 000000000000..cd0f798281b5
--- /dev/null
+++ b/dev-embedded/gpsim/files/gpsim-0.26.1-glib-single-include.patch
@@ -0,0 +1,13 @@
+http://gpsim.svn.sourceforge.net/viewvc/gpsim/trunk/src/bitlog.h?r1=2107&r2=2182
+
+--- trunk/src/bitlog.h 2010/06/05 06:41:12 2107
++++ trunk/src/bitlog.h 2012/01/03 02:54:49 2182
+@@ -25,7 +25,7 @@
+
+ // include the absolute minimum portion of GLIB to get the definitions
+ // for guint64, etc.
+-#include <glibconfig.h>
++#include <glib.h>
+
+ /**********************************************************************
+ * boolean event logging
diff --git a/dev-embedded/gpsim/files/gpsim-0.26.1-gtkextra.patch b/dev-embedded/gpsim/files/gpsim-0.26.1-gtkextra.patch
new file mode 100644
index 000000000000..913290970516
--- /dev/null
+++ b/dev-embedded/gpsim/files/gpsim-0.26.1-gtkextra.patch
@@ -0,0 +1,29 @@
+=== modified file 'configure.ac'
+--- configure.ac 2012-06-02 20:11:32 +0000
++++ configure.ac 2012-06-02 20:11:44 +0000
+@@ -79,15 +79,20 @@
+ else
+ dnl gtk2 checks
+
+- $PKGCONFIG --exists gtkextra-2.0
++ GTKEXTRAMOD="gtkextra-2.0"
++ $PKGCONFIG --exists $GTKEXTRAMOD
+ if test $? != 0; then
+- AC_MSG_ERROR(Cannot find gtkextra-2.0 package)
++ GTKEXTRAMOD="gtkextra-3.0"
++ $PKGCONFIG --exists $GTKEXTRAMOD
++ if test $? != 0; then
++ AC_MSG_ERROR(Cannot find gtkextra-2.0 or gtkextra-3.0 package)
++ fi
+ fi
+
+ X_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0 gthread-2.0`
+ X_CFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
+- Y_LDFLAGS=`$PKGCONFIG --libs gtkextra-2.0`
+- Y_CFLAGS=`$PKGCONFIG --cflags gtkextra-2.0`
++ Y_LDFLAGS=`$PKGCONFIG --libs $GTKEXTRAMOD`
++ Y_CFLAGS=`$PKGCONFIG --cflags $GTKEXTRAMOD`
+ GTK_VERSION_T=`$PKGCONFIG --modversion gtk+-2.0`
+ echo linking with gtk-$GTK_VERSION_T
+ AC_DEFINE_UNQUOTED([GTK_VERSION],"$GTK_VERSION_T",[gtk version])
+
diff --git a/dev-embedded/gpsim/gpsim-0.26.1.ebuild b/dev-embedded/gpsim/gpsim-0.26.1.ebuild
new file mode 100644
index 000000000000..3a61fe5155e0
--- /dev/null
+++ b/dev-embedded/gpsim/gpsim-0.26.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="A simulator for the Microchip PIC microcontrollers"
+HOMEPAGE="http://gpsim.sourceforge.net"
+SRC_URI="mirror://sourceforge/gpsim/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="doc gtk static-libs"
+
+RDEPEND=">=dev-embedded/gputils-0.12
+ !dev-embedded/gpsim-lcd
+ dev-libs/glib:2
+ dev-libs/popt
+ sys-libs/readline
+ gtk? ( >=x11-libs/gtk+extra-2 )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc"
+
+DOCS="ANNOUNCE AUTHORS ChangeLog HISTORY PROCESSORS README README.MODULES TODO"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-glib-single-include.patch \
+ "${FILESDIR}"/${P}-gtkextra.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable gtk gui) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/gpsim.pdf
+
+ prune_libtool_files
+}
diff --git a/dev-embedded/gpsim/gpsim-0.27.0.ebuild b/dev-embedded/gpsim/gpsim-0.27.0.ebuild
new file mode 100644
index 000000000000..7801b257f7eb
--- /dev/null
+++ b/dev-embedded/gpsim/gpsim-0.27.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="A simulator for the Microchip PIC microcontrollers"
+HOMEPAGE="http://gpsim.sourceforge.net"
+SRC_URI="mirror://sourceforge/gpsim/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc gtk static-libs"
+
+RDEPEND=">=dev-embedded/gputils-0.12
+ !dev-embedded/gpsim-lcd
+ dev-libs/glib:2
+ dev-libs/popt
+ sys-libs/readline
+ gtk? ( >=x11-libs/gtk+extra-2 )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc"
+
+DOCS="ANNOUNCE AUTHORS ChangeLog HISTORY PROCESSORS README README.MODULES TODO"
+
+src_configure() {
+ econf \
+ $(use_enable gtk gui) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/gpsim.pdf
+
+ prune_libtool_files
+}
diff --git a/dev-embedded/gpsim/metadata.xml b/dev-embedded/gpsim/metadata.xml
new file mode 100644
index 000000000000..8529ed2ba5e9
--- /dev/null
+++ b/dev-embedded/gpsim/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <upstream>
+ <remote-id type="sourceforge">gpsim</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/gputils/Manifest b/dev-embedded/gputils/Manifest
new file mode 100644
index 000000000000..87e1af69b432
--- /dev/null
+++ b/dev-embedded/gputils/Manifest
@@ -0,0 +1,7 @@
+DIST gputils-0.13.6.tar.gz 2042890 SHA256 e7bc35dcaddfefbc9bed0d4e4c09c6bcff1e3eab2c3d5dc555e08755ae877156 SHA512 e5227863c2f103db133102d526fd60d08f306f0ca8cf4b1f951616e8cf72264912394fa51375734c006d48bbe1adf8038347c35d8401f15ec5cfe906008f212d WHIRLPOOL 7bb3ac2425e406fe2e0af30c9134504eec29b29638c19713176a10f3abe0c179238364e14bd7b2a7b8daa9e7902b2477b96124f48df04ad052efe2b66c09fb8c
+DIST gputils-0.13.7.tar.gz 2670129 SHA256 94dd5754393cc6391d609655a59200fa47e0c9435088990be0ed3116b5325c0f SHA512 4133a0281c125abb964d2451bfff422444f9816ebb4c17dcc8faa88829e7a84d6cb542cfb9acda397ef9f14a1979644fbcf29aa489cdf94fb6e26c99b2ee901b WHIRLPOOL 324d859335bc5653bea6db229d052f2ca10ea07f00bf7b6e42282ac810a1b450479e0a0c9c405d68dfc38b546627ccc81c323df946e8bfd8c94c023b8e1e1664
+DIST gputils-0.14.0.tar.gz 2802791 SHA256 39de621e739c45775fb7f72282c1355208039600eadcd88875bfdfac9f0d75ad SHA512 ca50c95fc81043f8672db0d5101831de65a536ce8e5061aabedfa340f821bc7eb6db7bea6f8923b239167ed65a17b1fe7d32d40e10e69b92d351ba408535f1d4 WHIRLPOOL ce67a84a4e0bfcbbaf384130fbca53ce09e63d357314b1fb74972a1b2fe56fa33c576c1720a5aed3ff3362d1ddae57d7ad7350e937b6e08774f1ad1bd6f77825
+DIST gputils-0.14.1.tar.gz 3233430 SHA256 8e2d195b4b84640c182a7ba1aaae958de151f46463d404b85324debbedc0af8e SHA512 e32b7628377390a491b3455a7c5c89cf29b8dd4928f450c879d4d9de4416536265198346ba5b5fad073ac03c33af879ab8acc0a6d6d4713d5ef8c3ea94a4c4dd WHIRLPOOL d160f1dd89c7ece366016d75e62857ae95c54da8dc0186369d65fa0a1041cbe1cc9fc5d8a90771ad4bec77cd7300772daae23b46e82f1bec1a25281cf82040c8
+DIST gputils-0.14.2.tar.gz 3257391 SHA256 d363861dafd44b5db3a7313b4149563fae9e99235f66744394589c3976a77406 SHA512 80e3d488a043e6915e297951190fec2dfb8d073bee793a64e2574aa6c88ad3c180f6e541b71c3dc8f5b844766236293b7c37abd1461593f5d827fdb84cf65a6c WHIRLPOOL d32fec294c53a8f888fe53236b8bbe8bd460a565fa2f5bd91a3ee66ecd13493c597989222a3b494e7d59aae9bd45398ce64533645ff86ad1ae288a01cfc07e0d
+DIST gputils-1.2.0.tar.gz 7585602 SHA256 2216382ef4b4a4fa88af1cb83d837587e02936b55eeb932ace8d359c05089695 SHA512 bb512bb4c55ca4d6bcd2dd12c07f63c51f1a754b75280c7bc2cea469016ee074ba0f07755899de4d5af431897b3e0a33a5f72a3b64f495f38952fb948719a1bd WHIRLPOOL aadd2f057e67d1c71516a78e3f3fe0dec8e2d830216c99aed70b55481b86dd211c69cb5a63735a0fe85672ccae15b3898be7871a01cb8b8bd58e7af30da1c979
+DIST gputils-1.4.0.tar.gz 9659449 SHA256 00279da588eee96a63aba586fe916359097b6db1e6768ce8940a5d18d37e11b1 SHA512 b3425f218b9ef17a3e395c3d4588490cd0cd3bd53d009c1cf499e937438601b2b2ffeffad58a6a741cb326c82b18343ff066f531db033fe5a9bfcbb2fbbfc993 WHIRLPOOL ddf1f0b3d2020646508b1f5805bb7c2e4b5086ea517cb7390f9690af4a15604a395de32b99db20929ebae7a8bb1e93fd11136559dc754a1907241eb01dbc5dac
diff --git a/dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch b/dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch
new file mode 100644
index 000000000000..f743ec343f62
--- /dev/null
+++ b/dev-embedded/gputils/files/gputils-0.13.6-code_pack.patch
@@ -0,0 +1,182 @@
+Index: gpasm/lst.c
+===================================================================
+--- gpasm/lst.c (revision 541)
++++ gpasm/lst.c (revision 542)
+@@ -212,11 +212,75 @@
+ }
+ }
+
++unsigned int lst_data(char *m, unsigned int byte_org,
++ unsigned int bytes_emitted, size_t sizeof_m)
++{
++ char buf[BUFSIZ];
++ unsigned int i;
++ unsigned int lst_bytes = 0;
++
++ if ((byte_org & 1) != 0) {
++ /* not word-aligned */
++ /* list first byte */
++ unsigned char emit_byte = (unsigned char)(i_memory_get(state.i_memory,
++ (byte_org >> 1)) >> 8);
++ snprintf(buf, sizeof(buf), "%02X", emit_byte);
++ strncat(m, buf, sizeof_m);
++ ++lst_bytes;
++ /* list whole words */
++ for (i = 0; (i < ((bytes_emitted-1) >> 1)) && (i < 1); ++i) {
++ unsigned int emit_word = i_memory_get(state.i_memory,
++ ((byte_org+1) >> 1) + i) & 0xffff;
++ snprintf(buf, sizeof(buf), "%02X %02X", emit_word & 0x00ff,
++ emit_word >> 8);
++ strncat(m, buf, sizeof_m);
++ lst_bytes += 2;
++ }
++ /* list extra byte if odd */
++ if (((byte_org+bytes_emitted) & 1) != 0) {
++ snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory,
++ ((byte_org + bytes_emitted - 2) >> 1)) & 0x00ff);
++ strncat(m, buf, sizeof_m);
++ ++lst_bytes;
++ }
++ else {
++ strncat(m, " ", sizeof_m);
++ }
++ }
++ else { /* word-aligned */
++ /* list full words as bytes */
++ for (i = 0; (i < (bytes_emitted >> 1)) && (i < 2); ++i) {
++ unsigned int emit_word = i_memory_get(state.i_memory,
++ (byte_org>>1) + i) & 0xffff;
++ snprintf(buf, sizeof(buf), "%04X ", emit_word);
++ strncat(m, buf, sizeof_m);
++ lst_bytes += 2;
++ }
++ if (bytes_emitted < 4) {
++ /* list extra byte if odd */
++ if (((byte_org+bytes_emitted) & 1) != 0) {
++ snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory,
++ (byte_org+bytes_emitted)>>1) & 0x00ff);
++ strncat(m, buf, sizeof_m);
++ ++lst_bytes;
++ }
++ else {
++ strncat(m, " ", sizeof_m);
++ }
++ }
++ }
++
++ return lst_bytes;
++}
++
+ void lst_format_line(char *src_line, int value)
+ {
+ char m[BUFSIZ];
+ char buf[BUFSIZ];
+ unsigned int emitted = 0;
++ unsigned int byte_org = 0;
++ unsigned int bytes_emitted = 0;
++ unsigned int lst_bytes;
+
+ assert(src_line != NULL);
+
+@@ -239,41 +303,21 @@
+ state.device.id_location + 1) & 0xffff);
+ break;
+ case insn:
+- emitted = state.org - state.lst.line.was_org
+- + (state.obj.section &&
+- state.obj.section->emitted_pack_byte ? 1 : 0);
+- snprintf(m, sizeof(m), "%04X ", (state.lst.line.was_org << _16bit_core)
+- - (state.obj.section &&
+- ((emitted == 0 &&
+- state.obj.section->have_pack_byte) ||
+- state.obj.section->emitted_pack_byte) ? 1 : 0));
++ byte_org = (state.lst.line.was_org << 1);
++ if (state.obj.section)
++ byte_org -= (state.obj.section->emitted_pack_byte ? 1 : 0);
++ bytes_emitted = (state.org << 1) - byte_org;
++ if (state.obj.section)
++ bytes_emitted -= (state.obj.section->have_pack_byte ? 1 : 0);
++ emitted = (bytes_emitted >> 1);
++ if (((byte_org & 1) == 0) && ((bytes_emitted & 1) != 0))
++ emitted += 1;
++ snprintf(m, sizeof(m), "%04X ", byte_org >> (1 - _16bit_core));
+
+- if (emitted >= 1) {
+- if(state.obj.section && state.obj.section->have_pack_byte && emitted == 1)
+- snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory, state.lst.line.was_org) & 0xff);
+- else if(state.obj.section && state.obj.section->emitted_pack_byte)
+- snprintf(buf, sizeof(buf), " %02X ", (i_memory_get(state.i_memory, state.lst.line.was_org - 1) & 0xff00) >> 8);
+- else
+- snprintf(buf, sizeof(buf), "%04X ", i_memory_get(state.i_memory,
+- state.lst.line.was_org) & 0xffff);
++ lst_bytes = lst_data(m, byte_org, bytes_emitted, sizeof(m));
++ byte_org += lst_bytes;
++ bytes_emitted -= lst_bytes;
+
+- strncat(m, buf, sizeof(m));
+- } else
+- strncat(m, " ", sizeof(m));
+-
+- if (emitted >= 2) {
+- if(state.obj.section && state.obj.section->have_pack_byte && emitted == 2)
+- snprintf(buf, sizeof(buf), "%02X ", i_memory_get(state.i_memory,
+- state.lst.line.was_org
+- + (state.obj.section->emitted_pack_byte ? 0 : 1)) & 0xffff);
+- else
+- snprintf(buf, sizeof(buf), "%04X ", i_memory_get(state.i_memory,
+- state.lst.line.was_org
+- + (state.obj.section &&
+- state.obj.section->emitted_pack_byte ? 0 : 1)) & 0xffff);
+- strncat(m, buf, sizeof(buf));
+- } else
+- strncat(m, " ", sizeof(m));
+ break;
+ case config:
+ if(_16bit_core) {
+@@ -376,39 +420,16 @@
+ lst_line(m);
+ }
+
+- if (emitted > 2) {
+- int i;
++ if (bytes_emitted > 0) {
++ while (bytes_emitted > 0) {
++ /* data left to print on separate lines */
+
+- for (i = 2; i < emitted; i += 2) {
+- unsigned int org = state.lst.line.was_org + i -
+- (state.obj.section && state.obj.section->emitted_pack_byte ? 1 : 0);
+-
+- if ((i + 1) < emitted)
+- if(state.obj.section && state.obj.section->have_pack_byte)
+- snprintf(m, sizeof(m), "%04X %04X %02X ",
+- org << _16bit_core,
+- i_memory_get(state.i_memory, org) & 0xffff,
+- i_memory_get(state.i_memory, org + 1) & 0xff);
+- else
+- snprintf(m, sizeof(m), "%04X %04X %04X",
+- org << _16bit_core,
+- i_memory_get(state.i_memory, org) & 0xffff,
+- i_memory_get(state.i_memory, org + 1) & 0xffff);
+- else {
+- if(state.obj.section && state.obj.section->have_pack_byte)
+- snprintf(m, sizeof(m), "%04X %02X ",
+- ((state.lst.line.was_org + i) << _16bit_core),
+- i_memory_get(state.i_memory,
+- state.lst.line.was_org + i) & 0xff);
+- else
+- snprintf(m, sizeof(m), "%04X %04X",
+- ((state.lst.line.was_org + i) << _16bit_core),
+- i_memory_get(state.i_memory,
+- state.lst.line.was_org + i) & 0xffff);
+- }
++ strncpy(m, " ", sizeof(m));
++ lst_bytes = lst_data(m, byte_org, bytes_emitted, sizeof(m));
++ byte_org += lst_bytes;
++ bytes_emitted -= lst_bytes;
+ lst_line(m);
+ }
+-
+ state.cod.emitting = 0;
+ }
+
diff --git a/dev-embedded/gputils/files/gputils-0.13.7-strncat.patch b/dev-embedded/gputils/files/gputils-0.13.7-strncat.patch
new file mode 100644
index 000000000000..577a4bf0328f
--- /dev/null
+++ b/dev-embedded/gputils/files/gputils-0.13.7-strncat.patch
@@ -0,0 +1,94 @@
+https://sourceforge.net/tracker/?func=detail&aid=3081197&group_id=41924&atid=431665
+https://sourceforge.net/tracker/?func=detail&aid=3081206&group_id=41924&atid=431665
+
+--- a/gpasm/scan.c
++++ b/gpasm/scan.c
+@@ -461,9 +461,7 @@ search_pathes(struct source_context *new, char *name)
+ int i;
+
+ for(i = 0; i < state.path_num; i++) {
+- strncpy(tryname, state.paths[i], sizeof(tryname));
+- strncat(tryname, COPY_CHAR, sizeof(tryname));
+- strncat(tryname, name, sizeof(tryname));
++ snprintf(tryname, sizeof(tryname), "%s%s%s", state.paths[i], COPY_CHAR, name);
+ new->f = fopen(tryname, "rt");
+ if(new->f) {
+ new->name = strdup(tryname);
+--- a/gplink/gplink.c
++++ b/gplink/gplink.c
+@@ -340,9 +340,7 @@ void gplink_open_coff(char *name)
+ int i;
+
+ for(i = 0; i < state.numpaths; i++) {
+- strncpy(file_name, state.paths[i], sizeof(file_name));
+- strncat(file_name, COPY_CHAR, sizeof(file_name));
+- strncat(file_name, name, sizeof(file_name));
++ snprintf(file_name, sizeof(file_name), "%s%s%s", state.paths[i], COPY_CHAR, name);
+ coff = fopen(file_name, "rb");
+ if (coff != NULL) {
+ break;
+@@ -695,9 +693,7 @@ linker(void)
+ gp_error("linker script not specified and can't determine default script");
+ return EXIT_FAILURE;
+ }
+- strncpy(file_name, gp_lkr_path, sizeof(file_name));
+- strncat(file_name, COPY_CHAR, sizeof(file_name));
+- strncat(file_name, script_name, sizeof(file_name));
++ snprintf(file_name, sizeof(file_name), "%s%s%s", gp_lkr_path, COPY_CHAR, script_name);
+ gp_message("using default linker script \"%s\"", file_name);
+ open_src(file_name, 0);
+ yyparse();
+--- a/gplink/scan.c
++++ b/gplink/scan.c
+@@ -115,9 +115,7 @@ void open_src(char *name, int isinclude)
+ int i;
+
+ for(i = 0; i < state.numpaths; i++) {
+- strncpy(tryname, state.paths[i], sizeof(tryname));
+- strncat(tryname, COPY_CHAR, sizeof(tryname));
+- strncat(tryname, name, sizeof(tryname));
++ snprintf(tryname, sizeof(tryname), "%s%s%s", state.paths[i], COPY_CHAR, name);
+ new->f = fopen(tryname, "rt");
+ if(new->f) {
+ new->name = strdup(tryname);
+--- a/gpasm/lst.c
++++ b/gpasm/lst.c
+@@ -149,22 +149,23 @@ void lst_memory_map(MemBlock *m)
+ }
+
+ if(row_used) {
+- snprintf(buf, sizeof(buf), "%08x :", (i + base) << _16bit_core);
++ int len = sizeof(buf);
++ len -= snprintf(buf, len, "%08x :", (i + base) << _16bit_core);
+ for (j = 0; j < num_per_line; j++) {
+ if ((j % num_per_block) == 0) {
+- strncat(buf, " ", sizeof(buf));
++ strncat(buf, " ", len--);
+ }
+ if (m->memory[i + j] & MEM_USED_MASK) {
+- strncat(buf, "X", sizeof(buf));
++ strncat(buf, "X", len--);
+ if (_16bit_core) {
+ /* each word has two bytes */
+- strncat(buf, "X", sizeof(buf));
++ strncat(buf, "X", len--);
+ }
+ } else {
+- strncat(buf, "-", sizeof(buf));
++ strncat(buf, "-", len--);
+ if (_16bit_core) {
+ /* each word has two bytes */
+- strncat(buf, "-", sizeof(buf));
++ strncat(buf, "-", len--);
+ }
+ }
+ }
+@@ -404,7 +405,7 @@ void lst_format_line(char *src_line, int value)
+ } else {
+ snprintf(buf, sizeof(buf), " M ");
+ }
+- strncat(m, buf, sizeof(m));
++ strncat(m, buf, sizeof(m) - strlen(m));
+
+ /* Now copy 'l' to 'e', expanding tabs as required */
+ {
diff --git a/dev-embedded/gputils/gputils-0.13.6-r1.ebuild b/dev-embedded/gputils/gputils-0.13.6-r1.ebuild
new file mode 100644
index 000000000000..9dfa387e7c96
--- /dev/null
+++ b/dev-embedded/gputils/gputils-0.13.6-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers"
+HOMEPAGE="http://gputils.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-code_pack.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Installation failed"
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO doc/gputils.ps
+ insinto /usr/share/doc/${PF}/
+ doins doc/gputils.pdf
+}
diff --git a/dev-embedded/gputils/gputils-0.13.7.ebuild b/dev-embedded/gputils/gputils-0.13.7.ebuild
new file mode 100644
index 000000000000..6f2ff0e70d31
--- /dev/null
+++ b/dev-embedded/gputils/gputils-0.13.7.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers"
+HOMEPAGE="http://gputils.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-strncat.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO doc/gputils.ps
+ insinto /usr/share/doc/${PF}
+ doins doc/gputils.pdf || die
+}
diff --git a/dev-embedded/gputils/gputils-0.14.0.ebuild b/dev-embedded/gputils/gputils-0.14.0.ebuild
new file mode 100644
index 000000000000..fc453d140d90
--- /dev/null
+++ b/dev-embedded/gputils/gputils-0.14.0.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers"
+HOMEPAGE="http://gputils.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+src_install() {
+ default
+ dodoc doc/gputils.pdf
+}
diff --git a/dev-embedded/gputils/gputils-0.14.1.ebuild b/dev-embedded/gputils/gputils-0.14.1.ebuild
new file mode 100644
index 000000000000..e10a467566a7
--- /dev/null
+++ b/dev-embedded/gputils/gputils-0.14.1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers"
+HOMEPAGE="http://gputils.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+src_install() {
+ default
+ dodoc doc/gputils.pdf
+}
diff --git a/dev-embedded/gputils/gputils-0.14.2.ebuild b/dev-embedded/gputils/gputils-0.14.2.ebuild
new file mode 100644
index 000000000000..e10a467566a7
--- /dev/null
+++ b/dev-embedded/gputils/gputils-0.14.2.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers"
+HOMEPAGE="http://gputils.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+src_install() {
+ default
+ dodoc doc/gputils.pdf
+}
diff --git a/dev-embedded/gputils/gputils-1.2.0.ebuild b/dev-embedded/gputils/gputils-1.2.0.ebuild
new file mode 100644
index 000000000000..32909d55285e
--- /dev/null
+++ b/dev-embedded/gputils/gputils-1.2.0.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers"
+HOMEPAGE="http://gputils.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+src_install() {
+ default
+ dodoc doc/gputils.pdf
+}
diff --git a/dev-embedded/gputils/gputils-1.4.0.ebuild b/dev-embedded/gputils/gputils-1.4.0.ebuild
new file mode 100644
index 000000000000..23e506d84d5d
--- /dev/null
+++ b/dev-embedded/gputils/gputils-1.4.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Collection of tools including assembler, linker and librarian for PIC microcontrollers"
+HOMEPAGE="http://gputils.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+src_configure() {
+ tc-ld-disable-gold #369291
+ default
+}
+
+src_install() {
+ default
+ dodoc doc/gputils.pdf
+}
diff --git a/dev-embedded/gputils/metadata.xml b/dev-embedded/gputils/metadata.xml
new file mode 100644
index 000000000000..cec11dbd208c
--- /dev/null
+++ b/dev-embedded/gputils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <upstream>
+ <remote-id type="sourceforge">gputils</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/icdprog/Manifest b/dev-embedded/icdprog/Manifest
new file mode 100644
index 000000000000..9962a339ae52
--- /dev/null
+++ b/dev-embedded/icdprog/Manifest
@@ -0,0 +1 @@
+DIST icdprog-0.5.tar.gz 47195 SHA256 e863fcf2bd3351be80106b8aa7b4a1a59785de10ad404d34bd0b19f3e445b489 SHA512 3e238cbbbcfc034a5100c78c1e8ffea669deeec26cdf2a2ad1d27577acff1a114badfb67453d4241b9a239326d0d624616fc8383affc3d34380edfdc0fcf7989 WHIRLPOOL f79e4443c22209e8441a2a27588fd8e528167d660d75234e9a7692a24b93e50e1edb56b1cb28f354596e96f49074f8179e73029323987b4599a9e6e067e668fe
diff --git a/dev-embedded/icdprog/icdprog-0.5.ebuild b/dev-embedded/icdprog/icdprog-0.5.ebuild
new file mode 100644
index 000000000000..c8b07aeab3a1
--- /dev/null
+++ b/dev-embedded/icdprog/icdprog-0.5.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Microchip PIC Programmer using ICD hardware"
+HOMEPAGE="http://icdprog.sf.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+src_compile() {
+ tc-export CC
+
+ cd "${S}"/src
+ emake CFLAGS="${CFLAGS}"
+ cd "${S}"/src/icddump
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin src/icdprog
+ dobin src/icddump/icddump
+ dohtml readme.html
+ dodoc src/README.coders
+}
+
+pkg_postinst() {
+ elog "Please see readme.html if the ICD seems to be very slow."
+}
diff --git a/dev-embedded/icdprog/metadata.xml b/dev-embedded/icdprog/metadata.xml
new file mode 100644
index 000000000000..8984bd587205
--- /dev/null
+++ b/dev-embedded/icdprog/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription>ICDPROG is a simple command line programmer for Microchip PIC
+ controllers, using the Microchip ICD (in circuit debugger)
+ hardware.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">icdprog</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/include/Manifest b/dev-embedded/include/Manifest
new file mode 100644
index 000000000000..af434b93e76e
--- /dev/null
+++ b/dev-embedded/include/Manifest
@@ -0,0 +1 @@
+DIST include-0.4.2.tar.bz2 110312 SHA256 952bb8f4d166da3715e502a7c647d916b4c5dee14007768f58d0782eb0986283 SHA512 5c8f6eab27bfbc7628107162cae71d2e88ce6d96b655427468b81de052abf02ef48b7fe05435fc1468855e21665e4e973ef63d94265351f09e078119180dc07b WHIRLPOOL 7c4f0418e4e82ec575198e481cd0092ecad3bc72ffa635b65600de38f2ec35607008ad8a58d6fee78614047f91c374e3567e9bbe2d880862e002b7304b99aa39
diff --git a/dev-embedded/include/include-0.4.2.ebuild b/dev-embedded/include/include-0.4.2.ebuild
new file mode 100644
index 000000000000..7562e8093008
--- /dev/null
+++ b/dev-embedded/include/include-0.4.2.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="A collection of useful, independent include files for C/Assembler developers"
+HOMEPAGE="http://openwince.sourceforge.net/include/"
+SRC_URI="mirror://sourceforge/openwince/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE=""
diff --git a/dev-embedded/include/metadata.xml b/dev-embedded/include/metadata.xml
new file mode 100644
index 000000000000..4e6d8fe4e4b9
--- /dev/null
+++ b/dev-embedded/include/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <upstream>
+ <remote-id type="sourceforge">openwince</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/jal/Manifest b/dev-embedded/jal/Manifest
new file mode 100644
index 000000000000..a8cad79af1e4
--- /dev/null
+++ b/dev-embedded/jal/Manifest
@@ -0,0 +1,2 @@
+DIST jal-0.4.60.tar.gz 383874 SHA256 2778b15f88554b841acfd66399d4a25895a97909d167db49acbea883135e1270 SHA512 caa3c33bca680ea01e69962212e3ab72c56362907a9ae67597fbe6fec2393d6a81f01f0d02bec3f434888a825d1d20e526d4c62a175fcca16ab02af3c59fa0c1 WHIRLPOOL 6d4054920d1e7ba7ba7ef7d9e20a25c5dcf33d402342629222e117d63e95185ca5cdf4f7764d4be9a5344bb6d8e3bd95dbcabcf4ba0ddbb5943c38f86da12671
+DIST jal-0.4.62.tar.gz 429020 SHA256 c285dbbe4b587293cc4608d9f020d2ffb5ed3ecf7131980fbc2ee4f83e0e86de SHA512 2354359507c2d33d8eeb7a5b9d40471a2d8cff245eb59d64484a89e4aff14d7d3c6021f0b26f1e48adb986fc221e4dade1037cef50167cbe249da445c77dbcb1 WHIRLPOOL c7581331e0e544cf7de9d5d7acafc10911fee4dc8d7828b9bb6076d365e382e1926e53a8f1d824575a29f3c6cb5780b7314fa09826a04f44d949f16c1ba758f4
diff --git a/dev-embedded/jal/jal-0.4.60.ebuild b/dev-embedded/jal/jal-0.4.60.ebuild
new file mode 100644
index 000000000000..14cd6f1af6b5
--- /dev/null
+++ b/dev-embedded/jal/jal-0.4.60.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A high-level language for a number of Microchip PIC and Ubicom SX microcontrollers"
+HOMEPAGE="http://jal.sourceforge.net/"
+SRC_URI="mirror://sourceforge/jal/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="x86"
+SLOT="0"
+IUSE=""
+DEPEND=""
+
+src_install() {
+ make DESTDIR=${D} install || die
+}
diff --git a/dev-embedded/jal/jal-0.4.62.ebuild b/dev-embedded/jal/jal-0.4.62.ebuild
new file mode 100644
index 000000000000..c132301fe4d9
--- /dev/null
+++ b/dev-embedded/jal/jal-0.4.62.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A high-level language for a number of Microchip PIC and Ubicom SX microcontrollers"
+HOMEPAGE="http://jal.sourceforge.net/"
+SRC_URI="mirror://sourceforge/jal/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
diff --git a/dev-embedded/jal/metadata.xml b/dev-embedded/jal/metadata.xml
new file mode 100644
index 000000000000..b67c99424dab
--- /dev/null
+++ b/dev-embedded/jal/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription>
+Jal is a high-level language for a number of Microchip (TM) PIC microcontrollers (16c84, 16f84, 12c508,
+12c509, 16F877) and Ubicom SX (SX18 and SX28) microcontrollers
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">jal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/jtag/Manifest b/dev-embedded/jtag/Manifest
new file mode 100644
index 000000000000..ee84005ac978
--- /dev/null
+++ b/dev-embedded/jtag/Manifest
@@ -0,0 +1 @@
+DIST jtag-0.5.1.tar.bz2 314857 SHA256 4036f97ef693e9cbe6f99137ad6920b2679ba97d58cf5e78442a4d60308563b6 SHA512 f8c6000595929f9b3e20dd08a7c665b3c960dfa8b1c4d7f1c591692621ffaffceb5e844b3eb75a60dcfa870a38411604fe07564dc2ec48d6a5df0dbba6e960b6 WHIRLPOOL 8c1b718dc6b7670dfb60e47be6935a47707840da5b39c3334361e79a1f2ec920cc330ee7b478be1083ebb8da09e4c67fafb95c83672f3179f968cea20ded4fdc
diff --git a/dev-embedded/jtag/files/jtag-0.5.1-no-erase-overshoot.diff b/dev-embedded/jtag/files/jtag-0.5.1-no-erase-overshoot.diff
new file mode 100644
index 000000000000..a79450d2bf58
--- /dev/null
+++ b/dev-embedded/jtag/files/jtag-0.5.1-no-erase-overshoot.diff
@@ -0,0 +1,34 @@
+*** jtag-0.5.1/src/flash.c.orig Wed Jun 23 14:02:44 2004
+--- jtag-0.5.1/src/flash.c Wed Jun 23 14:03:39 2004
+***************
+*** 293,306 ****
+ int bc = 0, bn = 0;
+ int block_no = find_block( cfi, adr );
+
+! if (!erased[block_no]) {
+ flash_driver->unlock_block( cfi_array, adr );
+ printf( _("\nblock %d unlocked\n"), block_no );
+ printf( _("erasing block %d: %d\n"), block_no, flash_driver->erase_block( cfi_array, adr ) );
+ erased[block_no] = 1;
+ }
+
+- bn = fread( b, 1, BSIZE, f );
+ for (bc = 0; bc < bn; bc += flash_driver->bus_width) {
+ int j;
+ printf( _("addr: 0x%08X"), adr );
+--- 293,307 ----
+ int bc = 0, bn = 0;
+ int block_no = find_block( cfi, adr );
+
+! bn = fread( b, 1, BSIZE, f );
+!
+! if (bn && !erased[block_no]) {
+ flash_driver->unlock_block( cfi_array, adr );
+ printf( _("\nblock %d unlocked\n"), block_no );
+ printf( _("erasing block %d: %d\n"), block_no, flash_driver->erase_block( cfi_array, adr ) );
+ erased[block_no] = 1;
+ }
+
+ for (bc = 0; bc < bn; bc += flash_driver->bus_width) {
+ int j;
+ printf( _("addr: 0x%08X"), adr );
diff --git a/dev-embedded/jtag/jtag-0.5.1-r1.ebuild b/dev-embedded/jtag/jtag-0.5.1-r1.ebuild
new file mode 100644
index 000000000000..5ef0514e6eb7
--- /dev/null
+++ b/dev-embedded/jtag/jtag-0.5.1-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="Software for working with JTAG-aware (IEEE 1149.1) devices (parts) and boards through JTAG adapter"
+HOMEPAGE="http://openwince.sourceforge.net/jtag/"
+SRC_URI="mirror://sourceforge/openwince/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 sparc ~ppc"
+IUSE=""
+
+DEPEND="dev-embedded/include"
+RDEPEND="${DEPEND}
+ !dev-embedded/urjtag"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-erase-overshoot.diff
+}
diff --git a/dev-embedded/jtag/metadata.xml b/dev-embedded/jtag/metadata.xml
new file mode 100644
index 000000000000..4e6d8fe4e4b9
--- /dev/null
+++ b/dev-embedded/jtag/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <upstream>
+ <remote-id type="sourceforge">openwince</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/kobs-ng/Manifest b/dev-embedded/kobs-ng/Manifest
new file mode 100644
index 000000000000..965bf5e1035c
--- /dev/null
+++ b/dev-embedded/kobs-ng/Manifest
@@ -0,0 +1 @@
+DIST kobs-ng-3.0.35-4.1.0.tar.gz 145817 SHA256 92d2f23add8c5d3102c77f241cae26ca55871ccc613a7af833bebbbac7afb8ea SHA512 b2bb27202ecbf31bebec8eadcf04362178ec74337400416259237880b94ac2e5fcffae59b48857e9fcfa1b1aae584b181901d4dafea63eb1e0972ed3bc3b9e6e WHIRLPOOL 03674167651e9bb9fa71983ea71eb207fc96da4c881fb5def3ebfffdb86a8a2cee08de741d102c7aa1781619959064d54b79f74959940c2177c2f15d65acd76e
diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch
new file mode 100644
index 000000000000..28b1ef97c7f0
--- /dev/null
+++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-array-violation.patch
@@ -0,0 +1,13 @@
+the part array is declared as part[2], so trying to index [2] isn't going to work
+
+--- a/src/mtd.c
++++ b/src/mtd.c
+@@ -786,7 +786,7 @@
+ mp->ecc = 1;
+ }
+
+- if (md->part[1].fd >= 0 && md->part[2].fd >=0)
++ if (md->part[1].fd >= 0)
+ md->flags |= F_MULTICHIP;
+
+ /* if a second partition has been opened, verify that are compatible */
diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch
new file mode 100644
index 000000000000..b7dfbe3e2e39
--- /dev/null
+++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-mtd-defines.patch
@@ -0,0 +1,75 @@
+# Source: http://git.buildroot.net/buildroot/plain/package/kobs-ng/kobs-ng-fix-mtd-defines.patch?id=b6fb2f5018fe0ae9bba275991efc502236422924
+
+Newer kernel headers renamed mtd mode defines and no longer support
+MEMSETOOBSEL. Allow code to work with both older and newer kernel
+versions.
+
+Signed-off-by: Paul B. Henson <henson@acm.org>
+
+diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.c kobs-ng-3.0.35-4.0.0/src/mtd.c
+--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.c 2012-12-17 22:37:40.000000000 -0800
++++ kobs-ng-3.0.35-4.0.0/src/mtd.c 2013-07-28 19:39:59.000000000 -0700
+@@ -852,8 +852,11 @@
+ mp = &md->part[i];
+
+ if (mp->fd != -1) {
++/* Newer kernels dropped MEMSETOOBSEL */
++#ifdef MEMSETOOBSEL
+ (void)ioctl(mp->fd, MEMSETOOBSEL,
+ &mp->old_oobinfo);
++#endif
+ close(mp->fd);
+ }
+
+@@ -896,6 +899,8 @@
+ continue;
+ }
+
++/* Newer kernels dropped MEMSETOOBSEL */
++#ifdef MEMSETOOBSEL
+ if (r == -ENOTTY) {
+ r = ioctl(mp->fd, MEMSETOOBSEL, &mp->old_oobinfo);
+ if (r != 0) {
+@@ -904,6 +909,7 @@
+ }
+ mp->oobinfochanged = 0;
+ }
++#endif
+ } else {
+ r = ioctl(mp->fd, MTDFILEMODE, (void *)MTD_MODE_RAW);
+ if (r != 0 && r != -ENOTTY) {
+@@ -911,6 +917,8 @@
+ continue;
+ }
+
++/* Newer kernels dropped MEMSETOOBSEL */
++#ifdef MEMSETOOBSEL
+ if (r == -ENOTTY) {
+ r = ioctl(mp->fd, MEMSETOOBSEL, &none_oobinfo);
+ if (r != 0) {
+@@ -920,6 +928,7 @@
+ mp->oobinfochanged = 1;
+ } else
+ mp->oobinfochanged = 2;
++#endif
+ }
+
+ mp->ecc = ecc;
+diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.h kobs-ng-3.0.35-4.0.0/src/mtd.h
+--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.h 2012-12-17 22:37:40.000000000 -0800
++++ kobs-ng-3.0.35-4.0.0/src/mtd.h 2013-07-28 19:33:57.000000000 -0700
+@@ -31,6 +31,14 @@
+ #include "BootControlBlocks.h"
+ #include "rom_nand_hamming_code_ecc.h"
+
++// Newer kernel headers renamed define
++#ifndef MTD_MODE_NORMAL
++#define MTD_MODE_NORMAL MTD_FILE_MODE_NORMAL
++#endif
++#ifndef MTD_MODE_RAW
++#define MTD_MODE_RAW MTD_FILE_MODE_RAW
++#endif
++
+ //------------------------------------------------------------------------------
+ // Re-definitions of true and false, because the standard ones aren't good
+ // enough?
diff --git a/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch b/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch
new file mode 100644
index 000000000000..47fd33170b2e
--- /dev/null
+++ b/dev-embedded/kobs-ng/files/kobs-ng-fix-open-without-mode.patch
@@ -0,0 +1,13 @@
+add missing mode to open() when using O_CREAT
+
+--- kobs-ng-3.0.35-4.1.0/src/main.c
++++ kobs-ng-3.0.35-4.1.0/src/main.c
+@@ -563,7 +563,7 @@
+ int sz = getpagesize();
+
+ from = open(file_name, O_RDONLY);
+- to = open(tmp_file, O_CREAT | O_RDWR);
++ to = open(tmp_file, O_CREAT | O_RDWR, 0644);
+ if (from < 0 || to < 0) {
+ fprintf(stderr, "unable to create a temporary file\n");
+ exit(5);
diff --git a/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild b/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild
new file mode 100644
index 000000000000..a1dd4e859cbb
--- /dev/null
+++ b/dev-embedded/kobs-ng/kobs-ng-3.0.35.4.1.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils versionator
+
+MY_PV="$(get_version_component_range 1-3)-$(get_version_component_range 4-)"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="utility to write u-boot images to NAND on Freescale iMX devices"
+HOMEPAGE="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6_SW"
+SRC_URI="http://storage.googleapis.com/chromeos-localmirror/distfiles/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/kobs-ng-fix-mtd-defines.patch
+ epatch "${FILESDIR}"/kobs-ng-fix-open-without-mode.patch
+ epatch "${FILESDIR}"/kobs-ng-fix-array-violation.patch
+}
diff --git a/dev-embedded/kobs-ng/metadata.xml b/dev-embedded/kobs-ng/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/kobs-ng/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/libdisasm/Manifest b/dev-embedded/libdisasm/Manifest
new file mode 100644
index 000000000000..7d7419976987
--- /dev/null
+++ b/dev-embedded/libdisasm/Manifest
@@ -0,0 +1 @@
+DIST libdisasm-0.23.tar.gz 454721 SHA256 de3e578aa582af6e1d7729f39626892fb72dc6573658a221e0905f42a65433da SHA512 29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7 WHIRLPOOL fbdb3720b88aeaf0f260002aac4f9bf117a00d9f05a3c05ff5352705fefdb8ae5f3ebe45838ff23a7ba58fa565e18c5598d86e1ec878c53adf5bd9348ab6bc05
diff --git a/dev-embedded/libdisasm/libdisasm-0.23.ebuild b/dev-embedded/libdisasm/libdisasm-0.23.ebuild
new file mode 100644
index 000000000000..a6232490f159
--- /dev/null
+++ b/dev-embedded/libdisasm/libdisasm-0.23.ebuild
@@ -0,0 +1,14 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Library for providing basic disassembly of Intel x86 instructions from a binary stream"
+HOMEPAGE="http://bastard.sourceforge.net/libdisasm.html"
+SRC_URI="mirror://sourceforge/project/bastard/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="Clarified-Artistic"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
diff --git a/dev-embedded/libdisasm/metadata.xml b/dev-embedded/libdisasm/metadata.xml
new file mode 100644
index 000000000000..232bff48bfa8
--- /dev/null
+++ b/dev-embedded/libdisasm/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">bastard</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/libftd2xx/Manifest b/dev-embedded/libftd2xx/Manifest
new file mode 100644
index 000000000000..0adb118c06ac
--- /dev/null
+++ b/dev-embedded/libftd2xx/Manifest
@@ -0,0 +1,3 @@
+DIST libftd2xx0.4.16.tar.gz 2124501 SHA256 84e2b90c2d553837d30d435fa5e4e353a4c051a51b50a07251cdd59ada7a4a96 SHA512 3a945bd31750dafd08cb86e875263e4fdb7a641676e91caf12420769ff12b505e34ec3a88d80dd43590d039c2ace280f166d1ebda2dcc399fb696d9f6c298f20 WHIRLPOOL 3377cf086fa62d8e363f4e5456fd180361fd47c1b0074059e5a55a2f765c936af91c15ff84c26a05df734c365771d50e68387adaf8cd083fa63dc0ae8929e641
+DIST libftd2xx0.4.16_x86_64.tar.gz 2099109 SHA256 b80233143de6b8077ade3e7d9c9819a2c0a4dbf4fd9fbff756b72d656dc611ec SHA512 e11ffa917560b6fb974092bcd89ef95f21651a3ce84d0bc7cc7647c4fe031368209db3b4ab52f8d6240ee89c2e6335e89135d4f358c4271284f8a830655608a9 WHIRLPOOL ad8bfe48e30ea20dd422cc2047bc8c06b4c9f225044fdc1fd96d3fa3876f894cea9094dfaffb1ec94c4decf2b89ebb802d7a60fd62ce3f5919b921877b7a039a
+DIST libftd2xx1.1.12.tar.gz 950540 SHA256 644951c1d7eeac05b0a648a105fd84ba14b0b20250f6b70f1a63e69d2f6b2579 SHA512 afe0a8a7ccc47eb8888346dabdbfb41e182f7dadee7a57a1c4ffce544aebe5cab45c3e64de4ebeebdc0f31961617a79cbcf11dadfebde65ee79ca38e6234995a WHIRLPOOL e56228f9c42aebeb0c425ea20a89466ac07615a943e9ddb7585762315a581026a1e59df60ed0813c78b8a28842728545276dc3c697a6c9624b66ef8fc3e08a7a
diff --git a/dev-embedded/libftd2xx/libftd2xx-0.4.16-r1.ebuild b/dev-embedded/libftd2xx/libftd2xx-0.4.16-r1.ebuild
new file mode 100644
index 000000000000..4f01cc7ef527
--- /dev/null
+++ b/dev-embedded/libftd2xx/libftd2xx-0.4.16-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Library that allows a direct access to a USB device"
+HOMEPAGE="http://www.ftdichip.com/Drivers/D2XX.htm"
+SRC_URI="amd64? ( http://www.ftdichip.com/Drivers/D2XX/Linux/${MY_P}_x86_64.tar.gz )
+ x86? ( http://www.ftdichip.com/Drivers/D2XX/Linux/${MY_P}.tar.gz )"
+
+LICENSE="FTDI LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+QA_PREBUILT="*"
+
+S=${WORKDIR}
+
+src_install() {
+ use x86 && cd ${MY_P}
+ use amd64 && cd ${MY_P}_x86_64
+
+ into /opt
+ dolib.so ${PN}.so.${PV}
+ dosym ${PN}.so.${PV} /opt/$(get_libdir)/${PN}.so.${PV:0:1}
+ dosym ${PN}.so.${PV:0:1} /opt/$(get_libdir)/${PN}.so
+ insinto /usr/include
+ doins ftd2xx.h WinTypes.h
+
+ dodir /etc/env.d
+ echo "LDPATH=\"/opt/$(get_libdir)\"" > ${D}/etc/env.d/50libftd2xx || die
+ if use examples ; then
+ find sample lib_table '(' -name '*.so' -o -name '*.[oa]' ')' -exec rm -f {} +
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ insinto /usr/share/doc/${PF}/sample
+ doins -r lib_table
+ fi
+
+ dodoc Config.txt
+ use x86 && dodoc faq.txt readme.dat
+ use amd64 && dodoc FAQ.txt README.dat
+}
diff --git a/dev-embedded/libftd2xx/libftd2xx-1.1.12-r1.ebuild b/dev-embedded/libftd2xx/libftd2xx-1.1.12-r1.ebuild
new file mode 100644
index 000000000000..3bb2bfe3cf6a
--- /dev/null
+++ b/dev-embedded/libftd2xx/libftd2xx-1.1.12-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Library that allows a direct access to a USB device"
+HOMEPAGE="http://www.ftdichip.com/Drivers/D2XX.htm"
+SRC_URI="http://www.ftdichip.com/Drivers/D2XX/Linux/${MY_P}.tar.gz"
+
+LICENSE="FTDI LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="examples"
+
+QA_PREBUILT="*"
+
+S=${WORKDIR}
+
+src_install() {
+
+ use arm && cd "${S}"/release/build/arm926
+ use amd64 && cd "${S}"/release/build/x86_64
+ use x86 && cd "${S}"/release/build/i386
+
+ into /opt
+ dolib.so ${PN}.so.${PV}
+ dosym ${PN}.so.${PV} /opt/$(get_libdir)/${PN}.so.${PV:0:1}
+ dosym ${PN}.so.${PV:0:1} /opt/$(get_libdir)/${PN}.so
+ insinto /usr/include
+ doins "${S}"/release/ftd2xx.h "${S}"/release/WinTypes.h
+
+ dodir /etc/env.d
+ echo "LDPATH=\"/opt/$(get_libdir)\"" > ${D}/etc/env.d/50libftd2xx || die
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/sample
+ doins -r "${S}"/release/examples
+ fi
+
+ dodoc "${S}"/release/ReadMe.txt
+}
diff --git a/dev-embedded/libftd2xx/metadata.xml b/dev-embedded/libftd2xx/metadata.xml
new file mode 100644
index 000000000000..11dd73f4383c
--- /dev/null
+++ b/dev-embedded/libftd2xx/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>brendan@horan.hk</email>
+ <name>Brendan Horan</name>
+ <description>Proxy maintainer. Assign bugs to him</description>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/libftdi/Manifest b/dev-embedded/libftdi/Manifest
new file mode 100644
index 000000000000..57bb77c638a1
--- /dev/null
+++ b/dev-embedded/libftdi/Manifest
@@ -0,0 +1,4 @@
+DIST libftdi-0.19.tar.gz 406671 SHA256 567c9d2c42d92fc401c5aba2deed45ffb2433990984e816bcdf31e441aef06be SHA512 c6deefe8c83063343321e8c2c6b6c1c2842a9f1caf4e54f47106c3c4aac638736f19fecf91582c6cc9f4917c4d140157440c360ce3a030dfb7fa027483bab972 WHIRLPOOL b3ee2812697cb8e0e549d580b07b2d67f2bc7bbb5da823e80172748d2d907e67c36314c4524beb2278e131a57c1ae4e25efaaa7b243ab80b30a3f88fa9f6fd7a
+DIST libftdi-0.20.tar.gz 423570 SHA256 3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e SHA512 540e5eb201a65936c3dbabff70c251deba1615874b11ff27c5ca16c39d71c150cf61758a68b541135a444fe32ab403b0fba0daf55c587647aaf9b3f400f1dee7 WHIRLPOOL b1eab592bd6a21a123c7e951d5e4cdafc740c20773b8c5c7c86eef2a05bc8a190a2758a04187d3436de464a49dc329d4e4c9e54792287cc5c39a0ec7d08425d2
+DIST libftdi1-1.0.tar.bz2 97072 SHA256 7290fd38208d8c00d25ed13ce172aaa0403b37148080e4a33a99837022d2b321 SHA512 e733db0bf826415971c64723fe1e56cb1201fa1b9e3a3f04a2a47e1d16c543ae29c634a514f5ff5ca422c2e3b3e1715988c84df1dc66114700209dfb1e6d96ae WHIRLPOOL 82b384b396b12681d88531082e6a5d9d765934877192001106b7bb2ee91da91d0941eb7514b7b091fca403d47b4458a5ae06c5249b0cb0114a0fbe7b7056b7ed
+DIST libftdi1-1.2.tar.bz2 100672 SHA256 a6ea795c829219015eb372b03008351cee3fb39f684bff3bf8a4620b558488d6 SHA512 d175e2b39dda880653a2e46db67e49a8921095e69eff6598159c3c31292d4ce76617c2f1617fd6727b08c930fcea335d8ef01857debbb60e7ac384b516d38a05 WHIRLPOOL 7e6646a23b8e8f1c0fec6b1ad3231797653e1788abfb7340cd391c792d2f48e4cada0ca832e325947b49d964919d5b81cddd8b43f3962d185605afbabd743fbf
diff --git a/dev-embedded/libftdi/files/libftdi-1.0-staticlibs.patch b/dev-embedded/libftdi/files/libftdi-1.0-staticlibs.patch
new file mode 100644
index 000000000000..a3ce560dbfbd
--- /dev/null
+++ b/dev-embedded/libftdi/files/libftdi-1.0-staticlibs.patch
@@ -0,0 +1,123 @@
+make static libs optional. already sent upstream.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,6 +46,8 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
+ "Static library, good if you want to embed libftdi1 in your application.")
+ set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+ "C/C++ header files.")
++
++option ( STATICLIBS "Build static libraries" ON )
+
+ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
+ set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
+--- a/ftdipp/CMakeLists.txt
++++ b/ftdipp/CMakeLists.txt
+@@ -30,12 +30,16 @@ if (FTDIPP)
+ set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
+
+ # Static library
+- add_library(ftdipp1-static STATIC ${cpp_sources})
+- set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
++ if (STATICLIBS)
++ add_library(ftdipp1-static STATIC ${cpp_sources})
++ set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
++ endif (STATICLIBS)
+
+ # Prevent clobbering each other during the build
+ set_target_properties(ftdipp1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+- set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++ if (STATICLIBS)
++ set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++ endif (STATICLIBS)
+
+ # Dependencies
+ target_link_libraries(ftdipp1 ftdi1 ${LIBUSB_LIBRARIES} ${BOOST_LIBRARIES})
+@@ -46,10 +50,12 @@ if (FTDIPP)
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ COMPONENT sharedlibs
+ )
+- install( TARGETS ftdipp1-static
+- ARCHIVE DESTINATION lib${LIB_SUFFIX}
+- COMPONENT staticlibs
+- )
++ if (STATICLIBS)
++ install( TARGETS ftdipp1-static
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
++ COMPONENT staticlibs
++ )
++ endif (STATICLIBS)
+ install( FILES ${cpp_headers}
+ DESTINATION include/${PROJECT_NAME}
+ COMPONENT headers
+@@ -61,10 +67,12 @@ if (FTDIPP)
+ DESTINATION bin
+ COMPONENT sharedlibs
+ )
+- install( TARGETS ftdipp1-static
+- DESTINATION bin
+- COMPONENT staticlibs
+- )
++ if (STATICLIBS)
++ install( TARGETS ftdipp1-static
++ DESTINATION bin
++ COMPONENT staticlibs
++ )
++ endif (STATICLIBS)
+ install( FILES ${cpp_headers}
+ DESTINATION include/${PROJECT_NAME}
+ COMPONENT headers
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -28,11 +28,15 @@ set_target_properties(ftdi1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}
+
+ # Static library
+ add_library(ftdi1-static STATIC ${c_sources})
+-set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
++if (STATICLIBS)
++ set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
++endif (STATICLIBS)
+
+ # Prevent clobbering each other during the build
+ set_target_properties(ftdi1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+-set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++if (STATICLIBS)
++ set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++endif (STATICLIBS)
+
+ # Dependencies
+ target_link_libraries(ftdi1 ${LIBUSB_LIBRARIES})
+@@ -45,10 +49,12 @@ if(${UNIX})
+ COMPONENT sharedlibs
+ )
+
+- install( TARGETS ftdi1-static
+- ARCHIVE DESTINATION lib${LIB_SUFFIX}
+- COMPONENT staticlibs
+- )
++ if (STATICLIBS)
++ install( TARGETS ftdi1-static
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
++ COMPONENT staticlibs
++ )
++ endif (STATICLIBS)
+
+ install( FILES ${c_headers}
+ DESTINATION include/${PROJECT_NAME}
+@@ -64,10 +70,12 @@ if(${WIN32})
+ COMPONENT sharedlibs
+ )
+
+- install( TARGETS ftdi1-static
+- DESTINATION bin
+- COMPONENT staticlibs
+- )
++ if (STATICLIBS)
++ install( TARGETS ftdi1-static
++ DESTINATION bin
++ COMPONENT staticlibs
++ )
++ endif (STATICLIBS)
+
+ install( FILES ${c_headers}
+ DESTINATION include/${PROJECT_NAME}
diff --git a/dev-embedded/libftdi/libftdi-0.19.ebuild b/dev-embedded/libftdi/libftdi-0.19.ebuild
new file mode 100644
index 000000000000..f873ced5ad55
--- /dev/null
+++ b/dev-embedded/libftdi/libftdi-0.19.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
+ inherit git-2 autotools
+else
+ SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${P}.tar.gz"
+ KEYWORDS="amd64 arm ppc ppc64 sparc x86"
+fi
+
+DESCRIPTION="Userspace access to FTDI USB interface chips"
+HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="cxx doc examples python static-libs"
+
+RDEPEND="virtual/libusb:0
+ cxx? ( dev-libs/boost )
+ python? ( dev-lang/python )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ if [[ ${PV} == 9999* ]] ; then
+ mkdir -p m4
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable cxx libftdipp) \
+ $(use_with doc docs) \
+ $(use_with examples) \
+ $(use_enable python python-binding) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ use static-libs || find "${D}" -name '*.la' -delete
+ dodoc ChangeLog README
+
+ if use doc ; then
+ doman doc/man/man3/*
+ dohtml doc/html/*
+ fi
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/dev-embedded/libftdi/libftdi-0.20.ebuild b/dev-embedded/libftdi/libftdi-0.20.ebuild
new file mode 100644
index 000000000000..a5804f398b1e
--- /dev/null
+++ b/dev-embedded/libftdi/libftdi-0.20.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit cmake-utils python
+
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
+ inherit git-2
+else
+ SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="Userspace access to FTDI USB interface chips"
+HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="cxx doc examples python"
+
+RDEPEND="virtual/libusb:0
+ cxx? ( dev-libs/boost )
+ python? ( dev-lang/python )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i \
+ -e "s:[$]{PYTHON_LIB_INSTALL}/../site-packages:$(python_get_sitedir):" \
+ bindings/CMakeLists.txt || die
+ sed -i \
+ -e '/SET(LIB_SUFFIX /d' \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use cxx FTDIPP)
+ $(cmake-utils_use doc DOCUMENTATION)
+ $(cmake-utils_use examples EXAMPLES)
+ $(cmake-utils_use python PYTHON_BINDINGS)
+ -DCMAKE_SKIP_BUILD_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog README
+
+ if use doc ; then
+ # Clean up crap man pages. #356369
+ rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/{_,usb_,deprecated}*
+
+ doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
+ dohtml "${CMAKE_BUILD_DIR}"/doc/html/*
+ fi
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/dev-embedded/libftdi/libftdi-1.0.ebuild b/dev-embedded/libftdi/libftdi-1.0.ebuild
new file mode 100644
index 000000000000..b831aa1e15b5
--- /dev/null
+++ b/dev-embedded/libftdi/libftdi-1.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit cmake-utils eutils
+
+MY_P="${PN}1-${PV}"
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
+ inherit git-2
+else
+ SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="Userspace access to FTDI USB interface chips"
+HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="cxx doc examples python static-libs tools"
+
+RDEPEND="virtual/libusb:1
+ cxx? ( dev-libs/boost )
+ python? ( dev-lang/python )
+ tools? ( dev-libs/confuse )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0-staticlibs.patch
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use cxx FTDIPP)
+ $(cmake-utils_use doc DOCUMENTATION)
+ $(cmake-utils_use examples EXAMPLES)
+ $(cmake-utils_use python PYTHON_BINDINGS)
+ $(cmake-utils_use static-libs STATICLIBS)
+ $(cmake-utils_use tools FTDI_EEPROM)
+ -DCMAKE_SKIP_BUILD_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc AUTHORS ChangeLog README TODO
+
+ if use doc ; then
+ # Clean up crap man pages. #356369
+ rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/{_,usb_,deprecated}*
+
+ doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
+ dohtml "${CMAKE_BUILD_DIR}"/doc/html/*
+ fi
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/dev-embedded/libftdi/libftdi-1.2.ebuild b/dev-embedded/libftdi/libftdi-1.2.ebuild
new file mode 100644
index 000000000000..169e010a467e
--- /dev/null
+++ b/dev-embedded/libftdi/libftdi-1.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit cmake-utils
+
+MY_P="${PN}1-${PV}"
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
+ inherit git-2
+else
+ SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="Userspace access to FTDI USB interface chips"
+HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="cxx doc examples python static-libs tools"
+
+RDEPEND="virtual/libusb:1
+ cxx? ( dev-libs/boost )
+ python? ( dev-lang/python )
+ tools? (
+ !<dev-embedded/ftdi_eeprom-1.0
+ dev-libs/confuse
+ )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use cxx FTDIPP)
+ $(cmake-utils_use doc DOCUMENTATION)
+ $(cmake-utils_use examples EXAMPLES)
+ $(cmake-utils_use python PYTHON_BINDINGS)
+ $(cmake-utils_use static-libs STATICLIBS)
+ $(cmake-utils_use tools FTDI_EEPROM)
+ -DCMAKE_SKIP_BUILD_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc AUTHORS ChangeLog README TODO
+
+ if use doc ; then
+ # Clean up crap man pages. #356369
+ rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/_* || die
+
+ doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
+ dohtml "${CMAKE_BUILD_DIR}"/doc/html/*
+ fi
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/dev-embedded/libftdi/libftdi-9999.ebuild b/dev-embedded/libftdi/libftdi-9999.ebuild
new file mode 100644
index 000000000000..169e010a467e
--- /dev/null
+++ b/dev-embedded/libftdi/libftdi-9999.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit cmake-utils
+
+MY_P="${PN}1-${PV}"
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
+ inherit git-2
+else
+ SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="Userspace access to FTDI USB interface chips"
+HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="cxx doc examples python static-libs tools"
+
+RDEPEND="virtual/libusb:1
+ cxx? ( dev-libs/boost )
+ python? ( dev-lang/python )
+ tools? (
+ !<dev-embedded/ftdi_eeprom-1.0
+ dev-libs/confuse
+ )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use cxx FTDIPP)
+ $(cmake-utils_use doc DOCUMENTATION)
+ $(cmake-utils_use examples EXAMPLES)
+ $(cmake-utils_use python PYTHON_BINDINGS)
+ $(cmake-utils_use static-libs STATICLIBS)
+ $(cmake-utils_use tools FTDI_EEPROM)
+ -DCMAKE_SKIP_BUILD_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc AUTHORS ChangeLog README TODO
+
+ if use doc ; then
+ # Clean up crap man pages. #356369
+ rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/_* || die
+
+ doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
+ dohtml "${CMAKE_BUILD_DIR}"/doc/html/*
+ fi
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/dev-embedded/libftdi/metadata.xml b/dev-embedded/libftdi/metadata.xml
new file mode 100644
index 000000000000..3f860e47416b
--- /dev/null
+++ b/dev-embedded/libftdi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+<use>
+ <flag name='tools'>build ftdi_eeprom helper tool</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-embedded/lpc21isp/Manifest b/dev-embedded/lpc21isp/Manifest
new file mode 100644
index 000000000000..7308bd072b0c
--- /dev/null
+++ b/dev-embedded/lpc21isp/Manifest
@@ -0,0 +1 @@
+DIST lpc21isp_185.tar.gz 54735 SHA256 b85f10265fa83cdaab5b975e7bd53bb47289f1207b45e99cd753ea7a75fb7088 SHA512 585c8f02771fc68719c8a5e6cc4253854dce4f4e0047df8a1d57db273cb51c9d4fcbe1066b079aaec54d7ca189e90710647b95fdb320729753967c265b1ac954 WHIRLPOOL 2fe84d48d355b64939e291f0557f6d8023df5b1a1c8f4152659eb25a9341b809cddcd1d9ff97fa52d6f459ddd4b80972b894421495d8a9705b7bec211c55375a
diff --git a/dev-embedded/lpc21isp/lpc21isp-1.85.ebuild b/dev-embedded/lpc21isp/lpc21isp-1.85.ebuild
new file mode 100644
index 000000000000..21294a1dd41f
--- /dev/null
+++ b/dev-embedded/lpc21isp/lpc21isp-1.85.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator
+
+MY_PN="${PN}_$(delete_all_version_separators)"
+
+DESCRIPTION="In-circuit programming (ISP) tool for the NXP microcontrollers"
+HOMEPAGE="http://sourceforge.net/projects/lpc21isp/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_install() {
+ dobin lpc21isp
+}
diff --git a/dev-embedded/lpc21isp/metadata.xml b/dev-embedded/lpc21isp/metadata.xml
new file mode 100644
index 000000000000..5d8cf391af5b
--- /dev/null
+++ b/dev-embedded/lpc21isp/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>slis@gentoo.org</email>
+ </maintainer>
+ <longdescription>In-circuit programming (ISP) tool for the NXP (Philips) LPC1100 / LPC1300 / LPC1700 / LPC2000 series ARM7 / Cortex-M0 / Cortex-M3 microcontrollers</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">lpc21isp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/metadata.xml b/dev-embedded/metadata.xml
new file mode 100644
index 000000000000..e2e461a48134
--- /dev/null
+++ b/dev-embedded/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-embedded category contains libraries and utilities relevant to
+ embedded programming.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie dev-embedded enhält Bibliotheken und Werkzeuge für die
+ Embedded-Programmierung.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-embedded contiene librerias y utilidades referentes a
+ embedded-programming.
+ </longdescription>
+ <longdescription lang="ja">
+ dev-embeddedカテゴリーには組み込みプログラミングに関連したライブラリーと
+ ユーティリティが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De dev-embedded categorie bevat bibliotheken en hulpmiddelen voor het
+ programmeren in een "embedded" omgeving.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm dev-embedded chứa các thư viện và tiện ích liên quan
+ đến lập trình nhúng.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria dev-embedded contiene librerie ed utilità per la programmazione di sistemi embedded.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria dev-embedded contém bibliotecas e utilitários
+ referentes a programação de dispositivos embedded.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria dev-embedded zawiera biblioteki i narzędzia związane z
+ programowaniem dla urządzeń osadzonych.
+ </longdescription>
+</catmetadata>
+
diff --git a/dev-embedded/mspdebug/Manifest b/dev-embedded/mspdebug/Manifest
new file mode 100644
index 000000000000..dac385bbd7b1
--- /dev/null
+++ b/dev-embedded/mspdebug/Manifest
@@ -0,0 +1,3 @@
+DIST mspdebug-0.20.tar.gz 182144 SHA256 4514305994ad8962d5568652f74d6c26357f192583d8840fbf2f3c62dd3bff04 SHA512 64ec9e8abede54ae92a9073971efeb4beeeb419bf1cbda998cc1327820838f7f452381712638e7f03ae71ec62e3459929a0d52a868f2732e4e9c529f8662e996 WHIRLPOOL 5616d0992278bd90eca78e605239b5f090809307f3acd9f94946795ab06c3363798c3d94d82fc983959c2ece1c2b1f0c6ffeb2678468a62617dff98bad1b57df
+DIST mspdebug-0.21.tar.gz 228413 SHA256 37c0c83851e1ff7048012c733e21cd2fe5bef21f67814a462c6a7049dc709988 SHA512 ac12d7a22c905db0d192e52c43bfd5ee13ee47aa99ef7fd3ec4f8b53c231e43ad6437a41655603cd407ac766189009aeee6fafe842ac34fddd0b06408c08e761 WHIRLPOOL 84f274d44f25fffb6aa4e856aded3a943b1359bc51fa9d77de7aa916fedb18e759c734154b2a7c4439703866e97ba7958554c83e310f49aa562265c6e1c22132
+DIST mspdebug-0.22.tar.gz 230959 SHA256 9a0550f3c7911bcc4e3231fff652c8f14763eb6a945609ce715db7164bf76c55 SHA512 e5b573c05da70fc325538a2a4a9c916c939eb3e1a1f6162bacc83aa6be09b1219343efae07fcbcae8ee0803739763003b4f6cb08e739237df312bb854b3c43fa WHIRLPOOL 3354718964732b3766e09105e86ea7300129ebf7cc915635a2305b301b02d854ebebbb79aae9baed52d4e6761178beca0c8bba09aa506b2d4e191181137f4b70
diff --git a/dev-embedded/mspdebug/files/mspdebug-0.21-glibc-2.17.patch b/dev-embedded/mspdebug/files/mspdebug-0.21-glibc-2.17.patch
new file mode 100644
index 000000000000..9d1dab8e4c2e
--- /dev/null
+++ b/dev-embedded/mspdebug/files/mspdebug-0.21-glibc-2.17.patch
@@ -0,0 +1,11 @@
+--- mspdebug-0.21/util/sport.c
++++ mspdebug-0.21/util/sport.c
+@@ -20,6 +20,8 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <string.h>
++#include <sys/time.h>
++#include <sys/select.h>
+
+ #include "sport.h"
+ #include "util.h"
diff --git a/dev-embedded/mspdebug/metadata.xml b/dev-embedded/mspdebug/metadata.xml
new file mode 100644
index 000000000000..35c4e9d37a06
--- /dev/null
+++ b/dev-embedded/mspdebug/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription>
+ MSPDebug is a free debugger for use with MSP430 MCUs. It supports
+ FET430UIF, eZ430, RF2500, and Olimex MSP-JTAG-TINY programmers. It can be
+ used as a proxy for gdb or as an independent debugger with support for
+ programming, disassembly, and reverse engineering.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">mspdebug</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/mspdebug/mspdebug-0.20.ebuild b/dev-embedded/mspdebug/mspdebug-0.20.ebuild
new file mode 100644
index 000000000000..30689b5a8a96
--- /dev/null
+++ b/dev-embedded/mspdebug/mspdebug-0.20.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="A free debugger for use with MSP430 MCUs"
+HOMEPAGE="http://mspdebug.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="readline"
+
+DEPEND="readline? ( sys-libs/readline )
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e "s:-O1 \(.*\) -ggdb:\1:" Makefile
+}
+
+src_compile() {
+ local myflags
+ ! use readline && myflags="WITHOUT_READLINE=1"
+
+ emake CC="$(tc-getCC)" ${myflags}
+}
+
+src_install() {
+ emake DESTDIR="${ED}" PREFIX=/usr install
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/dev-embedded/mspdebug/mspdebug-0.21.ebuild b/dev-embedded/mspdebug/mspdebug-0.21.ebuild
new file mode 100644
index 000000000000..b4050fc0bbac
--- /dev/null
+++ b/dev-embedded/mspdebug/mspdebug-0.21.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="A free debugger for use with MSP430 MCUs"
+HOMEPAGE="http://mspdebug.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="readline"
+
+DEPEND="readline? ( sys-libs/readline )
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i "s:-O1 \(.*\) -ggdb:\1:" Makefile || die
+ epatch "${FILESDIR}"/${P}-glibc-2.17.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LIBDIR=/usr/lib $(usex readline "" "WITHOUT_READLINE=1")
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIBDIR=/usr/lib PREFIX=/usr install
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/dev-embedded/mspdebug/mspdebug-0.22.ebuild b/dev-embedded/mspdebug/mspdebug-0.22.ebuild
new file mode 100644
index 000000000000..56c308885c96
--- /dev/null
+++ b/dev-embedded/mspdebug/mspdebug-0.22.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="A free debugger for use with MSP430 MCUs"
+HOMEPAGE="http://mspdebug.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="readline"
+
+DEPEND="readline? ( sys-libs/readline )
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i "s:-O1 \(.*\) -ggdb:\1:" Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LIBDIR=/usr/lib $(usex readline "" "WITHOUT_READLINE=1")
+}
+
+src_install() {
+ emake DESTDIR="${ED}" LIBDIR=/usr/lib PREFIX=/usr install
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/dev-embedded/openocd/Manifest b/dev-embedded/openocd/Manifest
new file mode 100644
index 000000000000..7a2c63bad17b
--- /dev/null
+++ b/dev-embedded/openocd/Manifest
@@ -0,0 +1,5 @@
+DIST openocd-0.5.0.tar.bz2 2228655 SHA256 0bc122f98a6cd68c4392f6265d480b0e875ff54203ec05a5a52d23900903a78d SHA512 8e2e168a35bf3f753683115fd5f4d4c79e54cd0fe5d072921475d43880619e5b4ab60f28d97a4a595d4b77938b9218e689013f66a925ee8007e6499f5b42448c WHIRLPOOL 84b6a4a9089542904865400ede82be00c4417519f0c9fc42cbb25ae671f621651e9b27f57c2a1e7f37102d53095bcb8e37601e8ed47ddf1ea82b76676b35e7aa
+DIST openocd-0.6.1.tar.bz2 3431071 SHA256 f4c4cc7445ad79cfba1bb24208e79c66edf9dc0c46b3c8fca391f4e41c942f2b SHA512 59f35750f761d3f2ce7a32ffdc5028d053fda2bd9424cc4497f528ec628ac1f022662d9f226dd2b04a8cd682a5cd056a09de14d50e1090426a816bb602f98250 WHIRLPOOL 81d43ce9866960edb7fdaefc5ec088852aaa79e86add67ea9682f26eb5f5d3e7c7523fde0729e15949af165470b44ded45b9d79662f651db56fd109db5074cad
+DIST openocd-0.7.0.tar.bz2 3493924 SHA256 52237b786530c8460b221556c26fa4779f668b7dcb83ff14b8c5eb2050f38e63 SHA512 bfba267e5cda558b347f6fab1a286353b97d81093c0457ac044667baa369f5cd47a07b3ce6a1ceb66e7992c2e4224765458dd859d0a6fa748ad8e6f80ea541ad WHIRLPOOL eb83e201becb22a72ad954bdd5e66e61e587b42856244e4fdce59af5d263a2879cb8e0d89e10bcff515cff199580997c1c6635064601ad31a803b19dd9c99702
+DIST openocd-0.8.0.tar.gz 4821738 SHA256 e27ce4819e0227e602063f212fd4e795e307d5480095c9d406bd0d305ddf4f67 SHA512 9130b683394c4d99cd4c5365ba2bbe07ca8bdf0d02bdd4504b0f5f376209e787955d725c11d811f8937b7b0fc207c8d02e0b7484607edd2f68b2d00d48250f2c WHIRLPOOL 2e71c4b5965de6e3c0541ca13c100626c1435edc34e2bd81426921fa2fce228b101666f29abb56890d5e7aae7322cbff17f7968c78bd0f8db7a43acc733a0868
+DIST openocd-0.9.0.tar.gz 4970346 SHA256 840ed225216f49f5c07bda8b2cbb5c8384bb4d8724335dcccf26787fa0650513 SHA512 698b43867f8134da43a50f5d2ff2ae33b71df8ccffc45fb5c3d0bd7a6289fcd9e7bb3d89287ad4dbdb02e1871db69f3913db950965335eaf8559247f2e58c227 WHIRLPOOL 4a87f463c944a8508fe1d8276592230cb1341f664591b57f4ba9eebf15ba64bcad61f08ee909b40151fd2b2a83587896b6511092bc3fff5075f38e0d0c367eb2
diff --git a/dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch b/dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch
new file mode 100644
index 000000000000..1791cabc66fb
--- /dev/null
+++ b/dev-embedded/openocd/files/openocd-0.8.0-jimtcl-0.75.patch
@@ -0,0 +1,66 @@
+Apply upstream patch for jimtcl-0.75 compatibility
+
+X-Gentoo-Bug: 509902
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=509902
+Link: http://repo.or.cz/w/openocd.git/commitdiff/92ea548aafee840e1507306a3ffb38625f427ec5
+
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+
+From 92ea548aafee840e1507306a3ffb38625f427ec5 Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Mon, 28 Apr 2014 14:34:47 +0400
+Subject: [PATCH] Update to the current Jim Tcl
+
+This is a post-release version but hopefully some fixes that went in
+are worth it; also the changes here make OpenOCD compatible with stock
+0.75 version if a distro maintainer decides to use it.
+
+Change-Id: I7ad1814c7c4868198475cdca4750c3d0ee4f5f8b
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+Reviewed-on: http://openocd.zylin.com/2121
+Tested-by: jenkins
+Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
+---
+ jimtcl | 2 +-
+ src/helper/command.c | 2 +-
+ src/helper/command.h | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/helper/command.c b/src/helper/command.c
+index 21362a6..137ac7e 100644
+--- a/src/helper/command.c
++++ b/src/helper/command.c
+@@ -365,7 +365,7 @@ static int register_command_handler(struct command_context *cmd_ctx,
+
+ LOG_DEBUG("registering '%s'...", ocd_name);
+
+- Jim_CmdProc func = c->handler ? &script_command : &command_unknown;
++ Jim_CmdProc *func = c->handler ? &script_command : &command_unknown;
+ int retval = Jim_CreateCommand(interp, ocd_name, func, c, NULL);
+ free(ocd_name);
+ if (JIM_OK != retval)
+diff --git a/src/helper/command.h b/src/helper/command.h
+index 0f0edbb..0eda5b5 100644
+--- a/src/helper/command.h
++++ b/src/helper/command.h
+@@ -168,7 +168,7 @@ struct command {
+ struct command *parent;
+ struct command *children;
+ command_handler_t handler;
+- Jim_CmdProc jim_handler;
++ Jim_CmdProc *jim_handler;
+ void *jim_handler_data;
+ enum command_mode mode;
+ struct command *next;
+@@ -204,7 +204,7 @@ char *command_name(struct command *c, char delim);
+ struct command_registration {
+ const char *name;
+ command_handler_t handler;
+- Jim_CmdProc jim_handler;
++ Jim_CmdProc *jim_handler;
+ void *jim_handler_data;
+ enum command_mode mode;
+ const char *help;
+--
+1.7.6.6.GIT
+
diff --git a/dev-embedded/openocd/metadata.xml b/dev-embedded/openocd/metadata.xml
new file mode 100644
index 000000000000..b1823e2c1b06
--- /dev/null
+++ b/dev-embedded/openocd/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <maintainer>
+ <email>fercerpav@gmail.com</email>
+ <name>Paul Fertser</name>
+ <description>Upstream contact. CC him on bugs</description>
+ </maintainer>
+ <use>
+ <flag name="blaster">Enable support for Altera USE-Blaster</flag>
+ <flag name="cmsis-dap">Support for CMSIS-DAP compliant adapters</flag>
+ <flag name="dummy">Build the dummy port driver</flag>
+ <flag name="minidriver">Build the dummy minidriver</flag>
+ <flag name="ftd2xx">Enable support for USB FTDI chips via <pkg>dev-embedded/libftd2xx</pkg></flag>
+ <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag>
+ <flag name="parport">Enable support for parport JTAG devices</flag>
+ <flag name="presto">Enable support for AXIS PRESTO devices</flag>
+ <flag name="segger">Enable support for the Segger J-Link JTAG</flag>
+ <flag name="stlink">Enable building support for the ST-Link JTAG Programmer</flag>
+ <flag name="versaloon">Enable building support for the Versallon-lInk JTAG</flag>
+ <flag name="verbose-io">Verbose IO and comm JTAG and USB messages</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">openocd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/openocd/openocd-0.5.0.ebuild b/dev-embedded/openocd/openocd-0.5.0.ebuild
new file mode 100644
index 000000000000..9f5c5cd2cd08
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.5.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multilib
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://${PN}.git.sourceforge.net/gitroot/${PN}/${PN}"
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="blaster dummy ftd2xx ftdi minidriver parport presto segger usb versaloon"
+RESTRICT="strip" # includes non-native binaries
+
+# libftd2xx is the default because it is reported to work better.
+DEPEND="<dev-lang/jimtcl-0.73
+ usb? ( virtual/libusb:0 )
+ presto? ( dev-embedded/libftd2xx )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ ftdi? ( dev-embedded/libftdi )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="blaster? ( || ( ftdi ftd2xx ) ) ftdi? ( !ftd2xx )"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e "/@include version.texi/d" doc/${PN}.texi || die
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ myconf="--enable-buspirate --enable-ioutil --disable-werror
+ --disable-internal-jimtcl --enable-amtjtagaccel
+ --enable-ep93xx --enable-at91rm9200 --enable-gw16012
+ --enable-oocd_trace"
+
+ if use usb; then
+ myconf="${myconf} --enable-usbprog --enable-jlink --enable-rlink \
+ --enable-vsllink --enable-arm-jtag-ew"
+ fi
+
+ # add explicitely the path to libftd2xx
+ use ftd2xx && LDFLAGS="${LDFLAGS} -L/opt/$(get_libdir)"
+
+ if use blaster; then
+ use ftdi && myconf="${myconf} --enable-usb_blaster_libftdi"
+ use ftd2xx && myconf="${myconf} --enable-usb_blaster_ftd2xx"
+ fi
+ econf \
+ $(use_enable dummy) \
+ $(use_enable ftdi ft2232_libftdi) \
+ $(use_enable ftd2xx ft2232_ftd2xx) \
+ $(use_enable minidriver minidriver-dummy) \
+ $(use_enable parport) \
+ $(use_enable presto presto_ftd2xx) \
+ $(use_enable segger jlink) \
+ $(use_enable versaloon vsllink) \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO || die
+ prepstrip "${D}"/usr/bin
+}
diff --git a/dev-embedded/openocd/openocd-0.6.1.ebuild b/dev-embedded/openocd/openocd-0.6.1.ebuild
new file mode 100644
index 000000000000..9b323c7f302c
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.6.1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multilib flag-o-matic toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://${PN}.git.sourceforge.net/gitroot/${PN}/${PN}"
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="blaster dummy ftd2xx ftdi minidriver parport presto segger stlink usb versaloon"
+RESTRICT="strip" # includes non-native binaries
+
+# libftd2xx is the default because it is reported to work better.
+DEPEND=">=dev-lang/jimtcl-0.73
+ usb? ( virtual/libusb:0 )
+ presto? ( dev-embedded/libftd2xx )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ ftdi? ( dev-embedded/libftdi )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="blaster? ( || ( ftdi ftd2xx ) ) ftdi? ( !ftd2xx )"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e "/@include version.texi/d" doc/${PN}.texi || die
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+
+ # Disable craptastic build settings.
+ sed -i \
+ -e 's:if test "[$]OCDxprefix" != "[$]ac_default_prefix":if false:' \
+ configure || die
+
+ if use ftdi ; then
+ local pc="libftdi$(has_version '=dev-embedded/libftdi-1*' && echo 1)"
+ # Use libftdi-1 paths #460916
+ local libs=$($(tc-getPKG_CONFIG) --libs ${pc})
+ sed -i \
+ -e "s:-lftdi -lusb:${libs}:" \
+ configure src/Makefile.in || die
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags ${pc})
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ local myconf=(
+ --enable-buspirate
+ --enable-ioutil
+ --disable-werror
+ --disable-internal-jimtcl
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --enable-oocd_trace
+ )
+
+ if use usb; then
+ myconf+=(
+ --enable-usbprog
+ --enable-jlink
+ --enable-rlink
+ --enable-vsllink
+ --enable-arm-jtag-ew
+ )
+ fi
+
+ # add explicitely the path to libftd2xx
+ use ftd2xx && append-ldflags -L/opt/$(get_libdir)
+
+ if use blaster; then
+ use ftdi && myconf+=( --enable-usb_blaster_libftdi )
+ use ftd2xx && myconf+=( --enable-usb_blaster_ftd2xx )
+ fi
+ econf \
+ $(use_enable dummy) \
+ $(use_enable ftdi ft2232_libftdi) \
+ $(use_enable ftd2xx ft2232_ftd2xx) \
+ $(use_enable minidriver minidriver-dummy) \
+ $(use_enable parport) \
+ $(use_enable presto presto_ftd2xx) \
+ $(use_enable stlink) \
+ $(use_enable segger jlink) \
+ $(use_enable versaloon vsllink) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ default
+ env -uRESTRICT prepstrip "${ED}"/usr/bin "${ED}"/usr/$(get_libdir)
+}
diff --git a/dev-embedded/openocd/openocd-0.7.0-r1.ebuild b/dev-embedded/openocd/openocd-0.7.0-r1.ebuild
new file mode 100644
index 000000000000..a8eca858c257
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.7.0-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ KEYWORDS=""
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="blaster dummy ftd2xx ftdi minidriver parport presto segger stlink usb versaloon verbose-io"
+RESTRICT="strip" # includes non-native binaries
+
+# libftd2xx is the default because it is reported to work better.
+DEPEND=">=dev-lang/jimtcl-0.73
+ usb? ( virtual/libusb:0 )
+ presto? ( dev-embedded/libftd2xx )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ ftdi? ( dev-embedded/libftdi )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="blaster? ( || ( ftdi ftd2xx ) ) ftdi? ( !ftd2xx )"
+
+src_prepare() {
+ epatch_user
+
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e "/@include version.texi/d" doc/${PN}.texi || die
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+
+ # Disable craptastic build settings.
+ sed -i \
+ -e 's:if test "[$]OCDxprefix" != "[$]ac_default_prefix":if false:' \
+ configure || die
+
+ if use ftdi ; then
+ local pc="libftdi$(has_version '=dev-embedded/libftdi-1*' && echo 1)"
+ # Use libftdi-1 paths #460916
+ local libs=$($(tc-getPKG_CONFIG) --libs ${pc})
+ sed -i \
+ -e "s:-lftdi -lusb:${libs}:" \
+ configure src/Makefile.in || die
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags ${pc})
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ local myconf=(
+ --enable-buspirate
+ --enable-ioutil
+ --disable-werror
+ --disable-internal-jimtcl
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --enable-oocd_trace
+ --enable-ulink
+ --enable-arm-jtag-ew
+ --enable-ti-icdi
+ --enable-osbdm
+ --enable-opendous
+ )
+
+ if use usb; then
+ myconf+=(
+ --enable-usbprog
+ --enable-jlink
+ --enable-rlink
+ --enable-vsllink
+ --enable-arm-jtag-ew
+ $(use_enable verbose-io verbose-usb-io)
+ $(use_enable verbose-io verbose_usb_comms)
+ )
+ fi
+
+ # add explicitely the path to libftd2xx
+ use ftd2xx && append-ldflags -L/opt/$(get_libdir)
+
+ if use blaster; then
+ use ftdi && myconf+=( --enable-usb_blaster_libftdi )
+ use ftd2xx && myconf+=( --enable-usb_blaster_ftd2xx )
+ fi
+ econf \
+ $(use_enable dummy) \
+ $(use_enable ftdi ft2232_libftdi) \
+ $(use_enable ftdi) \
+ $(use_enable ftd2xx ft2232_ftd2xx) \
+ $(use_enable minidriver minidriver-dummy) \
+ $(use_enable parport) \
+ $(use_enable parport parport_ppdev) \
+ $(use_enable parport parport_giveio) \
+ $(use_enable presto presto_ftd2xx) \
+ $(use_enable segger jlink) \
+ $(use_enable stlink) \
+ $(use_enable versaloon vsllink) \
+ $(use_enable verbose-io verbose-jtag-io) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ default
+ env -uRESTRICT prepstrip "${ED}"/usr/bin "${ED}"/usr/$(get_libdir)
+}
diff --git a/dev-embedded/openocd/openocd-0.8.0.ebuild b/dev-embedded/openocd/openocd-0.8.0.ebuild
new file mode 100644
index 000000000000..f77d3137b15a
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.8.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs udev
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ MY_PV="${PV/_/-}"
+ MY_P="${PN}-${MY_PV}"
+ S="${WORKDIR}"/${MY_P}
+ KEYWORDS="~amd64 ~arm ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="cmsis-dap dummy ftdi parport +usb verbose-io"
+RESTRICT="strip" # includes non-native binaries
+
+RDEPEND=">=dev-lang/jimtcl-0.75
+ cmsis-dap? ( dev-libs/hidapi )
+ usb? (
+ virtual/libusb:0
+ virtual/libusb:1
+ )
+ ftdi? ( dev-embedded/libftdi )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch_user
+
+ # jimtcl-0.75 compatibility. Remove it on the
+ # next version bump
+ epatch "${FILESDIR}"/${P}-jimtcl-0.75.patch
+
+ if [[ ${PV} == "9999" ]] ; then
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ local myconf=(
+ --enable-buspirate
+ --disable-werror
+ --disable-internal-jimtcl
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --enable-oocd_trace
+ --enable-arm-jtag-ew
+ --enable-sysfsgpio
+ --enable-bcm2835gpio
+ )
+
+ # Adapters requiring usb/libusb-1.X support
+ if use usb; then
+ myconf+=(
+ --enable-aice
+ --enable-usb-blaster-2
+ --enable-ftdi
+ --enable-ti-icdi
+ --enable-ulink
+ --enable-osbdm
+ --enable-opendous
+ --enable-usbprog
+ --enable-jlink
+ --enable-rlink
+ --enable-stlink
+ --enable-vsllink
+ --enable-armjtagew
+ $(use_enable verbose-io verbose-usb-io)
+ $(use_enable verbose-io verbose_usb_comms)
+ )
+ else
+ myconf+=(
+ --disable-aice
+ --disable-usb-blaster-2
+ --disable-ftdi
+ --disable-ti-icdi
+ --disable-ulink
+ --disable-osbdm
+ --disable-opendous
+ --disable-usbprog
+ --disable-jlink
+ --disable-rlink
+ --disable-stlink
+ --disable-vsllink
+ --disable-armjtagew
+ )
+ fi
+
+ if use ftdi; then
+ myconf+=(
+ --enable-usb_blaster_libftdi
+ --enable-openjtag_ftdi
+ --enable-presto_libftdi
+ )
+ else
+ myconf+=(
+ --disable-openjtag_ftdi
+ --disable-presto_libftdi
+ --disable-usb_blaster_libftdi
+ )
+ fi
+
+ econf \
+ $(use_enable dummy) \
+ $(use_enable cmsis-dap) \
+ $(use_enable parport) \
+ $(use_enable parport parport_ppdev) \
+ $(use_enable verbose-io verbose-jtag-io) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ default
+ env -uRESTRICT prepstrip "${ED}"/usr/bin "${ED}"/usr/$(get_libdir)
+ udev_dorules ${D}/usr/share/${PN}/contrib/*.rules
+}
diff --git a/dev-embedded/openocd/openocd-0.9.0.ebuild b/dev-embedded/openocd/openocd-0.9.0.ebuild
new file mode 100644
index 000000000000..c61aec8386f6
--- /dev/null
+++ b/dev-embedded/openocd/openocd-0.9.0.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs udev
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ MY_PV="${PV/_/-}"
+ MY_P="${PN}-${MY_PV}"
+ S="${WORKDIR}"/${MY_P}
+ KEYWORDS="~amd64 ~arm ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="cmsis-dap dummy ftdi parport +usb verbose-io"
+RESTRICT="strip" # includes non-native binaries
+
+RDEPEND=">=dev-lang/jimtcl-0.76
+ cmsis-dap? ( dev-libs/hidapi )
+ usb? (
+ virtual/libusb:0
+ virtual/libusb:1
+ )
+ ftdi? ( dev-embedded/libftdi )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch_user
+
+ if [[ ${PV} == "9999" ]] ; then
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ local myconf=(
+ --enable-buspirate
+ --disable-werror
+ --disable-internal-jimtcl
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --enable-oocd_trace
+ --enable-arm-jtag-ew
+ --enable-sysfsgpio
+ --enable-bcm2835gpio
+ )
+
+ # Adapters requiring usb/libusb-1.X support
+ if use usb; then
+ myconf+=(
+ --enable-aice
+ --enable-usb-blaster-2
+ --enable-ftdi
+ --enable-ti-icdi
+ --enable-ulink
+ --enable-osbdm
+ --enable-opendous
+ --enable-usbprog
+ --enable-jlink
+ --enable-rlink
+ --enable-stlink
+ --enable-vsllink
+ --enable-armjtagew
+ $(use_enable verbose-io verbose-usb-io)
+ $(use_enable verbose-io verbose_usb_comms)
+ )
+ else
+ myconf+=(
+ --disable-aice
+ --disable-usb-blaster-2
+ --disable-ftdi
+ --disable-ti-icdi
+ --disable-ulink
+ --disable-osbdm
+ --disable-opendous
+ --disable-usbprog
+ --disable-jlink
+ --disable-rlink
+ --disable-stlink
+ --disable-vsllink
+ --disable-armjtagew
+ )
+ fi
+
+ if use ftdi; then
+ myconf+=(
+ --enable-usb_blaster_libftdi
+ --enable-openjtag_ftdi
+ --enable-presto_libftdi
+ )
+ else
+ myconf+=(
+ --disable-openjtag_ftdi
+ --disable-presto_libftdi
+ --disable-usb_blaster_libftdi
+ )
+ fi
+
+ econf \
+ $(use_enable dummy) \
+ $(use_enable cmsis-dap) \
+ $(use_enable parport) \
+ $(use_enable parport parport_ppdev) \
+ $(use_enable verbose-io verbose-jtag-io) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ default
+ env -uRESTRICT prepstrip "${ED}"/usr/bin
+ udev_dorules ${D}/usr/share/${PN}/contrib/*.rules
+}
diff --git a/dev-embedded/openocd/openocd-9999.ebuild b/dev-embedded/openocd/openocd-9999.ebuild
new file mode 100644
index 000000000000..513405c83977
--- /dev/null
+++ b/dev-embedded/openocd/openocd-9999.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic toolchain-funcs udev
+
+# One ebuild to rule them all
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-2
+ EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
+else
+ MY_PV="${PV/_/-}"
+ MY_P="${PN}-${MY_PV}"
+ S="${WORKDIR}"/${MY_P}
+ KEYWORDS="~amd64 ~arm ~x86"
+ SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz"
+fi
+
+DESCRIPTION="OpenOCD - Open On-Chip Debugger"
+HOMEPAGE="http://openocd.sourceforge.net"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="cmsis-dap dummy ftdi parport +usb verbose-io"
+RESTRICT="strip" # includes non-native binaries
+
+RDEPEND=">=dev-lang/jimtcl-0.76
+ cmsis-dap? ( dev-libs/hidapi )
+ usb? (
+ virtual/libusb:0
+ virtual/libusb:1
+ )
+ ftdi? ( dev-embedded/libftdi )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-apps/texinfo-5" #549946
+
+src_prepare() {
+ epatch_user
+
+ if [[ ${PV} == "9999" ]] ; then
+ AT_NO_RECURSIVE=yes eautoreconf
+ fi
+}
+
+src_configure() {
+ # Here are some defaults
+ local myconf=(
+ --enable-buspirate
+ --disable-werror
+ --disable-internal-jimtcl
+ --enable-amtjtagaccel
+ --enable-ep93xx
+ --enable-at91rm9200
+ --enable-gw16012
+ --enable-oocd_trace
+ --enable-arm-jtag-ew
+ --enable-sysfsgpio
+ --enable-bcm2835gpio
+ )
+
+ # Adapters requiring usb/libusb-1.X support
+ if use usb; then
+ myconf+=(
+ --enable-aice
+ --enable-usb-blaster-2
+ --enable-ftdi
+ --enable-ti-icdi
+ --enable-ulink
+ --enable-osbdm
+ --enable-opendous
+ --enable-usbprog
+ --enable-jlink
+ --enable-rlink
+ --enable-stlink
+ --enable-vsllink
+ --enable-armjtagew
+ $(use_enable verbose-io verbose-usb-io)
+ $(use_enable verbose-io verbose_usb_comms)
+ )
+ else
+ myconf+=(
+ --disable-aice
+ --disable-usb-blaster-2
+ --disable-ftdi
+ --disable-ti-icdi
+ --disable-ulink
+ --disable-osbdm
+ --disable-opendous
+ --disable-usbprog
+ --disable-jlink
+ --disable-rlink
+ --disable-stlink
+ --disable-vsllink
+ --disable-armjtagew
+ )
+ fi
+
+ if use ftdi; then
+ myconf+=(
+ --enable-usb_blaster_libftdi
+ --enable-openjtag_ftdi
+ --enable-presto_libftdi
+ )
+ else
+ myconf+=(
+ --disable-openjtag_ftdi
+ --disable-presto_libftdi
+ --disable-usb_blaster_libftdi
+ )
+ fi
+
+ econf \
+ $(use_enable dummy) \
+ $(use_enable cmsis-dap) \
+ $(use_enable parport) \
+ $(use_enable parport parport_ppdev) \
+ $(use_enable verbose-io verbose-jtag-io) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ default
+ env -uRESTRICT prepstrip "${ED}"/usr/bin
+ udev_dorules ${D}/usr/share/${PN}/contrib/*.rules
+}
diff --git a/dev-embedded/parapin/Manifest b/dev-embedded/parapin/Manifest
new file mode 100644
index 000000000000..35e067cf3877
--- /dev/null
+++ b/dev-embedded/parapin/Manifest
@@ -0,0 +1 @@
+DIST parapin-1.0.0.tar.gz 240771 SHA256 98060d8a7ccdffc924e564d6e2f1b8646614cf5753b7312ef917e7a09b2e2a6f SHA512 43e4066b649bec8519c98052451ab1beb720c9c8086bbd045bb013e3c12c7e83bf0411ac4b8e7006c3acbc6d1487b918d26df65b246469e6c7e008a0e26874d9 WHIRLPOOL 78d5e41cfabcacf9dfb194772cf3ce6cd5e6fa33e9887d86baf59495bfe314ea6462627b6beefd812386a2270035ed2c41384e3956053b84efdcc04917ae602b
diff --git a/dev-embedded/parapin/metadata.xml b/dev-embedded/parapin/metadata.xml
new file mode 100644
index 000000000000..55bc20922fa6
--- /dev/null
+++ b/dev-embedded/parapin/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription>
+Parapin makes it easy to write C code under Linux that controls individual pins on a PC parallel port. This kind of control is very useful for
+electronics projects that use the PC's parallel port as a generic digital I/O interface. Parapin goes to great lengths to insulate the programmer
+from the somewhat complex parallel port programming interface provided by the PC hardware, making it easy to use the parallel port for digital
+I/O. By the same token, this abstraction also makes Parapin less useful in applications that need to actually use the parallel port as a parallel
+port (e.g., for talking to a printer).
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">parapin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/parapin/parapin-1.0.0.ebuild b/dev-embedded/parapin/parapin-1.0.0.ebuild
new file mode 100644
index 000000000000..0b8ebb8f3ce1
--- /dev/null
+++ b/dev-embedded/parapin/parapin-1.0.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="A parallel port pin programming library"
+HOMEPAGE="http://parapin.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+IUSE="doc"
+KEYWORDS="x86 ~amd64"
+
+SLOT="0"
+
+DEPEND="doc? ( dev-tex/latex2html )"
+RDEPEND=""
+
+src_compile() {
+ # Note 2.4 and 2.6 makefiles are identical for the targets used
+ emake -f Makefile-2.4 CC=$(tc-getCC) || die
+}
+
+src_install() {
+ dolib.a libparapin.a
+ insopts -m0444; insinto /usr/include; doins parapin.h
+
+ dodoc README
+ if use doc; then
+ cd doc
+ emake html
+ cd parapin
+ dohtml *.html *.css *.png
+
+ cd ${S}
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/dev-embedded/picasm/Manifest b/dev-embedded/picasm/Manifest
new file mode 100644
index 000000000000..0e1b2c053814
--- /dev/null
+++ b/dev-embedded/picasm/Manifest
@@ -0,0 +1 @@
+DIST picasm114.tar.bz2 35429 SHA256 6ff69880256953f4c55aa29e48714e81ebd9fd6ce1e81090fae1fb929902dfb8 SHA512 a6a8490156afe8af1fc85700890570c745c076396890491f4efe004d7dd701a324f9c7e764fcc710c8954c761f3abb4ed8e97c72ce098100192ead334b335fb7 WHIRLPOOL 587461e5670fad49a1be9f464079cc32466e28b44b108b58445d24bfd3adc981d6aba37d6167f4279d8c70831c5d8a836dd8f4969c3b28a588206560bda5d21f
diff --git a/dev-embedded/picasm/metadata.xml b/dev-embedded/picasm/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/picasm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/picasm/picasm-1.14.ebuild b/dev-embedded/picasm/picasm-1.14.ebuild
new file mode 100644
index 000000000000..36cd3fd3b731
--- /dev/null
+++ b/dev-embedded/picasm/picasm-1.14.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs flag-o-matic
+
+MY_PV="${PV//.}"
+MY_P="${PN}${MY_PV}"
+DESCRIPTION="An assembler and disassembler for 12 and 14-bit PIC chips"
+HOMEPAGE="http://www.iki.fi/trossi/pic/"
+SRC_URI="http://www.iki.fi/trossi/pic/${MY_P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e 's:$(CC):\0 $(LDFLAGS):' Makefile || die
+}
+
+src_compile() {
+ append-cflags -DBUILTIN_INCLUDE1=\\\"/usr/share/picasm/include\\\"
+ emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin picasm
+ dodoc picasm.txt HISTORY TODO
+
+ insinto /usr/share/picasm/include
+ doins device_definitions/*.i
+
+ dohtml picasm.html
+ docinto examples
+ dodoc examples/*.*
+ docompress -x /usr/share/doc/${PF}/examples
+}
diff --git a/dev-embedded/picp/Manifest b/dev-embedded/picp/Manifest
new file mode 100644
index 000000000000..35b78ebf7791
--- /dev/null
+++ b/dev-embedded/picp/Manifest
@@ -0,0 +1 @@
+DIST picp-0.6.8.tar.gz 125303 SHA256 869c680ff8137257d635e8ab8fdaacef21175bf98b930cc6aaaa2f935b06c5b6 SHA512 03b8f55f3ae69d87dc02a2df6cad718c3d9fec725eae469b9e28e411620c95e7c1f2d241110cb6a5561e8d9727da3319e2b7caaeefa7a68239009317c8df9471 WHIRLPOOL d7de7a089e3cfa83419669befe53835e307997b8cd78cd3cf76729f47d69d154d26dab6daf90a3f10cbe785cfe9b5b6348f3e166b7c0f05a103dbf36405387bd
diff --git a/dev-embedded/picp/files/picp-0.6.8-errno.patch b/dev-embedded/picp/files/picp-0.6.8-errno.patch
new file mode 100644
index 000000000000..89d5d063576d
--- /dev/null
+++ b/dev-embedded/picp/files/picp-0.6.8-errno.patch
@@ -0,0 +1,10 @@
+--- picp-0.6.8/picsnoop/picsnoop.c.orig
++++ picp-0.6.8/picsnoop/picsnoop.c
+@@ -40,6 +40,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <signal.h>
++#include <errno.h>
+ #include <ctype.h>
+
+ #ifdef WIN32
diff --git a/dev-embedded/picp/metadata.xml b/dev-embedded/picp/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/picp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/picp/picp-0.6.8.ebuild b/dev-embedded/picp/picp-0.6.8.ebuild
new file mode 100644
index 000000000000..7233accdc283
--- /dev/null
+++ b/dev-embedded/picp/picp-0.6.8.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="A commandline interface to Microchip's PICSTART+ programmer"
+HOMEPAGE="http://home.pacbell.net/theposts/picmicro/"
+SRC_URI="http://home.pacbell.net/theposts/picmicro/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+src_prepare() {
+ sed -i -e '/strip/d' \
+ -e 's:$(CC):\0 $(LDFLAGS):' \
+ {.,fixchksum,picsnoop}/Makefile || die "sed failed"
+
+ rm -f picsnoop/{picsnoop,*.o}
+
+ epatch "${FILESDIR}"/${P}-errno.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) OPTIONS="${CFLAGS} -x c++"
+ emake -C picsnoop CC=$(tc-getCC) OPTIONS="${CFLAGS} -x c++"
+ emake -C fixchksum CC=$(tc-getCC) OPTIONS="${CFLAGS}"
+}
+
+src_install() {
+ dobin picp
+ dobin picsnoop/picsnoop
+ dobin fixchksum/fixchksum
+ dodoc README HISTORY LICENSE.TXT NOTES PSCOMMANDS.TXT BugReports.txt TODO
+ newdoc picsnoop/README.TXT PICSNOOP.txt
+ newdoc fixchksum/README fixchksum.txt
+ dohtml PICPmanual.html
+}
diff --git a/dev-embedded/picprog/Manifest b/dev-embedded/picprog/Manifest
new file mode 100644
index 000000000000..35df81537e6c
--- /dev/null
+++ b/dev-embedded/picprog/Manifest
@@ -0,0 +1 @@
+DIST picprog-1.9.1.tar.gz 76452 SHA256 057572133390122051622c412b8b3abeb38487a205645c427252ec61c38304e4 SHA512 1f24c372aa149d86dd4778904f0abb782510168ce36676b820a5b675f53a7207f62cdcb374c8ec2c60fc51fdfd5780ad9f8f464365403d3d2232187dade91887 WHIRLPOOL 9781fc2854e8e96298e193b96ca93c229a2d4da94e086020d08fa5f86c02e77a5f2b79f22301610e36e5a228c870c35fa9664eb20f58be1f5b91c87122d5e0fd
diff --git a/dev-embedded/picprog/metadata.xml b/dev-embedded/picprog/metadata.xml
new file mode 100644
index 000000000000..0f33447143fb
--- /dev/null
+++ b/dev-embedded/picprog/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+<longdescription>a pic16xxx series microcontroller programmer software for the simple serial port
+device</longdescription>
+</pkgmetadata>
diff --git a/dev-embedded/picprog/picprog-1.9.1.ebuild b/dev-embedded/picprog/picprog-1.9.1.ebuild
new file mode 100644
index 000000000000..7295030707d0
--- /dev/null
+++ b/dev-embedded/picprog/picprog-1.9.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="A PIC16, PIC18 and dsPIC microcontroller programmer software for the serial port"
+HOMEPAGE="http://www.iki.fi/hyvatti/pic/picprog.html"
+SRC_URI="http://www.iki.fi/hyvatti/pic/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+src_compile() {
+ emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin picprog
+ dodoc README
+ dohtml picprog.html *.png
+ doman picprog.1
+}
diff --git a/dev-embedded/pikdev/Manifest b/dev-embedded/pikdev/Manifest
new file mode 100644
index 000000000000..5ac2e36ca8d3
--- /dev/null
+++ b/dev-embedded/pikdev/Manifest
@@ -0,0 +1 @@
+DIST pikdev-1.4.0.tar.gz 923969 SHA256 d33a14548ef9c07e349414f7bf058a6cda95f101990979a3857a16d03e1945e4 SHA512 e3460b30b0e85020d96ae5949b2ae9dbf0fb6f7cc56fa6a46a41a60c83c4b6cb13988ce22c1d143fbfb4088a0195d319f10376a9101fbe182867573b7b626c6e WHIRLPOOL b18254ab7f53e721d46310438404db0ad20d1ea5f9d719684b91471665d7797e3b55cb8584624dd3d7cc07c1f8356b04aa9e1b3007a9bc2868d910d89556937d
diff --git a/dev-embedded/pikdev/metadata.xml b/dev-embedded/pikdev/metadata.xml
new file mode 100644
index 000000000000..f05425a1c36a
--- /dev/null
+++ b/dev-embedded/pikdev/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <longdescription lang="en">
+ PiKdev is a simple graphic IDE for the development of PIC-based applications.
+ It currently supports assembly language. C language is also supported for PIC
+ 18 devices. PiKdev is developed in C++ under Linux.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-embedded/pikdev/pikdev-1.4.0.ebuild b/dev-embedded/pikdev/pikdev-1.4.0.ebuild
new file mode 100644
index 000000000000..1455a20990b4
--- /dev/null
+++ b/dev-embedded/pikdev/pikdev-1.4.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2 eutils
+
+DESCRIPTION="Simple graphic IDE for the development of PIC-based applications"
+HOMEPAGE="http://pikdev.free.fr/"
+SRC_URI="http://pikdev.free.fr/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qt3support:4
+ dev-qt/qtwebkit:4"
+RDEPEND="${DEPEND}
+ >=dev-embedded/gputils-1.0.0"
+
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ rm pkp.pro || die 'rm failed' # TODO: support pkp, maybe with a separated package
+
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ doicon icons/256/pikdev-app-v4.png
+ make_desktop_entry pikdev 'PIKdev for Qt4' pikdev-app-v4
+ dosym "${P}" "/usr/bin/${PN}"
+}
+
+pkg_postinst() {
+ elog "Additional packages that you may want to install:"
+ elog
+ elog "- dev-embedded/cpik - C compiler for PIC18 devices"
+ elog "- dev-embedded/pk2cmd - Microchip PicKit2 PIC programmer support"
+ elog
+}
diff --git a/dev-embedded/pista/Manifest b/dev-embedded/pista/Manifest
new file mode 100644
index 000000000000..27c9fc4cc479
--- /dev/null
+++ b/dev-embedded/pista/Manifest
@@ -0,0 +1 @@
+DIST pista-0.70.tar.gz 50454 SHA256 18c880b67637fdfcc76eb9a7ac8547c9b30515c1cf1ae165b2c13cc4577efb33 SHA512 23125ffff317d7c0de16de76cc572bb4a0aba125dd3b9cd7adb5adb7efe09f7c694c81046fd9ced77e595e25d417044ab3b8a7371a28f7d04c9be794d0436a7c WHIRLPOOL 2a223c2464aa0e751402950a77b1e63c1480072eaf5bc00615c30c799e72c1ed2a7bdf6ec2f6d841857443a3339cce839e823b1883732b9a5c0a7329eb15db39
diff --git a/dev-embedded/pista/metadata.xml b/dev-embedded/pista/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/pista/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/pista/pista-0.70.ebuild b/dev-embedded/pista/pista-0.70.ebuild
new file mode 100644
index 000000000000..16881804b8b1
--- /dev/null
+++ b/dev-embedded/pista/pista-0.70.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Commandline-driven interface to PICSTART+ PIC programmer"
+HOMEPAGE="http://gatling.ikk.sztaki.hu/~kissg/pd/pista/pista.html"
+SRC_URI="ftp://gatling.ikk.sztaki.hu/pub/pic/pista/${P}.tar.gz
+ http://pista.choup.net/pub/pic/pista/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ dev-perl/TermReadKey"
+
+src_compile() {
+ perl Makefile.PL PREFIX=/usr || die "Running Makefile.PL failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ emake install DESTDIR=${D} || die
+ dodoc README Changes Copyright doc/pista.html
+}
diff --git a/dev-embedded/pk2-la/Manifest b/dev-embedded/pk2-la/Manifest
new file mode 100644
index 000000000000..b7d37bd7edc7
--- /dev/null
+++ b/dev-embedded/pk2-la/Manifest
@@ -0,0 +1 @@
+DIST pk2-la-1.1.tar.bz2 19222 SHA256 62de53e9543dd6a940a0c1c681422431ca2fb823919a29c4a1f2bea5410be2b3 SHA512 50e5b16149437afe92e1e987d3020099b1278f8ad207192e9b197f72ec1ab26c77307efd99976a1c6334bcea1899f38997fce27bd1e4caf70a04f851a8136f0d WHIRLPOOL 370d73c79ecce0a0da1f490fd61bdf484d30ad768636d8ad8faee0d28787ee1f5b2e7772f4f773b701969da67b0334295be034daa2c11b0e62446ada8a42d3f7
diff --git a/dev-embedded/pk2-la/metadata.xml b/dev-embedded/pk2-la/metadata.xml
new file mode 100644
index 000000000000..49e4f61433a9
--- /dev/null
+++ b/dev-embedded/pk2-la/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <longdescription>
+ pk2-la allows the Microchip PICkit2 programmer to be used as a
+ Logic Analyzer and I/O Probe.
+ </longdescription>
+ <maintainer>
+ <email>josejx@gentoo.org</email>
+ <name>Joseph Jezak</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pk2-la</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/pk2-la/pk2-la-1.1-r2.ebuild b/dev-embedded/pk2-la/pk2-la-1.1-r2.ebuild
new file mode 100644
index 000000000000..23085de28894
--- /dev/null
+++ b/dev-embedded/pk2-la/pk2-la-1.1-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1
+
+DESCRIPTION="Logic Analyzer and I/O Probe for the Microchip PICkit2"
+HOMEPAGE="http://sourceforge.net/projects/pk2-la"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-python/pygtk[${PYTHON_USEDEP}]
+ dev-python/pyusb:0[${PYTHON_USEDEP}]
+ "
+
+src_compile() { :; }
+
+src_install() {
+ python_foreach_impl python_doscript ${PN}
+
+ dodoc README LA-Format IO-Format CHANGELOG
+}
diff --git a/dev-embedded/pk2cmd/Manifest b/dev-embedded/pk2cmd/Manifest
new file mode 100644
index 000000000000..1f98ccbc1147
--- /dev/null
+++ b/dev-embedded/pk2cmd/Manifest
@@ -0,0 +1 @@
+DIST pk2cmdv1.20LinuxMacSource.tar.gz 223175 SHA256 903027de5036eda3a648decece4acfcefe91e754ef0d4eacba0e5ba8b18857fa SHA512 72675eb287c1410c82ff49b4922afd28a8017b4e8517d10e77e0f0b111630f90881f778d754a47c97453f45412e965e281435d495fc70a047bd7357dd64f7b24 WHIRLPOOL f4f36412d4e653a20866bcbe9ec25b94e8ff4e75c1ae2e4944a42682832c9b64b683248bc559e73b976902906d2959492867f055291588cf66d9b83838174c75
diff --git a/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch
new file mode 100644
index 000000000000..30d6b1e71a3e
--- /dev/null
+++ b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch
@@ -0,0 +1,16 @@
+--- cmd_app.cpp.old 2009-01-31 21:23:30.000000000 +0100
++++ cmd_app.cpp 2009-01-31 21:25:48.000000000 +0100
+@@ -88,7 +88,12 @@
+ _tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString);
+ if (_tcslen(tempString) < 17)
+ {
+- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
++ // Try /usr/share/pk2 first
++ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32);
++
++ if(access(tempString, 0))
++ // Well, that didn't work, default to the current directory
++ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
+ }
+ }
+ if (!PicFuncs.ReadDeviceFile(tempString))
diff --git a/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch
new file mode 100644
index 000000000000..448fecfca935
--- /dev/null
+++ b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch
@@ -0,0 +1,17 @@
+--- cmd_app.cpp.bak 2008-07-11 15:49:56.000000000 -0400
++++ cmd_app.cpp 2008-09-20 23:18:17.000000000 -0400
+@@ -63,7 +63,13 @@
+ _tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString);
+ if (_tcslen(tempString) < 17)
+ {
+- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
++ // Try /usr/share/pk2 first
++ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32);
++
++ if(access(tempString, 0))
++ // Well, that didn't work, default to the current directory
++ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
++
+ //_tcsncpy_s(tempString, "C:\\PICkit_2\\pk2cmd\\debug\\PK2DeviceFile.dat", 42);
+ //printf("DEBUG DEVICE FILE SETTING!!!!\n");
+ }
diff --git a/dev-embedded/pk2cmd/metadata.xml b/dev-embedded/pk2cmd/metadata.xml
new file mode 100644
index 000000000000..964d281fdb13
--- /dev/null
+++ b/dev-embedded/pk2cmd/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+<maintainer>
+ <email>josejx@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+This application allows the use of the PICKit2 PIC programming device.
+</longdescription>
+</pkgmetadata>
+
diff --git a/dev-embedded/pk2cmd/pk2cmd-1.20.ebuild b/dev-embedded/pk2cmd/pk2cmd-1.20.ebuild
new file mode 100644
index 000000000000..f18e20bdf602
--- /dev/null
+++ b/dev-embedded/pk2cmd/pk2cmd-1.20.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="An application for working with the Microchip PicKit2 PIC programmer"
+HOMEPAGE="http://www.microchip.com/pickit2"
+SRC_URI="http://ww1.microchip.com/downloads/en/DeviceDoc/${PN}v${PV}LinuxMacSource.tar.gz"
+
+LICENSE="MicroChip-PK2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ppc64 ~x86"
+IUSE=""
+
+DEPEND="virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}v${PV}LinuxMacSource
+
+src_prepare() {
+ # Patch adds /usr/share/pk2 to the default search for the device file
+ epatch "${FILESDIR}/${PN}-add-share-dir-for-dev-file-${PV}.patch"
+
+ # Fix up the Makefile
+ sed \
+ -e 's:#TARGET=linux:TARGET=linux:' \
+ -e 's:DBG=-O2:DBG=:' \
+ -e 's:^CFLAGS=:CFLAGS+=:' \
+ -e 's:^LDFLAGS=:LDFLAGS+=:' \
+ -e 's:^LIBUSB=/usr/local:LIBUSB=/usr:' \
+ -e "s:^CC=g++::" \
+ -i Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCXX)"
+}
+
+src_install() {
+ # Copy the device files and PicKit2 OS
+ insinto "/usr/share/pk2"
+ doins PK2DeviceFile.dat PK2V023200.hex
+ # Install the program
+ dobin pk2cmd
+ # Install the documentation
+ dodoc ReadmeForPK2CMDLinux2-6.txt usbhotplug.txt
+}
diff --git a/dev-embedded/ponyprog/Manifest b/dev-embedded/ponyprog/Manifest
new file mode 100644
index 000000000000..724cb469f941
--- /dev/null
+++ b/dev-embedded/ponyprog/Manifest
@@ -0,0 +1 @@
+DIST Pony_Prog2000-2.07c.tar.gz 653300 SHA256 c9387e479a953a1b9aabbdaca31c90e65c8557db62bac21bd959cff346fa825e SHA512 33cd14fa8283ce8af8265a48df7d960c7c2779551d0f204f6728a9e1e54204f52ea608c4e6090dc56f7634a02abd9bb960230f75a3a9716b1639708a57c31809 WHIRLPOOL 64650b85c31f6982fed0aa5519f42e0b2d451184ecbfa0f4f9cb45996ad37675b05ed4f7d405d1462a291b6601dff926b0a51e8accc17f54bfdf92665882aa78
diff --git a/dev-embedded/ponyprog/files/ponyprog-2.07a-gcc43.patch b/dev-embedded/ponyprog/files/ponyprog-2.07a-gcc43.patch
new file mode 100644
index 000000000000..f93da01d646c
--- /dev/null
+++ b/dev-embedded/ponyprog/files/ponyprog-2.07a-gcc43.patch
@@ -0,0 +1,57 @@
+http://bugs.gentoo.org/227503
+
+--- a/v/includex/v/vpsdc.h
++++ b/v/includex/v/vpsdc.h
+@@ -14,7 +14,9 @@
+
+ #include <v/vdc.h>
+ #include <v/vprinter.h>
+-#include <fstream.h>
++#include <fstream>
++
++using namespace std;
+
+ class vPostScriptDC : public vDC
+ {
+--- a/v/includex/v/vpsprntr.h
++++ b/v/includex/v/vpsprntr.h
+@@ -14,7 +14,7 @@
+
+ #include <v/v_defs.h>
+ #include <v/vmodald.h>
+-#include <fstream.h>
++#include <fstream>
+
+ #define vPaperLetter 0
+ #define vPaperLegal 1
+@@ -31,6 +31,8 @@
+ #define vPaperQuarto 12
+ #define vPaper10x14 13
+
++using namespace std;
++
+ #define vPaperDefault vPaperLetter // Index to default paper
+
+ class vPSPrinter : public vModalDialog
+--- a/v/srcx/vpsprntr.cxx
++++ b/v/srcx/vpsprntr.cxx
+@@ -103,7 +103,7 @@ static unsigned char prompt_bits[] = {
+ _height = PaperHeights[_paperType];
+ _portrait = 1;
+ _useColor = 0;
+- _pstream = 0;
++ vPSPrinter::_pstream = 0;
+
+ ++_instances; // bump reference counter
+ }
+--- a/rs232int.cpp
++++ b/rs232int.cpp
+@@ -145,7 +145,7 @@ int RS232Interface::OpenSerial(int no)
+ snprintf(lockname, MAXPATH, LOCK_DIR "/LCK..ttyS%d", no);
+ UserDebug1(UserApp2, "RS232Interface::OpenSerial() now lock the device %s\n", lockname);
+
+- fd = open ((const char *)lockname,O_RDWR|O_EXCL|O_CREAT);
++ fd = open ((const char *)lockname,O_RDWR|O_EXCL|O_CREAT,0664);
+ if (fd < 0)
+ {
+ fd = open ((const char *)lockname,O_RDONLY);
diff --git a/dev-embedded/ponyprog/files/ponyprog-2.07c-build.patch b/dev-embedded/ponyprog/files/ponyprog-2.07c-build.patch
new file mode 100644
index 000000000000..cc29d2f1060e
--- /dev/null
+++ b/dev-embedded/ponyprog/files/ponyprog-2.07c-build.patch
@@ -0,0 +1,45 @@
+Fix parallel make and respect CC, CXX and LDFLAGS
+
+http://bugs.gentoo.org/282244
+http://bugs.gentoo.org/317767
+
+--- Makefile
++++ Makefile
+@@ -331,8 +331,8 @@
+
+ prps: $(PRPS)
+
+-$(PROG): $(OBJS)
+- $(CXX) -o $@ $(OBJS) $(LDFLAGS)
++$(PROG): $(OBJS) vlib
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBDIR) $(LIBS)
+
+ %.o: %.cpp
+ $(CXX) $(CFLAGS) -c $< -o $@
+--- v/Config.mk
++++ v/Config.mk
+@@ -40,8 +40,6 @@
+ #---------------------------------------------------------------------
+ #CC = gcc
+ #CXX = g++
+-CC = gcc-3.4
+-CXX = g++-3.4
+
+ #---------------------------------------------------------------------
+ # VPATH for dependencies on header files
+@@ -302,5 +300,3 @@
+ #---------------------------------------------------------------------
+ # LINK/LOAD options
+ #---------------------------------------------------------------------
+-LDFLAGS = $(LIBDIR) $(LIBS)
+-
+--- v/srcx/Makefile
++++ v/srcx/Makefile
+@@ -142,7 +142,6 @@
+ vprogrsc.h vsliderc.h vtextinc.h vlistc.h vcomboc.h vtextc.h \
+ vcolor.h vpen.h vclabelc.h vspinc.h
+
+- cd iconed ; $(MAKE) ARCH=$@ ; cd ..
+
+
+ #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
diff --git a/dev-embedded/ponyprog/metadata.xml b/dev-embedded/ponyprog/metadata.xml
new file mode 100644
index 000000000000..2556689d33b3
--- /dev/null
+++ b/dev-embedded/ponyprog/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <upstream>
+ <remote-id type="sourceforge">ponyprog</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/ponyprog/ponyprog-2.07c-r1.ebuild b/dev-embedded/ponyprog/ponyprog-2.07c-r1.ebuild
new file mode 100644
index 000000000000..1828857b3d8f
--- /dev/null
+++ b/dev-embedded/ponyprog/ponyprog-2.07c-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Serial device programmer"
+HOMEPAGE="http://www.lancos.com/ppwin95.html"
+SRC_URI="mirror://sourceforge/${PN}/Pony_Prog2000-${PV}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+RDEPEND="x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-misc/xdg-utils"
+DEPEND="${RDEPEND}
+ || ( media-gfx/graphicsmagick[imagemagick] media-gfx/imagemagick )"
+
+S="${WORKDIR}/PonyProg2000-${PV}"
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-O2::' v/Config.mk || die
+ sed -i -e '/include.*<asm\/io.h>/s:asm:sys:' *.cpp || die
+ sed -i -e 's/netscape/xdg-open/' e2cmdw.cpp || die
+
+ convert ponyprog.ico ponyprog.png
+
+ epatch \
+ "${FILESDIR}/${PN}-2.07a-gcc43.patch" \
+ "${FILESDIR}/${PN}-2.07c-build.patch"
+ epatch_user
+}
+
+src_compile() {
+ tc-export CC CXX
+ # most of build is C++, but it uses CFLAGS
+ CFLAGS="${CXXFLAGS}" emake HOMEV="${S}/v"
+}
+
+src_install() {
+ dobin bin/ponyprog2000
+ keepdir /var/lock/uucp
+ fowners uucp:uucp /var/lock/uucp
+ fperms 755 /var/lock/uucp
+ doicon ponyprog.png
+ make_desktop_entry ponyprog2000 PonyProg2000 ponyprog
+}
+
+pkg_postinst() {
+ elog "To use the COM port in user mode (not as root), you need to"
+ elog "be in the 'uucp' group."
+ elog
+ elog "To use the LPT port in user mode (not as root) you need a kernel with"
+ elog "ppdev, parport and parport_pc compiled in or as modules. You need the"
+ elog "rights to write to /dev/parport? devices."
+}
diff --git a/dev-embedded/powersoftplus-libftdi/Manifest b/dev-embedded/powersoftplus-libftdi/Manifest
new file mode 100644
index 000000000000..ac4a0349cec3
--- /dev/null
+++ b/dev-embedded/powersoftplus-libftdi/Manifest
@@ -0,0 +1 @@
+DIST powersoftplus-0.1.8-x86.tar.gz 4746235 SHA256 a22643a320fb8154c38b1483c279535c898381cdc79394fddb09f45aa8a712a2 SHA512 13d499bcad3044ec50502026f5d61b11693c9ff5996978ff3101a705b71569749961f82855b9179d9da89a8e51c745ca5cf308ae6dbbd21242dd1d480323ba0b WHIRLPOOL f285095cfa1c5f8d6783721dfc1ec59df80ddb16ede8bc66068c2931690a43efd53d7d921f3c53c6ce05f6f05cbbccdeaaa93816bb51a77d01eb7a4b3d5985e7
diff --git a/dev-embedded/powersoftplus-libftdi/metadata.xml b/dev-embedded/powersoftplus-libftdi/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/dev-embedded/powersoftplus-libftdi/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild b/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild
new file mode 100644
index 000000000000..b9ff5197e685
--- /dev/null
+++ b/dev-embedded/powersoftplus-libftdi/powersoftplus-libftdi-0.1.8-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit multilib toolchain-funcs
+
+MY_PN="${PN/-libftdi/}"
+MY_P="${MY_PN}-${PV}"
+
+TABFILE="libd2xx_table.so"
+TABFILEDIR="libftdi/lib_table"
+
+DESCRIPTION="Library which includes a table of VIDs and PIDs of Ever UPS devices"
+HOMEPAGE="http://www.ever.com.pl"
+SRC_URI="http://www.ever.com.pl/pl/pliki/${MY_P}-x86.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_compile() {
+ cd "${TABFILEDIR}"
+
+ # Wipe out precompiled binary
+ emake clean
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ ftditabfile="${TABFILEDIR}/${TABFILE}"
+ dolib.so ${ftditabfile}
+}
diff --git a/dev-embedded/scratchbox-devkit-apt-https/Manifest b/dev-embedded/scratchbox-devkit-apt-https/Manifest
new file mode 100644
index 000000000000..e8b62be29612
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-apt-https/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-devkit-apt-https-1.0.10-i386.tar.gz 2991367 SHA256 0c591971a0038fbbd35440b046687b2b385782dfeae59531f3c2775ab79a72b6 SHA512 fc5a499e34828136ce72f806540708c6de25ea11ab64c245609785117eabb7df5f845e5371cc5f0c480b3396a15382519aef88663e218120e7e0f924b841de53 WHIRLPOOL 7a5e086d47e81b91686b1aad75867538513c15daa989fd4b85f651cf333542adf6093156d8afc45448522fbe1800af31ec0fa1d71054610726d18446a18b903f
+DIST scratchbox-devkit-apt-https-1.0.11-i386.tar.gz 2991247 SHA256 a70e0c03824505226eb85d25daa61f9f9a1b7c68de632fe72662c32bd1176896 SHA512 d60b530a74a68798160bef4fbbc76f747c68f5cc8b0ba9244c847f9f3d93c816de6ce4ec8892353659bdf4fbe8d53d271a096b5884fd1b69ef68d2dc24fb4374 WHIRLPOOL e4f802e0ccebe8705b0402bcc3b266ecf366a24da2ab6e8cb3cab8dc2a60a3c300629242dc8704997749d9ab9196318fd3a0ce90b3193b39c4dfec7fda3ea1f8
diff --git a/dev-embedded/scratchbox-devkit-apt-https/metadata.xml b/dev-embedded/scratchbox-devkit-apt-https/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-apt-https/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.10.ebuild b/dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.10.ebuild
new file mode 100644
index 000000000000..34d8d80bba5b
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.10.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.11.ebuild b/dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.11.ebuild
new file mode 100644
index 000000000000..a04c3d4eaaf7
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-apt-https/scratchbox-devkit-apt-https-1.0.11.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-cputransp/Manifest b/dev-embedded/scratchbox-devkit-cputransp/Manifest
new file mode 100644
index 000000000000..1c9f963cd66d
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-cputransp/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-devkit-cputransp-1.0.7-i386.tar.gz 23559307 SHA256 279b379bf176f1ba9b7fb42fae37372fcf3be37b433209a30f21b5096556c884 SHA512 555d088d0f0fff1e272b8111931c345d99ae233b8ac5cb7e7f4b5e99b68c69cb983f1a926a36f017c434b311621b84c5a6dcba58e95c190fc5e403ea930eddb4 WHIRLPOOL cdaff0c3ba0ea7054e485545994eda3ca1a419fa1be7ccba40f670f6e3c7fd65f2920fcfb18cfd2fe45e6f4d4b7f6e2773f8792c155fb8ace4e49efb493a96d9
+DIST scratchbox-devkit-cputransp-1.0.9-i386.tar.gz 23595294 SHA256 45ab9ce78f8e20b340e33f3f5088486e9ae1e587fa897c8edcdacfb96680ac97 SHA512 b3c17a62c57fefd63e402c460965f71525c3319d8cf2da93e44db9bac1ca276b9e95b2424955825933665e3f67e7ffd2cb03ee809e836a410fb401582febada0 WHIRLPOOL a255c6642e1b58d814144dd584c8c1f9b81f37ef875ff9fa2b359dc597934fd1df670245c8f84d128f7bbdd51b31fa9e4bd12e0bf972610f09d92cd425a21bc6
diff --git a/dev-embedded/scratchbox-devkit-cputransp/metadata.xml b/dev-embedded/scratchbox-devkit-cputransp/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-cputransp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.7.ebuild b/dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.7.ebuild
new file mode 100644
index 000000000000..e3e032fd8b50
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.7.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+RDEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.9.ebuild b/dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.9.ebuild
new file mode 100644
index 000000000000..fcbf76aceeaa
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-cputransp/scratchbox-devkit-cputransp-1.0.9.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+RDEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-debian-squeeze/Manifest b/dev-embedded/scratchbox-devkit-debian-squeeze/Manifest
new file mode 100644
index 000000000000..6a22c3af9f0f
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian-squeeze/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-devkit-debian-squeeze-1.0.4-i386.tar.gz 7806679 SHA256 f1c40d235f8f3344c41d7a3ae2818e267b1d893745e6ce5d71459974e2c2111e SHA512 7a196f7978afb06af01253db7bb6804b3651fe5293c595424bd316988ca205e692cdec2caaafb2cdcffc6822c87eee4365d8074037068925ac1b4ac44803cacd WHIRLPOOL 5a23b7acc0122769f9093d272dd79b8c55a3d317cf4f7e9bffa796d4f4eb820f2175074f01f12f90f62c2d408b03246f8295cfbba365f57f9f68192cc2bdfb89
+DIST scratchbox-devkit-debian-squeeze-1.0.5-i386.tar.gz 7894742 SHA256 0e44659b94ad0a6ac25243f541fe16688b2336c1e13be5144fa70717b3b1815e SHA512 0fd461a6db791cf48e549db102f4725f9312bbb680c7ae2ba03e1bd1a5780c619681922b18f5e81d17fc32d66aba9ef4e45c1018d91e218262f4b9618f27f90a WHIRLPOOL 248f89ab955310f84c63fe2eb147f2465e42b82f86deb597c3a96418305754a881d643d6029594345472a330793789cf3e36920167f41a383b4e71f762729e97
diff --git a/dev-embedded/scratchbox-devkit-debian-squeeze/metadata.xml b/dev-embedded/scratchbox-devkit-debian-squeeze/metadata.xml
new file mode 100644
index 000000000000..9a4933467d05
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian-squeeze/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.4.ebuild b/dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.4.ebuild
new file mode 100644
index 000000000000..26a33af6c96c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.4.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.5.ebuild b/dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.5.ebuild
new file mode 100644
index 000000000000..26a33af6c96c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian-squeeze/scratchbox-devkit-debian-squeeze-1.0.5.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-debian/Manifest b/dev-embedded/scratchbox-devkit-debian/Manifest
new file mode 100644
index 000000000000..95a246317f66
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-devkit-debian-1.0.10-i386.tar.gz 9786244 SHA256 400025a86c3e16bd58d923319998e38b0d38427933ee4a6a9d34f53e5da0bbd1 SHA512 bcfaec7c9dc21acf20b4d2da675aec3d68c7b7761ae93d4b9f3af7fe96374da54073645c18157d714811e8492427c5a63e5905479fcb84a6d849edce18b8ef06 WHIRLPOOL ef41701098e4a546d89015e1e84db876c1980c19fbea56cf7b3e005171e6608de5fb69b113f01708ca8ba46e15893a0b947c9c3ede8fa65c6855ebacee3e0b2d
+DIST scratchbox-devkit-debian-1.0.11-i386.tar.gz 7415809 SHA256 12b03484e9ac3f3c30dc5853c06882fa879df5d81cfa3f47ced54a766659e60f SHA512 39c724f115097ce42db0fcd6366f97cc1c0ea4a853345444398980c1a9963332df4782b384382a7e003003563adfad7f1c8dd18eecec0da6f6532ab0901eb46f WHIRLPOOL 4bb30003a34fca6aaf10ebb8fe3dc5a6aa89bc9a1b5d059f69a3f56252c528e691dfcc115321dcc1fe35c90a74f3e4e9ff7aaa25db18e8a49d9ada9b1ad180b4
diff --git a/dev-embedded/scratchbox-devkit-debian/metadata.xml b/dev-embedded/scratchbox-devkit-debian/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.10.ebuild b/dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.10.ebuild
new file mode 100644
index 000000000000..28e82ddc0d25
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.10.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+QA_TEXTRELS="opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.11.ebuild b/dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.11.ebuild
new file mode 100644
index 000000000000..cab878ce4695
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-debian/scratchbox-devkit-debian-1.0.11.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+QA_TEXTRELS="opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-doctools/Manifest b/dev-embedded/scratchbox-devkit-doctools/Manifest
new file mode 100644
index 000000000000..e572c3a58b6a
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-doctools/Manifest
@@ -0,0 +1,3 @@
+DIST scratchbox-devkit-doctools-1.0.13-i386.tar.gz 138053226 SHA256 33793d0d6842e844ff07653fff4d602dc3699fe7f4e882a62f3bd9583ffde638 SHA512 1f57c52f47a0e01b0866a5c3860e665d0de4c3e407d5e3d8f8dc0fd8c34bae69f432f8da2b7c9acc917af0b41e957c87a0e1d42a413e256e45c02c533089d1c6 WHIRLPOOL 35dc60a254a80ac2b336670fab7696964bff440878d7b9a834a311b9e2b6a528f7733e76e232d812679d39ae54b900249c6a0daf76a6eefeddc4c2173e3c1724
+DIST scratchbox-devkit-doctools-1.0.14-i386.tar.gz 138045143 SHA256 f5165360e2e5d0de2fd436a27c795ff8f5dc1e8d741bc9d2de42f6ef1d5d9a5e SHA512 95a4a5ae12d2044f928ff21fd2bc58320cb860e7762f22e47cbe4ed67fe4a183b08319459fb3c975b62bd1da3cd683580e474d514c1f3132db7bd6224249405a WHIRLPOOL ef78dd69f43cc4344c4468b93e47957d9dee3e6a9e00b20f382fd804661a805ba2d9bcef17fc1592665b02b251b2fbb33a9d0983d4d3947a4d6734a66f009b50
+DIST scratchbox-devkit-doctools-1.0.9-i386.tar.gz 139460608 SHA256 82677dbeea6d63616dc32b1e7bd34aa886a10d5801a2a9ba4a3c8cea593383ea SHA512 7b6d7dc2defd6541f9a4677bda4776b591ec53e59b143c6f695ef29c685047581d9bdf46eb61ee453207b276f3626ea46d2e4851b956068156f472d8ff3d45f2 WHIRLPOOL 0275f0540b9e710622fbf4b9e37b8b66364be4d873f89045ac720f2f52754f959fd128dc38ba580112470f0376db7a0b0ad3922ec696524214e9b58af142bb70
diff --git a/dev-embedded/scratchbox-devkit-doctools/metadata.xml b/dev-embedded/scratchbox-devkit-doctools/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-doctools/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.13.ebuild b/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.13.ebuild
new file mode 100644
index 000000000000..34d8d80bba5b
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.13.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.14.ebuild b/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.14.ebuild
new file mode 100644
index 000000000000..a04c3d4eaaf7
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.14.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.9.ebuild b/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.9.ebuild
new file mode 100644
index 000000000000..4c691c4c329d
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-doctools/scratchbox-devkit-doctools-1.0.9.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-git/Manifest b/dev-embedded/scratchbox-devkit-git/Manifest
new file mode 100644
index 000000000000..4cfe8017dfbd
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-git/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-devkit-git-1.0.1-i386.tar.gz 5640785 SHA256 76bd5304847d96e71c7971b30fec7f02475a2ab2e6f7d54fc2d118cb911a90bb SHA512 d48c2870c1757b0501b3223ae9d3fd52dc585767ae16c8d8857c3a7f3e5794c3203050dbd84969fe424bab38d347afe9b6f6ce759a18c8152558b29ca71e6ec1 WHIRLPOOL 29d81a7d95031543c715e106cdd1931f0281ce8f4fa5d946d5bd942f2e5deb1bcc258576f4b990b12422b3cb4201e97357dc663f1546c7954079cf0e5c0f31bc
+DIST scratchbox-devkit-git-1.0.2-i386.tar.gz 18337539 SHA256 6643265e9de1bb4d07f2b8aeb3e1ae982eb9bcced63261c3eae0c9d84731d3bd SHA512 1ffe21ffd5d4ecf46f148ee607c9cf51d309c6a6f6179d7b83e5c0260b1f137d2180abb0794ce4596510ef353cf7668a3d9b236bff101e1448873b21e12a8956 WHIRLPOOL 9dc15ed4c3c92ed1124708be1e2592cbcd13f926dff774475e12e5da65c8172ec03c847053a48c112a7cecc81e4707901335372019b1c5f5330193b6ab8a1536
diff --git a/dev-embedded/scratchbox-devkit-git/metadata.xml b/dev-embedded/scratchbox-devkit-git/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-git/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild b/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild
new file mode 100644
index 000000000000..28e82ddc0d25
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+QA_TEXTRELS="opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.2.ebuild b/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.2.ebuild
new file mode 100644
index 000000000000..cab878ce4695
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-git/scratchbox-devkit-git-1.0.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+QA_TEXTRELS="opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-maemo3/Manifest b/dev-embedded/scratchbox-devkit-maemo3/Manifest
new file mode 100644
index 000000000000..c9dbc986fb51
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-maemo3/Manifest
@@ -0,0 +1 @@
+DIST scratchbox-devkit-maemo3-1.0.3-i386.tar.gz 22558160 SHA256 51a426d032412011e934cb3fa158722e871b30f9fde1c6dd932a8962820ac02c SHA512 561cffc47a44b575e25114450aa7d596b2df2988ed9ec7f4a37f09227025550f3fd0cc12d009cf85635027a79d616a422a8a846b8ecc82c677f0bc27c8fbd839 WHIRLPOOL 0b4e07422fe342c3286020bdbc2a96957b1410f0356ae21540b103cb60a8c58793d13fede4e4ff35ac7bdde6397eb87a8d3868aecd48455c915d9325f76f9631
diff --git a/dev-embedded/scratchbox-devkit-maemo3/metadata.xml b/dev-embedded/scratchbox-devkit-maemo3/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-maemo3/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-maemo3/scratchbox-devkit-maemo3-1.0.3.ebuild b/dev-embedded/scratchbox-devkit-maemo3/scratchbox-devkit-maemo3-1.0.3.ebuild
new file mode 100644
index 000000000000..90037ae3c29b
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-maemo3/scratchbox-devkit-maemo3-1.0.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+QA_TEXTRELS="opt/scratchbox"
+QA_EXECSTACK="opt/scratchbox"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-perl/Manifest b/dev-embedded/scratchbox-devkit-perl/Manifest
new file mode 100644
index 000000000000..4e6796f18110
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-perl/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-devkit-perl-1.0.4-i386.tar.gz 970158 SHA256 e6992dd6a9111b635180863cab8fbebb007456d89c15fda3950371797d5d15bc SHA512 ce57b6fddc725cdcbb10d5ec89667b04cd1f5d0b9593143b88ba2821faa121689e103b26414000349fa764240cc44fdea995e08fe62386925823fa70c808e530 WHIRLPOOL a2b5ea1ba92f8296f60cb0615975c6836aef1ed58357eb9a4cb22f07d8a3356578e95357676557a88d06af4fc111b31577c227f27b2d9ebe490da751ed41f166
+DIST scratchbox-devkit-perl-1.0.5-i386.tar.gz 955873 SHA256 8dc386378f23382a14a107b306a1bb1bdd325de3546185efc956ee39d73f5cb9 SHA512 9da627c76192133a8f49c181cbe149b8031920812d9d65622ff3bdb829dbe9d47a9385cfc39a17cf04499de2d35ecbfa88cc6379ede166f42c765124323888de WHIRLPOOL cb21335ea6e3cddf905b69071d3ee71b01cc4ff61acac97fe1d36501e76bda620960910986c785215c6b9064c7cc46167572bb796d17babb29a30f881cd141ff
diff --git a/dev-embedded/scratchbox-devkit-perl/metadata.xml b/dev-embedded/scratchbox-devkit-perl/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-perl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.4.ebuild b/dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.4.ebuild
new file mode 100644
index 000000000000..34d8d80bba5b
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.4.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.5.ebuild b/dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.5.ebuild
new file mode 100644
index 000000000000..a04c3d4eaaf7
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-perl/scratchbox-devkit-perl-1.0.5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-qemu/Manifest b/dev-embedded/scratchbox-devkit-qemu/Manifest
new file mode 100644
index 000000000000..32e730129bcc
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-qemu/Manifest
@@ -0,0 +1,3 @@
+DIST scratchbox-devkit-qemu-0.10.0-0sb10-i386.tar.gz 3312204 SHA256 5f9021dc3d340a233fe5a58634288c08ab1f046bf965761b4683df4e3637c0b2 SHA512 029658efe3b47cb6a96b2ec2f730948c469c9dffb0eea43197cb5d5a1ae767294a6bf7ffe5a26d6fbf3efe01fb55c042aa52134f64e5e6e4b32e6baec7278661 WHIRLPOOL 4a3e5d8679b53c29e04965b0101b8b7a4f9a3ddebe1d6157371169aa63631cde1c452ab01d06abeaa69b6f4778e1a53fdfeaefb0b74e5addc4bc3ff3ac88313c
+DIST scratchbox-devkit-qemu-0.11.50-0sb5-i386.tar.gz 3351017 SHA256 230f04ceca16c2141011a8d5702f177faf37ee4fed4f8e7a081051e3336be96d SHA512 d191122c46de6947ed0b64bfacaa5d4e3f092e353c11e584d7d4cc43d1f4fc2b048d2100ca92c7568c287daa7816359637c3e6b0d9384c0858ca32a26f0c192a WHIRLPOOL 8e662f81d6e603dd0a96c71378679807d0a721074411a0a73f0fa4914a225da25c784a71f15b5fa619178fe79ea4c446896233c687ea88d092c11e15f6bb8f5c
+DIST scratchbox-devkit-qemu-0.12.50-0sb3-i386.tar.gz 3473391 SHA256 a9ea0870919058135ce9e3c3c21cd79dfd4ea505cddf6a9cd394f0bb064c1065 SHA512 03808c3d52ce62bd8ab728dc6120d126136294aca10a91781583eec33d99dc686dd24a6a0d58b37d70f38a78049313c30d556e195c949afa1a89c7544cd013f2 WHIRLPOOL af6d75c824affeff97f8013202008e0856533bce0786772ea2e242efc99927dd8283220b79f232296ee436f535e3b8ed53456db406e3cbd7b7fb19f94e22e37f
diff --git a/dev-embedded/scratchbox-devkit-qemu/metadata.xml b/dev-embedded/scratchbox-devkit-qemu/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-qemu/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.10.0.0.10.ebuild b/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.10.0.0.10.ebuild
new file mode 100644
index 000000000000..eb141bad833f
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.10.0.0.10.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+MYPV=0.10.0-0sb10
+MYP=${PN}-${MYPV}
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${MYP}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+RDEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.11.50.0.5.ebuild b/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.11.50.0.5.ebuild
new file mode 100644
index 000000000000..859f54ece0f5
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.11.50.0.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+MYPV=0.11.50-0sb5
+MYP=${PN}-${MYPV}
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${MYP}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+RDEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.12.50.0.3.ebuild b/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.12.50.0.3.ebuild
new file mode 100644
index 000000000000..725d5bb22c39
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-qemu/scratchbox-devkit-qemu-0.12.50.0.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+MYPV=0.12.50-0sb3
+MYP=${PN}-${MYPV}
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${MYP}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+RDEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-devkit-svn/Manifest b/dev-embedded/scratchbox-devkit-svn/Manifest
new file mode 100644
index 000000000000..aff2b1f7e67a
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-svn/Manifest
@@ -0,0 +1 @@
+DIST scratchbox-devkit-svn-1.0-i386.tar.gz 15363785 SHA256 7084498023f37d8bf69acee9930913a42a56680cc3580755f582fe229d1cd49f SHA512 e9f6349a0bb0ab0fc2a726eb053314b8035ce485109a0835f132f31f342c36297d7edaeff60329b5da8e9203c23216dd6868d8fc41355f18caf78d1a4ba2e484 WHIRLPOOL 81a5a215dcb3abb7a4ebfa12ec64c1d8c5fb403077e658e1f8cf28c696a05d30d8c70ace339bd7ecb7d27c065575e011f267a71c8bf466316a8dbe08e9990e27
diff --git a/dev-embedded/scratchbox-devkit-svn/metadata.xml b/dev-embedded/scratchbox-devkit-svn/metadata.xml
new file mode 100644
index 000000000000..9a4933467d05
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-svn/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-embedded/scratchbox-devkit-svn/scratchbox-devkit-svn-1.0.ebuild b/dev-embedded/scratchbox-devkit-svn/scratchbox-devkit-svn-1.0.ebuild
new file mode 100644
index 000000000000..28e82ddc0d25
--- /dev/null
+++ b/dev-embedded/scratchbox-devkit-svn/scratchbox-devkit-svn-1.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${P}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+DEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+QA_TEXTRELS="opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/Manifest b/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/Manifest
new file mode 100644
index 000000000000..23c22bb1f106
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-toolchain-cs2005q3.2-glibc2.5-arm-1.0.7.2-i386.tar.gz 47597128 SHA256 9ffff86e32075e14e045b555b6cf0c39f81726415555036d3912e56421fe04e1 SHA512 4fd73f7a0c5aaa4d32122cab924782e87dc87649183935031caf305553923284d30d4091791e24e1293d81f05183c0db9baaa46f4c18cd29019a3db9d3da3fcd WHIRLPOOL 069e3deeccd911f3fbce4305626d0c50c5a3d168204f058e2d3094cf084a97893c8f49d0c44602c50c0f4d45bf6342fbe08540f6036e27bd4f60d74770335267
+DIST scratchbox-toolchain-cs2005q3.2-glibc2.5-i386-1.0.7-i386.tar.gz 44022168 SHA256 985498ddea39d512c619a2e6bc87e1252eea26adffe82d945136aa53a0078778 SHA512 0d72ee4bb3035f84b8a532dcce4795383f956445d225c2a537f6e1e1db53ee27499f49f00c81d61e274f339a0a5a998a36a124eb07a0c5d3432793e2d5eba103 WHIRLPOOL cda5b5671eecca3d3855ffdc8cb4a84d533d2c6ae8c796fa8086e67b3087f712fe4eeb82d83092a8cb1ec8be6d6f62acd1af235a6c32320408d336d98e4e11fe
diff --git a/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/metadata.xml b/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/scratchbox-toolchain-cs2005q3_2-glibc2_5-1.0.7.ebuild b/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/scratchbox-toolchain-cs2005q3_2-glibc2_5-1.0.7.ebuild
new file mode 100644
index 000000000000..d01bae93863b
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2005q3_2-glibc2_5/scratchbox-toolchain-cs2005q3_2-glibc2_5-1.0.7.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+ARMV=${PV}
+I386V=${PV}.2
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/cs2005q3_2-glibc2_5/cs2005q3.2-glibc2.5}-arm-${PV}.2-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/cs2005q3_2-glibc2_5/cs2005q3.2-glibc2.5}-i386-${PV}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/Manifest b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/Manifest
new file mode 100644
index 000000000000..c3ab0192dccb
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/Manifest
@@ -0,0 +1,7 @@
+DIST scratchbox-toolchain-cs2007q3-glibc2.5-arm7-1.0.12-10-i386.tar.gz 101979228 SHA256 a5eada21cd74b8b4cb4df8298fd431fc46849ebff053890b6672d4746f562dfe SHA512 eed4e262d450166a727ee43d3efc9f20eca0766848b7a1d3804385757971411c25d902082df4634fc684820f303456c36b44b849b93786c8e97d1e1f016015f5 WHIRLPOOL 3e4360cea71191613929041accd4478a423dd9b2036e22a9ef4637a45331b113a81bda98bb876adffb2918a948abe076e30e6ce8bb3320b63f6ae17583f13901
+DIST scratchbox-toolchain-cs2007q3-glibc2.5-arm7-1.0.14-2-i386.tar.gz 101978830 SHA256 82d964332969cdff17d33059f9f1534a9934cd2ab226c06073b981e98c65cfe5 SHA512 f2d2e7807dd66e438324535a7fa7d9b991ef0f1422704e0eda290dda643e729df0b2f1e657a535087fd93ec0e1c057b0c4a6f9599a7e8248c168f12e73c66bda WHIRLPOOL 4736345f0d5a92841ecd097a1fb9db7ca8d74ed436b71604c1c7d638807378f34e43bc17f10987b8cf3e6717d18546cd98748738e71ba73f31ee85078c7431d3
+DIST scratchbox-toolchain-cs2007q3-glibc2.5-arm7-1.0.16-2-i386.tar.gz 101990711 SHA256 103b3b1ea90b6be3a82c4cd266c6f0856fdba050f352d4ed4ad7b76d2f8313c0 SHA512 7d8c695a93ac85222bf4fbe2a1a107512320fed790e21a25c058270c2260691ea98d79038ecc8d8286eed6af40e81f870f04fd55430c0ee12072517dc9d02648 WHIRLPOOL c20349f56eea79f14ba464296b7cd283e62892c912e0881a1f1581eea93b252dc528075589c3e780134351157af725ec77e05bdb6b24c5a7d3dd1289ccb16634
+DIST scratchbox-toolchain-cs2007q3-glibc2.5-i486-1.0.12-8-i386.tar.gz 94539077 SHA256 ac9fda5bcd68e6dfe026079e1e3f3beb25607a44980d98a9c1d4bd8fa9cfe4d8 SHA512 69fb98a6735ccff87cddba57c21ae5c577bf97af7eb1fba2625a8132f13745b31fb9294273e2f5630cd2c574c4d2de8f0873cc459c824ffc04a3a89889129d6d WHIRLPOOL e7f498caa37ae72c9c82430f5592b806521d51f455fe3de001e128a68627367061c8d2830485aa54c9ae2b8ce380cba0dda81db2ba82cf8a914cdc113868bfdc
+DIST scratchbox-toolchain-cs2007q3-glibc2.5-i486-1.0.12-9-i386.tar.gz 94528212 SHA256 81e9dbfe4936d088c6d812adc1032e2d3e625cb37dacedb1fd05cec970fe060b SHA512 694b69ad5dc0024535a3c4944a362b0bbc441c9c8cb8e971af16f3af0ee6aab6d5e6d65fc709e888ff198460b246deeb4a9e25c32b2065949293b5405df70bfe WHIRLPOOL e92542f43b91c1005d482dd996079485a2cdcaf764d76b08a1d4813fdb1e2f82d935891a6b07c86252a401ae83c003c72e53a99f2d68fc5078d8b907e9914a65
+DIST scratchbox-toolchain-cs2007q3-glibc2.5-i486-1.0.14-1-i386.tar.gz 94560834 SHA256 4813215dd3d933199e30dc22da28ecfb32925ebf723ce2fdc0c683e63db741d4 SHA512 2f15254f932313a08a9eb008acb906cfefce1d8d20ffc55070b2be74efd66e89475be0d9fb55990499e17ceb35d410a41ec72fbddc67533d638d3e55506b64d4 WHIRLPOOL 103ce0f8a27ea0185d3a707e71447c84a18c684d7d4c3adbe7d6a479d116c5f6cc95cdc3409ea715cdf4f236302a7cc7bd8f6b3b698237ef193730c850cae1ee
+DIST scratchbox-toolchain-cs2007q3-glibc2.5-i486-1.0.16-1-i386.tar.gz 94567670 SHA256 9f2dad474e11526d53a3c5a7f7060551e3f2367de55d751d4868f2d03ab0e316 SHA512 2ddc37905d243632bc303e684807e1cb41669f92f843a9caa9174d1c7b0b5b7f87ea21ce1aa7788dfa3cfa18c1a0f6316e80268ce650aac76b8d16a59597b3c3 WHIRLPOOL 95ad8de2ef20f591a2629303590619e33f23e9f0d25d3ff3e13183cec73044a7d56f23d02559ce87c79424e4b21cd7b7d69e753745a8b53c1eb26bfd8d582764
diff --git a/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/metadata.xml b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.12.ebuild b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.12.ebuild
new file mode 100644
index 000000000000..b59bf1659ee9
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.12.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+ARMV=${PV}-10
+I486V=${PV}-8
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/_/.}-arm7-${ARMV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip binchecks"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14-r1.ebuild b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14-r1.ebuild
new file mode 100644
index 000000000000..c4136fa9f717
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ARMV=${PV}-2
+I486V=${PV}-1
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/_/.}-arm7-${ARMV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14.ebuild b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14.ebuild
new file mode 100644
index 000000000000..e5270c13a014
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.14.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+ARMV=${PV}-2
+I486V=1.0.12-9
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/_/.}-arm7-${ARMV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip binchecks"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.16.ebuild b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.16.ebuild
new file mode 100644
index 000000000000..a2c8d512a9ab
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2007q3-glibc2_5/scratchbox-toolchain-cs2007q3-glibc2_5-1.0.16.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ARMV=${PV}-2
+I486V=${PV}-1
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-arm7-${ARMV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/Manifest b/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/Manifest
new file mode 100644
index 000000000000..96500478bff1
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/Manifest
@@ -0,0 +1,2 @@
+DIST scratchbox-toolchain-arm-linux-cs2009q1-203sb1-1.0.13-2-i386.tar.gz 101945345 SHA256 c3238cc58e06e5967494510df13579351d49ef32a7e68ccf96739eb4b6337f40 SHA512 8e0493ab7b57fd60eb14e1153605eee55ef7e9ff764bfda57ce629b290449a545645caa7410e4ddbd2a45286088ed29329c707e3f42dda50ee85a32fa3919de6 WHIRLPOOL 471f06b71a10e91e53e77a8cabb7d5c0e45ae34dbf1d302abe13c46ddd5f1f0dca5db336fe06ecd1c14568f6ccbae911a211404e8276904d9ccc9153abd4ef7e
+DIST scratchbox-toolchain-i486-linux-cs2009q1-203sb1-1.0.13-2-i386.tar.gz 97206877 SHA256 0c5b34a83a1d9059c6878790a903bc2bee5c8e0021ccd95328d2c47c20585dd5 SHA512 88228ca7ccac2df4ef42eb5d50d66fd370cbdca0eafc9a588699f2948f22646fc00ea85b76561860029a7cf1ddfc00f5686f128d51b6a460da4a7c2099a1d5cf WHIRLPOOL eae1318a9dff4b1da8f4f2b81da3c4d59197304c59dad68306c633ac07db28270fce361c1a344e2d1387af74530d3a30fd50f9a90e4b385c313f3c439f346eb2
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/metadata.xml b/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/metadata.xml
new file mode 100644
index 000000000000..9a4933467d05
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/scratchbox-toolchain-cs2009q1-203sb1-1.0.13.ebuild b/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/scratchbox-toolchain-cs2009q1-203sb1-1.0.13.ebuild
new file mode 100644
index 000000000000..7b5dd97ab879
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q1-203sb1/scratchbox-toolchain-cs2009q1-203sb1-1.0.13.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SBOX_GROUP="sbox"
+
+MY_PV="${PV}-2-i386"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/toolchain/toolchain-arm-linux}-${MY_PV}.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/stable/tarball/${PN/toolchain/toolchain-i486-linux}-${MY_PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+RESTRICT="strip"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/Manifest b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/Manifest
new file mode 100644
index 000000000000..e270838f0cde
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/Manifest
@@ -0,0 +1,4 @@
+DIST scratchbox-toolchain-cs2009q1-eglibc2.8-armv7-1.0.17-10-i386.tar.gz 101822265 SHA256 83fa1957ec27f05bae6df986c0f20177abd736a5f978aa24a7798e1e7702a55c SHA512 00b190e0867db67604c600f75ce9f9590cfe7268d79f151fc5f3c29ca6a109735a7671fb5993c3b89a571a7e023dc895e20b793b4841256a661598082456c619 WHIRLPOOL cd14d91ca6e8c29dcf601f7b2482892456f8b4246fd8040a2fb80e60497b7bfd6325ac12db9b21cb561e1ab7d35bdc6909d8a89724f6e4e70e0621d2f29a1a23
+DIST scratchbox-toolchain-cs2009q1-eglibc2.8-armv7-1.0.19-11-i386.tar.gz 101972325 SHA256 46bd785783ac5538d3ea9ae5ea3b2f23a8b69ac5349899385772c2e60ca820d3 SHA512 368ead1eaab067cff9293866a77452a5f9e36666019ef50910f6a81177329960adcbaa51c6a0914032f32957f71dc48bef3afb14abdb1e62ef5e47975abc8d2c WHIRLPOOL c56ba54d3be36bb2526571d176eb8af00931f64bf35357ccbd39d33bc319d721805b5860bfcbea385d52a8d85cf21c0553e95b882b185b7b29cab5d4da6bd3ae
+DIST scratchbox-toolchain-cs2009q1-eglibc2.8-i486-1.0.17-5-i386.tar.gz 97307811 SHA256 0831c596a69dbfac65c708017529c18e89b587c0419cce20f1a4406a1f7df789 SHA512 f7dde03ef0aaef0dd2e0ff791d0ebaf4a0ce81508020e077b045beba6101e37dd7e5fa3171e32d2d0ce8df1a69c018415af0d5ff3c480e4924889024d2d164a7 WHIRLPOOL fe37a618a31c71e50f77b184a6b8d4c2b3a806f4f25ab1ffb70c80b9fedee567c5e68f1296eaf5be4e16a68a6b3d543cefb458777bd804c384e7711ae5c25a55
+DIST scratchbox-toolchain-cs2009q1-eglibc2.8-i486-1.0.19-5-i386.tar.gz 97455265 SHA256 880338628143ab23bc31ae19de09c4a56ce06a10953e2abe92382c569b18393d SHA512 1b73126826c0251d00faa32300eea4890fbfa7fb3dd73b25c40271f3ddb178aaf670f28b98b90a8b21b9bc1731c143b063d80f6a3dccbec2f109afa1f4d0ca15 WHIRLPOOL ceed0bdb5b7692f49aff1394823b81eabe78978da27ea315ff93ff97fd3ac454c66792fcec19ee367d4253fa5173c37bf645ea94f6834b27e0901c46a349b9f0
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/metadata.xml b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/metadata.xml
new file mode 100644
index 000000000000..9a4933467d05
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.17.ebuild b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.17.ebuild
new file mode 100644
index 000000000000..0924ca4a0a0a
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.17.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ARMV=${PV}-10
+I486V=${PV}-5
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-armv7-${ARMV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.19.ebuild b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.19.ebuild
new file mode 100644
index 000000000000..1139f0615b21
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q1-eglibc2_8/scratchbox-toolchain-cs2009q1-eglibc2_8-1.0.19.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ARMV=${PV}-11
+I486V=${PV}-5
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-armv7-${ARMV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/Manifest b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/Manifest
new file mode 100644
index 000000000000..013fb2bfbada
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/Manifest
@@ -0,0 +1,5 @@
+DIST scratchbox-toolchain-cs2009q3-eglibc2.10-armv7-hard-1.0.17-3-i386.tar.gz 89561893 SHA256 54e9cce865f283fa5729cac1539a285ed09fdad6e7afedd9421144e119687c13 SHA512 44c9e361de58510f1eb1934f8948538b7a7ce097ebcef8f9e7be3828a358bc457b02909f976353fba52eca1f2994a9748933779f53a7dce70eb845f8cf540a5c WHIRLPOOL e6b771b9741adcdf3d221f4abf99539b3bcf5fa66ec674e13b8dbf383f953429b797695f0bc3a21bf0f466d439db7eeb942ca5041126df7ed51cd213e3037a2e
+DIST scratchbox-toolchain-cs2009q3-eglibc2.10-armv7-hard-1.0.18-4-i386.tar.gz 89572857 SHA256 c77b432a376b7c881e75ea084ef0666dd4839dfaec8d2e87ecb5b0f41bbeb0d6 SHA512 6c9d3d3af0db12eaa9f9f15b7831953fca31265fb4a95f2026a32b549c75afa4e470cd46151a904ba0aba0d409b5e616cc97d9c0bd6dba5b845d2db1333839f1 WHIRLPOOL 6c8370021ecf05b18ab43f0b2003dddcf4f2dea353a3741d469447e1dca5d8f31b92b24297ec1fc662ab234b53080ccffced7138214688b34c849c6bd83d4b86
+DIST scratchbox-toolchain-cs2009q3-eglibc2.10-armv7-soft-1.0.17-4-i386.tar.gz 89585584 SHA256 c409e838e3f3c154b7d9279036683687df62b045ffa45bd987700c8c9e14a9c5 SHA512 69b35088730be3e995144a1a0ba1e5be79712658021c43f0357232bdffef4a1acd10a59502a9cba530cf92c4969b04d67874eefbe077791ea9a4411a7bf7fe1e WHIRLPOOL cbb50a013c526d9c6f85540da9fdc1a998d6c60c53c53154e1055f4fef079121fbb244c949be90203ad73341a93deb7664dbc02222b6b498984ea065845a3a83
+DIST scratchbox-toolchain-cs2009q3-eglibc2.10-armv7-soft-1.0.18-5-i386.tar.gz 89590725 SHA256 ab1a2d6d0224cee17b2e2956e51fa375699e6da2797ba693c3081fa48eff6e77 SHA512 992787266a1417748f01fb6fed33c3f1eea99ca1f6b7133d729e332fea3f5a0458b211007b588ea42e93c95dbab5f42b3547459c5d88e689e497e83e4adcc8e8 WHIRLPOOL fbcb533e370b3bb6bee59297a17ff0febc08f2ffa7588202a127e81d8e295e511d70cb440705da1cffcf444a3cba418b16657e48913efec58d305eb9209c8075
+DIST scratchbox-toolchain-cs2009q3-eglibc2.10-i486-1.0.17-3-i386.tar.gz 89144596 SHA256 43573a1358c18234dbe6b4a9545020aedb6c1622c480ee6180bf0383e7136996 SHA512 6fad4c2665948dbc70848545e1ec9de1f49fdc809a6cde860633aecf411c61e806b2d30e1622667d796696ade2536fc139a9ff37529fadd107de051e86098466 WHIRLPOOL ee5dde4a677f5d6b7fcd28564582a048f24f8d3db86870ad9411063231cf5e0b1f751792a4930e59e018d298e96fe90263cd9a0ec1e4c882df2501bd45925f8b
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/metadata.xml b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/metadata.xml
new file mode 100644
index 000000000000..9a4933467d05
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.17-r1.ebuild b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.17-r1.ebuild
new file mode 100644
index 000000000000..fdecac3a6a8f
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.17-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ARMHARDV="hard-${PV}-3"
+ARMSOFTV="soft-${PV}-4"
+I486V="${PV}-3"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-armv7-${ARMHARDV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-armv7-${ARMSOFTV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.18.ebuild b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.18.ebuild
new file mode 100644
index 000000000000..07b17d381357
--- /dev/null
+++ b/dev-embedded/scratchbox-toolchain-cs2009q3-eglibc2_10/scratchbox-toolchain-cs2009q3-eglibc2_10-1.0.18.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ARMHARDV="hard-${PV}-4"
+ARMSOFTV="soft-${PV}-5"
+I486V="1.0.17-3"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-armv7-${ARMHARDV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-armv7-${ARMSOFTV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/${PN/_/.}-i486-${I486V}-i386.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="=dev-embedded/scratchbox-1.0*"
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/scratchbox
+
+src_install() {
+ dodir ${TARGET_DIR}
+ cp -pRP * "${D}/${TARGET_DIR}"
+}
diff --git a/dev-embedded/scratchbox/Manifest b/dev-embedded/scratchbox/Manifest
new file mode 100644
index 000000000000..c0441b7f46d0
--- /dev/null
+++ b/dev-embedded/scratchbox/Manifest
@@ -0,0 +1,4 @@
+DIST scratchbox-core-1.0.19-i386.tar.gz 51524069 SHA256 0d4e32b2d28364eca0c32d0030df88df703027a990fcc58d3daca63f1f1866c4 SHA512 870fa53d569fae238e4c9680ce7b61ee3f35a264ba03bb2e57e5501312826883a75c55c989f554afab24c7fa3362139f7ad9ad109019afaaa6968d88e4d4b3c0 WHIRLPOOL e3e3b2c092d3d875572645d7839064c3df0fc0b9bc26a1f654911321ce797a456b562e966eeaf70258404013c7bf7b003ad4662a5dd64e27df596612ea4faa78
+DIST scratchbox-core-1.0.20-i386.tar.gz 51829189 SHA256 7e7daf897d545e68d05070a8c85fb3bbc5e1672ddacefb9bcd392109c4cbc6cf SHA512 a5c99d426458d38458978082db58efd74755e54294ef41dbbd811daf758573e568a84360641d61bd8d30f368e50a088b976369a1c2af543f00026f388366587d WHIRLPOOL f689f742711b15779cd20db0c4bb5c0108277b3e628cd04b22cf70af2f80242b3d106362e392f8adb1f9732032385bf7310545138b5cddf9a161bcf795532374
+DIST scratchbox-libs-1.0.19-i386.tar.gz 14368380 SHA256 a51ddf929832d7d0a4af8e417857a6f346891bfb0895c39d3bfa8d26c664c350 SHA512 d246c4c2c502c93ad0a73b91b3db177bfb4f6952aa85068bc0561a25567cce0e355539446af51d4aaf27c8cc168050a1ca27e5c937ce9d2e14b9db3fad0977bb WHIRLPOOL a233bfe910febb84dcc7745f05fd4edb71638e5c139060462c1b4f8d6dfaf87b26cb97421769418d31430e54efaf3818973aa309cfded167a69a2fee3cd58b03
+DIST scratchbox-libs-1.0.20-i386.tar.gz 14369499 SHA256 0d05174b35a50539bd3537a7e47ec927f4e169a39caafc4986e3da41dff4d527 SHA512 2be9d23e80827d80bbaaf3da940d50b8f09e24ee9e7e12accd33c8b95aca927e66a6d3bc69e47a7c49efa3f9c7cdfa37aed45303eeee46958f1ae85aed02fc2b WHIRLPOOL 69de409ba555032850f51ed0a5c82087339c9a3ef1b0d450f7e8c6b29c029199e331831cc88500457f089569ec267bee2fd72bccfd7ac40e9c55636bd709500e
diff --git a/dev-embedded/scratchbox/files/scratchbox.rc b/dev-embedded/scratchbox/files/scratchbox.rc
new file mode 100644
index 000000000000..36501b324606
--- /dev/null
+++ b/dev-embedded/scratchbox/files/scratchbox.rc
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+
+depend() {
+ need localmount
+ use logger net
+}
+
+start() {
+ test -x /opt/scratchbox/sbin/sbox_ctl || \
+ eend 1 "scratchbox init script not found. Aborting" || return 1
+
+ /opt/scratchbox/sbin/sbox_ctl start
+ return $?
+}
+
+stop() {
+ test -x /opt/scratchbox/sbin/sbox_ctl || \
+ eend 1 "scratchbox init script not found. Aborting" || return 1
+
+ /opt/scratchbox/sbin/sbox_ctl stop
+ return $?
+}
+
diff --git a/dev-embedded/scratchbox/metadata.xml b/dev-embedded/scratchbox/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/scratchbox/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/scratchbox/scratchbox-1.0.19.ebuild b/dev-embedded/scratchbox/scratchbox-1.0.19.ebuild
new file mode 100644
index 000000000000..62d9a5e1f867
--- /dev/null
+++ b/dev-embedded/scratchbox/scratchbox-1.0.19.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/scratchbox-core-${PV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/scratchbox-libs-${PV}-i386.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ dodir ${TARGET_DIR}
+ # doins doesn't work with symlinks, getting "file not found" with doins
+ cp -pRP ./* "${D}/${TARGET_DIR}"
+ ln -s opt/scratchbox "${D}/scratchbox"
+
+ # scratchbox service loader
+ newinitd "${FILESDIR}/scratchbox.rc" scratchbox || die "newinitd failed"
+
+ # group already created
+ echo ${SBOX_GROUP} > "${D}/${TARGET_DIR}/.run_me_first_done"
+}
+
+pkg_preinst() {
+ einfo "Creating group sbox"
+ enewgroup "${SBOX_GROUP}"
+}
+
+pkg_postinst() {
+ "${TARGET_DIR}/sbin/sbox_configure" "no" ${SBOX_GROUP}
+
+ elog
+ elog "You can run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "to setup scratchbox users"
+ elog
+ elog "For further documentation about how to setup"
+ elog "scratchbox for your development needs have a look at"
+ elog "http://scratchbox.org/documentation/user/scratchbox-1.0/"
+ elog
+ elog "Also note that when you reboot you should run:"
+ elog "/etc/init.d/scratchbox start"
+ elog "before trying to run scratchbox."
+ elog "You can also add it to the default runlevel:"
+ elog "rc-update add scratchbox default"
+ elog
+ elog "Type /opt/scratchbox/login to start scratchbox."
+ elog
+}
+
+pkg_postrm() {
+ elog
+ elog "To remove all traces of scratchbox you will need to remove the file"
+ elog "/etc/init.d/scratchbox. Don't forget to delete the sbox group."
+ elog
+}
+
+pkg_config() {
+ if [ `id -u` != "0" ]; then
+ ewarn "Must be root to run this"
+ die "not root"
+ fi
+
+ mkdir -p "${TARGET_DIR}/users"
+
+ while true; do
+ einfo "Existing users:"
+ einfo $(ls "${TARGET_DIR}/users")
+ echo
+
+ einfo "Create new user (leaf empty to skip): "
+ read newuser
+ case "$newuser" in
+ "")
+ break;
+ ;;
+ *)
+ einfo "Note: users have to be in the '${SBOX_GROUP}' to be able to login into the scratchbox"
+ "${TARGET_DIR}/sbin/sbox_adduser" ${newuser} || die "sbox_adduser failed"
+ ;;
+ esac
+ done
+
+ einfo "Configuration finished. Make sure you run '/etc/init.d/scratchbox start' before logging in."
+}
diff --git a/dev-embedded/scratchbox/scratchbox-1.0.20.ebuild b/dev-embedded/scratchbox/scratchbox-1.0.20.ebuild
new file mode 100644
index 000000000000..62d9a5e1f867
--- /dev/null
+++ b/dev-embedded/scratchbox/scratchbox-1.0.20.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+SBOX_GROUP="sbox"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.scratchbox.org/"
+SRC_URI="http://scratchbox.org/download/files/sbox-releases/hathor/tarball/scratchbox-core-${PV}-i386.tar.gz
+ http://scratchbox.org/download/files/sbox-releases/hathor/tarball/scratchbox-libs-${PV}-i386.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping BREAKS scratchbox, it runs in a chroot and is pre-stripped when needed (bug #296294)
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND=""
+
+TARGET_DIR="/opt/scratchbox"
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ dodir ${TARGET_DIR}
+ # doins doesn't work with symlinks, getting "file not found" with doins
+ cp -pRP ./* "${D}/${TARGET_DIR}"
+ ln -s opt/scratchbox "${D}/scratchbox"
+
+ # scratchbox service loader
+ newinitd "${FILESDIR}/scratchbox.rc" scratchbox || die "newinitd failed"
+
+ # group already created
+ echo ${SBOX_GROUP} > "${D}/${TARGET_DIR}/.run_me_first_done"
+}
+
+pkg_preinst() {
+ einfo "Creating group sbox"
+ enewgroup "${SBOX_GROUP}"
+}
+
+pkg_postinst() {
+ "${TARGET_DIR}/sbin/sbox_configure" "no" ${SBOX_GROUP}
+
+ elog
+ elog "You can run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "to setup scratchbox users"
+ elog
+ elog "For further documentation about how to setup"
+ elog "scratchbox for your development needs have a look at"
+ elog "http://scratchbox.org/documentation/user/scratchbox-1.0/"
+ elog
+ elog "Also note that when you reboot you should run:"
+ elog "/etc/init.d/scratchbox start"
+ elog "before trying to run scratchbox."
+ elog "You can also add it to the default runlevel:"
+ elog "rc-update add scratchbox default"
+ elog
+ elog "Type /opt/scratchbox/login to start scratchbox."
+ elog
+}
+
+pkg_postrm() {
+ elog
+ elog "To remove all traces of scratchbox you will need to remove the file"
+ elog "/etc/init.d/scratchbox. Don't forget to delete the sbox group."
+ elog
+}
+
+pkg_config() {
+ if [ `id -u` != "0" ]; then
+ ewarn "Must be root to run this"
+ die "not root"
+ fi
+
+ mkdir -p "${TARGET_DIR}/users"
+
+ while true; do
+ einfo "Existing users:"
+ einfo $(ls "${TARGET_DIR}/users")
+ echo
+
+ einfo "Create new user (leaf empty to skip): "
+ read newuser
+ case "$newuser" in
+ "")
+ break;
+ ;;
+ *)
+ einfo "Note: users have to be in the '${SBOX_GROUP}' to be able to login into the scratchbox"
+ "${TARGET_DIR}/sbin/sbox_adduser" ${newuser} || die "sbox_adduser failed"
+ ;;
+ esac
+ done
+
+ einfo "Configuration finished. Make sure you run '/etc/init.d/scratchbox start' before logging in."
+}
diff --git a/dev-embedded/scratchbox2/Manifest b/dev-embedded/scratchbox2/Manifest
new file mode 100644
index 000000000000..cb0dc8e837d9
--- /dev/null
+++ b/dev-embedded/scratchbox2/Manifest
@@ -0,0 +1 @@
+DIST sbox2-2.0.tar.bz2 371402 SHA256 bafabe2dcce1be57b494f91bbf4a6fde3f624434fe04a1fcd74acc54a1a5ccc1 SHA512 f440c848fc08e825d6dbd978987941a71c087902de152238c31f7d529f5b2256c94aaf1085b5775aa7d66022e5bc83ff8f09bd90a55b32632d60342cd258d209 WHIRLPOOL 3904c0585b6aac38eefa0357e6d42269409deedf4861673298c250239ce2c2c96287e4e8fdc09b598a81bb6a053b9ffd38f980ea7f667bcdd8361b163c0005f4
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch
new file mode 100644
index 000000000000..eaffc158f9f2
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-as-needed.patch
@@ -0,0 +1,22 @@
+diff --git a/utils/Makefile b/utils/Makefile
+index cf9b6c4..6f715d3 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -6,7 +6,7 @@ $(D)/sb2-show: CFLAGS := $(CFLAGS) -Wall -W -Werror \
+ -I$(SRCDIR)/include
+
+ $(D)/sb2-show.o: preload/exported.h
+-$(D)/sb2-show: preload/libsb2.$(SHLIBEXT) $(D)/sb2-show.o
++$(D)/sb2-show: $(D)/sb2-show.o preload/libsb2.$(SHLIBEXT)
+ $(MKOUTPUTDIR)
+ $(P)LD
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+@@ -25,7 +25,7 @@ $(D)/sb2-interp-wrapper: CFLAGS := $(CFLAGS) -Wall -W -Werror \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
+-$(D)/sb2-interp-wrapper: preload/libsb2.$(SHLIBEXT) $(D)/sb2-interp-wrapper.o
++$(D)/sb2-interp-wrapper: $(D)/sb2-interp-wrapper.o preload/libsb2.$(SHLIBEXT)
+ $(MKOUTPUTDIR)
+ $(P)LD
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -ldl
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch
new file mode 100644
index 000000000000..32dcdd1e2e36
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-gentoo.patch
@@ -0,0 +1,88 @@
+diff --git a/Makefile b/Makefile
+index 23a13b3..c5b26cc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,7 +59,6 @@ subdirs = luaif preload utils
+
+ -include config.mak
+
+-CFLAGS += -O2 -g -Wall -W
+ CFLAGS += -I$(OBJDIR)/include -I$(SRCDIR)/include
+ CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
+ CFLAGS += -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
+@@ -145,6 +144,9 @@ install-noarch: regular
+ else install -d -m 755 $(prefix)/share/man/man1 ; \
+ fi
+ $(Q)echo "$(PACKAGE_VERSION)" > $(prefix)/share/scratchbox2/version
++ $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-show $(prefix)/bin/sb2-show
++ $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-monitor $(prefix)/bin/sb2-monitor
++ $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-interp-wrapper $(prefix)/bin/sb2-interp-wrapper
+ $(Q)install -c -m 755 $(SRCDIR)/utils/sb2 $(prefix)/bin/sb2
+ $(Q)install -c -m 755 $(SRCDIR)/utils/sb2-init $(prefix)/bin/sb2-init
+ $(Q)install -c -m 755 $(SRCDIR)/utils/sb2-config $(prefix)/bin/sb2-config
+@@ -210,10 +212,10 @@ install-noarch: regular
+ ifeq ($(MACH),x86_64)
+ install: install-multilib
+ else
+-install: do-install
++install: install-singlelib
+ endif
+
+-do-install: install-noarch
++install-singlelib: install-noarch
+ $(P)INSTALL
+ @if [ -d $(prefix)/lib ] ; \
+ then echo "$(prefix)/lib present" ; \
+@@ -221,9 +223,6 @@ do-install: install-noarch
+ fi
+ $(Q)install -d -m 755 $(prefix)/lib/libsb2
+ $(Q)install -c -m 755 $(OBJDIR)/preload/libsb2.$(SHLIBEXT) $(prefix)/lib/libsb2/libsb2.so.$(PACKAGE_VERSION)
+- $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-show $(prefix)/bin/sb2-show
+- $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-monitor $(prefix)/bin/sb2-monitor
+- $(Q)install -c -m 755 $(OBJDIR)/utils/sb2-interp-wrapper $(prefix)/bin/sb2-interp-wrapper
+ ifeq ($(OS),Linux)
+ $(Q)/sbin/ldconfig -n $(prefix)/lib/libsb2
+ endif
+@@ -232,9 +231,9 @@ multilib_prefix=$(prefix)
+
+ install-multilib: multilib
+ @$(MAKE) -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=32
+- @$(MAKE) -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. do-install
++ @$(MAKE) -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=64
+
+-do-install-multilib:
++do-install-multilib: install-noarch
+ $(P)INSTALL
+ @if [ -d $(multilib_prefix)/lib$(bitness) ] ; \
+ then echo "$(prefix)/lib$(bitness) present" ; \
+diff --git a/utils/Makefile b/utils/Makefile
+index cf9b6c4..79304fc 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -1,7 +1,7 @@
+ # beware of namespace collisions, all subdir makefiles are included
+ # into the top-level Makefile
+
+-$(D)/sb2-show: CFLAGS := $(CFLAGS) -Wall -W -Werror \
++$(D)/sb2-show: CFLAGS := $(CFLAGS) -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
+@@ -12,7 +12,7 @@ $(D)/sb2-show: preload/libsb2.$(SHLIBEXT) $(D)/sb2-show.o
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+
+-$(D)/sb2-monitor: CFLAGS := $(CFLAGS) -Wall -W -Werror \
++$(D)/sb2-monitor: CFLAGS := $(CFLAGS) -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
+@@ -21,7 +21,7 @@ $(D)/sb2-monitor: $(D)/sb2-monitor.o
+ $(P)LD
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+-$(D)/sb2-interp-wrapper: CFLAGS := $(CFLAGS) -Wall -W -Werror \
++$(D)/sb2-interp-wrapper: CFLAGS := $(CFLAGS) -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \
+ -I$(SRCDIR)/include
+
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch
new file mode 100644
index 000000000000..c5ec6aea4341
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-glibc-2.10.patch
@@ -0,0 +1,39 @@
+diff --git a/preload/interface.master b/preload/interface.master
+index 55a9481..4ba22b2 100644
+--- a/preload/interface.master
++++ b/preload/interface.master
+@@ -406,20 +406,34 @@ WRAP: int rmdir(const char *pathname) : \
+
+ #ifdef HAVE_SCANDIR
+ #ifdef HAVE_LINUX_SCANDIR
++#if _POSIX_C_SOURCE == 200809L
++WRAP: int scandir(const char *dir, struct dirent ***namelist, \
++ SCANDIR_TYPE_ARG3, \
++ int(*compar)(const struct dirent **, const struct dirent **)) : \
++ map(dir) hardcode_param(3,filter)
++#else
+ WRAP: int scandir(const char *dir, struct dirent ***namelist, \
+ SCANDIR_TYPE_ARG3, int(*compar)(const void *, const void *)) : \
+ map(dir) hardcode_param(3,filter)
+ #endif
++#endif
+ #ifdef HAVE_OSX_SCANDIR
+ WRAP: int scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(const void *, const void *)): map(dirname)
+ #endif
+ #endif
+ #ifdef HAVE_SCANDIR64
++#if _POSIX_C_SOURCE == 200809L
++WRAP: int scandir64(const char *dir, struct dirent64 ***namelist, \
++ int(*filter)(const struct dirent64 *), \
++ int(*compar)(const struct dirent64 **, const struct dirent64 **)) : \
++ map(dir)
++#else
+ WRAP: int scandir64(const char *dir, struct dirent64 ***namelist, \
+ int(*filter)(const struct dirent64 *), \
+ int(*compar)(const void *, const void *)) : \
+ map(dir)
+ #endif
++#endif
+ #ifdef HAVE_SETXATTR
+ #ifdef HAVE_LINUX_XATTRS
+ WRAP: int setxattr(const char *path, const char *name, const void *value, \
diff --git a/dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch b/dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch
new file mode 100644
index 000000000000..d4c231c74db2
--- /dev/null
+++ b/dev-embedded/scratchbox2/files/scratchbox2-2.0-use-system-lua.patch
@@ -0,0 +1,77 @@
+diff --git a/Makefile b/Makefile
+index c5b26cc..da48ea0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -60,7 +60,7 @@ subdirs = luaif preload utils
+ -include config.mak
+
+ CFLAGS += -I$(OBJDIR)/include -I$(SRCDIR)/include
+-CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
++# CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
+ CFLAGS += -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
+ CFLAGS += -DSCRATCHBOX_ROOT="$(prefix)"
+ CFLAGS += $(MACH_CFLAG)
+@@ -103,10 +103,7 @@ regular: .configure .version
+ @$(MAKE) -f $(SRCDIR)/Makefile --include-dir=$(SRCDIR) SRCDIR=$(SRCDIR) do-all
+
+ multilib:
+- @mkdir -p obj-32
+- @mkdir -p obj-64
+- @$(MAKE) MACH_CFLAG=-m32 -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. regular
+- @$(MAKE) MACH_CFLAG=-m64 -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. regular
++ @$(MAKE) MACH_CFLAG=-m64 regular
+
+
+ gcc_bins = addr2line ar as cc c++ c++filt cpp g++ gcc gcov gdb gdbtui gprof ld nm objcopy objdump ranlib rdi-stub readelf run size strings strip
+@@ -230,8 +227,7 @@ endif
+ multilib_prefix=$(prefix)
+
+ install-multilib: multilib
+- @$(MAKE) -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=32
+- @$(MAKE) -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=64
++ @$(MAKE) do-install-multilib bitness=64
+
+ do-install-multilib: install-noarch
+ $(P)INSTALL
+diff --git a/luaif/Makefile b/luaif/Makefile
+index 28e8885..5e1af6f 100644
+--- a/luaif/Makefile
++++ b/luaif/Makefile
+@@ -5,7 +5,7 @@ objs := $(D)/luaif.o $(D)/sb_log.o $(D)/paths.o $(D)/argvenvp.o
+ $(D)/sb_log.o: preload/exported.h
+
+ luaif/libluaif.a: $(objs)
+-luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(SRCDIR)/$(LUASRC) -I$(OBJDIR)/preload -I$(SRCDIR)/preload
++luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(OBJDIR)/preload -I$(SRCDIR)/preload
+ luaif/libluaif.a: override LDFLAGS := $(LDFLAGS)
+ luaif/libluaif.a: override LIBS :=
+
+@@ -24,5 +24,5 @@ luaif/liblua.a: override CFLAGS := -O2 -g -fPIC -Wall -W $(CFLAGS)
+ luaif/liblua.a: override LDFLAGS := $(LDFLAGS)
+ luaif/liblua.a: override LIBS :=
+
+-targets := $(targets) $(D)/libluaif.a $(D)/liblua.a
++targets := $(targets) $(D)/libluaif.a
+
+diff --git a/preload/Makefile b/preload/Makefile
+index 9f785ba..5094dbc 100644
+--- a/preload/Makefile
++++ b/preload/Makefile
+@@ -8,7 +8,7 @@ LIBSB2_LDFLAGS = -Wl,-soname=$(LIBSB2_SONAME) \
+ # DO NOT add any libraries that depend on libpthread to
+ # LIBSB2_LIBS or LIBS!! see the comments in luaif.c.
+
+-LIBSB2_LIBS =
++LIBSB2_LIBS = -llua
+ SHLIBEXT = so
+ else
+ LIBSB2_LIBS =
+@@ -17,7 +17,7 @@ endif
+
+
+ $(D)/libsb2.$(SHLIBEXT): $(call O,$(objs))
+-$(D)/libsb2.$(SHLIBEXT): luaif/libluaif.a luaif/liblua.a
++$(D)/libsb2.$(SHLIBEXT): luaif/libluaif.a
+ $(D)/libsb2.$(SHLIBEXT): CFLAGS := $(CFLAGS) -fPIC -Wall -W \
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS)
+ $(D)/libsb2.$(SHLIBEXT): LDFLAGS := $(LDFLAGS) $(LIBSB2_LDFLAGS)
diff --git a/dev-embedded/scratchbox2/metadata.xml b/dev-embedded/scratchbox2/metadata.xml
new file mode 100644
index 000000000000..9a4933467d05
--- /dev/null
+++ b/dev-embedded/scratchbox2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild b/dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild
new file mode 100644
index 000000000000..d986888d83d9
--- /dev/null
+++ b/dev-embedded/scratchbox2/scratchbox2-2.0-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils multilib toolchain-funcs
+
+MY_PN="${PN/cratch}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A cross-compilation toolkit designed to make embedded Linux application development easier"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/sbox2"
+SRC_URI="http://cgit.freedesktop.org/${MY_PN}/snapshot/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/lua-5.1.4"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-glibc-2.10.patch"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ # bug 296552
+ epatch "${FILESDIR}/${P}-use-system-lua.patch"
+ # bug 296550
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+
+ sed -e "s/^\(CC = \).*/\1$(tc-getCC)/" \
+ -e "s/^\(CXX = \).*/\1$(tc-getCXX)/" \
+ -e "s/^\(LD = \).*/\1$(tc-getLD)/" \
+ -i Makefile || die "sed Makefile failed"
+
+ eautoreconf
+}
+
+src_compile() {
+ emake prefix="${D}/usr" || die "emake failed"
+}
+
+src_install() {
+ emake prefix="${D}/usr" install || die "emake install failed"
+
+ # List all the multilib libdirs
+ local libdirs=
+ for libdir in $(get_all_libdirs); do
+ libdirs="${libdirs}:/usr/${libdir}/libsb2"
+ done
+
+ cat <<-EOF > "${T}/55scratchbox2"
+ LDPATH=${libdirs:1}
+ EOF
+ doenvd "${T}/55scratchbox2" || die "doenvd failed"
+
+ dodoc AUTHORS README TODO || die "dodoc failed"
+}
diff --git a/dev-embedded/sdcc/Manifest b/dev-embedded/sdcc/Manifest
new file mode 100644
index 000000000000..164686ffce62
--- /dev/null
+++ b/dev-embedded/sdcc/Manifest
@@ -0,0 +1,12 @@
+DIST sdcc-doc-2.6.0.tar.gz 1026186 SHA256 fca8592706f76ed7063652dafa8c18c79070a1b31c12b8834b7feffbcb945817 SHA512 3cffb2ac4bbe65539951b134f89449341bff9f5682ec344c244b28efea5fe96c753caa873f26c75b8fc0a19f48404ae0a43f05e41eabafe66fd0f493b4065f97 WHIRLPOOL a047bc6c74f7968e63ad5ee540ae52e5e4b0007ea253a84f1b69b7f2ed13b247227aa5d9d366753fce0d58a6c3689b8d99fd7c636070c5bbe942f0c8be01ff84
+DIST sdcc-doc-2.7.0.tar.bz2 1211113 SHA256 3a70654c9c0a0f86d9632d85f94eed946c9faf946c266fceadc5f60f590c0b70 SHA512 2ed6503551b7c9e3e674a3bf391e731c2fa838f3978761982ab1a072d47b449b73e6efe3b05967bcdfe623c2fc933503702912721b90df95dab9b332dfacad9a WHIRLPOOL 28282a9c973f5d155c57c1ea9499ce673118e23e2c877a264ceaa2a022bb0442d04d0d3cb6e94109bdfe3a47cc618c43a05f9fee1fb424438b0776793b73343d
+DIST sdcc-doc-2.8.0.tar.bz2 1363271 SHA256 b40fd15e69d89872c2982fe8a9ed2cc0415d05d0e830b4969714e0af8db21f6d SHA512 201fcb0ffb96649507dcb0489789e7a89cb30705e9eae3f40b6ce907df3464439488d1369f7d5557873e28bcd44a2af82bb3dab2f02adbf0d6ea88a711bb5d9b WHIRLPOOL cd1bd3f46b931e59423100a88fa1827b35c0c1d746be28c1b17d0d4d57f1af57de215c7f0c4dfa9e7d1d072c1a63ba5ab53a2157a925b0450ef9610d01f732aa
+DIST sdcc-doc-2.9.0.tar.bz2 1388379 SHA256 b3a210dfeb46b924cf36531a6e5a11b9d7334765a61e46688ad3f7016802d057 SHA512 c0214437dada2d2acc3590d8a82b077cd841a93da7fe76cc259adea0da67e6ea0ced14dc80c5ce05261aa5d7e2f345f8cf994dafa4e38bd404b00fd6b5b2d168 WHIRLPOOL dc6957192735f5cca92c7c25c0431c93da3b52c5084a7affd62f43a30a8b0dacb522ce5ee99e823fd4a9f3ffad1d3d93e52f37a906de6cbbd8a030899a009b62
+DIST sdcc-doc-20060502.tar.gz 1027650 SHA256 b2663f2a9a195d94990fe6a958b7f1b1b96f5f11e12a7b738613ca762f927407 SHA512 aba51493c76a019fb439fa8ff2f645bc519bdb9ded30a2871d51f2dd6eedc7315f826e28d5efed0eae731060c22b82071025cec5ae4407c5f6acdd2c18292ff2 WHIRLPOOL e1bff5315e4a6f7902beeca6db641594bbf478d0d9f74e658b3569596d912941c8e62522122b4f34a6fa8b83d4a8402adfad61cce1602bff5c35c16cdd19d124
+DIST sdcc-doc-3.5.0.tar.bz2 1000775 SHA256 97c46765d42c710351a131c03cf32be2dd3841ce2941ea0c7f01fc960c8f3df3 SHA512 43de0c19ad538b4495218b04e5ab6a886fd9945c8a82c400e9a53314547f5d6ab0529989274faecc2d954f35f8fe60f338f09f93536b62a305203d2119df597e WHIRLPOOL 68e34cb5f84b66d2582e393bdd53382164b82ce0fb610ddbe17298c7b81dd0c0b45d1be06684a9aef4debbf036bf344b49a2d991e8a36e43f7e37ec57b5586e8
+DIST sdcc-src-2.6.0.tar.gz 4229518 SHA256 6534450fef981502d5e540464fe0d4332e0f47704548354b59af90eaf290cf93 SHA512 d5802ad7804c771c25b72b5038cdc291d3e67a618fde6a9d03235954a6a133e0ecc42f26eabcc933806e54457e44efea81dc79ac03cb547556da41dec3eff1e6 WHIRLPOOL db33972831052720d75544976bdd2e9eb4c6eeef692c428ee5d82acc016bdf8a6d1d45bc27b9056ca6da604adfd5d79fdaca0769076099d36f048eff86ce52cc
+DIST sdcc-src-2.7.0.tar.bz2 3405687 SHA256 315caf8b239dfe4f922f090f33d24e822eb49a1b443d4be020056c91277ffd95 SHA512 95625aadf386f0da65f4ddb856fd7da8a333ed884e308993a0897a205561438b60d2836a60e33a849f6b6ab5dd938b822072641866596897f48fa62a4c536dd3 WHIRLPOOL f2dea2053d0ed37d6326982bd87b157344caeadfdf92774f927bffb87dff0cf126aeb108ddd5c14b31275313affabf523f6de2762559d5121f3d8c89b809ddd2
+DIST sdcc-src-2.8.0.tar.bz2 3460693 SHA256 cbb035699d8910c7ca2fa360a773504b44165e98042ed8c208fea2fe47a96557 SHA512 91f43ea275f4c27e5c475a9dbfe5e9c7d5804a530151420473cbc65a48ca15c65a6e38628e0bf927d89cd8ddb6b6030d5d65aa9cba7963e23ac18bde42951fd5 WHIRLPOOL b5fc8de30117b0b35df40c7bd9ac6392fcb6fec20ffae5444b3c4005120c5d4607df2c73a8470600f21820ced3f83ce856167c757e5f9d3c6ea4b91abb86caf7
+DIST sdcc-src-2.9.0.tar.bz2 3764926 SHA256 5f48246ea233bcfa63fafc23898584388b207caa80c5cc21485f089c87eaf68b SHA512 0703f46db590fa3248c104d5045b0807fc18898aec13a8f5f762ff4e573f3fc199590050fd82c665ae71cd586081fe88db671dcc498770d736650be0dcf32b0e WHIRLPOOL fd0c46406c1ef1abe423020f8e9dd97848757ef843210198de52bf85f83ca4e36a7f43a2e6204b584e046399af354a3cb88f5b97cf8c278b32a0f8aaee632808
+DIST sdcc-src-20060502.tar.gz 4145716 SHA256 4433dbafdf9dcc3b3528c9dbbcc1eb4c572c1ff2179286010c56fe529f90799e SHA512 0817f14871822874a3e4b5d8be68df56c7f19444c283d4cd4aa8436af6984631dd0f8322080380d227bbc8d931e6cbc84a81cfbced20cd56f2765cdaf1d552cd WHIRLPOOL a44101b2f34f44c0fe1c2e0f81e4019f354f57460b2394ff560c7b4416d429efa51660d6b574813ef3d012e42a97689154f9470f607ce488ce0c443492c8d903
+DIST sdcc-src-3.5.0.tar.bz2 10504517 SHA256 f82978d1614244b22e093402c0a4de1f688a07c807b2980126c964eb3df85fa9 SHA512 a5842945da065ab566b7e073782e92f851da48c160990d49b76ab4773fe1c14286cab399fb7f2456432e4043ee7ce07c3b149aeb103c51f85a33fdc5f8798f4e WHIRLPOOL 8d3ca19e93d89efaa6577a8901cf5099c868158b16d25ecbeaeff67e890a110426cd6876c3f11b6d20153b27e69a118e9e7aad52b4acb178cf0c5e8d669e892a
diff --git a/dev-embedded/sdcc/files/sdcc-2.8.0-flags.patch b/dev-embedded/sdcc/files/sdcc-2.8.0-flags.patch
new file mode 100644
index 000000000000..cd920e988d9b
--- /dev/null
+++ b/dev-embedded/sdcc/files/sdcc-2.8.0-flags.patch
@@ -0,0 +1,74 @@
+diff -Nadur sdcc-orig/configure.in sdcc/configure.in
+--- sdcc-orig/configure.in 2008-04-20 15:24:14.000000000 +0200
++++ sdcc/configure.in 2008-04-20 15:27:18.000000000 +0200
+@@ -320,17 +320,6 @@
+ M_OR_MM=$sdcc_cv_MM
+ AC_SUBST(M_OR_MM)
+
+-# This is the first time when CFLAGS are set/modified!!
+-adl_DD_COPT(CC, ggdb)
+-if test "$sdcc_cv_CCggdb" = "yes"; then
+- CFLAGS="-ggdb ${CFLAGS}"
+-fi
+-
+-adl_DD_COPT(CC, pipe)
+-if test "$sdcc_cv_CCpipe" = "yes"; then
+- CFLAGS="-pipe $CFLAGS"
+-fi
+-
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ # ===========================================================================
+diff -Nadur sdcc-orig/debugger/mcs51/configure.in sdcc/debugger/mcs51/configure.in
+--- sdcc-orig/debugger/mcs51/configure.in 2008-04-20 15:24:19.000000000 +0200
++++ sdcc/debugger/mcs51/configure.in 2008-04-20 15:26:53.000000000 +0200
+@@ -148,17 +148,6 @@
+ M_OR_MM=$sdcc_cv_MM
+ AC_SUBST(M_OR_MM)
+
+-# This is the first time when CFLAGS are set/modified!!
+-adl_DD_COPT(CC, ggdb)
+-if test "$sdcc_cv_CCggdb" = "yes"; then
+- CFLAGS="-ggdb ${CFLAGS}"
+-fi
+-
+-adl_DD_COPT(CC, pipe)
+-if test "$sdcc_cv_CCpipe" = "yes"; then
+- CFLAGS="-pipe $CFLAGS"
+-fi
+-
+
+ # Set standard installation paths
+ # ===========================================================================
+diff -Nadur sdcc-orig/sim/ucsim/configure.in sdcc/sim/ucsim/configure.in
+--- sdcc-orig/sim/ucsim/configure.in 2008-04-20 15:24:11.000000000 +0200
++++ sdcc/sim/ucsim/configure.in 2008-04-20 15:26:06.000000000 +0200
+@@ -514,28 +514,6 @@
+ M_OR_MM=$ucsim_cv_MM
+ AC_SUBST(M_OR_MM)
+
+-# This is the first time when CFLAGS are set/modified!!
+-
+-DD_COPT(CXX, ggdb)
+-DD_COPT(CXX, gstabs)
+-if test "$ucsim_cv_CXXgstabs" = "yes"; then
+- gopt="-gstabs+ -g3"
+-elif test "$ucsim_cv_CXXggdb" = "yes"; then
+- gopt="-ggdb -g3"
+-else
+- gopt="-g"
+-fi
+-if test "$CXXFLAGS"x = x ;then
+- CXXFLAGS="$gopt"
+-else
+- CXXFLAGS="$CXXFLAGS $gopt"
+-fi
+-
+-DD_COPT(CXX, pipe)
+-if test "$ucsim_cv_CXXpipe" = "yes"; then
+- CXXFLAGS="$CXXFLAGS -pipe"
+-fi
+-
+ PICOPT=""
+ SHAREDLIB="no"
+ DD_COPT_NO_IGNORE(CXX, fPIC)
diff --git a/dev-embedded/sdcc/files/sdcc-2.8.0-gcc44.patch b/dev-embedded/sdcc/files/sdcc-2.8.0-gcc44.patch
new file mode 100644
index 000000000000..8d0ddf045195
--- /dev/null
+++ b/dev-embedded/sdcc/files/sdcc-2.8.0-gcc44.patch
@@ -0,0 +1,9 @@
+diff -ur sdcc.orig/sim/ucsim/cmd.src/cmdlex.cc sdcc/sim/ucsim/cmd.src/cmdlex.cc
+--- sdcc.orig/sim/ucsim/cmd.src/cmdlex.cc 2004-07-16 19:32:30.000000000 +0300
++++ sdcc/sim/ucsim/cmd.src/cmdlex.cc 2009-08-10 11:09:58.000000000 +0300
+@@ -1,3 +1,5 @@
++#include <stdio.h>
++
+ #line 2 "cmdlex.cc"
+
+ #line 4 "cmdlex.cc"
diff --git a/dev-embedded/sdcc/files/sdcc-2.9.0-build.patch b/dev-embedded/sdcc/files/sdcc-2.9.0-build.patch
new file mode 100644
index 000000000000..b944b00d83a5
--- /dev/null
+++ b/dev-embedded/sdcc/files/sdcc-2.9.0-build.patch
@@ -0,0 +1,51 @@
+fix parallel build issues
+
+--- sdcc/device/lib/Makefile.in
++++ sdcc/device/lib/Makefile.in
+@@ -347,37 +347,21 @@
+ cp -f $(PORT)/bin/*.* $(SDCCPORTDIR); \
+ fi
+
+-$(LIB_FILES): $(OBJECTS_FLOAT) $(OBJECTS_INT) $(OBJECTS_LONG) $(OBJECTS_SDCC)
+ ifeq ($(LIB_TYPE), SDCCLIB)
+- ../../bin/sdcclib -a $(SDCCPORTDIR)/libfloat.lib $(OBJECTS_FLOAT)
+- ../../bin/sdcclib -a $(SDCCPORTDIR)/libint.lib $(OBJECTS_INT)
+- ../../bin/sdcclib -a $(SDCCPORTDIR)/liblong.lib $(OBJECTS_LONG)
+- ../../bin/sdcclib -a $(SDCCPORTDIR)/libsdcc.lib $(OBJECTS_SDCC)
++mklib = ../../bin/sdcclib -a $@ $^
+ else ifeq ($(LIB_TYPE), AR)
+- ar -Scq $(SDCCPORTDIR)/libfloat.lib $(OBJECTS_FLOAT)
+- ar -Scq $(SDCCPORTDIR)/libint.lib $(OBJECTS_INT)
+- ar -Scq $(SDCCPORTDIR)/liblong.lib $(OBJECTS_LONG)
+- ar -Scq $(SDCCPORTDIR)/libsdcc.lib $(OBJECTS_SDCC)
++mklib = ar -Scq $@ $^
+ else ifeq ($(LIB_TYPE), RANLIB)
+- ar -Scq $(SDCCPORTDIR)/libfloat.lib $(OBJECTS_FLOAT); $(top_builddir)/bin/asranlib $(SDCCPORTDIR)/libfloat.lib
+- ar -Scq $(SDCCPORTDIR)/libint.lib $(OBJECTS_INT); $(top_builddir)/bin/asranlib $(SDCCPORTDIR)/libint.lib
+- ar -Scq $(SDCCPORTDIR)/liblong.lib $(OBJECTS_LONG); $(top_builddir)/bin/asranlib $(SDCCPORTDIR)/liblong.lib
+- ar -Scq $(SDCCPORTDIR)/libsdcc.lib $(OBJECTS_SDCC); $(top_builddir)/bin/asranlib $(SDCCPORTDIR)/libsdcc.lib
++mklib = ar -Scq $@ $^ && $(top_builddir)/bin/asranlib $@
+ else
+- rm -f $(SDCCPORTDIR)/libfloat.lib
+- for i in $(notdir $(basename $(OBJECTS_FLOAT))); do echo $$i >> $(SDCCPORTDIR)/libfloat.lib; done
+- cp $(OBJECTS_FLOAT) $(SDCCPORTDIR)
+- rm -f $(SDCCPORTDIR)/libint.lib
+- for i in $(notdir $(basename $(OBJECTS_INT))); do echo $$i >> $(SDCCPORTDIR)/libint.lib; done
+- cp $(OBJECTS_INT) $(SDCCPORTDIR)
+- rm -f $(SDCCPORTDIR)/liblong.lib
+- for i in $(notdir $(basename $(OBJECTS_LONG))); do echo $$i >> $(SDCCPORTDIR)/liblong.lib; done
+- cp $(OBJECTS_LONG) $(SDCCPORTDIR)
+- rm -f $(SDCCPORTDIR)/libsdcc.lib
+- for i in $(notdir $(basename $(OBJECTS_SDCC))); do echo $$i >> $(SDCCPORTDIR)/libsdcc.lib; done
+- cp $(OBJECTS_SDCC) $(SDCCPORTDIR)
++mklib = for i in $(notdir $(basename $^)); do echo $$i; done >> $@; cp $^ $(SDCCPORTDIR)
+ endif
+
++$(SDCCPORTDIR)/libfloat.lib: $(OBJECTS_FLOAT); $(mklib)
++$(SDCCPORTDIR)/libint.lib: $(OBJECTS_INT); $(mklib)
++$(SDCCPORTDIR)/liblong.lib: $(OBJECTS_LONG); $(mklib)
++$(SDCCPORTDIR)/libsdcc.lib: $(OBJECTS_SDCC); $(mklib)
++
+ clean_intermediate:
+ rm -f $(SDCCPORTDIR)/*.lst $(SDCCPORTDIR)/*.sym
+
diff --git a/dev-embedded/sdcc/files/sdcc-2.9.0-gcc44.patch b/dev-embedded/sdcc/files/sdcc-2.9.0-gcc44.patch
new file mode 100644
index 000000000000..fb4ac7918c51
--- /dev/null
+++ b/dev-embedded/sdcc/files/sdcc-2.9.0-gcc44.patch
@@ -0,0 +1,15 @@
+like fix already in upstream
+
+* sim/ucsim/cmd.src/cmdlex.cc: regenerated,
+ fix for parch #3038644: Fix for GCC-4.4 compile error
+
+--- trunk/sdcc/sim/ucsim/cmd.src/cmdlex.cc 2010/08/04 15:21:39 5910
++++ trunk/sdcc/sim/ucsim/cmd.src/cmdlex.cc 2010/08/04 17:17:09 5911
+@@ -85,6 +85,7 @@
+ #include <errno.h>
+ #include <cstdlib>
+ #include <cstring>
++#include <cstdio>
+ /* end standard C++ headers. */
+
+ #ifdef __cplusplus
diff --git a/dev-embedded/sdcc/files/sdcc-2.9.0-getline.patch b/dev-embedded/sdcc/files/sdcc-2.9.0-getline.patch
new file mode 100644
index 000000000000..f7ca6237cf57
--- /dev/null
+++ b/dev-embedded/sdcc/files/sdcc-2.9.0-getline.patch
@@ -0,0 +1,16 @@
+upstream has reworked their code, so just do a minimal hack for the older ver
+
+http://bugs.gentoo.org/270621
+
+--- sdcc/as/link/getline.h
++++ sdcc/as/link/getline.h
+@@ -30,6 +30,9 @@
+
+ #include <stdio.h>
+
++#undef getline /* just in case */
++#define getline sdcc_getline
++
+ #ifdef __cplusplus
+ extern "C"
+ {
diff --git a/dev-embedded/sdcc/files/sdcc-2.9.0-headers.patch b/dev-embedded/sdcc/files/sdcc-2.9.0-headers.patch
new file mode 100644
index 000000000000..58d10299aa8f
--- /dev/null
+++ b/dev-embedded/sdcc/files/sdcc-2.9.0-headers.patch
@@ -0,0 +1,209 @@
+fix from upstream for implicit decls
+
+--- trunk/sdcc/debugger/mcs51/sdcdb.c 2009/09/20 11:50:19 5517
++++ trunk/sdcc/debugger/mcs51/sdcdb.c 2010/04/14 16:18:37 5813
+@@ -34,6 +34,10 @@
+ #include <readline/readline.h>
+ #include <readline/history.h>
+ #endif /* HAVE_LIBREADLINE */
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#include <sys/wait.h>
+
+ #ifdef SDCDB_DEBUG
+ int sdcdbDebug = 0;
+@@ -1609,7 +1609,7 @@ static void parseCmdLine (int argc, char **argv)
+ }
+
+ if (strncmp(argv[i],"-cd=",4) == 0) {
+- chdir(argv[i][4]);
++ chdir(&argv[i][4]);
+ continue;
+ }
+
+--- trunk/sdcc/debugger/mcs51/config.h.in
++++ trunk/sdcc/debugger/mcs51/config.h.in
+@@ -15,6 +15,10 @@
+
+ #undef HAVE_LIBREADLINE
+
++#undef HAVE_UNISTD_H
++
++#undef HAVE_SYS_WAIT_H
++
+ #endif
+
+ /* End of config.h */
+
+fix from upstream for collision between "link" in unistd.h and local "link"
+
+--- trunk/sdcc/debugger/mcs51/symtab.h 2006/09/16 14:10:20 4379
++++ trunk/sdcc/debugger/mcs51/symtab.h 2010/04/14 16:18:37 5813
+@@ -106,13 +106,13 @@
+ short num_elem; /* # of elems if type==array */
+ short ptr_const :1; /* pointer is constant */
+ short ptr_volatile:1; /* pointer is volatile */
+- struct link *tspec; /* pointer type specifier */
++ struct st_link *tspec; /* pointer type specifier */
+ } declarator ;
+
+ #define DECLARATOR 0
+ #define SPECIFIER 1
+
+-typedef struct link {
++typedef struct st_link {
+ unsigned class : 1 ; /* DECLARATOR or SPECIFIER */
+ unsigned tdef : 1 ; /* current link created by */
+ /* typedef if this flag is set*/
+@@ -121,8 +121,8 @@
+ declarator d ; /* if CLASS == DECLARATOR */
+ } select ;
+
+- struct link *next ; /* next element on the chain */
+-} link ;
++ struct st_link *next ; /* next element on the chain */
++} st_link ;
+
+ typedef struct symbol {
+ char *name ;
+@@ -136,8 +136,8 @@
+ unsigned addr ; /* address if the symbol */
+ unsigned eaddr ; /* end address for functions */
+ char addr_type ; /* which address space */
+- link *type ; /* start of type chain */
+- link *etype ; /* end of type chain */
++ st_link *type ; /* start of type chain */
++ st_link *etype ; /* end of type chain */
+ char scopetype ; /* 'G' global, 'F' - file, 'L' local */
+ char *sname ; /* if 'F' or 'L' then scope name */
+ char *rname ; /* real name i.e. mangled beyond recognition */
+@@ -242,6 +242,6 @@
+ DEFSETFUNC(moduleWithName);
+ DEFSETFUNC(moduleWithCName);
+ DEFSETFUNC(moduleWithAsmName);
+-unsigned int getSize (link *);
++unsigned int getSize (st_link *);
+
+ #endif
+
+--- a/sdcc/debugger/mcs51/symtab.c
++++ b/sdcc/debugger/mcs51/symtab.c
+@@ -31,7 +31,7 @@ DEFSETFUNC(symWithRName);
+ /*------------------------------------------------------------------*/
+ /* getSize - returns size of a type chain in bits */
+ /*------------------------------------------------------------------*/
+-unsigned int getSize ( link *p )
++unsigned int getSize ( st_link *p )
+ {
+ /* if nothing return 0 */
+ if ( ! p )
+@@ -127,8 +127,8 @@ static char *parseTypeInfo (symbol *sym, char *s)
+ /* bp now points to '}' ... go past it */
+ s = ++bp;
+ while (*s != ')') { /* till we reach the end */
+- link *type;
+- type = Safe_calloc(1,sizeof(link));
++ st_link *type;
++ type = Safe_calloc(1,sizeof(st_link));
+ if (*s == ',') s++;
+
+ /* is a declarator */
+--- a/sdcc/debugger/mcs51/cmd.c
++++ b/sdcc/debugger/mcs51/cmd.c
+@@ -327,8 +327,8 @@ static char *warranty=
+ "POSSIBILITY OF SUCH DAMAGES.\n";
+ #endif
+
+-static void printTypeInfo(link *);
+-static void printValAggregates (symbol *,link *,char,unsigned int,int);
++static void printTypeInfo(st_link *);
++static void printValAggregates (symbol *,st_link *,char,unsigned int,int);
+ static int printOrSetSymValue (symbol *sym, context *cctxt,
+ int flg, int dnum, int fmt,
+ char *rs, char *val, char cmp);
+@@ -2323,7 +2323,7 @@ int cmdListSrc (char *s, context *cctxt)
+ return 0;
+ }
+
+-static unsigned long getValBasic(symbol *sym, link *type, char *val)
++static unsigned long getValBasic(symbol *sym, st_link *type, char *val)
+ {
+ char *s;
+ union
+@@ -2347,7 +2347,7 @@ static unsigned long getValBasic(symbol *sym, link *type, char *val)
+ {
+ if (IS_INTEGRAL(type))
+ {
+- link *etype;
++ st_link *etype;
+ if ( type->next )
+ etype = type->next;
+ else
+@@ -2460,7 +2460,7 @@ static void printFmtInteger(char *deffmt,int fmt, long val,
+ /*-----------------------------------------------------------------*/
+ /* printValBasic - print value of basic types */
+ /*-----------------------------------------------------------------*/
+-static void printValBasic(symbol *sym, link *type,
++static void printValBasic(symbol *sym, st_link *type,
+ char mem, unsigned addr,int size, int fmt)
+ {
+ union {
+@@ -2484,7 +2484,7 @@ static void printValBasic(symbol *sym, link *type,
+ else
+ if (IS_INTEGRAL(type))
+ {
+- link *etype;
++ st_link *etype;
+ if ( type->next )
+ etype = type->next;
+ else
+@@ -2534,10 +2534,10 @@ static void printValFunc (symbol *sym, int fmt)
+ /*-----------------------------------------------------------------*/
+ /* printArrayValue - will print the values of array elements */
+ /*-----------------------------------------------------------------*/
+-static void printArrayValue (symbol *sym, link *type,
++static void printArrayValue (symbol *sym, st_link *type,
+ char space, unsigned int addr, int fmt)
+ {
+- link *elem_type = type->next;
++ st_link *elem_type = type->next;
+ int i;
+
+ fprintf(stdout,"{");
+@@ -2558,7 +2558,7 @@ static void printArrayValue (symbol *sym, link *type,
+ /*-----------------------------------------------------------------*/
+ /* printStructValue - prints structures elements */
+ /*-----------------------------------------------------------------*/
+-static void printStructValue (symbol *sym, link *type,
++static void printStructValue (symbol *sym, st_link *type,
+ char space, unsigned int addr, int fmt)
+ {
+ symbol *fields = SPEC_STRUCT(type)->fields;
+@@ -2581,7 +2581,7 @@ static void printStructValue (symbol *sym, link *type,
+ /*-----------------------------------------------------------------*/
+ /* printValAggregates - print value of aggregates */
+ /*-----------------------------------------------------------------*/
+-static void printValAggregates (symbol *sym, link *type,
++static void printValAggregates (symbol *sym, st_link *type,
+ char space,unsigned int addr, int fmt)
+ {
+
+@@ -2606,7 +2606,7 @@ static int printOrSetSymValue (symbol *sym, context *cctxt,
+ static char fmtChar[] = " todx ";
+ static int stack = 1;
+ symbol *fields;
+- link *type;
++ st_link *type;
+ unsigned int addr;
+ int size, n;
+ char *s, *s2;
+@@ -2808,7 +2808,7 @@ static void printStructInfo (structdef *sdef)
+ /*-----------------------------------------------------------------*/
+ /* printTypeInfo - print out the type information */
+ /*-----------------------------------------------------------------*/
+-static void printTypeInfo(link *p)
++static void printTypeInfo(st_link *p)
+ {
+ if (!p)
+ return ;
diff --git a/dev-embedded/sdcc/metadata.xml b/dev-embedded/sdcc/metadata.xml
new file mode 100644
index 000000000000..e52e1f4e24a9
--- /dev/null
+++ b/dev-embedded/sdcc/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <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-2.5.0_p20060502.ebuild b/dev-embedded/sdcc/sdcc-2.5.0_p20060502.ebuild
new file mode 100644
index 000000000000..1b0b1a561b93
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-2.5.0_p20060502.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_PV=${PV/*_p/}
+DESCRIPTION="Small device C compiler (for various microprocessors)"
+HOMEPAGE="http://sdcc.sourceforge.net/"
+SRC_URI="http://sdcc.sourceforge.net/snapshots/sdcc-src/${PN}-src-${MY_PV}.tar.gz
+ doc? ( http://sdcc.sourceforge.net/snapshots/docs/${PN}-doc-${MY_PV}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+
+DEPEND=">=dev-embedded/gputils-0.13.2
+ dev-libs/boehm-gc"
+RDEPEND="!dev-embedded/sdcc-svn
+ !dev-embedded/sdcc-svn"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix conflicting variable names between Gentoo and sdcc
+ find ./ -type f -exec sed -i s:PORTDIR:PORTINGDIR:g {} \; || die "sed failed"
+ find device/lib/pic*/ -type f -exec sed -i s:ARCH:SDCCARCH:g {} \; || die "sed failed"
+ find device/lib/pic/libdev/ -type f -exec sed -i s:CFLAGS:SDCCFLAGS:g {} \; || die "sed failed"
+
+ # --as-needed fix :
+ sed -i -e "s/= @CURSES_LIBS@ @LIBS@/= @CURSES_LIBS@ @LIBS@ -lcurses/" sim/ucsim/gui.src/serio.src/Makefile.in || die "sed failed"
+}
+
+src_compile() {
+ econf --enable-libgc docdir=/usr/share/doc/${PF} || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed"
+ dodoc ChangeLog
+ if use doc ; then
+ cp -pPR "${WORKDIR}"/doc/* "${D}"/usr/share/doc/${PF}/
+ fi
+ find "${D}"/usr/share/doc/${PF}/ -name *.txt -exec gzip -f -9 {} \;
+ find "${D}"/usr/share/doc/${PF}/ -name */*.txt -exec gzip -f -9 {} \;
+}
diff --git a/dev-embedded/sdcc/sdcc-2.6.0.ebuild b/dev-embedded/sdcc/sdcc-2.6.0.ebuild
new file mode 100644
index 000000000000..018af95e747f
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-2.6.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Small device C compiler (for various microprocessors)"
+HOMEPAGE="http://sdcc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.gz
+ doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+DEPEND=">=dev-embedded/gputils-0.13.2
+ dev-libs/boehm-gc"
+RDEPEND="!dev-embedded/sdcc-svn"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix conflicting variable names between Gentoo and sdcc
+ find ./ -type f -exec sed -i s:PORTDIR:PORTINGDIR:g {} \; || die "sed failed"
+ find device/lib/pic*/ -type f -exec sed -i s:ARCH:SDCCARCH:g {} \; || die "sed failed"
+ find device/lib/pic/libdev/ -type f -exec sed -i s:CFLAGS:SDCCFLAGS:g {} \; || die "sed failed"
+
+ # --as-needed fix :
+ sed -i -e "s/= @CURSES_LIBS@ @LIBS@/= @CURSES_LIBS@ @LIBS@ -lcurses/" sim/ucsim/gui.src/serio.src/Makefile.in || die "sed failed"
+}
+
+src_compile() {
+ econf --enable-libgc docdir=/usr/share/doc/${PF} || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed"
+ dodoc ChangeLog
+ if use doc ; then
+ cp -pPR "${WORKDIR}"/doc/* "${D}"/usr/share/doc/${PF}/
+ fi
+ find "${D}"/usr/share/doc/${PF}/ -name *.txt -exec gzip -f -9 {} \;
+ find "${D}"/usr/share/doc/${PF}/ -name */*.txt -exec gzip -f -9 {} \;
+}
diff --git a/dev-embedded/sdcc/sdcc-2.7.0.ebuild b/dev-embedded/sdcc/sdcc-2.7.0.ebuild
new file mode 100644
index 000000000000..f7c0e16ce2dd
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-2.7.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Small device C compiler (for various microprocessors)"
+HOMEPAGE="http://sdcc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
+ doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+DEPEND=">=dev-embedded/gputils-0.13.2
+ dev-libs/boehm-gc"
+RDEPEND="!dev-embedded/sdcc-svn"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix conflicting variable names between Gentoo and sdcc
+ find ./ -type f -exec sed -i s:PORTDIR:PORTINGDIR:g {} \; || die "sed failed"
+ find device/lib/pic*/ -type f -exec sed -i s:ARCH:SDCCARCH:g {} \; || die "sed failed"
+ find device/lib/pic/libdev/ -type f -exec sed -i s:CFLAGS:SDCCFLAGS:g {} \; || die "sed failed"
+
+ # --as-needed fix :
+ sed -i -e "s/= @CURSES_LIBS@ @LIBS@/= @CURSES_LIBS@ @LIBS@ -lcurses/" sim/ucsim/gui.src/serio.src/Makefile.in || die "sed failed"
+}
+
+src_compile() {
+ econf --enable-libgc docdir=/usr/share/doc/${PF} || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed"
+ dodoc ChangeLog
+ if use doc ; then
+ cp -pPR "${WORKDIR}"/doc/* "${D}"/usr/share/doc/${PF}/
+ fi
+ find "${D}"/usr/share/doc/${PF}/ -name *.txt -exec gzip -f -9 {} \;
+ find "${D}"/usr/share/doc/${PF}/ -name */*.txt -exec gzip -f -9 {} \;
+}
diff --git a/dev-embedded/sdcc/sdcc-2.8.0.ebuild b/dev-embedded/sdcc/sdcc-2.8.0.ebuild
new file mode 100644
index 000000000000..a7cef4183d8f
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-2.8.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools
+
+DESCRIPTION="Small device C compiler (for various microprocessors)"
+HOMEPAGE="http://sdcc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
+ doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="boehm-gc doc"
+
+DEPEND=">=dev-embedded/gputils-0.13.2
+ boehm-gc? ( dev-libs/boehm-gc )"
+RDEPEND="!dev-embedded/sdcc-svn"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix conflicting variable names between Gentoo and sdcc
+ find ./ -type f -exec sed -i s:PORTDIR:PORTINGDIR:g {} \; || die "sed failed"
+ find device/lib/pic*/ -type f -exec sed -i s:ARCH:SDCCARCH:g {} \; || die "sed failed"
+ find device/lib/pic/libdev/ -type f -exec sed -i s:CFLAGS:SDCCFLAGS:g {} \; || die "sed failed"
+
+ # Fix automagic C{,XX}FLAGS
+ epatch "${FILESDIR}"/${P}-flags.patch
+ epatch "${FILESDIR}"/${P}-gcc44.patch
+
+ # We'll install doc manually
+ sed -i -e '/SDCC_DOC/d' Makefile.in || die "sed failed"
+ sed -i -e 's/all install-doc/all/' as/Makefile.in || die "sed failed"
+ sed -i -e 's/ doc//' sim/ucsim/packages_in.mk || die "sed failed"
+
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ $(use_enable boehm-gc libgc) \
+ --disable-doc \
+ || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed"
+
+ insinto /usr/share/doc/${PF}
+ if use doc ; then
+ cd "${WORKDIR}"/doc
+ dohtml -r *.html ucsim
+ rm -rf *.html ucsim
+ dohtml as/asxhtm.html
+ rm -f as/asxhtm.html
+ rm -f INSTALL.txt
+ else
+ dohtml as/doc/asxhtm.html
+ rm -f as/doc/asxhtm.html
+ mv as/doc as/as || die "Failed to rename as/doc"
+ doins -r as/as
+ mv sim/ucsim/doc sim/ucsim/ucsim || die "Failed to rename sim/ucsim/doc"
+ dohtml -r sim/ucsim/ucsim
+ rm -f INSTALL.txt Makefile* *.mk
+ cd doc
+ fi
+ doins -r *
+ prepalldocs
+}
diff --git a/dev-embedded/sdcc/sdcc-2.9.0.ebuild b/dev-embedded/sdcc/sdcc-2.9.0.ebuild
new file mode 100644
index 000000000000..1a34c20e9937
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-2.9.0.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc"
+ inherit subversion autotools
+ 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"
+SLOT="0"
+IUSE="+boehm-gc doc"
+RESTRICT="strip"
+
+RDEPEND="sys-libs/ncurses
+ sys-libs/readline
+ >=dev-embedded/gputils-0.13.7
+ boehm-gc? ( dev-libs/boehm-gc )
+ !dev-embedded/sdcc-svn"
+DEPEND="${RDEPEND}"
+if docs_compile ; then
+ DEPEND+="
+ doc? (
+ >=app-office/lyx-1.3.4
+ dev-tex/latex2html
+ )"
+fi
+
+S=${WORKDIR}/${PN}
+
+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
+
+ epatch "${FILESDIR}"/${P}-gcc44.patch
+ epatch "${FILESDIR}"/${P}-getline.patch
+ epatch "${FILESDIR}"/${P}-headers.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+
+ # We'll install doc manually
+ sed -i -e '/SDCC_DOC/d' Makefile.in || die
+ sed -i -e 's/all install-doc/all/' as/Makefile.in || die
+ sed -i -e 's/ doc//' sim/ucsim/packages_in.mk || die
+
+ [[ ${PV} == "9999" ]] && eautoreconf
+}
+
+src_configure() {
+ ac_cv_prog_STRIP=true \
+ econf \
+ $(use_enable boehm-gc libgc) \
+ $(docs_compile && use_enable doc || echo --disable-doc)
+}
+
+fsrc_compile() {
+ emake || die
+ if docs_compile && use doc ; then
+ cd doc
+ local d
+ for d in cdbfileformat sdccman test_suite_spec ; do
+ lyx -e html ${d} || die
+ done
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc doc/*.txt doc/*/*.txt
+ find "${D}" -name .deps -exec rm -rf {} +
+
+ 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-3.5.0.ebuild b/dev-embedded/sdcc/sdcc-3.5.0.ebuild
new file mode 100644
index 000000000000..aefd1bc03364
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-3.5.0.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://sdcc.svn.sourceforge.net/svnroot/sdcc/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
+
+ # 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..faffcf034d04
--- /dev/null
+++ b/dev-embedded/sdcc/sdcc-9999.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://sdcc.svn.sourceforge.net/svnroot/sdcc/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"
+SLOT="0"
+IUSE="+boehm-gc doc"
+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
+
+S=${WORKDIR}/${PN}
+
+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
+
+ # We'll install doc manually
+ sed -i -e '/SDCC_DOC/d' Makefile.in || die
+ sed -i -e 's/ doc//' sim/ucsim/packages_in.mk || die
+
+ # Make sure timestamps don't get messed up.
+ [[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} +
+
+ # workaround parallel build issues with lyx
+ mkdir -p "${HOME}"/.lyx
+}
+
+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 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/sgpp-lite-arm-eabi-bin/Manifest b/dev-embedded/sgpp-lite-arm-eabi-bin/Manifest
new file mode 100644
index 000000000000..37a300562653
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-eabi-bin/Manifest
@@ -0,0 +1 @@
+DIST arm-2010.09-51-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 36851462 SHA256 d9d2bfa9eeeab3c6da808ca4ada18b75ddb29a62c3ac73016c89e0b8ef8116ed SHA512 0de319596f83e62be9a786ebf02fb2830d0ea97acb1f01ba4f7f99f4aadfa12731bd1121bc885a4d97a948bc8131b66c91c62614b4ea8223553bf9a60a551002 WHIRLPOOL c4779887fc6fcbe11ba514a4533287ff13bb1b75e6b420db2836443684027bb3c694ccb5b40c72eaccff06542a623854bfbbc11418c87cfc5490a07f7c7ed6ba
diff --git a/dev-embedded/sgpp-lite-arm-eabi-bin/metadata.xml b/dev-embedded/sgpp-lite-arm-eabi-bin/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-eabi-bin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/sgpp-lite-arm-eabi-bin/sgpp-lite-arm-eabi-bin-2010.09.51.ebuild b/dev-embedded/sgpp-lite-arm-eabi-bin/sgpp-lite-arm-eabi-bin-2010.09.51.ebuild
new file mode 100644
index 000000000000..4b9778ed3de1
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-eabi-bin/sgpp-lite-arm-eabi-bin-2010.09.51.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CPU="arm"
+TARGET="arm-none-eabi"
+HOST="i686-pc-linux-gnu"
+MY_P="${CPU}-${PV%.*}-${PV##*.}-${TARGET}-${HOST}"
+
+DESCRIPTION="regular, validated releases of the GNU Toolchain for ${CPU} processors by CodeSourcery"
+HOMEPAGE="http://www.codesourcery.com/sgpp/lite/${CPU}"
+SRC_URI="http://www.codesourcery.com/public/gnu_toolchain/${TARGET}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+RESTRICT="strip" # package is already stripped, and contains target bins
+QA_EXECSTACK="opt/${P}/*"
+
+RDEPEND="sys-libs/glibc"
+DEPEND=""
+
+S=${WORKDIR}/${CPU}-${PV%.*}
+
+src_install() {
+ local d="/opt/${P}"
+ dodir ${d}
+ cp -pPR * "${D}"/${d}/ || die
+
+ pushd "${D}"/${d}/share/doc/${CPU}-${TARGET} >/dev/null
+ if use doc ; then
+ dohtml -r html/* || die
+ dodoc pdf/* || die
+ fi
+ rm -rf html pdf
+ rm LICENSE.txt man/man7/{fsf-funding,gpl,gfdl}.7 || die
+ mv man info ../..
+ popd >/dev/null
+ find "${D}" -depth -type d -empty -delete
+
+ cat <<-EOF > "${T}"/15${P}
+ PATH=${d}/bin
+ MANPATH=${d}/share/man
+ INFOPATH=${d}/share/info
+ EOF
+ doenvd "${T}"/15${P} || die
+}
diff --git a/dev-embedded/sgpp-lite-arm-linux-bin/Manifest b/dev-embedded/sgpp-lite-arm-linux-bin/Manifest
new file mode 100644
index 000000000000..48bbc0959f89
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-linux-bin/Manifest
@@ -0,0 +1 @@
+DIST arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 88213477 SHA256 60a3c3fd62424ee41cc54e9eaf96eb4ee4360756c4f26e63224bdd2575ec73f6 SHA512 1c85b321c79e424d4f2687ec96dbde6b3f3e62cc15ff9f4d81f01391e39821356542bde244c623a40c449ea1198fefacf844574d6df9342f08fc1d4bd1ff834c WHIRLPOOL 0b50aab67b80565272912b34eca8294da8665fa8071c21458d755012185520a8aee1aa6a22f261078ae4a1de6a7084c418d92fee16185437f2d08d42807fbf63
diff --git a/dev-embedded/sgpp-lite-arm-linux-bin/metadata.xml b/dev-embedded/sgpp-lite-arm-linux-bin/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-linux-bin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/sgpp-lite-arm-linux-bin/sgpp-lite-arm-linux-bin-2010.09.50.ebuild b/dev-embedded/sgpp-lite-arm-linux-bin/sgpp-lite-arm-linux-bin-2010.09.50.ebuild
new file mode 100644
index 000000000000..4e98fe06f8df
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-linux-bin/sgpp-lite-arm-linux-bin-2010.09.50.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CPU="arm"
+TARGET="arm-none-linux-gnueabi"
+HOST="i686-pc-linux-gnu"
+MY_P="${CPU}-${PV%.*}-${PV##*.}-${TARGET}-${HOST}"
+
+DESCRIPTION="regular, validated releases of the GNU Toolchain for ${CPU} processors by CodeSourcery"
+HOMEPAGE="http://www.codesourcery.com/sgpp/lite/${CPU}"
+SRC_URI="http://www.codesourcery.com/public/gnu_toolchain/${TARGET}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+RESTRICT="strip" # package is already stripped, and contains target bins
+QA_EXECSTACK="opt/${P}/*"
+
+RDEPEND="sys-libs/glibc"
+DEPEND=""
+
+S=${WORKDIR}/${CPU}-${PV%.*}
+
+src_install() {
+ local d="/opt/${P}"
+ dodir ${d}
+ cp -pPR * "${D}"/${d}/ || die
+
+ pushd "${D}"/${d}/share/doc/${CPU}-${TARGET} >/dev/null
+ if use doc ; then
+ dohtml -r html/* || die
+ dodoc pdf/* || die
+ fi
+ rm -rf html pdf
+ rm LICENSE.txt man/man7/{fsf-funding,gpl,gfdl}.7 || die
+ mv man info ../..
+ popd >/dev/null
+ find "${D}" -depth -type d -empty -delete
+
+ cat <<-EOF > "${T}"/15${P}
+ PATH=${d}/bin
+ MANPATH=${d}/share/man
+ INFOPATH=${d}/share/info
+ EOF
+ doenvd "${T}"/15${P} || die
+}
diff --git a/dev-embedded/sgpp-lite-arm-uclinux-bin/Manifest b/dev-embedded/sgpp-lite-arm-uclinux-bin/Manifest
new file mode 100644
index 000000000000..33ba370fc7f3
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-uclinux-bin/Manifest
@@ -0,0 +1 @@
+DIST arm-2010.09-58-arm-uclinuxeabi-i686-pc-linux-gnu.tar.bz2 37524234 SHA256 4fa677ecc148524cf674b91856fc8e480c0e751484e7b2e9433306a17828034f SHA512 57e8465b2d8f8da903982e5efe4bf7d356b505663a479830955e7f6bc4e2e69fdd841e4bc29f5b96b8d5854d34dbf694d80da7820e7f10935244f5d231d81345 WHIRLPOOL 11021dc235bbd79c8e9350cf5941620e128ac9bbe9d74b9735f5244b076ed0081823deb762ccac9c0a042beabbf0e3efc9fa769567f1d44b567d5df0503f06c1
diff --git a/dev-embedded/sgpp-lite-arm-uclinux-bin/metadata.xml b/dev-embedded/sgpp-lite-arm-uclinux-bin/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-uclinux-bin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/sgpp-lite-arm-uclinux-bin/sgpp-lite-arm-uclinux-bin-2010.09.58.ebuild b/dev-embedded/sgpp-lite-arm-uclinux-bin/sgpp-lite-arm-uclinux-bin-2010.09.58.ebuild
new file mode 100644
index 000000000000..41da6ccc7085
--- /dev/null
+++ b/dev-embedded/sgpp-lite-arm-uclinux-bin/sgpp-lite-arm-uclinux-bin-2010.09.58.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CPU="arm"
+TARGET="arm-uclinuxeabi"
+HOST="i686-pc-linux-gnu"
+MY_P="${CPU}-${PV%.*}-${PV##*.}-${TARGET}-${HOST}"
+
+DESCRIPTION="regular, validated releases of the GNU Toolchain for ${CPU} processors by CodeSourcery"
+HOMEPAGE="http://www.codesourcery.com/sgpp/lite/${CPU}"
+SRC_URI="http://www.codesourcery.com/public/gnu_toolchain/${TARGET}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+RESTRICT="strip" # package is already stripped, and contains target bins
+QA_EXECSTACK="opt/${P}/*"
+
+RDEPEND="sys-libs/glibc"
+DEPEND=""
+
+S=${WORKDIR}/${CPU}-${PV%.*}
+
+src_install() {
+ local d="/opt/${P}"
+ dodir ${d}
+ cp -pPR * "${D}"/${d}/ || die
+
+ pushd "${D}"/${d}/share/doc/${CPU}-${TARGET} >/dev/null
+ if use doc ; then
+ dohtml -r html/* || die
+ dodoc pdf/* || die
+ fi
+ rm -rf html pdf
+ rm LICENSE.txt man/man7/{fsf-funding,gpl,gfdl}.7 || die
+ mv man info ../..
+ popd >/dev/null
+ find "${D}" -depth -type d -empty -delete
+
+ cat <<-EOF > "${T}"/15${P}
+ PATH=${d}/bin
+ MANPATH=${d}/share/man
+ INFOPATH=${d}/share/info
+ EOF
+ doenvd "${T}"/15${P} || die
+}
diff --git a/dev-embedded/smdk-dltool/Manifest b/dev-embedded/smdk-dltool/Manifest
new file mode 100644
index 000000000000..7eadd3b0cb0e
--- /dev/null
+++ b/dev-embedded/smdk-dltool/Manifest
@@ -0,0 +1 @@
+DIST smdk-tools-v0.20.tar.gz 5170 SHA256 fdda1a8ddb8b71a7a74e8efc85bd08ba8cb953a61eb610b846cf291436426e48 SHA512 2b0fd113bc9e6e6c07ad4163d404bffa8044150a2da55a8903192b9dcbead5e31d97a9315b561526f0cb2a65e415f34941bea0db3ac40e73048901fe95ff3a17 WHIRLPOOL d5feafc17e497a955135fa2c9a3e7857a8779c81ba124879a6aa57b495c9ac25452d1b63106abb4120daef0b8c131734da91c94f0400f03eb41688aa7825daba
diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch
new file mode 100644
index 000000000000..5b615aeb119b
--- /dev/null
+++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-add-S3C64xx-support.patch
@@ -0,0 +1,66 @@
+From ed9e5da97fdb40082aca7acbdce5286b530fb2ba Mon Sep 17 00:00:00 2001
+From: Maurus Cuelenaere <mcuelenaere@gmail.com>
+Date: Mon, 11 Jan 2010 01:55:34 +0100
+Subject: [PATCH] Add S3C64xx support
+
+Author: unknown
+URL: http://dev.odroid.com/frs/download.php/22/Linux-dltool.tar.gz
+---
+ dltool/dltool.c | 19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/dltool/dltool.c b/dltool/dltool.c
+index 4e2d238..e76e607 100644
+--- a/dltool/dltool.c
++++ b/dltool/dltool.c
+@@ -26,6 +26,8 @@ char *dl_file = "download.dat";
+ char *dl_udev = NULL;
+ char *dl_ubus = NULL;
+
++int ep_out = 0;
++
+ #define DBG(x) if (debug) { printf x; }
+
+ void write_u32(unsigned char *dp, unsigned long val)
+@@ -120,9 +122,15 @@ int verify_device(struct usb_device *dev)
+ DBG(("\t=> idVendor %x\n", dev->descriptor.idVendor));
+ DBG(("\t=> idProduct %x\n", dev->descriptor.idProduct));
+
+- if (dev->descriptor.idVendor == 0x5345 &&
+- dev->descriptor.idProduct == 0x1234)
++ if (dev->descriptor.idVendor == 0x5345 && dev->descriptor.idProduct == 0x1234) {
++ ep_out = 3;
++ return 1;
++ }
++ else if(dev->descriptor.idVendor == 0x4e8 && dev->descriptor.idProduct == 0x1234){
++ printf("S3C64XX Detected!\n");
++ ep_out = 2;
+ return 1;
++ }
+
+ return 0;
+ }
+@@ -180,9 +188,9 @@ int main(int argc, char **argv)
+ usb_dev_handle *devh;
+ int ret;
+
+- printf("SMDK42XX USB Download Tool\n");
++ printf("SMDK42XX,S3C64XX USB Download Tool\n");
+ printf("Version 0.20 (c) 2004,2005,2006"
+- "Ben Dooks <ben-linux@fluff.org>\n");
++ " Ben Dooks <ben-linux@fluff.org>\n");
+ printf("\n");
+
+ while (1) {
+@@ -309,7 +317,8 @@ int main(int argc, char **argv)
+ write_header(dl_data, dl_addr, dl_size);
+ calc_cksum(dl_data, dl_size);
+
+- ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000);
++ //ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000);
++ ret = usb_bulk_write(devh, ep_out, (void *)dl_data, dl_size, 5*1000*1000);
+ printf("=> usb_bulk_write() returned %d\n", ret);
+
+ if (ret != dl_size) {
+--
+1.7.0.4
diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch
new file mode 100644
index 000000000000..c6e3b767394b
--- /dev/null
+++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-build.patch
@@ -0,0 +1,20 @@
+respect env build settings
+
+--- a/releases/smdk-tools-v0.20/dltool/Makefile
++++ b/releases/smdk-tools-v0.20/dltool/Makefile
+@@ -7,8 +7,13 @@
+
+ .PHONY: clean
+
+-dltool: dltool.c
+- $(CC) -O2 -Wall -g -lusb -o smdk-usbdl dltool.c
++CFLAGS ?= -O2 -g
++CFLAGS += -Wall
++PKG_CONFIG ?= pkg-config
++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb)
++LDLIBS = $(shell $(PKG_CONFIG) --libs libusb)
++
++all: dltool
+
+ clean:
+ -rm smdk-usbdl
diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch
new file mode 100644
index 000000000000..15afd1380984
--- /dev/null
+++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0-r1.patch
@@ -0,0 +1,359 @@
+migrate to libusb-1 by me (Mike Frysinger)
+
+workaround kernel/libusb transfer sizes by Julius Werner
+
+--- a/Makefile
++++ b/Makefile
+@@ -10,8 +10,8 @@
+ CFLAGS ?= -O2 -g
+ CFLAGS += -Wall
+ PKG_CONFIG ?= pkg-config
+-CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb)
+-LDLIBS = $(shell $(PKG_CONFIG) --libs libusb)
++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
++LDLIBS = $(shell $(PKG_CONFIG) --libs libusb-1.0)
+
+ all: dltool
+
+--- a/dltool.c
++++ b/dltool.c
+@@ -7,15 +7,25 @@
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/param.h>
+
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include <getopt.h>
+ #include <fcntl.h>
++#include <errno.h>
++#include <unistd.h>
+
+
+-#include <usb.h>
++#include <libusb.h>
++
++/* The kernel USB layer is restrictive in the max size in a single URB.
++ * When we exceed that, the kernel throws ENOMEM, but the libusb layer
++ * doesn't handle things gracefully. So manually split up into chunks
++ * ourselves so we can avoid that failure case.
++ */
++#define CHUNKSIZE (1 << 18)
+
+ unsigned int debug = 0;
+ unsigned long dl_addr = 0x30000000L;
+@@ -23,12 +33,22 @@ unsigned long dl_size = 0L;
+ unsigned char *dl_data = NULL;
+
+ char *dl_file = "download.dat";
+-char *dl_udev = NULL;
+-char *dl_ubus = NULL;
++libusb_context *ctx = NULL;
++libusb_device_handle *devh = NULL;
+
+ int ep_out = 0;
+
+ #define DBG(x) if (debug) { printf x; }
++#define err(fmt, args...) \
++ do { \
++ if (devh) \
++ libusb_close(devh); \
++ if (ctx) \
++ libusb_exit(ctx); \
++ fprintf(stderr, "dltool: " fmt "\n", ## args); \
++ exit(1); \
++ } while (0)
++#define errp(fmt, args...) err(fmt ": %s", ## args, strerror(errno))
+
+ void write_u32(unsigned char *dp, unsigned long val)
+ {
+@@ -108,25 +128,30 @@ void calc_cksum(unsigned char *data, ssize_t len)
+ cp[1] = cksum >> 8;
+ }
+
+-int verify_device(struct usb_device *dev)
++int verify_device(libusb_device *dev)
+ {
++ struct libusb_device_descriptor desc;
++
++ if (libusb_get_device_descriptor(dev, &desc))
++ return 0;
++
+ DBG(("dev %p: configurations %d\n",
+- dev, dev->descriptor.bNumConfigurations));
++ dev, desc.bNumConfigurations));
+
+- if (dev->descriptor.bNumConfigurations != 1)
++ if (desc.bNumConfigurations != 1)
+ return 0;
+
+- DBG(("\t=> bLength %d\n", dev->descriptor.bLength));
+- DBG(("\t=> bType %d\n", dev->descriptor.bDescriptorType));
+- DBG(("\t=> bcdUSB %x\n", dev->descriptor.bcdUSB));
+- DBG(("\t=> idVendor %x\n", dev->descriptor.idVendor));
+- DBG(("\t=> idProduct %x\n", dev->descriptor.idProduct));
++ DBG(("\t=> bLength %d\n", desc.bLength));
++ DBG(("\t=> bType %d\n", desc.bDescriptorType));
++ DBG(("\t=> bcdUSB %x\n", desc.bcdUSB));
++ DBG(("\t=> idVendor %x\n", desc.idVendor));
++ DBG(("\t=> idProduct %x\n", desc.idProduct));
+
+- if (dev->descriptor.idVendor == 0x5345 && dev->descriptor.idProduct == 0x1234) {
++ if (desc.idVendor == 0x5345 && desc.idProduct == 0x1234) {
+ ep_out = 3;
+ return 1;
+ }
+- else if(dev->descriptor.idVendor == 0x4e8 && dev->descriptor.idProduct == 0x1234){
++ else if(desc.idVendor == 0x4e8 && desc.idProduct == 0x1234){
+ printf("S3C64XX Detected!\n");
+ ep_out = 2;
+ return 1;
+@@ -173,6 +198,12 @@ struct option long_opts[] = {
+ .val = 'x',
+ },
+ {
++ .name = "help",
++ .has_arg = 0,
++ .flag = NULL,
++ .val = 'h',
++ },
++ {
+ .name = NULL
+ }
+ };
+@@ -181,12 +212,14 @@ int flg_show = 0;
+
+ int main(int argc, char **argv)
+ {
+- struct usb_bus *bus, *busp;
+- struct usb_device *result = NULL;
+- struct usb_device *found = NULL;
++ ssize_t num_devs, i;
++ libusb_device **list;
++ libusb_device *found;
++ int dl_ubus = -1;
++ int dl_udev = -1;
++ uint8_t bus_num, dev_num;
+ unsigned long fsize;
+- usb_dev_handle *devh;
+- int ret;
++ int ret, transferred;
+
+ printf("SMDK42XX,S3C64XX USB Download Tool\n");
+ printf("Version 0.20 (c) 2004,2005,2006"
+@@ -197,7 +230,7 @@ int main(int argc, char **argv)
+ int index = 0;
+ int c;
+
+- c = getopt_long(argc, argv, "a:b:d:f:s", long_opts, &index);
++ c = getopt_long(argc, argv, "a:b:d:f:shx", long_opts, &index);
+
+ DBG(("option index %d\n",c ));
+
+@@ -218,117 +251,134 @@ int main(int argc, char **argv)
+ break;
+
+ case 'b':
+- dl_ubus = optarg;
++ dl_ubus = atoi(optarg);
+ break;
+
+ case 'd':
+- dl_udev = optarg;
++ dl_udev = atoi(optarg);
+ break;
+
+ case 'x':
+ debug = 1;
++ break;
++
++ case 'h':
++ puts(
++ "Usage: dltool [options]\n"
++ "\n"
++ "-a <download addr>\n"
++ "-b <bus #>\n"
++ "-d <dev #>\n"
++ "-f <file>\n"
++ "-s Show found devices\n"
++ "-x Enable debug\n"
++ );
++ return 0;
+ }
+ }
+
+- usb_init();
+- usb_find_busses();
+- usb_find_devices();
+-
+- bus = usb_get_busses();
+-
+- DBG(("usb_get_busses: %p\n", bus));
+-
+- for (busp = bus; busp != NULL; busp = busp->next) {
+- struct usb_device *dev;
+-
+- DBG(("bus %p: dirname %s\n", busp, busp->dirname));
+-
+- if (dl_ubus) {
+- if (strcmp(busp->dirname, dl_ubus) != 0)
+- continue;
+- }
++ ret = libusb_init(&ctx);
++ if (ret)
++ errp("could not initialize usb stack");
+
+- for (dev = busp->devices; dev != NULL; dev = dev->next) {
+- DBG(("dev %p filename %s\n", dev, dev->filename));
++ bus_num = dev_num = 0;
++ found = NULL;
++ num_devs = libusb_get_device_list(ctx, &list);
++ for (i = 0; i < num_devs; ++i) {
++ libusb_device *dev = list[i];
++ bus_num = libusb_get_bus_number(dev);
++ dev_num = libusb_get_device_address(dev);
+
+- if (!verify_device(dev))
+- continue;
++ DBG(("bus %u; dev %u (%p)\n", bus_num, dev_num, dev));
+
+- if (flg_show) {
+- printf("bus %s: device %s\n",
+- busp->dirname, dev->filename);
+- continue;
+- }
++ if (dl_ubus >= 0 && bus_num != dl_ubus)
++ continue;
+
+- found = dev;
++ if (!verify_device(dev))
++ continue;
+
+- if (dl_udev) {
+- if (strcmp(dev->filename, dl_udev) == 0) {
+- result = dev;
+- break;
+- }
+- }
++ if (flg_show) {
++ printf("bus %u: device %u\n", bus_num, dev_num);
++ continue;
+ }
+
+- if (result != NULL)
+- break;
++ if (dl_udev >= 0 && dev_num != dl_udev)
++ continue;
++
++ found = dev;
++ break;
+ }
+
+ if (flg_show)
+ return 0;
+
+- DBG(("device %p, found %p\n", result, found));
++ DBG(("found %p\n", found));
+
+- if (result == NULL && found != NULL)
+- result = found;
+-
+- if (result == NULL) {
+- fprintf(stderr, "failed to find device\n");
+- return 1;
+- }
++ if (found == NULL)
++ err("failed to find device\n");
+
+- printf("=> found device: bus %s, dev %s\n",
+- result->bus->dirname, result->filename);
++ printf("=> found device: bus %u, dev %u\n",
++ bus_num, dev_num);
+
+ dl_data = load_file(dl_file, &dl_size, &fsize);
+- if (dl_data == NULL) {
+- printf("failed to load %s\n", dl_file);
+- return 1;
+- }
++ if (dl_data == NULL)
++ errp("failed to load %s", dl_file);
+
+ printf("=> loaded %ld bytes from %s\n", fsize, dl_file);
+
+- devh = usb_open(result);
+- if (devh == NULL) {
+- perror("usb_open");
+- return 1;
+- }
++ ret = libusb_open(found, &devh);
++ if (ret == 0) {
++ /*
++ * Seems to break some recovery modes :(
++ * http://crosbug.com/26083
++ * These fail:
++ * smdk-dltool -a 0x02021400 -f bl1.bin
++ * smdk-dltool -a 0x02023400 -f bl2.bin
++ */
++#if 0
++ uint8_t configuration;
++ struct libusb_config_descriptor *config;
++ libusb_get_active_config_descriptor(found, &config);
++ configuration = config->bConfigurationValue;
++ libusb_free_config_descriptor(config);
++ libusb_set_configuration(devh, configuration);
++#endif
++ } else
++ errp("libusb_open");
+
+ DBG(("claim interface\n"));
+
+- if (usb_claim_interface(devh, 0) < 0) {
+- perror("usb_claim_interface");
+- usb_close(devh);
+- return 1;
+- }
++ ret = libusb_claim_interface(devh, 0);
++ if (ret)
++ errp("libusb_claim_interface");
+
+ printf("=> Downloading %ld bytes to 0x%08lx\n", dl_size, dl_addr);
+
+ write_header(dl_data, dl_addr, dl_size);
+ calc_cksum(dl_data, dl_size);
+
+- //ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000);
+- ret = usb_bulk_write(devh, ep_out, (void *)dl_data, dl_size, 5*1000*1000);
+- printf("=> usb_bulk_write() returned %d\n", ret);
+-
+- if (ret != dl_size) {
+- printf("failed to write %ld bytes\n", dl_size);
++ transferred = 0;
++ while (transferred < dl_size) {
++ int actual, expected = MIN(dl_size - transferred, CHUNKSIZE);
++ ret = libusb_bulk_transfer(devh, ep_out, dl_data + transferred,
++ expected, &actual, 5 * 1000 * 1000);
++ printf("=> usb_bulk_write(%d) returned %d, wrote %d\n",
++ expected, ret, actual);
++ transferred += actual;
++
++ if (ret || (expected != actual)) {
++ printf("failed to write %ld bytes (wrote %d): %s\n",
++ dl_size, transferred, strerror(errno));
++ ret = 1;
++ break;
++ }
+ }
+
+ free(dl_data);
+
+- usb_release_interface(devh, 0);
+- usb_close(devh);
++ libusb_release_interface(devh, 0);
++ libusb_close(devh);
++ libusb_exit(ctx);
+
+- return 0;
++ return ret;
+ }
diff --git a/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0.patch b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0.patch
new file mode 100644
index 000000000000..889a439c7fb0
--- /dev/null
+++ b/dev-embedded/smdk-dltool/files/smdk-dltool-0.20-libusb-1.0.patch
@@ -0,0 +1,338 @@
+migrate to libusb-1 by me (Mike Frysinger)
+
+--- a/Makefile
++++ b/Makefile
+@@ -10,8 +10,8 @@
+ CFLAGS ?= -O2 -g
+ CFLAGS += -Wall
+ PKG_CONFIG ?= pkg-config
+-CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb)
+-LDLIBS = $(shell $(PKG_CONFIG) --libs libusb)
++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
++LDLIBS = $(shell $(PKG_CONFIG) --libs libusb-1.0)
+
+ all: dltool
+
+--- a/dltool.c
++++ b/dltool.c
+@@ -13,9 +13,11 @@
+ #include <stdio.h>
+ #include <getopt.h>
+ #include <fcntl.h>
++#include <errno.h>
++#include <unistd.h>
+
+
+-#include <usb.h>
++#include <libusb.h>
+
+ unsigned int debug = 0;
+ unsigned long dl_addr = 0x30000000L;
+@@ -23,12 +25,22 @@ unsigned long dl_size = 0L;
+ unsigned char *dl_data = NULL;
+
+ char *dl_file = "download.dat";
+-char *dl_udev = NULL;
+-char *dl_ubus = NULL;
++libusb_context *ctx = NULL;
++libusb_device_handle *devh = NULL;
+
+ int ep_out = 0;
+
+ #define DBG(x) if (debug) { printf x; }
++#define err(fmt, args...) \
++ do { \
++ if (devh) \
++ libusb_close(devh); \
++ if (ctx) \
++ libusb_exit(ctx); \
++ fprintf(stderr, "dltool: " fmt "\n", ## args); \
++ exit(1); \
++ } while (0)
++#define errp(fmt, args...) err(fmt ": %s", ## args, strerror(errno))
+
+ void write_u32(unsigned char *dp, unsigned long val)
+ {
+@@ -108,25 +120,30 @@ void calc_cksum(unsigned char *data, ssize_t len)
+ cp[1] = cksum >> 8;
+ }
+
+-int verify_device(struct usb_device *dev)
++int verify_device(libusb_device *dev)
+ {
++ struct libusb_device_descriptor desc;
++
++ if (libusb_get_device_descriptor(dev, &desc))
++ return 0;
++
+ DBG(("dev %p: configurations %d\n",
+- dev, dev->descriptor.bNumConfigurations));
++ dev, desc.bNumConfigurations));
+
+- if (dev->descriptor.bNumConfigurations != 1)
++ if (desc.bNumConfigurations != 1)
+ return 0;
+
+- DBG(("\t=> bLength %d\n", dev->descriptor.bLength));
+- DBG(("\t=> bType %d\n", dev->descriptor.bDescriptorType));
+- DBG(("\t=> bcdUSB %x\n", dev->descriptor.bcdUSB));
+- DBG(("\t=> idVendor %x\n", dev->descriptor.idVendor));
+- DBG(("\t=> idProduct %x\n", dev->descriptor.idProduct));
++ DBG(("\t=> bLength %d\n", desc.bLength));
++ DBG(("\t=> bType %d\n", desc.bDescriptorType));
++ DBG(("\t=> bcdUSB %x\n", desc.bcdUSB));
++ DBG(("\t=> idVendor %x\n", desc.idVendor));
++ DBG(("\t=> idProduct %x\n", desc.idProduct));
+
+- if (dev->descriptor.idVendor == 0x5345 && dev->descriptor.idProduct == 0x1234) {
++ if (desc.idVendor == 0x5345 && desc.idProduct == 0x1234) {
+ ep_out = 3;
+ return 1;
+ }
+- else if(dev->descriptor.idVendor == 0x4e8 && dev->descriptor.idProduct == 0x1234){
++ else if(desc.idVendor == 0x4e8 && desc.idProduct == 0x1234){
+ printf("S3C64XX Detected!\n");
+ ep_out = 2;
+ return 1;
+@@ -173,6 +190,12 @@ struct option long_opts[] = {
+ .val = 'x',
+ },
+ {
++ .name = "help",
++ .has_arg = 0,
++ .flag = NULL,
++ .val = 'h',
++ },
++ {
+ .name = NULL
+ }
+ };
+@@ -181,12 +204,14 @@ int flg_show = 0;
+
+ int main(int argc, char **argv)
+ {
+- struct usb_bus *bus, *busp;
+- struct usb_device *result = NULL;
+- struct usb_device *found = NULL;
++ ssize_t num_devs, i;
++ libusb_device **list;
++ libusb_device *found;
++ int dl_ubus = -1;
++ int dl_udev = -1;
++ uint8_t bus_num, dev_num;
+ unsigned long fsize;
+- usb_dev_handle *devh;
+- int ret;
++ int ret, transferred;
+
+ printf("SMDK42XX,S3C64XX USB Download Tool\n");
+ printf("Version 0.20 (c) 2004,2005,2006"
+@@ -197,7 +222,7 @@ int main(int argc, char **argv)
+ int index = 0;
+ int c;
+
+- c = getopt_long(argc, argv, "a:b:d:f:s", long_opts, &index);
++ c = getopt_long(argc, argv, "a:b:d:f:shx", long_opts, &index);
+
+ DBG(("option index %d\n",c ));
+
+@@ -218,117 +243,127 @@ int main(int argc, char **argv)
+ break;
+
+ case 'b':
+- dl_ubus = optarg;
++ dl_ubus = atoi(optarg);
+ break;
+
+ case 'd':
+- dl_udev = optarg;
++ dl_udev = atoi(optarg);
+ break;
+
+ case 'x':
+ debug = 1;
++ break;
++
++ case 'h':
++ puts(
++ "Usage: dltool [options]\n"
++ "\n"
++ "-a <download addr>\n"
++ "-b <bus #>\n"
++ "-d <dev #>\n"
++ "-f <file>\n"
++ "-s Show found devices\n"
++ "-x Enable debug\n"
++ );
++ return 0;
+ }
+ }
+
+- usb_init();
+- usb_find_busses();
+- usb_find_devices();
+-
+- bus = usb_get_busses();
+-
+- DBG(("usb_get_busses: %p\n", bus));
+-
+- for (busp = bus; busp != NULL; busp = busp->next) {
+- struct usb_device *dev;
+-
+- DBG(("bus %p: dirname %s\n", busp, busp->dirname));
+-
+- if (dl_ubus) {
+- if (strcmp(busp->dirname, dl_ubus) != 0)
+- continue;
++ ret = libusb_init(&ctx);
++ if (ret)
++ errp("could not initialize usb stack");
++
++ bus_num = dev_num = 0;
++ found = NULL;
++ num_devs = libusb_get_device_list(ctx, &list);
++ for (i = 0; i < num_devs; ++i) {
++ libusb_device *dev = list[i];
++ bus_num = libusb_get_bus_number(dev);
++ dev_num = libusb_get_device_address(dev);
++
++ DBG(("bus %u; dev %u (%p)\n", bus_num, dev_num, dev));
++
++ if (dl_ubus >= 0 && bus_num != dl_ubus)
++ continue;
++
++ if (!verify_device(dev))
++ continue;
++
++ if (flg_show) {
++ printf("bus %u: device %u\n", bus_num, dev_num);
++ continue;
+ }
+
+- for (dev = busp->devices; dev != NULL; dev = dev->next) {
+- DBG(("dev %p filename %s\n", dev, dev->filename));
++ if (dl_udev >= 0 && dev_num != dl_udev)
++ continue;
+
+- if (!verify_device(dev))
+- continue;
+-
+- if (flg_show) {
+- printf("bus %s: device %s\n",
+- busp->dirname, dev->filename);
+- continue;
+- }
+-
+- found = dev;
+-
+- if (dl_udev) {
+- if (strcmp(dev->filename, dl_udev) == 0) {
+- result = dev;
+- break;
+- }
+- }
+- }
+-
+- if (result != NULL)
+- break;
++ found = dev;
++ break;
+ }
+
+ if (flg_show)
+ return 0;
+
+- DBG(("device %p, found %p\n", result, found));
++ DBG(("found %p\n", found));
+
+- if (result == NULL && found != NULL)
+- result = found;
+-
+- if (result == NULL) {
+- fprintf(stderr, "failed to find device\n");
+- return 1;
+- }
++ if (found == NULL)
++ err("failed to find device\n");
+
+- printf("=> found device: bus %s, dev %s\n",
+- result->bus->dirname, result->filename);
++ printf("=> found device: bus %u, dev %u\n",
++ bus_num, dev_num);
+
+ dl_data = load_file(dl_file, &dl_size, &fsize);
+- if (dl_data == NULL) {
+- printf("failed to load %s\n", dl_file);
+- return 1;
+- }
++ if (dl_data == NULL)
++ errp("failed to load %s", dl_file);
+
+ printf("=> loaded %ld bytes from %s\n", fsize, dl_file);
+
+- devh = usb_open(result);
+- if (devh == NULL) {
+- perror("usb_open");
+- return 1;
+- }
++ ret = libusb_open(found, &devh);
++ if (ret == 0) {
++ /*
++ * Seems to break some recovery modes :(
++ * http://crosbug.com/26083
++ * These fail:
++ * smdk-dltool -a 0x02021400 -f bl1.bin
++ * smdk-dltool -a 0x02023400 -f bl2.bin
++ */
++#if 0
++ uint8_t configuration;
++ struct libusb_config_descriptor *config;
++ libusb_get_active_config_descriptor(found, &config);
++ configuration = config->bConfigurationValue;
++ libusb_free_config_descriptor(config);
++ libusb_set_configuration(devh, configuration);
++#endif
++ } else
++ errp("libusb_open");
+
+ DBG(("claim interface\n"));
+
+- if (usb_claim_interface(devh, 0) < 0) {
+- perror("usb_claim_interface");
+- usb_close(devh);
+- return 1;
+- }
++ ret = libusb_claim_interface(devh, 0);
++ if (ret)
++ errp("libusb_claim_interface");
+
+ printf("=> Downloading %ld bytes to 0x%08lx\n", dl_size, dl_addr);
+
+ write_header(dl_data, dl_addr, dl_size);
+ calc_cksum(dl_data, dl_size);
+
+- //ret = usb_bulk_write(devh, 3, (void *)dl_data, dl_size, 5*1000*1000);
+- ret = usb_bulk_write(devh, ep_out, (void *)dl_data, dl_size, 5*1000*1000);
++ //ret = libusb_bulk_transfer(devh, 3, dl_data, dl_size, &transferred, 5*1000*1000);
++ ret = libusb_bulk_transfer(devh, ep_out, dl_data, dl_size, &transferred, 5*1000*1000);
+ printf("=> usb_bulk_write() returned %d\n", ret);
+
+- if (ret != dl_size) {
+- printf("failed to write %ld bytes\n", dl_size);
++ if (ret || transferred != dl_size) {
++ printf("failed to write %ld bytes (wrote %d): %s\n",
++ dl_size, transferred, strerror(errno));
++ ret = 1;
+ }
+
+ free(dl_data);
+
+- usb_release_interface(devh, 0);
+- usb_close(devh);
++ libusb_release_interface(devh, 0);
++ libusb_close(devh);
++ libusb_exit(ctx);
+
+- return 0;
++ return ret;
+ }
diff --git a/dev-embedded/smdk-dltool/metadata.xml b/dev-embedded/smdk-dltool/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/smdk-dltool/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/smdk-dltool/smdk-dltool-0.20-r3.ebuild b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r3.ebuild
new file mode 100644
index 000000000000..d10c49232750
--- /dev/null
+++ b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r3.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Tool to communicate with Samsung SMDK boards"
+HOMEPAGE="http://www.fluff.org/ben/smdk/tools/"
+SRC_URI="http://www.fluff.org/ben/smdk/tools/downloads/smdk-tools-v${PV}.tar.gz"
+
+# Email sent to author on 2012-01-18 querying about license
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND="virtual/libusb:1"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/releases/smdk-tools-v${PV}/dltool
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-add-S3C64xx-support.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-libusb-1.0.patch
+ tc-export CC PKG_CONFIG
+}
+
+src_install() {
+ newbin dltool smdk-usbdl
+ dodoc readme.txt
+}
diff --git a/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild
new file mode 100644
index 000000000000..4d5019cdae2f
--- /dev/null
+++ b/dev-embedded/smdk-dltool/smdk-dltool-0.20-r4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Tool to communicate with Samsung SMDK boards"
+HOMEPAGE="http://www.fluff.org/ben/smdk/tools/"
+SRC_URI="http://www.fluff.org/ben/smdk/tools/downloads/smdk-tools-v${PV}.tar.gz"
+
+# Email sent to author on 2012-01-18 querying about license
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND="virtual/libusb:1"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/releases/smdk-tools-v${PV}/dltool
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-add-S3C64xx-support.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-libusb-1.0-r1.patch
+ tc-export CC PKG_CONFIG
+}
+
+src_install() {
+ newbin dltool smdk-usbdl
+ dodoc readme.txt
+}
diff --git a/dev-embedded/srecord/Manifest b/dev-embedded/srecord/Manifest
new file mode 100644
index 000000000000..1a511fae90cc
--- /dev/null
+++ b/dev-embedded/srecord/Manifest
@@ -0,0 +1,6 @@
+DIST srecord-1.59.tar.gz 889036 SHA256 97d441ee62b948a47935adfab8b8fb01a7a654b1656b32b299a4a041e36bd351 SHA512 80f9b3f2edad66e7cd7ee7a6151b417eca4b750d9ad097ccaeb542814cf462c02238c287fb417b952aea985aba2abe5e433676555fe989cb5df1b076e93a097c WHIRLPOOL 7a7d065521cd807419c3222ac6258b20c8996aafebeb639c9d6a8c0077a59adee806212b1b89bbbb271b4e93709accfdbc191c1d30b212c520006eb685218d98
+DIST srecord-1.60.tar.gz 900389 SHA256 f579671c5ff3333e711616f738e751c742c2b4dd7f7553c90c37c9b6d4968d98 SHA512 12fe45e2a605268febd7cf2c41e262a57ff77ae3e1ffe84955d39a54ac6cd27175e376e861c8ed3f8025e691bd74b993117b79f7199a45c443c575fc22fe591a WHIRLPOOL 447d9c58d4af4291a634a3d0c2555a8643c624b3998af7d4d6d7e12785e3a1440e83f29e51b9ef446e3137e25bfbf15d423fc4821fef599e972d5cb2370848c0
+DIST srecord-1.61.tar.gz 916174 SHA256 b68d47b17ae50aee68655bb3b24e6d2434754a184d16510d4a6411d10bbdc364 SHA512 9bcd310bf812cf236a6b88e0aa5979510fc3fdcb622b631e923909ac12b9ff88ab8bc1f44006f0cdbffb51cb44e5885b46ff209bac9d71428f786d7d25a160ad WHIRLPOOL 4f2b8cd938be4a8026fc31e4a7b0d6618ee58f85aa0d2fea7fa9902b03c74ba043faf725e0ae7eec960ed2d2c342d554f46fa2ca640c14fb7c29812ad203bd47
+DIST srecord-1.62.tar.gz 921920 SHA256 04a4e18a43d1cb8fa608242a012b99a1bf85704915663f668c7cd55435accb2d SHA512 4a3dde671af959c24a12c711919e9028a22034d2ce347cfa0ecb7bc368036b21b38356156ff1e2d58a9fa1a0fece25e7913be5730e23c74a82734bc262cc2c88 WHIRLPOOL dd8916b2733d4cb57b9a321acc6ff0abc5e5b23c8eb864722f146a005e3719361b9e226d16393e4fcba875fa035d8347314bc00445d96e95f08302e0c3ca2483
+DIST srecord-1.63.tar.gz 938068 SHA256 78fec76d04424506e319f59b19a520428a7449ed087a67e1779fa2996992bf1a SHA512 6c6b37b3ff2dac06d1e6bac40cf29a3b8b6f120ccf97f7211fb6a5bd31ecbabb7cbebe98c7bbb61e2571bb9239d759a2784e426615747a7b91e089338058af2f WHIRLPOOL dfee24f2be5e076c76c00fc5bd06f225bc24e3fe0b47a0bf6a29f8cb58035d601374c7e1d5d11c365690887f1ba3a2ae400b5a1d8062d8b22e927625a4014419
+DIST srecord-1.64.tar.gz 942513 SHA256 49a4418733c508c03ad79a29e95acec9a2fbc4c7306131d2a8f5ef32012e67e2 SHA512 f96f2d9cd2c475d040c0474a35a17ebca2f0fb737856cdafe1227758a3e52176e4ab3e8577520c21e75e468d74fa98695128c02120734b6e92d8573e76af50b3 WHIRLPOOL e679a4b8b497a52a8617db3f509ce0776e7d33c823f8de3528fe3599fa2ad7cccc79c9743f4fecab023dc1d88c6de481f6091a0ef7c79f5672b399b08c3da5b6
diff --git a/dev-embedded/srecord/files/srecord-1.57-libtool.patch b/dev-embedded/srecord/files/srecord-1.57-libtool.patch
new file mode 100644
index 000000000000..d1195726a3d2
--- /dev/null
+++ b/dev-embedded/srecord/files/srecord-1.57-libtool.patch
@@ -0,0 +1,70 @@
+--- srecord-1.57.orig/etc/configure.ac
++++ srecord-1.57/etc/configure.ac
+@@ -29,6 +29,10 @@
+ AC_CHECK_FUNCS(snprintf vsnprintf)
+ AC_CHECK_LIB(gcrypt, gcry_md_open)
+
++top_builddir=`pwd`
++AC_SUBST(top_builddir)
++LT_INIT
++
+ dnl
+ dnl Make sure Boost is installed.
+ dnl
+@@ -119,46 +123,6 @@
+ operating system has a libgcrypt that supports WHIRLPOOL.])
+ AC_MSG_RESULT(yes),AC_MSG_RESULT(no))dnl
+
+-dnl!
+-dnl! Now look for libtool.
+-dnl!
+-AC_CHECK_PROGS(LIBTOOL, libtool)
+-if test -z "$LIBTOOL"
+-then
+- AC_MSG_RESULT([
+- You must have GNU Libtool installed to build srecord.
+- Homepage: http://www.gnu.org/software/libtool/])
+- OK=no
+- if apt-get --version > /dev/null 2> /dev/null; then
+- AC_MSG_RESULT([
+- The following command may be used to install it:
+- sudo apt-get install libtool
+- ])
+- OK=yes
+- fi
+- if yum --version > /dev/null 2> /dev/null; then
+- AC_MSG_RESULT([
+- The following command may be used to install it:
+- sudo yum install libtool
+- ])
+- OK=yes
+- fi
+- if pkg_info -a > /dev/null 2> /dev/null; then
+- AC_MSG_RESULT([
+- The following command may be used to install it:
+- sudo pkg_add -r libtool
+- ])
+- OK=yes
+- fi
+- if test "$OK" != "yes"; then
+- AC_MSG_RESULT([
+- If you are using a package based install, you will need the
+- libtool package.
+- ])
+- fi
+- exit 1
+-fi
+-
+ dnl
+ dnl If the soelim program exists, and understands the -I option,
+ dnl arrange for the Makefile to install the .ps files from the
+--- srecord-1.57.orig/Makefile.in
++++ srecord-1.57/Makefile.in
+@@ -35,6 +35,7 @@
+ #
+ # directory containing the source
+ #
++top_builddir = @top_builddir@
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+
diff --git a/dev-embedded/srecord/metadata.xml b/dev-embedded/srecord/metadata.xml
new file mode 100644
index 000000000000..e137ef85a62e
--- /dev/null
+++ b/dev-embedded/srecord/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <longdescription>
+The SRecord package is a collection of powerful tools for manipulating EPROM load files.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">srecord</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/srecord/srecord-1.59.ebuild b/dev-embedded/srecord/srecord-1.59.ebuild
new file mode 100644
index 000000000000..9589edc4b0e6
--- /dev/null
+++ b/dev-embedded/srecord/srecord-1.59.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="A collection of powerful tools for manipulating EPROM load files"
+HOMEPAGE="http://srecord.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-apps/groff
+ test? ( app-arch/sharutils )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.57-libtool.patch
+
+ cp etc/configure.ac "${S}"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-embedded/srecord/srecord-1.60.ebuild b/dev-embedded/srecord/srecord-1.60.ebuild
new file mode 100644
index 000000000000..9589edc4b0e6
--- /dev/null
+++ b/dev-embedded/srecord/srecord-1.60.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="A collection of powerful tools for manipulating EPROM load files"
+HOMEPAGE="http://srecord.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-apps/groff
+ test? ( app-arch/sharutils )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.57-libtool.patch
+
+ cp etc/configure.ac "${S}"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-embedded/srecord/srecord-1.61.ebuild b/dev-embedded/srecord/srecord-1.61.ebuild
new file mode 100644
index 000000000000..9589edc4b0e6
--- /dev/null
+++ b/dev-embedded/srecord/srecord-1.61.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="A collection of powerful tools for manipulating EPROM load files"
+HOMEPAGE="http://srecord.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-apps/groff
+ test? ( app-arch/sharutils )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.57-libtool.patch
+
+ cp etc/configure.ac "${S}"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-embedded/srecord/srecord-1.62.ebuild b/dev-embedded/srecord/srecord-1.62.ebuild
new file mode 100644
index 000000000000..8e952bdb4e55
--- /dev/null
+++ b/dev-embedded/srecord/srecord-1.62.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="A collection of powerful tools for manipulating EPROM load files"
+HOMEPAGE="http://srecord.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-apps/groff
+ test? ( app-arch/sharutils )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.57-libtool.patch
+
+ cp etc/configure.ac "${S}"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-embedded/srecord/srecord-1.63.ebuild b/dev-embedded/srecord/srecord-1.63.ebuild
new file mode 100644
index 000000000000..8e952bdb4e55
--- /dev/null
+++ b/dev-embedded/srecord/srecord-1.63.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="A collection of powerful tools for manipulating EPROM load files"
+HOMEPAGE="http://srecord.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-apps/groff
+ test? ( app-arch/sharutils )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.57-libtool.patch
+
+ cp etc/configure.ac "${S}"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-embedded/srecord/srecord-1.64.ebuild b/dev-embedded/srecord/srecord-1.64.ebuild
new file mode 100644
index 000000000000..0e0c7769702a
--- /dev/null
+++ b/dev-embedded/srecord/srecord-1.64.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="A collection of powerful tools for manipulating EPROM load files"
+HOMEPAGE="http://srecord.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+ sys-apps/groff
+ test? ( app-arch/sharutils )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.57-libtool.patch
+
+ cp etc/configure.ac "${S}"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/dev-embedded/tavrasm/Manifest b/dev-embedded/tavrasm/Manifest
new file mode 100644
index 000000000000..62d14685bbd5
--- /dev/null
+++ b/dev-embedded/tavrasm/Manifest
@@ -0,0 +1 @@
+DIST tavrasm-1.22.tar.gz 65685 SHA256 a2597fc6e18980edc0f33e8651b0f0df725ca2441eb39c5e2bbd1c82a1c009c7 SHA512 0f33607e2ffbe8c56268b15dc62fe6c2b565bf898c68e198846f11fb30da4da3f398d07ef7ac16050dbc92ffcb04612459027a2c27cf48fc7d74392c5f6a38dc WHIRLPOOL a0bf2122fce095964ed0bd2afd574de7bcf904622967721a3b54efe1243dcf41209935777f7803059af5a6f55a2cf6236ad39a5b19c3a2dec47b300adfd0b4f2
diff --git a/dev-embedded/tavrasm/files/tavrasm-1.22-gentoo.patch b/dev-embedded/tavrasm/files/tavrasm-1.22-gentoo.patch
new file mode 100644
index 000000000000..f752c715d32d
--- /dev/null
+++ b/dev-embedded/tavrasm/files/tavrasm-1.22-gentoo.patch
@@ -0,0 +1,25 @@
+* Do not set CC
+* Adhere to CFLAGS and LDFLAGS, do not set optimisation flags
+
+
+--- a/src/makefile 2004-12-12 00:51:29.000000000 +0100
++++ b/src/makefile 2010-05-07 03:26:38.000000000 +0200
+@@ -24,8 +24,7 @@
+
+ ### Compiler options #########################################################
+
+-CC = gcc
+-CFLAGS = -O2 -Wall -DAVRLANG=LANGUAGE_$(LANGUAGE)
++CFLAGS += -Wall -DAVRLANG=LANGUAGE_$(LANGUAGE)
+ CPPFLAGS =
+ CCFLAGS = $(CFLAGS) $(CPPFLAGS)
+ LINK = -lm -lstdc++
+@@ -39,7 +38,7 @@
+ ### Executable ##############################################################
+
+ $(EXENAME): $(OBJS)
+- $(CC) $(CCFLAGS) $(OBJS) $(LINK) -o $@
++ $(CC) $(CCFLAGS) $(LDFLAGS) $(OBJS) $(LINK) -o $@
+
+ ### Parser file #############################################################
+
diff --git a/dev-embedded/tavrasm/metadata.xml b/dev-embedded/tavrasm/metadata.xml
new file mode 100644
index 000000000000..a217d236ec3d
--- /dev/null
+++ b/dev-embedded/tavrasm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/tavrasm/tavrasm-1.22-r1.ebuild b/dev-embedded/tavrasm/tavrasm-1.22-r1.ebuild
new file mode 100644
index 000000000000..75045f1ada9e
--- /dev/null
+++ b/dev-embedded/tavrasm/tavrasm-1.22-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs versionator
+
+DESCRIPTION="Compiles code written for Atmels AVR DOS assembler"
+HOMEPAGE="http://www.tavrasm.org/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}.$(delete_all_version_separators ${PV})"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ tc-export CC
+ cd src
+
+ # The Makefile of tavrasm is stupid, hence the -j1
+ emake -j1 || die "Compilation failed"
+}
+
+src_install() {
+ dobin src/tavrasm || die "dobin failed"
+ doman tavrasm.1
+ dodoc README
+}
diff --git a/dev-embedded/tigcc/Manifest b/dev-embedded/tigcc/Manifest
new file mode 100644
index 000000000000..cf58d1cf51c0
--- /dev/null
+++ b/dev-embedded/tigcc/Manifest
@@ -0,0 +1,6 @@
+DIST binutils-2.16.1.tar.bz2 12549917 SHA256 351a6846ee179a37ed87a487971547159a7f4f92a1dec598c727f184a0de61ae SHA512 dbfccab518abc3352c4d09039da0f3b946ddc5557d7c193286adb0a39ced41f30246c41370b2b63db53eb5577bc0f1f61b789960443121274fd8f254a1b739bd WHIRLPOOL 0c15a9ceede92058c16c348552c31e6b6160e6dd67f626aff0af70b2f3b36db2b6a8889c2271ab4c08fad0a1c08fdebf984b254809d7066bca0cc6cecfe0de41
+DIST flashosa.zip 2437 SHA256 ae0be66d99aea7f7d84364347c220ed1bc8cae5f898a6e8b1a9458b445fdfea4 SHA512 f81edcf7d1b8ec6dab0d44053a967dca5243ee0825f6c1a2b476e02904ead6f575b948ae0da6fbf854eb0e059fb49a9be6e5708fb8c9e50e51b16b406f6b9efa WHIRLPOOL fad2ac67c10387aaac2bcfd4dd8116c36bf2b2c52bf01c43e3dd770590488dfd0572c048973a3329dda86cedb28c007abbd89a6ff0c826ed68f606c91820ea07
+DIST gcc-4.1-20060728.tar.bz2 37038705 SHA256 2600728a9448522c80ff64f99eff93a4499f0a7aa460c55bb08e76875084417b SHA512 c54d236d0e7a5b92acc81030067af00dd3ecc0f27a6b81c82fe6535592470f4c6a30e3a386df397fb4dd5bca6455cf473f103f484dc89ed2efba9ae55dda413f WHIRLPOOL ca80ea9c288b1ecff481df3b8ef5c65b8048e528fe2387a579295bec2d2f49348e822af0df0baa9b80f2b27227c3a7eb272aaf21b0f248e9a39f8ae1998f39e7
+DIST libfargo.zip 14766 SHA256 c37bacb744c94519b1dea0b0b855baa4379b009ec7200437521895f8a9ea90eb SHA512 a3a48de66f32f5a363465b99bd0be932a585a92b5e914ccc7360586ba9da83f1620cef9b102d69816754ec3437b2de8d76c3504182106baf8eb8cdf2bd823f1a WHIRLPOOL 42868cd9ee7dda00a8ea490df834d9b0aed40732ad7fdb7cb7e160d10a8d44d287209bd3fc53b0730a68cc462a4f6c25d4b586b749eb07786405149fce6ee83a
+DIST tigcc-0.96_beta7.tar.bz2 2828952 SHA256 da3d75515f1a0091203b3c1f47f8fa342302e45e0bbe62849391ce0935521b0b SHA512 e2b16502ded365561a4c5ca26dc261fb08c3adc717d96effb27b6ea58c2f16a072c36eb114929756cbd4ce0349ba1c47a12f90cccd0587eb7fb2835623bdd966 WHIRLPOOL 9f6b5545449f5fac299d3993d1e7cfbae4fc849c685dbfa01500fb4e5148cf5ca1c6626b76b2602969a175970d40438615d6f6a06e7299be43e1b3ad8b054482
+DIST tigcc-0.96_beta8.tar.bz2 2829870 SHA256 e8bccad2c887f91f4d6ab79f4ebef467a7173f9d77fbad20377699246915fcd3 SHA512 e28415b309b73fa949fe9f0224239f07e62136e93c4d8fe98ad2fe32a99475620092c9317bfdd098d37a2a1dfb826c2f6fd23ab26fdcc444650dc66643cfb0e7 WHIRLPOOL 881e1da5d35804315ad54ff2d2b7cd34f4c44dc3d8c08f7cc9628a8d4cb4b95db575baa0b05fb9eb3942eccca46955448c1c5bcf7a1c81066cfce4f96d548d99
diff --git a/dev-embedded/tigcc/metadata.xml b/dev-embedded/tigcc/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/tigcc/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/tigcc/tigcc-0.96_beta7.ebuild b/dev-embedded/tigcc/tigcc-0.96_beta7.ebuild
new file mode 100644
index 000000000000..b7116d54e59f
--- /dev/null
+++ b/dev-embedded/tigcc/tigcc-0.96_beta7.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+BASE_BINUTILS="2.16.1"
+GCC_VER="4.1.2"
+GCC_SNAPSHOT="20060728"
+BIN_VER=${BASE_BINUTILS:0:4}
+ENV_FILE=${D}/etc/env.d/99tigcc
+S="${WORKDIR}"
+DESCRIPTION="Cross compiler for Texas Instruments TI-89, TI-92(+) and V200 calculators"
+HOMEPAGE="http://tigcc.ticalc.org"
+
+#original source can be found at:
+#SRC_URI="http://tigcc.ticalc.org/linux/tigcc_src.tar.bz2"
+#but in fact this file changes as soon as there comes a new beta
+
+#when it hits portage of course it should be mirrored on a gentoo mirror:
+#SRC_URI="mirror://gentoo/${PF}.tar.bz2"
+
+SRC_URI="mirror://gentoo/tigcc-0.96_beta7.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-${GCC_SNAPSHOT}/gcc-4.1-${GCC_SNAPSHOT}.tar.bz2
+ mirror://kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2
+ http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip
+ http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip"
+
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="doc"
+
+RDEPEND=">=sys-devel/binutils-2.14.90.0.6-r1"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ >=sys-devel/bison-1.875"
+
+RESTRICT="strip"
+
+src_unpack() {
+ unpack ${A}
+
+ # start by patching and cleaning out binutils and gcc directories.
+ cd "${WORKDIR}"/binutils-${BASE_BINUTILS}
+ epatch "${S}"/sources/gcc/gas-${BIN_VER}-tigcc-*.diff
+
+ rm -f .brik
+ rm -f md5.sum
+ rm -f -r INSTALL
+ rm -f -r maintainer-scripts
+ rm -f -r binutils
+ rm -f -r cpu
+ rm -f -r etc
+ rm -f -r gas/doc
+ rm -f -r gas/po
+ rm -f -r gprof
+ rm -f -r include/nlm
+ rm -f -r include/regs
+ rm -f -r ld
+ rm -f -r texinfo
+
+ cd "${WORKDIR}"/gcc-4.1-${GCC_SNAPSHOT}
+ epatch "${S}"/sources/gcc/gcc-4.1-tigcc-patch.diff
+
+ rm -f .brik
+ rm -f md5.sum
+ rm -f -r INSTALL
+ rm -f -r fixincludes
+ rm -f -r gcc/ginclude
+ rm -f -r gcc/po
+ rm -f -r gcc/doc
+ rm -f -r gcc/treelang
+ rm -f -r libcpp/po
+ rm -f -r maintainer-scripts
+ rm -f -r etc
+ rm -f -r gprof
+ rm -f -r include/nlm
+ rm -f -r include/regs
+ rm -f -r texinfo
+
+ # create build directories for binutils and gcc
+ mkdir -p "${WORKDIR}"/build/binutils
+ mkdir "${WORKDIR}"/build/gcc
+
+ # Workaround for non-existing directories
+ sed -ie '/SUBDIRS =/d' "${WORKDIR}"/binutils-${BASE_BINUTILS}/gas/Makefile.in
+}
+
+src_compile() {
+ # build binutils
+ cd "${WORKDIR}"/build/binutils
+ CFLAGS="${CFLAGS}" "${WORKDIR}"/binutils-${BASE_BINUTILS}/configure \
+ --disable-serial-configure --target=m68k-coff --disable-shared \
+ --enable-static --disable-multilib --disable-nls \
+ || die
+ emake || die "gas"
+
+ # build gcc
+ cd "${WORKDIR}"/build/gcc
+ CFLAGS="${CFLAGS}" "${WORKDIR}"/gcc-4.1-${GCC_SNAPSHOT}/configure --target=m68k-coff \
+ --with-gnu-as --with-as="${WORKDIR}"/build/binutils/gas/as-new --with-gnu-ld \
+ --disable-nls --disable-multilib --disable-shared --enable-static \
+ --disable-threads --enable-languages=c --disable-win32-registry \
+ --disable-checking --disable-werror --disable-pch --disable-mudflap \
+ || die
+
+ # GCC compilations _is intended_ to fail on a certain point,
+ # don't worry about that.
+ emake -j1
+
+ # Check if gcc has been built, die otherwise
+ ( [ -e "${WORKDIR}"/build/gcc/gcc/xgcc ] && [ -e "${WORKDIR}"/build/gcc/gcc/cc1 ] ) || die "gcc"
+
+ # build a68k assembler
+ cd "${S}"/sources/a68k
+ emake -e || die "a68k"
+
+ # build ld-tigcc linker
+ cd "${S}"/sources/ld-tigcc
+ emake -e || die "ld-tigcc"
+
+ # build tigcc front-end
+ cd "${S}"/sources/tigcc/src
+ emake -e || die "tigcc"
+
+ # build tprbuilder (TIGCC project builder)
+ cd "${S}"/sources/tprbuilder/src
+ emake -e || die "tprbuilder"
+
+ # build patcher (object file patcher)
+ cd "${S}"/sources/patcher/src
+ emake -e || die "patcher"
+
+}
+
+src_install() {
+ # install documentation
+ dodir /usr/bin
+
+ if use doc ; then
+ # patch the script that launches the documentation
+ # browser to point to the correct location
+ sed "s:\${TIGCC}/doc:/usr/share/doc/${P}:g" \
+ "${S}"/tigcclib/doc/converter/tigccdoc \
+ > "${S}"/tigcclib/doc/converter/tigccdoc.new
+
+ cd "${S}"/tigcclib/doc/converter
+ newbin tigccdoc.new tigccdoc
+ cd "${S}"/tigcclib/doc
+ dohtml -r html/*
+ cp html/qt-assistant.adp "${D}"/usr/share/doc/${PF}/html
+
+ cd "${S}"/sources/a68k
+ fi
+
+ dodir /usr/share/doc/${PF}
+ cd "${S}"
+ dodoc AUTHORS BUGS CHANGELOG DIRECTORIES HOWTO \
+ INSTALL README README.linux README.osX
+
+ cd "${S}"/sources/tigcc
+ docinto tigcc
+ dodoc AUTHORS ChangeLog README
+
+ cd "${S}"/sources/tprbuilder
+ docinto tprbuilder
+ dodoc AUTHORS ChangeLog README
+
+ cd "${S}"/sources/patcher
+ docinto patcher
+ dodoc AUTHORS ChangeLog README
+
+ exeinto /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}
+ # install gcc
+ cd "${WORKDIR}"/build/gcc
+ doexe gcc/cc1
+ newexe gcc/xgcc gcc
+ dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/gcc \
+ /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-gcc
+
+ # install gas
+ # exeinto /usr/ti-linux-gnu/bin <-- a symlink will be
+ # created so that gas resides in /usr/ti-linux-gnu/bin too
+ cd "${WORKDIR}"/build/binutils
+ newexe gas/as-new as
+
+ # install a68k
+ cd "${S}"/sources/a68k
+ newexe A68k a68k
+
+ # install ld-tigcc
+ cd "${S}"/sources/ld-tigcc
+ doexe ld-tigcc
+ doexe ar-tigcc
+
+ # install tigcc
+ cd "${S}"/sources/tigcc/src
+ doexe tigcc
+ dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/tigcc \
+ /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-tigcc
+
+ # install tprbuilder
+ cd "${S}"/sources/tprbuilder/src
+ doexe tprbuilder
+
+ # install patcher
+ cd "${S}"/sources/patcher/src
+ doexe patcher
+
+ # install header files
+ dodir /usr/include/tigcc
+ cp -R "${S}"/tigcclib/include/* "${D}"/usr/include/tigcc
+ dosym /usr/include/tigcc/asm/os.h /usr/include/tigcc/asm/OS.h
+
+ insinto /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}
+ # install library
+ cd "${S}"/tigcclib
+ doins lib/*
+ cd "${WORKDIR}"
+ doins flashos.a
+ doins fargo.a
+
+ dodir /usr/share/tigcc
+ # copy example programs
+ # cp -r "${S}"/examples ${D}/usr/share/tigcc
+
+ # create TIGCC env variable
+ dodir /etc/env.d/gcc
+ # echo -e "TIGCC=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}\"" >> ${ENV_FILE}
+ # echo -e "CC=\"tigcc\"" >> ${ENV_FILE}
+ echo -e "TIGCC=\"/usr/ti-linux-gnu\"" >> ${ENV_FILE}
+ echo -e "PATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
+ echo -e "ROOTPATH=\"/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin\"" >> ${ENV_FILE}
+ echo -e "LDPATH=\"/usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}\"" >> ${ENV_FILE}
+
+ # a cross-compiling gcc with hard-coded names has been built.
+ # therefore, we must place some symlinks.
+ dosym /usr/include/tigcc /usr/ti-linux-gnu/include
+ dosym /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER} /usr/ti-linux-gnu/lib
+ dosym /usr/share/doc/${PF} /usr/ti-linux-gnu/doc
+ dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER} /usr/ti-linux-gnu/bin
+}
diff --git a/dev-embedded/tigcc/tigcc-0.96_beta8-r1.ebuild b/dev-embedded/tigcc/tigcc-0.96_beta8-r1.ebuild
new file mode 100644
index 000000000000..fdad6d1b9deb
--- /dev/null
+++ b/dev-embedded/tigcc/tigcc-0.96_beta8-r1.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+BASE_BINUTILS="2.16.1"
+GCC_VER="4.1.2"
+GCC_SNAPSHOT="20060728"
+BIN_VER=${BASE_BINUTILS:0:4}
+
+DESCRIPTION="Cross compiler for Texas Instruments TI-89, TI-92(+) and V200 calculators"
+HOMEPAGE="http://tigcc.ticalc.org/"
+
+#original source can be found at:
+#SRC_URI="http://tigcc.ticalc.org/linux/tigcc_src.tar.bz2"
+#but in fact this file changes as soon as there comes a new beta
+
+#when it hits portage of course it should be mirrored on a gentoo mirror:
+#SRC_URI="mirror://gentoo/${PF}.tar.bz2"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-${GCC_SNAPSHOT}/gcc-4.1-${GCC_SNAPSHOT}.tar.bz2
+ mirror://kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2
+ http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip
+ http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="doc"
+RESTRICT="strip"
+
+RDEPEND=">=sys-devel/binutils-2.14.90.0.6-r1"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ >=sys-devel/bison-1.875"
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+
+ # start by patching and cleaning out binutils and gcc directories.
+ cd "${WORKDIR}"/binutils-${BASE_BINUTILS}
+ epatch "${S}"/sources/gcc/gas-${BIN_VER}-tigcc-*.diff
+
+ rm -f .brik
+ rm -f md5.sum
+ rm -f -r INSTALL
+ rm -f -r maintainer-scripts
+ rm -f -r binutils
+ rm -f -r cpu
+ rm -f -r etc
+ rm -f -r gas/doc
+ rm -f -r gas/po
+ rm -f -r gprof
+ rm -f -r include/nlm
+ rm -f -r include/regs
+ rm -f -r ld
+ rm -f -r texinfo
+
+ cd "${WORKDIR}"/gcc-4.1-${GCC_SNAPSHOT}
+ epatch "${S}"/sources/gcc/gcc-4.1-tigcc-patch.diff
+
+ rm -f .brik
+ rm -f md5.sum
+ rm -f -r INSTALL
+ rm -f -r fixincludes
+ rm -f -r gcc/ginclude
+ rm -f -r gcc/po
+ rm -f -r gcc/doc
+ rm -f -r gcc/treelang
+ rm -f -r libcpp/po
+ rm -f -r maintainer-scripts
+ rm -f -r etc
+ rm -f -r gprof
+ rm -f -r include/nlm
+ rm -f -r include/regs
+ rm -f -r texinfo
+
+ # create build directories for binutils and gcc
+ mkdir -p "${WORKDIR}"/build/binutils
+ mkdir "${WORKDIR}"/build/gcc
+
+ # Workaround for non-existing directories
+ sed -ie '/SUBDIRS =/d' "${WORKDIR}"/binutils-${BASE_BINUTILS}/gas/Makefile.in
+}
+
+src_compile() {
+ # build binutils
+ cd "${WORKDIR}"/build/binutils
+ CFLAGS="${CFLAGS}" "${WORKDIR}"/binutils-${BASE_BINUTILS}/configure \
+ --disable-serial-configure --target=m68k-coff --disable-shared \
+ --enable-static --disable-multilib --disable-nls \
+ || die
+ emake || die "gas"
+
+ # build gcc
+ cd "${WORKDIR}"/build/gcc
+ CFLAGS="${CFLAGS}" "${WORKDIR}"/gcc-4.1-${GCC_SNAPSHOT}/configure --target=m68k-coff \
+ --with-gnu-as --with-as="${WORKDIR}"/build/binutils/gas/as-new --with-gnu-ld \
+ --disable-nls --disable-multilib --disable-shared --enable-static \
+ --disable-threads --enable-languages=c --disable-win32-registry \
+ --disable-checking --disable-werror --disable-pch --disable-mudflap \
+ || die
+
+ # GCC compilations _is intended_ to fail on a certain point,
+ # don't worry about that.
+ emake -j1
+
+ # Check if gcc has been built, die otherwise
+ ( [ -e "${WORKDIR}"/build/gcc/gcc/xgcc ] && [ -e "${WORKDIR}"/build/gcc/gcc/cc1 ] ) || die "gcc"
+
+ # build a68k assembler
+ cd "${S}"/sources/a68k
+ emake -e || die "a68k"
+
+ # build ld-tigcc linker
+ cd "${S}"/sources/ld-tigcc
+ emake -e || die "ld-tigcc"
+
+ # build tigcc front-end
+ cd "${S}"/sources/tigcc/src
+ emake -e || die "tigcc"
+
+ # build tprbuilder (TIGCC project builder)
+ cd "${S}"/sources/tprbuilder/src
+ emake -e || die "tprbuilder"
+
+ # build patcher (object file patcher)
+ cd "${S}"/sources/patcher/src
+ emake -e || die "patcher"
+
+}
+
+src_install() {
+ # install documentation
+ dodir /usr/bin
+
+ if use doc ; then
+ # patch the script that launches the documentation
+ # browser to point to the correct location
+ sed "s:\${TIGCC}/doc:/usr/share/doc/${P}:g" \
+ "${S}"/tigcclib/doc/converter/tigccdoc \
+ > "${S}"/tigcclib/doc/converter/tigccdoc.new
+
+ cd "${S}"/tigcclib/doc/converter
+ newbin tigccdoc.new tigccdoc
+ cd "${S}"/tigcclib/doc
+ dohtml -r html/*
+ cp html/qt-assistant.adp "${D}"/usr/share/doc/${PF}/html
+
+ cd "${S}"/sources/a68k
+ fi
+
+ dodir /usr/share/doc/${PF}
+ cd "${S}"
+ dodoc AUTHORS BUGS CHANGELOG DIRECTORIES HOWTO \
+ INSTALL README README.linux README.osX
+
+ cd "${S}"/sources/tigcc
+ docinto tigcc
+ dodoc AUTHORS ChangeLog README
+
+ cd "${S}"/sources/tprbuilder
+ docinto tprbuilder
+ dodoc AUTHORS ChangeLog README
+
+ cd "${S}"/sources/patcher
+ docinto patcher
+ dodoc AUTHORS ChangeLog README
+
+ exeinto /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}
+ # install gcc
+ cd "${WORKDIR}"/build/gcc
+ doexe gcc/cc1
+ newexe gcc/xgcc gcc
+ dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/gcc \
+ /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-gcc
+
+ # install gas
+ # exeinto /usr/ti-linux-gnu/bin <-- a symlink will be
+ # created so that gas resides in /usr/ti-linux-gnu/bin too
+ cd "${WORKDIR}"/build/binutils
+ newexe gas/as-new as
+
+ # install a68k
+ cd "${S}"/sources/a68k
+ newexe A68k a68k
+
+ # install ld-tigcc
+ cd "${S}"/sources/ld-tigcc
+ doexe ld-tigcc
+ doexe ar-tigcc
+
+ # install tigcc
+ cd "${S}"/sources/tigcc/src
+ doexe tigcc
+ dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/tigcc \
+ /usr/ti-linux-gnu/tigcc-bin/${GCC_VER}/ti-linux-gnu-tigcc
+
+ # install tprbuilder
+ cd "${S}"/sources/tprbuilder/src
+ doexe tprbuilder
+
+ # install patcher
+ cd "${S}"/sources/patcher/src
+ doexe patcher
+
+ # install header files
+ dodir /usr/include/tigcc
+ cp -R "${S}"/tigcclib/include/* "${D}"/usr/include/tigcc
+ dosym /usr/include/tigcc/asm/os.h /usr/include/tigcc/asm/OS.h
+
+ insinto /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}
+ # install library
+ cd "${S}"/tigcclib
+ doins lib/*
+ cd "${WORKDIR}"
+ doins flashos.a
+ doins fargo.a
+
+ dodir /usr/share/tigcc
+ # copy example programs
+ # cp -r "${S}"/examples ${D}/usr/share/tigcc
+
+ # create TIGCC env variable
+ # TIGCC="/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}"
+ # CC="tigcc"
+ cat <<-EOF > 99tigcc
+ TIGCC="/usr/ti-linux-gnu"
+ PATH="/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin"
+ ROOTPATH="/usr/ti-linux-gnu/tigcc-bin/${GCC_VER}:/usr/ti-linux-gnu/bin"
+ LDPATH="/usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER}"
+ EOF
+ doenvd 99tigcc
+
+ # a cross-compiling gcc with hard-coded names has been built.
+ # therefore, we must place some symlinks.
+ dosym /usr/include/tigcc /usr/ti-linux-gnu/include
+ dosym /usr/lib/gcc-lib/ti-linux-gnu/${GCC_VER} /usr/ti-linux-gnu/lib
+ dosym /usr/share/doc/${PF} /usr/ti-linux-gnu/doc
+ dosym /usr/ti-linux-gnu/tigcc-bin/${GCC_VER} /usr/ti-linux-gnu/bin
+}
diff --git a/dev-embedded/u-boot-tools/Manifest b/dev-embedded/u-boot-tools/Manifest
new file mode 100644
index 000000000000..012e9ebc10d4
--- /dev/null
+++ b/dev-embedded/u-boot-tools/Manifest
@@ -0,0 +1,4 @@
+DIST u-boot-2013.07.tar.bz2 10067674 SHA256 2bbd440c1b29928d230604eac372fda5152d3ae23f52b1910c77fc5bf531250b SHA512 5c0725c9c5c7c9101d7ef8eb659aafb513ca5742fbafec55e0b64cd68b3e37520de55f71aebba59bf979b8daef2b0c71645b5ab343b7057d601b3cd6ffc6e763 WHIRLPOOL 41f1a78b6f7af206bb2a6c04be23ad1aceaa4a105ede4794b4a9d6777e3e92ae2014906be30c749cae51ea9d865f7e565185d9baaa0e953b01a053b62621ad66
+DIST u-boot-2014.01.tar.bz2 10180625 SHA256 cdaf8c81583abfa2e73da46cfcf87b0cbd9741d9aa766f3b905376e3652d543d SHA512 c6e4f6f9a2dae1a50b7dd94dad13ef5d0ce440c3f0401de3f0ecf907c8fca0ff183077ec3b2c4da42b0fa9775450b03571725c76dfd2419a4ee7b982c261ccb1 WHIRLPOOL 9964abde477ce54dfe0a0972920e19c6d60209e8a19819c98b955a9a8b23cc57ac8e687d9ced65411eb6ff1ac40121edac154e754b3b5a2f037cf3a7724de374
+DIST u-boot-2015.01.tar.bz2 9982195 SHA256 383051a656ebe11757b17d38a3326387e4a1b0949ca8a9e8ee506bf71dac9fde SHA512 6697c6da5f463bdfa75b8025a2dd302e9cda58ce36bc3252590f11976807aeccc1ca76be93cbc83d3367a7557878516bb57130ffb76197ffd513640c48e18938 WHIRLPOOL 7ed552f0f32d061c1723c42f0230611d6552068765ea3130fe070d1a906da2defafa14a67078ef7feda4ed29857f51a5b47b3595aa7a8eb07bf26778a3517aff
+DIST u-boot-2015.04.tar.bz2 9471487 SHA256 0a1a70df586655f527befa6f12e184e96ed61b126e5a567382321b17200f5d60 SHA512 e50a3d7e44bf588a7cf8e28cdf3342bc38bd1bf55231d579c2501b75386cfff0fbc7a34648d893971e0095510c9d582b7180427832cb78470b4e7af2ce0e3646 WHIRLPOOL dbfd4b13b82505ef94e8b394ba260684ee18c881bd84adfc841194ce6a4b967c8514cedfcac6777045a50b940e3a1882af667e152dc0fc0d3b9254a7dfca89d0
diff --git a/dev-embedded/u-boot-tools/files/u-boot-no-config.h.patch b/dev-embedded/u-boot-tools/files/u-boot-no-config.h.patch
new file mode 100644
index 000000000000..1009ab00f5b2
--- /dev/null
+++ b/dev-embedded/u-boot-tools/files/u-boot-no-config.h.patch
@@ -0,0 +1,92 @@
+This patch has been reverted later on by
+http://git.denx.de/?p=u-boot.git;a=commit;h=e3c52f2b8779469c843eb79282396f1a5ca3fef5
+
+but we still need it to build the tools without having to configure
+a full u-boot environment.
+
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 10 Nov 2012 19:47:47 +0000 (+0000)
+Subject: fw_env: fix building w/out a config.h
+X-Git-Tag: v2013.01-rc3~19
+X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=92ace272d06cec1d7f1533bb9edf914fb5845fba;hp=7a546db2ffc6a713fb8009d8246c29da5420f6a7
+
+fw_env: fix building w/out a config.h
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+
+diff --git a/tools/env/Makefile b/tools/env/Makefile
+index 0e798e0..e6dc5f3 100644
+--- a/tools/env/Makefile
++++ b/tools/env/Makefile
+@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
+ HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c
+ HOSTSRCS += $(SRCTREE)/lib/ctype.c $(SRCTREE)/lib/linux_string.c
+ HOSTSRCS += $(SRCTREE)/common/env_attr.c $(SRCTREE)/common/env_flags.c
+-HEADERS := fw_env.h $(OBJTREE)/include/config.h
++HEADERS := fw_env.h
+
+ # Compile for a hosted environment on the target
+ HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
+@@ -36,6 +36,15 @@ HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
+ -DUSE_HOSTCC \
+ -DTEXT_BASE=$(TEXT_BASE)
+
++# Pass CONFIG_xxx settings via the command line so that we can build w/out
++# a config.h file existing in the first place. Useful for generic builds.
++CONFIG_VARS_TO_PASS = \
++ ENV_OVERWRITE \
++ OVERWRITE_ETHADDR_ONCE \
++ ETHADDR
++HOSTCPPFLAGS += \
++ $(foreach x,$(CONFIG_VARS_TO_PASS),$(if $(CONFIG_$(x)),-DCONFIG_$(x)=$(CONFIG_$(x))))
++
+ ifeq ($(MTD_VERSION),old)
+ HOSTCPPFLAGS += -DMTD_OLD
+ endif
+diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
+index a1a6807..19703c7 100644
+--- a/tools/env/fw_env.h
++++ b/tools/env/fw_env.h
+@@ -21,15 +21,6 @@
+ * MA 02111-1307 USA
+ */
+
+-/* Pull in the current config to define the default environment */
+-#ifndef __ASSEMBLY__
+-#define __ASSEMBLY__ /* get only #defines from config.h */
+-#include <config.h>
+-#undef __ASSEMBLY__
+-#else
+-#include <config.h>
+-#endif
+-
+ /*
+ * To build the utility with the static configuration
+ * comment out the next line.
+@@ -52,22 +43,6 @@
+ #define DEVICE2_ENVSECTORS 2
+ #endif
+
+-#ifndef CONFIG_BAUDRATE
+-#define CONFIG_BAUDRATE 115200
+-#endif
+-
+-#ifndef CONFIG_BOOTDELAY
+-#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
+-#endif
+-
+-#ifndef CONFIG_BOOTCOMMAND
+-#define CONFIG_BOOTCOMMAND \
+- "bootp; " \
+- "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \
+- "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
+- "bootm"
+-#endif
+-
+ extern int fw_printenv(int argc, char *argv[]);
+ extern char *fw_getenv (char *name);
+ extern int fw_setenv (int argc, char *argv[]);
diff --git a/dev-embedded/u-boot-tools/metadata.xml b/dev-embedded/u-boot-tools/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/u-boot-tools/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2013.07.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2013.07.ebuild
new file mode 100644
index 000000000000..b07f862de877
--- /dev/null
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2013.07.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="u-boot-${PV/_/-}"
+DESCRIPTION="utilities for working with Das U-Boot"
+HOMEPAGE="http://www.denx.de/wiki/U-Boot/WebHome"
+SRC_URI="ftp://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e "s:-g ::" tools/Makefile || die
+ # Make sure we find local u-boot headers first #429302
+ ln -s ../include/image.h tools/ || die
+ epatch "${FILESDIR}"/u-boot-no-config.h.patch
+}
+
+src_compile() {
+ emake \
+ HOSTSTRIP=: \
+ HOSTCC="$(tc-getCC)" \
+ HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
+ HOSTLDFLAGS="${LDFLAGS}" \
+ CONFIG_ENV_OVERWRITE=y \
+ tools-all
+}
+
+src_install() {
+ cd tools
+ dobin bmp_logo gen_eth_addr img2srec mkimage
+ dobin easylogo/easylogo
+ dobin env/fw_printenv
+ dosym fw_printenv /usr/bin/fw_setenv
+ insinto /etc
+ doins env/fw_env.config
+}
diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2014.01.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2014.01.ebuild
new file mode 100644
index 000000000000..f7fee91fc64b
--- /dev/null
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2014.01.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="u-boot-${PV/_/-}"
+DESCRIPTION="utilities for working with Das U-Boot"
+HOMEPAGE="http://www.denx.de/wiki/U-Boot/WebHome"
+SRC_URI="ftp://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i "s:-g ::" tools/Makefile || die
+ # Make sure we find local u-boot headers first #429302
+ ln -s ../include/image.h tools/ || die
+ epatch "${FILESDIR}"/u-boot-no-config.h.patch
+}
+
+src_compile() {
+ emake \
+ HOSTSTRIP=: \
+ HOSTCC="$(tc-getCC)" \
+ HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
+ HOSTLDFLAGS="${LDFLAGS}" \
+ CONFIG_ENV_OVERWRITE=y \
+ tools-all
+}
+
+src_install() {
+ cd tools
+ dobin bmp_logo gen_eth_addr img2srec mkimage
+ dobin easylogo/easylogo
+ dobin env/fw_printenv
+ dosym fw_printenv /usr/bin/fw_setenv
+ insinto /etc
+ doins env/fw_env.config
+}
diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2015.01.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2015.01.ebuild
new file mode 100644
index 000000000000..3a0bedb4ecfe
--- /dev/null
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2015.01.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="u-boot-${PV/_/-}"
+DESCRIPTION="utilities for working with Das U-Boot"
+HOMEPAGE="http://www.denx.de/wiki/U-Boot/WebHome"
+SRC_URI="ftp://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ # Unset a few KBUILD variables. Bug #540476
+ unset KBUILD_OUTPUT KBUILD_SRC
+ emake defconfig
+ emake \
+ HOSTSTRIP=: \
+ HOSTCC="$(tc-getCC)" \
+ HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
+ HOSTLDFLAGS="${LDFLAGS}" \
+ CONFIG_ENV_OVERWRITE=y \
+ tools-all
+}
+
+src_install() {
+ cd tools
+ dobin bmp_logo gen_eth_addr img2srec mkimage
+ dobin easylogo/easylogo
+ dobin env/fw_printenv
+ dosym fw_printenv /usr/bin/fw_setenv
+ insinto /etc
+ doins env/fw_env.config
+}
diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2015.04.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2015.04.ebuild
new file mode 100644
index 000000000000..c9dfa6c449b2
--- /dev/null
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2015.04.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="u-boot-${PV/_/-}"
+DESCRIPTION="utilities for working with Das U-Boot"
+HOMEPAGE="http://www.denx.de/wiki/U-Boot/WebHome"
+SRC_URI="ftp://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ # Unset a few KBUILD variables. Bug #540476
+ unset KBUILD_OUTPUT KBUILD_SRC
+ emake defconfig
+ emake \
+ HOSTSTRIP=: \
+ STRIP=: \
+ HOSTCC="$(tc-getCC)" \
+ HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
+ HOSTLDFLAGS="${LDFLAGS}" \
+ CONFIG_ENV_OVERWRITE=y \
+ tools-all
+}
+
+src_install() {
+ cd tools
+ dobin bmp_logo gen_eth_addr img2srec mkimage
+ dobin easylogo/easylogo
+ dobin env/fw_printenv
+ dosym fw_printenv /usr/bin/fw_setenv
+ insinto /etc
+ doins env/fw_env.config
+ doman "${S}/doc/mkimage.1"
+}
diff --git a/dev-embedded/uisp/Manifest b/dev-embedded/uisp/Manifest
new file mode 100644
index 000000000000..5714c6a50658
--- /dev/null
+++ b/dev-embedded/uisp/Manifest
@@ -0,0 +1 @@
+DIST uisp-20050207.tar.gz 166745 SHA256 7c43c5f34f00a7243bda87457e43dc9122b5a3837b1370b30f39c1eecbedccae SHA512 1dd62d97c2a459abaed4ce60302e7153564d0fd87689c40d175757549fe8e797749fd2f76c6c02bcb85e56600d7e4c790c396dc2b56e152ead486df8e1bc2fe7 WHIRLPOOL 0cd0361ae5b12823a5d494f763b3719e3d0f939a232d4664f5282f028e505438968d175916c8b877a77c1edc7b53adc6d55a3e034bb1399f2f98bfc412db69ec
diff --git a/dev-embedded/uisp/files/mega-48-88-168.patch b/dev-embedded/uisp/files/mega-48-88-168.patch
new file mode 100644
index 000000000000..dad337b740a7
--- /dev/null
+++ b/dev-embedded/uisp/files/mega-48-88-168.patch
@@ -0,0 +1,29 @@
+diff -Nura uisp-20050207/src/Avr.C uisp-20050207+mega-48-88-168/src/Avr.C
+--- uisp-20050207/src/Avr.C 2005-02-07 19:55:08.000000000 -0300
++++ uisp-20050207+mega-48-88-168/src/Avr.C 2005-06-28 17:11:15.000000000 -0300
+@@ -77,7 +77,7 @@
+ /* no longer in production? -> use 8515, 8535 instead */
+ { "AT90S4414", 0x92, 0x01, 4096, 0, 256, 4000, 4000, AVR_2313 },
+ { "AT90S4434", 0x92, 0x02, 4096, 0, 256, 4000, 4000, AVR_8535 },
+- { "ATmega48", 0x92, 0x05, 4096, 0, 256, 4000, 4000, AVR_M163 },
++ { "ATmega48", 0x92, 0x05, 4096, 32, 256, 2000, 1500, AVR_M163 },
+
+ { "AT90S8515", 0x93, 0x01, 8192, 0, 512, 4000, 4000, AVR_2313 },
+ { "AT90S8535", 0x93, 0x03, 8192, 0, 512, 4000, 4000, AVR_8535 },
+@@ -90,7 +90,7 @@
+ { "ATmega8515", 0x93, 0x06, 8192, 64, 512, 4500, 9000, AVR_M163 },
+ { "ATmega8", 0x93, 0x07, 8192, 64, 512, 4500, 9000, AVR_M163 },
+ { "ATmega8535", 0x93, 0x08, 8192, 64, 512, 4500, 9000, AVR_M163 },
+- { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 4000, 4000, AVR_M163 },
++ { "ATmega88", 0x93, 0x0a, 8192, 64, 512, 2000, 1500, AVR_M163 },
+
+ #if 0
+ /* 12V parallel programming only; here just for the evidence */
+@@ -101,6 +101,7 @@
+ { "ATmega163", 0x94, 0x02, 16384, 128, 512, 15000, 3800, AVR_M163 },
+ { "ATmega16", 0x94, 0x03, 16384, 128, 512, 4500, 9000, AVR_M163 },
+ { "ATmega162", 0x94, 0x04, 16384, 128, 512, 4500, 9000, AVR_M128 },
++ { "ATmega168", 0x94, 0x06, 16384, 128, 512, 2000, 1500, AVR_M163 },
+ { "ATmega169", 0x94, 0x05, 16384, 128, 512, 4500, 9000, AVR_M128 },
+
+ { "ATmega323", 0x95, 0x01, 32768, 128, 1024, 15000, 3800, AVR_M163 },
diff --git a/dev-embedded/uisp/metadata.xml b/dev-embedded/uisp/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/uisp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/uisp/uisp-20050207-r1.ebuild b/dev-embedded/uisp/uisp-20050207-r1.ebuild
new file mode 100644
index 000000000000..a49013c110ca
--- /dev/null
+++ b/dev-embedded/uisp/uisp-20050207-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="tool for AVR microcontrollers which can interface to many hardware in-system programmers"
+HOMEPAGE="http://savannah.nongnu.org/projects/uisp"
+SRC_URI="http://savannah.nongnu.org/download/uisp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+src_prepare() {
+ sed -i -e "/^DOC_INST_DIR/s:/[^/]*$:/${PF}:" Makefile.in || die
+ cd src
+ epatch "${FILESDIR}"/mega-48-88-168.patch
+ sed -i -e 's: -Werror::' Makefile.in || die
+}
+
+src_install() {
+ default
+ dodoc doc/*
+ rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
+}
diff --git a/dev-embedded/upslug2/Manifest b/dev-embedded/upslug2/Manifest
new file mode 100644
index 000000000000..1bf8765b2529
--- /dev/null
+++ b/dev-embedded/upslug2/Manifest
@@ -0,0 +1 @@
+DIST upslug2-11.tar.gz 129619 SHA256 24859c992fb58f0bf4840e1378da91b942c73263b0213096e6755436af8d16bc SHA512 6814a237387b60aa20cc26bbd7ff9e886510d627849b13097e7473aa38501810b1d1871cfdc4f5a44eea2b375c3b58b1e59dcfd5b39178de33600b2a0aa94117 WHIRLPOOL 4d943dbd33a1bfe8b56d814808d7a45d3fe24d6239db8129a347b1c20ce89b92feb361f5dd8e082d831c9937dae43e1aa0db8ba16e53d8bdbaf378591c907dbd
diff --git a/dev-embedded/upslug2/metadata.xml b/dev-embedded/upslug2/metadata.xml
new file mode 100644
index 000000000000..581cfc473675
--- /dev/null
+++ b/dev-embedded/upslug2/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <herd>arm</herd>
+ <upstream>
+ <remote-id type="sourceforge">nslu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/upslug2/upslug2-11.ebuild b/dev-embedded/upslug2/upslug2-11.ebuild
new file mode 100644
index 000000000000..d2a4a952373c
--- /dev/null
+++ b/dev-embedded/upslug2/upslug2-11.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="util for flashing NSLU2 machines remotely"
+HOMEPAGE="http://www.nslu2-linux.org/wiki/Main/UpSlug2"
+SRC_URI="mirror://sourceforge/nslu/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ mv "${D}"/usr/{sbin,bin} || die
+ fperms 4711 /usr/bin/upslug2
+ dodoc AUTHORS ChangeLog NEWS README*
+}
diff --git a/dev-embedded/urjtag/Manifest b/dev-embedded/urjtag/Manifest
new file mode 100644
index 000000000000..44d8a84cc6f6
--- /dev/null
+++ b/dev-embedded/urjtag/Manifest
@@ -0,0 +1 @@
+DIST urjtag-0.10.tar.bz2 959834 SHA256 7b740416240923ce3610c5253112ee4eac890461b7af982859ff24d41c5778b7 SHA512 245fc276793dbc7791be0989b75beba7f16e8543f35403d645aadcee8d8d613261509392da7e5dd97e5a2de6e87b18276c394cc6353f01e5d1d4907ffb5811ff WHIRLPOOL 2bcda2ab3653ce507b352350007c9a0e774f77ca2ef3db98aeeff4a8f92a68c0c2376c5b5a2e1c3b85d8b366d0f72c5db1d7e8ca8372a083f5e763f38f0670e0
diff --git a/dev-embedded/urjtag/metadata.xml b/dev-embedded/urjtag/metadata.xml
new file mode 100644
index 000000000000..4089bd78e371
--- /dev/null
+++ b/dev-embedded/urjtag/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-embedded</herd>
+ <use>
+ <flag name="ftd2xx">Enable support for USB FTDI chips via <pkg>dev-embedded/libftd2xx</pkg></flag>
+ <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">urjtag</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/urjtag/urjtag-0.10.ebuild b/dev-embedded/urjtag/urjtag-0.10.ebuild
new file mode 100644
index 000000000000..1165f2b47c6d
--- /dev/null
+++ b/dev-embedded/urjtag/urjtag-0.10.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="tool for communicating over JTAG with flash chips, CPUs, and many more (fork of openwince jtag)"
+HOMEPAGE="http://urjtag.sourceforge.net/"
+SRC_URI="mirror://sourceforge/urjtag/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="ftdi readline"
+
+DEPEND="!dev-embedded/jtag
+ ftdi? ( dev-embedded/libftdi )
+ readline? ( sys-libs/readline )"
+
+src_compile() {
+ use readline || export vl_cv_lib_readline=no
+ econf $(use_enable ftdi libftdi) || die
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "failed to install"
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+}
diff --git a/dev-embedded/urjtag/urjtag-9999.ebuild b/dev-embedded/urjtag/urjtag-9999.ebuild
new file mode 100644
index 000000000000..a2b83fffeaae
--- /dev/null
+++ b/dev-embedded/urjtag/urjtag-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO: figure out htf to make python.eclass work
+
+EAPI="4"
+
+inherit eutils multilib
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://urjtag.git.sourceforge.net/gitroot/urjtag/urjtag"
+ EGIT_SOURCEDIR=${WORKDIR}
+ inherit git-2 autotools
+ S=${WORKDIR}/${PN}
+else
+ SRC_URI="mirror://sourceforge/urjtag/${P}.tar.bz2"
+ KEYWORDS="amd64 ppc sparc x86"
+fi
+
+DESCRIPTION="tool for communicating over JTAG with flash chips, CPUs, and many more (fork of openwince jtag)"
+HOMEPAGE="http://urjtag.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ftd2xx ftdi readline static-libs usb"
+
+DEPEND="ftdi? ( dev-embedded/libftdi )
+ ftd2xx? ( dev-embedded/libftd2xx )
+ readline? ( sys-libs/readline )
+ usb? ( virtual/libusb:1 )"
+RDEPEND="${DEPEND}
+ !dev-embedded/jtag"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ mkdir -p m4
+ eautopoint
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use ftd2xx && LDFLAGS="${LDFLAGS} -L/opt/$(get_libdir)"
+
+ econf \
+ --disable-werror \
+ --disable-python \
+ $(use_with readline) \
+ $(use_with ftdi libftdi) \
+ $(use_with ftd2xx) \
+ $(use_enable static-libs static) \
+ $(use_with usb libusb 1.0)
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.la' -delete
+}
diff --git a/dev-embedded/usbprog/Manifest b/dev-embedded/usbprog/Manifest
new file mode 100644
index 000000000000..c1c0fbe2a216
--- /dev/null
+++ b/dev-embedded/usbprog/Manifest
@@ -0,0 +1 @@
+DIST usbprog-0.2.0.tar.bz2 4388629 SHA256 ac8b5994c6a17269a31d0fc3242c83c78f6026325f7f732c3a66cf2e5298da7d SHA512 b670da8c578b5afc5e0909e4e961468f6e2f54fe00c2061a21e8c88018c5fb40679c728b03dfeaf1a18f1b3fd527af4e1ceb563b922adb1f38fbb3a07a4b2216 WHIRLPOOL 74aca385eb0881fc4c4d92f7465155ffc26a69df822abcae1da6bef9417ed2048bb1b537ece355ed47e2bcc44e3d6acc4014a5ffe04317d3234f910a605be058
diff --git a/dev-embedded/usbprog/metadata.xml b/dev-embedded/usbprog/metadata.xml
new file mode 100644
index 000000000000..92114080841c
--- /dev/null
+++ b/dev-embedded/usbprog/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dev-embedded</herd>
+</pkgmetadata>
diff --git a/dev-embedded/usbprog/usbprog-0.2.0.ebuild b/dev-embedded/usbprog/usbprog-0.2.0.ebuild
new file mode 100644
index 000000000000..a17fe3149300
--- /dev/null
+++ b/dev-embedded/usbprog/usbprog-0.2.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="flashtool for the multi purpose programming adapter usbprog"
+HOMEPAGE="http://www.embedded-projects.net/index.php?page_id=215"
+SRC_URI="mirror://berlios/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs X"
+
+RDEPEND="X? ( >=x11-libs/wxGTK-2.6.0 )
+ >=dev-libs/libxml2-2.0.0
+ net-misc/curl
+ virtual/libusb:0
+ sys-libs/readline"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ $(use_enable X gui) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.la' -delete
+}
diff --git a/dev-embedded/zmac/Manifest b/dev-embedded/zmac/Manifest
new file mode 100644
index 000000000000..d7ea68508ee3
--- /dev/null
+++ b/dev-embedded/zmac/Manifest
@@ -0,0 +1 @@
+DIST zmac13.zip 82067 SHA256 02cc3f487f82632ce558b512c482789cbc8f39bba8d8d3650a43c36c68f9aaff SHA512 84c1206e3abf19809ab4358c0b5d46771cdcfdeb4ded14aa39d81ca7f9d3780ca1917823bd06f49ee9fafaaa079bdbe8b614ce842d44181f55d4287515a187a2 WHIRLPOOL 8ee06662ecabc85a7a3ff5876c28144e1a7eaf6d1b3c68e24eca5ef8918539311261bedb705dcade90ab00bf8e29f1b1f836a191017d3dc64f2c0bc215bd4e5a
diff --git a/dev-embedded/zmac/metadata.xml b/dev-embedded/zmac/metadata.xml
new file mode 100644
index 000000000000..8a1942bec228
--- /dev/null
+++ b/dev-embedded/zmac/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>ulm@gentoo.org</email>
+</maintainer>
+<longdescription>
+ zmac is a Z80 macro cross-assembler. It has all the features you'd expect.
+ It assembles the specified input file and produces raw binary output.
+ (It can optionally produce CP/M-style Intel hex format.) By default it
+ also produces a nicely-formatted listing of the m/c alongside the source.
+
+ As well as normal Z80 programs, zmac lets you write 8080 programs in Z80
+ assembly.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-embedded/zmac/zmac-1.3.ebuild b/dev-embedded/zmac/zmac-1.3.ebuild
new file mode 100644
index 000000000000..9f503592117e
--- /dev/null
+++ b/dev-embedded/zmac/zmac-1.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Z80 macro cross-assembler"
+HOMEPAGE="http://www.tim-mann.org/trs80resources.html"
+SRC_URI="http://www.tim-mann.org/trs80/${PN}${PV//.}.zip"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" || die
+}
+
+src_install() {
+ dobin zmac || die
+ doman zmac.1 || die
+ dodoc ChangeLog MAXAM NEWS README || die
+}