1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit flag-o-matic eutils toolchain-funcs
7 MAJ_PV=${PV:0:${#PV}-1}
11 MY_P="$PN-$MIN_PV.$MAJ_PV"
12 DESCRIPTION="Hardware Lister"
13 HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
14 SRC_URI="https://www.ezix.org/software/files/${MY_P}.tar.gz"
18 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
19 IUSE="gtk sqlite static"
21 REQUIRED_USE="static? ( !gtk )"
23 RDEPEND="gtk? ( x11-libs/gtk+:2 )
24 sqlite? ( dev-db/sqlite:3 )"
26 gtk? ( virtual/pkgconfig )
27 sqlite? ( virtual/pkgconfig )"
34 epatch "${FILESDIR}"/${P}-gentoo.patch
35 # correct gettext behavior
36 if [[ -n "${LINGUAS+x}" ]] ; then
39 for i in $(cd po ; echo *.po | sed 's/\.po//') ; do
40 if has ${i} ${LINGUAS} ; then
45 -e "/^LANGUAGES =/ s/=.*/= $langs/" \
46 src/po/Makefile || die
52 use static && append-ldflags -static
54 local sqlite=$(usex sqlite 1 0)
56 emake SQLITE=$sqlite all
58 emake SQLITE=$sqlite gui
63 emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
66 emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-gui
67 make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg"