diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-04-08 22:04:23 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-04-08 22:04:23 +0000 |
commit | 9067e21c49148cd31e7db8a0f43693ecebf3fd2c (patch) | |
tree | dd7ede568f0210f859876ae664a8ea0d573bab5b /sys-apps/lshw | |
parent | Remove old. (diff) | |
download | gentoo-2-9067e21c49148cd31e7db8a0f43693ecebf3fd2c.tar.gz gentoo-2-9067e21c49148cd31e7db8a0f43693ecebf3fd2c.tar.bz2 gentoo-2-9067e21c49148cd31e7db8a0f43693ecebf3fd2c.zip |
Update patch so that USE=gtk won't fail if sqlite3 is not present. Make the ebuild depend on hwids and not install its own ids files.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/lshw')
-rw-r--r-- | sys-apps/lshw/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/lshw/files/lshw-02.16b-build-v2.patch | 144 | ||||
-rw-r--r-- | sys-apps/lshw/lshw-02.16b-r1.ebuild | 56 |
3 files changed, 208 insertions, 1 deletions
diff --git a/sys-apps/lshw/ChangeLog b/sys-apps/lshw/ChangeLog index 6044d9225c69..a40765b65c44 100644 --- a/sys-apps/lshw/ChangeLog +++ b/sys-apps/lshw/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/lshw # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/ChangeLog,v 1.99 2012/01/11 23:01:23 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/ChangeLog,v 1.100 2012/04/08 22:04:23 flameeyes Exp $ + +*lshw-02.16b-r1 (08 Apr 2012) + + 08 Apr 2012; Diego E. Pettenò <flameeyes@gentoo.org> + +files/lshw-02.16b-build-v2.patch, +lshw-02.16b-r1.ebuild: + Update patch so that USE=gtk won't fail if sqlite3 is not present. Make the + ebuild depend on hwids and not install its own ids files. *lshw-02.16b (11 Jan 2012) diff --git a/sys-apps/lshw/files/lshw-02.16b-build-v2.patch b/sys-apps/lshw/files/lshw-02.16b-build-v2.patch new file mode 100644 index 000000000000..81404be6974d --- /dev/null +++ b/sys-apps/lshw/files/lshw-02.16b-build-v2.patch @@ -0,0 +1,144 @@ +Index: lshw-B.02.16/src/core/Makefile +=================================================================== +--- lshw-B.02.16.orig/src/core/Makefile ++++ lshw-B.02.16/src/core/Makefile +@@ -1,10 +1,9 @@ + PACKAGENAME?=lshw + +-CXX=c++ ++CXX?=c++ + INCLUDES= + DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" +-CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) +-LDFLAGS= ++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + LDSTATIC= + LIBS= + +Index: lshw-B.02.16/src/gui/Makefile +=================================================================== +--- lshw-B.02.16.orig/src/gui/Makefile ++++ lshw-B.02.16/src/gui/Makefile +@@ -1,5 +1,7 @@ + PACKAGENAME?=lshw + ++SQLITE?=0 ++ + CXX?=c++ + CC?=cc + STRIP?=strip +@@ -8,13 +10,14 @@ OBJCOPY?=objcopy + DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" + GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags) + INCLUDES=-I../core $(GTKINCLUDES) +-CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) ++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + CFLAGS=$(CXXFLAGS) $(DEFINES) + GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs) +-LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS) +-LDFLAGS= +-ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) +- LDFLAGS+= -Wl,--as-needed ++LIBS=-L../core -llshw -lresolv $(GTKLIBS) ++ ++ifeq ($(SQLITE), 1) ++ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3) ++ LIBS+= $(shell pkg-config --libs sqlite3) + endif + + OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o +@@ -39,8 +42,7 @@ gtk-$(PACKAGENAME): $(OBJS) ../core/libl + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) + + install: all +- $(STRIP) gtk-$(PACKAGENAME) +- ++ + clean: + rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak + +Index: lshw-B.02.16/src/Makefile +=================================================================== +--- lshw-B.02.16.orig/src/Makefile ++++ lshw-B.02.16/src/Makefile +@@ -21,11 +21,11 @@ export SQLITE + CXX?=c++ + INCLUDES=-I./core/ + DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" +-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) ++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + ifeq ($(SQLITE), 1) + CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3) + endif +-LDFLAGS=-L./core/ -g ++LDFLAGS += -L./core/ + ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) + LDFLAGS+= -Wl,--as-needed + endif +@@ -39,7 +39,7 @@ export CXXFLAGS + export LIBS + export LDFLAGS + +-DATAFILES = pci.ids usb.ids oui.txt manuf.txt ++DATAFILES = oui.txt manuf.txt + + all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES) + +@@ -48,18 +48,18 @@ all: $(PACKAGENAME) $(PACKAGENAME).1 $(D + + .PHONY: core + core: +- +make -C core all ++ $(MAKE) -C core all + + $(PACKAGENAME): core $(PACKAGENAME).o + $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS) + + .PHONY: po + po: +- +make -C po all ++ $(MAKE) -C po all + + .PHONY: gui + gui: core +- +make -C gui all ++ $(MAKE) -C gui all + + .PHONY: nologo + nologo: +@@ -70,7 +70,6 @@ static: $(PACKAGENAME)-static + + $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o + $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS) +- $(STRIP) $@ + + .PHONY: compressed + compressed: $(PACKAGENAME)-compressed +@@ -93,14 +92,14 @@ oui.txt: + manuf.txt: + wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf + +-install: all ++install: + $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR) + $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR) + $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1 + $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1 + $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME) + $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME) +- make -C po install ++ $(MAKE) -C po install + + install-gui: gui + $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR) +@@ -112,8 +111,8 @@ install-gui: gui + + clean: + rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed +- make -C core clean +- make -C gui clean ++ $(MAKE) -C core clean ++ $(MAKE) -C gui clean + + .timestamp: + date --utc +%Y%m%d%H%M%S > $@ diff --git a/sys-apps/lshw/lshw-02.16b-r1.ebuild b/sys-apps/lshw/lshw-02.16b-r1.ebuild new file mode 100644 index 000000000000..64a1adc29e41 --- /dev/null +++ b/sys-apps/lshw/lshw-02.16b-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/lshw-02.16b-r1.ebuild,v 1.1 2012/04/08 22:04:23 flameeyes Exp $ + +EAPI=4 +inherit flag-o-matic eutils toolchain-funcs + +MAJ_PV=${PV:0:${#PV}-1} +MIN_PVE=${PV:0-1} +MIN_PV=${MIN_PVE/b/B} + +MY_P="$PN-$MIN_PV.$MAJ_PV" +DESCRIPTION="Hardware Lister" +HOMEPAGE="http://ezix.org/project/wiki/HardwareLiSter" +SRC_URI="http://ezix.org/software/files/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="gtk sqlite static" + +REQUIRED_USE="static? ( !gtk )" + +RDEPEND="gtk? ( x11-libs/gtk+:2 ) + sqlite? ( dev-db/sqlite:3 )" +DEPEND="${RDEPEND} + gtk? ( dev-util/pkgconfig ) + sqlite? ( dev-util/pkgconfig )" +RDEPEND+=" sys-apps/hwids" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${P}-build-v2.patch +} + +src_compile() { + tc-export CC CXX AR + use static && append-ldflags -static + + local sqlite=$(usex sqlite 1 0) + + emake SQLITE=$sqlite all + if use gtk ; then + emake SQLITE=$sqlite gui + fi +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + dodoc README docs/* + if use gtk ; then + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-gui + make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg" + fi +} |