aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2020-06-22 20:45:56 -0400
committerAisha Tammy <gentoo@aisha.cc>2020-06-22 20:53:48 -0400
commit4ccf174d1cd8cf5fd27f7b066d775c5735575da0 (patch)
treeff0055bcbe44ecc7d62ed8eea0de22822318bbd6 /net-libs
parentnet-misc/kristall: Remove src_prepare(). (diff)
downloadguru-4ccf174d1cd8cf5fd27f7b066d775c5735575da0.tar.gz
guru-4ccf174d1cd8cf5fd27f7b066d775c5735575da0.tar.bz2
guru-4ccf174d1cd8cf5fd27f7b066d775c5735575da0.zip
net-misc/purritobin: fix categories for usockets/uwebsockets
net-libs/usockets: move to net-libs per OpenBSD/FreeBSD www-apps/uwebsockets: move to www-apps per Open/FreeBSD Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/usockets/Manifest1
-rw-r--r--net-libs/usockets/files/usockets-Makefile.patch64
-rw-r--r--net-libs/usockets/metadata.xml11
-rw-r--r--net-libs/usockets/usockets-0.4.0.ebuild56
-rw-r--r--net-libs/usockets/usockets-9999.ebuild56
5 files changed, 188 insertions, 0 deletions
diff --git a/net-libs/usockets/Manifest b/net-libs/usockets/Manifest
new file mode 100644
index 000000000..773a4abf4
--- /dev/null
+++ b/net-libs/usockets/Manifest
@@ -0,0 +1 @@
+DIST usockets-0.4.0.tar.gz 48367 BLAKE2B 025b83bd1f9778c469ad29bde0f8cab7fbc5f9b86e5cd97261b9aee77c2d26a67d22a185a17011e9c067acb23e0341c4112a00dbf270510013e1e863b5678ff1 SHA512 c480c6fd4a87ebe7d9db1928185075d52da63482f4ecc37f684fe10654e92de540badf47d2ab8e6021266a87308496189b39e95830d11924da0023a222decf2d
diff --git a/net-libs/usockets/files/usockets-Makefile.patch b/net-libs/usockets/files/usockets-Makefile.patch
new file mode 100644
index 000000000..a51f8b16b
--- /dev/null
+++ b/net-libs/usockets/files/usockets-Makefile.patch
@@ -0,0 +1,64 @@
+diff --git a/Makefile b/Makefile
+index fa6e2ff..529ed74 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,14 @@
++DESTDIR ?=
++
++prefix ?= "/usr/local"
++exec_prefix ?= "$(prefix)"
++libdir ?= "$(exec_prefix)/lib"
++includedir?= "$(exec_prefix)/include/uSockets"
++
++# OpenBSD specific library version
++LIBTARGET = libusockets.so.$(LIBusockets_VERSION)
++
++
+ # WITH_OPENSSL=1 enables OpenSSL 1.1+ support
+ ifeq ($(WITH_OPENSSL),1)
+ override CFLAGS += -DLIBUS_USE_OPENSSL
+@@ -33,13 +44,33 @@ ifeq ($(WITH_ASAN),1)
+ endif
+
+ override CFLAGS += -std=c11 -Isrc
+-override LDFLAGS += uSockets.a
+
+-# By default we build the uSockets.a static library
+-default:
++static:
+ rm -f *.o
+- $(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
+- $(AR) rvs uSockets.a *.o
++ $(CC) $(CFLAGS) -c src/*.c src/eventing/*.c src/crypto/*.c
++ $(AR) rvs libusockets.a *.o
++
++dynamic:
++ rm -f *.o
++ $(CC) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c $(CFLAGS)
++ $(CC) -shared -fPIC -Wl,-soname,$(LIBTARGET) $(CFLAGS) -o $(LIBTARGET) *.o $(LDFLAGS)
++
++default: static dynamic
++
++install:
++ # install the folders needed (making sure that the exist)
++ install -d "$(DESTDIR)$(libdir)" \
++ "$(DESTDIR)$(includedir)/internal/eventing" \
++ "$(DESTDIR)$(includedir)/internal/networking"
++ # OpenBSD specific library version
++ install -m 755 $(LIBTARGET) "$(DESTDIR)$(libdir)/"
++ # install static library
++ install -m 755 libusockets.a "$(DESTDIR)$(libdir)/"
++ # we also install all the header files
++ install src/*.h "$(DESTDIR)$(includedir)/"
++ install -m 644 src/internal/*.h "$(DESTDIR)$(includedir)/internal/"
++ install -m 644 src/internal/eventing/*.h "$(DESTDIR)$(includedir)/internal/eventing/"
++ install -m 644 src/internal/networking/*.h "$(DESTDIR)$(includedir)/internal/networking/"
+
+ # Builds all examples
+ .PHONY: examples
+@@ -52,4 +83,5 @@ swift_examples:
+ clean:
+ rm -f *.o
+ rm -f *.a
++ rm -f *.so
+ rm -rf .certs
diff --git a/net-libs/usockets/metadata.xml b/net-libs/usockets/metadata.xml
new file mode 100644
index 000000000..73dd5769c
--- /dev/null
+++ b/net-libs/usockets/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gentoo@aisha.cc</email>
+ <name>Aisha Tammy</name>
+ </maintainer>
+ <use>
+ <flag name="libuv">Enable bindings to use the libuv dispatcher</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-libs/usockets/usockets-0.4.0.ebuild b/net-libs/usockets/usockets-0.4.0.ebuild
new file mode 100644
index 000000000..0b4a1f0a5
--- /dev/null
+++ b/net-libs/usockets/usockets-0.4.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+DESCRIPTION="tiny eventing, networking & crypto for async applications"
+HOMEPAGE="https://github.com/uNetworking/uSockets"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/uNetworking/uSockets.git"
+else
+ SRC_URI="https://github.com/uNetworking/uSockets/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ S="${WORKDIR}/uSockets-${PV}"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="libuv +ssl libressl static-libs"
+
+DEPEND="ssl? (
+ libressl? ( >=dev-libs/libressl-3.0.0:=[static-libs?] )
+ !libressl? ( >=dev-libs/openssl-1.1.0:=[static-libs?] )
+ )
+ libuv? ( dev-libs/libuv[static-libs?] )
+"
+BDEPEND="${DEPEND}"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/usockets-Makefile.patch"
+)
+
+src_compile() {
+ # the Makefile uses environment variables
+ emake -j1 \
+ LIBusockets_VERSION=${PV} \
+ WITH_OPENSSL=$(usex ssl 1 0) \
+ WITH_LIBUV=$(usex libuv 1 0) \
+ default
+}
+
+src_install() {
+ emake -j1 \
+ libdir="/usr/$(get_libdir)" \
+ prefix="/usr" DESTDIR="${D}" \
+ LIBusockets_VERSION=${PV} \
+ install
+ einstalldocs
+ if ! use static-libs; then
+ rm "${D}/usr/$(get_libdir)/libusockets.a" || die
+ fi
+}
diff --git a/net-libs/usockets/usockets-9999.ebuild b/net-libs/usockets/usockets-9999.ebuild
new file mode 100644
index 000000000..0b4a1f0a5
--- /dev/null
+++ b/net-libs/usockets/usockets-9999.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+DESCRIPTION="tiny eventing, networking & crypto for async applications"
+HOMEPAGE="https://github.com/uNetworking/uSockets"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/uNetworking/uSockets.git"
+else
+ SRC_URI="https://github.com/uNetworking/uSockets/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ S="${WORKDIR}/uSockets-${PV}"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="libuv +ssl libressl static-libs"
+
+DEPEND="ssl? (
+ libressl? ( >=dev-libs/libressl-3.0.0:=[static-libs?] )
+ !libressl? ( >=dev-libs/openssl-1.1.0:=[static-libs?] )
+ )
+ libuv? ( dev-libs/libuv[static-libs?] )
+"
+BDEPEND="${DEPEND}"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/usockets-Makefile.patch"
+)
+
+src_compile() {
+ # the Makefile uses environment variables
+ emake -j1 \
+ LIBusockets_VERSION=${PV} \
+ WITH_OPENSSL=$(usex ssl 1 0) \
+ WITH_LIBUV=$(usex libuv 1 0) \
+ default
+}
+
+src_install() {
+ emake -j1 \
+ libdir="/usr/$(get_libdir)" \
+ prefix="/usr" DESTDIR="${D}" \
+ LIBusockets_VERSION=${PV} \
+ install
+ einstalldocs
+ if ! use static-libs; then
+ rm "${D}/usr/$(get_libdir)/libusockets.a" || die
+ fi
+}