dcallagh-exheres

My personal Exherbo repository
git clone https://code.djc.id.au/git/dcallagh-exheres/
commit 86630ea0e50065860bca0574c6bb32df5c578e88
parent 9391ccc27623a9dd4ffba2be34f0748df718697b
Author: Dan Callaghan <djc@djc.id.au>
Date:   Tue, 22 Feb 2011 22:17:07 +1000

lshw-02.14B from drizzt

Diffstat:
Mmetadata/categories.conf | 1+
Apackages/sys-apps/lshw/files/lshw-02.14B-build.patch | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apackages/sys-apps/lshw/files/lshw-02.14B-gcc-4.5.patch | 19+++++++++++++++++++
Apackages/sys-apps/lshw/lshw-02.14B.exheres-0 | 33+++++++++++++++++++++++++++++++++
4 files changed, 120 insertions(+), 0 deletions(-)
diff --git a/metadata/categories.conf b/metadata/categories.conf
@@ -8,6 +8,7 @@ gnome-platform
 mail-client
 net-libs
 net-misc
+sys-apps
 sys-auth
 x11-libs
 x11-misc
diff --git a/packages/sys-apps/lshw/files/lshw-02.14B-build.patch b/packages/sys-apps/lshw/files/lshw-02.14B-build.patch
@@ -0,0 +1,67 @@
+Source: Gentoo
+Upstream: no
+Reason: Respect CXX, CXXFLAGS, CFLAGS and LDFLAGS
+
+--- lshw/src/core/Makefile
++++ lshw/src/core/Makefile
+@@ -1,9 +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)
++CXXFLAGS ?= -g
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+-LDFLAGS=
+ LDSTATIC=
+ LIBS=
+--- lshw/src/gui/Makefile
++++ lshw/src/gui/Makefile
+@@ -7,11 +7,11 @@
+ 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)
+-CFLAGS=$(CXXFLAGS) $(DEFINES)
++CXXFLAGS ?= -g
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ GTKLIBS=$(shell pkg-config gtk+-2.0 --libs)
+ LIBS=-L../core -llshw -lresolv $(GTKLIBS)
+-LDFLAGS=
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ 	LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -34,7 +34,6 @@
+ 	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
+ 
+ install: all
+-	$(STRIP) gtk-$(PACKAGENAME)
+ 	
+ clean:
+ 	rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak interface.c.bak interface.h.bak callbacks.c.bak callbacks.h.bak Makefile.bak
+--- lshw/src/Makefile
++++ lshw/src/Makefile
+@@ -18,8 +18,10 @@
+ CXX?=c++
+ INCLUDES=-I./core/
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+-LDFLAGS=-L./core/ -g
++CXXFLAGS ?= -g
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++LDFLAGS ?= -g
++LDFLAGS += -L./core/
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ 	LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -49,7 +51,6 @@
+ 
+ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
+ 	$(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+-	$(STRIP) $@
+ 
+ .PHONY: compressed
+ compressed: $(PACKAGENAME)-compressed
diff --git a/packages/sys-apps/lshw/files/lshw-02.14B-gcc-4.5.patch b/packages/sys-apps/lshw/files/lshw-02.14B-gcc-4.5.patch
@@ -0,0 +1,19 @@
+Source: "rob-fortune" @ http://ezix.org/project/ticket/521
+Upstream: Reported at ticket #521
+Reason: Compile failure with gcc 4.5.
+
+diff --git a/src/core/scsi.cc b/src/core/scsi.cc
+index ef49677..e72376b 100644
+Index: src/core/scsi.cc
+===================================================================
+--- a/src/core/scsi.cc
++++ b/src/core/scsi.cc
+@@ -842,7 +842,7 @@
+ 
+           if (!controller)
+           {
+-            controller = node.addChild(hwNode::hwNode("scsi", hw::storage));
++            controller = node.addChild(hwNode("scsi", hw::storage));
+             if (controller)
+             {
+               controller->setLogicalName(host_logicalname(number));
diff --git a/packages/sys-apps/lshw/lshw-02.14B.exheres-0 b/packages/sys-apps/lshw/lshw-02.14B.exheres-0
@@ -0,0 +1,33 @@
+# Copyright 2010 Timothy Redaelli <timothy@redaelli.eu>
+# Distributed under the terms of the GNU General Public License v2
+
+MY_PV=${PV:0-1}.${PV:0:${#PV}-1}
+MY_PNV=${PN}-${MY_PV}
+SUMMARY="Hardware Lister"
+
+HOMEPAGE="http://ezix.org/project/wiki/HardwareLiSter"
+DOWNLOADS="http://ezix.org/software/files/${MY_PNV}.tar.gz"
+
+LICENCES="GPL-2"
+SLOT="0"
+PLATFORMS="~amd64 ~x86"
+MYOPTIONS="gtk"
+
+DEPENDENCIES="gtk? ( x11-libs/gtk+:2 )"
+
+BUGS_TO="djc@djc.id.au"
+
+WORK="${WORKBASE}"/${MY_PNV}
+
+DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PNV}-{build,gcc-4.5}.patch )
+
+src_compile() {
+    default
+    option gtk && emake gui
+}
+
+src_install() {
+    default
+    dodoc docs/*
+    option gtk && emake DESTDIR="${IMAGE}" install-gui
+}