diff options
author | Samuli Suominen <drac@gentoo.org> | 2007-07-29 13:22:35 +0000 |
---|---|---|
committer | Samuli Suominen <drac@gentoo.org> | 2007-07-29 13:22:35 +0000 |
commit | e7d20da3dc7251d305139d2e112db8e2416edcc3 (patch) | |
tree | 900cbdec101fb91d1450e86b0ce704462962a580 /media-sound | |
parent | Version bump (bug #159978). (diff) | |
download | gentoo-2-e7d20da3dc7251d305139d2e112db8e2416edcc3.tar.gz gentoo-2-e7d20da3dc7251d305139d2e112db8e2416edcc3.tar.bz2 gentoo-2-e7d20da3dc7251d305139d2e112db8e2416edcc3.zip |
Fix building with >= GCC 4.x, bug 153363. Thanks to Maximilian Grothusmann for patch, and Evil Compile Person for reporting.
(Portage version: 2.1.3)
Diffstat (limited to 'media-sound')
4 files changed, 190 insertions, 1 deletions
diff --git a/media-sound/supercollider/ChangeLog b/media-sound/supercollider/ChangeLog index 826723dd6f29..25fd245e181c 100644 --- a/media-sound/supercollider/ChangeLog +++ b/media-sound/supercollider/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-sound/supercollider # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/supercollider/ChangeLog,v 1.8 2007/05/01 00:26:46 genone Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/supercollider/ChangeLog,v 1.9 2007/07/29 13:22:35 drac Exp $ + +*supercollider-20040903-r1 (29 Jul 2007) + + 29 Jul 2007; Samuli Suominen <drac@gentoo.org> + +files/supercollider-20040903-gcc4.patch, + +supercollider-20040903-r1.ebuild: + Fix building with >= GCC 4.x, bug 153363. Thanks to Maximilian Grothusmann + for patch, and Evil Compile Person for reporting. 01 May 2007; Marius Mauch <genone@gentoo.org> supercollider-20040903.ebuild: diff --git a/media-sound/supercollider/files/digest-supercollider-20040903-r1 b/media-sound/supercollider/files/digest-supercollider-20040903-r1 new file mode 100644 index 000000000000..72caae3cb2f0 --- /dev/null +++ b/media-sound/supercollider/files/digest-supercollider-20040903-r1 @@ -0,0 +1,3 @@ +MD5 f148a95bbe4207d0768c91330ffa2493 supercollider-20040903.tgz 2381742 +RMD160 305ce210ddcf34b601d35730b944a6fbb71a0691 supercollider-20040903.tgz 2381742 +SHA256 342b10d454a9d06822bd0928728951bc824e3531dc60c4990905a74cf097a70e supercollider-20040903.tgz 2381742 diff --git a/media-sound/supercollider/files/supercollider-20040903-gcc4.patch b/media-sound/supercollider/files/supercollider-20040903-gcc4.patch new file mode 100644 index 000000000000..a3394234420c --- /dev/null +++ b/media-sound/supercollider/files/supercollider-20040903-gcc4.patch @@ -0,0 +1,66 @@ +--- a/headers/lang/ReadWriteMacros.h ++++ b/headers/lang/ReadWriteMacros.h +@@ -289,43 +289,52 @@ public: + + + // core routines ++template <> + inline void SC_IOStream<FILE*>::readData(char *data, int size) + { + fread(data, 1, size, s); + } + ++template <> + inline uint8 SC_IOStream<FILE*>::readUInt8() + { + return (uint8)fgetc(s); + } + ++template <> + inline void SC_IOStream<FILE*>::writeData(char *data, int size) + { + fwrite(data, 1, size, s); + } + ++template <> + inline void SC_IOStream<FILE*>::writeUInt8(uint8 inInt) + { + fputc(inInt, s); + } + + // core routines ++template <> + inline void SC_IOStream<char*>::readData(char *data, int size) + { + memcpy(data, s, size); + s += size; + } ++ ++template <> + inline uint8 SC_IOStream<char*>::readUInt8() + { + return (uint8)*s++; + } + ++template <> + inline void SC_IOStream<char*>::writeData(char *data, int size) + { + memcpy(s, data, size); + s += size; + } + ++template <> + inline void SC_IOStream<char*>::writeUInt8(uint8 inInt) + { + *s++ = (inInt & 255); +--- a/source/lang/LangSource/SC_LanguageClient.cpp ++++ b/source/lang/LangSource/SC_LanguageClient.cpp +@@ -105,7 +105,7 @@ void SC_LanguageClient::compileLibrary() + ::compileLibrary(); + } + +-extern void ::shutdownLibrary(); ++extern void shutdownLibrary(); + void SC_LanguageClient::shutdownLibrary() + { + ::shutdownLibrary(); diff --git a/media-sound/supercollider/supercollider-20040903-r1.ebuild b/media-sound/supercollider/supercollider-20040903-r1.ebuild new file mode 100644 index 000000000000..78efc6cce553 --- /dev/null +++ b/media-sound/supercollider/supercollider-20040903-r1.ebuild @@ -0,0 +1,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.1 2007/07/29 13:22: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 +} |