summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2010-03-05 08:58:04 +0000
committerKeri Harris <keri@gentoo.org>2010-03-05 08:58:04 +0000
commit5bab054a94d75cf0eb08e1ab1ea77a2ee5242990 (patch)
tree904130e2456fcfe0848bfb40423b8604d76d7f1b /dev-lang
parentVersion bump (diff)
downloadgentoo-2-5bab054a94d75cf0eb08e1ab1ea77a2ee5242990.tar.gz
gentoo-2-5bab054a94d75cf0eb08e1ab1ea77a2ee5242990.tar.bz2
gentoo-2-5bab054a94d75cf0eb08e1ab1ea77a2ee5242990.zip
Version bump
(Portage version: 2.1.7.16/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/yap/ChangeLog10
-rw-r--r--dev-lang/yap/files/yap-6.0.2-bootfile.patch57
-rw-r--r--dev-lang/yap/files/yap-6.0.2-dynamic-lib.patch11
-rw-r--r--dev-lang/yap/files/yap-6.0.2-mpi-include.patch12
-rw-r--r--dev-lang/yap/files/yap-6.0.2-multilib.patch375
-rw-r--r--dev-lang/yap/files/yap-6.0.2-myddas-include.patch11
-rw-r--r--dev-lang/yap/files/yap-6.0.2-yapsharedir.patch17
-rw-r--r--dev-lang/yap/yap-6.0.2.ebuild102
8 files changed, 594 insertions, 1 deletions
diff --git a/dev-lang/yap/ChangeLog b/dev-lang/yap/ChangeLog
index f264c6d68a4b..cdbca2f970a5 100644
--- a/dev-lang/yap/ChangeLog
+++ b/dev-lang/yap/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-lang/yap
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/ChangeLog,v 1.32 2010/03/03 08:23:05 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/ChangeLog,v 1.33 2010/03/05 08:58:04 keri Exp $
+
+*yap-6.0.2 (05 Mar 2010)
+
+ 05 Mar 2010; <keri@gentoo.org> +yap-6.0.2.ebuild,
+ +files/yap-6.0.2-bootfile.patch, +files/yap-6.0.2-dynamic-lib.patch,
+ +files/yap-6.0.2-mpi-include.patch, +files/yap-6.0.2-multilib.patch,
+ +files/yap-6.0.2-myddas-include.patch, +files/yap-6.0.2-yapsharedir.patch:
+ Version bump
*yap-6.0.1 (03 Mar 2010)
diff --git a/dev-lang/yap/files/yap-6.0.2-bootfile.patch b/dev-lang/yap/files/yap-6.0.2-bootfile.patch
new file mode 100644
index 000000000000..84a041358d9f
--- /dev/null
+++ b/dev-lang/yap/files/yap-6.0.2-bootfile.patch
@@ -0,0 +1,57 @@
+--- yap-6.0.2.orig/C/c_interface.c 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/C/c_interface.c 2010-03-05 21:41:19.000000000 +1300
+@@ -2170,6 +2170,7 @@
+ static int eof_found = FALSE;
+ static int yap_lineno = 0;
+
++static char *BootFileDir = NULL;
+ static FILE *bootfile;
+
+ static char InitFile[] = "init.yap";
+@@ -2489,11 +2490,21 @@
+
+ /* read the bootfile */
+ if (!do_bootstrap) {
++ BootFileDir = getenv("YAPBOOTDIR");
++ if (BootFileDir) {
+ #if HAVE_STRNCAT
+- strncpy(boot_file, YAP_PL_SRCDIR, 256);
++ strncpy(boot_file, BootFileDir, 256);
+ #else
+- strcpy(boot_file, YAP_PL_SRCDIR);
++ strcpy(boot_file, BootFileDir);
+ #endif
++ }
++ else {
++#if HAVE_STRNCAT
++ strncpy(boot_file, YAP_PL_SRCDIR, 256);
++#else
++ strcpy(boot_file, YAP_PL_SRCDIR);
++#endif
++ }
+ #if HAVE_STRNCAT
+ strncat(boot_file, "/", 255);
+ #else
+@@ -2513,11 +2524,20 @@
+ Atom atfile;
+ Functor fgoal;
+ YAP_Term goal, as[2];
++ if (BootFileDir) {
+ #if HAVE_STRNCAT
+- strncpy(init_file, YAP_PL_SRCDIR, 256);
++ strncpy(init_file, BootFileDir, 256);
+ #else
+- strcpy(init_file, YAP_PL_SRCDIR);
++ strcpy(init_file, BootFileDir);
+ #endif
++ }
++ else {
++#if HAVE_STRNCAT
++ strncpy(init_file, YAP_PL_SRCDIR, 256);
++#else
++ strcpy(init_file, YAP_PL_SRCDIR);
++#endif
++ }
+ #if HAVE_STRNCAT
+ strncat(init_file, "/", 255);
+ #else
diff --git a/dev-lang/yap/files/yap-6.0.2-dynamic-lib.patch b/dev-lang/yap/files/yap-6.0.2-dynamic-lib.patch
new file mode 100644
index 000000000000..7efa74b3077a
--- /dev/null
+++ b/dev-lang/yap/files/yap-6.0.2-dynamic-lib.patch
@@ -0,0 +1,11 @@
+--- yap-6.0.2.orig/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/Makefile.in 2010-03-05 21:42:36.000000000 +1300
+@@ -499,7 +499,7 @@
+ $(RANLIB) libYap.a
+
+ @DYNYAPLIB@: $(LIB_OBJECTS)
+- @DYNLIB_LD@ -o @YAPLIB@ $(LIB_OBJECTS) $(LIBS) $(LDFLGS)
++ @DYNLIB_LD@ -o @YAPLIB@ $(LIB_OBJECTS) $(LIBS) $(LDFLAGS)
+
+ install: install_bin install_data
+
diff --git a/dev-lang/yap/files/yap-6.0.2-mpi-include.patch b/dev-lang/yap/files/yap-6.0.2-mpi-include.patch
new file mode 100644
index 000000000000..60bcab738a0c
--- /dev/null
+++ b/dev-lang/yap/files/yap-6.0.2-mpi-include.patch
@@ -0,0 +1,12 @@
+--- yap-6.0.2.orig/library/mpi/mpi.c 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/mpi/mpi.c 2010-03-05 21:43:55.000000000 +1300
+@@ -26,9 +26,6 @@
+ #include "Yatom.h"
+ #include "yapio.h"
+
+-/* for AtomEof */
+-#include "Heap.h"
+-
+ #include <stdlib.h>
+ #include <string.h>
+ #include <mpi.h>
diff --git a/dev-lang/yap/files/yap-6.0.2-multilib.patch b/dev-lang/yap/files/yap-6.0.2-multilib.patch
new file mode 100644
index 000000000000..b6cd8aceb004
--- /dev/null
+++ b/dev-lang/yap/files/yap-6.0.2-multilib.patch
@@ -0,0 +1,375 @@
+diff -ur yap-6.0.2.orig/CLPQR/Makefile.in yap-6.0.2/CLPQR/Makefile.in
+--- yap-6.0.2.orig/CLPQR/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/CLPQR/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/GPL/Makefile.in yap-6.0.2/GPL/Makefile.in
+--- yap-6.0.2.orig/GPL/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/GPL/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/LGPL/Makefile.in yap-6.0.2/LGPL/Makefile.in
+--- yap-6.0.2.orig/LGPL/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/LGPL/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/LGPL/clp/Makefile.in yap-6.0.2/LGPL/clp/Makefile.in
+--- yap-6.0.2.orig/LGPL/clp/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/LGPL/clp/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/LGPL/swi_console/Makefile.in yap-6.0.2/LGPL/swi_console/Makefile.in
+--- yap-6.0.2.orig/LGPL/swi_console/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/LGPL/swi_console/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -8,7 +8,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/Makefile.in yap-6.0.2/Makefile.in
+--- yap-6.0.2.orig/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -12,8 +12,8 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib
+-YAPLIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@
++YAPLIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/library/Makefile.in yap-6.0.2/library/Makefile.in
+--- yap-6.0.2.orig/library/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/library/lammpi/Makefile.in yap-6.0.2/library/lammpi/Makefile.in
+--- yap-6.0.2.orig/library/lammpi/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/lammpi/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -17,7 +17,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/matlab/Makefile.in yap-6.0.2/library/matlab/Makefile.in
+--- yap-6.0.2.orig/library/matlab/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/matlab/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/matrices/Makefile.in yap-6.0.2/library/matrices/Makefile.in
+--- yap-6.0.2.orig/library/matrices/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/matrices/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/matrix/Makefile.in yap-6.0.2/library/matrix/Makefile.in
+--- yap-6.0.2.orig/library/matrix/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/matrix/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/mpi/Makefile.in yap-6.0.2/library/mpi/Makefile.in
+--- yap-6.0.2.orig/library/mpi/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/mpi/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -21,8 +21,8 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib
+-YAPLIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@
++YAPLIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/library/random/Makefile.in yap-6.0.2/library/random/Makefile.in
+--- yap-6.0.2.orig/library/random/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/random/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/regex/Makefile.in yap-6.0.2/library/regex/Makefile.in
+--- yap-6.0.2.orig/library/regex/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/regex/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/rltree/Makefile.in yap-6.0.2/library/rltree/Makefile.in
+--- yap-6.0.2.orig/library/rltree/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/rltree/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -17,7 +17,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/system/Makefile.in yap-6.0.2/library/system/Makefile.in
+--- yap-6.0.2.orig/library/system/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/system/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/tries/Makefile.in yap-6.0.2/library/tries/Makefile.in
+--- yap-6.0.2.orig/library/tries/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/tries/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/library/yap2swi/Makefile.in yap-6.0.2/library/yap2swi/Makefile.in
+--- yap-6.0.2.orig/library/yap2swi/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/library/yap2swi/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/packages/CLPBN/Makefile.in yap-6.0.2/packages/CLPBN/Makefile.in
+--- yap-6.0.2.orig/packages/CLPBN/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/CLPBN/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/packages/PLStream/Makefile.in yap-6.0.2/packages/PLStream/Makefile.in
+--- yap-6.0.2.orig/packages/PLStream/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/PLStream/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -14,7 +14,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/packages/ProbLog/Makefile.in yap-6.0.2/packages/ProbLog/Makefile.in
+--- yap-6.0.2.orig/packages/ProbLog/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/ProbLog/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/packages/ProbLog/simplecudd/Makefile.in yap-6.0.2/packages/ProbLog/simplecudd/Makefile.in
+--- yap-6.0.2.orig/packages/ProbLog/simplecudd/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/ProbLog/simplecudd/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -13,7 +13,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/packages/chr/Makefile.in yap-6.0.2/packages/chr/Makefile.in
+--- yap-6.0.2.orig/packages/chr/Makefile.in 2010-03-04 13:57:48.000000000 +1300
++++ yap-6.0.2/packages/chr/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -15,8 +15,8 @@
+ srcdir=@srcdir@
+
+ BINDIR = $(EROOTDIR)/bin
+-LIBDIR=$(EROOTDIR)/lib
+-YAPLIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@
++YAPLIBDIR=@libdir@/Yap
+ SHAREDIR=$(ROOTDIR)/share/Yap
+
+ SHELL=@SHELL@
+diff -ur yap-6.0.2.orig/packages/clpqr/Makefile.in yap-6.0.2/packages/clpqr/Makefile.in
+--- yap-6.0.2.orig/packages/clpqr/Makefile.in 2010-03-04 13:57:49.000000000 +1300
++++ yap-6.0.2/packages/clpqr/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -18,8 +18,8 @@
+ ROOTDIR = $(prefix)
+ EROOTDIR = @exec_prefix@
+ BINDIR = $(EROOTDIR)/bin
+-LIBDIR=$(EROOTDIR)/lib
+-YAPLIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@
++YAPLIBDIR=@libdir@/Yap
+ SHAREDIR=$(ROOTDIR)/share/Yap
+ CLPDIR=$(SHAREDIR)
+ else
+diff -ur yap-6.0.2.orig/packages/cplint/Makefile.in yap-6.0.2/packages/cplint/Makefile.in
+--- yap-6.0.2.orig/packages/cplint/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/cplint/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
+diff -ur yap-6.0.2.orig/packages/jpl/Makefile.in yap-6.0.2/packages/jpl/Makefile.in
+--- yap-6.0.2.orig/packages/jpl/Makefile.in 2010-03-04 13:57:50.000000000 +1300
++++ yap-6.0.2/packages/jpl/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -22,8 +22,8 @@
+ srcdir=@srcdir@
+
+ BINDIR = $(EROOTDIR)/bin
+-LIBDIR=$(EROOTDIR)/lib
+-YAPLIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@
++YAPLIBDIR=@libdir@/Yap
+ SHAREDIR=$(ROOTDIR)/share/Yap
+ SHLIB_CFLAGS=@SHLIB_CFLAGS@
+
+diff -ur yap-6.0.2.orig/packages/plunit/Makefile.in yap-6.0.2/packages/plunit/Makefile.in
+--- yap-6.0.2.orig/packages/plunit/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/plunit/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -17,9 +17,9 @@
+ srcdir=@srcdir@
+
+ BINDIR = $(EROOTDIR)/bin
+-LIBDIR=$(EROOTDIR)/lib
++LIBDIR=@libdir@
+ SHAREDIR=$(EROOTDIR)/share/Yap
+-YAPLIBDIR=$(EROOTDIR)/lib/Yap
++YAPLIBDIR=@libdir@/Yap
+
+ PL=@EXTEND_DYNLOADER_PATH@ $(DESTDIR)$(BINDIR)/yap $(DESTDIR)$(YAPLIBDIR)/startup.yss
+ LN_S=@LN_S@
+diff -ur yap-6.0.2.orig/packages/sgml/Makefile.in yap-6.0.2/packages/sgml/Makefile.in
+--- yap-6.0.2.orig/packages/sgml/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/sgml/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -16,8 +16,8 @@
+ srcdir=@srcdir@
+
+ BINDIR = $(EROOTDIR)/bin
+-LIBDIR=$(EROOTDIR)/lib
+-YAPLIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@
++YAPLIBDIR=@libdir@/Yap
+ SHAREDIR=$(ROOTDIR)/share/Yap
+
+ SHELL=@SHELL@
+diff -ur yap-6.0.2.orig/packages/swi-minisat2/C/Makefile.in yap-6.0.2/packages/swi-minisat2/C/Makefile.in
+--- yap-6.0.2.orig/packages/swi-minisat2/C/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/swi-minisat2/C/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -14,7 +14,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur yap-6.0.2.orig/packages/swi-minisat2/Makefile.in yap-6.0.2/packages/swi-minisat2/Makefile.in
+--- yap-6.0.2.orig/packages/swi-minisat2/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/packages/swi-minisat2/Makefile.in 2010-03-05 21:45:24.000000000 +1300
+@@ -9,7 +9,7 @@
+ #
+ # where YAP should look for binary libraries
+ #
+-LIBDIR=$(ROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ # where YAP should look for architecture-independent Prolog libraries
+ #
diff --git a/dev-lang/yap/files/yap-6.0.2-myddas-include.patch b/dev-lang/yap/files/yap-6.0.2-myddas-include.patch
new file mode 100644
index 000000000000..4da9df0042bb
--- /dev/null
+++ b/dev-lang/yap/files/yap-6.0.2-myddas-include.patch
@@ -0,0 +1,11 @@
+--- yap-6.0.2.orig/Makefile.in 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/Makefile.in 2010-03-05 21:51:44.000000000 +1300
+@@ -59,7 +59,7 @@
+ #
+ CC=@CC@
+ MPI_CC=@MPI_CC@
+-CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/packages/MYDDAS
++CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/MYDDAS
+ CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
+ C_INTERF_FLAGS= @C_INTERF_FLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) -I$(srcdir)/include
+ C_PARSER_FLAGS= @C_PARSER_FLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
diff --git a/dev-lang/yap/files/yap-6.0.2-yapsharedir.patch b/dev-lang/yap/files/yap-6.0.2-yapsharedir.patch
new file mode 100644
index 000000000000..e900bd3d497e
--- /dev/null
+++ b/dev-lang/yap/files/yap-6.0.2-yapsharedir.patch
@@ -0,0 +1,17 @@
+--- yap-6.0.2.orig/pl/consult.yap 2010-03-04 13:57:29.000000000 +1300
++++ yap-6.0.2/pl/consult.yap 2010-03-05 21:46:18.000000000 +1300
+@@ -877,12 +877,12 @@
+ atom_concat([Path,File],PFile).
+
+ '$system_library_directories'(Dir) :-
+- getenv('YAPSHAREDIR', Dir).
++ getenv('YAPSHAREDIR', Dir), !.
+ '$system_library_directories'(Dir) :-
+ get_value(system_library_directory,Dir).
+
+ '$system_library_directories'(Dir) :-
+- getenv('YAPCOMMONSDIR', Dir).
++ getenv('YAPCOMMONSDIR', Dir), !.
+ '$system_library_directories'(Dir) :-
+ get_value(prolog_commons_directory,Dir).
+
diff --git a/dev-lang/yap/yap-6.0.2.ebuild b/dev-lang/yap/yap-6.0.2.ebuild
new file mode 100644
index 000000000000..1f9888a12188
--- /dev/null
+++ b/dev-lang/yap/yap-6.0.2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/yap-6.0.2.ebuild,v 1.1 2010/03/05 08:58:04 keri Exp $
+
+inherit eutils java-pkg-opt-2
+
+DESCRIPTION="YAP is a high-performance Prolog compiler."
+HOMEPAGE="http://www.ncc.up.pt/~vsc/Yap/"
+SRC_URI="http://www.ncc.up.pt/~vsc/Yap/yap-6.0.2.tar.gz"
+
+LICENSE="Artistic LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples gmp java mpi mysql odbc readline static tk threads"
+
+DEPEND="gmp? ( dev-libs/gmp )
+ java? ( >=virtual/jdk-1.4 )
+ mpi? ( virtual/mpi )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ doc? ( app-text/texi2html )"
+
+RDEPEND="${DEPEND}
+ tk? ( dev-lang/tk )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-bootfile.patch
+ epatch "${FILESDIR}"/${P}-dynamic-lib.patch
+ epatch "${FILESDIR}"/${P}-mpi-include.patch
+ epatch "${FILESDIR}"/${P}-myddas-include.patch
+ epatch "${FILESDIR}"/${P}-multilib.patch
+ epatch "${FILESDIR}"/${P}-yapsharedir.patch
+}
+
+src_compile() {
+ local myddas_conf
+ if use mysql || use odbc; then
+ myddas_conf="--enable-myddas \
+ --enable-myddas-stats \
+ --enable-myddas-top-level"
+ else
+ myddas_conf="--disable-myddas"
+ fi
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --enable-cut-c \
+ $(use_enable !static dynamic-loading) \
+ $(use_enable threads) \
+ $(use_enable threads pthread-locking) \
+ $(use_enable debug debug-yap) \
+ $(use_enable debug low-level-tracer) \
+ $(use_with gmp) \
+ $(use_with readline) \
+ $(use_with mpi) \
+ $(use_with mpi mpe) \
+ $(use_with java jpl) \
+ ${myddas_conf} \
+ || die "econf failed"
+
+ emake || die "emake failed"
+
+ if use doc ; then
+ emake html || die "emake html failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" -j1 install || die "make install failed."
+
+ if use tk ; then
+ exeinto /usr/bin
+ doexe misc/tkyap
+ fi
+
+ dodoc changes*.html README
+
+ if use doc ; then
+ dodoc yap.html
+ fi
+
+ if use examples ; then
+ docinto examples/chr
+ dodoc packages/chr/Examples/*.{chr,pl}
+ docinto examples/plunit
+ dodoc packages/plunit/examples/*.pl
+ if use java ; then
+ docinto examples/jpl/prolog
+ dodoc packages/jpl/examples/prolog/*.pl
+ docinto examples/jpl/java
+ dodoc packages/jpl/examples/java/*/*.java
+ fi
+ if use mpi ; then
+ docinto examples/mpi
+ dodoc library/mpi/examples/*.pl
+ fi
+ fi
+}