/[gentoo-x86]/dev-lang/ccc/ccc-6.5.9.001.ebuild
Gentoo

Contents of /dev-lang/ccc/ccc-6.5.9.001.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Thu Dec 27 11:57:36 2007 UTC (11 years, 9 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Remove ccc, cxx, cfal, broken, unfetchable, unsupported by upstream

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ccc/ccc-6.5.9.001.ebuild,v 1.9 2007/01/31 14:22:04 genone Exp $
4 #
5 # Ebuild contributed by Tavis Ormandy <taviso@sdf.lonestar.org>
6 # and edited by Aron Griffis <agriffis@gentoo.org>
7
8 IUSE="doc"
9
10 DESCRIPTION="Compaq's enhanced C compiler for the ALPHA platform"
11 HOMEPAGE="http://www.support.compaq.com/alpha-tools"
12
13 # its okay to set a SRC_URI here, as the rpm is gpg encrypted
14 # and user must agree to the license before getting access
15 SRC_URI="ftp://ftp.compaq.com/pub/products/linuxdevtools/latest/crypt/ccc-6.5.9.001-6.alpha.rpm.crypt"
16
17 S=${WORKDIR}
18 LICENSE="PLDSPv2"
19 SLOT="0"
20 # NOTE: ALPHA Only!
21 KEYWORDS="-* alpha"
22
23 RDEPEND="virtual/libc
24 dev-libs/libots
25 >=dev-libs/libcpml-5.2.01-r2"
26
27 DEPEND="${RDEPEND}
28 sys-devel/gcc-config
29 app-arch/rpm2targz
30 >=sys-apps/sed-4
31 app-crypt/gnupg
32 >=app-shells/bash-2.05b
33 >=dev-libs/libcpml-5.2.01-r2
34 "
35
36 # These variables are not used by Portage, but is used by the functions
37 # below.
38 ccc_release="${PV}-6"
39 ee_license_reg="http://h18000.www1.hp.com/products/software/alpha-tools/ee-license.html"
40
41 src_unpack() {
42 # convert rpm into tar archive
43 local ccc_rpm="ccc-${ccc_release}.alpha.rpm"
44
45 if [ -z ${CCC_LICENSE_KEY} ]; then
46 eerror
47 eerror "You have not set the environment variable"
48 eerror "\$CCC_LICENSE_KEY, this should be set to"
49 eerror "the password you were sent when you applied"
50 eerror "for your alpha-tools enthusiast/educational"
51 eerror "license."
52 eerror "If you do not have a license key, apply for one"
53 eerror "here ${ee_license_reg}"
54 eerror
55 die "no license key in \$CCC_LICENSE_KEY"
56 fi
57
58 # :-NULL safeguards against bash bug.
59 einfo "Decrypting ccc distribution..."
60 gpg --quiet \
61 --homedir=${T} --no-permission-warning \
62 --no-mdc-warning \
63 --passphrase-fd 0 \
64 --output ${ccc_rpm} \
65 --decrypt ${DISTDIR}/${ccc_rpm}.crypt \
66 <<< ${CCC_LICENSE_KEY:-NULL}
67
68 # Test PIPESTATUS for gpg result since last thing in pipeline is grep
69 #if [ ${PIPESTATUS[0]} -ne 0 ]; then
70 # die "Sorry, your license key doesnt seem to unlock the distribution"
71 #fi
72
73 ebegin "Unpacking ccc distribution..."
74 # This is the same as using rpm2targz then extracting 'cept that
75 # it's faster, less work, and less hard disk space. rpmoffset is
76 # provided by the rpm2targz package.
77 i=${ccc_rpm}
78 dd ibs=`rpmoffset < ${i}` skip=1 if=$i 2>/dev/null \
79 | gzip -dc | cpio -idmu 2>/dev/null \
80 && find usr -type d -print0 | xargs -0 chmod a+rx
81 eend ${?}
82 assert "Failed to extract ${ccc_rpm%.rpm}.tar.gz"
83 }
84
85 src_compile() {
86 # remove unwanted documentation
87 if ! use doc >/dev/null; then
88 einfo "Removing unwanted documentation (USE=\"-doc\")..."
89 rm -rf usr/doc
90 fi
91
92 # fix up lib paths - bug #15719, comment 6
93 einfo "Copying crtbegin/crtend from gcc..."
94 gcc_libs_path="`gcc-config --get-lib-path`"
95 if [ $? != 0 ] || [ ! -d "${gcc_libs_path}" ]; then
96 die "gcc-config returned an invalid library path (${gcc_libs_path})"
97 else
98 cp -f ${gcc_libs_path}/crt{begin,end}.o \
99 usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin
100 assert "Failed to copy crtbegin/crtend.o from ${gcc_libs_path}"
101 fi
102
103 # add gcc-lib path to ccc's search path
104 # check man ccc for file format info.
105 einfo "Configuring ccc to observe gcc library path and include paths..."
106 printf '%s %s %s\n' \
107 "-L${gcc_libs_path}" \
108 " -SysIncDir /usr/lib/compaq/ccc-${ccc_release}/alpha-linux/include" \
109 " -SysIncDir /usr/include/linux" \
110 > usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/comp.config
111 einfo "Additional paths can be set by users using \$DEC_CC variable."
112
113 # man pages are in the wrong place
114 einfo "Reorganising man structure..."
115 rm -rf usr/man
116 mkdir usr/share
117 mv usr/lib/compaq/ccc-${ccc_release}/alpha-linux/man usr/share
118
119 if use doc >/dev/null; then
120 einfo "Reorganising documentation..."
121 mv usr/doc usr/share
122 fi
123
124 # fix the probing script to ignore the version of libcpml. This
125 # is the wrong approach, but it will do for the first pass at this
126 # package
127 #
128 # this should no longer be nescessary with RDEPEND requiring >=libcpml-5.2.01-r2
129
130 #sed -i 's/^ version_high_enough / true /' \
131 # usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/probe_linux.sh
132
133 }
134
135 src_install() {
136 # move files over
137 mv usr ${D} || die "ccc installation failed"
138
139 # prep manpages
140 prepman ${D}/usr/share/man/man1/ccc.1
141 prepman ${D}/usr/share/man/man8/protect_headers_setup.8
142 prepalldocs
143 }
144
145 pkg_config () {
146 # some information for users
147 einfo
148 einfo "Attempting configuration of ccc..."
149 einfo
150 echo
151 echo '<------- Begin ccc configuration output ------->'
152 # NOTE: _must_ hide distcc, ccache, etc during this step
153 PATH=/bin:/usr/bin:/sbin:/usr/sbin \
154 /usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/create-comp-config.sh \
155 ccc-${ccc_release} ${gcc_libs_path}
156 echo '<------- End ccc configuration output ------->'
157 echo
158 einfo
159 einfo "ccc has been configured, you can now use it as usual."
160 einfo
161 }
162
163 pkg_postinst () {
164 elog
165 elog "ccc has been merged successfully, the EULA"
166 elog "is available in"
167 elog
168 elog "/usr/lib/compaq/ccc-${ccc_release}/alpha-linux/bin/LICENSE.txt"
169 elog
170 if use doc >/dev/null; then
171 elog "You can also view the compiler documentation"
172 elog "in /usr/share/doc/ccc-${PV}"
173 fi
174 ewarn
175 ewarn "you _MUST_ now run:"
176 ewarn "emerge --config =${CATEGORY}/${PF}"
177 ewarn "to complete the installation"
178 ewarn
179 elog "Hopefullly soon we will get a ccc USE flag"
180 elog "on packages (or at least individual"
181 elog "components) that can be successfully built"
182 elog "using this compiler, until then you will"
183 elog "just have to experiment :)"
184 elog
185 elog "Please report successes/failures with ccc"
186 elog "to http://bugs.gentoo.org so that the USE"
187 elog "flags can be updated."
188 elog
189 }

  ViewVC Help
Powered by ViewVC 1.1.20