2011-07-15 08:44:38 +00:00
|
|
|
# Template file for 'mingw-w64-binutils'
|
|
|
|
pkgname=mingw-w64-binutils
|
|
|
|
version=2.21.1
|
2011-07-21 09:52:56 +00:00
|
|
|
revision=3
|
2011-07-15 08:44:38 +00:00
|
|
|
distfiles="${GNU_SITE}/binutils/binutils-$version.tar.bz2"
|
2013-04-14 02:24:51 +00:00
|
|
|
hostmakedepends="flex"
|
2011-07-15 08:44:38 +00:00
|
|
|
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."
|
|
|
|
|
2011-07-15 10:19:21 +00:00
|
|
|
wrksrc=binutils-$version
|
|
|
|
|
|
|
|
_mingwprefix=/opt
|
|
|
|
|
2013-04-14 02:24:51 +00:00
|
|
|
do_build() {
|
2011-11-08 10:56:17 +00:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
|
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
2011-07-15 10:35:40 +00:00
|
|
|
_target_args="--enable-targets=${_mingwtriplet},i686-w64-mingw32"
|
|
|
|
_multilib_args="--enable-multilib --enable-64-bit-bfd"
|
|
|
|
else
|
2011-11-08 10:56:17 +00:00
|
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
2011-07-15 10:35:40 +00:00
|
|
|
_target_args="--enable-targets=${_mingwtriplet}"
|
|
|
|
_multilib_args="--disable-multilib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
./configure --prefix=${_mingwprefix} --bindir=${_mingwprefix}/bin \
|
2011-07-20 00:24:32 +00:00
|
|
|
--libdir=${_mingwprefix}/lib --libexecdir=${_mingwprefix}/lib \
|
2011-07-15 10:19:21 +00:00
|
|
|
--target=${_mingwtriplet} ${_target_args} ${_multilib_args} \
|
|
|
|
--enable-plugins --enable-secureplt --with-mmap --disable-nls \
|
2011-07-20 00:24:32 +00:00
|
|
|
--enable-threads --with-sysroot=${_mingwprefix}
|
2011-07-15 08:44:38 +00:00
|
|
|
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
2013-04-14 02:24:51 +00:00
|
|
|
do_install() {
|
2011-07-15 08:44:38 +00:00
|
|
|
make DESTDIR=${DESTDIR} install
|
|
|
|
|
2011-07-15 10:19:21 +00:00
|
|
|
# Remove useless manpages
|
|
|
|
rm -rf ${DESTDIR}/${_mingwprefix}/share
|
2011-07-17 07:16:54 +00:00
|
|
|
|
|
|
|
# Remove lib64 directory and it's only file: libiberty.a
|
|
|
|
[ -d ${DESTDIR}/${_mingwprefix}/lib64 ] && \
|
|
|
|
rm -rf ${DESTDIR}/${_mingwprefix}/lib64
|
|
|
|
|
2011-11-08 10:56:17 +00:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
|
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
2011-07-17 07:16:54 +00:00
|
|
|
else
|
2011-11-08 10:56:17 +00:00
|
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
2011-07-17 07:16:54 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# The mingw-w64 faq advises to create a symlink here
|
2011-11-08 10:56:17 +00:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
2011-07-17 07:16:54 +00:00
|
|
|
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 08:44:38 +00:00
|
|
|
}
|