Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions mingw-w64-jansson/001-cmake-config-location.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- jansson-2.15.0/CMakeLists.txt.orig 2026-05-26 08:46:44.846118600 +0300
+++ jansson-2.15.0/CMakeLists.txt 2026-05-26 08:46:59.731940000 +0300
@@ -593,7 +593,7 @@
set(JANSSON_INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
set(JANSSON_INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")

-if(WIN32 AND NOT CYGWIN)
+if(MSVC)
set(DEF_INSTALL_CMAKE_DIR cmake)
else()
set(DEF_INSTALL_CMAKE_DIR lib/cmake/jansson)
26 changes: 21 additions & 5 deletions mingw-w64-jansson/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _realname=jansson
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.15.0
pkgrel=1
pkgrel=2
pkgdesc="C library for encoding, decoding and manipulating JSON data (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -20,8 +20,26 @@ depends=("${MINGW_PACKAGE_PREFIX}-libwinpthread")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("https://github.com/akheron/${_realname}/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('070a629590723228dc3b744ae90e965a569efb9c535b3309b52e80e75d8eb3be')
source=("https://github.com/akheron/${_realname}/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz"
001-cmake-config-location.patch)
sha256sums=('070a629590723228dc3b744ae90e965a569efb9c535b3309b52e80e75d8eb3be'
'd38a6cbef2f5ad74885eb33715ce23df12b8df4793ba96fedcd8423a89a1ce72')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}

prepare() {
cd ${_realname}-${pkgver}

apply_patch_with_msg \
001-cmake-config-location.patch
}

build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
Expand All @@ -36,7 +54,6 @@ build() {
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
cmake \
-G"Ninja" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
"${_extra_config[@]}" \
-DJANSSON_BUILD_SHARED_LIBS=ON \
Expand All @@ -52,7 +69,6 @@ build() {
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
cmake \
-G"Ninja" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
"${_extra_config[@]}" \
-DJANSSON_BUILD_SHARED_LIBS=OFF \
Expand Down