Browse Source

mingw-w64-environment: added to repo

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
master
Steven Noonan 2 years ago
parent
commit
b9e82e545b
  1. 14
      mingw-w64-environment/PKGBUILD
  2. 16
      mingw-w64-environment/mingw-env.sh

14
mingw-w64-environment/PKGBUILD

@ -0,0 +1,14 @@
pkgname=mingw-w64-environment
pkgver=1
pkgrel=2
arch=('any')
pkgdesc="Script providing common environment variables and functions for MinGW (mingw-w64)"
license=("BSD")
url="http://fedoraproject.org/wiki/MinGW"
source=("mingw-env.sh")
sha256sums=('SKIP')
package() {
install -d "${pkgdir}"/usr/bin
install -m 755 mingw-env.sh "${pkgdir}"/usr/bin/mingw-env
}

16
mingw-w64-environment/mingw-env.sh

@ -0,0 +1,16 @@
#!/bin/sh
_arch=$1
default_mingw_pp_flags="-D_FORTIFY_SOURCE=2"
default_mingw_compiler_flags="$default_mingw_pp_flags -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4"
default_mingw_linker_flags="-Wl,-O1,--sort-common,--as-needed -fstack-protector"
export CPPFLAGS="${MINGW_CPPFLAGS:-$default_mingw_pp_flags $CPPFLAGS}"
export CFLAGS="${MINGW_CFLAGS:-$default_mingw_compiler_flags $CFLAGS}"
export CXXFLAGS="${MINGW_CXXFLAGS:-$default_mingw_compiler_flags $CXXFLAGS}"
export LDFLAGS="${MINGW_LDFLAGS:-$default_mingw_linker_flags $LDFLAGS}"
mingw_prefix=/usr/${_arch}
export PKG_CONFIG_SYSROOT_DIR="${mingw_prefix}"
export PKG_CONFIG_LIBDIR="${mingw_prefix}/lib/pkgconfig:${mingw_prefix}/share/pkgconfig"
Loading…
Cancel
Save