مهدي شينون (Mehdi Chinoune) c9e5b84b9b NFC: Always quote ${srcdir} and ${pkgdir}
Just in case someone has space in his path to MINGW-packages repo.
2025-01-14 09:27:50 +01:00

48 lines
1.4 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libyaml
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.2.5
pkgrel=2
pkgdesc="YAML 1.1 library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://yaml.org/"
msys2_references=(
"cpe: cpe:/a:pyyaml:libyaml"
)
license=("spdx:MIT")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools")
source=("https://github.com/yaml/libyaml/archive/${pkgver}/${_realname}-${pkgver}.tar.gz"
"0001-Proper-mingw-YAML_DECLARE-definition.patch"
"0002-libyaml-no-undefined.patch")
sha256sums=('fa240dbf262be053f3898006d502d514936c818e422afdcf33921c63bed9bf2e'
'101a650418d0f52cd7402a72cafe71412fb51a7d703f0f557412110c5aa395e5'
'abf0b4ff0b19a142aaa27e2815cd5418ce1c4d4bcab2066f5085dafe2b5cc96a')
prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
patch -Np1 -i "${srcdir}/0001-Proper-mingw-YAML_DECLARE-definition.patch"
patch -Np1 -i "${srcdir}/0002-libyaml-no-undefined.patch"
autoreconf -fiv
}
build() {
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST}
make
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
make DESTDIR="${pkgdir}" install
}