Skip to content

Commit

Permalink
dtc: install python bindings explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 committed Sep 26, 2024
1 parent 41e2aec commit 480681c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions mingw-w64-dtc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,39 @@ 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")
source=("https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/${_realname}-${pkgver}.tar.gz")
sha256sums=('c4c4a47b8af98ad81c488d934da051f28bd2d0143a4622ea14d1920bc8c90f75')

build() {
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}

export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}

MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/meson setup \
--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
}

0 comments on commit 480681c

Please sign in to comment.