2008-08-02 22:55:24 +02:00
|
|
|
# Copyright 1999-2008 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
inherit eutils flag-o-matic toolchain-funcs
|
|
|
|
|
|
|
|
RESTRICT="strip"
|
|
|
|
|
|
|
|
DESCRIPTION="IRTrans Server"
|
|
|
|
HOMEPAGE="http://www.irtrans.de"
|
|
|
|
SRC_URI="http://ftp.mars.arge.at/irtrans/irclient-src-${PV}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="BSD"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~x86 ~amd64 ~arm"
|
|
|
|
IUSE=""
|
|
|
|
|
|
|
|
DEPEND="virtual/libc"
|
|
|
|
|
2008-08-06 22:47:08 +02:00
|
|
|
src_unpack() {
|
2008-08-06 22:48:03 +02:00
|
|
|
unpack ${A}
|
|
|
|
cd "${WORKDIR}"
|
2008-08-06 22:47:08 +02:00
|
|
|
|
2008-08-06 22:48:03 +02:00
|
|
|
epatch "${FILESDIR}/${PN}"-5.11.04-ip_assign-1.patch
|
2008-08-06 22:47:08 +02:00
|
|
|
}
|
|
|
|
|
2008-08-02 22:55:24 +02:00
|
|
|
src_compile() {
|
|
|
|
|
|
|
|
append-flags -DLINUX
|
|
|
|
|
|
|
|
# Set sane defaults (arm target has no -D flags added)
|
|
|
|
irbuild=irclient_arm
|
|
|
|
irclient=irclient
|
2008-08-06 22:47:08 +02:00
|
|
|
ipbuild=ip_assign_arm
|
|
|
|
ip_assign=ip_assign
|
2008-08-02 22:55:24 +02:00
|
|
|
|
|
|
|
# change variable by need
|
|
|
|
if use x86 ; then
|
|
|
|
irbuild=irclient
|
2008-08-06 22:47:08 +02:00
|
|
|
ipbuild=ip_assign
|
2008-08-02 22:55:24 +02:00
|
|
|
elif use amd64 ; then
|
|
|
|
irbuild=irclient64
|
|
|
|
irclient=irclient64
|
2008-08-06 22:47:08 +02:00
|
|
|
ipbuild=ip_assign64
|
|
|
|
ip_assign=ip_assign64
|
2008-08-02 22:55:24 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Some output for bugreport
|
|
|
|
einfo "CFLAGS=\"${CFLAGS}\""
|
2008-08-06 22:47:08 +02:00
|
|
|
einfo "Build client Target=\"${irbuild}\""
|
2008-08-06 23:00:58 +02:00
|
|
|
einfo "Build client Binary=\"${irclient}\""
|
2008-08-06 22:47:08 +02:00
|
|
|
einfo "Build ip_assign Target=\"${ipbuild}\""
|
|
|
|
einfo "Build ip_assign Binary=\"${ip_assign}\""
|
2008-08-02 22:55:24 +02:00
|
|
|
|
|
|
|
# Build
|
|
|
|
emake CXX="$(tc-getCXX)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" "${irbuild}" || die "emake irclient failed"
|
2008-08-06 22:47:08 +02:00
|
|
|
emake CXX="$(tc-getCXX)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" "${ipbuild}" || die "emake ip_assign failed"
|
2008-08-02 22:55:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
|
|
|
|
newbin "${WORKDIR}/${irclient}" irclient
|
2008-08-06 22:47:08 +02:00
|
|
|
newbin "${WORKDIR}/${ip_assign}" ip_assign
|
2008-08-02 22:55:24 +02:00
|
|
|
}
|