diff --git a/mingw-w64-vector_blf/001-fix-install-dll.patch b/mingw-w64-vector_blf/001-fix-install-dll.patch new file mode 100644 index 0000000000..e84208965e --- /dev/null +++ b/mingw-w64-vector_blf/001-fix-install-dll.patch @@ -0,0 +1,12 @@ +--- a/src/Vector/BLF/CMakeLists.txt ++++ b/src/Vector/BLF/CMakeLists.txt +@@ -342,7 +342,8 @@ + # install + install( + TARGETS ${PROJECT_NAME} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/mingw-w64-vector_blf/002-fix-build-with-gcc-14.patch b/mingw-w64-vector_blf/002-fix-build-with-gcc-14.patch new file mode 100644 index 0000000000..bd5875f009 --- /dev/null +++ b/mingw-w64-vector_blf/002-fix-build-with-gcc-14.patch @@ -0,0 +1,21 @@ +--- a/src/Vector/BLF/FileStatistics.h ++++ b/src/Vector/BLF/FileStatistics.h +@@ -7,6 +7,7 @@ + #include + + #include ++#include + + #include + +--- a/src/Vector/BLF/ObjectHeaderBase.h ++++ b/src/Vector/BLF/ObjectHeaderBase.h +@@ -10,6 +10,8 @@ + + #include + ++#include ++ + namespace Vector { + namespace BLF { + diff --git a/mingw-w64-vector_blf/PKGBUILD b/mingw-w64-vector_blf/PKGBUILD new file mode 100644 index 0000000000..9a14867dd5 --- /dev/null +++ b/mingw-w64-vector_blf/PKGBUILD @@ -0,0 +1,58 @@ +# Contributor: Mehdi Chinoune + +_realname=vector_blf +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.4.2 +pkgrel=1 +pkgdesc="A library to access Binary Log File (BLF) files from Vector Informatik. (mingw-w64)" +arch=('any') +mingw_arch=('ucrt64' 'clang64' 'clangarm64') +url='https://github.com/Technica-Engineering/vector_blf' +license=('spdx:GPL-3.0-or-later') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-ninja") +source=("https://github.com/Technica-Engineering/vector_blf/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz" + "001-fix-install-dll.patch" + "002-fix-build-with-gcc-14.patch") +sha256sums=('02d4bdccc2a4bfa93a3d2f62d95c77c3166bc94d2df55dd49298e8099dc7c090' + 'ffec1f477e3acb3a213f85d8ae51b97c817e679d2fd9e3a09d22f65b79c93bda' + '64db10094ce9cb743b4293115cc8967a4591d8f41ef0928383907efe6f295f35') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i "${srcdir}"/001-fix-install-dll.patch + patch -p1 -i "${srcdir}"/002-fix-build-with-gcc-14.patch +} + +build() { + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + cmake \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + "${extra_config[@]}" \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_DLL_NAME_WITH_SOVERSION=ON \ + -DOPTION_RUN_DOXYGEN=OFF \ + -S "${_realname}-${pkgver}" \ + -B "build-${MSYSTEM}" + + cmake --build "build-${MSYSTEM}" +} + +package() { + DESTDIR="${pkgdir}" cmake --install "build-${MSYSTEM}" + + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/LICENSES/* \ + -t "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname} +}