summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2008-07-27 05:11:51 +0000
committerKeri Harris <keri@gentoo.org>2008-07-27 05:11:51 +0000
commit6ba63794e954b7047dc7ba5bf68b51f6d4005e68 (patch)
tree189767c9bef47eec9f4d36bbefa1238992d4b390 /dev-lang/yap
parentVersion bump. (diff)
downloadgentoo-2-6ba63794e954b7047dc7ba5bf68b51f6d4005e68.tar.gz
gentoo-2-6ba63794e954b7047dc7ba5bf68b51f6d4005e68.tar.bz2
gentoo-2-6ba63794e954b7047dc7ba5bf68b51f6d4005e68.zip
Version bump.
(Portage version: 2.1.5.5)
Diffstat (limited to 'dev-lang/yap')
-rw-r--r--dev-lang/yap/ChangeLog10
-rw-r--r--dev-lang/yap/files/yap-5.1.3-chr.patch134
-rw-r--r--dev-lang/yap/files/yap-5.1.3-config.h.patch17
-rw-r--r--dev-lang/yap/files/yap-5.1.3-configure.patch174
-rw-r--r--dev-lang/yap/files/yap-5.1.3-multilib.patch304
-rw-r--r--dev-lang/yap/files/yap-5.1.3-parallel-make.patch160
-rw-r--r--dev-lang/yap/files/yap-5.1.3-tkyap.patch26
-rw-r--r--dev-lang/yap/yap-5.1.3.ebuild84
8 files changed, 908 insertions, 1 deletions
diff --git a/dev-lang/yap/ChangeLog b/dev-lang/yap/ChangeLog
index bbfca8957e61..f06a1a6fe870 100644
--- a/dev-lang/yap/ChangeLog
+++ b/dev-lang/yap/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-lang/yap
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/ChangeLog,v 1.21 2008/07/15 06:44:01 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/ChangeLog,v 1.22 2008/07/27 05:11:50 keri Exp $
+
+*yap-5.1.3 (27 Jul 2008)
+
+ 27 Jul 2008; keri <keri@gentoo.org> +files/yap-5.1.3-chr.patch,
+ +files/yap-5.1.3-config.h.patch, +files/yap-5.1.3-configure.patch,
+ +files/yap-5.1.3-multilib.patch, +files/yap-5.1.3-parallel-make.patch,
+ +files/yap-5.1.3-tkyap.patch, +yap-5.1.3.ebuild:
+ Version bump.
15 Jul 2008; keri <keri@gentoo.org> +files/yap-5.1.2-config.h.patch,
yap-5.1.2.ebuild:
diff --git a/dev-lang/yap/files/yap-5.1.3-chr.patch b/dev-lang/yap/files/yap-5.1.3-chr.patch
new file mode 100644
index 000000000000..4d466c76a9c4
--- /dev/null
+++ b/dev-lang/yap/files/yap-5.1.3-chr.patch
@@ -0,0 +1,134 @@
+diff -ur Yap-5.1.3.orig/LGPL/chr/Makefile.in Yap-5.1.3/LGPL/chr/Makefile.in
+--- Yap-5.1.3.orig/LGPL/chr/Makefile.in 2008-04-04 02:26:38.000000000 +1300
++++ Yap-5.1.3/LGPL/chr/Makefile.in 2008-07-27 15:56:49.000000000 +1200
+@@ -11,7 +11,7 @@
+ SHELL=@SHELL@
+ PLBASE=@PLBASE@
+ PLARCH=@PLARCH@
+-PL=../../yap ../../startup
++PL=LD_LIBRARY_PATH=../..:system YAPSHAREDIR=$(PWD)/../../library ../../yap -b ../../pl/boot.yap
+ XPCEBASE=$(PLBASE)/xpce
+ PKGDOC=$(PLBASE)/doc/packages
+ PCEHOME=../../xpce
+@@ -48,43 +48,49 @@
+ $(srcdir)/Benchmarks/bool.chr $(srcdir)/Benchmarks/family.chr $(srcdir)/Benchmarks/fibonacci.chr $(srcdir)/Benchmarks/leq.chr $(srcdir)/Benchmarks/listdom.chr \
+ $(srcdir)/Benchmarks/chrdif.chr
+
++GPLDIR= $(srcdir)/../../GPL
++LGPLDIR= $(srcdir)/../../LGPL
++EXTRALIBDIR= $(srcdir)/../../library
++GPLLIBPL= $(EXTRALIBDIR)/aggregate.pl $(EXTRALIBDIR)/error.pl $(EXTRALIBDIR)/occurs.yap $(EXTRALIBDIR)/pairs.pl
++LGPLLIBPL= $(EXTRALIBDIR)/maplist.pl
++EXTRALIBPL= $(GPLLIBPL) $(LGPLLIBPL)
++
++BOOTSTRAP=bootstrap('../../pl/init.yap'),module(user),['chr_swi_bootstrap']
++
+ all: chr_translate.pl
+
+-chr_translate_bootstrap1.pl: $(srcdir)/chr_translate_bootstrap1.chr
+- $(PL) -f -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step1('$<','$@'),halt." \
+- -z 'halt(1).'
+- $(PL) -f -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step2('$<','$@'),halt." \
+- -z 'halt(1).'
++chr_translate_bootstrap1.pl: $(srcdir)/chr_translate_bootstrap1.chr $(EXTRALIBPL)
++ echo "$(BOOTSTRAP),chr:chr_compile_step1('$<','$@'),halt." | \
++ $(PL)
++ echo "$(BOOTSTRAP),chr:chr_compile_step2('$<','$@'),halt." | \
++ $(PL)
+
+ chr_translate_bootstrap2.pl: $(srcdir)/chr_translate_bootstrap2.chr chr_translate_bootstrap1.pl
+- $(PL) -f -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step2('$<','$@'),halt." \
+- -z 'halt(1).'
+- $(PL) -f -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step3('$<','$@'),halt." \
+- -z 'halt(1).'
++ echo "$(BOOTSTRAP),chr:chr_compile_step2('$<','$@'),halt." | \
++ $(PL)
++ echo "$(BOOTSTRAP),chr:chr_compile_step3('$<','$@'),halt." | \
++ $(PL)
+
+ guard_entailment.pl: $(srcdir)/guard_entailment.chr chr_translate_bootstrap2.pl
+- $(PL) -f -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step3('$<','$@'),halt." \
+- -z 'halt(1).'
++ echo "$(BOOTSTRAP),chr:chr_compile_step3('$<','$@'),halt." | \
++ $(PL)
+
+ chr_translate.pl: $(srcdir)/chr_translate.chr chr_translate_bootstrap2.pl guard_entailment.pl
+- $(PL) -f -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step3('$<','$@'),halt." \
+- -z 'halt(1).'
+- $(PL) -f -p chr=. -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt." \
+- -z 'halt(1).'
+- $(PL) -f -p chr=. -l chr_swi_bootstrap.yap \
+- -g "chr_compile_step4('$<','$@'),halt." \
+- -z 'halt(1).'
++ echo "$(BOOTSTRAP),chr:chr_compile_step3('$<','$@'),halt." | \
++ $(PL)
++ echo "$(BOOTSTRAP),chr:chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt." | \
++ $(PL)
++ echo "$(BOOTSTRAP),asserta(user:file_search_path(chr,'.')),chr:chr_compile_step4('$<','$@'),halt." | \
++ $(PL)
+
+ chr.pl: chr_swi.pl
+ cp $< $@
+
++$(GPLLIBPL): $(EXTRALIBDIR)/%: $(GPLDIR)/%
++ cp $< $@
++$(LGPLLIBPL): $(EXTRALIBDIR)/%: $(LGPLDIR)/%
++ cp $< $@
++
+ install: chr_translate.pl guard_entailment.pl
+ mkdir -p $(DESTDIR)$(CHRDIR)
+ $(INSTALL) -m 644 $(LIBPL) $(DESTDIR)$(CHRDIR)
+diff -ur Yap-5.1.3.orig/LGPL/chr/chr_translate.chr Yap-5.1.3/LGPL/chr/chr_translate.chr
+--- Yap-5.1.3.orig/LGPL/chr/chr_translate.chr 2008-03-14 06:43:13.000000000 +1300
++++ Yap-5.1.3/LGPL/chr/chr_translate.chr 2008-07-27 16:09:24.000000000 +1200
+@@ -8756,7 +8756,7 @@
+ ( NbIndexedArgs > 10 ->
+ findall([Index],member(Index,IndexedArgs),Indexes)
+ ;
+- findall(Index,(sublist(Index,IndexedArgs), Index \== []),UnsortedIndexes),
++ findall(Index,(chr_sublist(Index,IndexedArgs), Index \== []),UnsortedIndexes),
+ predsort(longer_list,UnsortedIndexes,Indexes)
+ ),
+ % EXPERIMENTAL HEURISTIC
+diff -ur Yap-5.1.3.orig/LGPL/chr/chr_translate_bootstrap2.chr Yap-5.1.3/LGPL/chr/chr_translate_bootstrap2.chr
+--- Yap-5.1.3.orig/LGPL/chr/chr_translate_bootstrap2.chr 2008-03-14 11:37:07.000000000 +1300
++++ Yap-5.1.3/LGPL/chr/chr_translate_bootstrap2.chr 2008-07-27 16:10:15.000000000 +1200
+@@ -3648,7 +3648,7 @@
+ is_attached(C),
+ get_store_type(C,default) ->
+ get_indexed_arguments(C,IndexedArgs),
+- findall(Index,(sublist(Index,IndexedArgs), Index \== []),Indexes),
++ findall(Index,(chr_sublist(Index,IndexedArgs), Index \== []),Indexes),
+ assumed_store_type(C,multi_store([multi_hash(Indexes),global_ground]))
+ ;
+ true
+diff -ur Yap-5.1.3.orig/LGPL/chr/hprolog.pl Yap-5.1.3/LGPL/chr/hprolog.pl
+--- Yap-5.1.3.orig/LGPL/chr/hprolog.pl 2008-03-14 11:37:07.000000000 +1300
++++ Yap-5.1.3/LGPL/chr/hprolog.pl 2008-07-27 16:08:23.000000000 +1200
+@@ -8,7 +8,7 @@
+ split_at/4, % +N, +List, -FirstElements, -LastElements
+ max_go_list/2, % +List, -Max
+ or_list/2, % +ListOfInts, -BitwiseOr
+- sublist/2, % ?Sublist, +List
++ chr_sublist/2, % ?Sublist, +List
+ bounded_sublist/3, % ?Sublist, +List, +Bound
+ chr_delete/3,
+ init_store/2,
+@@ -157,8 +157,8 @@
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-sublist(L, L).
+-sublist(Sub, [H|T]) :-
++chr_sublist(L, L).
++chr_sublist(Sub, [H|T]) :-
+ '$sublist1'(T, H, Sub).
+
+ '$sublist1'(Sub, _, Sub).
diff --git a/dev-lang/yap/files/yap-5.1.3-config.h.patch b/dev-lang/yap/files/yap-5.1.3-config.h.patch
new file mode 100644
index 000000000000..97959a7223a1
--- /dev/null
+++ b/dev-lang/yap/files/yap-5.1.3-config.h.patch
@@ -0,0 +1,17 @@
+--- Yap-5.1.3.orig/config.h.in 2008-04-03 04:41:46.000000000 +1300
++++ Yap-5.1.3/config.h.in 2008-07-27 16:41:13.000000000 +1200
+@@ -124,10 +124,12 @@
+ in adtdefs.c
+ */
+ #define FFIEEE 1
+-#undef FFVAX /* manual */
++/*manual */
++#undef FFVAX
+
+ /* Define the standard type of a float argument to a function */
+-#define FAFloat double /* manual */
++/*manual */
++#define FAFloat double
+
+ /* Set the minimum and default heap, trail and stack size */
+ #undef MinTrailSpace
diff --git a/dev-lang/yap/files/yap-5.1.3-configure.patch b/dev-lang/yap/files/yap-5.1.3-configure.patch
new file mode 100644
index 000000000000..dab676f4726d
--- /dev/null
+++ b/dev-lang/yap/files/yap-5.1.3-configure.patch
@@ -0,0 +1,174 @@
+--- Yap-5.1.3.orig/configure.in 2008-05-24 10:29:52.000000000 +1200
++++ Yap-5.1.3/configure.in 2008-07-27 16:51:01.000000000 +1200
+@@ -95,22 +95,35 @@
+ fi,
+ [yap_cv_gmp=yes])
+
+-AC_ARG_ENABLE(myddas,
+- [ --enable-myddas[[=DIR]] enable the MYDDAS library],
++AC_ARG_ENABLE(myddas-mysql,
++ [ --enable-myddas-mysql[[=DIR]] enable the MYDDAS MySQL library],
+ if test "$enableval" = yes; then
+- yap_cv_myddas=/usr/
++ yap_cv_myddas_mysql=/usr/
+ elif test "$enableval" = no; then
+- yap_cv_myddas=no
++ yap_cv_myddas_mysql=no
+ else
+- yap_cv_myddas=$enable_myddas
+- LDFLAGS="$LDFLAGS -L${yap_cv_myddas}/lib "
+- CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas}/include "
++ yap_cv_myddas_mysql=$enable_myddas_mysql
++ LDFLAGS="$LDFLAGS -L${yap_cv_myddas_mysql}/lib "
++ CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas_mysql}/include "
+ fi,
+- [yap_cv_myddas=no])
++ [yap_cv_myddas_mysql=no])
++
++AC_ARG_ENABLE(myddas-odbc,
++ [ --enable-myddas-odbc[[=DIR]] enable the MYDDAS ODBC library],
++ if test "$enableval" = yes; then
++ yap_cv_myddas_odbc=/usr/
++ elif test "$enableval" = no; then
++ yap_cv_myddas_odbc=no
++ else
++ yap_cv_myddas_odbc=$enable_myddas_odbc
++ LDFLAGS="$LDFLAGS -L${yap_cv_myddas_odbc}/lib "
++ CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas_odbc}/include "
++ fi,
++ [yap_cv_myddas_odbc=no])
+
+ AC_ARG_ENABLE(myddas-stats,
+ [ --enable-myddas-stats enable the MYDDAS library statistics support],
+- if test "$yap_cv_myddas" = no; then
++ if test "$yap_cv_myddas_mysql" = no; then
+ myddasstats=no
+ else
+ myddasstats="$enableval"
+@@ -118,7 +131,7 @@
+
+ AC_ARG_ENABLE(myddas-top-level,
+ [ --enable-myddas-top-level enable the MYDDAS top-level support to MySQL],
+- if test "$yap_cv_myddas" = no; then
++ if test "$yap_cv_myddas_mysql" = no; then
+ myddastoplevel=no
+ else
+ myddastoplevel="$enableval"
+@@ -128,8 +141,6 @@
+ [ --with-jpl=JAVA_HOME use Java instalation in JAVA_HOME],
+ if test "$withval" = yes; then
+ yap_cv_jpl="$JAVA_HOME"
+- dynamic_loading=yes
+- maxmemory=yes
+ dnl threads=yes
+ elif test "$withval" = no; then
+ yap_cv_jpl=no
+@@ -432,6 +443,8 @@
+ AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
+ AC_PATH_PROG(SHELL,sh)
+
++AC_HEADER_STDC
++
+ dnl Check for libraries.
+ dnl mingw does not get along well with libm
+ dnl cygnus and mingw32 also need wsock32 to use sockets.
+@@ -488,7 +501,7 @@
+ AC_CHECK_LIB(gmp,main)
+ fi
+
+-if test "$yap_cv_myddas" != "no"
++if test "$yap_cv_myddas_mysql" != "no"
+ then
+ dnl check for mysql
+ AC_MSG_CHECKING(for main in -lmysqlclient)
+@@ -505,9 +518,26 @@
+ if test "$yap_mysql" = yes
+ then
+ YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL"
+- LIBS="$LIBS -L${yap_cv_myddas}/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv "
++ LIBS="$LIBS -L${yap_cv_myddas_mysql}/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv "
++ fi
++ if test "$yap_mysql" = no
++ then
++ echo "-------------------------------"
++ echo "--"
++ echo "--"
++ echo "--"
++ echo "-- There\'s no devel libraries for MySQL"
++ echo "--"
++ echo "--"
++ echo "--"
++ echo "-------------------------------"
++ exit
+ fi
+-
++ cutc="yes"
++fi
++
++if test "$yap_cv_myddas_odbc" != "no"
++then
+ dnl check for odbc
+ AC_MSG_CHECKING(for main in -lodbc)
+ AC_CACHE_VAL(yap_odbc,[
+@@ -526,40 +556,21 @@
+ YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_ODBC"
+ LIBS="$LIBS -lodbc "
+ fi
+-
+- if test "$yap_mysql" = no -a "$yap_odbc" = no
++ if test "$yap_odbc" = no
+ then
+ echo "-------------------------------"
+ echo "--"
+ echo "--"
+ echo "--"
+- echo "-- There\'s no devel libraries for MySQL or ODBC"
++ echo "-- There\'s no devel libraries for ODBC"
+ echo "--"
+ echo "--"
+ echo "--"
+ echo "-------------------------------"
+ exit
+ fi
+-
+- if test "$cutc" = no
+- then
+- echo
+- echo
+- echo "********************************************************"
+- echo
+- echo
+- echo "!!!!!! WARNING !!!!!!"
+- echo "The MYDDAS interface makes no sense without cut-c"
+- echo "Please contact tiagosoares@ncc.up.pt for help"
+- echo
+- echo "Enabling cut-c"
+- echo
+- echo "********************************************************"
+- echo
+- echo
+- cutc="yes"
+- fi
+-fi
++ cutc="yes"
++fi
+
+ if test "$myddasstats" = "yes"
+ then
+@@ -1002,7 +1013,6 @@
+ CC=${OLD_CC}
+
+ dnl Checks for header files.
+-AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h dlfcn.h)
+ AC_CHECK_HEADERS(errno.h fcntl.h)
+@@ -1021,7 +1031,7 @@
+ then
+ AC_CHECK_HEADERS(gmp.h)
+ fi
+-if test "$yap_cv_myddas" != "no"
++if test "$yap_cv_myddas_mysql" != "no"
+ then
+ AC_CHECK_HEADERS(mysql/mysql.h)
+ fi
diff --git a/dev-lang/yap/files/yap-5.1.3-multilib.patch b/dev-lang/yap/files/yap-5.1.3-multilib.patch
new file mode 100644
index 000000000000..3cd0a76e2638
--- /dev/null
+++ b/dev-lang/yap/files/yap-5.1.3-multilib.patch
@@ -0,0 +1,304 @@
+diff -ur ../Yap-5.1.3.orig/CLPBN/Makefile.in ../Yap-5.1.3/CLPBN/Makefile.in
+--- ../Yap-5.1.3.orig/CLPBN/Makefile.in 2008-03-27 13:41:32.000000000 +1300
++++ ../Yap-5.1.3/CLPBN/Makefile.in 2008-07-27 16:31:50.000000000 +1200
+@@ -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-5.1.3.orig/CLPQR/Makefile.in ../Yap-5.1.3/CLPQR/Makefile.in
+--- ../Yap-5.1.3.orig/CLPQR/Makefile.in 2001-11-27 05:05:18.000000000 +1300
++++ ../Yap-5.1.3/CLPQR/Makefile.in 2008-07-27 16:32:09.000000000 +1200
+@@ -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-5.1.3.orig/GPL/Makefile.in ../Yap-5.1.3/GPL/Makefile.in
+--- ../Yap-5.1.3.orig/GPL/Makefile.in 2008-06-08 21:55:34.000000000 +1200
++++ ../Yap-5.1.3/GPL/Makefile.in 2008-07-27 16:33:01.000000000 +1200
+@@ -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-5.1.3.orig/GPL/http/Makefile.in ../Yap-5.1.3/GPL/http/Makefile.in
+--- ../Yap-5.1.3.orig/GPL/http/Makefile.in 2008-02-13 06:10:06.000000000 +1300
++++ ../Yap-5.1.3/GPL/http/Makefile.in 2008-07-27 16:32:34.000000000 +1200
+@@ -16,7 +16,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-5.1.3.orig/LGPL/JPL/Makefile.in ../Yap-5.1.3/LGPL/JPL/Makefile.in
+--- ../Yap-5.1.3.orig/LGPL/JPL/Makefile.in 2005-03-13 19:26:11.000000000 +1300
++++ ../Yap-5.1.3/LGPL/JPL/Makefile.in 2008-07-27 16:33:55.000000000 +1200
+@@ -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-5.1.3.orig/LGPL/JPL/java/Makefile.in ../Yap-5.1.3/LGPL/JPL/java/Makefile.in
+--- ../Yap-5.1.3.orig/LGPL/JPL/java/Makefile.in 2007-09-28 03:25:32.000000000 +1200
++++ ../Yap-5.1.3/LGPL/JPL/java/Makefile.in 2008-07-27 16:33:38.000000000 +1200
+@@ -15,7 +15,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-5.1.3.orig/LGPL/JPL/src/Makefile.in ../Yap-5.1.3/LGPL/JPL/src/Makefile.in
+--- ../Yap-5.1.3.orig/LGPL/JPL/src/Makefile.in 2007-10-10 00:43:43.000000000 +1300
++++ ../Yap-5.1.3/LGPL/JPL/src/Makefile.in 2008-07-27 16:33:22.000000000 +1200
+@@ -19,7 +19,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/LGPL/Makefile.in ../Yap-5.1.3/LGPL/Makefile.in
+--- ../Yap-5.1.3.orig/LGPL/Makefile.in 2008-06-08 21:55:34.000000000 +1200
++++ ../Yap-5.1.3/LGPL/Makefile.in 2008-07-27 16:34:48.000000000 +1200
+@@ -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-5.1.3.orig/LGPL/clp/Makefile.in ../Yap-5.1.3/LGPL/clp/Makefile.in
+--- ../Yap-5.1.3.orig/LGPL/clp/Makefile.in 2005-10-29 06:53:27.000000000 +1300
++++ ../Yap-5.1.3/LGPL/clp/Makefile.in 2008-07-27 16:34:15.000000000 +1200
+@@ -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-5.1.3.orig/LGPL/swi_console/Makefile.in ../Yap-5.1.3/LGPL/swi_console/Makefile.in
+--- ../Yap-5.1.3.orig/LGPL/swi_console/Makefile.in 2008-03-27 13:41:32.000000000 +1300
++++ ../Yap-5.1.3/LGPL/swi_console/Makefile.in 2008-07-27 16:34:32.000000000 +1200
+@@ -8,7 +8,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/Makefile.in ../Yap-5.1.3/Makefile.in
+--- ../Yap-5.1.3.orig/Makefile.in 2008-06-05 02:47:18.000000000 +1200
++++ ../Yap-5.1.3/Makefile.in 2008-07-27 16:29:54.000000000 +1200
+@@ -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-5.1.3.orig/cplint/Makefile.in ../Yap-5.1.3/cplint/Makefile.in
+--- ../Yap-5.1.3.orig/cplint/Makefile.in 2008-03-09 04:41:01.000000000 +1300
++++ ../Yap-5.1.3/cplint/Makefile.in 2008-07-27 16:35:12.000000000 +1200
+@@ -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-5.1.3.orig/library/Makefile.in ../Yap-5.1.3/library/Makefile.in
+--- ../Yap-5.1.3.orig/library/Makefile.in 2008-06-08 21:55:34.000000000 +1200
++++ ../Yap-5.1.3/library/Makefile.in 2008-07-27 16:24:20.000000000 +1200
+@@ -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-5.1.3.orig/library/Tries/Makefile.in ../Yap-5.1.3/library/Tries/Makefile.in
+--- ../Yap-5.1.3.orig/library/Tries/Makefile.in 2004-08-12 04:14:54.000000000 +1200
++++ ../Yap-5.1.3/library/Tries/Makefile.in 2008-07-27 16:27:59.000000000 +1200
+@@ -18,7 +18,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/lammpi/Makefile.in ../Yap-5.1.3/library/lammpi/Makefile.in
+--- ../Yap-5.1.3.orig/library/lammpi/Makefile.in 2006-06-07 05:07:05.000000000 +1200
++++ ../Yap-5.1.3/library/lammpi/Makefile.in 2008-07-27 16:26:28.000000000 +1200
+@@ -16,7 +16,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/matlab/Makefile.in ../Yap-5.1.3/library/matlab/Makefile.in
+--- ../Yap-5.1.3.orig/library/matlab/Makefile.in 2007-05-25 03:11:46.000000000 +1200
++++ ../Yap-5.1.3/library/matlab/Makefile.in 2008-07-27 16:26:08.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/matrices/Makefile.in ../Yap-5.1.3/library/matrices/Makefile.in
+--- ../Yap-5.1.3.orig/library/matrices/Makefile.in 2006-12-15 06:17:01.000000000 +1300
++++ ../Yap-5.1.3/library/matrices/Makefile.in 2008-07-27 16:27:39.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/matrix/Makefile.in ../Yap-5.1.3/library/matrix/Makefile.in
+--- ../Yap-5.1.3.orig/library/matrix/Makefile.in 2006-12-24 14:33:32.000000000 +1300
++++ ../Yap-5.1.3/library/matrix/Makefile.in 2008-07-27 16:28:57.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/mpi/Makefile.in ../Yap-5.1.3/library/mpi/Makefile.in
+--- ../Yap-5.1.3.orig/library/mpi/Makefile.in 2002-02-27 06:25:33.000000000 +1300
++++ ../Yap-5.1.3/library/mpi/Makefile.in 2008-07-27 16:27:00.000000000 +1200
+@@ -20,8 +20,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-5.1.3.orig/library/random/Makefile.in ../Yap-5.1.3/library/random/Makefile.in
+--- ../Yap-5.1.3.orig/library/random/Makefile.in 2002-11-13 08:53:52.000000000 +1300
++++ ../Yap-5.1.3/library/random/Makefile.in 2008-07-27 16:25:47.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/regex/Makefile.in ../Yap-5.1.3/library/regex/Makefile.in
+--- ../Yap-5.1.3.orig/library/regex/Makefile.in 2004-10-01 09:16:20.000000000 +1200
++++ ../Yap-5.1.3/library/regex/Makefile.in 2008-07-27 16:27:21.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/rltree/Makefile.in ../Yap-5.1.3/library/rltree/Makefile.in
+--- ../Yap-5.1.3.orig/library/rltree/Makefile.in 2008-03-28 03:59:29.000000000 +1300
++++ ../Yap-5.1.3/library/rltree/Makefile.in 2008-07-27 16:25:34.000000000 +1200
+@@ -16,7 +16,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/system/Makefile.in ../Yap-5.1.3/library/system/Makefile.in
+--- ../Yap-5.1.3.orig/library/system/Makefile.in 2002-11-13 08:53:52.000000000 +1300
++++ ../Yap-5.1.3/library/system/Makefile.in 2008-07-27 16:25:17.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/tries/Makefile.in ../Yap-5.1.3/library/tries/Makefile.in
+--- ../Yap-5.1.3.orig/library/tries/Makefile.in 2008-02-23 07:57:27.000000000 +1300
++++ ../Yap-5.1.3/library/tries/Makefile.in 2008-07-27 16:28:38.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
+diff -ur ../Yap-5.1.3.orig/library/yap2swi/Makefile.in ../Yap-5.1.3/library/yap2swi/Makefile.in
+--- ../Yap-5.1.3.orig/library/yap2swi/Makefile.in 2007-09-12 22:13:38.000000000 +1200
++++ ../Yap-5.1.3/library/yap2swi/Makefile.in 2008-07-27 16:28:20.000000000 +1200
+@@ -12,7 +12,7 @@
+ #
+ # where YAP should look for libraries
+ #
+-LIBDIR=$(EROOTDIR)/lib/Yap
++LIBDIR=@libdir@/Yap
+ #
+ #
+ CC=@CC@
diff --git a/dev-lang/yap/files/yap-5.1.3-parallel-make.patch b/dev-lang/yap/files/yap-5.1.3-parallel-make.patch
new file mode 100644
index 000000000000..fa1831d2e7b9
--- /dev/null
+++ b/dev-lang/yap/files/yap-5.1.3-parallel-make.patch
@@ -0,0 +1,160 @@
+--- Yap-5.1.3.orig/Makefile.in 2008-06-05 02:47:18.000000000 +1200
++++ Yap-5.1.3/Makefile.in 2008-07-05 12:59:07.000000000 +1200
+@@ -562,17 +562,17 @@
+ $(CC) $(CFLAGS) $(srcdir)/mycb.c -o mycb
+
+ all: startup
+- @INSTALL_DLLS@ (cd library/random; make)
+- @INSTALL_DLLS@ (cd library/regex; make)
+- @INSTALL_DLLS@ (cd library/rltree; make)
+- @INSTALL_DLLS@ (cd library/system; make)
+- @INSTALL_DLLS@ (cd library/tries; make)
+- @INSTALL_DLLS@ (cd library/rltree; make)
+- @INSTALL_DLLS@ (cd library/lammpi; make)
+- @INSTALL_DLLS@ (cd library/matrix; make)
+- @INSTALL_MATLAB@ (cd library/matlab; make)
+- @ENABLE_JPL@ @INSTALL_DLLS@ (cd LGPL/JPL/src; make)
+- @ENABLE_CPLINT@ (cd cplint; make)
++ @INSTALL_DLLS@ (cd library/random; $(MAKE))
++ @INSTALL_DLLS@ (cd library/regex; $(MAKE))
++ @INSTALL_DLLS@ (cd library/rltree; $(MAKE))
++ @INSTALL_DLLS@ (cd library/system; $(MAKE))
++ @INSTALL_DLLS@ (cd library/tries; $(MAKE))
++ @INSTALL_DLLS@ (cd library/rltree; $(MAKE))
++ @INSTALL_DLLS@ (cd library/lammpi; $(MAKE))
++ @INSTALL_DLLS@ (cd library/matrix; $(MAKE))
++ @INSTALL_MATLAB@ (cd library/matlab; $(MAKE))
++ @ENABLE_JPL@ @INSTALL_DLLS@ (cd LGPL/JPL/src; $(MAKE))
++ @ENABLE_CPLINT@ (cd cplint; $(MAKE))
+
+ startup: yap@EXEC_SUFFIX@ $(PL_SOURCES)
+ -rm -f startup
+@@ -603,18 +603,18 @@
+ mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/pl
+ mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/swi
+ for f in $(PL_SOURCES); do $(INSTALL) $$f $(DESTDIR)$(SHAREDIR)/Yap/pl; done
+- @INSTALL_DLLS@ (cd library/random; make install)
+- @INSTALL_DLLS@ (cd library/regex; make install)
+- @INSTALL_DLLS@ (cd library/rltree; make install)
+- @INSTALL_DLLS@ (cd library/system; make install)
+- @INSTALL_DLLS@ (cd library/tries; make install)
+- @INSTALL_DLLS@ (cd library/lammpi; make install)
+- @INSTALL_DLLS@ (cd library/matrix; make install)
+- @INSTALL_MATLAB@ (cd library/matlab; make install)
+- @ENABLE_JPL@ @INSTALL_DLLS@ (cd LGPL/JPL/src; make install)
++ @INSTALL_DLLS@ (cd library/random; $(MAKE) install)
++ @INSTALL_DLLS@ (cd library/regex; $(MAKE) install)
++ @INSTALL_DLLS@ (cd library/rltree; $(MAKE) install)
++ @INSTALL_DLLS@ (cd library/system; $(MAKE) install)
++ @INSTALL_DLLS@ (cd library/tries; $(MAKE) install)
++ @INSTALL_DLLS@ (cd library/lammpi; $(MAKE) install)
++ @INSTALL_DLLS@ (cd library/matrix; $(MAKE) install)
++ @INSTALL_MATLAB@ (cd library/matlab; $(MAKE) install)
++ @ENABLE_JPL@ @INSTALL_DLLS@ (cd LGPL/JPL/src; $(MAKE) install)
+ mkdir -p $(DESTDIR)$(INCLUDEDIR)
+ for h in $(INTERFACE_HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done
+- @ENABLE_CPLINT@ (cd cplint; make install)
++ @ENABLE_CPLINT@ (cd cplint; $(MAKE) install)
+
+
+ install_win32: startup
+@@ -633,34 +633,34 @@
+ $(INSTALL) $(HEADERS) $(DESTDIR)$(INCLUDEDIR)
+ for h in $(INTERFACE_HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done
+ $(INSTALL) config.h $(INCLUDEDIR)/config.h
+- (cd library/random; make install)
+- (cd library/matrix; make install)
+- (cd library/regex; make install)
+- (cd library/rltree; make install)
+- (cd library/system; make install)
+- @ENABLE_WINCONSOLE@ (cd LGPL/swi_console; make install)
+- @INSTALL_MATLAB@ (cd library/matlab; make install)
+- (cd library/tries; make install)
+- @ENABLE_CPLINT@ (cd cplint; make install)
++ (cd library/random; $(MAKE) install)
++ (cd library/matrix; $(MAKE) install)
++ (cd library/regex; $(MAKE) install)
++ (cd library/rltree; $(MAKE) install)
++ (cd library/system; $(MAKE) install)
++ @ENABLE_WINCONSOLE@ (cd LGPL/swi_console; $(MAKE) install)
++ @INSTALL_MATLAB@ (cd library/matlab; $(MAKE) install)
++ (cd library/tries; $(MAKE) install)
++ @ENABLE_CPLINT@ (cd cplint; $(MAKE) install)
+
+ install_library: @YAPLIB@
+ mkdir -p $(DESTDIR)$(INCLUDEDIR)
+ for h in $(HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done
+
+ install_data:
+- (cd library ; make install)
+- (cd LGPL ; make install)
+- (cd GPL ; make install)
+- @ENABLE_JPL@ (cd LGPL/JPL ; make install)
+- @ENABLE_JPL@ (cd LGPL/JPL/java; make install)
++ (cd library ; $(MAKE) install)
++ (cd LGPL ; $(MAKE) install)
++ (cd GPL ; $(MAKE) install)
++ @ENABLE_JPL@ (cd LGPL/JPL ; $(MAKE) install)
++ @ENABLE_JPL@ (cd LGPL/JPL/java; $(MAKE) install)
+ $(INSTALL_DATA) $(srcdir)/LGPL/pillow/icon_address.pl $(DESTDIR)$(SHAREDIR)/Yap/
+ $(INSTALL_DATA) $(srcdir)/LGPL/pillow/pillow.pl $(DESTDIR)$(SHAREDIR)/Yap/
+-# (cd CLPQR ; make install)
+- @INSTALLCLP@(cd LGPL/clp ; make install)
+- @INSTALLCLP@(cd GPL/clpqr ; make install)
+-# (cd CHR ; make install)
+- @INSTALLCLP@(cd LGPL/chr ; make install)
+- @INSTALLCLP@(cd CLPBN ; make install)
++# (cd CLPQR ; $(MAKE) install)
++ @INSTALLCLP@(cd LGPL/clp ; $(MAKE) install)
++ @INSTALLCLP@(cd GPL/clpqr ; $(MAKE) install)
++# (cd CHR ; $(MAKE) install)
++ @INSTALLCLP@(cd LGPL/chr ; $(MAKE) install)
++ @INSTALLCLP@(cd CLPBN ; $(MAKE) install)
+
+
+ ##########
+@@ -677,16 +677,16 @@
+
+ clean: clean_docs
+ rm -f *.o *~ *.BAK *.a
+- @INSTALL_DLLS@ (cd library/matrix; make clean)
+- @INSTALL_DLLS@ (cd library/random; make clean)
+- @INSTALL_DLLS@ (cd library/regex; make clean)
+- @INSTALL_DLLS@ (cd library/system; make clean)
+- @INSTALL_DLLS@ (cd library/rltree; make clean)
+- @INSTALL_DLLS@ (cd library/tries; make clean)
+- @INSTALL_DLLS@ (cd library/lammpi; make clean)
+- @INSTALL_MATLAB@ (cd library/matlab; make clean)
+- @ENABLE_JPL@ @INSTALL_DLLS@ (cd LGPL/JPL/src; make clean)
+- @ENABLE_CPLINT@ (cd cplint; make clean)
++ @INSTALL_DLLS@ (cd library/matrix; $(MAKE) clean)
++ @INSTALL_DLLS@ (cd library/random; $(MAKE) clean)
++ @INSTALL_DLLS@ (cd library/regex; $(MAKE) clean)
++ @INSTALL_DLLS@ (cd library/system; $(MAKE) clean)
++ @INSTALL_DLLS@ (cd library/rltree; $(MAKE) clean)
++ @INSTALL_DLLS@ (cd library/tries; $(MAKE) clean)
++ @INSTALL_DLLS@ (cd library/lammpi; $(MAKE) clean)
++ @INSTALL_MATLAB@ (cd library/matlab; $(MAKE) clean)
++ @ENABLE_JPL@ @INSTALL_DLLS@ (cd LGPL/JPL/src; $(MAKE) clean)
++ @ENABLE_CPLINT@ (cd cplint; $(MAKE) clean)
+
+
+
+@@ -712,7 +712,7 @@
+ -Wl,--no-whole-archive $(LIBS) $(LDFLAGS)
+
+ install_info:
+- make info; \
++ $(MAKE) info; \
+ $(INSTALL) yap.info* $(DESTDIR)$(INFODIR); \
+ if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \
+ bzip2 --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \
+@@ -765,7 +765,7 @@
+ rm -f yap.ps yap.html yap_toc.html yap.pdf yap.info*
+
+ installcheck:
+- @ENABLE_CPLINT@ (cd cplint; make installcheck)
++ @ENABLE_CPLINT@ (cd cplint; $(MAKE) installcheck)
+
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
+
diff --git a/dev-lang/yap/files/yap-5.1.3-tkyap.patch b/dev-lang/yap/files/yap-5.1.3-tkyap.patch
new file mode 100644
index 000000000000..aaa51c95d674
--- /dev/null
+++ b/dev-lang/yap/files/yap-5.1.3-tkyap.patch
@@ -0,0 +1,26 @@
+--- Yap-5.1.3.orig/misc/tkyap 2006-02-21 02:18:08.000000000 +1300
++++ Yap-5.1.3/misc/tkyap 2008-07-27 16:19:14.000000000 +1200
+@@ -33,19 +33,10 @@
+ #option add "*message*Font" $TextFont
+ #option add "*list*Font" $TextFont
+
+-if {[file exists /vmlinuz]} {
+- set TextFont "*6x10*"
+- if {[file exists /home/luis/Yap94/linux]} {
+- set homeyap /home/luis/Yap94/linux
+- } else {
+- set homeyap .
+- }
+- set PrologCommand "$homeyap/yap $homeyap/startup -c localhost $service $YapOptions"
+- set SolarisBug 0
+-} else {
+- set PrologCommand "ny -h8000 -s1000"
+- set SolarisBug 1
+-}
++set TextFont "*6x10*"
++
++set PrologCommand "yap -c localhost $service $YapOptions"
++set SolarisBug 0
+
+
+
diff --git a/dev-lang/yap/yap-5.1.3.ebuild b/dev-lang/yap/yap-5.1.3.ebuild
new file mode 100644
index 000000000000..ff4b94874147
--- /dev/null
+++ b/dev-lang/yap/yap-5.1.3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/yap-5.1.3.ebuild,v 1.1 2008/07/27 05:11:50 keri Exp $
+
+inherit autotools eutils java-pkg-opt-2
+
+MY_P="Yap-${PV}"
+
+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/current/Yap-5.1.3.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 )"
+
+RDEPEND="${DEPEND}
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}"/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-config.h.patch
+ epatch "${FILESDIR}"/${P}-configure.patch
+ epatch "${FILESDIR}"/${P}-multilib.patch
+ epatch "${FILESDIR}"/${P}-parallel-make.patch
+ epatch "${FILESDIR}"/${P}-chr.patch
+ epatch "${FILESDIR}"/${P}-tkyap.patch
+
+ eautoconf
+}
+
+src_compile() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --enable-cut-c \
+ $(use_enable threads) \
+ $(use_enable threads pthread-locking) \
+ $(use_enable debug debug-yap) \
+ $(use_enable debug low-level-tracer) \
+ $(use_enable mysql myddas-mysql) \
+ $(use_enable mysql myddas-stats) \
+ $(use_enable mysql myddas-top-level) \
+ $(use_enable odbc myddas-odbc) \
+ $(use_with gmp) \
+ $(use_with readline) \
+ $(use_with mpi) \
+ $(use_with mpi mpe) \
+ $(use_with java jpl) \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" 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 docs/yap.html
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc CLPBN/clpbn/examples/cg.yap
+ dodoc CLPBN/clpbn/examples/School/*
+ fi
+}