diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2010-07-19 00:25:42 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2010-07-19 00:25:42 +0000 |
commit | c7930f57ba94c4f567f6f3c49ca230ec4ce83a52 (patch) | |
tree | d7c215032f992053b1155889e54176958d8225bc /app-misc/digitemp | |
parent | remove lcms dep as it is not valid (diff) | |
download | gentoo-2-c7930f57ba94c4f567f6f3c49ca230ec4ce83a52.tar.gz gentoo-2-c7930f57ba94c4f567f6f3c49ca230ec4ce83a52.tar.bz2 gentoo-2-c7930f57ba94c4f567f6f3c49ca230ec4ce83a52.zip |
Fix src_install function per bug #299235. Thanks to Kevin Pyle. Respect CC/CFLAGS/LDFLAGS
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/digitemp')
-rw-r--r-- | app-misc/digitemp/ChangeLog | 11 | ||||
-rw-r--r-- | app-misc/digitemp/digitemp-3.5.0-r1.ebuild | 72 |
2 files changed, 81 insertions, 2 deletions
diff --git a/app-misc/digitemp/ChangeLog b/app-misc/digitemp/ChangeLog index 92735d383786..f8bfc4c97d1f 100644 --- a/app-misc/digitemp/ChangeLog +++ b/app-misc/digitemp/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-misc/digitemp -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/digitemp/ChangeLog,v 1.16 2009/09/23 16:01:58 patrick Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/digitemp/ChangeLog,v 1.17 2010/07/19 00:25:42 hwoarang Exp $ + +*digitemp-3.5.0-r1 (19 Jul 2010) + + 19 Jul 2010; Markos Chandras <hwoarang@gentoo.org> + +digitemp-3.5.0-r1.ebuild: + Fix src_install function per bug #299235. Thanks to Kevin Pyle. Respect + CC/CFLAGS/LDFLAGS 23 Sep 2009; Patrick Lauer <patrick@gentoo.org> digitemp-3.2.0.ebuild: Remove virtual/libc diff --git a/app-misc/digitemp/digitemp-3.5.0-r1.ebuild b/app-misc/digitemp/digitemp-3.5.0-r1.ebuild new file mode 100644 index 000000000000..4e7786d85f6c --- /dev/null +++ b/app-misc/digitemp/digitemp-3.5.0-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/digitemp/digitemp-3.5.0-r1.ebuild,v 1.1 2010/07/19 00:25:42 hwoarang Exp $ + +inherit toolchain-funcs + +DESCRIPTION="Temperature logging and reporting using Dallas Semiconductor's iButtons and 1-Wire protocol" +HOMEPAGE="http://www.digitemp.com/ http://www.ibutton.com/" +SRC_URI="http://www.digitemp.com/software/linux/${P}.tar.gz" + +IUSE="ds9097 ds9097u ds2490" +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +DEPEND="ds2490? ( >=dev-libs/libusb-0.1.10a )" + +targets() { + # default is to compile to the ds9097u. + if ! ( use ds9097 || use ds9097u || use ds2490 ); then + echo ds9097u + fi + for target in ds9097 ds9097u ds2490; do + if use ${target}; then + echo ${target} + fi + done +} + +src_compile() { + sed -i -e "/^CFLAGS/s:-O2:${CFLAGS}:" \ + -e "/^LIBS/s:=:= ${LDFLAGS}:" Makefile + # default is to compile to the ds9097u. + if ! ( use ds9097 || use ds9097u || use ds2490 ); then + ewarn "If you don't choose a component to install, we default to ds9097u" + fi + + local targets=$(targets) + + for target in $targets; do + emake clean + emake CC="$(tc-getCC)" LOCK="no" ${target} || die "emake ${target} failed" + done +} + +src_install() { + for target in $(echo $(targets) | tr '[:lower:]' '[:upper:]'); do + dobin digitemp_${target} && \ + dosym digitemp_${target} /usr/bin/digitemp + done + + if [[ $(targets|wc -l) -ge 1 ]]; then + echo + ewarn "/usr/bin/digitemp has been symlinked to /usr/bin/digitemp_${target}" + ewarn "If you want to access the others, they are available at /usr/bin/digitemp_*" + echo + fi + + dodoc README FAQ TODO + + for example in perl python rrdb; do + insinto "/usr/share/doc/${PF}/${example}_examples" + doins ${example}/* + done +} + +pkg_postinst() { + echo + elog "Examples of using digitemp with python, perl, and rrdtool are" + elog "located in /usr/share/doc/${PF}/" + echo +} |