diff options
author | Matt Turner <mattst88@gmail.com> | 2008-04-13 21:04:19 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2008-04-13 21:04:19 +0000 |
commit | 44b292b8e830e64745692aed5dc10ddfd0ff6899 (patch) | |
tree | f6cdb7dd93d7a488df2164bab3e64cd6f2a5497a /dev-lang |
Initial Import of libcpml and ccc ebuilds
git-svn-id: svn://mattst88.com/svn/compaq-c-overlay@1 8c41e67f-757b-4206-be13-12d8f16ad5be
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ccc/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/ccc/ccc-6.5.9.001.ebuild | 151 | ||||
-rw-r--r-- | dev-lang/ccc/files/update-config.patch | 83 |
3 files changed, 237 insertions, 0 deletions
diff --git a/dev-lang/ccc/Manifest b/dev-lang/ccc/Manifest new file mode 100644 index 0000000..68d4984 --- /dev/null +++ b/dev-lang/ccc/Manifest @@ -0,0 +1,3 @@ +AUX update-config.patch 2672 RMD160 69246210a1e0b61854fc42de2572597c1ca5d213 SHA1 d8e6646453653c4bd29a3bd56799a318cd559d00 SHA256 ca3419bbf7a93176cb2c97dc66a5f57d261735b484ec4299e47a1a332ac85b98 +DIST ccc-6.5.9.001-6.alpha.rpm 7160915 RMD160 3a03914049ca21f4dc030661eafa28aa6015aa34 SHA1 e8a80726d50477e028a382360311e6f0ac8b4e25 SHA256 019aa8d24cf1d70a63851847824cd6afe7aabfaf8f00daba7ee7eb8645fa6ace +EBUILD ccc-6.5.9.001.ebuild 4141 RMD160 b80846b29854b8f1674ff7327ebf074c9a0bc0e5 SHA1 e64ecc53e42ec10f2d54c904c89e255b7e824102 SHA256 6c4c5f9c2a797090547332f95644c27e82333b248024962ce73be0629b9b9a00 diff --git a/dev-lang/ccc/ccc-6.5.9.001.ebuild b/dev-lang/ccc/ccc-6.5.9.001.ebuild new file mode 100644 index 0000000..5a5a8cf --- /dev/null +++ b/dev-lang/ccc/ccc-6.5.9.001.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ccc/ccc-6.5.9.001-r3.ebuild,v 1.7 2007/07/02 14:39:33 peper 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 enhanced C compiler for the ALPHA platform" +HOMEPAGE="http://www.support.compaq.com/alpha-tools" + +# no need to add fetch restrictions, as the rpm is gpg encrypted +# and user must agree to the license before getting access +SRC_URI="ftp://ftp.compaq.com/pub/products/linuxdevtools/latest/crypt/ccc-6.5.9.001-6.alpha.rpm" + +S=${WORKDIR} +LICENSE="PLDSPv2" +SLOT="0" +KEYWORDS="-* alpha" + +RDEPEND="virtual/libc + dev-libs/libots + >=dev-libs/libcpml-5.2.01" + +DEPEND="${RDEPEND} + sys-devel/gcc-config + >=sys-apps/sed-4 + >=app-shells/bash-2.05b" + +RESTRICT="strip" + +# These variables are not used by Portage, but by the functions +# below. +ccc_release="${PV}-6" +ee_license_reg="http://h18000.www1.hp.com/products/software/alpha-tools/ee-license.html" + +src_unpack() { + # convert rpm into tar archive + local ccc_rpm="ccc-${ccc_release}.alpha.rpm" + + ebegin "Unpacking ccc distribution..." + rpm_src_unpack ${ccc_rpm} + + 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}/update-config.patch + + # remove unwanted documentation + if ! use doc; 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/ccc-${ccc_release}/alpha-linux/bin/create-comp-config.sh + + # man pages are in the wrong place + einfo "Reorganising man structure..." + rm -rf usr/man + mkdir usr/share + mv usr/lib/compaq/ccc-${ccc_release}/alpha-linux/man usr/share + + if use doc; then + einfo "Reorganising documentation..." + mv usr/doc usr/share + fi +} + +src_compile() { + true # nothing to compile +} + +src_install() { + # move files over + mv usr ${D} || die "ccc installation failed" + + # prep manpages + prepman ${D}/usr/share/man/man1/ccc.1 + prepman ${D}/usr/share/man/man8/protect_headers_setup.8 + prepalldocs + + # install ccc proxy until config is executed + mv ${D}/usr/bin/ccc{,.real} + cat >${D}/usr/bin/ccc <<EOF +#!/bin/sh +echo "Error: ccc must be configured before compiling!" >&2 +echo "The system administrator must run the following command:" >&2 +echo " emerge --config =${CATEGORY}/${PF}" >&2 +exit 1 +EOF + chmod 0755 ${D}/usr/bin/ccc +} + +pkg_config () { + 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/ccc-${ccc_release}/alpha-linux/bin/crt{begin,end}.o + cp ${gcc_libs_path}/crt{begin,end}.o \ + /usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin + assert "Failed to copy crtbegin/crtend.o from ${gcc_libs_path}" + fi + + # Need the real ccc prior to configuration + if [[ -f /usr/bin/ccc.real ]]; then + einfo "Moving ccc.real into place" + rm -f /usr/bin/ccc + mv /usr/bin/ccc.real /usr/bin/ccc + assert "failed to rename ccc.real" + fi + + einfo "Attempting configuration of ccc" + # NOTE: _must_ hide distcc, ccache, etc during this step + PATH=/bin:/usr/bin:/sbin:/usr/sbin \ + /usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/create-comp-config.sh \ + ccc-${ccc_release} ${gcc_libs_path} + echo + + einfo "ccc has been configured, you can now use it as usual." +} + +pkg_postinst () { + echo + elog "ccc has been merged successfully, the EULA" + elog "is available in" + elog + elog "/usr/lib/compaq/ccc-${ccc_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/ccc-${PV}" + fi + + echo + ewarn + ewarn "You _MUST_ now run:" + ewarn "emerge --config =${CATEGORY}/${PF}" + ewarn "to complete the installation" + ewarn + + echo +} diff --git a/dev-lang/ccc/files/update-config.patch b/dev-lang/ccc/files/update-config.patch new file mode 100644 index 0000000..6733307 --- /dev/null +++ b/dev-lang/ccc/files/update-config.patch @@ -0,0 +1,83 @@ +diff -u old/create-comp-config.sh new/create-comp-config.sh +--- old/create-comp-config.sh 2008-04-13 16:27:32.000000000 -0400 ++++ new/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 -u old/probe_linux.sh new/probe_linux.sh +--- old/probe_linux.sh 2008-04-13 16:27:32.000000000 -0400 ++++ new/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 |