Skip to content
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.

Commit

Permalink
Merge branch 'bootstrap' into arm-targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyd2019 committed Apr 7, 2021
2 parents fb3c54a + 2407a57 commit 1fae822
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 53 deletions.
13 changes: 10 additions & 3 deletions mingw-w64-crt-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
_realname=crt
pkgbase=mingw-w64-${_realname}-git
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
pkgver=9.0.0.6029.ecb4ff54
pkgver=9.0.0.6154.e37b315b
pkgrel=1
_commit='ecb4ff5498dfedd6abcbadb889b84fab19ee57b2'
_commit='e37b315bc039a10507c5cb1046d6b891506022be'
pkgdesc='MinGW-w64 CRT for Windows'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
url='https://mingw-w64.sourceforge.io/'
license=('custom')
groups=("${MINGW_PACKAGE_PREFIX}-toolchain")
Expand Down Expand Up @@ -44,6 +45,7 @@ build() {
export CC='clang' CXX='clang++' AS="clang" AR="llvm-ar" RANLIB="llvm-ranlib" DLLTOOL="llvm-dlltool" LD='ld.lld'

msg "Building ${MINGW_CHOST} CRT"
local _crt_configure_args
case "$CARCH" in
i686)
_crt_configure_args="--disable-lib64 --enable-lib32"
Expand All @@ -59,6 +61,11 @@ build() {
;;
esac

local _default_msvcrt=msvcrt
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]] || [[ $MINGW_PACKAGE_PREFIX == *-ucrt-* ]]; then
_default_msvcrt=ucrt
fi

[[ -d ${srcdir}/crt-${MINGW_CHOST} ]] && rm -rf ${srcdir}/crt-${MINGW_CHOST}
mkdir -p ${srcdir}/crt-${MINGW_CHOST} && cd ${srcdir}/crt-${MINGW_CHOST}
${srcdir}/mingw-w64/mingw-w64-crt/configure \
Expand All @@ -67,7 +74,7 @@ build() {
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--with-sysroot=${MINGW_PREFIX}/${MINGW_CHOST} \
--with-default-msvcrt=ucrt \
--with-default-msvcrt=${_default_msvcrt} \
--enable-wildcard \
${_crt_configure_args}
make
Expand Down
15 changes: 9 additions & 6 deletions mingw-w64-headers-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ _realname=headers
pkgbase=mingw-w64-${_realname}-git
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
pkgdesc="MinGW-w64 headers for Windows"
pkgver=9.0.0.6029.ecb4ff54
pkgver=9.0.0.6154.e37b315b
pkgrel=1
_commit='ecb4ff5498dfedd6abcbadb889b84fab19ee57b2'
_commit='e37b315bc039a10507c5cb1046d6b891506022be'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
url="https://mingw-w64.sourceforge.io/"
license=('custom')
groups=("${MINGW_PACKAGE_PREFIX}-toolchain")
Expand Down Expand Up @@ -36,16 +37,13 @@ prepare() {
git am --committer-date-is-author-date "${srcdir}/0001-Allow-to-use-bessel-and-complex-functions-without-un.patch"
git am --committer-date-is-author-date "${srcdir}/0002-DirectX-9-fixes-for-VLC.patch"



cd ${srcdir}/mingw-w64/mingw-w64-headers
touch include/windows.*.h include/wincrypt.h include/prsht.h
}

build() {
export PATH="/opt/${MINGW_CHOST}/bin:$PATH"
export CC='clang' CXX='clang++' AS="clang" AR="llvm-ar" RANLIB="llvm-ranlib" DLLTOOL="llvm-dlltool" LD='ld.lld'

local _default_win32_winnt
case "${CARCH}" in
i686|x86_64)
Expand All @@ -57,6 +55,11 @@ build() {
;;
esac

local _default_msvcrt=msvcrt
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]] || [[ $MINGW_PACKAGE_PREFIX == *-ucrt-* ]]; then
_default_msvcrt=ucrt
fi

msg "Configuring ${MINGW_CHOST} headers"
[[ -d ${srcdir}/headers-${MINGW_CHOST} ]] && rm -rf ${srcdir}/headers-${MINGW_CHOST}
mkdir -p ${srcdir}/headers-${MINGW_CHOST} && cd ${srcdir}/headers-${MINGW_CHOST}
Expand All @@ -67,7 +70,7 @@ build() {
--prefix=${MINGW_PREFIX}/${MINGW_CHOST} \
--enable-sdk=all \
--with-default-win32-winnt=${_default_win32_winnt} \
--with-default-msvcrt=ucrt \
--with-default-msvcrt=${_default_msvcrt} \
--enable-idl \
--without-widl
}
Expand Down
5 changes: 3 additions & 2 deletions mingw-w64-libmangle-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ pkgbase=mingw-w64-${_realname}-git
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=9.0.0.6029.ecb4ff54
pkgver=9.0.0.6154.e37b315b
pkgrel=1
_commit='ecb4ff5498dfedd6abcbadb889b84fab19ee57b2'
_commit='e37b315bc039a10507c5cb1046d6b891506022be'
pkgdesc="MinGW-w64 libmangle"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
url="https://mingw-w64.sourceforge.io/"
license=('custom')
groups=("${MINGW_PACKAGE_PREFIX}-toolchain")
Expand Down
5 changes: 3 additions & 2 deletions mingw-w64-tools-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ pkgbase=mingw-w64-${_realname}-git
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=9.0.0.6029.ecb4ff54
pkgver=9.0.0.6154.e37b315b
pkgrel=1
_commit='ecb4ff5498dfedd6abcbadb889b84fab19ee57b2'
_commit='e37b315bc039a10507c5cb1046d6b891506022be'
pkgdesc="MinGW-w64 tools"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
url="https://mingw-w64.sourceforge.io/"
license=('custom')
groups=("${MINGW_PACKAGE_PREFIX}-toolchain")
Expand Down
54 changes: 14 additions & 40 deletions mingw-w64-winpthreads-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
_realname=winpthreads
pkgbase=mingw-w64-${_realname}-git
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git" "${MINGW_PACKAGE_PREFIX}-libwinpthread-git")
pkgver=9.0.0.6029.ecb4ff54
pkgver=9.0.0.6154.e37b315b
pkgrel=1
_commit='ecb4ff5498dfedd6abcbadb889b84fab19ee57b2'
_commit='e37b315bc039a10507c5cb1046d6b891506022be'
pkgdesc="MinGW-w64 winpthreads library"
url="https://mingw-w64.sourceforge.io/"
# The main license of `winpthreads' is MIT, but parts of this library are
# derived from the "POSIX Threads for Microsoft Windows" library, which is
# licensed under BSD [1].
license=('MIT' 'BSD')
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
groups=("${MINGW_PACKAGE_PREFIX}-toolchain")
makedepends=("git"
"${MINGW_PACKAGE_PREFIX}-clang"
Expand Down Expand Up @@ -86,7 +87,7 @@ _install_licenses() {
install -Dm644 ${srcdir}/mingw-w64/mingw-w64-libraries/winpthreads/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/$1/mingw-w64-libraries/winpthreads/COPYING
}

package_winpthreads() {
package_winpthreads-git() {
depends=("${MINGW_PACKAGE_PREFIX}-crt-git" "${MINGW_PACKAGE_PREFIX}-libwinpthread-git=${pkgver}")
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
Expand All @@ -102,7 +103,7 @@ package_winpthreads() {
_install_licenses ${_realname}
}

package_libwinpthread() {
package_libwinpthread-git() {
provides=("${MINGW_PACKAGE_PREFIX}-libwinpthread")
conflicts=("${MINGW_PACKAGE_PREFIX}-libwinpthread")

Expand All @@ -115,42 +116,15 @@ package_libwinpthread() {
_install_licenses libwinpthread
}

# Wrappers for package functions
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :

# 32-bit wrappers
package_mingw-w64-clang-i686-winpthreads-git() {
package_winpthreads
}

package_mingw-w64-clang-i686-libwinpthread-git() {
package_libwinpthread
}

# 64-bit wrappers
package_mingw-w64-clang-x86_64-winpthreads-git() {
package_winpthreads
}

package_mingw-w64-clang-x86_64-libwinpthread-git() {
package_libwinpthread
}

# 32-bit arm wrappers
package_mingw-w64-clang-armv7-winpthreads-git() {
package_winpthreads
}

package_mingw-w64-clang-armv7-libwinpthread-git() {
package_libwinpthread
}

# 64-bit arm wrappers
package_mingw-w64-clang-aarch64-winpthreads-git() {
package_winpthreads
}

package_mingw-w64-clang-aarch64-libwinpthread-git() {
package_libwinpthread
}
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;

# [1] https://locklessinc.com/articles/pthreads_on_windows/

0 comments on commit 1fae822

Please sign in to comment.