diff --git a/mingw-w64-dtc/PKGBUILD b/mingw-w64-dtc/PKGBUILD index dfd8c1eb15730..e30073e8a87f4 100644 --- a/mingw-w64-dtc/PKGBUILD +++ b/mingw-w64-dtc/PKGBUILD @@ -18,6 +18,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-meson" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-python" + "${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-installer" "${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-python-setuptools-scm" "${MINGW_PACKAGE_PREFIX}-swig") @@ -25,8 +27,6 @@ source=("https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/${_realname}- sha256sums=('c4c4a47b8af98ad81c488d934da051f28bd2d0143a4622ea14d1920bc8c90f75') build() { - mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM} - export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} MSYS2_ARG_CONV_EXCL="--prefix=" \ @@ -34,15 +34,23 @@ build() { --prefix="${MINGW_PREFIX}" \ -Dtests=false \ -Dtools=true \ - ../${_realname}-${pkgver} + "build-${MSYSTEM}" \ + "${_realname}-${pkgver}" + + ${MINGW_PREFIX}/bin/meson compile -C "build-${MSYSTEM}" - ${MINGW_PREFIX}/bin/meson compile + LDFLAGS+=" -L$(cygpath -wm "${srcdir}/build-${MSYSTEM}/libfdt")" \ + python -m build --wheel --skip-dependency-check --no-isolation \ + "${_realname}-${pkgver}" } package() { - cd "${srcdir}/build-${MSYSTEM}" + ${MINGW_PREFIX}/bin/meson install -C "build-${MSYSTEM}" --destdir "${pkgdir}" - DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/meson install + MSYS2_ARG_CONV_EXCL="--prefix=" \ + python -m installer --prefix=${MINGW_PREFIX} \ + --destdir="${pkgdir}" \ + "${_realname}-${pkgver}"/dist/*.whl install -Dm644 "${srcdir}/${_realname}-${pkgver}"/GPL "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/GPL }