summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/lshw/files/lshw-02.15b-build.patch')
-rw-r--r--sys-apps/lshw/files/lshw-02.15b-build.patch116
1 files changed, 116 insertions, 0 deletions
diff --git a/sys-apps/lshw/files/lshw-02.15b-build.patch b/sys-apps/lshw/files/lshw-02.15b-build.patch
new file mode 100644
index 000000000000..af2b3893ae17
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.15b-build.patch
@@ -0,0 +1,116 @@
+--- lshw-B.02.15.orig/src/core/Makefile
++++ lshw-B.02.15/src/core/Makefile
+@@ -1,10 +1,10 @@
+ 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 ?= -g
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ LDSTATIC=
+ LIBS=
+
+--- lshw-B.02.15.orig/src/gui/Makefile
++++ lshw-B.02.15/src/gui/Makefile
+@@ -8,11 +8,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)
++CXXFLAGS ?= -g
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ CFLAGS=$(CXXFLAGS) $(DEFINES)
+ GTKLIBS=$(shell pkg-config gtk+-2.0 --libs)
+ LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS)
+-LDFLAGS=
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -39,7 +39,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-B.02.15.orig/src/Makefile
++++ lshw-B.02.15/src/Makefile
+@@ -21,11 +21,13 @@
+ CXX?=c++
+ INCLUDES=-I./core/
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CXXFLAGS ?= -g
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ ifeq ($(SQLITE), 1)
+ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
+ endif
+-LDFLAGS=-L./core/ -g
++LDFLAGS ?= -g
++LDFLAGS += -L./core/
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -48,18 +50,18 @@
+
+ .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 +72,6 @@
+
+ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
+ $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+- $(STRIP) $@
+
+ .PHONY: compressed
+ compressed: $(PACKAGENAME)-compressed
+@@ -93,14 +94,14 @@
+ manuf.txt:
+ wget http://www.ethereal.com/distribution/manuf.txt
+
+-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)
+@@ -110,8 +111,8 @@
+
+ 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 > $@