summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-08-14 19:40:54 -0400
committerMichael Orlitzky <mjo@gentoo.org>2016-08-14 19:42:52 -0400
commit61a03f0d89ca8ecf048594a5ae1d55b58a5955d4 (patch)
tree7249e98e96f58c5e78a3dfcc814382341ef15662 /dev-lang
parentsys-boot/grub: set RESTRICT=strip (diff)
downloadgentoo-61a03f0d89ca8ecf048594a5ae1d55b58a5955d4.tar.gz
gentoo-61a03f0d89ca8ecf048594a5ae1d55b58a5955d4.tar.bz2
gentoo-61a03f0d89ca8ecf048594a5ae1d55b58a5955d4.zip
dev-lang/ucblogo: new revision to fix a few open bugs.
The build system for this package forces -O0, and we have an ancient bug for that. The only way to fix it is with a patch, and this new revision adds a patch stripping the -O0. There is also a build failure in the existing 6.x series ebuilds. There is wxWidgets support hidden behind USE=X, but we make a call to some wxWidgets stuff unconditionally and it crashes when wxWidgets is not present (i.e. with USE="-X"). The elisp-common eclass is no longer used and has been dropped. A call to strip-flags has been removed, and flag-o-matic "downgraded" to toolchain-funcs. Gentoo-Bug: 327359 Gentoo-Bug: 584602 Package-Manager: portage-2.2.28
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)"
+}