public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/hardened-dev:musl commit in: dev-scheme/guile/files/, dev-scheme/guile/
@ 2014-03-04 14:23 Anthony G. Basile
  0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2014-03-04 14:23 UTC (permalink / raw
  To: gentoo-commits

commit:     714efc302a747ab3910231ccff56ac45f739d86d
Author:     Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Sat Mar  1 21:41:12 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Mar  4 14:24:04 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=714efc30

dev-scheme/guile: add to tree

Same problem as with dev-libs/boehm-gc

---
 dev-scheme/guile/files/50guile-gentoo.el           |   1 +
 .../guile/files/guile-1.8.8-fix_guile-config.patch |  14 +++
 dev-scheme/guile/files/guile-1.8.8-gcc46.patch     |  39 +++++++
 .../guile/files/guile-1.8.8-makeinfo-5.patch       |  71 +++++++++++++
 dev-scheme/guile/files/guile-1.8.8-os_dep.patch    |  10 ++
 dev-scheme/guile/guile-1.8.8-r99.ebuild            | 113 +++++++++++++++++++++
 dev-scheme/guile/metadata.xml                      |  18 ++++
 7 files changed, 266 insertions(+)

diff --git a/dev-scheme/guile/files/50guile-gentoo.el b/dev-scheme/guile/files/50guile-gentoo.el
new file mode 100644
index 0000000..431f7e9
--- /dev/null
+++ b/dev-scheme/guile/files/50guile-gentoo.el
@@ -0,0 +1 @@
+(add-to-list 'load-path "@SITELISP@")

diff --git a/dev-scheme/guile/files/guile-1.8.8-fix_guile-config.patch b/dev-scheme/guile/files/guile-1.8.8-fix_guile-config.patch
new file mode 100644
index 0000000..2b04426
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-fix_guile-config.patch
@@ -0,0 +1,14 @@
+diff -ruN 1/configure.in 2/configure.in
+--- 1/configure.in	2010-12-13 17:24:39.000000000 +0000
++++ 2/configure.in	2011-04-29 11:53:39.000000000 +0000
+@@ -1522,8 +1522,8 @@
+ #######################################################################
+ 
+ dnl Tell guile-config what flags guile users should compile and link with.
+-GUILE_LIBS="$LDFLAGS $LIBS"
+-GUILE_CFLAGS="$CPPFLAGS $PTHREAD_CFLAGS"
++GUILE_LIBS="$LIBS"
++GUILE_CFLAGS="$PTHREAD_CFLAGS"
+ AC_SUBST(GUILE_LIBS)
+ AC_SUBST(GUILE_CFLAGS)
+ 

diff --git a/dev-scheme/guile/files/guile-1.8.8-gcc46.patch b/dev-scheme/guile/files/guile-1.8.8-gcc46.patch
new file mode 100644
index 0000000..b06a0e5
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-gcc46.patch
@@ -0,0 +1,39 @@
+Backported upstream patch to fix SIGSEGV with gcc-4.6
+
+http://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=62bc1072c19e81bb0f9e42a5034e7ab8c27d3b94
+https://bugs.gentoo.org/show_bug.cgi?id=424475
+--- a/configure.in
++++ b/configure.in
+@@ -1199,23 +1199,20 @@
+ AC_RUN_IFELSE([AC_LANG_SOURCE(
+ [AC_INCLUDES_DEFAULT
+ int
+-find_stack_direction ()
++find_stack_direction (int *addr, int depth)
+ {
+-  static char *addr = 0;
+-  auto char dummy;
+-  if (addr == 0)
+-    {
+-      addr = &dummy;
+-      return find_stack_direction ();
+-    }
+-  else
+-    return (&dummy > addr) ? 1 : -1;
++  int dir, dummy = 0;
++  if (! addr)
++    addr = &dummy;
++  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
++  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
++  return dir + dummy;
+ }
+ 
+ int
+-main ()
++main (int argc, char **argv)
+ {
+-  return find_stack_direction () < 0;
++  return find_stack_direction (0, argc + !argv + 20) < 0;
+ }])],
+ 	       [SCM_I_GSC_STACK_GROWS_UP=1],
+ 	       [],

diff --git a/dev-scheme/guile/files/guile-1.8.8-makeinfo-5.patch b/dev-scheme/guile/files/guile-1.8.8-makeinfo-5.patch
new file mode 100644
index 0000000..9f3a02c
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-makeinfo-5.patch
@@ -0,0 +1,71 @@
+From 937da0f2604ea208ec56517c5a41e582f316a246 Mon Sep 17 00:00:00 2001
+From: Cyprien Nicolas <cyp@fulax.fr>
+Date: Thu, 18 Apr 2013 23:45:23 +0200
+Subject: [PATCH] Fix texinfo files for makeinfo-5.1
+
+---
+ doc/ref/api-options.texi | 2 +-
+ doc/ref/api-utility.texi | 2 +-
+ doc/ref/fdl.texi         | 2 +-
+ doc/ref/gh.texi          | 4 ++--
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/doc/ref/api-options.texi b/doc/ref/api-options.texi
+index 7b7a6e0..6ce7291 100644
+--- a/doc/ref/api-options.texi
++++ b/doc/ref/api-options.texi
+@@ -377,9 +377,9 @@ configure @emph{reading}, @emph{printing}, @emph{debugging} or
+ * User level options interfaces::
+ * Reader options::
+ * Printing options::
+-* Debugger options::
+ * Evaluator options::
+ * Evaluator trap options::
++* Debugger options::
+ * Examples of option use::
+ @end menu
+ 
+diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi
+index 4a90212..9a4f3cc 100644
+--- a/doc/ref/api-utility.texi
++++ b/doc/ref/api-utility.texi
+@@ -657,7 +657,7 @@ Return 1 if @var{x} is a Scheme-level hook, 0 otherwise.
+ @end deftypefn
+ 
+ 
+-@subsubsection Handling Scheme-level hooks from C code
++@subsubheading Handling Scheme-level hooks from C code
+ 
+ Here is an example of how to handle Scheme-level hooks from C code using
+ the above functions.
+diff --git a/doc/ref/fdl.texi b/doc/ref/fdl.texi
+index 17fe148..4866055 100644
+--- a/doc/ref/fdl.texi
++++ b/doc/ref/fdl.texi
+@@ -408,7 +408,7 @@ as a draft) by the Free Software Foundation.
+ @end enumerate
+ 
+ @page
+-@appendixsubsec ADDENDUM: How to use this License for your documents
++@appendixsec ADDENDUM: How to use this License for your documents
+ 
+ To use this License in a document you have written, include a copy of
+ the License in the document and put the following copyright and
+diff --git a/doc/ref/gh.texi b/doc/ref/gh.texi
+index 95dfd92..bbd3af1 100644
+--- a/doc/ref/gh.texi
++++ b/doc/ref/gh.texi
+@@ -995,8 +995,8 @@ These correspond to the Scheme @code{(cons a b)} and @code{(list l0 l1
+ 
+ @deftypefun SCM gh_car (SCM @var{obj})
+ @deftypefunx SCM gh_cdr (SCM @var{obj})
+-@dots{}
+-
++@deftypefunx SCM gh_c[ad][ad]r (SCM @var{obj})
++@deftypefunx SCM gh_c[ad][ad][ad]r (SCM @var{obj})
+ @deftypefunx SCM gh_c[ad][ad][ad][ad]r (SCM @var{obj})
+ These correspond to the Scheme @code{(caadar ls)} procedures etc @dots{}
+ @end deftypefun
+-- 
+1.8.2.1
+

diff --git a/dev-scheme/guile/files/guile-1.8.8-os_dep.patch b/dev-scheme/guile/files/guile-1.8.8-os_dep.patch
new file mode 100644
index 0000000..9fab8da
--- /dev/null
+++ b/dev-scheme/guile/files/guile-1.8.8-os_dep.patch
@@ -0,0 +1,10 @@
+--- a/guile-1.8.8/libguile/gc_os_dep.c
++++ b/guile-1.8.8/libguile/gc_os_dep.c
+@@ -1472,6 +1472,7 @@
+ 	  /* has the right declaration for glibc 2.1.			*/
+ #         include <sigcontext.h>
+ #       endif /* 0 == __GLIBC_MINOR__ */
++#     elif 1
+ #     else /* not 2 <= __GLIBC__ */
+         /* libc5 doesn't have <sigcontext.h>: go directly with the kernel   */
+         /* one.  Check LINUX_VERSION_CODE to see which we should reference. */

diff --git a/dev-scheme/guile/guile-1.8.8-r99.ebuild b/dev-scheme/guile/guile-1.8.8-r99.ebuild
new file mode 100644
index 0000000..018351c
--- /dev/null
+++ b/dev-scheme/guile/guile-1.8.8-r99.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-scheme/guile/guile-1.8.8-r1.ebuild,v 1.16 2013/04/24 22:53:08 pchrist Exp $
+
+EAPI=3
+inherit eutils autotools flag-o-matic elisp-common
+
+DESCRIPTION="Scheme interpreter"
+HOMEPAGE="http://www.gnu.org/software/guile/"
+SRC_URI="mirror://gnu/guile/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="amd64 arm ~mips x86"
+IUSE="networking +regex discouraged +deprecated emacs nls debug-freelist debug-malloc debug +threads"
+RESTRICT="!regex? ( test )"
+
+DEPEND="
+	>=dev-libs/gmp-4.1
+	>=sys-devel/libtool-1.5.6
+	sys-devel/gettext
+	emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+
+# Guile seems to contain some slotting support, /usr/share/guile/ is slotted,
+# but there are lots of collisions. Most in /usr/share/libguile. Therefore
+# I'm slotting this in the same slot as guile-1.6* for now.
+SLOT="12"
+MAJOR="1.8"
+
+src_prepare() {
+	epatch "${FILESDIR}/${P}-fix_guile-config.patch" \
+		"${FILESDIR}/${P}-gcc46.patch" \
+		"${FILESDIR}/${P}-os_dep.patch" \
+		"${FILESDIR}/${P}-makeinfo-5.patch"
+	sed \
+		-e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \
+		-e "/AM_PROG_CC_STDC/d" \
+		-i guile-readline/configure.in
+	eautoreconf
+}
+
+src_configure() {
+	# see bug #178499
+	filter-flags -ftree-vectorize
+
+	#will fail for me if posix is disabled or without modules -- hkBst
+	econf \
+		--disable-error-on-warning \
+		--disable-static \
+		--enable-posix \
+		$(use_enable networking) \
+		$(use_enable regex) \
+		$(use deprecated || use_enable discouraged) \
+		$(use_enable deprecated) \
+		$(use_enable emacs elisp) \
+		$(use_enable nls) \
+		--disable-rpath \
+		$(use_enable debug-freelist) \
+		$(use_enable debug-malloc) \
+		$(use_enable debug guile-debug) \
+		$(use_with threads) \
+		--with-modules \
+		EMACS=no
+}
+
+src_compile()  {
+	emake || die "make failed"
+
+	# Above we have disabled the build system's Emacs support;
+	# for USE=emacs we compile (and install) the files manually
+	if use emacs; then
+		cd emacs
+		elisp-compile *.el || die
+	fi
+}
+
+src_install() {
+	einstall || die "install failed"
+
+	dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS || die
+
+	# texmacs needs this, closing bug #23493
+	dodir /etc/env.d
+	echo "GUILE_LOAD_PATH=\"${EPREFIX}/usr/share/guile/${MAJOR}\"" > "${ED}"/etc/env.d/50guile
+
+	# necessary for registering slib, see bug 206896
+	keepdir /usr/share/guile/site
+
+	if use emacs; then
+		elisp-install ${PN} emacs/*.{el,elc} || die
+		elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" || die
+	fi
+}
+
+pkg_postinst() {
+	[ "${EROOT}" == "/" ] && pkg_config
+	use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+	use emacs && elisp-site-regen
+}
+
+pkg_config() {
+	if has_version dev-scheme/slib; then
+		einfo "Registering slib with guile"
+		install_slib_for_guile
+	fi
+}
+
+_pkg_prerm() {
+	rm -f "${EROOT}"/usr/share/guile/site/slibcat
+}

diff --git a/dev-scheme/guile/metadata.xml b/dev-scheme/guile/metadata.xml
new file mode 100644
index 0000000..a3d993d
--- /dev/null
+++ b/dev-scheme/guile/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>scheme</herd>
+	<longdescription lang="en">
+Guile is a library designed to help programmers create flexible applications. Using Guile in an application allows programmers to write plug-ins, or modules (there are many names, but the concept is essentially the same) and users to use them to have an application fit their needs.
+	</longdescription>
+	<use>
+	<flag name='debug-freelist'>Include garbage collector freelist debugging
+	code</flag>
+	<flag name='debug-malloc'>Include malloc debugging code</flag>
+	<flag name='deprecated'>Enable deprecated features</flag>
+	<flag name='discouraged'> (implied by deprecated) enable merely discouraged
+	features</flag>
+	<flag name='networking'>Include networking interfaces</flag>
+	<flag name='regex'> Include regular expression interfaces</flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-04 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 14:23 [gentoo-commits] proj/hardened-dev:musl commit in: dev-scheme/guile/files/, dev-scheme/guile/ Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox