void-packages/srcpkgs/mingw-w64-binutils/template
Juan RP 5a2cc5b5bd xbps-src: infrastructure changes required for "nonfree" keyword in tmpls.
- 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.
2011-11-08 11:56:17 +01:00

84 lines
2.6 KiB
Text

# Template file for 'mingw-w64-binutils'
pkgname=mingw-w64-binutils
version=2.21.1
revision=3
distfiles="${GNU_SITE}/binutils/binutils-$version.tar.bz2"
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
do_build()
{
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}-w64-mingw32"
_target_args="--enable-targets=${_mingwtriplet}"
_multilib_args="--disable-multilib"
fi
./configure --prefix=${_mingwprefix} --bindir=${_mingwprefix}/bin \
--libdir=${_mingwprefix}/lib --libexecdir=${_mingwprefix}/lib \
--target=${_mingwtriplet} ${_target_args} ${_multilib_args} \
--enable-plugins --enable-secureplt --with-mmap --disable-nls \
--enable-threads --with-sysroot=${_mingwprefix}
make ${makejobs}
}
do_install()
{
make DESTDIR=${DESTDIR} install
# Remove useless manpages
rm -rf ${DESTDIR}/${_mingwprefix}/share
# 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
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
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
}