# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ X86_DIST="cplex112.x86linux_1.tar.gz" AMD64_DIST="cplex112.x64linux_1.tar.gz" inherit eutils java-pkg-opt-2 DESCRIPTION="ILOG CPLEX delivers high-performance optimization software for solving linear, MIP and MIQP problems." HOMEPAGE="http://www.ilog.com/products/cplex/" SRC_URI="x86? ( ${X86_DIST} ) amd64? ( ${AMD64_DIST} )" LICENSE="" SLOT="0" KEYWORDS="-* ~amd64 ~x86" IUSE="java" RESTRICT="fetch strip" DEPEND="java? ( >=virtual/jre-1.4 )" RDEPAEND="java? ( >=virtual/jre-1.4 )" S="${WORKDIR}/cplex112" pkg_nofetch() { einfo "Due to license restrictions, we cannot redistribute or fetch the distfiles" } src_install() { local BUILD_DIR="" if use x86; then BUILD_DIR="x86_debian4.0_4.1" elif use amd64; then BUILD_DIR="x86-64_debian4.0_4.1" fi dobin "bin/${BUILD_DIR}/cplex" dolib "bin/${BUILD_DIR}/libcplex112.so" dolib "lib/${BUILD_DIR}/static_pic/"{libcplex.a,libilocplex.a} dodir "/etc/ilog" doenvd "${FILESDIR}/99cplex" if use java; then java-pkg_dojar "lib/cplex.jar" fi } pkg_postinst() { elog "Note that you must request a license key from ILOG before cplex will" elog "work properly. Academic license can be requested here:" elog elog "http://www.ilog.com/products/optimization/academic/order.cfm" elog elog "Once received, place license file access.ilm into /etc/ilog" }