aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-11 10:28:04 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-11 17:30:06 -0300
commitea69b4d5fb5c96f4db73a42f38b9b3831656db95 (patch)
tree16a0af8357df3fc1123acb788a5e7886dd594508
parentd16c199763c9f49226fc67c228cbb08bdacd914f (diff)
downloadaports-ea69b4d5fb5c96f4db73a42f38b9b3831656db95.tar.bz2
aports-ea69b4d5fb5c96f4db73a42f38b9b3831656db95.tar.xz
testing/mingw-w64-gcc: new aport
https://gcc.gnu.org Cross GCC for the MinGW-w64 cross-compiler
-rw-r--r--testing/mingw-w64-gcc/APKBUILD79
1 files changed, 79 insertions, 0 deletions
diff --git a/testing/mingw-w64-gcc/APKBUILD b/testing/mingw-w64-gcc/APKBUILD
new file mode 100644
index 0000000000..9b52e1781c
--- /dev/null
+++ b/testing/mingw-w64-gcc/APKBUILD
@@ -0,0 +1,79 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
+# Maintainer: Leo <thinkabit.ukim@gmail.com>
+pkgname=mingw-w64-gcc
+pkgver=9.1.0
+pkgrel=0
+_islver=0.21
+pkgdesc="Cross GCC for the MinGW-w64 cross-compiler"
+options="!static"
+url="https://gcc.gnu.org"
+arch="x86_64 x86"
+license="GPL-3.0-or-later"
+depends="
+ mingw-w64-binutils
+ mingw-w64-winpthreads
+ mingw-w64-headers
+ mingw-w64-crt"
+makedepends="zlib-dev mpc1-dev gmp-dev mpfr-dev"
+source="
+ $pkgname-$pkgver.tar.xz::https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
+ isl-${_islver}::http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
+ "
+builddir="$srcdir/gcc-$pkgver"
+
+case "$CARCH" in
+ x86_64) _target="x86_64-w64-mingw32" ;;
+ x86) _target="i686-w64-mingw32" ;;
+esac
+
+# Directory for our out-of-tree builds
+_gccdir="$srcdir"/gcc-build-${_target}
+
+prepare() {
+ default_prepare
+ mkdir -p "$_gccdir"
+}
+
+build() {
+ cd "$_gccdir"
+ "$builddir"/configure \
+ --prefix=/usr \
+ --libexecdir=/usr/libexec \
+ --target=${_target} \
+ --enable-languages=c,lto,c++ \
+ --enable-shared --enable-static \
+ --enable-threads=posix --enable-fully-dynamic-string \
+ --enable-libstdcxx-time=yes --enable-libstdcxx-filesystem=yes \
+ --with-system-zlib --enable-cloog-backend=isl \
+ --enable-lto --disable-dw2-exceptions --enable-libgomp \
+ --disable-multilib --enable-checking=release \
+ --disable-nls --disable-werror
+ make
+}
+
+package() {
+ cd "$_gccdir"
+ make DESTDIR="$pkgdir" install
+
+ ${_target}-strip "$pkgdir"/usr/${_target}/lib/*.dll
+
+ strip "$pkgdir"/usr/bin/${_target}-*
+ strip "$pkgdir"/usr/libexec/gcc/${_target}/$pkgver/cc1*
+ strip "$pkgdir"/usr/libexec/gcc/${_target}/$pkgver/collect2
+ strip "$pkgdir"/usr/libexec/gcc/${_target}/$pkgver/lto*
+
+ ln -s ${_target}-gcc "$pkgdir"/usr/bin/${_target}-cc
+
+ # Move DLLs
+ mkdir -p "$pkgdir"/usr/${_target}/bin
+ mv "$pkgdir"/usr/${_target}/lib/*.dll "$pkgdir"/usr/${_target}/bin
+
+ strip "$pkgdir"/usr/bin/*
+
+ # Unnecessary files
+ rm -rf "$pkgdir"/usr/share
+ rm "$pkgdir"/usr/lib/libcc1.*
+}
+
+sha512sums="b6134df027e734cee5395afd739fcfa4ea319a6017d662e54e89df927dea19d3fff7a6e35d676685383034e3db01c9d0b653f63574c274eeb15a2cb0bc7a1f28 mingw-w64-gcc-9.1.0.tar.xz
+48f3b8d90550e8ab28837b5757f87bf99cddec67769877e04942abef69bbe526ef4c863951d55dd89a6027dc09df48988c8df6029782f990aa4d5b67e65f6d53 isl-0.21"