5a2cc5b5bd
- The chroot target now execs masterdir/bin/xbps-shell to set up correct envvars. - 2 pkgs are now in nonfree repo: adobe-flash-plugin and jre. - Renamed some vars in xbps-src to be in uppercase, notably XBPS_MACHINE. - make-repoidx target now creates the index for all "known" directories specified via XBPS_PACKAGESDIR: XBPS_MACHINE, noarch, and nonfree/XBPS_MACHINE.
92 lines
2.9 KiB
Text
92 lines
2.9 KiB
Text
# Template build file for 'mingw-w64-gcc'
|
|
#
|
|
pkgname=mingw-w64-gcc
|
|
_majorver=4.6
|
|
version=${_majorver}.1
|
|
revision=5
|
|
distfiles=http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2
|
|
short_desc="The GNU C Compiler (for mingw-w64)"
|
|
maintainer="davehome <davehome@redthumb.info.tm>"
|
|
homepage="http://mingw-w64.sourceforge.net/"
|
|
license="GFDL-1.2, GPL-3, LGPL-2.1"
|
|
checksum=8eebf51c908151d1f1a3756c8899c5e71572e8469a547ad72a1ef16a08a31b59
|
|
long_desc="
|
|
The GNU C Compiler suite, with support for C, C++, ObjC and ObjC++.
|
|
|
|
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 run glibc
|
|
Add_dependency run cloog-ppl
|
|
Add_dependency run ppl
|
|
Add_dependency run gmp
|
|
Add_dependency run mpc
|
|
Add_dependency run mpfr
|
|
Add_dependency run zlib
|
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
|
Add_dependency build gcc-multilib
|
|
fi
|
|
|
|
Add_dependency build flex
|
|
Add_dependency build gawk
|
|
|
|
Add_dependency full mingw-w64-binutils
|
|
Add_dependency full mingw-w64-headers
|
|
|
|
_mingwprefix=/opt
|
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
|
_triplet="${XBPS_MACHINE}-unknown-linux-gnu"
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
|
_multilib_args="--enable-targets=all --enable-multilib"
|
|
_multilib_args="${_multilib_args} --enable-64bit --enable-32bit"
|
|
else
|
|
_triplet="${XBPS_MACHINE}-pc-linux-gnu"
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
|
_multilib_args="--disable-multilib --disable-64bit --enable-32bit"
|
|
fi
|
|
|
|
wrksrc=gcc-${version}
|
|
build_wrksrc=${pkgname}-build
|
|
|
|
pre_configure()
|
|
{
|
|
mkdir -p ${wrksrc}/${build_wrksrc}
|
|
}
|
|
|
|
do_build()
|
|
{
|
|
# As specified in the LFS book, disable installing libiberty.
|
|
sed -i 's/install_to_$(INSTALL_DEST) //' ${wrksrc}/libiberty/Makefile.in
|
|
# Do not run fixincludes
|
|
sed -i 's@\./fixinc\.sh@-c true@' ${wrksrc}/gcc/Makefile.in
|
|
|
|
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"
|
|
|
|
../configure --prefix=${_mingwprefix} --with-sysroot=${_mingwprefix} \
|
|
--bindir=${_mingwprefix}/bin --target=${_mingwtriplet} \
|
|
${_multilib_args} --enable-threads=win32 --disable-win32-registry \
|
|
--enable-version-specific-runtime-libs --enable-__cxa_atexit \
|
|
--enable-languages=c,c++,objc,obj-c++,lto --enable-tls \
|
|
--with-mpfr=$XBPS_MASTERDIR/usr --with-gmp=$XBPS_MASTERDIR/usr \
|
|
--with-ppl=${XBPS_MASTERDIR}/usr --with-cloog=${XBPS_MASTERDIR}/usr \
|
|
--with-system-zlib --enable-static --disable-shared --enable-lto \
|
|
--enable-linker-build-id --enable-gnu-unique-object \
|
|
--enable-checking=release --disable-nls --disable-bootstrap \
|
|
--libdir=${_mingwprefix}/lib --libexecdir=${_mingwprefix}/lib
|
|
|
|
make ${makejobs} all-gcc
|
|
|
|
export PATH=$SAVEDPATH
|
|
}
|
|
|
|
do_install()
|
|
{
|
|
make DESTDIR=${DESTDIR} ${makejobs} install-gcc
|
|
|
|
# Remove useless manpages
|
|
rm -rf ${DESTDIR}/${_mingwprefix}/share
|
|
}
|