blob: 2962682fb3ac529ad0cc1ec4e1f0415553f97001 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/supercollider/supercollider-20040903-r1.ebuild,v 1.4 2007/08/09 14:30:35 drac Exp $
inherit eutils flag-o-matic
DESCRIPTION="A real time audio synthesis programming language"
HOMEPAGE="http://www.audiosynth.com"
SRC_URI="mirror://gentoo/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-ppc x86"
IUSE="emacs"
RDEPEND="media-sound/jack-audio-connection-kit
media-libs/alsa-lib
media-libs/libsndfile"
DEPEND="${RDEPEND}
sys-apps/sed"
S="${WORKDIR}"/SuperCollider3
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-gcc4.patch
# Change default config file location from /etc to /etc/supercollider
sed -i -e "s:/etc/sclang.cfg:/etc/supercollider/sclang.cfg:" source/lang/LangSource/SC_LanguageClient.cpp
sed -i -e "s:/etc/sclang.cfg:/etc/supercollider/sclang.cfg:" linux/examples/sclang.cfg.in
# Change the ridiculous default scsynth location on sample ~/.scsynth.sc file
sed -i -e "s:/usr/local/music/bin/scsynth:/usr/bin/scsynth:" linux/examples/sclang.sc
# Uncommenting a line per linux/examples/sclang.cfg.in
if ! use emacs; then
sed -i -e \
"s:#-@SC_LIB_DIR@/Common/GUI/Document.sc:-@SC_LIB_DIR@/Common/GUI/Document.sc:" \
linux/examples/sclang.cfg.in
fi
filter-ldflags -Wl,--as-needed --as-needed
}
src_compile() {
local myconf
if use emacs; then
myconf="${myconf} --enable-scel"
else
myconf="${myconf} --disable-scel"
fi
# Do the main compilation
./linux/bootstrap
econf ${myconf} || die
emake || die "emake failed."
cd "${S}"/linux/examples
emake sclang.cfg
# Also compile Emacs extensions if need be
if use emacs; then
cd "${S}"/linux/scel
emake || die "emake on skel failed."
fi
}
src_install() {
# Main install
einstall || die "einstall failed."
# Install our config file
insinto /etc/supercollider
doins linux/examples/sclang.cfg
# Documentation
mv linux/README linux/README-linux
mv linux/scel/README linux/scel/README-scel
dodoc linux/README-linux linux/scel/README-scel
# Our documentation
sed -e "s:@DOCBASE@:/usr/share/doc/${PF}:" \
< ${FILESDIR}/README-gentoo.txt | gzip \
> "${D}"/usr/share/doc/${PF}/README-gentoo.txt.gz
# RTFs (don't gzip)
insinto /usr/share/doc/${PF}
doins doc/*.rtf changes.rtf
# Example files (don't gzip)
insinto /usr/share/doc/${PF}/examples
doins linux/examples/onetwoonetwo.sc linux/examples/sclang.sc
# Help files included with project (again, don't gzip)
cp -R "${S}"/build/Help "${D}"/usr/share/doc/${PF}
# Emacs installation
if use emacs; then
cd "${S}"/linux/scel
einstall || die "einstall on scel failed"
fi
}
pkg_postinst() {
elog
elog "Notice: SuperCollider is not very intuitive to get up and running."
elog "The best course of action to make sure that the installation was"
elog "successful and get you started with using SuperCollider is to take"
elog "a look through /usr/share/doc/${PF}/README-gentoo.txt.gz"
elog
}
|