1 |
vapier 08/06/01 02:28:27 |
2 |
|
3 |
Added: 0001-Make-fixes.patch |
4 |
0002-cleanup-build-system.patch |
5 |
Log: |
6 |
Version bump #221505 by Arfrever Frehtes Taifersar Arahesis. |
7 |
(Portage version: 2.2_pre5.spank.spunk) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-libs/libcap/files/2.10/0001-Make-fixes.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libcap/files/2.10/0001-Make-fixes.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libcap/files/2.10/0001-Make-fixes.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 0001-Make-fixes.patch |
16 |
=================================================================== |
17 |
From 8e9b94b41f3f7e90404fe492f7bc7bc438726218 Mon Sep 17 00:00:00 2001 |
18 |
From: Hao Xu <hxunix@×××××.com> |
19 |
Date: Thu, 29 May 2008 07:18:21 -0700 |
20 |
Subject: [PATCH] Make fixes. |
21 |
|
22 |
Don't need to do -O2 twice. |
23 |
Install the static library with the static libraries name(!) |
24 |
|
25 |
Signed-off-by: Andrew G. Morgan <morgan@××××××.org> |
26 |
--- |
27 |
Make.Rules | 2 +- |
28 |
libcap/Makefile | 2 +- |
29 |
2 files changed, 2 insertions(+), 2 deletions(-) |
30 |
|
31 |
diff --git a/Make.Rules b/Make.Rules |
32 |
index 577ceda..ca2da0d 100644 |
33 |
--- a/Make.Rules |
34 |
+++ b/Make.Rules |
35 |
@@ -46,7 +46,7 @@ CC ?= gcc |
36 |
AR ?= ar |
37 |
RANLIB ?= ranlib |
38 |
COPTFLAGS=-O2 |
39 |
-DEBUG=-O2 -g #-DDEBUG |
40 |
+DEBUG=-g #-DDEBUG |
41 |
WARNINGS=-fPIC -Wall -Wwrite-strings \ |
42 |
-Wpointer-arith -Wcast-qual -Wcast-align \ |
43 |
-Wstrict-prototypes -Wmissing-prototypes \ |
44 |
diff --git a/libcap/Makefile b/libcap/Makefile |
45 |
index c86d765..871f727 100644 |
46 |
--- a/libcap/Makefile |
47 |
+++ b/libcap/Makefile |
48 |
@@ -58,7 +58,7 @@ install: all |
49 |
mkdir -p -m 0755 $(INCDIR)/sys |
50 |
install -m 0644 include/sys/capability.h $(INCDIR)/sys |
51 |
mkdir -p -m 0755 $(LIBDIR) |
52 |
- install -m 0644 $(STALIBNAME) $(LIBDIR)/$(MINLIBNAME) |
53 |
+ install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME) |
54 |
install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) |
55 |
ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME) |
56 |
ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME) |
57 |
-- |
58 |
1.5.5.3 |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
1.1 sys-libs/libcap/files/2.10/0002-cleanup-build-system.patch |
64 |
|
65 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libcap/files/2.10/0002-cleanup-build-system.patch?rev=1.1&view=markup |
66 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libcap/files/2.10/0002-cleanup-build-system.patch?rev=1.1&content-type=text/plain |
67 |
|
68 |
Index: 0002-cleanup-build-system.patch |
69 |
=================================================================== |
70 |
From c41493d80bb65e11a14f4cf6174e9d4a4b3226f3 Mon Sep 17 00:00:00 2001 |
71 |
From: Mike Frysinger <vapier@g.o> |
72 |
Date: Sat, 31 May 2008 22:21:31 -0400 |
73 |
Subject: [PATCH] cleanup build system |
74 |
|
75 |
This refactors the homebrewed build system to work much better "out of the |
76 |
box" for people. It moves tools/flags into appropriate env-overridable |
77 |
variables as well as simplifies the subdirectory handling and flag passing. |
78 |
A few bug fixes are also mixed in such as proper link order, parallel build |
79 |
failure due to local header generation, and splitting up of logic between |
80 |
binaries compiled and run on the build system and binaries compiled to run |
81 |
on the target system. |
82 |
|
83 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
84 |
--- |
85 |
Make.Rules | 27 +++++++++++---------------- |
86 |
Makefile | 8 ++++---- |
87 |
libcap/Makefile | 16 +++++++++------- |
88 |
pam_cap/Makefile | 9 ++++++--- |
89 |
progs/Makefile | 7 +++++-- |
90 |
5 files changed, 35 insertions(+), 32 deletions(-) |
91 |
|
92 |
diff --git a/Make.Rules b/Make.Rules |
93 |
index ca2da0d..1b14658 100644 |
94 |
--- a/Make.Rules |
95 |
+++ b/Make.Rules |
96 |
@@ -43,33 +43,28 @@ MINOR=10 |
97 |
# Compilation specifics |
98 |
|
99 |
CC ?= gcc |
100 |
+BUILD_CC ?= $(CC) |
101 |
AR ?= ar |
102 |
RANLIB ?= ranlib |
103 |
-COPTFLAGS=-O2 |
104 |
-DEBUG=-g #-DDEBUG |
105 |
-WARNINGS=-fPIC -Wall -Wwrite-strings \ |
106 |
+CFLAGS ?= -O2 |
107 |
+BUILD_CFLAGS ?= $(CFLAGS) |
108 |
+WARNINGS=-Wall -Wwrite-strings \ |
109 |
-Wpointer-arith -Wcast-qual -Wcast-align \ |
110 |
-Wstrict-prototypes -Wmissing-prototypes \ |
111 |
-Wnested-externs -Winline -Wshadow |
112 |
LD=$(CC) -Wl,-x -shared |
113 |
-LDFLAGS=#-g |
114 |
+LDFLAGS ?= #-g |
115 |
|
116 |
KERNEL_HEADERS = $(topdir)/libcap/include |
117 |
-SYSTEM_HEADERS = /usr/include |
118 |
-IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) |
119 |
+LIBCAP_CPPFLAGS = -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) |
120 |
+CPPFLAGS += $(LIBCAP_CPPFLAGS) |
121 |
+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS) |
122 |
INCS=$(topdir)/libcap/include/sys/capability.h |
123 |
-LIBS=-L$(topdir)/libcap -lcap |
124 |
-CFLAGS=-Dlinux $(WARNINGS) $(DEBUG) $(COPTFLAG) $(IPATH) |
125 |
+LDFLAGS += -L$(topdir)/libcap |
126 |
+CPPFLAGS += -Dlinux |
127 |
+CFLAGS += $(WARNINGS) |
128 |
PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) |
129 |
# Global cleanup stuff |
130 |
|
131 |
LOCALCLEAN=rm -f *~ core |
132 |
DISTCLEAN=@find . \( -name '*.orig' -o -name '*.rej' \) | xargs rm -f |
133 |
- |
134 |
-# Flags to pass down recursive makes |
135 |
- |
136 |
-MAKE_DEFS = CC='$(CC)' CFLAGS='$(CFLAGS)' \ |
137 |
- LD='$(LD)' LIBS='$(LIBS)' LDFLAGS='$(LDFLAGS)' \ |
138 |
- VERSION='$(VERSION)' MINOR='$(MINOR)' \ |
139 |
- LIBDIR='$(LIBDIR)' INCDIR='$(INCDIR)' \ |
140 |
- SBINDIR='$(SBINDIR)' MANDIR='$(MANDIR)' |
141 |
diff --git a/Makefile b/Makefile |
142 |
index 52f7b42..9076724 100644 |
143 |
--- a/Makefile |
144 |
+++ b/Makefile |
145 |
@@ -9,12 +9,12 @@ include Make.Rules |
146 |
# |
147 |
|
148 |
all install clean: %: %-here |
149 |
- $(MAKE) -C libcap $(MAKE_DEFS) $@ |
150 |
+ $(MAKE) -C libcap $@ |
151 |
ifneq ($(PAM_CAP),no) |
152 |
- $(MAKE) -C pam_cap $(MAKE_DEFS) $@ |
153 |
+ $(MAKE) -C pam_cap $@ |
154 |
endif |
155 |
- $(MAKE) -C progs $(MAKE_DEFS) $@ |
156 |
- $(MAKE) -C doc $(MAKE_DEFS) $@ |
157 |
+ $(MAKE) -C progs $@ |
158 |
+ $(MAKE) -C doc $@ |
159 |
|
160 |
all-here: |
161 |
|
162 |
diff --git a/libcap/Makefile b/libcap/Makefile |
163 |
index 871f727..86a7289 100644 |
164 |
--- a/libcap/Makefile |
165 |
+++ b/libcap/Makefile |
166 |
@@ -17,7 +17,9 @@ OBJS=$(addsuffix .o, $(FILES)) |
167 |
MAJLIBNAME=$(LIBNAME).$(VERSION) |
168 |
MINLIBNAME=$(MAJLIBNAME).$(MINOR) |
169 |
GPERF_OUTPUT = _caps_output.gperf |
170 |
-LDFLAGS+=-lattr |
171 |
+LDLIBS += -lattr |
172 |
+CFLAGS += -fPIC |
173 |
+INCLS += cap_names.h |
174 |
|
175 |
all: $(MINLIBNAME) $(STALIBNAME) |
176 |
|
177 |
@@ -27,7 +29,7 @@ INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT) |
178 |
endif |
179 |
|
180 |
_makenames: _makenames.c cap_names.sed |
181 |
- $(CC) $(CFLAGS) $< -o $@ |
182 |
+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ |
183 |
|
184 |
cap_names.h: _makenames |
185 |
./_makenames > cap_names.h |
186 |
@@ -40,19 +42,19 @@ cap_names.sed: Makefile $(KERNEL_HEADERS)/linux/capability.h |
187 |
@sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define \([^ \t]*\)[ \t]*\([^ \t]*\)/\{\"\1\",\2\},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < $(KERNEL_HEADERS)/linux/capability.h | fgrep -v 0x > $@ |
188 |
|
189 |
$(STALIBNAME): $(OBJS) |
190 |
- $(AR) rcs $(STALIBNAME) $(OBJS) |
191 |
- $(RANLIB) $(STALIBNAME) |
192 |
+ $(AR) rcs $@ $^ |
193 |
+ $(RANLIB) $@ |
194 |
|
195 |
$(MINLIBNAME): $(OBJS) |
196 |
- $(LD) $(LDFLAGS) $(COPTFLAG) -Wl,-soname,$(MAJLIBNAME) -o $@ $(OBJS) |
197 |
+ $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(MAJLIBNAME) -o $@ $^ $(LDLIBS) |
198 |
ln -sf $(MINLIBNAME) $(MAJLIBNAME) |
199 |
ln -sf $(MAJLIBNAME) $(LIBNAME) |
200 |
|
201 |
%.o: %.c $(INCLS) |
202 |
- $(CC) $(CFLAGS) -c $< -o $@ |
203 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ |
204 |
|
205 |
cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS) |
206 |
- $(CC) $(CFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ |
207 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ |
208 |
|
209 |
install: all |
210 |
mkdir -p -m 0755 $(INCDIR)/sys |
211 |
diff --git a/pam_cap/Makefile b/pam_cap/Makefile |
212 |
index 8819af2..bef59d2 100644 |
213 |
--- a/pam_cap/Makefile |
214 |
+++ b/pam_cap/Makefile |
215 |
@@ -3,6 +3,9 @@ |
216 |
topdir=$(shell pwd)/.. |
217 |
include ../Make.Rules |
218 |
|
219 |
+LDLIBS += -lcap |
220 |
+CFLAGS += -fPIC |
221 |
+ |
222 |
all: pam_cap.so |
223 |
$(MAKE) testcompile |
224 |
|
225 |
@@ -11,13 +14,13 @@ install: all |
226 |
install -m 0755 pam_cap.so $(LIBDIR)/security |
227 |
|
228 |
pam_cap.so: pam_cap.o |
229 |
- $(LD) -o pam_cap.so $< $(LIBS) |
230 |
+ $(LD) $(CFLAGS) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS) |
231 |
|
232 |
pam_cap.o: pam_cap.c |
233 |
- $(CC) $(CFLAGS) -c $< -o $@ |
234 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ |
235 |
|
236 |
testcompile: test.c pam_cap.o |
237 |
- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBS) |
238 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS) |
239 |
|
240 |
clean: |
241 |
rm -f *.o *.so testcompile *~ |
242 |
diff --git a/progs/Makefile b/progs/Makefile |
243 |
index ee03efa..f568225 100644 |
244 |
--- a/progs/Makefile |
245 |
+++ b/progs/Makefile |
246 |
@@ -6,13 +6,16 @@ include $(topdir)/Make.Rules |
247 |
# |
248 |
PROGS=getpcaps getcap setcap capsh |
249 |
|
250 |
+LDFLAGS += --static |
251 |
+LDLIBS += -lcap |
252 |
+ |
253 |
all: $(PROGS) |
254 |
|
255 |
$(PROGS): %: %.o |
256 |
- $(CC) --static $(COPTFLAG) $(LDFLAGS) -o $@ $< $(LIBS) |
257 |
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) |
258 |
|
259 |
%.o: %.c $(INCS) |
260 |
- $(CC) $(CFLAGS) -c $< -o $@ |
261 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ |
262 |
|
263 |
install: all |
264 |
mkdir -p -m 0755 $(SBINDIR) |
265 |
-- |
266 |
1.5.5.3 |
267 |
|
268 |
|
269 |
|
270 |
|
271 |
-- |
272 |
gentoo-commits@l.g.o mailing list |