summaryrefslogtreecommitdiff
path: root/dev-lang/ccc/ccc-6.5.9.001.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/ccc/ccc-6.5.9.001.ebuild')
-rw-r--r--dev-lang/ccc/ccc-6.5.9.001.ebuild63
1 files changed, 24 insertions, 39 deletions
diff --git a/dev-lang/ccc/ccc-6.5.9.001.ebuild b/dev-lang/ccc/ccc-6.5.9.001.ebuild
index f2bad69..eb53878 100644
--- a/dev-lang/ccc/ccc-6.5.9.001.ebuild
+++ b/dev-lang/ccc/ccc-6.5.9.001.ebuild
@@ -26,6 +26,7 @@ RDEPEND="virtual/libc
DEPEND="${RDEPEND}
sys-devel/gcc-config
+ app-arch/rpm2targz
>=sys-apps/sed-4
>=app-shells/bash-2.05b"
@@ -35,17 +36,19 @@ src_unpack() {
# convert rpm into tar archive
local ccc_rpm="ccc-${ccc_release}.alpha.rpm"
- ebegin "Unpacking ccc distribution..."
rpm_src_unpack ${ccc_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; then
+ if ! use doc > /dev/null; then
einfo "Removing unwanted documentation (USE=\"-doc\")..."
rm -rf usr/doc
fi
@@ -61,38 +64,29 @@ src_unpack() {
mkdir usr/share
mv usr/lib/compaq/ccc-${ccc_release}/alpha-linux/man usr/share
- if use doc; then
+ 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
+ # prep docs
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 "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
+
+ # 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
@@ -104,26 +98,20 @@ pkg_config () {
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
+ # 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_releasei%*-1}/alpha-linux/include" \
+# " -SysIncDir /usr/include/linux" \
+# > /usr/lib/compaq/ccc-${ccc_release%*-1}/alpha-linux/bin/comp.config
+# einfo "Additional paths can be set by users using \$DEC_CCC variable."
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
@@ -134,12 +122,9 @@ pkg_postinst () {
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
}