mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
78 lines
1.7 KiB
Plaintext
78 lines
1.7 KiB
Plaintext
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Maintainer:
|
|
pkgname=mingw-w64-crt
|
|
pkgver=11.0.0
|
|
pkgrel=0
|
|
pkgdesc="MinGW-w64 CRT for Windows"
|
|
options="!check !strip"
|
|
url="https://mingw-w64.sourceforge.net/"
|
|
arch="x86_64 x86"
|
|
license="custom"
|
|
makedepends="
|
|
mingw-w64-gcc-base
|
|
mingw-w64-binutils
|
|
mingw-w64-headers
|
|
mingw-w64-headers-bootstrap
|
|
"
|
|
source="https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v$pkgver.tar.bz2"
|
|
builddir="$srcdir/mingw-w64-v$pkgver/mingw-w64-crt"
|
|
|
|
case "$CARCH" in
|
|
x86_64)
|
|
_targets="x86_64-w64-mingw32 i686-w64-mingw32"
|
|
makedepends="$makedepends i686-mingw-w64-binutils i686-mingw-w64-headers"
|
|
subpackages="$subpackages i686-$pkgname:x32"
|
|
;;
|
|
x86)
|
|
_targets="i686-w64-mingw32"
|
|
;;
|
|
esac
|
|
|
|
build() {
|
|
export CFLAGS="$CFLAGS -O2"
|
|
export CXXFLAGS="$CXXFLAGS -O2"
|
|
export CPPFLAGS="$CPPFLAGS -O2"
|
|
|
|
local target
|
|
for target in $_targets; do
|
|
msg "building target: $target"
|
|
(
|
|
local sixfour="$(echo $target | grep -q x86_64 && echo true || echo false)"
|
|
if $sixfour; then
|
|
local conf="--enable-lib64 --disable-lib32"
|
|
else
|
|
local conf="--enable-lib32 --disable-lib64"
|
|
fi
|
|
|
|
local bld="$srcdir"/bld-$target
|
|
mkdir -p "$bld"
|
|
cd "$bld"
|
|
"$builddir"/configure \
|
|
--prefix=/usr/$target \
|
|
--host=$target \
|
|
--target=$target \
|
|
--enable-wildcard \
|
|
$conf \
|
|
CC=$target-gcc
|
|
make
|
|
)
|
|
done
|
|
}
|
|
|
|
package() {
|
|
local target
|
|
for target in $_targets; do
|
|
make -C "$srcdir"/bld-$target DESTDIR="$pkgdir" install
|
|
done
|
|
}
|
|
|
|
x32() {
|
|
pkdesc="$pkdesc (i686 hosted CRT)"
|
|
|
|
amove usr/i686-w64-mingw32
|
|
}
|
|
|
|
sha512sums="
|
|
bc1c9fd9d8593ead9375fcbe40950f06cf7616b94dc676db2793ac9b496fe3a6cc94b5793effda3b752942be0d7d01a1c37a8f221aaf178df0d4eeb0aa6d1f8d mingw-w64-v11.0.0.tar.bz2
|
|
"
|