summaryrefslogtreecommitdiff
path: root/dev-lang/cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/cxx')
-rw-r--r--dev-lang/cxx/Manifest4
-rw-r--r--dev-lang/cxx/cxx-6.5.9.31.ebuild130
-rw-r--r--dev-lang/cxx/files/create-comp-config.patch46
-rw-r--r--dev-lang/cxx/files/probe_linux.patch37
4 files changed, 217 insertions, 0 deletions
diff --git a/dev-lang/cxx/Manifest b/dev-lang/cxx/Manifest
new file mode 100644
index 0000000..3ec769d
--- /dev/null
+++ b/dev-lang/cxx/Manifest
@@ -0,0 +1,4 @@
+AUX create-comp-config.patch 1773 RMD160 d775c5dd3d0d1c8b7dc994b26ca6d8d0890ff859 SHA1 94c3f5c351577f8869b5299c5f649d9e8673e78c SHA256 6da63f50febc314cc1f0b7b7362ad9548243d5e44b90cf66ab627b7f099867d6
+AUX probe_linux.patch 1069 RMD160 5b02d3bfa325fd643b80b7064e024b026ed700f9 SHA1 871eb3ed764385e43c3f7916dca52f611314b183 SHA256 3206d6e4fd0edf8269e3014240584c47d1762780bac2c0ebcadc7f1798cb11f7
+DIST cxx-6.5.9.31-1.alpha.rpm 10007070 RMD160 b2e4d19481023ff2898c4fa342d375b07c4052d6 SHA1 85251a735bc4a8cae2583e270de4dad7d999c376 SHA256 43719320e7e4eb09812617428fdbd87cba5614a3d844b8040faa7e75e2b8e6b6
+EBUILD cxx-6.5.9.31.ebuild 3747 RMD160 f4288a923431314e6c79cab49e8f0fdfac7df744 SHA1 34a5cf60bafae180d97d43b2d311a65091a852aa SHA256 369ac8f283dc8629da0b33603605e71d929e14c81ec9e4247e5988a0290ea4f3
diff --git a/dev-lang/cxx/cxx-6.5.9.31.ebuild b/dev-lang/cxx/cxx-6.5.9.31.ebuild
new file mode 100644
index 0000000..3ed5b78
--- /dev/null
+++ b/dev-lang/cxx/cxx-6.5.9.31.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/cxx/cxx-6.5.9.31-r1.ebuild,v 1.13 2007/12/23 05:59:39 halcy0n Exp $
+#
+# Ebuild contributed by Tavis Ormandy <taviso@sdf.lonestar.org>
+# and edited by Aron Griffis <agriffis@gentoo.org>
+
+inherit eutils rpm
+
+IUSE="doc"
+
+DESCRIPTION="Compaq's C++ compiler for the Alpha platform"
+HOMEPAGE="ftp://ftp.compaq.com/pub/products/C-Cxx/linux/"
+
+SRC_URI="ftp://ftp.compaq.com/pub/products/linuxdevtools/latest/crypt/cxx-6.5.9.31-1.alpha.rpm"
+
+S=${WORKDIR}
+LICENSE="PLDSPv2"
+SLOT="0"
+KEYWORDS="-* ~alpha"
+RESTRICT="fetch strip nomirror"
+
+RDEPEND="virtual/libc
+ dev-libs/libots
+ >=dev-libs/libcpml-5.2.01
+ dev-lang/ccc"
+DEPEND="${RDEPEND}
+ sys-devel/gcc-config
+ app-arch/rpm2targz
+ >=sys-apps/sed-4
+ >=app-shells/bash-2.05b"
+
+cxx_release="${PV}-1"
+
+src_unpack() {
+ # convert rpm into tar archive
+ local cxx_rpm="cxx-${cxx_release}.alpha.rpm"
+
+ rpm_src_unpack ${cxx_rpm}
+}
+
+src_compile() {
+ find ${S}/usr -type d -exec chmod a+rx {} \;
+
+ # patch up config script to sort gcc-lib paths last. Thanks to
+ # Marc Giger for sorting this out
+ epatch ${FILESDIR}/create-comp-config.patch
+ #epatch ${FILESDIR}/probe_linux.patch
+
+ # remove unwanted documentation
+ if ! use doc > /dev/null; then
+ einfo "Removing unwanted documentation (USE=\"-doc\")..."
+ rm -rf usr/doc
+ fi
+
+ # Patch create-comp-config.sh to work with gcc-3.x
+ # (06 Feb 2004 agriffis)
+ sed -i -e 's/gcc -v -V \$GCC_VER/gcc -V $GCC_VER -v/' \
+ usr/lib/compaq/cxx-${cxx_release%*-1}/alpha-linux/bin/create-comp-config.sh
+
+ # man pages are in the wrong place
+ einfo "Reorganising man structure..."
+ rm -rf usr/man
+
+ mv usr/lib/compaq/cxx-${cxx_release%*-1}/alpha-linux/man usr/share
+
+ if use doc > /dev/null; then
+ einfo "Reorganising documentation..."
+ mv usr/doc usr/share
+ fi
+}
+
+src_install() {
+ # move files over
+ mv usr ${D} || die "cxx installation failed"
+
+ # prep docs
+ prepalldocs
+}
+
+pkg_config () {
+ einfo "Attempting configuration of cxx"
+ # NOTE: _must_ hide distcc, ccache, etc during this step
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin \
+ /usr/lib/compaq/cxx-${cxx_release%*-1}/alpha-linux/bin/create-comp-config.sh \
+ cxx-${cxx_release} ${gcc_libs_path}
+ echo
+
+ # fix up lib paths - bug #15719, comment 6
+ einfo "Copying crtbegin/crtend from gcc"
+ local gcc_libs_path="`gcc-config --get-lib-path`"
+ if [[ $? != 0 || ! -d "${gcc_libs_path}" ]]; then
+ die "gcc-config returned an invalid library path (${gcc_libs_path})"
+ else
+ rm -f /usr/lib/compaq/cxx-${cxx_release%*-1}/alpha-linux/bin/crt{begin,end}.o
+ cp ${gcc_libs_path}/crt{begin,end}.o \
+ /usr/lib/compaq/cxx-${cxx_release%*-1}/alpha-linux/bin
+ assert "Failed to copy crtbegin/crtend.o from ${gcc_libs_path}"
+ fi
+
+ # add gcc-lib path to cxx's search path
+ # check man cxx for file format info.
+# einfo "Configuring cxx to observe gcc library path and include paths"
+# printf '%s %s %s\n' \
+# "-L${gcc_libs_path}" \
+# " -SysIncDir /usr/lib/compaq/cxx-${cxx_releasei%*-1}/alpha-linux/include" \
+# " -SysIncDir /usr/include/linux" \
+# > /usr/lib/compaq/cxx-${cxx_release%*-1}/alpha-linux/bin/comp.config
+# einfo "Additional paths can be set by users using \$DEC_CXX variable."
+
+ einfo "cxx has been configured, you can now use it as usual."
+}
+
+pkg_postinst () {
+ elog "cxx has been merged successfully, the EULA"
+ elog "is available in"
+ elog
+ elog "/usr/lib/compaq/cxx-${cxx_release}/alpha-linux/bin/LICENSE.TXT"
+ elog
+ if use doc >/dev/null; then
+ elog "You can also view the compiler documentation"
+ elog "in /usr/share/doc/cxx-${PV}"
+ fi
+
+ ewarn
+ ewarn "You _MUST_ now run:"
+ ewarn "emerge --config =${CATEGORY}/${PF}"
+ ewarn "to complete the installation"
+ ewarn
+}
diff --git a/dev-lang/cxx/files/create-comp-config.patch b/dev-lang/cxx/files/create-comp-config.patch
new file mode 100644
index 0000000..f7bab56
--- /dev/null
+++ b/dev-lang/cxx/files/create-comp-config.patch
@@ -0,0 +1,46 @@
+diff -u old/create-comp-config.sh new/create-comp-config.sh
+--- usr/lib/compaq/cxx-6.5.9.31/alpha-linux/bin/create-comp-config.sh.old 2008-04-13 16:27:32.000000000 -0400
+--- usr/lib/compaq/cxx-6.5.9.31/alpha-linux/bin/create-comp-config.sh 2008-04-13 16:24:57.000000000 -0400
+@@ -342,10 +342,10 @@
+ fi
+ fi
+
+-if [ ! -r "$GCC_PATH/specs" ]; then
+- echo "Error: Unable to find GCC at $GCC_PATH. GCC must be installed." 1>&2
+- aborting
+-fi
++#if [ ! -r "$GCC_PATH/specs" ]; then
++# echo "Error: Unable to find GCC at $GCC_PATH. GCC must be installed." 1>&2
++# aborting
++#fi
+
+ #
+ # What header and lib dirs should we be using? The ones that the specified
+@@ -354,7 +354,7 @@
+ PGM="int main(int argc, char **argv) {return 0;}"
+ echo "$PGM" > /tmp/${PREFIX}_install$$.c
+ GCC_VER=`basename $GCC_PATH`
+-env -i PATH=$PATH gcc -v -V $GCC_VER /tmp/${PREFIX}_install$$.c \
++env -i PATH=$PATH gcc -V $GCC_VER -v /tmp/${PREFIX}_install$$.c \
+ -o /tmp/${PREFIX}_install$$ > /tmp/${PREFIX}_install$$.log 2>&1 || {
+ cat - /tmp/${PREFIX}_install$$.log <<- EOF 1>&2
+ Error: gcc -V $GCC_VER failed to compile and link "$PGM".
+@@ -364,8 +364,17 @@
+ }
+ #
+ # Get the list of include directories from the list displayed by gcc -v
++# Sort gcc-lib paths last.
+ #
+-USR_DIST_INC=`sed -n -e '1,/^\#include <...>/d' -e '/^End of search list/q' -e '/^/p' /tmp/${PREFIX}_install$$.log`
++USR_DIST_INC=`
++ sed -n \
++ -e '1,/^\#include <...>/d' \
++ -e '/^End of search list/q' \
++ -e '/gcc-lib/!p' /tmp/${PREFIX}_install$$.log;
++ sed -n \
++ -e '1,/^\#include <...>/d' \
++ -e '/^End of search list/q' \
++ -e '/gcc-lib/p' /tmp/${PREFIX}_install$$.log`
+
+ # Get the name of the linker command (ld or collect2), and library directories
+ # by examining the way gcc invoked the linker
diff --git a/dev-lang/cxx/files/probe_linux.patch b/dev-lang/cxx/files/probe_linux.patch
new file mode 100644
index 0000000..9b9b6d6
--- /dev/null
+++ b/dev-lang/cxx/files/probe_linux.patch
@@ -0,0 +1,37 @@
+diff -u old/probe_linux.sh new/probe_linux.sh
+--- usr/lib/compaq/cxx-6.5.9.31/alpha-linux/bin/probe_linux.sh.old 2008-04-13 16:27:32.000000000 -0400
++++ usr/lib/compaq/ccc-6.5.9.31/alpha-linux/bin/probe_linux.sh 2008-04-13 16:24:18.000000000 -0400
+@@ -203,6 +203,8 @@
+ DIST_OS="Linux"
+ if [ -r /etc/kondara-release ]; then
+ DIST_VENDOR="kondara"
++ elif [ -r /etc/gentoo-release ]; then
++ DIST_VENDOR="gentoo"
+ elif [ -r /etc/redhat-release ]; then
+ DIST_VENDOR="rh"
+ elif [ -r /etc/SuSE-release ]; then
+@@ -249,13 +251,7 @@
+
+ probe_gcc()
+ {
+- specs=`gcc -v 2>&1 | sed -n -e 's|^[^/]*\(/[^ ]*/specs\).*$|\1|p'`
+-
+- if [ ! -r $specs ]; then
+- GCC_PATH="Unknown GCC"
+- else
+- GCC_PATH=`dirname $specs`
+- fi
++ GCC_PATH=`gcc-config --get-lib-path`
+ }
+
+ probe_libc()
+@@ -326,7 +322,8 @@
+ # TASO will return "YES", "NO", or "an error string"
+ #
+ TASO="YES"
+-
++TASO="NO"
++return
+ if [ "$DIST_OS" = "Linux" ]; then
+ # Does ld claim to support taso?
+ if [ "`ld --help | grep taso`" = "" ]; then