Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Sep 2016 17:40:01 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r421450 - in head/devel: . kore kore/files
Message-ID:  <201609061740.u86He1Cm045415@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Tue Sep  6 17:40:00 2016
New Revision: 421450
URL: https://svnweb.freebsd.org/changeset/ports/421450

Log:
  New port: devel/kore
  
  Kore is an easy to use web application framework for writing scalable
  web APIs in C.  Its main goals are security, scalability and allowing
  rapid development and deployment of such APIs.
  
  Because of this Kore is an ideal candidate for building robust,
  scalable and secure web things.
  
  WWW: http://www.kore.io/
  
  PR:		211603
  Submitted by:	Tobias Kortkamp <t@tobik.me>

Added:
  head/devel/kore/
  head/devel/kore/Makefile   (contents, props changed)
  head/devel/kore/distinfo   (contents, props changed)
  head/devel/kore/files/
  head/devel/kore/files/patch-src_bsd.c   (contents, props changed)
  head/devel/kore/files/patch-src_cli.c   (contents, props changed)
  head/devel/kore/files/patch-src_pgsql.c   (contents, props changed)
  head/devel/kore/pkg-descr   (contents, props changed)
  head/devel/kore/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Tue Sep  6 17:26:54 2016	(r421449)
+++ head/devel/Makefile	Tue Sep  6 17:40:00 2016	(r421450)
@@ -1134,6 +1134,7 @@
     SUBDIR += kdevplatform
     SUBDIR += kickassembler
     SUBDIR += kimwitu
+    SUBDIR += kore
     SUBDIR += kyra
     SUBDIR += kyua
     SUBDIR += lasi

Added: head/devel/kore/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kore/Makefile	Tue Sep  6 17:40:00 2016	(r421450)
@@ -0,0 +1,69 @@
+# Created by: Tobias Kortkamp <t@tobik.me>
+# $FreeBSD$
+
+PORTNAME=	kore
+PORTVERSION=	2.0.0
+DISTVERSIONSUFFIX=	-release
+CATEGORIES=	devel www
+
+MAINTAINER=	t@tobik.me
+COMMENT=	Web application framework for writing web APIs in C
+
+LICENSE=	ISCL
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=	gmake
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	jorisvink
+
+MAKE_ARGS=	INSTALL_DIR="${STAGEDIR}${PREFIX}/bin" \
+		INCLUDE_DIR="${STAGEDIR}${PREFIX}/include/kore"
+
+OPTIONS_DEFINE=	DEBUG HTTP JSONRPC PGSQL TASKS TLS
+OPTIONS_DEFAULT=	HTTP JSONRPC PGSQL TASKS TLS
+
+HTTP_DESC=	Build with HTTP support
+JSONRPC_DESC=	Build with JSON-RPC support
+TASKS_DESC=	Build with tasks support
+
+TASKS_VARS=	MAKE_ARGS+=TASKS=1
+
+PGSQL_IMPLIES=	HTTP
+PGSQL_VARS=	MAKE_ARGS+=PGSQL=1
+PGSQL_USES=	pgsql
+
+TLS_VARS_OFF=	MAKE_ARGS+=NOTLS=1
+TLS_USES=	ssl
+
+HTTP_VARS_OFF=	MAKE_ARGS+=NOHTTP=1
+# If TLS=off and HTTP=on kore will still link with libcrypto, so add
+# an OpenSSL dependency here.
+HTTP_USES=	ssl
+
+JSONRPC_IMPLIES=	HTTP
+JSONRPC_VARS=	MAKE_ARGS+=JSONRPC=1
+JSONRPC_LIB_DEPENDS=	libyajl.so:devel/yajl
+
+DEBUG_VARS=	MAKE_ARGS+=DEBUG=1
+
+.include <bsd.port.pre.mk>
+
+.if ${SSL_DEFAULT} == base
+BROKEN_FreeBSD_9=	Base OpenSSL on FreeBSD 9.x is too old
+.endif
+
+post-patch:
+# Disable kore's own optimizations flags
+	@${REINPLACE_CMD} 's|CFLAGS+=-O|#|g' ${WRKSRC}/Makefile
+# Make sure the correct flags are set when LOCALBASE is not /usr/local
+	@${REINPLACE_CMD} 's|/usr/local/|${LOCALBASE}/|g' ${WRKSRC}/Makefile
+
+pre-install:
+	${STRIP_CMD} ${WRKSRC}/kore
+
+post-install:
+	cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
+	cd ${WRKSRC}/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.post.mk>

Added: head/devel/kore/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kore/distinfo	Tue Sep  6 17:40:00 2016	(r421450)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1470351284
+SHA256 (jorisvink-kore-2.0.0-release_GH0.tar.gz) = e9573a3bd986bc7d91ce3fb8898cb542523d6ed274761281cea72a81963549c1
+SIZE (jorisvink-kore-2.0.0-release_GH0.tar.gz) = 947440

Added: head/devel/kore/files/patch-src_bsd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kore/files/patch-src_bsd.c	Tue Sep  6 17:40:00 2016	(r421450)
@@ -0,0 +1,27 @@
+Needed for building on FreeBSD 9.x.  Once FreeBSD 9 support ends this
+patch can be removed.
+
+cc1: warnings being treated as errors
+src/bsd.c: In function 'kore_platform_worker_setcpu':
+src/bsd.c:65: warning: declaration of 'cpuset' shadows a global declaration
+/usr/include/sys/cpuset.h:131: warning: shadowed declaration is here
+
+--- src/bsd.c.orig	2016-08-01 07:59:32 UTC
++++ src/bsd.c
+@@ -62,12 +62,12 @@ void
+ kore_platform_worker_setcpu(struct kore_worker *kw)
+ {
+ #if defined(__FreeBSD_version)
+-	cpuset_t	cpuset;
++	cpuset_t	cpuset1;
+ 
+-	CPU_ZERO(&cpuset);
+-	CPU_SET(kw->cpu, &cpuset);
++	CPU_ZERO(&cpuset1);
++	CPU_SET(kw->cpu, &cpuset1);
+ 	if (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID,
+-	    -1, sizeof(cpuset), &cpuset) == -1) {
++	    -1, sizeof(cpuset1), &cpuset1) == -1) {
+ 		fatal("failed: %s", errno_s);
+ 	}
+ 

Added: head/devel/kore/files/patch-src_cli.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kore/files/patch-src_cli.c	Tue Sep  6 17:40:00 2016	(r421450)
@@ -0,0 +1,15 @@
+--- src/cli.c.orig	2016-08-01 07:59:32 UTC
++++ src/cli.c
+@@ -267,9 +267,9 @@ static int			s_fd = -1;
+ static char			*appl = NULL;
+ static int			run_after = 0;
+ static char			*rootdir = NULL;
+-static char			*compiler_c = "gcc";
+-static char			*compiler_cpp = "g++";
+-static char			*compiler_ld = "gcc";
++static char			*compiler_c = "cc";
++static char			*compiler_cpp = "c++";
++static char			*compiler_ld = "cc";
+ static struct cfile_list	source_files;
+ static struct buildopt_list	build_options;
+ static int			source_files_count;

Added: head/devel/kore/files/patch-src_pgsql.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kore/files/patch-src_pgsql.c	Tue Sep  6 17:40:00 2016	(r421450)
@@ -0,0 +1,36 @@
+Backport of https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf
+so compiling on FreeBSD 10.x/i386 succeeds.  Without it the build will fail with:
+
+src/pgsql.c:222:6: error: variable 'args' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
+        if (count > 0)
+            ^~~~~~~~~
+src/pgsql.c:225:63: note: uninitialized use occurs here
+        ret = kore_pgsql_v_query_params(pgsql, query, result, count, args);
+                                                                     ^~~~
+src/pgsql.c:222:2: note: remove the 'if' if its condition is always true
+        if (count > 0)
+        ^~~~~~~~~~~~~~
+src/pgsql.c:220:15: note: initialize the variable 'args' to silence this warning
+        va_list         args;
+                            ^
+                             = NULL
+1 error generated.
+
+--- src/pgsql.c.orig	2016-08-01 07:59:32 UTC
++++ src/pgsql.c
+@@ -219,13 +219,11 @@ kore_pgsql_query_params(struct kore_pgsq
+ 	int		ret;
+ 	va_list		args;
+ 
+-	if (count > 0)
+-		va_start(args, count);
++	va_start(args, count);
+ 
+ 	ret = kore_pgsql_v_query_params(pgsql, query, result, count, args);
+ 
+-	if (count > 0)
+-		va_end(args);
++	va_end(args);
+ 
+ 	return (ret);
+ }

Added: head/devel/kore/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kore/pkg-descr	Tue Sep  6 17:40:00 2016	(r421450)
@@ -0,0 +1,8 @@
+Kore is an easy to use web application framework for writing scalable
+web APIs in C.  Its main goals are security, scalability and allowing
+rapid development and deployment of such APIs.
+
+Because of this Kore is an ideal candidate for building robust,
+scalable and secure web things.
+
+WWW: http://www.kore.io/

Added: head/devel/kore/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kore/pkg-plist	Tue Sep  6 17:40:00 2016	(r421450)
@@ -0,0 +1,117 @@
+bin/kore
+include/kore/http.h
+include/kore/jsonrpc.h
+include/kore/kore.h
+include/kore/pgsql.h
+include/kore/tasks.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/conf/cpp.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/dh2048.pem
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/src/cpp.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/src/example_class.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cpp/src/example_class.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/assets/index.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/assets/intro.jpg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/assets/params.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/assets/private.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/assets/private_test.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/assets/style.css
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/assets/upload.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/conf/generic.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/generic/src/example.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/headers/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/headers/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/headers/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/headers/conf/headers.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/headers/src/headers.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/integers/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/integers/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/integers/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/integers/conf/integers.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/integers/src/check_integers.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/json_yajl/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/json_yajl/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/json_yajl/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/json_yajl/conf/json_yajl.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/json_yajl/src/json_yajl.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/jsonrpc/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/jsonrpc/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/jsonrpc/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/jsonrpc/conf/jsonrpc.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/jsonrpc/src/home.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/jsonrpc/src/v1.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/jsonrpc/test/integ/jsonrpc.bats
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/kore.conf.example
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ktunnel/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ktunnel/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ktunnel/client/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ktunnel/client/client.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ktunnel/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ktunnel/conf/ktunnel.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ktunnel/src/ktunnel.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/messaging/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/messaging/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/messaging/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/messaging/conf/messaging.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/messaging/src/messaging.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nohttp/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nohttp/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nohttp/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nohttp/conf/nohttp.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nohttp/src/nohttp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parameters/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parameters/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parameters/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parameters/conf/parameters.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parameters/src/parameters.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql-sync/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql-sync/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql-sync/conf/pgsql-sync.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql-sync/src/pgsql-sync.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/conf/pgsql.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/src/pgsql.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pipe_task/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pipe_task/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pipe_task/assets/frontend.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pipe_task/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pipe_task/conf/pipe_task.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pipe_task/src/pipe_task.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sse/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sse/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sse/assets/index.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sse/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sse/conf/sse.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sse/src/sse.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tasks/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tasks/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tasks/conf/tasks.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tasks/src/tasks.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tls-proxy/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tls-proxy/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tls-proxy/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tls-proxy/conf/tls-proxy.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tls-proxy/src/proxy.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/upload/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/upload/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/upload/conf/upload.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/upload/src/upload.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/video_stream/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/video_stream/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/video_stream/assets/video.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/video_stream/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/video_stream/conf/video_stream.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/video_stream/src/stream.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/video_stream/videos/placeholder
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/websocket/.gitignore
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/websocket/README.md
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/websocket/assets/frontend.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/websocket/conf/build.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/websocket/conf/websocket.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/websocket/src/websocket.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609061740.u86He1Cm045415>