1 |
robbat2 13/11/02 06:40:02 |
2 |
|
3 |
Added: ipvsadm-1.27-buildsystem.patch |
4 |
Log: |
5 |
New release. Upstream has moved to kernel.org; update the build system fixes to apply. |
6 |
|
7 |
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: ipvsadm-1.27-buildsystem.patch |
16 |
=================================================================== |
17 |
diff -Nuar -Nuar --exclude '*.orig' --exclude '*.rej' ipvsadm-1.27.orig/libipvs/Makefile ipvsadm-1.27/libipvs/Makefile |
18 |
--- ipvsadm-1.27.orig/libipvs/Makefile 2013-09-06 01:37:27.000000000 -0700 |
19 |
+++ ipvsadm-1.27/libipvs/Makefile 2013-11-01 23:31:14.359495884 -0700 |
20 |
@@ -1,9 +1,9 @@ |
21 |
# Makefile for libipvs |
22 |
|
23 |
CC = gcc |
24 |
-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC |
25 |
+#OPTFLAGS = -Wall -Wunused -Wstrict-prototypes |
26 |
ifneq (0,$(HAVE_NL)) |
27 |
-CFLAGS += -DLIBIPVS_USE_NL |
28 |
+DEFINES += -DLIBIPVS_USE_NL |
29 |
CFLAGS += $(shell \ |
30 |
if which pkg-config > /dev/null 2>&1; then \ |
31 |
if pkg-config --cflags libnl-3.0 2> /dev/null; then :; \ |
32 |
@@ -15,7 +15,7 @@ |
33 |
|
34 |
INCLUDE += $(shell if [ -f ../../ip_vs.h ]; then \ |
35 |
echo "-I../../."; fi;) |
36 |
-DEFINES = $(shell if [ ! -f ../../ip_vs.h ]; then \ |
37 |
+DEFINES += $(shell if [ ! -f ../../ip_vs.h ]; then \ |
38 |
echo "-DHAVE_NET_IP_VS_H"; fi;) |
39 |
DEFINES += $(shell if which pkg-config > /dev/null 2>&1; then \ |
40 |
if pkg-config --exists libnl-3.0; then :; \ |
41 |
@@ -24,21 +24,31 @@ |
42 |
then echo "-DFALLBACK_LIBNL1"; fi; fi) |
43 |
|
44 |
.PHONY = all clean install dist distclean rpm rpms |
45 |
+ |
46 |
STATIC_LIB = libipvs.a |
47 |
SHARED_LIB = libipvs.so |
48 |
|
49 |
-all: $(STATIC_LIB) $(SHARED_LIB) |
50 |
+TARGETS = $(SHARED_LIB) |
51 |
+ifeq (1,$(STATIC)) |
52 |
+TARGETS += $(STATIC_LIB) |
53 |
+endif |
54 |
+all: $(TARGETS) |
55 |
+ |
56 |
+SOURCES = libipvs.c ip_vs_nl_policy.c |
57 |
|
58 |
-$(STATIC_LIB): libipvs.o ip_vs_nl_policy.o |
59 |
+$(STATIC_LIB): $(SOURCES:%.c=%.o) |
60 |
ar rv $@ $^ |
61 |
|
62 |
-$(SHARED_LIB): libipvs.o ip_vs_nl_policy.o |
63 |
- $(CC) -shared -Wl,-soname,$@ -o $@ $^ |
64 |
+$(SHARED_LIB): $(SOURCES:%.c=%.lo) |
65 |
+ $(CC) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^ |
66 |
+ |
67 |
+%.lo: %.c |
68 |
+ $(CC) -fPIC $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< |
69 |
|
70 |
%.o: %.c |
71 |
- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< |
72 |
+ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< |
73 |
|
74 |
clean: |
75 |
- rm -f *.[ao] *~ *.orig *.rej core *.so |
76 |
+ rm -f *.[ao] *~ *.orig *.rej core *.so *.lo |
77 |
|
78 |
distclean: clean |
79 |
diff -Nuar -Nuar --exclude '*.orig' --exclude '*.rej' ipvsadm-1.27.orig/Makefile ipvsadm-1.27/Makefile |
80 |
--- ipvsadm-1.27.orig/Makefile 2013-09-06 01:37:27.000000000 -0700 |
81 |
+++ ipvsadm-1.27/Makefile 2013-11-01 23:31:44.259015958 -0700 |
82 |
@@ -43,14 +43,13 @@ |
83 |
INIT = $(BUILD_ROOT)/etc/rc.d/init.d |
84 |
MKDIR = mkdir |
85 |
INSTALL = install |
86 |
-STATIC_LIBS = libipvs/libipvs.a |
87 |
|
88 |
ifeq "${ARCH}" "sparc64" |
89 |
- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow |
90 |
+ CFLAGS := -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow |
91 |
else |
92 |
- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g |
93 |
+ CFLAGS := -g |
94 |
endif |
95 |
- |
96 |
+OPTFLAGS += -Wall -Wunused -Wstrict-prototypes |
97 |
|
98 |
##################################### |
99 |
# No servicable parts below this line |
100 |
@@ -84,12 +83,14 @@ |
101 |
all: libs ipvsadm |
102 |
|
103 |
libs: |
104 |
- make -C libipvs |
105 |
+ $(MAKE) -C libipvs |
106 |
+ |
107 |
+$(OBJS): libs |
108 |
|
109 |
-ipvsadm: $(OBJS) $(STATIC_LIBS) |
110 |
- $(CC) $(CFLAGS) -o $@ $^ $(LIBS) |
111 |
+ipvsadm: $(OBJS) |
112 |
+ $(CC) $(LDFLAGS) $(OPTFLAGS) $(CFLAGS) -o $@ $^ -Llibipvs -lipvs $(LIBS) |
113 |
|
114 |
-install: all |
115 |
+install: |
116 |
if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi |
117 |
$(INSTALL) -m 0755 ipvsadm $(SBIN) |
118 |
$(INSTALL) -m 0755 ipvsadm-save $(SBIN) |
119 |
@@ -98,15 +99,13 @@ |
120 |
$(INSTALL) -m 0644 ipvsadm.8 $(MAN) |
121 |
$(INSTALL) -m 0644 ipvsadm-save.8 $(MAN) |
122 |
$(INSTALL) -m 0644 ipvsadm-restore.8 $(MAN) |
123 |
- [ -d $(INIT) ] || $(MKDIR) -p $(INIT) |
124 |
- $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm |
125 |
|
126 |
clean: |
127 |
rm -f ipvsadm $(NAME).spec $(NAME)-$(VERSION).tar.gz |
128 |
rm -rf debian/tmp |
129 |
find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \ |
130 |
-o -name "*.rej" -o -name core | xargs rm -f |
131 |
- make -C libipvs clean |
132 |
+ $(MAKE) -C libipvs clean |
133 |
|
134 |
distclean: clean |
135 |
|
136 |
@@ -139,4 +138,4 @@ |
137 |
dpkg-buildpackage |
138 |
|
139 |
%.o: %.c |
140 |
- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< |
141 |
+ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $< |