dcallagh-exheres

My personal Exherbo repository
git clone https://code.djc.id.au/git/dcallagh-exheres/

packages/sys-apps/lshw/files/lshw-02.15B-build.patch (2218B) - raw

      1 Source: Gentoo
      2 Upstream: no
      3 Reason: Respect CXX, CXXFLAGS, CFLAGS and LDFLAGS
      4 
      5 --- lshw/src/core/Makefile
      6 +++ lshw/src/core/Makefile
      7 @@ -1,9 +1,9 @@
      8  PACKAGENAME?=lshw
      9  
     10 -CXX=c++
     11 +CXX?=c++
     12  INCLUDES=
     13  DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
     14 -CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
     15 +CXXFLAGS ?= -g
     16 +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
     17 -LDFLAGS=
     18  LDSTATIC=
     19  LIBS=
     20 --- lshw/src/gui/Makefile
     21 +++ lshw/src/gui/Makefile
     22 @@ -7,11 +7,11 @@
     23  DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
     24  GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
     25  INCLUDES=-I../core $(GTKINCLUDES)
     26 -CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
     27 -CFLAGS=$(CXXFLAGS) $(DEFINES)
     28 +CXXFLAGS ?= -g
     29 +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
     30 +CFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
     31  GTKLIBS=$(shell pkg-config gtk+-2.0 --libs)
     32  LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS)
     33 -LDFLAGS=
     34  ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
     35  	LDFLAGS+= -Wl,--as-needed
     36  endif
     37 @@ -34,7 +34,6 @@
     38  	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
     39  
     40  install: all
     41 -	$(STRIP) gtk-$(PACKAGENAME)
     42  	
     43  clean:
     44  	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
     45 --- lshw/src/Makefile
     46 +++ lshw/src/Makefile
     47 @@ -21,11 +21,13 @@
     48  CXX?=c++
     49  INCLUDES=-I./core/
     50  DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
     51 -CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
     52 +CXXFLAGS ?= -g
     53 +CXXFLAGS += -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
     54  ifeq ($(SQLITE), 1)
     55  	CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
     56  endif
     57 -LDFLAGS=-L./core/ -g
     58 +LDFLAGS ?= -g
     59 +LDFLAGS += -L./core/
     60  ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
     61  	LDFLAGS+= -Wl,--as-needed
     62  endif
     63 @@ -70,7 +72,6 @@
     64  
     65  $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
     66  	$(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
     67 -	$(STRIP) $@
     68  
     69  .PHONY: compressed
     70  compressed: $(PACKAGENAME)-compressed