/[gentoo-x86]/dev-lang/smlnj/smlnj-110.75.ebuild
Gentoo

Contents of /dev-lang/smlnj/smlnj-110.75.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Oct 22 12:14:09 2012 UTC (23 months, 4 weeks ago) by hkbst
Branch: MAIN
Changes since 1.3: +12 -12 lines
revert fix for bug 248162, because of bug 438934

(Portage version: 2.1.11.30/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/smlnj/smlnj-110.75.ebuild,v 1.2 2012/10/19 10:36:04 hkbst Exp $
4
5 EAPI="4"
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="Standard ML of New Jersey compiler and libraries"
10 HOMEPAGE="http://www.smlnj.org"
11
12 BASE_URI="http://smlnj.cs.uchicago.edu/dist/working/${PV}"
13
14 FILES="
15 config.tgz
16
17 cm.tgz
18 compiler.tgz
19 runtime.tgz
20 system.tgz
21 MLRISC.tgz
22 smlnj-lib.tgz
23
24 ckit.tgz
25 nlffi.tgz
26
27 cml.tgz
28 eXene.tgz
29
30 ml-lex.tgz
31 ml-yacc.tgz
32 ml-burg.tgz
33 ml-lpt.tgz
34
35 pgraph.tgz
36 trace-debug-profile.tgz
37
38 heap2asm.tgz
39
40 smlnj-c.tgz
41 "
42
43 #use amd64 in 32-bit mode
44 SRC_URI="amd64? ( ${BASE_URI}/boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )
45 ppc? ( ${BASE_URI}/boot.ppc-unix.tgz -> ${P}-boot.ppc-unix.tgz )
46 sparc? ( ${BASE_URI}/boot.sparc-unix.tgz -> ${P}-boot.sparc-unix.tgz )
47 x86? ( ${BASE_URI}/boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )"
48
49 for file in ${FILES}; do
50 SRC_URI+=" ${BASE_URI}/${file} -> ${P}-${file} "
51 done
52
53 LICENSE="BSD"
54 SLOT="0"
55
56 #sparc support should be there but is untested
57 KEYWORDS="-* ~amd64 ~ppc ~x86"
58 IUSE=""
59
60 S=${WORKDIR}
61
62 src_unpack() {
63 mkdir -p "${S}"
64 for file in ${A}; do
65 [[ ${file} != ${P}-config.tgz ]] && cp "${DISTDIR}/${file}" "${S}/${file#${P}-}"
66 done
67
68 # make sure we don't use the internet to download anything
69 unpack ${P}-config.tgz && rm config/*.bat
70 echo SRCARCHIVEURL=\"file:/${S}\" > "${S}"/config/srcarchiveurl
71 }
72
73 DIR=/usr
74
75 src_prepare() {
76 # respect CC et al. (bug 243886)
77 mkdir base || die # without this unpacking runtime will fail
78 ./config/unpack "${S}" runtime || die
79 for file in mk.*; do
80 sed -e "/^AS/s:as:$(tc-getAS):" \
81 -e "/^CC/s:gcc:$(tc-getCC):" \
82 -e "/^CPP/s:gcc:$(tc-getCC):" \
83 -e "/^CFLAGS/{s:-O[0123s]:: ; s:=:= ${CFLAGS}:}" \
84 -i base/runtime/objs/${file}
85 done
86
87 # # stash bin and lib somewhere (bug 248162)
88 # sed -e "/@BINDIR@/s:\$BINDIR:${DIR}:" \
89 # -e "/@LIBDIR@/s:\$LIBDIR:${DIR}/lib:" \
90 # -i config/install.sh || die
91 }
92
93 src_compile() {
94 SMLNJ_HOME="${S}" ./config/install.sh || die "compilation failed"
95 }
96
97 src_install() {
98 mkdir -p "${D}"/${DIR} || die
99 mv bin lib "${D}"/${DIR} || die
100
101 # for file in "${D}"/${DIR}/bin/*; do
102 # dosym /${DIR}/bin/$(basename "${file}") /usr/bin/$(basename "${file}") || die
103 # done
104
105 # for file in $(find "${D}"/usr/lib/${PN}/bin/ -maxdepth 1 -type f ! -name ".*"); do
106 # dosym /${DIR}/bin/$(basename "${file}") /usr/bin/$(basename "${file}") || die
107 # done
108
109 for file in "${D}"/usr/bin/{*,.*}; do
110 [[ -f ${file} ]] && sed "2iSMLNJ_HOME=/usr" -i ${file}
111 # [[ -f ${file} ]] && sed "s:${WORKDIR}:/usr:" -i ${file}
112 done
113 }

  ViewVC Help
Powered by ViewVC 1.1.20