81 lines
2.1 KiB
Bash
81 lines
2.1 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
# Contributor: Martell Malone <martellmalone@gmail.com>
|
|
|
|
_realname=crt
|
|
_mingw_suff=mingw-w64-cross
|
|
pkgname=("${_mingw_suff}-${_realname}")
|
|
provides=("${_mingw_suff}-${_realname}-git")
|
|
conflicts=("${_mingw_suff}-${_realname}-git")
|
|
replaces=("${_mingw_suff}-${_realname}-git")
|
|
pkgver=11.0.1.r0.gc3e587c06
|
|
pkgrel=2
|
|
pkgdesc='MinGW-w64 CRT for cross-compiler'
|
|
arch=('i686' 'x86_64')
|
|
url='https://mingw-w64.sourceforge.io/'
|
|
license=('custom')
|
|
groups=("${_mingw_suff}-toolchain" "${_mingw_suff}")
|
|
depends=("${_mingw_suff}-headers")
|
|
makedepends=("git" "${_mingw_suff}-gcc" "${_mingw_suff}-binutils" 'autotools')
|
|
options=('!strip' 'staticlibs' '!emptydirs' '!buildflags')
|
|
_commit='c3e587c067a00a561899d49d3e63a659e38802ec'
|
|
source=("mingw-w64"::"git+https://git.code.sf.net/p/mingw-w64/mingw-w64#commit=$_commit")
|
|
|
|
sha256sums=('SKIP')
|
|
msys2_references=(
|
|
'archlinux: mingw-w64-crt'
|
|
'cpe: cpe:/a:mingw-w64:mingw-w64'
|
|
)
|
|
|
|
_targets="x86_64-w64-mingw32ucrt x86_64-w64-mingw32 i686-w64-mingw32"
|
|
|
|
pkgver() {
|
|
cd "${srcdir}/mingw-w64"
|
|
|
|
git describe --long ${_commit} | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
|
|
}
|
|
|
|
prepare() {
|
|
cd "${srcdir}/mingw-w64"
|
|
}
|
|
|
|
build() {
|
|
for _target in ${_targets}; do
|
|
msg "Building ${_target} CRT"
|
|
case "${_target}" in
|
|
i686*)
|
|
_crt_configure_args="--disable-lib64 --enable-lib32"
|
|
;;
|
|
x86_64*)
|
|
_crt_configure_args="--disable-lib32 --enable-lib64"
|
|
;;
|
|
esac
|
|
mkdir -p ${srcdir}/crt-${_target} && cd ${srcdir}/crt-${_target}
|
|
|
|
if [[ "${_target}" == "x86_64-w64-mingw32ucrt" ]]; then
|
|
_default_msvcrt=ucrt
|
|
else
|
|
_default_msvcrt=msvcrt
|
|
fi
|
|
|
|
unset CC
|
|
${srcdir}/mingw-w64/mingw-w64-crt/configure \
|
|
--build=${CHOST} \
|
|
--prefix=/opt/${_target} \
|
|
--host=${_target} \
|
|
--enable-wildcard \
|
|
--with-default-msvcrt=${_default_msvcrt} \
|
|
--disable-dependency-tracking \
|
|
${_crt_configure_args}
|
|
|
|
make
|
|
done
|
|
}
|
|
|
|
package() {
|
|
for _target in ${_targets}; do
|
|
msg "Installing ${_target} crt"
|
|
cd ${srcdir}/crt-${_target}
|
|
make DESTDIR=${pkgdir} install
|
|
done
|
|
}
|