commit:     c7dd852f6c2d55b4281a9d4738df0bfbb4f183f3
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Fri May 19 22:37:01 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Fri May 19 22:37:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7dd852f

www-servers/kore: new package; add 4.2.3

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 www-servers/kore/Manifest                          |  1 +
 .../kore/files/kore-4.2.3-kodev-makefile.patch     | 22 +++++++
 www-servers/kore/files/kore-4.2.3-makefile.patch   | 34 +++++++++++
 www-servers/kore/kore-4.2.3.ebuild                 | 68 ++++++++++++++++++++++
 www-servers/kore/metadata.xml                      | 27 +++++++++
 5 files changed, 152 insertions(+)

diff --git a/www-servers/kore/Manifest b/www-servers/kore/Manifest
new file mode 100644
index 000000000000..7537863f0f94
--- /dev/null
+++ b/www-servers/kore/Manifest
@@ -0,0 +1 @@
+DIST kore-4.2.3.tar.gz 1085717 BLAKE2B 
1c12c6974ea5997d776efcf490728bf4f90c978d4547bd1c608549d97a544fb0f45e8cd58aab6730999c267a85807d5eb3a04fdcf16817df122992f339c3f05d
 SHA512 
7ed5eb116da190640605d40c757bf49d503d2d866fc7effe9ad658f84f12aec671ec5935677767dd9721b686b61e278b16d8b4360c2fe9ea1eb57068746f52b1

diff --git a/www-servers/kore/files/kore-4.2.3-kodev-makefile.patch 
b/www-servers/kore/files/kore-4.2.3-kodev-makefile.patch
new file mode 100644
index 000000000000..e1e0fe1fd75e
--- /dev/null
+++ b/www-servers/kore/files/kore-4.2.3-kodev-makefile.patch
@@ -0,0 +1,22 @@
+--- a/kodev/Makefile
++++ b/kodev/Makefile
+@@ -9,16 +9,16 @@ INSTALL_DIR=$(PREFIX)/bin
+ 
+ S_SRC=        ../src/cli.c
+ 
+-CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
++CFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes
+ CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual
+ CFLAGS+=-Wsign-compare -Iincludes -std=c99 -pedantic
+ CFLAGS+=-DPREFIX='"$(PREFIX)"'
+-LDFLAGS=-lcrypto
++LDFLAGS+=-lcrypto
+ 
+ ifneq ("$(NOOPT)", "")
+       CFLAGS+=-O0
+ else
+-      CFLAGS+=-O2
++      CFLAGS+=
+ endif
+ 
+ ifneq ("$(MINIMAL)", "")

diff --git a/www-servers/kore/files/kore-4.2.3-makefile.patch 
b/www-servers/kore/files/kore-4.2.3-makefile.patch
new file mode 100644
index 000000000000..e8a94f8aecab
--- /dev/null
+++ b/www-servers/kore/files/kore-4.2.3-makefile.patch
@@ -0,0 +1,34 @@
+--- a/Makefile
++++ b/Makefile
+@@ -31,11 +31,11 @@ S_SRC+= src/tls_$(TLS_BACKEND).c
+ FEATURES=
+ FEATURES_INC=
+ 
+-CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
++CFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes
+ CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual
+ CFLAGS+=-Wsign-compare -Iinclude/kore -I$(OBJDIR) -std=c99 -pedantic
+ CFLAGS+=-Wtype-limits -fno-common
+-CFLAGS+=-DPREFIX='"$(PREFIX)"' -fstack-protector-all
++CFLAGS+=-DPREFIX='"$(PREFIX)"'
+ 
+ LDFLAGS+=-rdynamic
+ 
+@@ -69,7 +69,7 @@ endif
+ ifneq ("$(NOOPT)", "")
+       CFLAGS+=-O0
+ else
+-      CFLAGS+=-O2
++      CFLAGS+=
+ endif
+ 
+ ifneq ("$(NOSENDFILE)", "")
+@@ -155,7 +155,7 @@ ifeq ("$(OSNAME)", "darwin")
+       endif
+       S_SRC+=src/bsd.c
+ else ifeq ("$(OSNAME)", "linux")
+-      CFLAGS+=-D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
++      CFLAGS+=-D_GNU_SOURCE=1
+       LDFLAGS+=-ldl
+       S_SRC+=src/linux.c src/seccomp.c
+ else

diff --git a/www-servers/kore/kore-4.2.3.ebuild 
b/www-servers/kore/kore-4.2.3.ebuild
new file mode 100644
index 000000000000..53ae2d4c25fb
--- /dev/null
+++ b/www-servers/kore/kore-4.2.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Web application platform for writing scalable, concurrent web 
based processes"
+HOMEPAGE="https://kore.io/
+       https://github.com/jorisvink/kore/";
+
+if [[ ${PV} == *9999* ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://git.kore.io/kore.git";
+else
+       SRC_URI="https://kore.io/releases/${P}.tar.gz";
+       KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="ISC"
+SLOT="0"
+IUSE="+acme +curl debug +http +json +openssl postgres +threads"
+REQUIRED_USE="acme? ( curl openssl )"
+
+RDEPEND="
+       curl? ( net-misc/curl:= )
+       json? ( dev-libs/yajl:= )
+       openssl? ( dev-libs/openssl:= )
+       postgres? ( dev-db/postgresql:= )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.2.3-makefile.patch
+       "${FILESDIR}"/${PN}-4.2.3-kodev-makefile.patch
+)
+
+DOCS=( README.md )
+
+src_prepare() {
+       default
+
+       sed -i 's|-Werror||g' kodev/Makefile tools/kore-serve/conf/build.conf 
|| die
+}
+
+src_compile() {
+       tc-export CC
+
+       # See https://github.com/jorisvink/kore#building-kore
+       env ACME=$(usex acme 1 '')                      \
+               CURL=$(usex curl 1 '')                      \
+               DEBUG=$(usex debug 1 '')                    \
+               JSONRPC=$(usex json 1 '')                   \
+               NOHTTP=$(usex http '' 1)                    \
+               PGSQL=$(usex postgres 1 '')                 \
+               TASKS=$(usex threads 1 '')                  \
+               TLS_BACKEND=$(usex openssl openssl none)    \
+               CFLAGS="${CFLAGS} ${LDFLAGS}"               \
+               LDFLAGS="${LDFLAGS}"                        \
+               PREFIX=/usr                                 \
+               emake
+}
+
+src_install() {
+       emake DESTDIR="${D}" PREFIX=/usr install
+
+       einstalldocs
+}

diff --git a/www-servers/kore/metadata.xml b/www-servers/kore/metadata.xml
new file mode 100644
index 000000000000..17985b84f511
--- /dev/null
+++ b/www-servers/kore/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Maciej Barć</name>
+  </maintainer>
+  <longdescription>
+    Kore is a web application platform for writing scalable, concurrent web
+    based processes. It is built with a "secure by default" approach. It is
+    fully privilege separated while using strong security features at the
+    operating system level such as seccomp, pledge, unveil and more. Today Kore
+    is used in a variety of applications ranging from high assurance
+    cryptographic devices, machine-learning stacks and even in the aerospace
+    industry.
+  </longdescription>
+  <use>
+    <flag name="acme">Add support for ACME</flag>
+    <flag name="http">Add support for HTTP</flag>
+    <flag name="json">Add support for JSONRPC</flag>
+    <flag name="openssl">Use the openssl TLS backend</flag>
+  </use>
+  <upstream>
+    <remote-id type="github">jorisvink/kore</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to