/[gentoo-x86]/dev-lang/squeak/squeak-3.4.1-r2.ebuild
Gentoo

Contents of /dev-lang/squeak/squeak-3.4.1-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Mon Aug 10 16:03:42 2009 UTC (10 years, 2 months ago) by vostorga
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Cleaning out old, keeping latest ~ppc
(Portage version: 2.1.6.13/cvs/Linux i686)

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/squeak/squeak-3.4.1-r2.ebuild,v 1.13 2007/07/22 08:43:03 graaff Exp $
4
5 inherit libtool flag-o-matic eutils
6
7 #Simply change these numbers for different versions
8 MV=3.4
9 NV=${MV}-1
10 FV=${MV}.1
11
12 DESCRIPTION="Highly-portable Smalltalk-80 implementation"
13 HOMEPAGE="http://www.squeak.org/"
14 SRC_URI="ftp://st.cs.uiuc.edu/Smalltalk/Squeak/${MV}/unix-linux/Squeak-${NV}.src.tar.gz"
15 LICENSE="Apple"
16 SLOT="0"
17 KEYWORDS="~x86 ~ppc"
18 IUSE="X oss mmx mozilla"
19 # a ffi flag would be nice
20
21 DEPEND="X? ( x11-libs/libX11 x11-libs/libXext )"
22 RDEPEND="${DEPEND}
23 virtual/squeak-image"
24
25 S="${WORKDIR}/Squeak-${NV}"
26
27 src_unpack() {
28 unpack ${A}
29 cd ${S}
30 epatch ${FILESDIR}/${P}-gcc33-string-fix.patch
31 }
32
33 src_compile() {
34 local myconf=""
35
36 use X || myconf="--without-x"
37 use oss && myconf="${myconf} --with-audio=oss"
38 use mmx && myconf="${myconf} --enable-mpg-mmx"
39
40 strip-flags
41 filter-mfpmath sse
42 filter-flags "-fPIC" "-maltivec" "-mabi=altivec" "-fstack-protector" "-pipe" "-g" "-mtune" "-march" "-mcpu" "-O" "-O1" "-O2" "-Os" "-O3" "-freorder-blocks" "-fprefetch-loop-array" "-fforce-addr"
43
44 # fix tail problems
45 cd ${S}/platforms/unix/config
46 mv mkconfig.in mkconfig.in.$$
47 cat mkconfig.in.$$|sed 's/tail -1/tail -n 1/g' > mkconfig.in
48 mv verstamp verstamp.$$
49 cat verstamp.$$|sed 's/tail -1/tail -n 1/g' > verstamp
50 chmod +x verstamp
51
52 cd ${S}
53
54 mkdir build
55 cd build
56 ../platforms/unix/config/configure \
57 --host=${CHOST} \
58 --prefix=/usr \
59 --infodir=/usr/share/info \
60 --mandir=/usr/share/man \
61 ${myconf} || die "configure failed"
62 mv Makefile Makefile.tmp.$$
63 cat Makefile.tmp.$$|sed \
64 's/$(prefix)\/doc\/squeak/$(prefix)\/share\/doc\/squeak-${FV}/g'\
65 > Makefile
66 rm -f Makefile.tmp.$$
67 emake || die
68 make npsqueak
69 # this is a bit paranoid, but we want to be sure it gets compiled now
70 cd nps
71 emake || die
72 }
73
74 src_install() {
75 cd ${S}/build
76
77 make DESTDIR=${D} ROOT=${D} install || die
78
79 exeinto /usr/bin
80 doexe inisqueak
81
82 ### the rest is all for the plugin
83
84 cd nps
85
86 # plugin sample, must be served to work, file:// doesnt work.
87
88 insinto /usr/share/doc/squeak-${FV}
89 doins test/plugintest.html
90 doins test/plugintest.sts
91
92 # fix the paths
93
94 SQ_DIR=/usr/lib/squeak
95 VM_VERSION=${NV}
96 NPSQUEAK_SO=${SQ_DIR}/${VM_VERSION}/npsqueak.so
97 sed "s|@SQ_DIR@|${SQ_DIR}|;s|@VM_VERSION@|${VM_VERSION}|;s|@NPSQUEAK_SO@|${NPSQUEAK_SO}|" \
98 npsqueakrun.in > npsqueakrun.in.2
99 sed "s|@SQ_DIR@|${SQ_DIR}|;s|@VM_VERSION@|${VM_VERSION}|;s|@NPSQUEAK_SO@|${NPSQUEAK_SO}|" \
100 npsqueakregister.in > npsqueakregister
101 sed 's|^ensurefile|ensurefile "${HOME}/.npsqueak/SqueakPlugin.changes" "${SQ_DIR}/npsqueak.changes"\nensurefile|' npsqueakrun.in.2 > npsqueakrun
102
103 exeinto /usr/lib/squeak
104 doexe npsqueakregister
105 exeinto /usr/lib/squeak/${NV}
106 doexe npsqueakrun
107
108 # install in browsers (no opera use flags?)
109
110 dodir /opt/netscape/plugins
111 dosym /usr/lib/squeak/${NV}/npsqueak.so /opt/netscape/plugins
112
113 if use mozilla ; then
114 dodir /usr/lib/mozilla/plugins
115 dosym /opt/netscape/plugins/npsqueak.so \
116 /usr/lib/mozilla/plugins/npsqueak.so
117 fi
118
119 # maybe we should install the image here..
120
121 # dosym /usr/lib/squeak/SqueakV3.sources /usr/lib/squeak/${NV}/SqueakV3.sources
122 # doins npsqueak.image
123 # doins npsqueak.changes
124 }
125
126 pkg_postinst() {
127 elog 'Run "inisqueak" to get a private copy of the VM image.'
128 elog
129 elog 'To setup the browser plugin, create a working set named npsqueak.* in /usr/lib/squeak/<version>/'
130 }

  ViewVC Help
Powered by ViewVC 1.1.20