# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # Installation README: # http://developers.sun.com/sunstudio/downloads/tarfile_info.html inherit versionator MY_PN="SunStudio" MY_TAG="-ii" PV_VER=$(get_version_component_range 1 ${PV}) PV_DATE=$(get_version_component_range 2 ${PV}) # Can't figure out how to make this generic to pre, p, rc, etc.. PV_DATE=${PV_DATE#p} MY_P="${MY_PN}${PV_VER}ml-linux-x86-${PV_DATE}${MY_TAG}" DESCRIPTION="Sun Studio Compilers for Linux" HOMEPAGE="http://developers.sun.com/sunstudio/downloads/index.jsp" RESTRICT="fetch" SRC_URI="${MY_P}.tar.bz2" # Change to the actual license if adding to the tree LICENSE="as-is" SLOT="0" KEYWORDS="-* ~amd64 ~x86" IUSE="" # dev-util/netbeans-cnd is in java-overlay, but doesn't seem to work RDEPEND="!amd64? ( virtual/libstdc++ ) amd64? ( app-emulation/emul-linux-x86-compat ) sys-libs/zlib =virtual/jre-1.5* =dev-util/netbeans-5.5*" DEPEND="" S="${WORKDIR}" pkg_nofetch() { einfo "Go to ${HOMEPAGE}" einfo "and download ${SRC_URI}" } pkg_setup() { if ! [ -d "${ROOT}"usr/share/netbeans-5.5/cnd1 ]; then local msg="You must install the C/C++ pack from http://www.netbeans.org/products/cplusplus/ as root" eerror "$msg" die "$msg" fi } src_install() { DIR="/opt/sun/sunstudio12" dodir /opt/sun cp -r sunstudio12 "${D}"/opt/sun/ # Set SUNW_NO_UPDATE_NOTIFY to anything but false to disable writes # to /root/.sunstudio # These writes break the sandbox when building anything with Sun compilers cat << EOF >> ${T}/envd ROOTPATH="${DIR}/bin" PATH="${DIR}/bin" MANPATH="${DIR}/man" SUNW_NO_UPDATE_NOTIFY="true" EOF newenvd ${T}/envd 05${PN} }