2011-07-15 10:44:38 +02:00
|
|
|
# Template file for 'mingw-w64-binutils'
|
|
|
|
pkgname=mingw-w64-binutils
|
|
|
|
version=2.21.1
|
2011-07-21 11:52:56 +02:00
|
|
|
revision=3
|
2011-07-15 10:44:38 +02:00
|
|
|
distfiles="${GNU_SITE}/binutils/binutils-$version.tar.bz2"
|
|
|
|
build_style=custom-install
|
|
|
|
short_desc="GNU binary utilities (mingw-w64 version)"
|
|
|
|
maintainer="davehome <davehome@redthumb.info.tm>"
|
|
|
|
homepage="http://www.gnu.org/software/binutils/"
|
|
|
|
license="GPL-3"
|
|
|
|
checksum=f769b64350a02fbee009e1582cc12b6ed43b41985de65effb741e258e075dd05
|
|
|
|
long_desc="
|
|
|
|
The GNU binutils package contains essential tools to assemble, link and
|
|
|
|
manipulate binary and object files. They are often used with a compiler
|
|
|
|
and additional libraries for building software.
|
|
|
|
|
|
|
|
It includes the GNU linker, the portable GNU assembler, ar for modifying
|
|
|
|
archives (such as libraries), nm for listing symbols from object files,
|
|
|
|
objdump for displaying object file information, ranlib for generating
|
|
|
|
archive indexes, size for listing section sizes of object files,
|
|
|
|
strings for outputing the printable characters in files, strip for
|
|
|
|
stripping out symbols (like debugging information) from object files,
|
|
|
|
and other tools.
|
|
|
|
|
|
|
|
* This is a special version for mingw-w64."
|
|
|
|
|
|
|
|
Add_dependency run glibc
|
|
|
|
Add_dependency run zlib
|
|
|
|
|
|
|
|
Add_dependency build sed
|
|
|
|
Add_dependency build gawk
|
|
|
|
Add_dependency build flex
|
|
|
|
Add_dependency build coreutils
|
2011-07-15 12:19:21 +02:00
|
|
|
|
|
|
|
wrksrc=binutils-$version
|
|
|
|
|
|
|
|
_mingwprefix=/opt
|
|
|
|
|
2011-07-15 10:44:38 +02:00
|
|
|
do_build()
|
|
|
|
{
|
2011-07-15 12:35:40 +02:00
|
|
|
if [ "${xbps_machine}" = "x86_64" ]; then
|
|
|
|
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
|
|
|
_target_args="--enable-targets=${_mingwtriplet},i686-w64-mingw32"
|
|
|
|
_multilib_args="--enable-multilib --enable-64-bit-bfd"
|
|
|
|
else
|
2011-07-21 11:52:56 +02:00
|
|
|
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
2011-07-15 12:35:40 +02:00
|
|
|
_target_args="--enable-targets=${_mingwtriplet}"
|
|
|
|
_multilib_args="--disable-multilib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
./configure --prefix=${_mingwprefix} --bindir=${_mingwprefix}/bin \
|
2011-07-20 02:24:32 +02:00
|
|
|
--libdir=${_mingwprefix}/lib --libexecdir=${_mingwprefix}/lib \
|
2011-07-15 12:19:21 +02:00
|
|
|
--target=${_mingwtriplet} ${_target_args} ${_multilib_args} \
|
|
|
|
--enable-plugins --enable-secureplt --with-mmap --disable-nls \
|
2011-07-20 02:24:32 +02:00
|
|
|
--enable-threads --with-sysroot=${_mingwprefix}
|
2011-07-15 10:44:38 +02:00
|
|
|
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install()
|
|
|
|
{
|
|
|
|
make DESTDIR=${DESTDIR} install
|
|
|
|
|
2011-07-15 12:19:21 +02:00
|
|
|
# Remove useless manpages
|
|
|
|
rm -rf ${DESTDIR}/${_mingwprefix}/share
|
2011-07-17 09:16:54 +02:00
|
|
|
|
|
|
|
# Remove lib64 directory and it's only file: libiberty.a
|
|
|
|
[ -d ${DESTDIR}/${_mingwprefix}/lib64 ] && \
|
|
|
|
rm -rf ${DESTDIR}/${_mingwprefix}/lib64
|
|
|
|
|
|
|
|
if [ "${xbps_machine}" = "x86_64" ]; then
|
|
|
|
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
|
|
|
else
|
2011-07-21 11:52:56 +02:00
|
|
|
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
2011-07-17 09:16:54 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# The mingw-w64 faq advises to create a symlink here
|
|
|
|
if [ "${xbps_machine}" = "x86_64" ]; then
|
|
|
|
cd ${DESTDIR}/${_mingwprefix}/${_mingwtriplet} && \
|
|
|
|
ln -sf lib lib64
|
|
|
|
fi
|
|
|
|
|
|
|
|
# The mingw-w64 faq advises to create a symlink here
|
|
|
|
cd ${DESTDIR}/${_mingwprefix} && ln -sf ${_mingwtriplet} mingw
|
2011-07-15 10:44:38 +02:00
|
|
|
}
|