summaryrefslogtreecommitdiff
path: root/dev-embedded/pk2cmd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-embedded/pk2cmd
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-embedded/pk2cmd')
-rw-r--r--dev-embedded/pk2cmd/Manifest7
-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.xml11
-rw-r--r--dev-embedded/pk2cmd/pk2cmd-1.20.ebuild49
5 files changed, 100 insertions, 0 deletions
diff --git a/dev-embedded/pk2cmd/Manifest b/dev-embedded/pk2cmd/Manifest
new file mode 100644
index 000000000000..cc36fe9901d9
--- /dev/null
+++ b/dev-embedded/pk2cmd/Manifest
@@ -0,0 +1,7 @@
+AUX pk2cmd-add-share-dir-for-dev-file-1.20.patch 668 SHA256 c59040ad6b5d840f3e55990fa58230610aac9164196ea0b3255fc1f4616c882d SHA512 f586c7eed0eac0d68e495d582c85c802c98ac8c84f7f21b00616edbbace74b877d21fd43334e5accfd02413d4a6d9d9811241feec1eaeae3a7647c745206d638 WHIRLPOOL a22205d9a8b1c95f9fc341e5f3db41df47ec0787ea44267c19c58f7ad47f3beda411d1fcdf003380b41960a34a0c83cd03fb6bd62cb4bca05669484d6e48257b
+AUX pk2cmd-add-share-dir-for-dev-file.patch 671 SHA256 50c304a9b6465639df02599f2bdff7c3d8c45d4aa68be00727c649d43e65b078 SHA512 9e9a7fcbec7ca3c9d0f2204eb60eb8d984248f21a6b7a2f6c11ff8fbd8da64e1bb5a92a0e5283542c7c5cc3e4cb0ea0438687c2bbe449804e6c86426307f4d44 WHIRLPOOL e6eaa2c352f694442f2483a195dc9a3238320ded41659bfb364ad935b6d10db3bcc07cce0ae7e1f64d4ce258431a4d42db471439f183e99c8630e6d336cfbddf
+DIST pk2cmdv1.20LinuxMacSource.tar.gz 223175 SHA256 903027de5036eda3a648decece4acfcefe91e754ef0d4eacba0e5ba8b18857fa SHA512 72675eb287c1410c82ff49b4922afd28a8017b4e8517d10e77e0f0b111630f90881f778d754a47c97453f45412e965e281435d495fc70a047bd7357dd64f7b24 WHIRLPOOL f4f36412d4e653a20866bcbe9ec25b94e8ff4e75c1ae2e4944a42682832c9b64b683248bc559e73b976902906d2959492867f055291588cf66d9b83838174c75
+EBUILD pk2cmd-1.20.ebuild 1212 SHA256 1d033af2b7093c2973c329e2fb0e1e4ce090385cc78348fc8b6f0dfb6444fe9f SHA512 16960cfdb7887768008d8dc61d04b66cdf402852bee35542c93dab6d7b43c41dae4d4c8b80549d26b9801bb8df430bf982106219072efda4c20fb08919386358 WHIRLPOOL 6a7b16f1d3bbdc475b13f35a9c3816477f07c97ce4ad931154605019e1cfc19af4b8bf4ade978cadf6e82a9dec46a149ce889fed9bcc050d4a6cef6e677e481b
+MISC ChangeLog 3044 SHA256 feee102ac459706058c8af05cc5ad6e172fb4e306520deb3d5603a2d918479e5 SHA512 277c4a375da9762d3223ab6deee158b6609dd74deaf19a5ba9a8a158e7b1d8acc4908c43ae28d240295f1c888a126bbc95ec496319e09db75f18627e9206afd4 WHIRLPOOL a9a1c83730f71fd719d835caaa42a589ce4536abcff3de53ca82df6d1536f8261755e0869dc6b0ed64996483c99e44c32da8fea4d7ad7ce488653722caadbda4
+MISC ChangeLog-2015 1573 SHA256 935b921421cee1487c5fbd7bdd137a777e94c5a24b7d392a6ef6d504f5aa8e8c SHA512 c1103c0518e48e13b1c4697c90f452a6c5f0edefa59013225b703e7b989520df2224e6a2e47fc9cc528591437cf6796ff37de07701dd5ee62b7fd734921ba407 WHIRLPOOL 9bb6a499a9809728ec99ca84cad330a7e67ed28c2ac4310557b6073661e28ad92d14f0d53f8cb5c73a2d2c3841d9ae4ebd2bd2abe8c3568031e4a5835e9a81a6
+MISC metadata.xml 367 SHA256 b7b67f2fc54adf03857f1024784295bcedebc293481d25a7bfeaa073d2419cfb SHA512 09c3d20eb53c9927bb7489b3522f4daa0809a379760d950a33eed0b9ddfccfe1eae4324e5c674c4731779ccb45a95627575941f2d22387efcda406947256cb22 WHIRLPOOL 6620a00bfdc65555675fd5a7099d57c6ee2d9e1115e5b852865de97befd1759305373964af2afdabb0142a540d1472143a9e3aa287c016994e643775b20898a6
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..3435e2a089ff
--- /dev/null
+++ b/dev-embedded/pk2cmd/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 type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+</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..24cfe4769c1b
--- /dev/null
+++ b/dev-embedded/pk2cmd/pk2cmd-1.20.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+}