From 76334dd22b32c1334c1aac6eafac9a095e509005 Mon Sep 17 00:00:00 2001 From: Joseph Jezak Date: Sun, 21 Sep 2008 03:30:11 +0000 Subject: Added patch to allow pk2cmd to find the device file without changing the path. (Portage version: 2.1.4.4) --- dev-embedded/pk2cmd/ChangeLog | 9 +++- .../files/pk2cmd-add-share-dir-for-dev-file.patch | 17 ++++++++ dev-embedded/pk2cmd/pk2cmd-1.12.0-r1.ebuild | 50 ++++++++++++++++++++++ dev-embedded/pk2cmd/pk2cmd-1.12.0.ebuild | 47 -------------------- 4 files changed, 75 insertions(+), 48 deletions(-) create mode 100644 dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch create mode 100644 dev-embedded/pk2cmd/pk2cmd-1.12.0-r1.ebuild delete mode 100644 dev-embedded/pk2cmd/pk2cmd-1.12.0.ebuild (limited to 'dev-embedded') diff --git a/dev-embedded/pk2cmd/ChangeLog b/dev-embedded/pk2cmd/ChangeLog index c12b3ea3702c..65bfdd4e21b3 100644 --- a/dev-embedded/pk2cmd/ChangeLog +++ b/dev-embedded/pk2cmd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-embedded/pk2cmd # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-embedded/pk2cmd/ChangeLog,v 1.1 2008/09/19 06:58:18 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/pk2cmd/ChangeLog,v 1.2 2008/09/21 03:30:10 josejx Exp $ + +*pk2cmd-1.12.0-r1 (21 Sep 2008) + + 21 Sep 2008; Joseph Jezak + +files/pk2cmd-add-share-dir-for-dev-file.patch, -pk2cmd-1.12.0.ebuild, + +pk2cmd-1.12.0-r1.ebuild: + Added patch to allow pk2cmd to find the device file without changing the path. *pk2cmd-1.12.0 (19 Sep 2008) 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/pk2cmd-1.12.0-r1.ebuild b/dev-embedded/pk2cmd/pk2cmd-1.12.0-r1.ebuild new file mode 100644 index 000000000000..b2aab383a16c --- /dev/null +++ b/dev-embedded/pk2cmd/pk2cmd-1.12.0-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-embedded/pk2cmd/pk2cmd-1.12.0-r1.ebuild,v 1.1 2008/09/21 03:30:10 josejx Exp $ + +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="dev-libs/libusb" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}v${PV}LinuxMacSource" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Patch adds /usr/share/pk2 to the default search for the device file + epatch "${FILESDIR}/${PN}-add-share-dir-for-dev-file.patch" + + # Fix up the Makefile + sed -i 's:#TARGET=linux:TARGET=linux:' Makefile + sed -i 's:DBG=-O2:DBG=:' Makefile + sed -i 's:^CFLAGS=:CFLAGS+=:' Makefile + sed -i 's:^LIBUSB=/usr/local:LIBUSB=/usr:' Makefile + sed -i "s:^CC=g++::" Makefile +} + +src_compile() { + emake CC="$(tc-getCXX)" || die "emake failed" +} + +src_install() { + # Copy the device files and PicKit2 OS + insinto "/usr/share/pk2" + doins PK2DeviceFile.dat + doins PK2V023200.hex + # Install the program + exeinto /usr/bin + doexe pk2cmd + # Install the documentation + dodoc ReadmeForPK2CMDLinux2-6.txt usbhotplug.txt +} diff --git a/dev-embedded/pk2cmd/pk2cmd-1.12.0.ebuild b/dev-embedded/pk2cmd/pk2cmd-1.12.0.ebuild deleted file mode 100644 index 6ab4225b791c..000000000000 --- a/dev-embedded/pk2cmd/pk2cmd-1.12.0.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-embedded/pk2cmd/pk2cmd-1.12.0.ebuild,v 1.1 2008/09/19 06:58:18 josejx Exp $ - -inherit 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="dev-libs/libusb" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${PN}v${PV}LinuxMacSource" - -src_unpack() { - unpack ${A} - cd "${S}" - - # Fix up the Makefile - sed -i 's:#TARGET=linux:TARGET=linux:' Makefile - sed -i 's:DBG=-O2:DBG=:' Makefile - sed -i 's:^CFLAGS=:CFLAGS+=:' Makefile - sed -i 's:^LIBUSB=/usr/local:LIBUSB=/usr:' Makefile - sed -i "s:^CC=g++::" Makefile -} - -src_compile() { - emake CC="$(tc-getCXX)" || die "emake failed" -} - -src_install() { - # Copy the device files and PicKit2 OS - insinto "/usr/share/pk2" - doins PK2DeviceFile.dat - doins PK2V023200.hex - # Install the program - exeinto /usr/bin - doexe pk2cmd - # Install the documentation - dodoc ReadmeForPK2CMDLinux2-6.txt usbhotplug.txt -} -- cgit v1.2.3-65-gdbad