summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ucblogo/files/ucblogo-6.0-optimization-flags.patch26
-rw-r--r--dev-lang/ucblogo/ucblogo-6.0-r2.ebuild73
2 files changed, 99 insertions, 0 deletions
diff --git a/dev-lang/ucblogo/files/ucblogo-6.0-optimization-flags.patch b/dev-lang/ucblogo/files/ucblogo-6.0-optimization-flags.patch
new file mode 100644
index 000000000000..15a097c00d68
--- /dev/null
+++ b/dev-lang/ucblogo/files/ucblogo-6.0-optimization-flags.patch
@@ -0,0 +1,26 @@
+commit 5971737bac9a6f0d74f9292342a0e15530960e23
+Author: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun Aug 14 16:37:07 2016 -0400
+
+ Don't kill optimization in makefile.in.
+
+diff --git a/makefile.in b/makefile.in
+index 2eadd50..e56164d 100644
+--- a/makefile.in
++++ b/makefile.in
+@@ -1,5 +1,5 @@
+ CC = @CC@
+-CFLAGS = @CFLAGS@ @CPPFLAGS@ @X_CFLAGS@ -O0 -DUSE_OLD_TTY
++CFLAGS = @CFLAGS@ @CPPFLAGS@ @X_CFLAGS@ -DUSE_OLD_TTY
+ CXX = g++
+ CXXFLAGS = @CXXFLAGS@
+ LDFLAGS = @LDFLAGS@
+@@ -28,7 +28,7 @@ everything: logo logolib/Messages helpfiles helpfiles/HELPCONTENTS
+ #logo-mode
+
+ mem.o: mem.c
+- $(CC) $(CFLAGS) -O0 -c mem.c
++ $(CC) $(CFLAGS) -c mem.c
+
+ svn.c: $(SRCS)
+ echo 'char* SVN = "('`svnversion|tr -d '\r'`')";' > svn.c
diff --git a/dev-lang/ucblogo/ucblogo-6.0-r2.ebuild b/dev-lang/ucblogo/ucblogo-6.0-r2.ebuild
new file mode 100644
index 000000000000..319638344673
--- /dev/null
+++ b/dev-lang/ucblogo/ucblogo-6.0-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs wxwidgets
+
+DESCRIPTION="a reflective, functional programming language"
+HOMEPAGE="https://www.cs.berkeley.edu/~bh/logo.html"
+SRC_URI="ftp://ftp.cs.berkeley.edu/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+DEPEND="
+ app-text/texi2html
+ dev-libs/libbsd
+ virtual/tex-base
+ virtual/texi2dvi
+ X? ( x11-libs/wxGTK:2.8[X] )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-wx.patch"
+ "${FILESDIR}/${P}-no-libtermcap.patch"
+ "${FILESDIR}/${P}-texi.patch"
+ "${FILESDIR}/${P}-destdir.patch"
+ "${FILESDIR}/${P}-optimization-flags.patch"
+)
+
+src_prepare() {
+ default
+
+ # Drop math.h in two places to fix the build, bug 565122.
+ sed -i -e "/math.h/d" coms.c \
+ || die 'failed to drop math.h from coms.c'
+
+ sed -i -e "/math.h/d" graphics.c \
+ || die 'failed to drop math.h from graphics.c'
+
+ if use X ; then
+ WX_GTK_VER=2.8 need-wxwidgets unicode
+
+ sed -i -e "s_/usr/local/bin/wx-config_${WX_CONFIG}_g" configure-gtk \
+ || die 'failed to fix wx-config in configure-gtk script'
+
+ sed -i -e 's_--host=gtk__g' configure-gtk \
+ || die 'failed to fix --host in configure-gtk script'
+ fi
+
+ sed -i -e "s_/lib/logo_/share/${PN}_" makefile.in \
+ || die 'failed to fix data path in makefile.in'
+
+ sed -i -e "/doc$/s_\$_/${PF}_" docs/makefile \
+ || die 'failed to fix docs path in docs/makefile'
+
+ rm -rf csls/CVS || die 'failed to remove useless CVS directory'
+}
+
+src_configure() {
+ if use X ; then
+ ./configure-gtk --prefix=/usr --with-x --wx-enable \
+ || die 'configure script returned an error'
+ else
+ econf --without-x --wx-disable
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}