diff --git a/common/shlibs b/common/shlibs index 5ce49282e4a..b993f67ee8e 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3405,3 +3405,4 @@ libshaderc_shared.so shaderc-2017.2_1 libglslang.so glslang-6.2.2596_1 libSPIRV.so glslang-6.2.2596_1 libmaxminddb.so.0 libmaxminddb-1.3.2_1 +libmysqlpp.so mysql++-3.2.4_1 diff --git a/srcpkgs/mysql++-devel b/srcpkgs/mysql++-devel new file mode 120000 index 00000000000..211b8fb5f7f --- /dev/null +++ b/srcpkgs/mysql++-devel @@ -0,0 +1 @@ +mysql++ \ No newline at end of file diff --git a/srcpkgs/mysql++/patches/01-fix-cross.patch b/srcpkgs/mysql++/patches/01-fix-cross.patch new file mode 100644 index 00000000000..4f1202fc072 --- /dev/null +++ b/srcpkgs/mysql++/patches/01-fix-cross.patch @@ -0,0 +1,30 @@ +Index: lib/datetime.cpp +================================================================== +--- lib/datetime.cpp ++++ lib/datetime.cpp +@@ -30,10 +30,11 @@ + + #include "datetime.h" + #include "stream2string.h" + + #include ++#include + + #include + #include + + using namespace std; +@@ -51,11 +52,11 @@ + localtime_r(&t, ptm); + #else + // No explicitly thread-safe localtime() replacement found. This + // may still be thread-safe, as some C libraries take special steps + // within localtime() to get thread safety, such as TLS. +- memcpy(ptm, localtime(&t), sizeof(tm)); ++ std::memcpy(ptm, localtime(&t), sizeof(tm)); + #endif + } + + + std::ostream& operator <<(std::ostream& os, const Date& d) + diff --git a/srcpkgs/mysql++/template b/srcpkgs/mysql++/template new file mode 100644 index 00000000000..8904aa9924f --- /dev/null +++ b/srcpkgs/mysql++/template @@ -0,0 +1,37 @@ +# Template file for 'mysql++' +pkgname=mysql++ +version=3.2.4 +revision=1 +build_style=gnu-configure +make_install_target="install_mysqlpp" +makedepends="libmariadbclient-devel" +short_desc="C++ wrapper for MySQLs C API" +maintainer="DirectorX " +license="LGPL-2.1-or-later, Custom" +homepage="https://tangentsoft.net/mysqlpp" +distfiles="${homepage}/releases/${pkgname}-${version}.tar.gz" +checksum=6b60727b36b1fed78e0c935d6510b31821c71ec0076967cd9fa5ecf4320d7d63 + +if [ -n "$CROSS_BUILD" ]; then + configure_args="--exec_prefix=${XBPS_CROSS_BASE} --with-mysql-include=${XBPS_CROSS_BASE}/usr/include/mysql" +fi + +post_install() { + vlicense COPYING.txt +} + +mysql++-devel_package() { + depends="mysql++>=${version}_${revision} libmysqlclient-devel" + short_desc+=" - development files" + pkg_install() { + vmkdir usr/include/mysql++ + vcopy lib/*.h usr/include/mysql++ + vmove "usr/lib/*.so" + } +} + +case "${XBPS_TARGET_MACHINE}" in + arm*|aarch64*|mips*) + broken="${XBPS_TARGET_MACHINE} not supported yet" + ;; +esac