diff options
Diffstat (limited to 'net-libs/onion')
-rw-r--r-- | net-libs/onion/Manifest | 6 | ||||
-rw-r--r-- | net-libs/onion/files/protos.patch | 28 | ||||
-rw-r--r-- | net-libs/onion/metadata.xml | 17 | ||||
-rw-r--r-- | net-libs/onion/onion-0.8.ebuild | 71 | ||||
-rw-r--r-- | net-libs/onion/onion-9999.ebuild | 69 |
5 files changed, 191 insertions, 0 deletions
diff --git a/net-libs/onion/Manifest b/net-libs/onion/Manifest new file mode 100644 index 000000000000..69c9d1b7b746 --- /dev/null +++ b/net-libs/onion/Manifest @@ -0,0 +1,6 @@ +AUX protos.patch 1239 SHA256 cefb42b1bd00e6c421e59a4b8fc74bbb6633f8d8630da5a67e329ed1fc519bee SHA512 0dd7f95dab267b1df6279fc60869696d506b62756a863c86ade9725dc17e48bc4b71b984d53bce94e88448ab295673fbe27e7687e2807d32841d0ad5ddf6b018 WHIRLPOOL 339ceeb46df4fefc015e441c9b044661713ae28b0e39af774633e00e41c85ef47bc0ae0358d5d316fec80f7f9d9832e1aeaeac761042c1d55140e7d8bac4f649 +DIST onion-0.8.tar.gz 344347 SHA256 9708ba74b6727fa2fef219a821241f21a661ea9a30611213b0133e7effab1b17 SHA512 c40a36346de7dee6e98d0b5c38b5e133606046e29bacb06a0055a361013077ec0f6adb04dfcbf2f4ce0b72317c9ed918573299aed8760f069dcfd7c211a302d7 WHIRLPOOL 7bdb11b950cddcc948609b6e3d9278e3ba1a17956bf2997fa5aaa62b7c0a8b2b5a023aff3a49ef0625a9a53cf3289f2446655b2c2cf015568c46bfbde1306f29 +EBUILD onion-0.8.ebuild 1885 SHA256 88c7a0347cc76ea45cf2b4339e2aa06e9a3411f102f428444f9ea8efb7a410f9 SHA512 662dedd18af86bacbb769d1fc8588ff5277b61ae8ac9e3a6c84618a63f257bcbe6c9a9a58b58c180e6a3cd2172179b404dc5613ccbddfc6586c1ffa315a88153 WHIRLPOOL c3545523aff684a308a7ee90910975c1bb509c43c9f057861180ff562ea7bf816b383851f2e518b0da461720ed37dd3562a7aa71dfa03281ff4b85f260e8cb55 +EBUILD onion-9999.ebuild 1845 SHA256 ac9fe526e62473240b5d184447603e58f1e7214fef18c7b37d5d6a04aac61e83 SHA512 8cf4f821b41d7ea8fcfb17b50a3b96c45e29670b738392942f35e7abb9b01b8158b3d8e02094e6c66aa49116c79700197a4728deb80c0f8f0ec53a120f8753b8 WHIRLPOOL ce0340ad80827e6e0c805f60d8d6e72b441304f018e63ccc075f42f9806e4f4172ac10d7aaab7b720296ed24428b09e4b2bdba7a7a077feb44b628d73aa87e7c +MISC ChangeLog 1375 SHA256 9b01c7f3465aa73524d180e204293826e291bdf81a55adf7f6c6f594bc370f17 SHA512 351c45859220f3db6efbb0421d7f468864abca9d145fa8a8a051edd4ca13c75e4632fed31976d5d4e7d8778472217a8900335173588d011b4148c2c9f0ac32ed WHIRLPOOL 4af52d8dee52ff31329fb6c08979793ae1cb6dc80f82a1574d2bb736a9180a386dfcb0b76d8c110b49329688a9852d7343b7a070def158b520fe3c2fd1c8d1c8 +MISC metadata.xml 736 SHA256 6148ca5a0511663a9ed44af5e0d2fb6c618e7c7d4e315d30471c4359ad573bca SHA512 90debf4cb11c1fa8d661f9b0e8fabc74cf1517cb0e7548ead60d3c918783e22f278921a1426885d0c23df50dcf2c65d21ad5c8ff06e8744f6e2ddf8c38b81efc WHIRLPOOL b1a3996b3abb402d0a8e9b8853db97b8c8b1932aa507c595dca8ebb52ab0912108700c442af94bb98f48649e6665dc1c1df3d6fae87822ab5f283eb33f5ab82c diff --git a/net-libs/onion/files/protos.patch b/net-libs/onion/files/protos.patch new file mode 100644 index 000000000000..59050a95c4e6 --- /dev/null +++ b/net-libs/onion/files/protos.patch @@ -0,0 +1,28 @@ +Prototypes do not match, fixes some build failures. + +Index: onion-0.8/src/onion/poller_libev.c +=================================================================== +--- onion-0.8.orig/src/onion/poller_libev.c ++++ onion-0.8/src/onion/poller_libev.c +@@ -75,7 +75,7 @@ void onion_poller_slot_set_timeout(onion + el->timeout=timeout_ms; + } + /// Sets the polling type: read/write/other. O_POLL_READ | O_POLL_WRITE | O_POLL_OTHER +-void onion_poller_slot_set_type(onion_poller_slot *el, int type){ ++void onion_poller_slot_set_type(onion_poller_slot *el, onion_poller_slot_type_e type){ + el->type=0; + if (type&O_POLL_READ) + el->type|=EV_READ; +Index: onion-0.8/src/onion/poller_libevent.c +=================================================================== +--- onion-0.8.orig/src/onion/poller_libevent.c ++++ onion-0.8/src/onion/poller_libevent.c +@@ -77,7 +77,7 @@ void onion_poller_slot_set_timeout(onion + el->timeout=timeout_ms; + } + /// Sets the polling type: read/write/other. O_POLL_READ | O_POLL_WRITE | O_POLL_OTHER +-void onion_poller_slot_set_type(onion_poller_slot *el, int type){ ++void onion_poller_slot_set_type(onion_poller_slot *el, onion_poller_slot_type_e type){ + el->type=EV_PERSIST; + if (type&O_POLL_READ) + el->type|=EV_READ; diff --git a/net-libs/onion/metadata.xml b/net-libs/onion/metadata.xml new file mode 100644 index 000000000000..c10c1a61f399 --- /dev/null +++ b/net-libs/onion/metadata.xml @@ -0,0 +1,17 @@ +<?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> + <use> + <flag name="libev">Use <pkg>dev-libs/libev</pkg> as thread poller instead of Linux's epoll.</flag> + <flag name="libevent">Use <pkg>dev-libs/libevent</pkg> as thread poller instead of libev or Linux's epoll.</flag> + <flag name="boehm-gc">Add <pkg>dev-libs/boehm-gc</pkg> support for memory allocations.</flag> + <flag name="redis">Add support for redis sessions.</flag> + </use> + <upstream> + <remote-id type="github">davidmoreno/onion</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-libs/onion/onion-0.8.ebuild b/net-libs/onion/onion-0.8.ebuild new file mode 100644 index 000000000000..c1b092d06142 --- /dev/null +++ b/net-libs/onion/onion-0.8.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/davidmoreno/onion" +fi + +inherit ${SCM} cmake-utils + +DESCRIPTION="C library to create simple HTTP servers and Web Applications" +HOMEPAGE="http://www.coralbits.com/libonion/ https://github.com/davidmoreno/onion" + +if [ "${PV#9999}" != "${PV}" ] ; then + KEYWORDS="" + SRC_URI="" +else + KEYWORDS="~amd64" + SRC_URI="https://github.com/davidmoreno/onion/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="|| ( GPL-2+ Apache-2.0 ) AGPL-3" +SLOT="0" +IUSE=" + gnutls pam png jpeg xml systemd sqlite boehm-gc + test examples cxx -libev -libevent + redis +" + +RDEPEND=" + gnutls? ( net-libs/gnutls dev-libs/libgcrypt:0= ) + pam? ( virtual/pam ) + png? ( media-libs/libpng:0= x11-libs/cairo ) + jpeg? ( virtual/jpeg:0 ) + xml? ( dev-libs/libxml2:2 sys-libs/zlib ) + systemd? ( sys-apps/systemd ) + sqlite? ( dev-db/sqlite:3 ) + boehm-gc? ( dev-libs/boehm-gc ) + libev? ( dev-libs/libev ) + !libev? ( libevent? ( dev-libs/libevent ) ) + redis? ( dev-libs/hiredis ) +" +DEPEND="${RDEPEND} + test? ( net-misc/curl ) +" +REQUIRED_USE="test? ( examples )" + +PATCHES=( "${FILESDIR}/protos.patch" ) + +src_configure() { + use test || echo '' > tests/CMakeLists.txt + local mycmakeargs=( + "-DONION_USE_SSL=$(usex gnutls)" + "-DONION_USE_PAM=$(usex pam)" + "-DONION_USE_PNG=$(usex png)" + "-DONION_USE_JPEG=$(usex jpeg)" + "-DONION_USE_XML2=$(usex xml)" + "-DONION_USE_SYSTEMD=$(usex systemd)" + "-DONION_USE_SQLITE3=$(usex sqlite)" + "-DONION_USE_GC=$(usex boehm-gc)" + "-DONION_USE_TESTS=$(usex test)" + "-DONION_EXAMPLES=$(usex examples)" + "-DONION_USE_BINDINGS_CPP=$(usex cxx)" + "-DONION_USE_REDIS=$(usex redis)" + "-DONION_POLLER=$(usex libev libev "$(usex libevent libevent default)")" + ) + cmake-utils_src_configure +} diff --git a/net-libs/onion/onion-9999.ebuild b/net-libs/onion/onion-9999.ebuild new file mode 100644 index 000000000000..e815359b1035 --- /dev/null +++ b/net-libs/onion/onion-9999.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/davidmoreno/onion" +fi + +inherit ${SCM} cmake-utils + +DESCRIPTION="C library to create simple HTTP servers and Web Applications" +HOMEPAGE="http://www.coralbits.com/libonion/ https://github.com/davidmoreno/onion" + +if [ "${PV#9999}" != "${PV}" ] ; then + KEYWORDS="" + SRC_URI="" +else + KEYWORDS="~amd64" + SRC_URI="https://github.com/davidmoreno/onion/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="|| ( GPL-2+ Apache-2.0 ) AGPL-3" +SLOT="0" +IUSE=" + gnutls pam png jpeg xml systemd sqlite boehm-gc + test examples cxx -libev -libevent + redis +" + +RDEPEND=" + gnutls? ( net-libs/gnutls dev-libs/libgcrypt:0= ) + pam? ( virtual/pam ) + png? ( media-libs/libpng:0= x11-libs/cairo ) + jpeg? ( virtual/jpeg:0 ) + xml? ( dev-libs/libxml2:2 sys-libs/zlib ) + systemd? ( sys-apps/systemd ) + sqlite? ( dev-db/sqlite:3 ) + boehm-gc? ( dev-libs/boehm-gc ) + libev? ( dev-libs/libev ) + !libev? ( libevent? ( dev-libs/libevent ) ) + redis? ( dev-libs/hiredis ) +" +DEPEND="${RDEPEND} + test? ( net-misc/curl ) +" +REQUIRED_USE="test? ( examples )" + +src_configure() { + use test || echo '' > tests/CMakeLists.txt + local mycmakeargs=( + "-DONION_USE_SSL=$(usex gnutls)" + "-DONION_USE_PAM=$(usex pam)" + "-DONION_USE_PNG=$(usex png)" + "-DONION_USE_JPEG=$(usex jpeg)" + "-DONION_USE_XML2=$(usex xml)" + "-DONION_USE_SYSTEMD=$(usex systemd)" + "-DONION_USE_SQLITE3=$(usex sqlite)" + "-DONION_USE_GC=$(usex boehm-gc)" + "-DONION_USE_TESTS=$(usex test)" + "-DONION_EXAMPLES=$(usex examples)" + "-DONION_USE_BINDINGS_CPP=$(usex cxx)" + "-DONION_USE_REDIS=$(usex redis)" + "-DONION_POLLER=$(usex libev libev "$(usex libevent libevent default)")" + ) + cmake-utils_src_configure +} |