void-packages/srcpkgs/mingw-w64-binutils/template
2011-07-15 04:19:21 -06:00

67 lines
2.1 KiB
Text

# Template file for 'mingw-w64-binutils'
pkgname=mingw-w64-binutils
version=2.21.1
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
wrksrc=binutils-$version
_mingwprefix=/opt
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
_mingwtriplet="${xbps_machine}-w32-mingw32"
_target_args="--enable-targets=${_mingwtriplet}"
_multilib_args="--disable-multilib"
fi
do_build()
{
./configure --prefix=${_mingwprefix} --enable-threads \
--target=${_mingwtriplet} ${_target_args} ${_multilib_args} \
--enable-plugins --enable-secureplt --with-mmap --disable-nls \
--exec-prefix=${_mingwprefix}/${_mingwtriplet}
make ${makejobs}
}
do_install()
{
make DESTDIR=${DESTDIR} install
# Remove lib64 directory and it's only file: libiberty.a
rm -rf ${DESTDIR}/${_mingwprefix}/${_mingwtriplet}/lib64
# Remove useless manpages
rm -rf ${DESTDIR}/${_mingwprefix}/share
}