Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions mingw-w64-c4core/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Maintainer: Olivier Xillo <oxillo++dev@mailo.com>

_realname=c4core
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.2.10
pkgrel=1
pkgdesc="Multiplatform low-level C++ utilities"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/biojppm/c4core"
msys2_repository_url='https://github.com/biojppm/c4core'
license=('spdx:MIT' 'spdx:BSL')
makedepends=("git"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-ninja"
)
source=("${_realname}"::"git+https://github.com/biojppm/c4core.git#tag=v${pkgver}")
sha256sums=('ee02c2982fc8e9ab25fa3a56cc3ee0921859feece1d3c973af301a8ef4a932d6')


prepare() {
# The git source clones are named after their definition in the source array
cd ${_realname}

# Configure and update the main submodule (c4core)
git submodule init
git submodule update

# Apply any necessary patch for the build system (e.g., Python pathing fixes)
# NOTE: This patch command is commented out because makepkg failed to find the source file.
# If the build fails without it, you must place 'rapidyaml-python-bindings.patch'
# in the same directory as the PKGBUILD and uncomment these lines.
# patch -p1 < "${srcdir}/rapidyaml-python-bindings.patch"
}

build() {
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake -B build-${MSYSTEM} -G Ninja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-S ${_realname}

${MINGW_PREFIX}/bin/cmake --build build-${MSYSTEM}
}

package() {

DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install build-${MSYSTEM}

# Install license
install -Dm644 "${srcdir}/${_realname}/LICENSE.txt" \
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.txt"
install -Dm644 "${srcdir}/${_realname}/LICENSE-BOOST.txt" \
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE-BOOST.txt"
}
Loading