# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit eutils waf-utils git-r3 DESCRIPTION="winexe remotely executes commands on WindowsNT/2000/XP/2003 systems" HOMEPAGE="http://sourceforge.net/projects/winexe" EGIT_REPO_URI="git://git.code.sf.net/p/winexe/winexe-waf" LICENSE="GPL-3" SLOT="0" KEYWORDS="" IUSE="" DEPEND=">=net-fs/samba-4 dev-libs/popt" RDEPEND="${DEPEND}" S="${S}/source" pkg_pretend () { # From source/wscript # AR32 = ['i386', 'i586', 'i686'] # AR64 = ['x86_64', 'amd64'] # TC = ['mingw32', 'mingw32msvc', 'w64-mingw32'] MINGW32_VARIANT=( i{3,5,6}86-{w64-,}mingw32 ) MINGW64_VARIANT=( x86_64-{w64-,}mingw32 ) local tc for tc in ${MINGW32_VARIANT[@]} ; do if type -p "${tc}-gcc" > /dev/null ; then MINGW32_CC="${tc}" break fi done for tc in ${MINGW64_VARIANT[@]} ; do if type -p "${tc}-gcc" > /dev/null ; then MINGW64_CC="${tc}" break fi done if [[ -z "${MINGW32_CC}" || -z "${MINGW64_CC}" ]] ; then eerror "Before you could emerge ${PN}, you need to install mingw" eerror "Run the following commands:" eerror " emerge crossdev" eerror " crossdev --stable --libc '[latest]' -t i686-w64-mingw32" eerror " crossdev --stable --libc '[latest]' -t x86_64-w64-mingw32" die "mingw environnement not available" fi return 0 } src_prepare () { epatch "${FILESDIR}/${PV}-BUG-MEDIUM-Fix-NT_STATUS_SERVICE_DOES_NOT_EXIST-defi.patch" } src_configure () { NO_WAF_LIBDIR=yes \ waf-utils_src_configure \ --samba-inc-dirs="${EROOT}usr/include/samba-4.0" \ --samba-lib-dirs="${EROOT}usr/$(get_libdir)/samba" } src_install () { waf-utils_src_install dodoc ../README }