Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libnatpmp/files/, net-libs/libnatpmp/
Date: Tue, 11 Feb 2020 11:59:06
Message-Id: 1581422329.adeb4e0c6e7903a8fb1f07f7caee0cb7e84ddd84.soap@gentoo
1 commit: adeb4e0c6e7903a8fb1f07f7caee0cb7e84ddd84
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 11 11:58:49 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 11 11:58:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adeb4e0c
7
8 net-libs/libnatpmp: Clean up patches
9
10 Package-Manager: Portage-2.3.88, Repoman-2.3.20
11 Signed-off-by: David Seifert <soap <AT> gentoo.org>
12
13 ...30911.patch => libnatpmp-20150609-gentoo.patch} | 49 ++++++++++++++++------
14 .../libnatpmp/files/respect-FLAGS-20140401.patch | 36 ----------------
15 .../libnatpmp/files/respect-libdir-20120821.patch | 20 ---------
16 net-libs/libnatpmp/libnatpmp-20150609.ebuild | 6 +--
17 4 files changed, 37 insertions(+), 74 deletions(-)
18
19 diff --git a/net-libs/libnatpmp/files/remove-static-lib-20130911.patch b/net-libs/libnatpmp/files/libnatpmp-20150609-gentoo.patch
20 similarity index 66%
21 rename from net-libs/libnatpmp/files/remove-static-lib-20130911.patch
22 rename to net-libs/libnatpmp/files/libnatpmp-20150609-gentoo.patch
23 index a2c1f516c36..41593a04158 100644
24 --- a/net-libs/libnatpmp/files/remove-static-lib-20130911.patch
25 +++ b/net-libs/libnatpmp/files/libnatpmp-20150609-gentoo.patch
26 @@ -1,7 +1,17 @@
27 -diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
28 ---- libnatpmp-20130911.orig/Makefile 2013-09-13 07:00:55.874343916 -0400
29 -+++ libnatpmp-20130911/Makefile 2013-09-13 07:03:33.733351101 -0400
30 -@@ -35,7 +35,6 @@
31 +--- a/Makefile
32 ++++ b/Makefile
33 +@@ -4,8 +4,9 @@
34 + # (c) 2007-2013 Thomas Bernard
35 + # http://miniupnp.free.fr/libnatpmp.html
36 +
37 ++GENTOO_LIBDIR ?= lib
38 + OS = $(shell uname -s)
39 +-CC = gcc
40 ++CC ?= gcc
41 + INSTALL = install -p
42 + ARCH = $(shell uname -m | sed -e s/i.86/i686/)
43 + VERSION = $(shell cat VERSION)
44 +@@ -35,7 +36,6 @@
45
46 OBJS = $(LIBOBJS) testgetgateway.o natpmpc.o natpmp-jni.o
47
48 @@ -9,7 +19,7 @@ diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
49 ifeq ($(OS), Darwin)
50 SHAREDLIB = libnatpmp.dylib
51 JNISHAREDLIB = libjninatpmp.dylib
52 -@@ -58,7 +57,7 @@
53 +@@ -58,11 +58,11 @@
54
55 HEADERS = natpmp.h
56
57 @@ -18,7 +28,12 @@ diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
58
59 INSTALLPREFIX ?= $(PREFIX)/usr
60 INSTALLDIRINC = $(INSTALLPREFIX)/include
61 -@@ -72,9 +71,9 @@
62 +-INSTALLDIRLIB = $(INSTALLPREFIX)/lib
63 ++INSTALLDIRLIB = $(INSTALLPREFIX)/$(GENTOO_LIBDIR)
64 + INSTALLDIRBIN = $(INSTALLPREFIX)/bin
65 +
66 + JAVA ?= java
67 +@@ -74,9 +74,9 @@
68
69 .PHONY: all clean depend install cleaninstall installpythonmodule
70
71 @@ -30,7 +45,7 @@ diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
72 python setup.py build
73 touch $@
74
75 -@@ -82,18 +81,17 @@
76 +@@ -84,18 +84,17 @@
77 python setup.py install
78
79 clean:
80 @@ -51,7 +66,7 @@ diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
81 $(INSTALL) -m 644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME)
82 $(INSTALL) -d $(INSTALLDIRBIN)
83 $(INSTALL) -m 755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc
84 -@@ -142,20 +140,13 @@
85 +@@ -147,25 +146,18 @@
86 $(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))
87 $(RM) $(INSTALLDIRLIB)/$(SONAME)
88 $(RM) $(INSTALLDIRLIB)/$(SHAREDLIB)
89 @@ -61,14 +76,22 @@ diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
90 $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
91
92 -natpmpc-static: natpmpc.o $(STATICLIB)
93 -- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
94 +- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
95 -
96 natpmpc-shared: natpmpc.o $(SHAREDLIB)
97 - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
98 -
99 +- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
100 +-
101 -$(STATICLIB): $(LIBOBJS)
102 - $(AR) crs $@ $?
103 --
104 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
105 +
106 $(SHAREDLIB): $(LIBOBJS)
107 ifeq ($(OS), Darwin)
108 - $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
109 +- $(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
110 ++ $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
111 + else
112 +- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
113 ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
114 + endif
115 +
116 +
117
118 diff --git a/net-libs/libnatpmp/files/respect-FLAGS-20140401.patch b/net-libs/libnatpmp/files/respect-FLAGS-20140401.patch
119 deleted file mode 100644
120 index 0a007b169a7..00000000000
121 --- a/net-libs/libnatpmp/files/respect-FLAGS-20140401.patch
122 +++ /dev/null
123 @@ -1,36 +0,0 @@
124 -diff -Naur libnatpmp-20140401.orig/Makefile libnatpmp-20140401/Makefile
125 ---- libnatpmp-20140401.orig/Makefile 2013-12-09 15:52:28.000000000 -0500
126 -+++ libnatpmp-20140401/Makefile 2014-04-02 10:03:42.128609226 -0400
127 -@@ -5,7 +5,7 @@
128 - # http://miniupnp.free.fr/libnatpmp.html
129 -
130 - OS = $(shell uname -s)
131 --CC = gcc
132 -+CC ?= gcc
133 - INSTALL = install -p
134 - ARCH = $(shell uname -m | sed -e s/i.86/i686/)
135 - VERSION = $(shell cat VERSION)
136 -@@ -153,19 +153,19 @@
137 - $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
138 -
139 - natpmpc-static: natpmpc.o $(STATICLIB)
140 -- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
141 -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
142 -
143 - natpmpc-shared: natpmpc.o $(SHAREDLIB)
144 -- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
145 -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
146 -
147 - $(STATICLIB): $(LIBOBJS)
148 - $(AR) crs $@ $?
149 -
150 - $(SHAREDLIB): $(LIBOBJS)
151 - ifeq ($(OS), Darwin)
152 -- $(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
153 -+ $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
154 - else
155 -- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
156 -+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
157 - endif
158 -
159 -
160
161 diff --git a/net-libs/libnatpmp/files/respect-libdir-20120821.patch b/net-libs/libnatpmp/files/respect-libdir-20120821.patch
162 deleted file mode 100644
163 index 90b7167a1d4..00000000000
164 --- a/net-libs/libnatpmp/files/respect-libdir-20120821.patch
165 +++ /dev/null
166 @@ -1,20 +0,0 @@
167 -diff -Naur libnatpmp-20120821.orig/Makefile libnatpmp-20120821/Makefile
168 ---- libnatpmp-20120821.orig/Makefile 2012-08-26 20:26:27.000000000 -0400
169 -+++ libnatpmp-20120821/Makefile 2012-08-26 20:27:07.000000000 -0400
170 -@@ -4,6 +4,7 @@
171 - # (c) 2007-2011 Thomas Bernard
172 - # http://miniupnp.free.fr/libnatpmp.html
173 -
174 -+GENTOO_LIBDIR ?= lib
175 - OS = $(shell uname -s)
176 - CC ?= gcc
177 - INSTALL = install
178 -@@ -41,7 +42,7 @@
179 -
180 - INSTALLPREFIX ?= $(PREFIX)/usr
181 - INSTALLDIRINC = $(INSTALLPREFIX)/include
182 --INSTALLDIRLIB = $(INSTALLPREFIX)/lib
183 -+INSTALLDIRLIB = $(INSTALLPREFIX)/$(GENTOO_LIBDIR)
184 - INSTALLDIRBIN = $(INSTALLPREFIX)/bin
185 -
186 - .PHONY: all clean depend install cleaninstall installpythonmodule
187
188 diff --git a/net-libs/libnatpmp/libnatpmp-20150609.ebuild b/net-libs/libnatpmp/libnatpmp-20150609.ebuild
189 index 674532814d8..4c214c0cc10 100644
190 --- a/net-libs/libnatpmp/libnatpmp-20150609.ebuild
191 +++ b/net-libs/libnatpmp/libnatpmp-20150609.ebuild
192 @@ -13,11 +13,7 @@ LICENSE="BSD"
193 SLOT="0"
194 KEYWORDS="amd64 arm ~arm64 ~hppa ~mips ppc ppc64 sparc x86"
195
196 -PATCHES=(
197 - "${FILESDIR}"/respect-FLAGS-20140401.patch
198 - "${FILESDIR}"/respect-libdir-20120821.patch
199 - "${FILESDIR}"/remove-static-lib-20130911.patch
200 -)
201 +PATCHES=( "${FILESDIR}"/${PN}-20150609-gentoo.patch )
202
203 src_configure() {
204 tc-export CC