diff --git a/net-libs/libupnp/Manifest b/net-libs/libupnp/Manifest new file mode 100644 index 000000000..b8b133d4f --- /dev/null +++ b/net-libs/libupnp/Manifest @@ -0,0 +1 @@ +DIST libupnp-1.8.2.tar.gz 1379953 BLAKE2B 472851bfd25530ead4c113657f0e30cf7a3a1a4c88b86864676a2b7096817c1780718710a9535068904901c21d70d92fb267f295e88531e3eeef7d9a0cee58f3 SHA512 026f2568a1ffa56a3a0ebc823b126dceabb7e821acb6db52fbca02c4c02febd5508cb644cd2ac51f65397c3248a22340b3673069951e97dcdd22d4cc321d4511 diff --git a/net-libs/libupnp/files/libupnp-1.6.19-docs-install.patch b/net-libs/libupnp/files/libupnp-1.6.19-docs-install.patch new file mode 100644 index 000000000..622f58a90 --- /dev/null +++ b/net-libs/libupnp/files/libupnp-1.6.19-docs-install.patch @@ -0,0 +1,13 @@ +--- libupnp-1.6.19/upnp/sample/Makefile.am.orig 2013-11-15 19:50:02.000000000 +0400 ++++ libupnp-1.6.19/upnp/sample/Makefile.am 2016-06-03 20:30:43.545081667 +0300 +@@ -65,8 +65,8 @@ + if WITH_DOCUMENTATION + examplesdir = $(docdir)/examples + examples_DATA = \ +- $(tv_ctrlpt_SOURCES) \ +- $(tv_device_SOURCES) ++ $(sort $(tv_ctrlpt_SOURCES) \ ++ $(tv_device_SOURCES) ) + endif + + EXTRA_DIST = \ diff --git a/net-libs/libupnp/files/libupnp-1.6.21-cflags.patch b/net-libs/libupnp/files/libupnp-1.6.21-cflags.patch new file mode 100644 index 000000000..3eaf66e80 --- /dev/null +++ b/net-libs/libupnp/files/libupnp-1.6.21-cflags.patch @@ -0,0 +1,30 @@ +don't append flags like -O0/-Os which clobber the user's settings + +--- a/configure.ac ++++ b/configure.ac +@@ -539,25 +539,6 @@ AC_PROG_EGREP + echo "--------------------- Default compilation flags -------------------------------" + echo host is $host + echo host_os is $host_os +-case $host_os in +-freebsd*) +- echo "Using FreeBSD specific compiler settings" +- # Put FreeBSD specific compiler flags here +- ;; +-*) +- echo "Using non-specific system compiler settings" +- if test x"$enable_debug" = xyes; then +- # AC_PROG_CC already sets CFLAGS to "-g -O2" by default, +- # but only if CFLAGS was not previously set. +- #: +- # Use -O0 in debug so that variables do not get optimized out +- AX_CFLAGS_GCC_OPTION([-O0, -g]) +- else +- # add optimise for size +- AX_CFLAGS_GCC_OPTION([-Os]) +- fi +- ;; +-esac + + AX_CFLAGS_WARN_ALL + echo "-------------------------------------------------------------------------------" diff --git a/net-libs/libupnp/libupnp-1.8.2.ebuild b/net-libs/libupnp/libupnp-1.8.2.ebuild new file mode 100644 index 000000000..951844294 --- /dev/null +++ b/net-libs/libupnp/libupnp-1.8.2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils flag-o-matic autotools vcs-snapshot + +DESCRIPTION="An Portable Open Source UPnP Development Kit" +HOMEPAGE="http://pupnp.sourceforge.net/" +SRC_URI="https://github.com/mrjimenez/pupnp/archive/release-${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="1.8" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="blocking-tcp debug doc ipv6 +reuseaddr samples static-libs" + +DOCS="NEWS README.md ChangeLog" + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.19-docs-install.patch + "${FILESDIR}"/${PN}-1.6.21-cflags.patch +) + +src_prepare() { + default + + # fix tests + chmod +x ixml/test/test_document.sh || die + + eautoreconf +} + +src_configure() { + use x86-fbsd && append-flags -O1 + # w/o docdir to avoid sandbox violations + econf $(use_enable debug) \ + $(use_enable blocking-tcp blocking-tcp-connections) \ + $(use_enable ipv6) \ + $(use_enable reuseaddr) \ + $(use_enable static-libs static) \ + $(use_enable samples) \ + $(use_with doc documentation "${EPREFIX}/usr/share/doc/${PF}") +} + +src_install () { + default + + use static-libs || prune_libtool_files + + # Slot samples + if $(use samples); then + for bin in combo ctrlpt device ; do + newbin "upnp/sample/.libs/tv_$bin" "tv_$bin-${SLOT}" + done + fi + + # Slot includes + cd "${D}/usr/include" || die + mv upnp "upnp-${SLOT}" || die + + # Slot pkgconfig + cd "${D}/usr/$(get_libdir)/pkgconfig" || die + mv libupnp.pc "libupnp-${SLOT}.pc" || die + sed -i -e "s#/upnp#/upnp-${SLOT}#" \ + -e "s#lupnp#lupnp-${SLOT}#" \ + -e "s#lixml#lixml-${SLOT}#" "libupnp-${SLOT}.pc" || die + + # Slot symlinks + cd "${D}/usr/$(get_libdir)" || die + mv libupnp.so "libupnp-${SLOT}.so" || die + mv libixml.so "libixml-${SLOT}.so" || die +} diff --git a/net-libs/libupnp/metadata.xml b/net-libs/libupnp/metadata.xml new file mode 100644 index 000000000..2c151ee1c --- /dev/null +++ b/net-libs/libupnp/metadata.xml @@ -0,0 +1,17 @@ + + + + + thev00d00@gentoo.org + Ian Whyman + + + pupnp + mrjimenez/pupnp + + + Allow clean restarts by binding the socket with SO_REUSEADDR. + Do not use async socket calls. + Install sample applications. + +