summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2004-02-08 05:37:38 +0000
committerAron Griffis <agriffis@gentoo.org>2004-02-08 05:37:38 +0000
commite018d484a43cae38563ed5f3ee46ae327bc7be88 (patch)
tree70d89495ce7b13a3e74745fccfb107ebbb5a00fb /dev-lang/ccc
parentppc (diff)
downloadgentoo-2-e018d484a43cae38563ed5f3ee46ae327bc7be88.tar.gz
gentoo-2-e018d484a43cae38563ed5f3ee46ae327bc7be88.tar.bz2
gentoo-2-e018d484a43cae38563ed5f3ee46ae327bc7be88.zip
Add patch to sort gcc-lib include paths last. Thanks to Marc Giger for figuring this out
Diffstat (limited to 'dev-lang/ccc')
-rw-r--r--dev-lang/ccc/ChangeLog9
-rw-r--r--dev-lang/ccc/Manifest8
-rw-r--r--dev-lang/ccc/ccc-6.5.9.001-r2.ebuild224
-rw-r--r--dev-lang/ccc/files/create-comp-config.patch21
-rw-r--r--dev-lang/ccc/files/digest-ccc-6.5.9.001 (renamed from dev-lang/ccc/files/digest-ccc-6.5.9.001-r1)0
-rw-r--r--dev-lang/ccc/files/digest-ccc-6.5.9.001-r21
6 files changed, 259 insertions, 4 deletions
diff --git a/dev-lang/ccc/ChangeLog b/dev-lang/ccc/ChangeLog
index 000c27494448..dac918f383ec 100644
--- a/dev-lang/ccc/ChangeLog
+++ b/dev-lang/ccc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-lang/ccc
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ccc/ChangeLog,v 1.5 2004/02/07 02:27:36 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ccc/ChangeLog,v 1.6 2004/02/08 05:37:38 agriffis Exp $
+
+*ccc-6.5.9.001-r2 (08 Feb 2004)
+
+ 08 Feb 2004; Aron Griffis <agriffis@gentoo.org> ccc-6.5.9.001-r2.ebuild,
+ files/create-comp-config.patch:
+ Add patch to sort gcc-lib include paths last. Thanks to Marc Giger for
+ figuring this out
*ccc-6.5.9.001-r1 (06 Feb 2004)
diff --git a/dev-lang/ccc/Manifest b/dev-lang/ccc/Manifest
index 8e0756e41ab3..3e6e3b10e096 100644
--- a/dev-lang/ccc/Manifest
+++ b/dev-lang/ccc/Manifest
@@ -1,7 +1,9 @@
-MD5 cd19ce9c30d26c54b9b415367c2cb31e ChangeLog 1120
+MD5 fbeb699665383ae677b1a484bcfc353e ChangeLog 1356
MD5 25b3e588e0dc36d835538324da158266 ccc-6.5.6.002.ebuild 5028
MD5 091d23a4c0875c38225effcdc1c668a8 metadata.xml 1506
-MD5 7efd0178ad1536ddf3d6f0b34fa8bab8 ccc-6.5.9.001-r1.ebuild 6801
MD5 01baad62ac9cc4fbb51cbbdd14328ab3 ccc-6.5.9.001.ebuild 5922
-MD5 6522dec4654d037ce4a5a1e8987807b1 files/digest-ccc-6.5.9.001-r1 77
+MD5 cdf2ff2bf8e73e4217d2c274929a099c ccc-6.5.9.001-r2.ebuild 6963
+MD5 6522dec4654d037ce4a5a1e8987807b1 files/digest-ccc-6.5.9.001 77
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-ccc-6.5.6.002 0
+MD5 30ceacf36e8d8764f23f73153a5f38d8 files/create-comp-config.patch 866
+MD5 6522dec4654d037ce4a5a1e8987807b1 files/digest-ccc-6.5.9.001-r2 77
diff --git a/dev-lang/ccc/ccc-6.5.9.001-r2.ebuild b/dev-lang/ccc/ccc-6.5.9.001-r2.ebuild
new file mode 100644
index 000000000000..432d832ee9ab
--- /dev/null
+++ b/dev-lang/ccc/ccc-6.5.9.001-r2.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ccc/ccc-6.5.9.001-r2.ebuild,v 1.1 2004/02/08 05:37:38 agriffis Exp $
+#
+# Ebuild contributed by Tavis Ormandy <taviso@sdf.lonestar.org>
+# and edited by Aron Griffis <agriffis@gentoo.org>
+
+inherit eutils
+
+IUSE="doc"
+
+DESCRIPTION="Compaq's enhanced C compiler for the ALPHA platform"
+HOMEPAGE="http://www.support.compaq.com/alpha-tools"
+
+# its okay to set a SRC_URI here, 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.crypt"
+
+S=${WORKDIR}
+LICENSE="PLDSPv2"
+SLOT="0"
+# NOTE: ALPHA Only!
+KEYWORDS="-* alpha"
+
+RDEPEND="virtual/glibc
+ dev-libs/libots
+ >=dev-libs/libcpml-5.2.01-r2"
+
+DEPEND="${RDEPEND}
+ sys-devel/gcc-config
+ app-arch/rpm2targz
+ >=sys-apps/sed-4
+ app-crypt/gnupg
+ >=app-shells/bash-2.05b
+ >=dev-libs/libcpml-5.2.01-r2
+ "
+
+# These variables are not used by Portage, but is used 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"
+
+ if [ -z ${CCC_LICENSE_KEY} ]; then
+ eerror ""
+ eerror "You have not set the environment variable"
+ eerror "\$CCC_LICENSE_KEY, this should be set to"
+ eerror "the password you were sent when you applied"
+ eerror "for your alpha-tools enthusiast/educational"
+ eerror "license."
+ eerror "If you do not have a license key, apply for one"
+ eerror "here ${ee_license_reg}"
+ eerror ""
+ die "no license key in \$CCC_LICENSE_KEY"
+ fi
+
+ # :-NULL safeguards against bash bug.
+ einfo "Decrypting ccc distribution..."
+ gpg --quiet \
+ --homedir=${T} --no-permission-warning \
+ --no-mdc-warning \
+ --passphrase-fd 0 \
+ --output ${ccc_rpm} \
+ --decrypt ${DISTDIR}/${ccc_rpm}.crypt \
+ <<< ${CCC_LICENSE_KEY:-NULL}
+
+ ebegin "Unpacking ccc distribution..."
+ # This is the same as using rpm2targz then extracting 'cept that
+ # it's faster, less work, and less hard disk space. rpmoffset is
+ # provided by the rpm2targz package.
+ i=${ccc_rpm}
+ dd ibs=`rpmoffset < ${i}` skip=1 if=$i 2>/dev/null \
+ | gzip -dc | cpio -idmu 2>/dev/null \
+ && find usr -type d -print0 | xargs -0 chmod a+rx
+ eend ${?}
+ assert "Failed to extract ${ccc_rpm%.rpm}.tar.gz"
+
+ # patch up config script to sort gcc-lib paths last. Thanks to
+ # Marc Giger for sorting this out
+ epatch ${FILESDIR}/create-comp-config.patch
+
+ # remove unwanted documentation
+ if ! use doc >/dev/null; then
+ einfo "Removing unwanted documentation (USE=\"-doc\")..."
+ rm -rf usr/doc
+ fi
+
+# Moved the following step to pkg_config
+# (06 Feb 2004 agriffis)
+#
+# # fix up lib paths - bug #15719, comment 6
+# einfo "Copying crtbegin/crtend from gcc..."
+# 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
+# cp -f ${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
+
+# Removed the following step in favor of create-comp-config.sh in pkg_config
+# (06 Feb 2004 agriffis)
+#
+# # add gcc-lib path to ccc's search path
+# # check man ccc for file format info.
+# einfo "Configuring ccc to observe gcc library path and include paths..."
+# printf '%s %s %s\n' \
+# "-L${gcc_libs_path}" \
+# " -SysIncDir /usr/lib/compaq/ccc-${ccc_release}/alpha-linux/include" \
+# " -SysIncDir /usr/include/linux" \
+# > usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/comp.config
+# einfo "Additional paths can be set by users using \$DEC_CC variable."
+
+ # 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 >/dev/null; 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 " ebuild /var/db/pkg/dev-lang/${PF}/${PF}.ebuild config" >&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"
+ echo '<------- Begin ccc configuration output ------->'
+ # 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 '<------- End ccc configuration output ------->'
+ echo
+
+ einfo "ccc has been configured, you can now use it as usual."
+}
+
+pkg_postinst () {
+ echo
+ einfo "ccc has been merged successfully, the EULA"
+ einfo "is available in"
+ einfo
+ einfo "/usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/LICENSE.txt"
+ einfo
+ if use doc >/dev/null; then
+ einfo "You can also view the compiler documentation"
+ einfo "in /usr/share/doc/ccc-${PV}"
+ fi
+
+ echo
+ einfo "Hopefullly soon we will get a ccc USE flag"
+ einfo "on packages (or at least individual "
+ einfo "components) that can be successfully built"
+ einfo "using this compiler, until then you will "
+ einfo "just have to experiment :) "
+ einfo
+ einfo "Please report successes/failures with ccc "
+ einfo "to http://bugs.gentoo.org so that the USE "
+ einfo "flags can be updated. "
+ einfo
+
+ echo
+ ewarn
+ ewarn "You _MUST_ now run:"
+ ewarn "ebuild /var/db/pkg/dev-lang/${PF}/${PF}.ebuild config"
+ ewarn "to complete the installation"
+ ewarn
+
+ echo
+}
diff --git a/dev-lang/ccc/files/create-comp-config.patch b/dev-lang/ccc/files/create-comp-config.patch
new file mode 100644
index 000000000000..a2f7d2e713b2
--- /dev/null
+++ b/dev-lang/ccc/files/create-comp-config.patch
@@ -0,0 +1,21 @@
+--- usr/lib/compaq/ccc-6.5.9.001-6/alpha-linux/bin/create-comp-config.sh.old 2004-02-08 00:28:25.000000000 -0500
++++ usr/lib/compaq/ccc-6.5.9.001-6/alpha-linux/bin/create-comp-config.sh 2004-02-08 00:28:00.000000000 -0500
+@@ -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/ccc/files/digest-ccc-6.5.9.001-r1 b/dev-lang/ccc/files/digest-ccc-6.5.9.001
index 8e917a78390d..8e917a78390d 100644
--- a/dev-lang/ccc/files/digest-ccc-6.5.9.001-r1
+++ b/dev-lang/ccc/files/digest-ccc-6.5.9.001
diff --git a/dev-lang/ccc/files/digest-ccc-6.5.9.001-r2 b/dev-lang/ccc/files/digest-ccc-6.5.9.001-r2
new file mode 100644
index 000000000000..8e917a78390d
--- /dev/null
+++ b/dev-lang/ccc/files/digest-ccc-6.5.9.001-r2
@@ -0,0 +1 @@
+MD5 446e0c53fcc135b30ccf9e6af5031c18 ccc-6.5.9.001-6.alpha.rpm.crypt 7128419