From 7186583975ae6722ce2cde5436a204ef661633f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 30 May 2020 20:50:04 +0200 Subject: [PATCH] cbang: update to 1.5.0 --- ...ibevent-use-TryCompile-if-applicable.patch | 73 --------------- ...o-check-for-signature-of-gethostbyna.patch | 90 ------------------- srcpkgs/cbang/patches/sched_yield.patch | 11 --- srcpkgs/cbang/patches/va_copy.patch | 11 --- srcpkgs/cbang/template | 4 +- 5 files changed, 2 insertions(+), 187 deletions(-) delete mode 100644 srcpkgs/cbang/patches/0004-libevent-use-TryCompile-if-applicable.patch delete mode 100644 srcpkgs/cbang/patches/0005-libevent-use-C-to-check-for-signature-of-gethostbyna.patch delete mode 100644 srcpkgs/cbang/patches/sched_yield.patch delete mode 100644 srcpkgs/cbang/patches/va_copy.patch diff --git a/srcpkgs/cbang/patches/0004-libevent-use-TryCompile-if-applicable.patch b/srcpkgs/cbang/patches/0004-libevent-use-TryCompile-if-applicable.patch deleted file mode 100644 index 06b73e8b7e6..00000000000 --- a/srcpkgs/cbang/patches/0004-libevent-use-TryCompile-if-applicable.patch +++ /dev/null @@ -1,73 +0,0 @@ -From b31932609b9019f7f72efdc3d67ea16971a34c76 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= - -Date: Sun, 17 May 2020 22:47:26 +0700 -Subject: [PATCH 4/5] libevent: use TryCompile if applicable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Đoàn Trần Công Danh ---- - src/libevent/SConscript | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -diff --git src/libevent/SConscript src/libevent/SConscript -index 2e8373f9..f9dceaa5 100644 ---- src/libevent/SConscript -+++ src/libevent/SConscript -@@ -117,9 +117,9 @@ def CheckDecl(ctx, decl, includes = None): - src = '#include <%s>\n%s' % (inc, src) - - ctx.Message('Checking for decl ' + decl + '... ') -- ret = ctx.TryRun(src + '\n', '.c') -- ctx.Result(ret[0]) -- return ret[0] -+ ret = ctx.TryCompile(src + '\n', '.c') -+ ctx.Result(ret) -+ return ret - - conf.AddTest('CheckDecl', CheckDecl) - -@@ -133,9 +133,9 @@ def CheckStruct(ctx, struct, includes = None): - src = '#include <%s>\n%s' % (inc, src) - - ctx.Message('Checking for struct ' + struct + '... ') -- ret = ctx.TryRun(src + '\n', '.c') -- ctx.Result(ret[0]) -- return ret[0] -+ ret = ctx.TryCompile(src + '\n', '.c') -+ ctx.Result(ret) -+ return ret - - conf.AddTest('CheckStruct', CheckStruct) - -@@ -153,9 +153,9 @@ def CheckType(ctx, type, includes = None, defs = None): - src = '#define %s\n%s' % (d, src) - - ctx.Message('Checking for type ' + type + '... ') -- ret = ctx.TryRun(src + '\n', '.c') -- ctx.Result(ret[0]) -- return ret[0] -+ ret = ctx.TryCompile(src + '\n', '.c') -+ ctx.Result(ret) -+ return ret - - conf.AddTest('CheckType', CheckType) - -@@ -177,9 +177,9 @@ def CheckStructMember(ctx, struct, member, includes = None): - src = '#include <%s>\n%s' % (inc, src) - - ctx.Message('Checking for %s in struct %s... ' % (member, struct)) -- ret = ctx.TryRun(src + '\n', '.c') -- ctx.Result(ret[0]) -- return ret[0] -+ ret = ctx.TryCompile(src + '\n', '.c') -+ ctx.Result(ret) -+ return ret - - conf.AddTest('CheckStructMember', CheckStructMember) - --- -2.26.2.672.g232c24e857 - diff --git a/srcpkgs/cbang/patches/0005-libevent-use-C-to-check-for-signature-of-gethostbyna.patch b/srcpkgs/cbang/patches/0005-libevent-use-C-to-check-for-signature-of-gethostbyna.patch deleted file mode 100644 index f0181b641d7..00000000000 --- a/srcpkgs/cbang/patches/0005-libevent-use-C-to-check-for-signature-of-gethostbyna.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 9239db8606320967e9e8526f68acd3e641c60ebb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= - -Date: Sun, 17 May 2020 22:56:41 +0700 -Subject: [PATCH 5/5] libevent: use C++ to check for signature of - gethostbyname_r -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -C++ by definition requires matching prototype (both number of arguments, -order of arguments, and type of arguments) to be compilable. - -Use this property to check for signature of gethostbyname_r(3) at -compile time in order to support cross compiling. - -Signed-off-by: Đoàn Trần Công Danh ---- - src/libevent/SConscript | 23 ++++++++++++++++++++--- - 1 file changed, 20 insertions(+), 3 deletions(-) - -diff --git src/libevent/SConscript src/libevent/SConscript -index f9dceaa5..be56e29a 100644 ---- src/libevent/SConscript -+++ src/libevent/SConscript -@@ -184,6 +184,14 @@ def CheckStructMember(ctx, struct, member, includes = None): - conf.AddTest('CheckStructMember', CheckStructMember) - - -+def CheckCompileCxx(ctx, msg, src): -+ ctx.Message('Checking for %s... ' % msg) -+ ret = ctx.TryCompile(src + '\n', '.cpp') -+ ctx.Result(ret) -+ return ret -+ -+conf.AddTest('CheckCompileCxx', CheckCompileCxx) -+ - # General compile and run check - def CheckRun(ctx, msg, src): - ctx.Message('Checking for %s... ' % msg) -@@ -213,6 +221,9 @@ structs = 'addrinfo in6_addr sockaddr_in6 sockaddr_storage' - sizeof = ['int', 'long', 'long long', 'off_t', 'short', 'size_t', 'void *'] - - gethostbyname_r_3_arg_src = ''' -+ #ifndef __cplusplus -+ #error must be compiled as cxx -+ #endif - #define _BSD_SOURCE - #include - int main(int argc, char **argv) { -@@ -224,6 +235,9 @@ gethostbyname_r_3_arg_src = ''' - ''' - - gethostbyname_r_5_arg_src = ''' -+ #ifndef __cplusplus -+ #error must be compiled as cxx -+ #endif - #define _BSD_SOURCE - #include - int main(int argc, char **argv) { -@@ -237,6 +251,9 @@ gethostbyname_r_5_arg_src = ''' - ''' - - gethostbyname_r_6_arg_src = ''' -+ #ifndef __cplusplus -+ #error must be compiled as cxx -+ #endif - #define _BSD_SOURCE - #include - int main(int argc, char **argv) { -@@ -336,13 +353,13 @@ def get_event_config_defs(): - if 'HAVE_EPOLL_CREATE' in defs: defs['HAVE_EPOLL'] = '1' - - # gethostbyname_r -- if conf.CheckRun('3 arg gethostbyname_r()', gethostbyname_r_3_arg_src): -+ if conf.CheckCompileCxx('3 arg gethostbyname_r()', gethostbyname_r_3_arg_src): - defs['HAVE_GETHOSTBYNAME_R_3_ARG'] = '1' - -- if conf.CheckRun('5 arg gethostbyname_r()', gethostbyname_r_5_arg_src): -+ if conf.CheckCompileCxx('5 arg gethostbyname_r()', gethostbyname_r_5_arg_src): - defs['HAVE_GETHOSTBYNAME_R_5_ARG'] = '1' - -- if conf.CheckRun('6 arg gethostbyname_r()', gethostbyname_r_6_arg_src): -+ if conf.CheckCompileCxx('6 arg gethostbyname_r()', gethostbyname_r_6_arg_src): - defs['HAVE_GETHOSTBYNAME_R_6_ARG'] = '1' - - --- -2.26.2.672.g232c24e857 - diff --git a/srcpkgs/cbang/patches/sched_yield.patch b/srcpkgs/cbang/patches/sched_yield.patch deleted file mode 100644 index f2ebc576873..00000000000 --- a/srcpkgs/cbang/patches/sched_yield.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/cbang/os/Thread.cpp 2020-01-20 01:56:06.000000000 +0100 -+++ src/cbang/os/Thread.cpp 2020-04-06 09:00:02.117699569 +0200 -@@ -214,7 +214,7 @@ - void Thread::yield() { - #ifdef _WIN32 - SwitchToThread(); --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || !defined(__GLIBC__) - sched_yield(); - #else - pthread_yield(); diff --git a/srcpkgs/cbang/patches/va_copy.patch b/srcpkgs/cbang/patches/va_copy.patch deleted file mode 100644 index f1a8d5ae308..00000000000 --- a/srcpkgs/cbang/patches/va_copy.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/cbang/String.cpp 2020-01-20 01:56:06.000000000 +0100 -+++ src/cbang/String.cpp 2020-04-06 08:56:17.307708533 +0200 -@@ -116,7 +116,7 @@ - - string String::vprintf(const char *format, va_list ap) { - va_list copy; -- __va_copy(copy, ap); -+ va_copy(copy, ap); - - int length = vsnprintf(0, 0, format, copy); - va_end(copy); diff --git a/srcpkgs/cbang/template b/srcpkgs/cbang/template index 75af292e8e9..4446b5acf08 100644 --- a/srcpkgs/cbang/template +++ b/srcpkgs/cbang/template @@ -1,6 +1,6 @@ # Template file for 'cbang' pkgname=cbang -version=1.4.0 +version=1.5.0 revision=1 build_style=scons make_build_args="sharedlib=1 staticlib=1" @@ -13,7 +13,7 @@ maintainer="Jürgen Buchmüller " license="LGPL-2.1-only" homepage="https://github.com/CauldronDevelopmentLLC/cbang" distfiles="https://github.com/CauldronDevelopmentLLC/cbang/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz" -checksum=332a776ab026c30aa1666ad2482e1bf77fa5c41e3e2f7cde9ff2d98cfd3b4026 +checksum=6469c9fba9c47b5731a15294550575a4b71851d2eb52df0f20cfb0f03ed943f5 pre_build() { make_build_args+=" prefix=$DESTDIR/usr"