diff --git a/srcpkgs/mingw-w64-crt/template b/srcpkgs/mingw-w64-crt/template new file mode 100644 index 00000000000..4ce7492d82f --- /dev/null +++ b/srcpkgs/mingw-w64-crt/template @@ -0,0 +1,66 @@ +# Template build file for 'mingw-w64-crt' +# +_shortname=mingw-w64 +pkgname=$_shortname-crt +_majversion=1.0 +_snapshot=20110523 +version=${_majversion}.$_snapshot +distfiles=${SOURCEFORGE_SITE}/$_shortname/$_shortname/$_shortname-v$_majversion-snapshot-$_snapshot.tar.bz2 +build_style=custom-install +short_desc="The mingw-w64 cross-compiler runtime" +maintainer="davehome " +homepage="http://mingw-w64.sourceforge.net/" +license="Public Domain, BSD, LGPL, ZPL" +checksum=12dc02c40cb2d28dd70aeea792fe998e29acfc614589ecf7508cd1fbb93a4154 +long_desc=" + The mingw-w64 cross-compiler runtime. + + This is the mingw-64 cross-compiler, which supports building code for Win32 + or Win64 (multilib). For the i686 platform, only 32bit is available." + +Add_dependency build gcc-multilib +Add_dependency build flex +Add_dependency build gawk + +Add_dependency full mingw-w64-binutils +Add_dependency full mingw-w64-headers +Add_dependency full mingw-w64-gcc + +_mingwprefix=/opt + +if [ "${xbps_machine}" = "x86_64" ]; then + _mingwtriplet="${xbps_machine}-w64-mingw32" + _multilib_args="--enable-lib32 --enable-lib64" +else + _mingwtriplet="${xbps_machine}-w32-mingw32" + _multilib_args="--enable-lib32 --disable-lib64" +fi + +strip_cmd=${_mingwtriplet}-strip + +do_build() +{ + unset LD_LIBRARY_PATH LDLIBPATH LDFLAGS CPPFLAGS + local SAVEDPATH=$PATH + export PATH="/opt/bin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" + + cd ${wrksrc}/../$_shortname-v$_majversion-$_snapshot/$pkgname && \ + ./configure --prefix=${_mingwprefix} --with-sysroot=${_mingwprefix} \ + --host=${_mingwtriplet} ${_multilib_args} --bindir=${_mingwprefix}/bin + + make ${makejobs} + + export PATH=$SAVEDPATH +} + +do_install() +{ + unset LD_LIBRARY_PATH LDLIBPATH LDFLAGS CPPFLAGS + local SAVEDPATH=$PATH + export PATH="/opt/bin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" + + cd ${wrksrc}/../$_shortname-v$_majversion-$_snapshot/$pkgname && \ + make DESTDIR=${DESTDIR} install + + export PATH=$SAVEDPATH +}