diff --git a/common/shlibs b/common/shlibs index 14e6c812fe2..4b5a43a98ab 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3850,6 +3850,7 @@ libcbor.so.0.6 libcbor-0.6.1_1 libfido2.so.1 libfido2-1.3.0_1 libjanet.so.1.8 janet-1.8.0_1 libOpenImageDenoise.so.0 openimagedenoise-1.1.0_1 +libcbang0.so cbang-1.3.3_1 libblosc.so.1 c-blosc-1.17.1_1 libopenvdb.so.7.0 openvdb-7.0.0_1 libAlembic.so.1.7 alembic-1.7.12_1 diff --git a/srcpkgs/cbang-devel b/srcpkgs/cbang-devel new file mode 120000 index 00000000000..eece489b5ee --- /dev/null +++ b/srcpkgs/cbang-devel @@ -0,0 +1 @@ +cbang \ No newline at end of file diff --git a/srcpkgs/cbang/patches/libressl.patch b/srcpkgs/cbang/patches/libressl.patch new file mode 100644 index 00000000000..5fbc78edb61 --- /dev/null +++ b/srcpkgs/cbang/patches/libressl.patch @@ -0,0 +1,21 @@ +--- src/cbang/openssl/Digest.h 2020-01-20 01:56:06.000000000 +0100 ++++ src/cbang/openssl/Digest.h 2020-04-06 07:35:58.290900681 +0200 +@@ -41,13 +41,17 @@ + + #include + ++#if defined(LIBRESSL_VERSION_NUMBER) ++#include ++#else + #if OPENSSL_VERSION_NUMBER < 0x1010000fL + typedef struct env_md_st EVP_MD; + typedef struct env_md_ctx_st EVP_MD_CTX; +-#else ++#else // !defined(LIBRESSL_VERSION_NUMBER) + typedef struct evp_md_st EVP_MD; + typedef struct evp_md_ctx_st EVP_MD_CTX; + #endif // OPENSSL_VERSION_NUMBER < 0x1010000fL ++#endif // !defined(LIBRESSL_VERSION_NUMBER) + typedef struct engine_st ENGINE; + + namespace cb { diff --git a/srcpkgs/cbang/patches/sched_yield.patch b/srcpkgs/cbang/patches/sched_yield.patch new file mode 100644 index 00000000000..f2ebc576873 --- /dev/null +++ b/srcpkgs/cbang/patches/sched_yield.patch @@ -0,0 +1,11 @@ +--- 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/sys_time_h.patch b/srcpkgs/cbang/patches/sys_time_h.patch new file mode 100644 index 00000000000..4027989f41e --- /dev/null +++ b/srcpkgs/cbang/patches/sys_time_h.patch @@ -0,0 +1,13 @@ +--- src/cbang/time/Timer.h 2020-01-20 01:56:06.000000000 +0100 ++++ src/cbang/time/Timer.h 2020-04-06 09:05:08.440687355 +0200 +@@ -38,9 +38,7 @@ + #endif // _WIN32 + + +-struct timeval; +-struct timespec; +- ++#include + + namespace cb { + /// Time events or access current system time diff --git a/srcpkgs/cbang/patches/va_copy.patch b/srcpkgs/cbang/patches/va_copy.patch new file mode 100644 index 00000000000..f1a8d5ae308 --- /dev/null +++ b/srcpkgs/cbang/patches/va_copy.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 00000000000..1041ba5bf2b --- /dev/null +++ b/srcpkgs/cbang/template @@ -0,0 +1,35 @@ +# Template file for 'cbang' +pkgname=cbang +version=1.3.3 +revision=1 +build_style=scons +make_build_args="prefix=/usr sharedlib=1 staticlib=1" +make_install_args="${make_build_args}" +hostmakedepends="pkg-config" +makedepends="boost-devel bzip2-devel expat-devel leveldb-devel libevent-devel +libressl-devel libyaml-devel re2-devel snappy-devel sqlite-devel zlib-devel" +short_desc="C! (a.k.a. C-Bang) collection of C++ utility libraries" +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=05099fa47d83aa3012b4f8e0b3d69d334aa21a43dd6750f8e306832a9245b814 +nocross="Cannot cross build with scons" + +do_install() { + scons ${make_install_args} prefix=${DESTDIR}/usr install + # Create missing symbolic links for the shared library + ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0.0 + ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0 + ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so +} + +cbang-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version_revision} ${makedepends}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +}