1 |
commit: 4015d229e7fc42f4550cd8e0132fc8b257a44859 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 29 16:19:21 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 16:19:30 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4015d229 |
7 |
|
8 |
net-misc/freelan: initial import; ebuild by me |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
net-misc/freelan/Manifest | 1 + |
14 |
net-misc/freelan/files/boost158.patch | 41 ++++++++++++++++++ |
15 |
net-misc/freelan/files/mf.patch | 33 ++++++++++++++ |
16 |
net-misc/freelan/files/prefix.patch | 81 +++++++++++++++++++++++++++++++++++ |
17 |
net-misc/freelan/freelan-2.0.ebuild | 58 +++++++++++++++++++++++++ |
18 |
net-misc/freelan/metadata.xml | 8 ++++ |
19 |
6 files changed, 222 insertions(+) |
20 |
|
21 |
diff --git a/net-misc/freelan/Manifest b/net-misc/freelan/Manifest |
22 |
new file mode 100644 |
23 |
index 0000000..ea577c9 |
24 |
--- /dev/null |
25 |
+++ b/net-misc/freelan/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST freelan-2.0.tar.gz 4330112 SHA256 02fa5b4806655ca7ad24bdb265a7b79e2e8b900797dca1c87a157e76ec85f529 SHA512 72e5381fdad4d413f4f85c4789ad78c38360a300da6f49a3e8119fe2cacb7a7b05ce16ddcbfcdc008e1c2848c535648967e92f082338fdfb2c1b8e43f53291cc WHIRLPOOL ba51350692c510a689772cb75a03f0607d58898581d85d3c58f78191df72bb2a762ee14a6fcb0c49745170ddf015a49b090a679613dfc1d2b478dc35e2d9a7d8 |
28 |
|
29 |
diff --git a/net-misc/freelan/files/boost158.patch b/net-misc/freelan/files/boost158.patch |
30 |
new file mode 100644 |
31 |
index 0000000..7d5bb74 |
32 |
--- /dev/null |
33 |
+++ b/net-misc/freelan/files/boost158.patch |
34 |
@@ -0,0 +1,41 @@ |
35 |
+commit 68d18a5a7dd7fad8638409d46d144d33a30b54ce |
36 |
+Author: Mihai Bişog <mihai.bisog@×××××.com> |
37 |
+Date: Sat Aug 1 15:18:35 2015 +0300 |
38 |
+ |
39 |
+ Fixed compilation errors when compiling against boost 1.58 |
40 |
+ |
41 |
+diff --git a/libs/asiotap/include/asiotap/types/endpoint.hpp b/libs/asiotap/include/asiotap/types/endpoint.hpp |
42 |
+index 125e1b4..318b7e6 100644 |
43 |
+--- a/libs/asiotap/include/asiotap/types/endpoint.hpp |
44 |
++++ b/libs/asiotap/include/asiotap/types/endpoint.hpp |
45 |
+@@ -350,6 +350,9 @@ namespace asiotap |
46 |
+ */ |
47 |
+ std::istream& operator>>(std::istream& is, endpoint& value); |
48 |
+ |
49 |
++// Note: this operator is defined in boost variant as of version 1.58. Keeping it around will |
50 |
++// introduce overload resolution ambiguity. |
51 |
++#if BOOST_VERSION < 105800 |
52 |
+ /** |
53 |
+ * \brief Compare two endpoints. |
54 |
+ * \param lhs The left argument. |
55 |
+@@ -360,6 +363,7 @@ namespace asiotap |
56 |
+ { |
57 |
+ return !(lhs == rhs); |
58 |
+ } |
59 |
++#endif |
60 |
+ |
61 |
+ /** |
62 |
+ * \brief Get an endpoint with a default port. |
63 |
+diff --git a/libs/freelan/src/curl.cpp b/libs/freelan/src/curl.cpp |
64 |
+index 342bb79..392d734 100644 |
65 |
+--- a/libs/freelan/src/curl.cpp |
66 |
++++ b/libs/freelan/src/curl.cpp |
67 |
+@@ -146,7 +146,7 @@ namespace freelan |
68 |
+ |
69 |
+ void curl::set_proxy(const asiotap::endpoint& proxy) |
70 |
+ { |
71 |
+- if (proxy != asiotap::hostname_endpoint::null()) |
72 |
++ if (proxy != asiotap::endpoint(asiotap::hostname_endpoint::null())) |
73 |
+ { |
74 |
+ set_option(CURLOPT_PROXY, static_cast<const void*>(boost::lexical_cast<std::string>(proxy).c_str())); |
75 |
+ } |
76 |
|
77 |
diff --git a/net-misc/freelan/files/mf.patch b/net-misc/freelan/files/mf.patch |
78 |
new file mode 100644 |
79 |
index 0000000..c7e169f |
80 |
--- /dev/null |
81 |
+++ b/net-misc/freelan/files/mf.patch |
82 |
@@ -0,0 +1,33 @@ |
83 |
+commit 4109bb053906f45b545a6cca4399734b91bca425 |
84 |
+Author: Julien Kauffmann <julien.kauffmann@×××××××.org> |
85 |
+Date: Sat May 9 16:55:51 2015 -0400 |
86 |
+ |
87 |
+ Fixed Makefile |
88 |
+ |
89 |
+diff --git a/Makefile b/Makefile |
90 |
+index d6bcd59..20b5ea1 100644 |
91 |
+--- a/Makefile |
92 |
++++ b/Makefile |
93 |
+@@ -1,14 +1,15 @@ |
94 |
+ PRODUCT_NAME:=freelan |
95 |
+-PRODUCT_VERSION:=$(shell git describe) |
96 |
++PRODUCT_VERSION:=$(shell cat VERSION | tr -d '\r\n') |
97 |
++PRODUCT_PREFIX=/usr |
98 |
+ |
99 |
+-default: install |
100 |
+- |
101 |
+-install: |
102 |
+- # Install the files to ${DESTDIR} (defaults to /) |
103 |
+- scons install prefix=/ |
104 |
++default: build |
105 |
+ |
106 |
+ build: |
107 |
+- scons all samples |
108 |
++ FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} scons --mode=release apps prefix=${PRODUCT_PREFIX} |
109 |
++ |
110 |
++install: |
111 |
++ # Install the files to $(DESTDIR) (defaults to /) |
112 |
++ FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} DESTDIR=$(DESTDIR) scons --mode=release install prefix=${PRODUCT_PREFIX} |
113 |
+ |
114 |
+ package: |
115 |
+ git archive HEAD --prefix=${PRODUCT_NAME}-${PRODUCT_VERSION}/ | gzip > ${PRODUCT_NAME}-${PRODUCT_VERSION}.tar.gz |
116 |
|
117 |
diff --git a/net-misc/freelan/files/prefix.patch b/net-misc/freelan/files/prefix.patch |
118 |
new file mode 100644 |
119 |
index 0000000..ac75e87 |
120 |
--- /dev/null |
121 |
+++ b/net-misc/freelan/files/prefix.patch |
122 |
@@ -0,0 +1,81 @@ |
123 |
+commit d782a42eaeecdce9b4377a7b41dc60b9fecca31c |
124 |
+Author: Julien Kauffmann <julien.kauffmann@×××××××.org> |
125 |
+Date: Sat May 9 19:30:11 2015 -0400 |
126 |
+ |
127 |
+ Added support for a different binary prefix |
128 |
+ |
129 |
+diff --git a/Makefile b/Makefile |
130 |
+index 20b5ea1..b009d2c 100644 |
131 |
+--- a/Makefile |
132 |
++++ b/Makefile |
133 |
+@@ -1,15 +1,16 @@ |
134 |
+ PRODUCT_NAME:=freelan |
135 |
+ PRODUCT_VERSION:=$(shell cat VERSION | tr -d '\r\n') |
136 |
+-PRODUCT_PREFIX=/usr |
137 |
++PRODUCT_BIN_PREFIX=/usr |
138 |
++PRODUCT_PREFIX=/ |
139 |
+ |
140 |
+ default: build |
141 |
+ |
142 |
+ build: |
143 |
+- FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} scons --mode=release apps prefix=${PRODUCT_PREFIX} |
144 |
++ FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} scons --mode=release apps prefix=${PRODUCT_PREFIX} bin_prefix=${PRODUCT_BIN_PREFIX} |
145 |
+ |
146 |
+ install: |
147 |
+ # Install the files to $(DESTDIR) (defaults to /) |
148 |
+- FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} DESTDIR=$(DESTDIR) scons --mode=release install prefix=${PRODUCT_PREFIX} |
149 |
++ FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} DESTDIR=$(DESTDIR) scons --mode=release install prefix=${PRODUCT_PREFIX} bin_prefix=${PRODUCT_BIN_PREFIX} |
150 |
+ |
151 |
+ package: |
152 |
+ git archive HEAD --prefix=${PRODUCT_NAME}-${PRODUCT_VERSION}/ | gzip > ${PRODUCT_NAME}-${PRODUCT_VERSION}.tar.gz |
153 |
+diff --git a/SConstruct b/SConstruct |
154 |
+index 32a9915..bc68b71 100644 |
155 |
+--- a/SConstruct |
156 |
++++ b/SConstruct |
157 |
+@@ -28,7 +28,7 @@ class FreelanEnvironment(Environment): |
158 |
+ A freelan specific environment class. |
159 |
+ """ |
160 |
+ |
161 |
+- def __init__(self, mode, prefix, **kwargs): |
162 |
++ def __init__(self, mode, prefix, bin_prefix=None, **kwargs): |
163 |
+ """ |
164 |
+ Initialize the environment. |
165 |
+ |
166 |
+@@ -66,14 +66,19 @@ class FreelanEnvironment(Environment): |
167 |
+ |
168 |
+ self.mode = mode |
169 |
+ self.prefix = prefix |
170 |
++ self.bin_prefix = bin_prefix if bin_prefix else prefix |
171 |
+ self.destdir = self['ENV'].get('DESTDIR', '') |
172 |
+ |
173 |
+ if self.destdir: |
174 |
+ self.install_prefix = os.path.normpath( |
175 |
+ os.path.abspath(self.destdir), |
176 |
+ ) + self.prefix |
177 |
++ self.bin_install_prefix = os.path.normpath( |
178 |
++ os.path.abspath(self.destdir), |
179 |
++ ) + self.bin_prefix |
180 |
+ else: |
181 |
+ self.install_prefix = self.prefix |
182 |
++ self.bin_install_prefix = self.bin_prefix |
183 |
+ |
184 |
+ if os.path.basename(self['CXX']) == 'clang++': |
185 |
+ self.Append(CXXFLAGS=['-Qunused-arguments']) |
186 |
+@@ -147,10 +152,15 @@ class FreelanEnvironment(Environment): |
187 |
+ mode = GetOption('mode') |
188 |
+ prefix = os.path.normpath(os.path.abspath(ARGUMENTS.get('prefix', './install'))) |
189 |
+ |
190 |
++if 'bin_prefix' in ARGUMENTS: |
191 |
++ bin_prefix = os.path.normpath(os.path.abspath(ARGUMENTS['bin_prefix'])) |
192 |
++else: |
193 |
++ bin_prefix = None |
194 |
++ |
195 |
+ if mode in ('all', 'release'): |
196 |
+- env = FreelanEnvironment(mode='release', prefix=prefix) |
197 |
++ env = FreelanEnvironment(mode='release', prefix=prefix, bin_prefix=bin_prefix) |
198 |
+ libraries, includes, apps, samples, configurations = SConscript('SConscript', exports='env', variant_dir=os.path.join('build', env.mode)) |
199 |
+- install = env.Install(os.path.join(env.install_prefix, 'bin'), apps) |
200 |
++ install = env.Install(os.path.join(env.bin_install_prefix, 'bin'), apps) |
201 |
+ install.extend(env.Install(os.path.join(env.install_prefix, 'etc', 'freelan'), configurations)) |
202 |
+ |
203 |
+ Alias('install', install) |
204 |
|
205 |
diff --git a/net-misc/freelan/freelan-2.0.ebuild b/net-misc/freelan/freelan-2.0.ebuild |
206 |
new file mode 100644 |
207 |
index 0000000..c8d8d49 |
208 |
--- /dev/null |
209 |
+++ b/net-misc/freelan/freelan-2.0.ebuild |
210 |
@@ -0,0 +1,58 @@ |
211 |
+# Copyright 1999-2016 Gentoo Foundation |
212 |
+# Distributed under the terms of the GNU General Public License v2 |
213 |
+# $Id$ |
214 |
+ |
215 |
+EAPI=5 |
216 |
+ |
217 |
+inherit scons-utils toolchain-funcs eutils |
218 |
+ |
219 |
+DESCRIPTION="Peer-to-peer VPN software that abstracts a LAN over the Internet" |
220 |
+HOMEPAGE="http://www.freelan.org/" |
221 |
+SRC_URI="https://github.com/freelan-developers/freelan/archive/${PV}.tar.gz -> ${P}.tar.gz" |
222 |
+ |
223 |
+LICENSE="GPL-3" |
224 |
+SLOT="0" |
225 |
+KEYWORDS="~amd64" |
226 |
+IUSE="debug" |
227 |
+ |
228 |
+DEPEND=" |
229 |
+ dev-libs/boost:=[threads] |
230 |
+ dev-libs/openssl:0= |
231 |
+ net-misc/curl:= |
232 |
+ virtual/libiconv |
233 |
+" |
234 |
+RDEPEND="${DEPEND}" |
235 |
+ |
236 |
+FREELAN_NO_GIT=1 |
237 |
+FREELAN_NO_GIT_VERSION=${PV} |
238 |
+ |
239 |
+src_prepare() { |
240 |
+ epatch \ |
241 |
+ "${FILESDIR}/boost158.patch" \ |
242 |
+ "${FILESDIR}/mf.patch" \ |
243 |
+ "${FILESDIR}/prefix.patch" |
244 |
+ |
245 |
+ sed -e "s/CXXFLAGS='-O3'/CXXFLAGS=''/" \ |
246 |
+ -e "s/CXXFLAGS=\['-Werror'\]/CXXFLAGS=[]/" \ |
247 |
+ -e "s/CXXFLAGS=\['-pedantic'\]/CXXFLAGS=[]/" \ |
248 |
+ -i SConstruct || die |
249 |
+ epatch_user |
250 |
+} |
251 |
+ |
252 |
+src_compile() { |
253 |
+ tc-export CXX CC AR |
254 |
+ export LINK="$(tc-getCXX)" |
255 |
+ |
256 |
+ local MYSCONS=( |
257 |
+ "--mode=$(usex debug debug release)" |
258 |
+ prefix="${EPREFIX:-/}" |
259 |
+ bin_prefix="/usr" |
260 |
+ apps |
261 |
+ ) |
262 |
+ escons "${MYSCONS[@]}" |
263 |
+} |
264 |
+ |
265 |
+src_install() { |
266 |
+ DESTDIR="${D}" escons --mode=release prefix="${EPREFIX:-/}" bin_prefix="/usr" install |
267 |
+ dodoc CONTRIBUTING.md README.md |
268 |
+} |
269 |
|
270 |
diff --git a/net-misc/freelan/metadata.xml b/net-misc/freelan/metadata.xml |
271 |
new file mode 100644 |
272 |
index 0000000..d8d5cc7 |
273 |
--- /dev/null |
274 |
+++ b/net-misc/freelan/metadata.xml |
275 |
@@ -0,0 +1,8 @@ |
276 |
+<?xml version="1.0" encoding="UTF-8"?> |
277 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
278 |
+<pkgmetadata> |
279 |
+ <maintainer type="person"> |
280 |
+ <email>aballier@g.o</email> |
281 |
+ <name>Alexis Ballier</name> |
282 |
+ </maintainer> |
283 |
+</pkgmetadata> |