blob: b2af32dcb62a5568e5418fcaa78085b4867917e7 [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=4
CROS_WORKON_COMMIT="e8236b4b2d66b1972e4f84955a238134acd7f6a1"
CROS_WORKON_TREE="4cc9406386aa6f68d216263701181d78091b22b8"
CROS_WORKON_PROJECT="chromiumos/third_party/gdmwimax"
inherit cros-workon
DESCRIPTION="GCT GDM7205 WiMAX SDK"
HOMEPAGE="http://www.gctsemi.com/"
LICENSE="BSD"
SLOT="0"
KEYWORDS="*"
IUSE="-asan -clang"
REQUIRED_USE="asan? ( clang )"
RDEPEND="!net-wireless/gdmwimax-private"
DEPEND="${RDEPEND}"
src_configure() {
# Create build configuration file.
cat > .config <<-EOF
CONFIG_DM_INTERFACE=y
CONFIG_DM_NET_DEVICE=eth0
CONFIG_LOG_FILE_BUF_SIZE=0x80000
CONFIG_ENABLE_BW_SWITCHING_FOR_KT=n
CONFIG_ENABLE_SERVICE_FLOW=n
CONFIG_WIMAX2=n
EOF
# Do not fortify source. See crosbug.com/p/10133 for details.
append-flags -U_FORTIFY_SOURCE
tc-export AR CC
clang-setup-env
cros-workon_src_configure
}
src_compile() {
emake -C sdk
emake -C cm
}
src_install() {
# Install SDK library.
dolib sdk/libgdmwimax.a
# Install SDK headers.
insinto /usr/include/gct
doins sdk/{gctapi.h,gcttype.h,WiMaxType.h}
# Install connection manager executable and configuration file.
exeinto /opt/gct
doexe cm/cm
insinto /opt/gct
doins cm/cm.conf
# Install firmware.
insinto /lib/firmware/gdm72xx
doins firmware/gdmuimg.bin
}