FreeBSD Bugzilla – Attachment 177182 Details for
Bug 214638
devel/kore: fails to build on 12.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
kore.diff
kore.diff (text/plain), 4.20 KB, created by
Tobias Kortkamp
on 2016-11-19 12:21:35 UTC
(
hide
)
Description:
kore.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2016-11-19 12:21:35 UTC
Size:
4.20 KB
patch
obsolete
>diff --git a/devel/kore/Makefile b/devel/kore/Makefile >index 34fbfe8..393151b 100644 >--- a/devel/kore/Makefile >+++ b/devel/kore/Makefile >@@ -4,6 +4,7 @@ > PORTNAME= kore > PORTVERSION= 2.0.0 > DISTVERSIONSUFFIX= -release >+PORTREVISION= 1 > CATEGORIES= devel www > > MAINTAINER= t@tobik.me >@@ -47,17 +48,16 @@ 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 >+BROKEN_FreeBSD_9= does not build > > 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 >+# Disable kore's own optimizations flags, make sure the correct flags >+# are set when LOCALBASE is not /usr/local, and allow __generic on >+# FreeBSD 12.0-CURRENT after r308264 >+ @${REINPLACE_CMD} -e 's|CFLAGS+=-O|#|g' \ >+ -e 's|/usr/local/|${LOCALBASE}/|g' \ >+ -e 's|-pedantic|-pedantic -Wno-error=c11-extensions|g' \ >+ ${WRKSRC}/Makefile > > pre-install: > ${STRIP_CMD} ${WRKSRC}/kore >@@ -66,4 +66,4 @@ post-install: > cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} > cd ${WRKSRC}/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} > >-.include <bsd.port.post.mk> >+.include <bsd.port.mk> >diff --git a/devel/kore/files/patch-includes_pgsql.h b/devel/kore/files/patch-includes_pgsql.h >new file mode 100644 >index 0000000..9c48f69 >--- /dev/null >+++ b/devel/kore/files/patch-includes_pgsql.h >@@ -0,0 +1,14 @@ >+--- includes/pgsql.h.orig 2016-08-01 07:59:32 UTC >++++ includes/pgsql.h >+@@ -66,9 +66,9 @@ void kore_pgsql_cleanup(struct kore_pgsq >+ void kore_pgsql_continue(struct http_request *, struct kore_pgsql *); >+ int kore_pgsql_query(struct kore_pgsql *, const char *); >+ int kore_pgsql_query_params(struct kore_pgsql *, >+- const char *, int, u_int8_t, ...); >++ const char *, int, int, ...); >+ int kore_pgsql_v_query_params(struct kore_pgsql *, >+- const char *, int, u_int8_t, va_list); >++ const char *, int, int, va_list); >+ int kore_pgsql_register(const char *, const char *); >+ int kore_pgsql_ntuples(struct kore_pgsql *); >+ void kore_pgsql_logerror(struct kore_pgsql *); >diff --git a/devel/kore/files/patch-src_pgsql.c b/devel/kore/files/patch-src_pgsql.c >index 646911d..5fa1606 100644 >--- a/devel/kore/files/patch-src_pgsql.c >+++ b/devel/kore/files/patch-src_pgsql.c >@@ -1,4 +1,6 @@ >-Backport of https://github.com/jorisvink/kore/commit/c071d64bdddacbe1b69d238e14994d666a86f7cf >+Backports 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] >@@ -16,9 +18,34 @@ src/pgsql.c:220:15: note: initialize the variable 'args' to silence this warning > = NULL > 1 error generated. > >+and https://github.com/jorisvink/kore/commit/7eced6f035c83c02680d9b58371851f8662a0e8a >+so that compiling with Clang 3.9 succeeds. Without it the build will fail with: >+ >+src/pgsql.c:222:17: error: passing an object that undergoes default argument promotion to 'va_start' >+ has undefined behavior [-Werror,-Wvarargs] >+ va_start(args, count); >+ ^ >+src/pgsql.c:217:45: note: parameter of type 'u_int8_t' (aka 'unsigned char') is declared here >+ const char *query, int result, u_int8_t count, ...) >+ > --- 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 >+@@ -151,7 +151,7 @@ kore_pgsql_query(struct kore_pgsql *pgsq >+ >+ int >+ kore_pgsql_v_query_params(struct kore_pgsql *pgsql, >+- const char *query, int result, u_int8_t count, va_list args) >++ const char *query, int result, int count, va_list args) >+ { >+ u_int8_t i; >+ char **values; >+@@ -214,18 +214,16 @@ cleanup: >+ >+ int >+ kore_pgsql_query_params(struct kore_pgsql *pgsql, >+- const char *query, int result, u_int8_t count, ...) >++ const char *query, int result, int count, ...) >+ { > int ret; > va_list args; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
tobik
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 214638
: 177182