View | Details | Raw Unified | Return to bug 214638
Collapse All | Expand All

(-)b/devel/kore/Makefile (-10 / +10 lines)
Lines 4-9 Link Here
4
PORTNAME=	kore
4
PORTNAME=	kore
5
PORTVERSION=	2.0.0
5
PORTVERSION=	2.0.0
6
DISTVERSIONSUFFIX=	-release
6
DISTVERSIONSUFFIX=	-release
7
PORTREVISION=	1
7
CATEGORIES=	devel www
8
CATEGORIES=	devel www
8
9
9
MAINTAINER=	t@tobik.me
10
MAINTAINER=	t@tobik.me
Lines 47-63 JSONRPC_LIB_DEPENDS= libyajl.so:devel/yajl Link Here
47
48
48
DEBUG_VARS=	MAKE_ARGS+=DEBUG=1
49
DEBUG_VARS=	MAKE_ARGS+=DEBUG=1
49
50
50
.include <bsd.port.pre.mk>
51
BROKEN_FreeBSD_9=	does not build
51
52
.if ${SSL_DEFAULT} == base
53
BROKEN_FreeBSD_9=	Base OpenSSL on FreeBSD 9.x is too old
54
.endif
55
52
56
post-patch:
53
post-patch:
57
# Disable kore's own optimizations flags
54
# Disable kore's own optimizations flags, make sure the correct flags
58
	@${REINPLACE_CMD} 's|CFLAGS+=-O|#|g' ${WRKSRC}/Makefile
55
# are set when LOCALBASE is not /usr/local, and allow __generic on
59
# Make sure the correct flags are set when LOCALBASE is not /usr/local
56
# FreeBSD 12.0-CURRENT after r308264
60
	@${REINPLACE_CMD} 's|/usr/local/|${LOCALBASE}/|g' ${WRKSRC}/Makefile
57
	@${REINPLACE_CMD} -e 's|CFLAGS+=-O|#|g' \
58
		-e 's|/usr/local/|${LOCALBASE}/|g' \
59
		-e 's|-pedantic|-pedantic -Wno-error=c11-extensions|g' \
60
		${WRKSRC}/Makefile
61
61
62
pre-install:
62
pre-install:
63
	${STRIP_CMD} ${WRKSRC}/kore
63
	${STRIP_CMD} ${WRKSRC}/kore
Lines 66-69 post-install: Link Here
66
	cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
66
	cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
67
	cd ${WRKSRC}/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
67
	cd ${WRKSRC}/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
68
68
69
.include <bsd.port.post.mk>
69
.include <bsd.port.mk>
(-)b/devel/kore/files/patch-includes_pgsql.h (+14 lines)
Added Link Here
1
--- includes/pgsql.h.orig	2016-08-01 07:59:32 UTC
2
+++ includes/pgsql.h
3
@@ -66,9 +66,9 @@ void	kore_pgsql_cleanup(struct kore_pgsq
4
 void	kore_pgsql_continue(struct http_request *, struct kore_pgsql *);
5
 int	kore_pgsql_query(struct kore_pgsql *, const char *);
6
 int	kore_pgsql_query_params(struct kore_pgsql *,
7
-	    const char *, int, u_int8_t, ...);
8
+	    const char *, int, int, ...);
9
 int	kore_pgsql_v_query_params(struct kore_pgsql *,
10
-	    const char *, int, u_int8_t, va_list);
11
+	    const char *, int, int, va_list);
12
 int	kore_pgsql_register(const char *, const char *);
13
 int	kore_pgsql_ntuples(struct kore_pgsql *);
14
 void	kore_pgsql_logerror(struct kore_pgsql *);
(-)b/devel/kore/files/patch-src_pgsql.c (-2 / +29 lines)
Lines 1-4 Link Here
1
Backport of https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf
1
Backports of
2
3
https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf
2
so compiling on FreeBSD 10.x/i386 succeeds.  Without it the build will fail with:
4
so compiling on FreeBSD 10.x/i386 succeeds.  Without it the build will fail with:
3
5
4
src/pgsql.c:222:6: error: variable 'args' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
6
src/pgsql.c:222:6: error: variable 'args' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
Lines 16-24 src/pgsql.c:220:15: note: initialize the variable 'args' to silence this warning Link Here
16
                             = NULL
18
                             = NULL
17
1 error generated.
19
1 error generated.
18
20
21
and https://github.com/jorisvink/kore/commit/7eced6f035c83c02680d9b58371851f8662a0e8a
22
so that compiling with Clang 3.9 succeeds.  Without it the build will fail with:
23
24
src/pgsql.c:222:17: error: passing an object that undergoes default argument promotion to 'va_start'
25
      has undefined behavior [-Werror,-Wvarargs]
26
        va_start(args, count);
27
                       ^
28
src/pgsql.c:217:45: note: parameter of type 'u_int8_t' (aka 'unsigned char') is declared here
29
    const char *query, int result, u_int8_t count, ...)
30
 
19
--- src/pgsql.c.orig	2016-08-01 07:59:32 UTC
31
--- src/pgsql.c.orig	2016-08-01 07:59:32 UTC
20
+++ src/pgsql.c
32
+++ src/pgsql.c
21
@@ -219,13 +219,11 @@ kore_pgsql_query_params(struct kore_pgsq
33
@@ -151,7 +151,7 @@ kore_pgsql_query(struct kore_pgsql *pgsq
34
 
35
 int
36
 kore_pgsql_v_query_params(struct kore_pgsql *pgsql,
37
-    const char *query, int result, u_int8_t count, va_list args)
38
+    const char *query, int result, int count, va_list args)
39
 {
40
 	u_int8_t	i;
41
 	char		**values;
42
@@ -214,18 +214,16 @@ cleanup:
43
 
44
 int
45
 kore_pgsql_query_params(struct kore_pgsql *pgsql,
46
-    const char *query, int result, u_int8_t count, ...)
47
+    const char *query, int result, int count, ...)
48
 {
22
 	int		ret;
49
 	int		ret;
23
 	va_list		args;
50
 	va_list		args;
24
 
51
 

Return to bug 214638