diff options
author | Keri Harris <keri@gentoo.org> | 2006-03-24 09:09:30 +0000 |
---|---|---|
committer | Keri Harris <keri@gentoo.org> | 2006-03-24 09:09:30 +0000 |
commit | ec62b00f4d9afd0fb7bb1949e166a5cbcab4d5b7 (patch) | |
tree | fefcc92818d942bb5409c99d041b7c1e9a0e2007 /dev-lang/yap | |
parent | Marked ~ppc (diff) | |
download | gentoo-2-ec62b00f4d9afd0fb7bb1949e166a5cbcab4d5b7.tar.gz gentoo-2-ec62b00f4d9afd0fb7bb1949e166a5cbcab4d5b7.tar.bz2 gentoo-2-ec62b00f4d9afd0fb7bb1949e166a5cbcab4d5b7.zip |
Initial import. Closes bug #124014
(Portage version: 2.1_pre6-r5)
Diffstat (limited to 'dev-lang/yap')
-rw-r--r-- | dev-lang/yap/ChangeLog | 13 | ||||
-rw-r--r-- | dev-lang/yap/Manifest | 9 | ||||
-rw-r--r-- | dev-lang/yap/files/digest-yap-5.0.1 | 3 | ||||
-rw-r--r-- | dev-lang/yap/files/yap-5.0.1-analyst.patch | 16 | ||||
-rw-r--r-- | dev-lang/yap/files/yap-5.0.1-configure.patch | 20 | ||||
-rw-r--r-- | dev-lang/yap/files/yap-5.0.1-doc.patch | 72 | ||||
-rw-r--r-- | dev-lang/yap/files/yap-5.0.1-malloc.patch | 11 | ||||
-rw-r--r-- | dev-lang/yap/files/yap-5.0.1-rclause.patch | 33 | ||||
-rw-r--r-- | dev-lang/yap/files/yap-5.0.1-tabling.patch | 107 | ||||
-rw-r--r-- | dev-lang/yap/files/yap-5.0.1-tkyap.patch | 44 | ||||
-rw-r--r-- | dev-lang/yap/metadata.xml | 5 | ||||
-rw-r--r-- | dev-lang/yap/yap-5.0.1.ebuild | 79 |
12 files changed, 412 insertions, 0 deletions
diff --git a/dev-lang/yap/ChangeLog b/dev-lang/yap/ChangeLog new file mode 100644 index 000000000000..f2f3afa0693d --- /dev/null +++ b/dev-lang/yap/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for dev-lang/yap +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/ChangeLog,v 1.1 2006/03/24 09:09:30 keri Exp $ + +*yap-5.0.1 (24 Mar 2006) + + 24 Mar 2006; Keri Harris <keri@gentoo.org> +files/yap-5.0.1-analyst.patch, + +files/yap-5.0.1-configure.patch, +files/yap-5.0.1-doc.patch, + +files/yap-5.0.1-malloc.patch, +files/yap-5.0.1-rclause.patch, + +files/yap-5.0.1-tabling.patch, +files/yap-5.0.1-tkyap.patch, + +metadata.xml, +yap-5.0.1.ebuild: + Initial import. Closes bug #124014 + diff --git a/dev-lang/yap/Manifest b/dev-lang/yap/Manifest new file mode 100644 index 000000000000..583672ebd72f --- /dev/null +++ b/dev-lang/yap/Manifest @@ -0,0 +1,9 @@ +MD5 84cc267d1369b377ebc9d839910a7da2 files/digest-yap-5.0.1 232 +RMD160 f5fecf7dd7ad32b05daf768843aa4c6c728481cd files/digest-yap-5.0.1 232 +SHA256 376653f3a11c73a09aa1cef554d2bc60b36517378a442982f6e082ba9bf92856 files/digest-yap-5.0.1 232 +MD5 9187f53634e60ab7eb2ac7e98b0b19f7 metadata.xml 159 +RMD160 38d27fd1c5faabedefa5507dfd83cb4c952fbc8c metadata.xml 159 +SHA256 851bf218a4283a1d8ea6ef98af0119a40eaa78bfaaec49c2f3440437f52889ba metadata.xml 159 +MD5 1feb4cae0ad73a414ee5f092eb0351b2 yap-5.0.1.ebuild 1825 +RMD160 d0a077f11c92c4308f2f1425666b7a5104ea7de0 yap-5.0.1.ebuild 1825 +SHA256 bea7e1db5e459fc1c00221f6eca1d40c0ee6a6ccedf8e5e3493e54c8be9592c7 yap-5.0.1.ebuild 1825 diff --git a/dev-lang/yap/files/digest-yap-5.0.1 b/dev-lang/yap/files/digest-yap-5.0.1 new file mode 100644 index 000000000000..7b3427ab9ab3 --- /dev/null +++ b/dev-lang/yap/files/digest-yap-5.0.1 @@ -0,0 +1,3 @@ +MD5 d8d1f1c5a38d501eb9db38d880668eda Yap-5.0.1.tar.gz 3260612 +RMD160 5804b6b2ec8bea3956c6e42fc2eacff720fe6814 Yap-5.0.1.tar.gz 3260612 +SHA256 1556ccc148ce2d4add03e005d7d82ca096ff37f2807a9ed5bdee78f41c70df24 Yap-5.0.1.tar.gz 3260612 diff --git a/dev-lang/yap/files/yap-5.0.1-analyst.patch b/dev-lang/yap/files/yap-5.0.1-analyst.patch new file mode 100644 index 000000000000..d9d563fe962f --- /dev/null +++ b/dev-lang/yap/files/yap-5.0.1-analyst.patch @@ -0,0 +1,16 @@ +diff -ur Yap-5.0.1.orig/H/Yap.h Yap-5.0.1/H/Yap.h +--- Yap-5.0.1.orig/H/Yap.h 2005-10-18 06:55:22.000000000 +1300 ++++ Yap-5.0.1/H/Yap.h 2006-02-21 21:22:18.000000000 +1300 +@@ -53,12 +53,6 @@ + #undef TRAILING_REQUIRES_BRANCH + #endif /* YAPOR || TABLING */ + +-#if ANALYST +-#ifdef USE_THREADED_CODE +-#undef USE_THREADED_CODE +-#endif +-#endif +- + #ifdef COROUTINING + #ifndef TERM_EXTENSIONS + #define TERM_EXTENSIONS 1 diff --git a/dev-lang/yap/files/yap-5.0.1-configure.patch b/dev-lang/yap/files/yap-5.0.1-configure.patch new file mode 100644 index 000000000000..def9f5d1a80c --- /dev/null +++ b/dev-lang/yap/files/yap-5.0.1-configure.patch @@ -0,0 +1,20 @@ +--- Yap-5.0.1.orig/configure.in 2005-08-24 05:51:45.000000000 +1200 ++++ Yap-5.0.1/configure.in 2006-02-12 23:42:48.000000000 +1300 +@@ -53,7 +53,7 @@ + [ --enable-threads support system threads ], + threads="$enableval", threads=no) + AC_ARG_ENABLE(pthread-locking, +- [ --pthread-locking use pthread locking primitives for internal locking (requires threads) ], ++ [ --enable-pthread-locking use pthread locking primitives for internal locking (requires threads) ], + pthreadlocking="$enableval", pthreadlocking=no) + AC_ARG_ENABLE(max-performance, + [ --enable-max-performance try using the best flags for specific architecture ], +@@ -102,8 +102,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 diff --git a/dev-lang/yap/files/yap-5.0.1-doc.patch b/dev-lang/yap/files/yap-5.0.1-doc.patch new file mode 100644 index 000000000000..1d40b562a503 --- /dev/null +++ b/dev-lang/yap/files/yap-5.0.1-doc.patch @@ -0,0 +1,72 @@ +--- Yap-5.0.1.orig/Makefile.in 2005-10-18 06:54:17.000000000 +1300 ++++ Yap-5.0.1/Makefile.in 2006-01-29 23:13:30.000000000 +1300 +@@ -526,6 +526,10 @@ + (cd CHR ; make install) + (cd CLPBN ; make install) + ++install-doc: ++ (cd CLPQR ; make install-doc) ++ (cd CHR ; make install-doc) ++ + + ########## + TAGS: $(C_SOURCES) $(PL_SOURCES) $(HEADERS) +--- Yap-5.0.1.orig/CHR/Makefile.in 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/CHR/Makefile.in 2006-01-29 22:51:39.000000000 +1300 +@@ -84,9 +84,11 @@ + + + +-install: $(CHR_TOP) $(CHR_LICENSE) $(CHR_PROGRAMS) $(CHR_EXAMPLES) +- mkdir -p $(DESTDIR)$(SHAREDIR)/chr/examples ++install: $(CHR_TOP) $(CHR_PROGRAMS) ++ mkdir -p $(DESTDIR)$(SHAREDIR)/chr + for h in $(CHR_TOP); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done +- for h in $(CHR_LICENSE); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done + for h in $(CHR_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/chr; done ++ ++install-doc: $(CHR_EXAMPLES) ++ mkdir -p $(DESTDIR)$(SHAREDIR)/chr/examples + for h in $(CHR_EXAMPLES); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/chr/examples; done +--- Yap-5.0.1.orig/CLPBN/Makefile.in 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/CLPBN/Makefile.in 2006-01-29 22:35:10.000000000 +1300 +@@ -44,7 +44,6 @@ + + install: $(CLBN_TOP) $(CLBN_PROGRAMS) $(CLPBN_PROGRAMS) + mkdir -p $(DESTDIR)$(SHAREDIR)/clpbn +- mkdir -p $(DESTDIR)$(SHAREDIR)/clpbn/examples + for h in $(CLPBN_TOP); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done + for h in $(CLPBN_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpbn; done + # for h in $(CLPBN_EXAMPLES); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpbn/examples; done +--- Yap-5.0.1.orig/CLPQR/Makefile.in 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/CLPQR/Makefile.in 2006-01-29 22:43:04.000000000 +1300 +@@ -131,23 +131,22 @@ + $(srcdir)/clpqr/examples/SESSION/134 \ + $(srcdir)/clpqr/examples/SESSION/135 + +-install: $(CLPR_TOP) $(CLPQ_TOP) $(CLPQR_LICENSE) $(CLPQR_PROGRAMS) $(CLPQR_LOCAL)\ +- $(CLPQR_EXAMPLES) $(CLPQR_EXAMPLES_MONASH) $(CLPQR_EXAMPLES_SESSION) ++install: $(CLPR_TOP) $(CLPQ_TOP) $(CLPQR_PROGRAMS) $(CLPQR_LOCAL) + mkdir -p $(DESTDIR)$(SHAREDIR)/clpq + mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr + mkdir -p $(DESTDIR)$(SHAREDIR)/clpr +- mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples +- mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples/SESSION +- mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples/monash + for h in $(CLPQ_TOP); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done + for h in $(CLPR_TOP); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done +- for h in $(CLPQR_LICENSE); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done + for h in $(CLPQR_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr; done + for h in $(CLPQ_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpq; done + for h in $(CLPR_PROGRAMS); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpr; done + for h in $(CLPQR_LOCAL); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr; done ++ ++install-doc: $(CLPQR_EXAMPLES) $(CLPQR_EXAMPLES_MONASH) $(CLPQR_EXAMPLES_SESSION) ++ mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples ++ mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples/SESSION ++ mkdir -p $(DESTDIR)$(SHAREDIR)/clpqr/examples/monash + for h in $(CLPQR_EXAMPLES); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr/examples; done + for h in $(CLPQR_EXAMPLES_MONASH); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr/examples/monash; done + for h in $(CLPQR_EXAMPLES_SESSION); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR)/clpqr/examples/SESSION; done + +- diff --git a/dev-lang/yap/files/yap-5.0.1-malloc.patch b/dev-lang/yap/files/yap-5.0.1-malloc.patch new file mode 100644 index 000000000000..28a427f3ab03 --- /dev/null +++ b/dev-lang/yap/files/yap-5.0.1-malloc.patch @@ -0,0 +1,11 @@ +--- Yap-5.0.1.orig/C/exec.c 2005-10-18 04:21:54.000000000 +1300 ++++ Yap-5.0.1/C/exec.c 2006-02-23 22:32:20.000000000 +1300 +@@ -1362,7 +1362,7 @@ + READ_LOCK(ppe->PRWLock); + CodeAdr = ppe->CodeOfPred; + READ_UNLOCK(ppe->PRWLock); +-#if !USE_MALLOC ++#if !USE_SYSTEM_MALLOC + if (Yap_TrailTop - HeapTop < 2048) { + Yap_PrologMode = BootMode; + Yap_Error(OUT_OF_TRAIL_ERROR,TermNil, diff --git a/dev-lang/yap/files/yap-5.0.1-rclause.patch b/dev-lang/yap/files/yap-5.0.1-rclause.patch new file mode 100644 index 000000000000..c7b97a4e191c --- /dev/null +++ b/dev-lang/yap/files/yap-5.0.1-rclause.patch @@ -0,0 +1,33 @@ +--- Yap-5.0.1/H/rclause.h 2005-08-22 23:09:14.000000000 +1200 ++++ cvs/yap/H/rclause.h 2006-02-18 23:21:36.000000000 +1300 +@@ -180,6 +187,7 @@ + case _retry3: + case _retry4: + case _p_eq: ++ case _p_dif: + pc->u.l.l = PtoOpAdjust(pc->u.l.l); + pc = NEXTOP(pc,l); + break; +@@ -220,7 +228,6 @@ + case _undef_p: + case _spy_pred: + case _p_equal: +- case _p_dif: + case _p_functor: + case _enter_a_profiling: + case _count_a_call: +@@ -773,10 +783,10 @@ + /* instructions type xllll */ + case _switch_list_nl: + pc->u.ollll.pop = Yap_opcode(Yap_op_from_opcode(pc->u.ollll.pop)); +- pc->u.ollll.l1 = PtoOpAdjust(pc->u.llll.l1); +- pc->u.ollll.l2 = PtoOpAdjust(pc->u.llll.l2); +- pc->u.ollll.l3 = PtoOpAdjust(pc->u.llll.l3); +- pc->u.ollll.l4 = PtoOpAdjust(pc->u.llll.l4); ++ pc->u.ollll.l1 = PtoOpAdjust(pc->u.ollll.l1); ++ pc->u.ollll.l2 = PtoOpAdjust(pc->u.ollll.l2); ++ pc->u.ollll.l3 = PtoOpAdjust(pc->u.ollll.l3); ++ pc->u.ollll.l4 = PtoOpAdjust(pc->u.ollll.l4); + pc = NEXTOP(pc,ollll); + break; + /* instructions type xllll */ diff --git a/dev-lang/yap/files/yap-5.0.1-tabling.patch b/dev-lang/yap/files/yap-5.0.1-tabling.patch new file mode 100644 index 000000000000..523f38b041ab --- /dev/null +++ b/dev-lang/yap/files/yap-5.0.1-tabling.patch @@ -0,0 +1,107 @@ +--- Yap-5.0.1.orig/C/save.c 2005-08-25 00:21:48.000000000 +1200 ++++ Yap-5.0.1/C/save.c 2006-02-25 00:40:13.000000000 +1300 +@@ -463,7 +463,7 @@ + { + int j; + /* Then save the whole heap */ +-#if defined(YAPOR) || defined(TABLING) ++#if defined(YAPOR) || defined(TABLING) && !defined(YAP_MEMORY_ALLOC_SCHEME) + /* skip the local and global data structures */ + j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase); + putout(j); +@@ -871,7 +871,7 @@ + static int + CopyCode(void) + { +-#if defined(YAPOR) || defined(TABLING) ++#if (defined(YAPOR) || defined(TABLING)) && !defined(YAP_MEMORY_ALLOC_SCHEME) + /* skip the local and global data structures */ + CELL j = get_cell(); + if (Yap_ErrorMessage) +--- Yap-5.0.1.orig/OPTYap/opt.config.h 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/OPTYap/opt.config.h 2006-02-25 00:38:28.000000000 +1300 +@@ -26,8 +26,8 @@ + /* ----------------------------------------- ** + ** memory alloc scheme (define one) ** + ** ----------------------------------------- */ +-#define SHM_MEMORY_ALLOC_SCHEME 1 +-/* #define YAP_MEMORY_ALLOC_SCHEME 1 */ ++/* #define SHM_MEMORY_ALLOC_SCHEME 1 */ ++#define YAP_MEMORY_ALLOC_SCHEME 1 + /* #define MALLOC_MEMORY_ALLOC_SCHEME 1 */ + + /* ------------------------------------------- ** +--- Yap-5.0.1.orig/OPTYap/opt.init.c 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/OPTYap/opt.init.c 2006-02-24 22:46:00.000000000 +1300 +@@ -159,9 +159,11 @@ + + + void init_local(void) { ++#if defined(YAPOR) || defined(THREADS) ++ LOCAL = REMOTE + worker_id; ++#endif + #ifdef YAPOR + /* local data related to or-parallelism */ +- LOCAL = REMOTE + worker_id; + LOCAL_top_cp = B_BASE; + LOCAL_top_or_fr = GLOBAL_root_or_fr; + LOCAL_load = 0; +--- Yap-5.0.1.orig/OPTYap/opt.structs.h 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/OPTYap/opt.structs.h 2006-02-24 21:29:32.000000000 +1300 +@@ -41,7 +41,7 @@ + ** ---------------------- */ + + struct pages { +-#ifdef YAPOR ++#if defined(YAPOR) || defined(THREADS) + lockvar lock; + #endif /* YAPOR */ + volatile long pages_allocated; +@@ -274,9 +274,11 @@ + ** --------------------------- */ + + struct local_data{ ++#if defined(YAPOR) || defined(THREADS) ++ lockvar lock; ++#endif + #ifdef YAPOR + /* local data related to or-parallelism */ +- lockvar lock; + volatile int load; + choiceptr top_choice_point; + struct or_frame *top_or_frame; +--- Yap-5.0.1.orig/OPTYap/tab.structs.h 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/OPTYap/tab.structs.h 2006-02-24 21:49:27.000000000 +1300 +@@ -50,7 +50,7 @@ + ** ---------------------------- */ + + typedef struct table_entry { +-#ifdef YAPOR ++#if defined(YAPOR) || defined(THREADS) + lockvar lock; + #endif /* YAPOR */ + struct pred_entry *pred_entry; +@@ -149,8 +149,10 @@ + ** ------------------------------ */ + + typedef struct subgoal_frame { +-#ifdef YAPOR ++#if defined(YAPOR) || defined(THREADS) + lockvar lock; ++#endif ++#ifdef YAPOR + int generator_worker; + struct or_frame *top_or_frame_on_generator_branch; + #endif /* YAPOR */ +@@ -225,8 +227,10 @@ + ** --------------------------------- */ + + typedef struct dependency_frame { +-#ifdef YAPOR ++#if defined(YAPOR) || defined(THREADS) + lockvar lock; ++#endif ++#ifdef YAPOR + int leader_dependency_is_on_stack; + struct or_frame *top_or_frame; + #ifdef TIMESTAMP_CHECK diff --git a/dev-lang/yap/files/yap-5.0.1-tkyap.patch b/dev-lang/yap/files/yap-5.0.1-tkyap.patch new file mode 100644 index 000000000000..c476eacb228e --- /dev/null +++ b/dev-lang/yap/files/yap-5.0.1-tkyap.patch @@ -0,0 +1,44 @@ +--- Yap-5.0.1.orig/misc/tkyap 2005-08-22 23:09:14.000000000 +1200 ++++ Yap-5.0.1/misc/tkyap 2006-02-25 13:41:53.000000000 +1300 +@@ -30,19 +30,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 + + + +@@ -122,7 +113,7 @@ + menubutton .menu.exec -text "Execution" -menu .menu.exec.m -underline 0 + menu .menu.exec.m + .menu.exec.m add command -label "Interrupt" \ +- -command {global tcl_mode; set tcl_mode 0; exec kill SIGINT $pid} ++ -command {global tcl_mode; set tcl_mode 0; exec kill -SIGINT $pid} + .menu.exec.m add separator + .menu.exec.m add command -label "Statistics" -command {YapStats} + +@@ -181,7 +172,7 @@ + bind .frame.text <Control-Key-c> { + set tcl_mode 0 + .frame.text yview -pickplace end +- exec kill SIGINT $pid ++ exec kill -SIGINT $pid + } + + diff --git a/dev-lang/yap/metadata.xml b/dev-lang/yap/metadata.xml new file mode 100644 index 000000000000..1990bb86aace --- /dev/null +++ b/dev-lang/yap/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>prolog</herd> +</pkgmetadata> diff --git a/dev-lang/yap/yap-5.0.1.ebuild b/dev-lang/yap/yap-5.0.1.ebuild new file mode 100644 index 000000000000..43cbcdfdde94 --- /dev/null +++ b/dev-lang/yap/yap-5.0.1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/yap/yap-5.0.1.ebuild,v 1.1 2006/03/24 09:09:30 keri Exp $ + +inherit autotools eutils + +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/${MY_P}.tar.gz" + +LICENSE="Artistic LGPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc" +IUSE="debug doc gmp java mpi readline static tcltk threads" + +DEPEND="gmp? ( dev-libs/gmp ) + java? ( virtual/jdk ) + mpi? ( virtual/mpi ) + readline? ( sys-libs/readline )" + +RDEPEND="${DEPEND} + tcltk? ( dev-lang/tk )" + +S="${WORKDIR}"/${MY_P} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-configure.patch + epatch "${FILESDIR}"/${P}-malloc.patch + epatch "${FILESDIR}"/${P}-analyst.patch + epatch "${FILESDIR}"/${P}-rclause.patch + epatch "${FILESDIR}"/${P}-tabling.patch + epatch "${FILESDIR}"/${P}-doc.patch + epatch "${FILESDIR}"/${P}-tkyap.patch +} + +src_compile() { + eautoconf + econf \ + --enable-low-level-tracer \ + --enable-rational-trees \ + --enable-coroutining \ + --enable-tabling \ + --disable-depth-limit \ + --disable-or-parallelism \ + $(use_enable threads) \ + $(use_enable threads pthread-locking) \ + $(use_enable threads use-malloc) \ + $(use_enable !static dynamic-loading) \ + $(use_enable debug debug-yap) \ + $(use_enable debug wam-profile) \ + $(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() { + make DESTDIR="${D}" install || die "make install failed." + + if use tcltk ; then + exeinto /usr/bin + doexe misc/tkyap + fi + + if use doc ; then + make DESTDIR="${D}" install-doc || die "make install-doc failed." + dodoc docs/yap.html + fi + + dodoc changes4.3.html INSTALL README +} |