2011-07-18 23:44:59 +00:00
|
|
|
# Template build file for 'mingw-w64-crt'
|
|
|
|
#
|
|
|
|
_shortname=mingw-w64
|
2011-07-20 22:38:06 +00:00
|
|
|
pkgname=${_shortname}-crt
|
2011-07-18 23:44:59 +00:00
|
|
|
_majversion=1.0
|
|
|
|
_snapshot=20110523
|
2011-07-20 22:38:06 +00:00
|
|
|
version=${_majversion}.${_snapshot}
|
2011-07-21 09:52:56 +00:00
|
|
|
revision=3
|
2011-07-20 22:38:06 +00:00
|
|
|
distfiles=${SOURCEFORGE_SITE}/${_shortname}/${_shortname}/${_shortname}-v${_majversion}-snapshot-${_snapshot}.tar.bz2
|
2011-07-18 23:44:59 +00:00
|
|
|
build_style=custom-install
|
|
|
|
short_desc="The mingw-w64 cross-compiler runtime"
|
|
|
|
maintainer="davehome <davehome@redthumb.info.tm>"
|
|
|
|
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."
|
|
|
|
|
2011-07-20 00:31:13 +00:00
|
|
|
if [ "${xbps_machine}" = "x86_64" ]; then
|
|
|
|
Add_dependency build gcc-multilib
|
|
|
|
fi
|
2011-07-18 23:44:59 +00:00
|
|
|
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
|
2011-07-21 09:52:56 +00:00
|
|
|
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
2011-07-18 23:44:59 +00:00
|
|
|
_multilib_args="--enable-lib32 --disable-lib64"
|
|
|
|
fi
|
|
|
|
|
2011-07-19 08:35:13 +00:00
|
|
|
strip_cmd=${_mingwprefix}/bin/${_mingwtriplet}-strip
|
2011-07-18 23:44:59 +00:00
|
|
|
|
2011-07-20 22:38:06 +00:00
|
|
|
wrksrc=${_shortname}-v${_majversion}-${_snapshot}
|
|
|
|
build_wrksrc=${pkgname}
|
|
|
|
|
2011-07-18 23:44:59 +00:00
|
|
|
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"
|
|
|
|
|
2011-07-20 22:38:06 +00:00
|
|
|
./configure --prefix=${_mingwprefix} --with-sysroot=${_mingwprefix} \
|
|
|
|
--host=${_mingwtriplet} ${_multilib_args} \
|
|
|
|
--bindir=${_mingwprefix}/bin --libdir=${_mingwprefix}/lib \
|
|
|
|
--libexecdir=${_mingwprefix}/lib
|
2011-07-18 23:44:59 +00:00
|
|
|
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
export PATH=$SAVEDPATH
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install()
|
|
|
|
{
|
2011-07-19 08:35:13 +00:00
|
|
|
# This path setting is necessary so that it finds ${_mingwprefix}-ranlib
|
|
|
|
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"
|
|
|
|
|
2011-07-20 22:38:06 +00:00
|
|
|
make DESTDIR=${DESTDIR} install
|
2011-07-19 08:35:13 +00:00
|
|
|
|
|
|
|
export PATH=$SAVEDPATH
|
2011-07-18 23:44:59 +00:00
|
|
|
}
|