/[gentoo-x86]/net-libs/libnatpmp/files/respect-FLAGS.patch
Gentoo

Contents of /net-libs/libnatpmp/files/respect-FLAGS.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Mar 9 03:48:22 2012 UTC (6 years, 9 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +26 -10 lines
Clean up patches a bit to respect LDFLAGS and not over use -fPIC.

(Portage version: 2.2.0_alpha86/cvs/Linux x86_64)

1 vapier 1.3 --- libnatpmp-20110808/Makefile
2     +++ libnatpmp-20110808/Makefile
3     @@ -4,13 +4,12 @@
4 blueness 1.1 # http://miniupnp.free.fr/libnatpmp.html
5    
6     OS = $(shell uname -s)
7 blueness 1.2 -CC = gcc
8     +CC ?= gcc
9 blueness 1.1 INSTALL = install
10 blueness 1.2
11 blueness 1.1 # APIVERSION is used in soname
12     APIVERSION = 1
13 blueness 1.2 -#LDFLAGS = -Wl,--no-undefined
14     -CFLAGS = -O -fPIC -Wall -DENABLE_STRNATPMPERR
15 vapier 1.3 +CFLAGS := -Wall -DENABLE_STRNATPMPERR $(CFLAGS)
16 blueness 1.1
17     LIBOBJS = natpmp.o getgateway.o
18    
19 vapier 1.3 @@ -75,16 +75,18 @@
20     testgetgateway: testgetgateway.o getgateway.o
21    
22     natpmpc-shared: natpmpc.o $(SHAREDLIB)
23     - $(CC) $(LDFLAGS) -o $@ $^
24     + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
25     +
26     +getgateway.o natpmp.o: CFLAGS += -fPIC
27    
28     $(STATICLIB): $(LIBOBJS)
29     $(AR) crs $@ $?
30    
31     $(SHAREDLIB): $(LIBOBJS)
32     ifeq ($(OS), Darwin)
33     - $(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
34     + $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
35     else
36     - $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^
37     + $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^
38     endif
39    
40     # DO NOT DELETE

  ViewVC Help
Powered by ViewVC 1.1.20