public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/freelan/, net-misc/freelan/files/
@ 2016-03-29 16:19 Alexis Ballier
  0 siblings, 0 replies; only message in thread
From: Alexis Ballier @ 2016-03-29 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     4015d229e7fc42f4550cd8e0132fc8b257a44859
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 29 16:19:21 2016 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Mar 29 16:19:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4015d229

net-misc/freelan: initial import; ebuild by me

Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 net-misc/freelan/Manifest             |  1 +
 net-misc/freelan/files/boost158.patch | 41 ++++++++++++++++++
 net-misc/freelan/files/mf.patch       | 33 ++++++++++++++
 net-misc/freelan/files/prefix.patch   | 81 +++++++++++++++++++++++++++++++++++
 net-misc/freelan/freelan-2.0.ebuild   | 58 +++++++++++++++++++++++++
 net-misc/freelan/metadata.xml         |  8 ++++
 6 files changed, 222 insertions(+)

diff --git a/net-misc/freelan/Manifest b/net-misc/freelan/Manifest
new file mode 100644
index 0000000..ea577c9
--- /dev/null
+++ b/net-misc/freelan/Manifest
@@ -0,0 +1 @@
+DIST freelan-2.0.tar.gz 4330112 SHA256 02fa5b4806655ca7ad24bdb265a7b79e2e8b900797dca1c87a157e76ec85f529 SHA512 72e5381fdad4d413f4f85c4789ad78c38360a300da6f49a3e8119fe2cacb7a7b05ce16ddcbfcdc008e1c2848c535648967e92f082338fdfb2c1b8e43f53291cc WHIRLPOOL ba51350692c510a689772cb75a03f0607d58898581d85d3c58f78191df72bb2a762ee14a6fcb0c49745170ddf015a49b090a679613dfc1d2b478dc35e2d9a7d8

diff --git a/net-misc/freelan/files/boost158.patch b/net-misc/freelan/files/boost158.patch
new file mode 100644
index 0000000..7d5bb74
--- /dev/null
+++ b/net-misc/freelan/files/boost158.patch
@@ -0,0 +1,41 @@
+commit 68d18a5a7dd7fad8638409d46d144d33a30b54ce
+Author: Mihai Bişog <mihai.bisog@gmail.com>
+Date:   Sat Aug 1 15:18:35 2015 +0300
+
+    Fixed compilation errors when compiling against boost 1.58
+
+diff --git a/libs/asiotap/include/asiotap/types/endpoint.hpp b/libs/asiotap/include/asiotap/types/endpoint.hpp
+index 125e1b4..318b7e6 100644
+--- a/libs/asiotap/include/asiotap/types/endpoint.hpp
++++ b/libs/asiotap/include/asiotap/types/endpoint.hpp
+@@ -350,6 +350,9 @@ namespace asiotap
+ 	 */
+ 	std::istream& operator>>(std::istream& is, endpoint& value);
+ 
++// Note: this operator is defined in boost variant as of version 1.58. Keeping it around will
++// introduce overload resolution ambiguity.
++#if BOOST_VERSION < 105800
+ 	/**
+ 	 * \brief Compare two endpoints.
+ 	 * \param lhs The left argument.
+@@ -360,6 +363,7 @@ namespace asiotap
+ 	{
+ 		return !(lhs == rhs);
+ 	}
++#endif
+ 
+ 	/**
+ 	 * \brief Get an endpoint with a default port.
+diff --git a/libs/freelan/src/curl.cpp b/libs/freelan/src/curl.cpp
+index 342bb79..392d734 100644
+--- a/libs/freelan/src/curl.cpp
++++ b/libs/freelan/src/curl.cpp
+@@ -146,7 +146,7 @@ namespace freelan
+ 
+ 	void curl::set_proxy(const asiotap::endpoint& proxy)
+ 	{
+-		if (proxy != asiotap::hostname_endpoint::null())
++		if (proxy != asiotap::endpoint(asiotap::hostname_endpoint::null()))
+ 		{
+ 			set_option(CURLOPT_PROXY, static_cast<const void*>(boost::lexical_cast<std::string>(proxy).c_str()));
+ 		}

diff --git a/net-misc/freelan/files/mf.patch b/net-misc/freelan/files/mf.patch
new file mode 100644
index 0000000..c7e169f
--- /dev/null
+++ b/net-misc/freelan/files/mf.patch
@@ -0,0 +1,33 @@
+commit 4109bb053906f45b545a6cca4399734b91bca425
+Author: Julien Kauffmann <julien.kauffmann@freelan.org>
+Date:   Sat May 9 16:55:51 2015 -0400
+
+    Fixed Makefile
+
+diff --git a/Makefile b/Makefile
+index d6bcd59..20b5ea1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,14 +1,15 @@
+ PRODUCT_NAME:=freelan
+-PRODUCT_VERSION:=$(shell git describe)
++PRODUCT_VERSION:=$(shell cat VERSION | tr -d '\r\n')
++PRODUCT_PREFIX=/usr
+ 
+-default: install
+-
+-install:
+-	# Install the files to ${DESTDIR} (defaults to /)
+-	scons install prefix=/
++default: build
+ 
+ build:
+-	scons all samples
++	FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} scons --mode=release apps prefix=${PRODUCT_PREFIX}
++
++install:
++	# Install the files to $(DESTDIR) (defaults to /)
++	FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} DESTDIR=$(DESTDIR) scons --mode=release install prefix=${PRODUCT_PREFIX}
+ 
+ package:
+ 	git archive HEAD --prefix=${PRODUCT_NAME}-${PRODUCT_VERSION}/ | gzip > ${PRODUCT_NAME}-${PRODUCT_VERSION}.tar.gz

diff --git a/net-misc/freelan/files/prefix.patch b/net-misc/freelan/files/prefix.patch
new file mode 100644
index 0000000..ac75e87
--- /dev/null
+++ b/net-misc/freelan/files/prefix.patch
@@ -0,0 +1,81 @@
+commit d782a42eaeecdce9b4377a7b41dc60b9fecca31c
+Author: Julien Kauffmann <julien.kauffmann@freelan.org>
+Date:   Sat May 9 19:30:11 2015 -0400
+
+    Added support for a different binary prefix
+
+diff --git a/Makefile b/Makefile
+index 20b5ea1..b009d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,15 +1,16 @@
+ PRODUCT_NAME:=freelan
+ PRODUCT_VERSION:=$(shell cat VERSION | tr -d '\r\n')
+-PRODUCT_PREFIX=/usr
++PRODUCT_BIN_PREFIX=/usr
++PRODUCT_PREFIX=/
+ 
+ default: build
+ 
+ build:
+-	FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} scons --mode=release apps prefix=${PRODUCT_PREFIX}
++	FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} scons --mode=release apps prefix=${PRODUCT_PREFIX} bin_prefix=${PRODUCT_BIN_PREFIX}
+ 
+ install:
+ 	# Install the files to $(DESTDIR) (defaults to /)
+-	FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} DESTDIR=$(DESTDIR) scons --mode=release install prefix=${PRODUCT_PREFIX}
++	FREELAN_NO_GIT=1 FREELAN_NO_GIT_VERSION=${PRODUCT_VERSION} DESTDIR=$(DESTDIR) scons --mode=release install prefix=${PRODUCT_PREFIX} bin_prefix=${PRODUCT_BIN_PREFIX}
+ 
+ package:
+ 	git archive HEAD --prefix=${PRODUCT_NAME}-${PRODUCT_VERSION}/ | gzip > ${PRODUCT_NAME}-${PRODUCT_VERSION}.tar.gz
+diff --git a/SConstruct b/SConstruct
+index 32a9915..bc68b71 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -28,7 +28,7 @@ class FreelanEnvironment(Environment):
+     A freelan specific environment class.
+     """
+ 
+-    def __init__(self, mode, prefix, **kwargs):
++    def __init__(self, mode, prefix, bin_prefix=None, **kwargs):
+         """
+         Initialize the environment.
+ 
+@@ -66,14 +66,19 @@ class FreelanEnvironment(Environment):
+ 
+         self.mode = mode
+         self.prefix = prefix
++        self.bin_prefix = bin_prefix if bin_prefix else prefix
+         self.destdir = self['ENV'].get('DESTDIR', '')
+ 
+         if self.destdir:
+             self.install_prefix = os.path.normpath(
+                 os.path.abspath(self.destdir),
+             ) + self.prefix
++            self.bin_install_prefix = os.path.normpath(
++                os.path.abspath(self.destdir),
++            ) + self.bin_prefix
+         else:
+             self.install_prefix = self.prefix
++            self.bin_install_prefix = self.bin_prefix
+ 
+         if os.path.basename(self['CXX']) == 'clang++':
+             self.Append(CXXFLAGS=['-Qunused-arguments'])
+@@ -147,10 +152,15 @@ class FreelanEnvironment(Environment):
+ mode = GetOption('mode')
+ prefix = os.path.normpath(os.path.abspath(ARGUMENTS.get('prefix', './install')))
+ 
++if 'bin_prefix' in ARGUMENTS:
++    bin_prefix = os.path.normpath(os.path.abspath(ARGUMENTS['bin_prefix']))
++else:
++    bin_prefix = None
++
+ if mode in ('all', 'release'):
+-    env = FreelanEnvironment(mode='release', prefix=prefix)
++    env = FreelanEnvironment(mode='release', prefix=prefix, bin_prefix=bin_prefix)
+     libraries, includes, apps, samples, configurations = SConscript('SConscript', exports='env', variant_dir=os.path.join('build', env.mode))
+-    install = env.Install(os.path.join(env.install_prefix, 'bin'), apps)
++    install = env.Install(os.path.join(env.bin_install_prefix, 'bin'), apps)
+     install.extend(env.Install(os.path.join(env.install_prefix, 'etc', 'freelan'), configurations))
+ 
+     Alias('install', install)

diff --git a/net-misc/freelan/freelan-2.0.ebuild b/net-misc/freelan/freelan-2.0.ebuild
new file mode 100644
index 0000000..c8d8d49
--- /dev/null
+++ b/net-misc/freelan/freelan-2.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit scons-utils toolchain-funcs eutils
+
+DESCRIPTION="Peer-to-peer VPN software that abstracts a LAN over the Internet"
+HOMEPAGE="http://www.freelan.org/"
+SRC_URI="https://github.com/freelan-developers/freelan/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+DEPEND="
+	dev-libs/boost:=[threads]
+	dev-libs/openssl:0=
+	net-misc/curl:=
+	virtual/libiconv
+"
+RDEPEND="${DEPEND}"
+
+FREELAN_NO_GIT=1
+FREELAN_NO_GIT_VERSION=${PV}
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}/boost158.patch" \
+		"${FILESDIR}/mf.patch" \
+		"${FILESDIR}/prefix.patch"
+
+	sed -e "s/CXXFLAGS='-O3'/CXXFLAGS=''/" \
+		-e "s/CXXFLAGS=\['-Werror'\]/CXXFLAGS=[]/" \
+		-e "s/CXXFLAGS=\['-pedantic'\]/CXXFLAGS=[]/" \
+		-i SConstruct || die
+	epatch_user
+}
+
+src_compile() {
+	tc-export CXX CC AR
+	export LINK="$(tc-getCXX)"
+
+	local MYSCONS=(
+		"--mode=$(usex debug debug release)"
+		prefix="${EPREFIX:-/}"
+		bin_prefix="/usr"
+		apps
+	)
+	escons "${MYSCONS[@]}"
+}
+
+src_install() {
+	DESTDIR="${D}" escons --mode=release prefix="${EPREFIX:-/}" bin_prefix="/usr" install
+	dodoc CONTRIBUTING.md README.md
+}

diff --git a/net-misc/freelan/metadata.xml b/net-misc/freelan/metadata.xml
new file mode 100644
index 0000000..d8d5cc7
--- /dev/null
+++ b/net-misc/freelan/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>aballier@gentoo.org</email>
+		<name>Alexis Ballier</name>
+	</maintainer>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-29 16:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-29 16:19 [gentoo-commits] repo/gentoo:master commit in: net-misc/freelan/, net-misc/freelan/files/ Alexis Ballier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox