Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/lshw/files: lshw-02.16b-gentoo.patch lshw-02.16b-build.patch lshw-02.16b-build-v2.patch
Date: Sun, 02 Dec 2012 07:00:40
Message-Id: 20121202070029.6942A2171E@flycatcher.gentoo.org
1 flameeyes 12/12/02 07:00:29
2
3 Added: lshw-02.16b-gentoo.patch
4 Removed: lshw-02.16b-build.patch lshw-02.16b-build-v2.patch
5 Log:
6 Remove old, stop installing oui.txt/manuf.txt (unused), don't use a full search path for pci and usb ids which are always at the same path for Gentoo.
7
8 (Portage version: 2.2.0_alpha143/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)
9
10 Revision Changes Path
11 1.1 sys-apps/lshw/files/lshw-02.16b-gentoo.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/lshw/files/lshw-02.16b-gentoo.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/lshw/files/lshw-02.16b-gentoo.patch?rev=1.1&content-type=text/plain
15
16 Index: lshw-02.16b-gentoo.patch
17 ===================================================================
18 Index: lshw-B.02.16/src/core/Makefile
19 ===================================================================
20 --- lshw-B.02.16.orig/src/core/Makefile
21 +++ lshw-B.02.16/src/core/Makefile
22 @@ -1,10 +1,9 @@
23 PACKAGENAME?=lshw
24
25 -CXX=c++
26 +CXX?=c++
27 INCLUDES=
28 DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
29 -CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
30 -LDFLAGS=
31 +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
32 LDSTATIC=
33 LIBS=
34
35 Index: lshw-B.02.16/src/gui/Makefile
36 ===================================================================
37 --- lshw-B.02.16.orig/src/gui/Makefile
38 +++ lshw-B.02.16/src/gui/Makefile
39 @@ -1,5 +1,7 @@
40 PACKAGENAME?=lshw
41
42 +SQLITE?=0
43 +
44 CXX?=c++
45 CC?=cc
46 STRIP?=strip
47 @@ -8,13 +10,14 @@ OBJCOPY?=objcopy
48 DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
49 GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
50 INCLUDES=-I../core $(GTKINCLUDES)
51 -CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
52 +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
53 CFLAGS=$(CXXFLAGS) $(DEFINES)
54 GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
55 -LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS)
56 -LDFLAGS=
57 -ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
58 - LDFLAGS+= -Wl,--as-needed
59 +LIBS=-L../core -llshw -lresolv $(GTKLIBS)
60 +
61 +ifeq ($(SQLITE), 1)
62 + CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
63 + LIBS+= $(shell pkg-config --libs sqlite3)
64 endif
65
66 OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o
67 @@ -39,8 +42,7 @@ gtk-$(PACKAGENAME): $(OBJS) ../core/libl
68 $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
69
70 install: all
71 - $(STRIP) gtk-$(PACKAGENAME)
72 -
73 +
74 clean:
75 rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak
76
77 Index: lshw-B.02.16/src/Makefile
78 ===================================================================
79 --- lshw-B.02.16.orig/src/Makefile
80 +++ lshw-B.02.16/src/Makefile
81 @@ -21,11 +21,11 @@ export SQLITE
82 CXX?=c++
83 INCLUDES=-I./core/
84 DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
85 -CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
86 +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
87 ifeq ($(SQLITE), 1)
88 CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
89 endif
90 -LDFLAGS=-L./core/ -g
91 +LDFLAGS += -L./core/
92 ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
93 LDFLAGS+= -Wl,--as-needed
94 endif
95 @@ -39,27 +39,25 @@ export CXXFLAGS
96 export LIBS
97 export LDFLAGS
98
99 -DATAFILES = pci.ids usb.ids oui.txt manuf.txt
100 -
101 -all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES)
102 +all: $(PACKAGENAME) $(PACKAGENAME).1
103
104 .cc.o:
105 $(CXX) $(CXXFLAGS) -c $< -o $@
106
107 .PHONY: core
108 core:
109 - +make -C core all
110 + $(MAKE) -C core all
111
112 $(PACKAGENAME): core $(PACKAGENAME).o
113 $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
114
115 .PHONY: po
116 po:
117 - +make -C po all
118 + $(MAKE) -C po all
119
120 .PHONY: gui
121 gui: core
122 - +make -C gui all
123 + $(MAKE) -C gui all
124
125 .PHONY: nologo
126 nologo:
127 @@ -70,7 +68,6 @@ static: $(PACKAGENAME)-static
128
129 $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
130 $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
131 - $(STRIP) $@
132
133 .PHONY: compressed
134 compressed: $(PACKAGENAME)-compressed
135 @@ -93,14 +90,13 @@ oui.txt:
136 manuf.txt:
137 wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf
138
139 -install: all
140 +install:
141 $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
142 $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR)
143 $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1
144 $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1
145 $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
146 - $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
147 - make -C po install
148 + $(MAKE) -C po install
149
150 install-gui: gui
151 $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
152 @@ -112,8 +108,8 @@ install-gui: gui
153
154 clean:
155 rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed
156 - make -C core clean
157 - make -C gui clean
158 + $(MAKE) -C core clean
159 + $(MAKE) -C gui clean
160
161 .timestamp:
162 date --utc +%Y%m%d%H%M%S > $@
163 Index: lshw-B.02.16/src/core/pci.cc
164 ===================================================================
165 --- lshw-B.02.16.orig/src/core/pci.cc
166 +++ lshw-B.02.16/src/core/pci.cc
167 @@ -17,7 +17,7 @@ __ID("@(#) $Id: pci.cc 2433 2012-01-10 2
168
169 #define PROC_BUS_PCI "/proc/bus/pci"
170 #define SYS_BUS_PCI "/sys/bus/pci"
171 -#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
172 +#define PCIID_PATH "/usr/share/misc/pci.ids"
173
174 #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
175 #define PCI_VENDOR_ID 0x00 /* 16 bits */
176 Index: lshw-B.02.16/src/core/usb.cc
177 ===================================================================
178 --- lshw-B.02.16.orig/src/core/usb.cc
179 +++ lshw-B.02.16/src/core/usb.cc
180 @@ -27,7 +27,7 @@
181
182 #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
183 #define SYSBUSUSBDEVICES "/sys/bus/usb/devices"
184 -#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
185 +#define USBID_PATH "/usr/share/misc/usb.ids"
186
187 #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
188 #define USB_CLASS_AUDIO 1