summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/lshw/files/lshw-02.16b-build-v2.patch')
-rw-r--r--sys-apps/lshw/files/lshw-02.16b-build-v2.patch144
1 files changed, 144 insertions, 0 deletions
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 > $@