summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2007-01-28 09:19:36 +0000
committerKeri Harris <keri@gentoo.org>2007-01-28 09:19:36 +0000
commitd0371dd25939d4e27b0cb93158e77d35f5c3ec81 (patch)
treec8381009b4e276ee5ba7a379ef6f641a452a2555 /dev-lang/xsb
parentadding WANT_AUTO*, see bug #164160 (diff)
downloadgentoo-2-d0371dd25939d4e27b0cb93158e77d35f5c3ec81.tar.gz
gentoo-2-d0371dd25939d4e27b0cb93158e77d35f5c3ec81.tar.bz2
gentoo-2-d0371dd25939d4e27b0cb93158e77d35f5c3ec81.zip
Initial import.
(Portage version: 2.1.2-r4)
Diffstat (limited to 'dev-lang/xsb')
-rw-r--r--dev-lang/xsb/ChangeLog17
-rw-r--r--dev-lang/xsb/Manifest80
-rw-r--r--dev-lang/xsb/files/digest-xsb-3.0.13
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-chr_d.patch12
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-configure.patch210
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-gap.patch10
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-justify.patch12
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-libwww.patch54
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-mysql.patch90
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-nostrip.patch11
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-odbc.patch81
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-packages.patch173
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-perlmatch.patch19
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-portage.patch94
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-sgml.patch267
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-slx.patch20
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-wildmatch.patch15
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-xpath.patch69
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-xsb-script.patch30
-rw-r--r--dev-lang/xsb/metadata.xml5
-rw-r--r--dev-lang/xsb/xsb-3.0.1.ebuild199
21 files changed, 1471 insertions, 0 deletions
diff --git a/dev-lang/xsb/ChangeLog b/dev-lang/xsb/ChangeLog
new file mode 100644
index 000000000000..ae4e4e0eaecb
--- /dev/null
+++ b/dev-lang/xsb/ChangeLog
@@ -0,0 +1,17 @@
+# ChangeLog for dev-lang/xsb
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/ChangeLog,v 1.1 2007/01/28 09:19:36 keri Exp $
+
+*xsb-3.0.1 (28 Jan 2007)
+
+ 28 Jan 2007; keri <keri@gentoo.org> +files/xsb-3.0.1-chr_d.patch,
+ +files/xsb-3.0.1-configure.patch, +files/xsb-3.0.1-gap.patch,
+ +files/xsb-3.0.1-justify.patch, +files/xsb-3.0.1-libwww.patch,
+ +files/xsb-3.0.1-mysql.patch, +files/xsb-3.0.1-nostrip.patch,
+ +files/xsb-3.0.1-odbc.patch, +files/xsb-3.0.1-packages.patch,
+ +files/xsb-3.0.1-perlmatch.patch, +files/xsb-3.0.1-portage.patch,
+ +files/xsb-3.0.1-sgml.patch, +files/xsb-3.0.1-slx.patch,
+ +files/xsb-3.0.1-wildmatch.patch, +files/xsb-3.0.1-xpath.patch,
+ +files/xsb-3.0.1-xsb-script.patch, +metadata.xml, +xsb-3.0.1.ebuild:
+ Initial import.
+
diff --git a/dev-lang/xsb/Manifest b/dev-lang/xsb/Manifest
new file mode 100644
index 000000000000..c8e7ff363525
--- /dev/null
+++ b/dev-lang/xsb/Manifest
@@ -0,0 +1,80 @@
+AUX xsb-3.0.1-chr_d.patch 276 RMD160 a1fbafb1d9250403f2e9c41fbd4644983e6d2d81 SHA1 7160d59c835dcfeec36a55d948b047512b5b46d3 SHA256 70977545ff66725cd7d58dbd633016e5d88f5c21302faaa007f3fe724c62b3a8
+MD5 b2015ba2875087d48e0e03088df56e0d files/xsb-3.0.1-chr_d.patch 276
+RMD160 a1fbafb1d9250403f2e9c41fbd4644983e6d2d81 files/xsb-3.0.1-chr_d.patch 276
+SHA256 70977545ff66725cd7d58dbd633016e5d88f5c21302faaa007f3fe724c62b3a8 files/xsb-3.0.1-chr_d.patch 276
+AUX xsb-3.0.1-configure.patch 6888 RMD160 66b21bdcb73d7a83d3c97ee8d6d6e6269d70a69a SHA1 1a7c5bb98af6f6571181ccf2bf66f027c2bbe8e3 SHA256 3025bb231103b0bac65e26cd7a4bc5c44f2499486a172dd32de7585791e38107
+MD5 116ae40179a96f9c88ceb1c956965e2f files/xsb-3.0.1-configure.patch 6888
+RMD160 66b21bdcb73d7a83d3c97ee8d6d6e6269d70a69a files/xsb-3.0.1-configure.patch 6888
+SHA256 3025bb231103b0bac65e26cd7a4bc5c44f2499486a172dd32de7585791e38107 files/xsb-3.0.1-configure.patch 6888
+AUX xsb-3.0.1-gap.patch 260 RMD160 c400b6520751234c375d0b2f96d3aee7c1db1113 SHA1 8a97c36f940af3e617a0afa0503ecd1eeec41a85 SHA256 ac806517f5eb82f119426accce84b8d5371dcd39293cdec0c0398efd6f40c3e1
+MD5 a62a122bc26d9ab164ce85a4f1ddcaf1 files/xsb-3.0.1-gap.patch 260
+RMD160 c400b6520751234c375d0b2f96d3aee7c1db1113 files/xsb-3.0.1-gap.patch 260
+SHA256 ac806517f5eb82f119426accce84b8d5371dcd39293cdec0c0398efd6f40c3e1 files/xsb-3.0.1-gap.patch 260
+AUX xsb-3.0.1-justify.patch 387 RMD160 86b254aec98188ea2cead30fb45495da238c090b SHA1 e30b2992ec106167c2489c2bdb7b39c81a68fe34 SHA256 981c495d9a9ad6cb48be6bce8e26f4d5f8064ae1277b54d3c3429754e86ead2d
+MD5 d5ea66febedc04ffc9c5a16a1199b2b5 files/xsb-3.0.1-justify.patch 387
+RMD160 86b254aec98188ea2cead30fb45495da238c090b files/xsb-3.0.1-justify.patch 387
+SHA256 981c495d9a9ad6cb48be6bce8e26f4d5f8064ae1277b54d3c3429754e86ead2d files/xsb-3.0.1-justify.patch 387
+AUX xsb-3.0.1-libwww.patch 2495 RMD160 c6e92c87eea53d2160986c469f3aec5c26a77160 SHA1 4311fab84527dd4998e989985cdce71249f2e15a SHA256 9cad32a23252e2b606c3727222c704cc1ca49b6559e093b5ef4ef89a07c0ae16
+MD5 e91ded6ad224e20f085c34109cead5bb files/xsb-3.0.1-libwww.patch 2495
+RMD160 c6e92c87eea53d2160986c469f3aec5c26a77160 files/xsb-3.0.1-libwww.patch 2495
+SHA256 9cad32a23252e2b606c3727222c704cc1ca49b6559e093b5ef4ef89a07c0ae16 files/xsb-3.0.1-libwww.patch 2495
+AUX xsb-3.0.1-mysql.patch 3352 RMD160 a543f91e1246e0cdfef19334c0687e3f8490d33e SHA1 0997a2708961f0149d57458162eb7d31a2f3b4d3 SHA256 a3889879c83a6f11768c7de77796c4532f70665ff4e702e9369aca610536b1d2
+MD5 f60b0ae182ccf666e016a80bf1917313 files/xsb-3.0.1-mysql.patch 3352
+RMD160 a543f91e1246e0cdfef19334c0687e3f8490d33e files/xsb-3.0.1-mysql.patch 3352
+SHA256 a3889879c83a6f11768c7de77796c4532f70665ff4e702e9369aca610536b1d2 files/xsb-3.0.1-mysql.patch 3352
+AUX xsb-3.0.1-nostrip.patch 386 RMD160 70870e9bec4bba5e041dab904d6e1d63a9f9b706 SHA1 f68f1c7531d249cb1c7a944614065432b600e836 SHA256 2b61a337d0bc0d05e5f2c9e3118a27dd03c775fdd399786d13337de5f3ddfb3f
+MD5 dc0f8be429eca78b7a5d783958b039c6 files/xsb-3.0.1-nostrip.patch 386
+RMD160 70870e9bec4bba5e041dab904d6e1d63a9f9b706 files/xsb-3.0.1-nostrip.patch 386
+SHA256 2b61a337d0bc0d05e5f2c9e3118a27dd03c775fdd399786d13337de5f3ddfb3f files/xsb-3.0.1-nostrip.patch 386
+AUX xsb-3.0.1-odbc.patch 2734 RMD160 7ccc51e81811c18e9cd458d34b9db4de376e5fee SHA1 0e10e137901916d450019b0f907f0aa14c9be22f SHA256 95bbfbe824bad0c946f9942729cad2469de473c256d4405ecc8df968f6244b18
+MD5 fd52fdd9a5df6ce28cc471854a5e9ad0 files/xsb-3.0.1-odbc.patch 2734
+RMD160 7ccc51e81811c18e9cd458d34b9db4de376e5fee files/xsb-3.0.1-odbc.patch 2734
+SHA256 95bbfbe824bad0c946f9942729cad2469de473c256d4405ecc8df968f6244b18 files/xsb-3.0.1-odbc.patch 2734
+AUX xsb-3.0.1-packages.patch 5789 RMD160 275b3cb6ca10e407ff17533216f52a01064a1e14 SHA1 2c1dc74debb82166cd71bfc740a0c1c946692c29 SHA256 84b753a1776c141d88af134cb1563756d83679d3f8cda60a12339b496b87b01f
+MD5 2596e7b8b535541a916e30a45b4b4d2a files/xsb-3.0.1-packages.patch 5789
+RMD160 275b3cb6ca10e407ff17533216f52a01064a1e14 files/xsb-3.0.1-packages.patch 5789
+SHA256 84b753a1776c141d88af134cb1563756d83679d3f8cda60a12339b496b87b01f files/xsb-3.0.1-packages.patch 5789
+AUX xsb-3.0.1-perlmatch.patch 700 RMD160 4c8e37035a39f487c08fecc9577060b4481461df SHA1 8097044e5f324a2693c06d21ac04cfd35ada3d5f SHA256 c0a33087fa8ae9c7e1c97466f7469bd104cfa933f1484868aceab7a06b99c362
+MD5 89ecfe175ef80394b10ef41d5380c2c9 files/xsb-3.0.1-perlmatch.patch 700
+RMD160 4c8e37035a39f487c08fecc9577060b4481461df files/xsb-3.0.1-perlmatch.patch 700
+SHA256 c0a33087fa8ae9c7e1c97466f7469bd104cfa933f1484868aceab7a06b99c362 files/xsb-3.0.1-perlmatch.patch 700
+AUX xsb-3.0.1-portage.patch 3617 RMD160 0ae54041ed1c552f61cd72ec9e99364a45dba37f SHA1 13aca2e35c27d57d117592f970c84f872aebd11f SHA256 1038ea6a3d843d45a7710b5a64b374a1c065383dc032224695c06baf39a7d15c
+MD5 af6575cc6e40df49f7a0bb124ea4f0cf files/xsb-3.0.1-portage.patch 3617
+RMD160 0ae54041ed1c552f61cd72ec9e99364a45dba37f files/xsb-3.0.1-portage.patch 3617
+SHA256 1038ea6a3d843d45a7710b5a64b374a1c065383dc032224695c06baf39a7d15c files/xsb-3.0.1-portage.patch 3617
+AUX xsb-3.0.1-sgml.patch 8436 RMD160 af1b90979e34f249841555e766c507bba60144b6 SHA1 54bd92d87f5953dd7384958f8be50f428046e5fc SHA256 ee6f7b029695ac326c7de0f138d191a9f471f576a88eb485b1accee84b644f44
+MD5 f278fdf6333f91f215638d6950ac08e3 files/xsb-3.0.1-sgml.patch 8436
+RMD160 af1b90979e34f249841555e766c507bba60144b6 files/xsb-3.0.1-sgml.patch 8436
+SHA256 ee6f7b029695ac326c7de0f138d191a9f471f576a88eb485b1accee84b644f44 files/xsb-3.0.1-sgml.patch 8436
+AUX xsb-3.0.1-slx.patch 529 RMD160 a27441cc4f479946812e4c85a1de2f635e032cc1 SHA1 af5c8d0129e5c015813ef1d0b2c80bcb6dc8cda4 SHA256 5adbbc7e5f68fde249e97f53197346124217234a11e5f889e10bc730b53051e4
+MD5 42a459f173748031835743415a3e7af6 files/xsb-3.0.1-slx.patch 529
+RMD160 a27441cc4f479946812e4c85a1de2f635e032cc1 files/xsb-3.0.1-slx.patch 529
+SHA256 5adbbc7e5f68fde249e97f53197346124217234a11e5f889e10bc730b53051e4 files/xsb-3.0.1-slx.patch 529
+AUX xsb-3.0.1-wildmatch.patch 532 RMD160 8d16da2c33c0820d56fa3d823d3fa5858c7a64ae SHA1 f8a503d0be4f2bced8daede7c162128b0d35c2ed SHA256 79d5a5280bd57aa94e955e58da10726df94268e95181f9c201805f5905c7178b
+MD5 abd3370047081bb8e100b8545d79991c files/xsb-3.0.1-wildmatch.patch 532
+RMD160 8d16da2c33c0820d56fa3d823d3fa5858c7a64ae files/xsb-3.0.1-wildmatch.patch 532
+SHA256 79d5a5280bd57aa94e955e58da10726df94268e95181f9c201805f5905c7178b files/xsb-3.0.1-wildmatch.patch 532
+AUX xsb-3.0.1-xpath.patch 2359 RMD160 42b5292e58a312c197d8c33f14be8fe40737d5d7 SHA1 6a68816d12a1eb2b342ec2c157ba9c6392b759df SHA256 193028c21f02942dceed056736a911cbe6bbc763ea4bb26fab09c30232b2377d
+MD5 1e0effcdabd869915da2e7d8f5dc33a8 files/xsb-3.0.1-xpath.patch 2359
+RMD160 42b5292e58a312c197d8c33f14be8fe40737d5d7 files/xsb-3.0.1-xpath.patch 2359
+SHA256 193028c21f02942dceed056736a911cbe6bbc763ea4bb26fab09c30232b2377d files/xsb-3.0.1-xpath.patch 2359
+AUX xsb-3.0.1-xsb-script.patch 1332 RMD160 9d335ae8e929f7ac04fc5c26fe1fd3355d53bdff SHA1 3aa290e44ed59320cc5d538a1cb700eb435bdeb1 SHA256 a8f29272c0036baf80144c51b39019381a0f3e376b37714bc4adc4491aa2d14f
+MD5 6dcfe66a95367387fbc198875de18204 files/xsb-3.0.1-xsb-script.patch 1332
+RMD160 9d335ae8e929f7ac04fc5c26fe1fd3355d53bdff files/xsb-3.0.1-xsb-script.patch 1332
+SHA256 a8f29272c0036baf80144c51b39019381a0f3e376b37714bc4adc4491aa2d14f files/xsb-3.0.1-xsb-script.patch 1332
+DIST xsb-3.0.1-src.tar.gz 4523327 RMD160 6f71401ad3cc9031ec0ced16df7d9dfd594b3fb2 SHA1 8cbef419913731617ec8811dd69799406119b9ff SHA256 05e2a76befe6303ff624c8a22543444604a75815eae276e065e462a1d21ae801
+EBUILD xsb-3.0.1.ebuild 4337 RMD160 2260155d446bf2ba1b7da27adf8a3262a828dc11 SHA1 1b48e2b62fc9334f3bb37428fcf22f250ec8e773 SHA256 957c2d26ab70772490915d36bfa7e90926aafd6cb8382f094850fee874aa205d
+MD5 f1b50f42661907d75f9fe405f19e294e xsb-3.0.1.ebuild 4337
+RMD160 2260155d446bf2ba1b7da27adf8a3262a828dc11 xsb-3.0.1.ebuild 4337
+SHA256 957c2d26ab70772490915d36bfa7e90926aafd6cb8382f094850fee874aa205d xsb-3.0.1.ebuild 4337
+MISC ChangeLog 747 RMD160 c5ea309152208b85875bdd96e2b55c0585b48d25 SHA1 34084c2230a716f486a9a91bc2f3580e6783a3c7 SHA256 6b249f89493f2b38a268d55058f34902e883ae0cd9d7d76561ffdf0b69caf48a
+MD5 8391f9034a070a1f8b53794044d10c81 ChangeLog 747
+RMD160 c5ea309152208b85875bdd96e2b55c0585b48d25 ChangeLog 747
+SHA256 6b249f89493f2b38a268d55058f34902e883ae0cd9d7d76561ffdf0b69caf48a ChangeLog 747
+MISC metadata.xml 159 RMD160 38d27fd1c5faabedefa5507dfd83cb4c952fbc8c SHA1 52b92682cf41e53e71bf432537a16215bd9546b1 SHA256 851bf218a4283a1d8ea6ef98af0119a40eaa78bfaaec49c2f3440437f52889ba
+MD5 9187f53634e60ab7eb2ac7e98b0b19f7 metadata.xml 159
+RMD160 38d27fd1c5faabedefa5507dfd83cb4c952fbc8c metadata.xml 159
+SHA256 851bf218a4283a1d8ea6ef98af0119a40eaa78bfaaec49c2f3440437f52889ba metadata.xml 159
+MD5 108c2290744827c739b912ecfb12dccc files/digest-xsb-3.0.1 244
+RMD160 2f48d7725728380657e2161639ee4c2938dc5045 files/digest-xsb-3.0.1 244
+SHA256 a294fc08df0c6c018920bc7178eee32d52265705e61606cbc07a8dc1f7f70a16 files/digest-xsb-3.0.1 244
diff --git a/dev-lang/xsb/files/digest-xsb-3.0.1 b/dev-lang/xsb/files/digest-xsb-3.0.1
new file mode 100644
index 000000000000..9cb6dd1accb7
--- /dev/null
+++ b/dev-lang/xsb/files/digest-xsb-3.0.1
@@ -0,0 +1,3 @@
+MD5 eafb4b8b4067e3277776f28b10df4edc xsb-3.0.1-src.tar.gz 4523327
+RMD160 6f71401ad3cc9031ec0ced16df7d9dfd594b3fb2 xsb-3.0.1-src.tar.gz 4523327
+SHA256 05e2a76befe6303ff624c8a22543444604a75815eae276e065e462a1d21ae801 xsb-3.0.1-src.tar.gz 4523327
diff --git a/dev-lang/xsb/files/xsb-3.0.1-chr_d.patch b/dev-lang/xsb/files/xsb-3.0.1-chr_d.patch
new file mode 100644
index 000000000000..0506e87032c2
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-chr_d.patch
@@ -0,0 +1,12 @@
+--- XSB.orig/packages/chr_d.P 2006-05-26 02:49:06.000000000 +1200
++++ XSB/packages/chr_d.P 2007-01-26 20:38:58.000000000 +1300
+@@ -28,7 +28,8 @@
+ init_chr_d:-
+ bootstrap_package([chr_d],'chr_d'),
+ [chr2attv],
+- [attv_aux].
++ [attv_aux],
++ [print_chrd].
+
+ :- init_chr_d.
+
diff --git a/dev-lang/xsb/files/xsb-3.0.1-configure.patch b/dev-lang/xsb/files/xsb-3.0.1-configure.patch
new file mode 100644
index 000000000000..a4cf79cbd1b3
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-configure.patch
@@ -0,0 +1,210 @@
+--- XSB.orig/build/configure.in 2006-06-25 13:08:48.000000000 +1200
++++ XSB/build/configure.in 2007-01-28 12:01:01.000000000 +1300
+@@ -258,9 +258,9 @@
+ dnl prefix given by the user. The prefix variable will later get
+ dnl the <xsb-version> subdirectory added in.
+ orig_prefix=
+-if test "$prefix" = "NONE" -o -z "$prefix" ; then
++if test true ; then
++ install_prefix=$prefix/lib/xsb
+ prefix=$topdir
+- orig_prefix=$prefix
+ else
+ dnl strip any trailing slashes in prefix
+ prefix=`echo "${prefix}" | sed 's,\([[^/]]\)/*$,\1,'`
+@@ -321,7 +321,7 @@
+ fi
+
+ config_prefix=${topdir}/config
+-install_config_prefix=${prefix}/config
++install_config_prefix=${install_prefix}/config
+
+ if test "$config_tag" != "NONE" -a -n "$config_tag" ; then
+ config_tag="-$config_tag"
+@@ -431,11 +431,11 @@
+ config_dot_h_templ=def_config.in
+
+ dnl Check configuration for a Unix variant
+- if test "$configuration" = "NONE" ; then
+- echo '
+-- You did not tell me what kind of host system you want to configure.
+-- I will attempt to guess the kind of system this is.
+-' 1>&6
++ if test "NONE$configuration" = "NONE" ; then
++# echo '
++#- You did not tell me what kind of host system you want to configure.
++#- I will attempt to guess the kind of system this is.
++#' 1>&6
+ AC_CANONICAL_HOST
+ canonical=$host
+ configuration=$host_alias
+@@ -502,7 +502,7 @@
+
+ # site-specific directories
+ # where the site is
+-test "$site_prefix" = "NONE" && site_prefix=${orig_prefix}/site
++test "NONE$site_prefix" = "NONE" && site_prefix=${install_prefix}/site
+ # site-specific config-independent XSB libraries
+ site_libdir=${site_prefix}/lib
+ # site-specific config-dependent stuff goes
+@@ -511,17 +511,17 @@
+ site_config_libdir=${site_config_prefix}/lib
+
+ # Installation directories: We only check if they exist
+-install_libdir=${prefix}/lib
+-install_syslibdir=${prefix}/syslib
+-install_cmplibdir=${prefix}/cmplib
+-install_emudir=${prefix}/emu
+-install_scriptdir=${prefix}/bin # where the xsb invocation script goes
+-install_builddir=${prefix}/build # where the config detection scripts go
+-install_prolog_includes=${prefix}/prolog_includes
+-install_pkgdir=${prefix}/packages
+-install_pkgxmcdir=${prefix}/packages/xmc
+-install_examples=${prefix}/examples
+-install_etcdir=${prefix}/etc
++install_libdir=${install_prefix}/lib
++install_syslibdir=${install_prefix}/syslib
++install_cmplibdir=${install_prefix}/cmplib
++install_emudir=${install_prefix}/emu
++install_scriptdir=${install_prefix}/bin # where the xsb invocation script goes
++install_builddir=${install_prefix}/build # where the config detection scripts go
++install_prolog_includes=${install_prefix}/prolog_includes
++install_pkgdir=${install_prefix}/packages
++install_pkgxmcdir=${install_prefix}/packages/xmc
++install_examples=${install_prefix}/examples
++install_etcdir=${install_prefix}/etc
+
+ arch_install_config_prefix=${install_config_prefix}/${full_config_name}
+ arch_install_bindir=${arch_install_config_prefix}/bin
+@@ -550,7 +550,7 @@
+ rm -f buildxsb.lock
+ exit 1
+ fi
+-
++if false ; then
+ # Test if directories exist
+ echo "Checking installation directories..."
+
+@@ -670,7 +670,7 @@
+ test -f .missingdirs.tmp && exit 1
+
+ echo "Checking installation directories ... Done"
+-
++fi
+
+ AC_PROG_CC
+ AC_PROG_CPP
+@@ -1024,11 +1024,11 @@
+ # with_odbc=no
+ # else
+ # AC_DEFINE(XSB_ODBC)
+- cat <<EOT
+-
+-Building with support for ODBC
+-
+-EOT
++# cat <<EOT
++#
++#Building with support for ODBC
++#
++#EOT
+ # fi
+ # dnl restore CPPFLAGS
+ # CPPFLAGS="${saved_cpp_flags}"
+@@ -1132,8 +1132,8 @@
+ AC_SUBST(perl_ccflags)
+ AC_SUBST(perl_libs)
+
+-
+-# Java support
++if test "${with_interprolog}" = "yes"; then
++if test "x$JAVAC" = x; then
+ AC_CHECK_PROG(java_support, javac, "yes", "no")
+ if test "${java_support}" = "yes"; then
+ dnl after AC_CHECK_PROG, ac_dir holds the directory where javac is found
+@@ -1141,17 +1141,20 @@
+ else
+ javac=javac
+ fi
+-
++else
++ javac="$JAVAC"
++ java_support=yes
++fi
+ AC_SUBST(javac)
+ AC_SUBST(java_support)
+
+-AC_PATH_PROG(java_path,javac,no)
+-java_path=`dirname $java_path`
++#AC_PATH_PROG(java_path,javac,no)
++java_path=`dirname $javac`
+ java_path=`dirname $java_path`
+ java_path=$java_path/include
+ #java_path=`echo $java_path | sed 's,bin/javac,include,' `
+
+-if test "${with_interprolog}" = "yes"; then
++#if test "${with_interprolog}" = "yes"; then
+ if test "${java_support}" != "yes"; then
+ echo "Interprolog not supported due to failure to find Java"
+ with_interprolog=""
+@@ -1553,11 +1556,11 @@
+ LINKFLAGS="-lodbc32 ${LINKFLAGS}"
+ ;;
+ *) if test -n "${with_iodbc}"; then
+- LDFLAGS="-liodbc ${LDFLAGS}"
+- LINKFLAGS="-liodbc ${LINKFLAGS}"
++ LDFLAGS="$(iodbc-config --libs) ${LDFLAGS}"
++# LINKFLAGS="-liodbc ${LINKFLAGS}"
+ else
+- LDFLAGS="-lodbc ${LDFLAGS}"
+- LINKFLAGS="-lodbc ${LINKFLAGS}"
++ LDFLAGS="$(odbc_config --libs) ${LDFLAGS}"
++# LINKFLAGS="-lodbc ${LINKFLAGS}"
+ fi
+ esac
+ fi
+@@ -1726,11 +1729,11 @@
+ AC_SUBST(xsb_asm_extension)
+ AC_SUBST(xsb_dcl_extension)
+
+-AC_OUTPUT([ ${arch_config_prefix}/topMakefile:topMakefile.in
+- ${arch_config_prefix}/emuMakefile:emuMakefile.in
+- ${arch_config_prefix}/modMakefile:modMakefile.in
+- ${arch_config_prefix}/gppMakefile:gppMakefile.in
+- ${arch_config_prefix}/smoMakefile:smoMakefile.in
++AC_OUTPUT([ ${build_dir}/Makefile:topMakefile.in
++ ${emudir}/Makefile:emuMakefile.in
++ ${build_dir}/modMakefile:modMakefile.in
++ ${topdir}/gpp/Makefile:gppMakefile.in
++ ${build_dir}/smoMakefile:smoMakefile.in
+ ${arch_config_prefix}/makedef.sh:makedef.sh.in
+ ${arch_config_file}:${configuration_templ}
+ makexsb:makexsb.in
+@@ -1854,10 +1857,10 @@
+
+ # This is needed so that *after* XSB is installed in a common directory,
+ # users could compile packages that produce arch-specific code.
+-chmod 777 ${site_config_libdir};
+-chmod a+t ${site_config_libdir};
+-chmod 777 ${arch_install_config_libdir};
+-chmod a+t ${arch_install_config_libdir};
++# chmod 777 ${site_config_libdir};
++# chmod a+t ${site_config_libdir};
++# chmod 777 ${arch_install_config_libdir};
++# chmod a+t ${arch_install_config_libdir};
+
+
+ dnl Add site dynamic libraries to XSB library path
+@@ -1904,9 +1907,9 @@
+ # configuring for Windows over Samba, NFS, etc.
+ chmod 644 ${arch_config_file} \
+ ${arch_config_prefix}/xsb_config.h \
+- ${arch_config_prefix}/xsb_debug.h \
+- ${arch_config_prefix}/*Makefile \
+- ${arch_config_prefix}/MSVC*
++ ${arch_config_prefix}/xsb_debug.h
++# ${arch_config_prefix}/*Makefile \
++# ${arch_config_prefix}/MSVC*
+
+
+ # phantom private_builtin.c file
diff --git a/dev-lang/xsb/files/xsb-3.0.1-gap.patch b/dev-lang/xsb/files/xsb-3.0.1-gap.patch
new file mode 100644
index 000000000000..245e5f0b1e51
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-gap.patch
@@ -0,0 +1,10 @@
+--- XSB.orig/packages/gap.P 1999-12-31 07:20:55.000000000 +1300
++++ XSB/packages/gap.P 2007-01-26 19:43:27.000000000 +1300
+@@ -33,5 +33,6 @@
+
+ gap_meta(Call):- meta(Call).
+
+-:- bootstrap_package('gap',gap).
++:- bootstrap_package('gap',gap),
++ [gapmeta].
+
diff --git a/dev-lang/xsb/files/xsb-3.0.1-justify.patch b/dev-lang/xsb/files/xsb-3.0.1-justify.patch
new file mode 100644
index 000000000000..20a9143a5318
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-justify.patch
@@ -0,0 +1,12 @@
+--- XSB.orig/packages/justify.P 2006-01-02 11:03:26.000000000 +1300
++++ XSB/packages/justify.P 2007-01-26 20:01:49.000000000 +1300
+@@ -11,7 +11,8 @@
+
+ :- import bootstrap_package/2 from packaging.
+ :- import slash/1 from machine.
+-:- bootstrap_package('justify',justify).
++:- bootstrap_package('justify',justify),
++ [jxm].
+
+ :- import jxm_/1, just_true_/2, just_false_/2 from jxm.
+
diff --git a/dev-lang/xsb/files/xsb-3.0.1-libwww.patch b/dev-lang/xsb/files/xsb-3.0.1-libwww.patch
new file mode 100644
index 000000000000..478df6b2115e
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-libwww.patch
@@ -0,0 +1,54 @@
+diff -ur XSB.orig/packages/libwww/cc/libwww_parse_html.c XSB/packages/libwww/cc/libwww_parse_html.c
+--- XSB.orig/packages/libwww/cc/libwww_parse_html.c 2003-12-31 14:04:51.000000000 +1300
++++ XSB/packages/libwww/cc/libwww_parse_html.c 2007-01-27 16:42:10.000000000 +1300
+@@ -138,7 +138,7 @@
+
+ /* put the text string into the elt term and then pop it */
+ if (context->convert2list)
+- c2p_chars(pcdata_buf.string+shift, p2p_arg(STACK_TOP(htext).elt_term,3));
++ c2p_chars(pcdata_buf.string+shift, 4, p2p_arg(STACK_TOP(htext).elt_term,3));
+ else
+ c2p_string(pcdata_buf.string+shift, p2p_arg(STACK_TOP(htext).elt_term,3));
+
+diff -ur XSB.orig/packages/libwww/cc/libwww_parse_xml.c XSB/packages/libwww/cc/libwww_parse_xml.c
+--- XSB.orig/packages/libwww/cc/libwww_parse_xml.c 2003-12-31 14:04:51.000000000 +1300
++++ XSB/packages/libwww/cc/libwww_parse_xml.c 2007-01-27 16:42:44.000000000 +1300
+@@ -174,7 +174,7 @@
+
+ /* put the text string into the elt term and then pop it */
+ if (context->convert2list)
+- c2p_chars(pcdata_buf.string+shift,
++ c2p_chars(pcdata_buf.string+shift, 4,
+ p2p_arg(STACK_TOP(userdata_obj).elt_term,3));
+ else
+ c2p_string(pcdata_buf.string+shift,
+diff -ur XSB.orig/packages/libwww/cc/libwww_request.c XSB/packages/libwww/cc/libwww_request.c
+--- XSB.orig/packages/libwww/cc/libwww_request.c 2005-02-27 08:19:51.000000000 +1300
++++ XSB/packages/libwww/cc/libwww_request.c 2007-01-27 16:46:55.000000000 +1300
+@@ -959,7 +959,7 @@
+
+ if (result_as_string) {
+ if (context->convert2list)
+- c2p_chars(result_as_string, context->request_result);
++ c2p_chars(result_as_string, 5, context->request_result);
+ else c2p_string(result_as_string, context->request_result);
+ }
+ /* Note: HTChunk_toCString frees the chunk, and here we free the chank
+diff -ur XSB.orig/packages/libwww/configure XSB/packages/libwww/configure
+--- XSB.orig/packages/libwww/configure 2003-09-29 20:26:50.000000000 +1200
++++ XSB/packages/libwww/configure 2007-01-27 17:01:15.000000000 +1300
+@@ -562,10 +562,10 @@
+
+
+ if test -z "$with_config"; then
+-echo '
+-- You did not tell me what kind of host system you want to configure.
+-- I will attempt to guess the kind of system this is.
+-' 1>&6
++#echo '
++#- You did not tell me what kind of host system you want to configure.
++#- I will attempt to guess the kind of system this is.
++#' 1>&6
+
+ # Make sure we can run config.sub.
+ if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
diff --git a/dev-lang/xsb/files/xsb-3.0.1-mysql.patch b/dev-lang/xsb/files/xsb-3.0.1-mysql.patch
new file mode 100644
index 000000000000..b7949f740ea0
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-mysql.patch
@@ -0,0 +1,90 @@
+diff -ur XSB.orig/packages/dbdrivers/mysql/cc/mysql_driver_defs.h XSB/packages/dbdrivers/mysql/cc/mysql_driver_defs.h
+--- XSB.orig/packages/dbdrivers/mysql/cc/mysql_driver_defs.h 2006-02-12 18:21:03.000000000 +1300
++++ XSB/packages/dbdrivers/mysql/cc/mysql_driver_defs.h 2007-01-28 12:01:01.000000000 +1300
+@@ -35,7 +35,7 @@
+ #include "driver_manager_defs.h"
+
+ #define MAX_HANDLES 25
+-#define MAX_QUERIES 25
++#define MAX_QUERIES 100
+
+ /****** data structures for handles *****/
+
+diff -ur XSB.orig/packages/dbdrivers/mysql/configure XSB/packages/dbdrivers/mysql/configure
+--- XSB.orig/packages/dbdrivers/mysql/configure 2003-09-29 21:40:02.000000000 +1200
++++ XSB/packages/dbdrivers/mysql/configure 2007-01-28 12:01:01.000000000 +1300
+@@ -564,10 +564,10 @@
+
+
+ if test -z "$with_config"; then
+-echo '
+-- You did not tell me what kind of host system you want to configure.
+-- I will attempt to guess the kind of system this is.
+-' 1>&6
++#echo '
++#- You did not tell me what kind of host system you want to configure.
++#- I will attempt to guess the kind of system this is.
++#' 1>&6
+
+ # Make sure we can run config.sub.
+ if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+@@ -626,8 +626,8 @@
+ LDFLAGS="-L${libdir} ${LDFLAGS}"
+ fi
+
+-echo $ac_n "checking for in -lmysqlclient""... $ac_c" 1>&6
+-echo "configure:631: checking for in -lmysqlclient" >&5
++echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6
++echo "configure:631: checking for mysql_init in -lmysqlclient" >&5
+ ac_lib_var=`echo mysqlclient'_' | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -640,10 +640,10 @@
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char ();
++char mysql_init ();
+
+ int main() {
+-()
++return mysql_init();
+ ; return 0; }
+ EOF
+ if { (eval echo configure:650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+@@ -661,9 +661,9 @@
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- mysql_error=yes
+ else
+ echo "$ac_t""no" 1>&6
++ mysql_error=yes
+ fi
+
+ # Here we provide additional directories to check headers in
+@@ -808,10 +808,8 @@
+ support=yes
+ fi
+
+-
+-
+-
+-
++CFLAGS=`mysql_config --cflags`
++LDFLAGS=`mysql_config --libs`
+
+
+
+diff -ur XSB.orig/packages/dbdrivers/mysql/mysql_driver_config.P XSB/packages/dbdrivers/mysql/mysql_driver_config.P
+--- XSB.orig/packages/dbdrivers/mysql/mysql_driver_config.P 2006-02-12 18:21:04.000000000 +1300
++++ XSB/packages/dbdrivers/mysql/mysql_driver_config.P 2007-01-28 21:23:55.000000000 +1300
+@@ -43,7 +43,7 @@
+ %% Creates something like -Wl,-rpath,<libdir>
+ runtime_loader_flag(XCC, MysqlLibdir, MysqlRunpathFlag),
+ fmt_write_string(LD_flags,
+- ' %s %s -lmysqlclient -ldl %s%sdriver_manager.so %s%smysql_driver.so', f(MysqlRunpathFlag, MysqlLibdir_flag, ConfigLibdir, Slash, ConfigLibdir, Slash)),
++ ' %s %s -lmysqlclient -ldl ./driver_manager.so', f(MysqlRunpathFlag, MysqlLibdir_flag)),
+ package_configuration(dir(mysql_driver), MySQLDriverDir),
+ fmt_write_string(LD_directives_file,
+ '%s%scc%smysql_driver.H', f(MySQLDriverDir, Slash, Slash)),
diff --git a/dev-lang/xsb/files/xsb-3.0.1-nostrip.patch b/dev-lang/xsb/files/xsb-3.0.1-nostrip.patch
new file mode 100644
index 000000000000..0d601c4d9f0e
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-nostrip.patch
@@ -0,0 +1,11 @@
+--- XSB.orig/lib/foreign.P 2006-06-12 09:41:56.000000000 +1200
++++ XSB/lib/foreign.P 2007-01-28 21:51:52.000000000 +1300
+@@ -104,7 +104,7 @@
+ %% If not debugging, the strip the symbol table from the result
+ ( str_sub(' -g', CC_Opts)
+ -> SymbolTableFlag = ' '
+- ; SymbolTableFlag = ' -s'
++ ; SymbolTableFlag = ' '
+ ),
+ ( var(CompComm)
+ -> ( str_sub('solaris', Configuration)
diff --git a/dev-lang/xsb/files/xsb-3.0.1-odbc.patch b/dev-lang/xsb/files/xsb-3.0.1-odbc.patch
new file mode 100644
index 000000000000..bc3b6207d3f8
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-odbc.patch
@@ -0,0 +1,81 @@
+diff -ur XSB.orig/packages/dbdrivers/odbc/configure XSB/packages/dbdrivers/odbc/configure
+--- XSB.orig/packages/dbdrivers/odbc/configure 2003-09-29 21:40:01.000000000 +1200
++++ XSB/packages/dbdrivers/odbc/configure 2007-01-28 12:01:01.000000000 +1300
+@@ -564,10 +564,10 @@
+
+
+ if test -z "$with_config"; then
+-echo '
+-- You did not tell me what kind of host system you want to configure.
+-- I will attempt to guess the kind of system this is.
+-' 1>&6
++#echo '
++#- You did not tell me what kind of host system you want to configure.
++#- I will attempt to guess the kind of system this is.
++#' 1>&6
+
+ # Make sure we can run config.sub.
+ if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+@@ -626,8 +626,8 @@
+ LDFLAGS="-L${with_odbc_libdir} ${LDFLAGS}"
+ fi
+
+-echo $ac_n "checking for in -lodbc""... $ac_c" 1>&6
+-echo "configure:631: checking for in -lodbc" >&5
++echo $ac_n "checking for SQLAllocEnv in -lodbc""... $ac_c" 1>&6
++echo "configure:631: checking for SQLAllocEnv in -lodbc" >&5
+ ac_lib_var=`echo odbc'_' | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -640,10 +640,10 @@
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char ();
++char SQLAllocEnv ();
+
+ int main() {
+-()
++return SQLAllocEnv ();
+ ; return 0; }
+ EOF
+ if { (eval echo configure:650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+@@ -661,9 +661,9 @@
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- odbc_error=yes
+ else
+ echo "$ac_t""no" 1>&6
++ odbc_error=yes
+ fi
+
+
+@@ -809,9 +809,9 @@
+ support=yes
+ fi
+
+-
+-
+-
++libdir=`odbc_config --lib-prefix`
++CFLAGS=`odbc_config --cflags`
++LDFLAGS=`odbc_config --libs`
+
+
+
+diff -ur XSB.orig/packages/dbdrivers/odbc/odbc_driver_config.P XSB/packages/dbdrivers/odbc/odbc_driver_config.P
+--- XSB.orig/packages/dbdrivers/odbc/odbc_driver_config.P 2006-02-12 18:21:03.000000000 +1300
++++ XSB/packages/dbdrivers/odbc/odbc_driver_config.P 2007-01-28 21:05:54.000000000 +1300
+@@ -64,9 +64,8 @@
+ ConfigLibDir, Slash, ConfigLibDir, Slash))
+ ; %% other unixes
+ fmt_write_string(LD_flags,
+- ' %s %s %s%sdriver_manager.so %s%sodbc_driver.so -lodbc -ldl',
+- f(OdbcRunpathFlag, ODBC_libdir_flag,
+- ConfigLibDir, Slash, ConfigLibDir, Slash))
++ ' %s %s ./driver_manager.so -lodbc -ldl',
++ f(OdbcRunpathFlag, ODBC_libdir_flag))
+ ),
+ package_configuration(dir(odbc_driver), ODBCDriverDir),
+ fmt_write_string(LD_directives_file,
diff --git a/dev-lang/xsb/files/xsb-3.0.1-packages.patch b/dev-lang/xsb/files/xsb-3.0.1-packages.patch
new file mode 100644
index 000000000000..a8e3fd28af6c
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-packages.patch
@@ -0,0 +1,173 @@
+--- XSB.orig/packages/Makefile 2006-05-22 14:10:22.000000000 +1200
++++ XSB/packages/Makefile 2007-01-28 21:05:11.000000000 +1300
+@@ -22,17 +22,63 @@
+ ##
+ ##
+
++config_libdir=../config/*/lib
++
+ OBJEXT=.xwam
+
+-ALL = slx${OBJEXT} perlmatch${OBJEXT} gap${OBJEXT} \
+- regmatch${OBJEXT} wildmatch${OBJEXT} \
+- xasp${OBJEXT} libwww${OBJEXT} xsbdoc${OBJEXT} \
+- xmc${OBJEXT} justify${OBJEXT}
++#ALL =
++ALL = chr.xwam chr_d.xwam gap.xwam justify.xwam regmatch.xwam sgml.xwam slx.xwam wildmatch.xwam
+
+-SUBDIR = flora2 slx perlmatch gap regmatch wildmatch libwww xasp \
+- xsbdoc xmc justify
++#SUBMODULES =
++SUBMODULES = chr/chr_interp.xwam chr/chr_pp.xwam chr_d/attv_aux.xwam chr_d/chr2attv.xwam chr_d/print_chrd.xwam gap/gapmeta.xwam justify/jxm.xwam regmatch/regmtchconfig.xwam sgml/sgmlconfig.xwam slx/slxshell.xwam wildmatch/wldmtchconfig.xwam
++#SUBMODULES = xsbdoc/autodoc.xwam xsbdoc/autodocformats.xwam xsbdoc/ciaoaux.xwam xsbdoc/full_ciao_ops.xwam xsbdoc/rewrite_command.xwam xsbdoc/xsbdoc1.xwam xsbdoc/xsbdoc_term_proc.xwam
++
++#ARCHMODULES =
++ARCHMODULES = $(config_libdir)/sgml2pl.xwam $(config_libdir)/xsb_re_match.xwam $(config_libdir)/xsb_wildmatch.xwam
++
++#SOLIBS =
++SOLIBS = $(config_libdir)/sgml2pl.so $(config_libdir)/xsb_re_match.so $(config_libdir)/xsb_wildmatch.so
++
++#HEADERS =
++HEADERS = regmatch/cc/xsb_re_match.H sgml/cc/sgml2pl.H wildmatch/cc/xsb_wildmatch.H
++
++DBDRIVERS = dbdrivers.xwam
++DBDRIVERSSUBMODULES = dbdrivers/db_interface.xwam
++DBDRIVERSARCHMODULES = $(config_libdir)/driver_manager.xwam
++DBDRIVERSSOLIBS = $(config_libdir)/driver_manager.so
++DBDRIVERSHEADERS = dbdrivers/db_interface.H dbdrivers/cc/driver_manager.H
++
++LIBWWW = libwww.xwam
++LIBWWWSUBMODULES = libwww/libwww_init.xwam libwww/libwwwconfig.xwam
++LIBWWWARCHMODULES = $(config_libdir)/libwww_request.xwam
++LIBWWWSOLIBS = $(config_libdir)/libwww_parse_html.so $(config_libdir)/libwww_parse_rdf.so $(config_libdir)/libwww_parse_xml.so $(config_libdir)/libwww_request.so
++LIBWWWHEADERS = libwww/cc/libwww_request.H
++
++MYSQL = dbdrivers/mysql.xwam
++MYSQLSUBMODULES = dbdrivers/mysql/mysql_driver_config.xwam dbdrivers/mysql/mysql_init.xwam
++MYSQLARCHMODULES = $(config_libdir)/mysql_driver.xwam
++MYSQLSOLIBS = $(config_libdir)/mysql_driver.so
++MYSQLHEADERS = dbdrivers/mysql/cc/mysql_driver.H
++
++ODBC = dbdrivers/odbc.xwam
++ODBCSUBMODULES = dbdrivers/odbc/odbc_driver_config.xwam dbdrivers/odbc/odbc_init.xwam
++ODBCARCHMODULES = $(config_libdir)/odbc_driver.xwam
++ODBCSOLIBS = $(config_libdir)/odbc_driver.so
++ODBCHEADERS = dbdrivers/odbc/cc/odbc_driver.H
++
++PERLMATCH = perlmatch.xwam
++PERLSUBMODULES = perlmatch/plmchconfig.xwam perlmatch/plmchshell.xwam
++PERLARCHMODULES = $(config_libdir)/xsbpattern.xwam
++PERLSOLIBS = $(config_libdir)/xsbpattern.so
++PERLHEADERS = perlmatch/cc/xsbpattern.H
++
++XPATH = xpath.xwam
++XPATHSUBMODULES = xpath/xpath_init.xwam xpath/xpathconfig.xwam
++XPATHARCHMODULES = $(config_libdir)/xpathparser.xwam
++XPATHSOLIBS = $(config_libdir)/xpathparser.so
++XPATHHEADERS = xpath/cc/xpathparser.H
+
+-Option = [optimize]
++Option = [optimize,quit_on_error]
+
+ #-----------------------------------------------------------------------#
+ #
+@@ -51,20 +97,28 @@
+
+
+ # continue to the next when one error occurs
+-.IGNORE:
++#.IGNORE:
+
+ # suffix rules
+ .SUFFIXES: .P ${OBJEXT} .H
+
+ .P${OBJEXT}:
+- echo 'mc($*, $(Option)).' >> cmd...
+-
++ echo 'mc($*, $(Option)). [$*].' >> cmd...
+
+ all: init $(ALL) finish $(SUBDIR)
+ @../build/touch.sh cmd...
+ $(Prolog) < cmd...
+ @rm cmd...
+ @cat $(SVFILE)
++ @for f in $(ARCHMODULES) $(SOLIBS) $(SUBMODULES) $(HEADERS); do \
++ if [ ! -f $$f ]; then echo "$$f not build"; exit 1; fi; \
++ done
++
++dbdrivers/mysql.xwam: dbdrivers/mysql.P
++ echo 'mc($*, $(Option)). [dbdrivers], [mysql].' >> cmd...
++
++dbdrivers/odbc.xwam: dbdrivers/odbc.P
++ echo 'mc($*, $(Option)). [dbdrivers], [odbc].' >> cmd...
+
+ # clpqr::
+ # @echo ""
+@@ -82,13 +136,61 @@
+ @echo ""
+ cd iprolog; make
+
+-libwww::
+- @echo ""
+- cd libwww; make
++dbdrivers: init $(DBDRIVERS) finish
++ @../build/touch.sh cmd...
++ $(Prolog) < cmd...
++ @rm cmd...
++ @cat $(SVFILE)
++ @for f in $(DBDRIVERSARCHMODULES) $(DBDRIVERSSOLIBS) $(DBDRIVERSSUBMODULES) $(DBDRIVERSHEADERS); do \
++ if [ ! -f $$f ]; then echo "$$f not build"; exit 1; fi; \
++ done
+
+-perlmatch::
+- @echo ""
+- cd perlmatch; make
++libwww: init $(LIBWWW) finish
++ @../build/touch.sh cmd...
++ $(Prolog) < cmd...
++ @rm cmd...
++ @cat $(SVFILE)
++ @for f in $(LIBWWWARCHMODULES) $(LIBWWWSOLIBS) $(LIBWWWSUBMODULES) $(LIBWWWHEADERS); do \
++ if [ ! -f $$f ]; then echo "$$f not build"; exit 1; fi; \
++ done
++
++mysql: dbdrivers init $(MYSQL) finish
++ @cp ../config/*/lib/driver_manager.so ./
++ @../build/touch.sh cmd...
++ $(Prolog) < cmd...
++ @rm cmd...
++ @cat $(SVFILE)
++ @for f in $(MYSQL) $(MYSQLARCHMODULES) $(MYSQLSOLIBS) $(MYSQLSUBMODULES) $(MYSQLHEADERS); do \
++ if [ ! -f $$f ]; then echo "$$f not build"; exit 1; fi; \
++ done
++
++odbc: dbdrivers init $(ODBC) finish
++ @cp ../config/*/lib/driver_manager.so ./
++ @../build/touch.sh cmd...
++ $(Prolog) < cmd...
++ @rm cmd...
++ @cat $(SVFILE)
++ @for f in $(ODBC) $(ODBCARCHMODULES) $(ODBCSOLIBS) $(ODBCSUBMODULES) $(ODBCHEADERS); do \
++ if [ ! -f $$f ]; then echo "$$f not build"; exit 1; fi; \
++ done
++
++perlmatch: init $(PERLMATCH) finish
++ @../build/touch.sh cmd...
++ $(Prolog) < cmd...
++ @rm cmd...
++ @cat $(SVFILE)
++ @for f in $(PERLARCHMODULES) $(PERLSOLIBS) $(PERLSUBMODULES) $(PERLHEADERS); do \
++ if [ ! -f $$f ]; then echo "$$f not build"; exit 1; fi; \
++ done
++
++xpath: init $(XPATH) finish
++ @../build/touch.sh cmd...
++ $(Prolog) < cmd...
++ @rm cmd...
++ @cat $(SVFILE)
++ @for f in $(XPATHARCHMODULES) $(XPATHSOLIBS) $(XPATHSUBMODULES) $(XPATHHEADERS); do \
++ if [ ! -f $$f ]; then echo "$$f not build"; exit 1; fi; \
++ done
+
+ xasp::
+ @echo ""
diff --git a/dev-lang/xsb/files/xsb-3.0.1-perlmatch.patch b/dev-lang/xsb/files/xsb-3.0.1-perlmatch.patch
new file mode 100644
index 000000000000..7ffe9d02d7b4
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-perlmatch.patch
@@ -0,0 +1,19 @@
+--- XSB.orig/packages/perlmatch/cc/xsbpattern.c 2003-04-16 05:16:24.000000000 +1200
++++ XSB/packages/perlmatch/cc/xsbpattern.c 2007-01-26 21:07:57.000000000 +1300
+@@ -39,6 +39,7 @@
+ #include "interface.h"
+ #include "perlpattern.c" /* pattern match basic functions */
+
++int load_perl__( void );
+ void build_sub_match_spec( void );
+ int is_global_pattern( char *);
+ int global_pattern_mode = FALSE;
+@@ -181,7 +182,7 @@
+ SV *text; /* Perl representation for the string to be
+ modified by substitution */
+ char *subst_cmd = ptoc_string(2);
+- int i;
++
+
+ /* first load the perl interpreter, if unloaded */
+ if (perlObjectStatus == UNLOADED) load_perl__();
diff --git a/dev-lang/xsb/files/xsb-3.0.1-portage.patch b/dev-lang/xsb/files/xsb-3.0.1-portage.patch
new file mode 100644
index 000000000000..1404def1e396
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-portage.patch
@@ -0,0 +1,94 @@
+--- XSB.orig/build/topMakefile.in 2006-06-25 13:09:42.000000000 +1200
++++ XSB/build/topMakefile.in 2007-01-28 12:01:01.000000000 +1300
+@@ -72,7 +72,7 @@
+ # Everything is placed in subdirectories of this directory.
+ # The values for many of the variables below are expressed
+ # in terms of this one, so you do not need to change them.
+-prefix=@prefix@
++prefix=$(DESTDIR)/usr/lib/xsb
+
+ srcdir=@topdir@
+ VPATH=$(srcdir)
+@@ -101,7 +101,7 @@
+
+ # Like `prefix', but used for architecture-specific files.
+ src_config_prefix=@arch_config_prefix@
+-install_config_prefix=@arch_install_config_prefix@
++install_config_prefix=$(DESTDIR)@arch_install_config_prefix@
+ # we copy the xsb.o module here
+ install_config_objlibdir=$(install_config_prefix)/saved.o
+
+@@ -150,7 +150,7 @@
+ emumake_goal=@emumake_goal@
+
+ # Normal user
+-all: prepare emu xsbmod xsbdll gpp remake_dot_O_files register emu_clean
++all: prepare emu xsbmod xsbdll gpp remake_dot_O_files emu_clean
+
+ # Developer who just checked out or updated CVS copy
+ devel: prepare emu xsbmod xsbdll gpp remake_dot_O_files emu_clean
+@@ -178,18 +178,11 @@
+ @cat $(srcdir)/build/.*.tmp 2> /dev/null | \
+ tee -a Installation_summary
+ prepare:
+- @cd $(src_emudir); \
+- rm -f *.o Makefile 2> /dev/null || echo "" ; \
+- ln -s ${src_config_objlibdir}/*.o . 2> /dev/null || echo "" ; \
+- ln -s ${src_config_prefix}/emuMakefile ./Makefile
+- @cd $(srcdir)/gpp; \
+- rm -f *.o Makefile ; \
+- ln -s ${src_config_prefix}/gppMakefile ./Makefile
+- @rm -f $(srcdir)/build/.*.tmp
++ @mkdir $(src_bindir)
++ @mkdir $(src_config_objlibdir)
+
+ emu: ${src_config_prefix}/xsb_config.h ${src_config_prefix}/xsb_debug.h
+ @cd ${src_emudir}; \
+- make depend; \
+ rm -f $(srcdir)/build/.xsb_build_failed; \
+ (make EXECUTABLE="$(EXECUTABLE)" $(emumake_goal) || \
+ $(srcdir)/build/touch.sh $(srcdir)/build/.xsb_build_failed) \
+@@ -266,7 +259,7 @@
+ @./register.sh
+
+
+-install:: make_directories copy_files configure_packages_install
++install:: make_directories copy_files
+
+ make_directories::
+ @echo "Verifying that installtion directories exist..."
+@@ -296,11 +289,6 @@
+ mkdir -p "${install_scriptdir}" ) && \
+ echo "ok" || \
+ (echo "FAILED"; echo "+++Can't create ${install_scriptdir}" >> .missingdirs.tmp)
+- @echo -n "Directory: ${install_builddir}..."
+- @(test -d "${install_builddir}" || \
+- mkdir -p "${install_builddir}" ) && \
+- echo "ok" || \
+- (echo "FAILED"; echo "+++Can't create ${install_builddir}" >> .missingdirs.tmp)
+ @echo -n "Directory: ${install_bindir}..."
+ @(test -d "${install_bindir}" || \
+ mkdir -p "${install_bindir}" ) && \
+@@ -357,10 +345,6 @@
+ cp -f ${src_scriptdir}/xsb${config_tag} \
+ ${install_scriptdir}/xsb${config_tag}; \
+ chmod 755 ${install_scriptdir}/* ${install_bindir}/* ; \
+- cp -f ${srcdir}/build/config.sub \
+- ${srcdir}/build/config.guess \
+- ${prefix}/build; \
+- chmod 755 ${prefix}/build/* ; \
+ echo "Copying config..." ; \
+ cp -f ${src_config_libdir}/xsb_configuration.* \
+ ${install_config_libdir} ; \
+@@ -396,11 +380,6 @@
+ cp -f ${src_cmplibdir}/*$(xsb_obj_extension) ${install_cmplibdir} ; \
+ chmod 644 ${install_cmplibdir}/*$(xsb_obj_extension) ; \
+ ./copysubdirs.sh ${src_cmplibdir} ${install_cmplibdir} ; \
+- echo "Copying packages..."; \
+- cp -f ${src_pkgdir}/*$(xsb_obj_extension) ${install_pkgdir}; \
+- cp -f ${src_pkgdir}/*.P ${install_pkgdir}; \
+- ./touch.sh ${install_pkgdir}/*$(xsb_obj_extension); \
+- ./copysubdirs.sh ${src_pkgdir} ${install_pkgdir} ; \
+ echo "Copying etc..."; \
+ cp -fr ${src_etcdir}/* ${install_etcdir}; \
+ echo "Copying examples..."; \
diff --git a/dev-lang/xsb/files/xsb-3.0.1-sgml.patch b/dev-lang/xsb/files/xsb-3.0.1-sgml.patch
new file mode 100644
index 000000000000..1ecad966f0c6
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-sgml.patch
@@ -0,0 +1,267 @@
+diff -ur XSB.orig/packages/sgml/cc/fetch_file.c XSB/packages/sgml/cc/fetch_file.c
+--- XSB.orig/packages/sgml/cc/fetch_file.c 2005-03-14 18:43:28.000000000 +1300
++++ XSB/packages/sgml/cc/fetch_file.c 2007-01-26 21:48:07.000000000 +1300
+@@ -336,7 +336,7 @@
+
+ if( (strstr( *source, "Error 503")!= NULL)
+ || (strstr( *source, "503 Service Unavailable")!=NULL)){
+- strstr( *source, "503 Service Unavailable") ;
++ strcpy( *source, "503 Service Unavailable") ;
+ return FALSE;
+ }
+
+diff -ur XSB.orig/packages/sgml/cc/parser.c XSB/packages/sgml/cc/parser.c
+--- XSB.orig/packages/sgml/cc/parser.c 2005-03-14 18:43:28.000000000 +1300
++++ XSB/packages/sgml/cc/parser.c 2007-01-26 22:53:38.000000000 +1300
+@@ -593,7 +593,7 @@
+
+ for(el = xml_entities; *el; el++)
+ {
+- process_entity_declaration(&p, *el);
++ process_entity_declaration(&p, (const ichar*)*el);
+ }
+
+ break;
+@@ -804,15 +804,15 @@
+ m->parent = p->marked;
+ p->marked = m;
+
+- if ( istrcaseeq(kwd->name, "IGNORE") )
++ if ( istrcaseeq(kwd->name, (const ichar*)"IGNORE") )
+ m->type = MS_IGNORE;
+- else if ( istrcaseeq(kwd->name, "INCLUDE") )
++ else if ( istrcaseeq(kwd->name, (const ichar*)"INCLUDE") )
+ m->type = MS_INCLUDE;
+- else if ( istrcaseeq(kwd->name, "TEMP") )
++ else if ( istrcaseeq(kwd->name, (const ichar*)"TEMP") )
+ m->type = MS_INCLUDE;
+- else if ( istrcaseeq(kwd->name, "CDATA") )
++ else if ( istrcaseeq(kwd->name, (const ichar*)"CDATA") )
+ m->type = MS_CDATA;
+- else if ( istrcaseeq(kwd->name, "RCDATA") )
++ else if ( istrcaseeq(kwd->name, (const ichar*)"RCDATA") )
+ m->type = MS_RCDATA;
+ else
+ m->type = MS_INCLUDE; /* default */
+@@ -932,7 +932,7 @@
+ if ( end )
+ { decl = end;
+
+- if ( istrcaseeq(nm->name, "encoding") )
++ if ( istrcaseeq(nm->name, (const ichar*)"encoding") )
+ set_encoding(p, buf);
+
+ continue;
+@@ -970,9 +970,9 @@
+ {
+ dtd *dtd = p->dtd;
+
+- if ( istrcaseeq(enc, "iso-8859-1") )
++ if ( istrcaseeq(enc, (const ichar*)"iso-8859-1") )
+ { dtd->encoding = ENC_ISO_LATIN1;
+- } else if ( istrcaseeq(enc, "utf-8") )
++ } else if ( istrcaseeq(enc, (const ichar*)"utf-8") )
+ { dtd->encoding = ENC_UTF8;
+ } else
+ gripe(ERC_EXISTENCE, "character encoding", enc);
+@@ -1545,7 +1545,7 @@
+ if ( f[CF_MDC] == chr ) /* > */
+ {
+ if ( p->on_decl )
+- (*p->on_decl)(p, "");
++ (*p->on_decl)(p, (const ichar*)"");
+ p->state = S_PCDATA;
+
+ }
+@@ -2131,7 +2131,7 @@
+ { locbuf oldloc;
+
+ push_location(p, &oldloc);
+- set_src_dtd_parser(p, IN_ENTITY, e->name->name);
++ set_src_dtd_parser(p, IN_ENTITY, (char*)e->name->name);
+ empty_icharbuf(p->buffer); /* dubious */
+ for(s=text; *s; s++)
+ putchar_dtd_parser(p, *s);
+@@ -2907,7 +2907,7 @@
+
+ if ( !empty )
+ { empty = sgml_calloc(1, sizeof(*empty));
+- empty->name = dtd_add_symbol(dtd, "#EMPTY");
++ empty->name = dtd_add_symbol(dtd, (const ichar*)"#EMPTY");
+ empty->defined = TRUE;
+ }
+
+@@ -4380,7 +4380,7 @@
+ if ( !(s = isee_identifier(dtd, decl, "#default")) )
+ { return gripe(ERC_SYNTAX_ERROR, "Name expected", decl);
+ }
+- id = dtd_add_symbol(dtd, "#DEFAULT");
++ id = dtd_add_symbol(dtd, (const ichar*)"#DEFAULT");
+ isdef = TRUE;
+ }
+
+@@ -4531,7 +4531,7 @@
+ static ichar *
+ baseurl(dtd_parser *p)
+ { if ( p->location.type == IN_FILE && p->location.name )
+- { return istrdup(p->location.name);
++ { return istrdup((ichar*)p->location.name);
+ }
+
+ return NULL;
+@@ -4581,7 +4581,7 @@
+ }
+ case ET_LITERAL:
+ { e->value = istrdup(val);
+- e->length = strlen(e->value);
++ e->length = strlen((char*)e->value);
+ return decl;
+ }
+ default:
+@@ -4652,7 +4652,7 @@
+
+ if ( !expand_pentities(p, eval, out, len) )
+ return FALSE;
+- l = strlen(out); /* could be better */
++ l = strlen((char*)out); /* could be better */
+ out += l;
+ len -= l;
+
+@@ -4794,7 +4794,7 @@
+ {
+ if( e->exturl)
+ {
+- file = e->exturl;
++ file = (char*)e->exturl;
+
+ return file;
+ }
+@@ -5932,7 +5932,7 @@
+ a->def = AT_IMPLIED;
+ add_attribute(dtd, e, a);
+
+- if ( !e->undefined && !(dtd->dialect != DL_SGML && (istreq("xmlns", nm->name) || istrprefix("xmlns:", nm->name))) )
++ if ( !e->undefined && !(dtd->dialect != DL_SGML && (istreq("xmlns", nm->name) || istrprefix((const ichar*)"xmlns:", nm->name))) )
+ { gripe(ERC_NO_ATTRIBUTE, e->name->name, nm->name);
+ }
+ }
+@@ -6444,7 +6444,7 @@
+ {
+ int chr;
+
+- in = __utf8_get_char(in, &chr);
++ in = (const ichar*)__utf8_get_char((const char*)in, &chr);
+ if ( chr >= OUTPUT_CHARSET_SIZE )
+ gripe(ERC_REPRESENTATION, "character");
+ *out++ = chr;
+diff -ur XSB.orig/packages/sgml/cc/sgml2pl.c XSB/packages/sgml/cc/sgml2pl.c
+--- XSB.orig/packages/sgml/cc/sgml2pl.c 2005-03-12 03:57:38.000000000 +1300
++++ XSB/packages/sgml/cc/sgml2pl.c 2007-01-26 22:42:46.000000000 +1300
+@@ -273,7 +273,7 @@
+ {
+ c2p_functor( "dtd_struct", 2, tmp1);
+ c2p_int( (int) d, p2p_arg( tmp1, 1));
+- c2p_string( d->doctype, p2p_arg( tmp1, 2));
++ c2p_string( (char*)d->doctype, p2p_arg( tmp1, 2));
+ }
+ /* dtd_struct/1 if no doctype is specified */
+ else
+@@ -306,7 +306,7 @@
+ return sgml2pl_error(ERR_TYPE, "atom", doctype);
+
+ /*Create the dtd*/
+- if ( !(dtd=new_dtd(dt)) )
++ if ( !(dtd=new_dtd((const ichar*)dt)) )
+ return FALSE;
+
+ dtd->references++;
+@@ -474,7 +474,7 @@
+
+ if(is_var(doctype) && dtd->doctype)
+ {
+- c2p_string( dtd->doctype, doctype);
++ c2p_string( (char*)dtd->doctype, doctype);
+ }
+ return TRUE;
+ }
+@@ -625,7 +625,7 @@
+ {
+ if( !(s=p2c_string(temp_term) ))
+ return FALSE;
+- p->enforce_outer_element = dtd_add_symbol(p->dtd, s);
++ p->enforce_outer_element = dtd_add_symbol(p->dtd, (const ichar*)s);
+
+ }
+
+@@ -1551,7 +1551,7 @@
+ }
+ else
+ {
+- c2p_string( nm->name, t);
++ c2p_string( (char*)nm->name, t);
+ }
+ }
+
+@@ -1577,12 +1577,12 @@
+ {
+ switch(a->definition->type)
+ { case AT_CDATA:
+- c2p_string( a->value.cdata, t);
++ c2p_string( (char*)a->value.cdata, t);
+ break;
+ case AT_NUMBER:
+ {
+ if ( a->value.text )
+- c2p_string( a->value.text, t);
++ c2p_string( (char*)a->value.text, t);
+ else
+ c2p_int( a->value.number, t);
+ break;
+@@ -1611,7 +1611,7 @@
+ head = p2p_car( tail);
+ tmp = p2p_cdr( tail);
+ tail = tmp;
+- unify_listval(p, head, a->definition->type, e-val, val);
++ unify_listval(p, head, a->definition->type, e-val, (const char*)val);
+ }
+
+ tmp = p2p_new();
+@@ -1623,7 +1623,7 @@
+ head = p2p_car( tail);
+ tmp = p2p_cdr( tail);
+ tail = tmp;
+- unify_listval(p, head, a->definition->type, e-val, val);
++ unify_listval(p, head, a->definition->type, e-val, (const char*)val);
+
+ c2p_nil( tmp);
+ p2p_unify( tmp, tail);
+@@ -1694,7 +1694,7 @@
+ {
+
+ c2p_functor( "entity", 1 , tmp2);
+- c2p_string( e->name->name, p2p_arg( tmp2, 1));
++ c2p_string( (char*)e->name->name, p2p_arg( tmp2, 1));
+ p2p_unify( h, tmp2);
+
+ }
+@@ -1892,7 +1892,7 @@
+
+ }
+ else
+- c2p_string ( e->name->name, t);
++ c2p_string ( (char*)e->name->name, t);
+
+ return;
+ }
+diff -ur XSB.orig/packages/sgml/cc/xmlns.c XSB/packages/sgml/cc/xmlns.c
+--- XSB.orig/packages/sgml/cc/xmlns.c 2005-03-08 09:31:23.000000000 +1300
++++ XSB/packages/sgml/cc/xmlns.c 2007-01-26 22:38:20.000000000 +1300
+@@ -156,7 +156,7 @@
+ *local = s+1;
+ n = dtd_add_symbol(dtd, buf);
+
+- if ( istrprefix("xml", buf) ) /* XML reserved namespaces */
++ if ( istrprefix((const ichar*)"xml", buf) ) /* XML reserved namespaces */
+ { *url = n->name;
+ return TRUE;
+ } else if ( (ns = xmlns_find(p->environments, n)) )
diff --git a/dev-lang/xsb/files/xsb-3.0.1-slx.patch b/dev-lang/xsb/files/xsb-3.0.1-slx.patch
new file mode 100644
index 000000000000..85bd026ffa1d
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-slx.patch
@@ -0,0 +1,20 @@
+--- XSB.orig/packages/slx/Makefile 2002-03-15 21:09:39.000000000 +1300
++++ XSB/packages/slx/Makefile 2007-01-23 20:38:53.000000000 +1300
+@@ -27,7 +27,7 @@
+
+ ALL = slxshell${OBJEXT}
+
+-Option = [optimize]
++Option = [optimize,quit_on_error]
+
+ #-----------------------------------------------------------------------#
+ #
+@@ -39,7 +39,7 @@
+ #-----------------------------------------------------------------------#
+
+ # continue to the next when one error occurs
+-.IGNORE:
++#.IGNORE:
+
+ # suffix rules
+ .SUFFIXES: .P ${OBJEXT} .H
diff --git a/dev-lang/xsb/files/xsb-3.0.1-wildmatch.patch b/dev-lang/xsb/files/xsb-3.0.1-wildmatch.patch
new file mode 100644
index 000000000000..383b27116767
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-wildmatch.patch
@@ -0,0 +1,15 @@
+--- XSB.orig/packages/wildmatch/cc/xsb_wildmatch.c 2005-03-05 20:52:21.000000000 +1300
++++ XSB/packages/wildmatch/cc/xsb_wildmatch.c 2007-01-24 22:07:11.000000000 +1300
+@@ -114,12 +114,6 @@
+ return FALSE;
+ }
+
+-#ifndef GLOB_ABORTED
+-#define GLOB_ABORTED (-2) /* Unignored error. */
+-#endif
+-#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK not set. */
+-#define GLOB_NOSYS (-4) /* Function not supported. */
+-#define GLOB_ABEND GLOB_ABORTED
+
+
+ /* XSB glob matcher: match files in current directory according to a wildcard.
diff --git a/dev-lang/xsb/files/xsb-3.0.1-xpath.patch b/dev-lang/xsb/files/xsb-3.0.1-xpath.patch
new file mode 100644
index 000000000000..5bd586c1a039
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-xpath.patch
@@ -0,0 +1,69 @@
+diff -ur XSB.orig/packages/xpath/cc/xpathparser.c XSB/packages/xpath/cc/xpathparser.c
+--- XSB.orig/packages/xpath/cc/xpathparser.c 2005-03-04 07:37:19.000000000 +1300
++++ XSB/packages/xpath/cc/xpathparser.c 2007-01-27 12:03:02.000000000 +1300
+@@ -157,7 +157,7 @@
+ namespace = p2c_string( ns_term);
+ }
+ /*This is the function which evaluates the xpath expression on xml input*/
+- ret = execute_xpath_expression( source, xpath_expr, namespace, output_term, flag);
++ ret = execute_xpath_expression( source, (xmlChar*)xpath_expr, (xmlChar*)namespace, output_term, flag);
+ if( ret == FALSE){
+ return xpath_error(ERR_MISC, "xpath", "Unable to parse the xpath expression");
+ }
+@@ -230,7 +230,7 @@
+ for( i = 0; i < size; i++){
+ buf[i]=xmlBufferCreate();
+ xmlNodeDump( buf[i], doc, xpathObj->nodesetval->nodeTab[i],0,0);
+- bufsize+=strlen(buf[i]->content);
++ bufsize+=strlen((char*)buf[i]->content);
+ }
+
+ output_buffer = malloc( bufsize);
+@@ -240,8 +240,8 @@
+
+ ptr = output_buffer;
+ for(j=0;j<i;j++){
+- strcpy( ptr, buf[j]->content);
+- ptr+=strlen(buf[j]->content);
++ strcpy( ptr, (char*)buf[j]->content);
++ ptr+=strlen((char*)buf[j]->content);
+ }
+ *ptr='\0';
+
+diff -ur XSB.orig/packages/xpath/configure XSB/packages/xpath/configure
+--- XSB.orig/packages/xpath/configure 2005-03-06 13:29:02.000000000 +1300
++++ XSB/packages/xpath/configure 2007-01-27 11:34:56.000000000 +1300
+@@ -550,10 +550,10 @@
+ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+-echo '
+-- You did not tell me what kind of host system you want to configure.
+-- I will attempt to guess the kind of system this is.
+-' 1>&6
++#echo '
++#- You did not tell me what kind of host system you want to configure.
++#- I will attempt to guess the kind of system this is.
++#' 1>&6
+
+ # Make sure we can run config.sub.
+ if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+@@ -592,6 +592,7 @@
+ ccflags=
+ ldflags=
+
++if test false ; then
+ case "$canonical" in
+ *-cygwin*)
+ pkg_src_dir=$build_dir/cc
+@@ -614,6 +615,10 @@
+ ldflags="`sh $xpath_config_prog $exec_prefix_option $prefix_option --libs`"
+ ;;
+ esac
++fi
++
++xmllib_ccflags=`xml2-config --cflags`
++ldflags=`xml2-config --libs`
+
+ ccflags="$xmllib_ccflags"
+ if test "$xmllib_ccflags" != "ERROR" && test "$ldflags" != "ERROR" ; then
diff --git a/dev-lang/xsb/files/xsb-3.0.1-xsb-script.patch b/dev-lang/xsb/files/xsb-3.0.1-xsb-script.patch
new file mode 100644
index 000000000000..7bffa83f40e8
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-xsb-script.patch
@@ -0,0 +1,30 @@
+--- XSB.orig/build/xsb.in 2005-01-15 07:30:43.000000000 +1300
++++ XSB/build/xsb.in 2007-01-28 22:08:36.000000000 +1300
+@@ -72,9 +72,9 @@
+ scriptdir=`dirname $thisfile`
+ topdir=`dirname $scriptdir`
+
+-config=`$topdir/build/config.guess`
+-canonical=`$topdir/build/config.sub $config`
+-exec_dir=$topdir/config/${canonical}${suffix}
++#config=`$topdir/build/config.guess`
++#canonical=`$topdir/build/config.sub $config`
++exec_dir=$topdir/config/@full_config_name@
+ executable=${exec_dir}/bin/xsb
+
+ # The purpose of this complex thing is to make sure that arguments
+@@ -101,12 +101,12 @@
+ echo " file doesn't exist or is not executable"
+ echo ""
+ echo "XSB might not have have been compiled for the following machine configuration:"
+- echo " " ${canonical}${suffix}
++ echo " " @full_config_name@
+ echo "***This installation seems to have the following configurations available:"
+ # First drop files that don't have "-".
+ # Then drop the configuration that we just said doesn't exist.
+ ls -1 $topdir/config | egrep "-" \
+- | egrep -v "^${canonical}${suffix}\$" 2> /dev/null
++ | egrep -v "^@full_config_name@\$" 2> /dev/null
+ echo "***configuration list end"
+ echo ""
+ echo "One other frequent problem: you might be over your disk quota,"
diff --git a/dev-lang/xsb/metadata.xml b/dev-lang/xsb/metadata.xml
new file mode 100644
index 000000000000..1990bb86aace
--- /dev/null
+++ b/dev-lang/xsb/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/xsb/xsb-3.0.1.ebuild b/dev-lang/xsb/xsb-3.0.1.ebuild
new file mode 100644
index 000000000000..fc642f90c8cf
--- /dev/null
+++ b/dev-lang/xsb/xsb-3.0.1.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/xsb-3.0.1.ebuild,v 1.1 2007/01/28 09:19:36 keri Exp $
+
+MY_PN="XSB"
+MY_P="${MY_PN}-${PV}"
+
+inherit eutils autotools
+
+DESCRIPTION="XSB is a logic programming and deductive database system"
+HOMEPAGE="http://xsb.sourceforge.net"
+SRC_URI="mirror://sourceforge/xsb/xsb-3.0.1-src.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="iodbc java libwww mysql odbc perl threads xml"
+
+DEPEND="iodbc? ( dev-db/libiodbc )
+ java? ( virtual/jdk )
+ libwww? ( net-libs/libwww )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ perl? ( dev-lang/perl )
+ xml? ( dev-libs/libxml2 )"
+
+S="${WORKDIR}"/${MY_PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-configure.patch
+ epatch "${FILESDIR}"/${P}-portage.patch
+ epatch "${FILESDIR}"/${P}-packages.patch
+ epatch "${FILESDIR}"/${P}-chr_d.patch
+ epatch "${FILESDIR}"/${P}-gap.patch
+ epatch "${FILESDIR}"/${P}-justify.patch
+ epatch "${FILESDIR}"/${P}-libwww.patch
+ epatch "${FILESDIR}"/${P}-mysql.patch
+ epatch "${FILESDIR}"/${P}-odbc.patch
+ epatch "${FILESDIR}"/${P}-perlmatch.patch
+ epatch "${FILESDIR}"/${P}-sgml.patch
+ epatch "${FILESDIR}"/${P}-wildmatch.patch
+ epatch "${FILESDIR}"/${P}-xpath.patch
+ epatch "${FILESDIR}"/${P}-xsb-script.patch
+ epatch "${FILESDIR}"/${P}-nostrip.patch
+}
+
+src_compile() {
+ cd "${S}"/build
+ eautoconf
+
+ einfo "Building xsb compiler"
+ econf \
+ --disable-optimization \
+ --without-smodels \
+ $(use_with threads mt) \
+ $(use_with perl) \
+ $(use_with odbc) \
+ $(use_with iodbc) \
+ $(use_with java interprolog) \
+ || die "econf failed"
+ emake -j1 || die "emake failed"
+
+ einfo "Building xsb packages"
+
+ if use libwww ; then
+ cd "${S}"/packages/libwww
+ econf --with-libwww=/usr || die "econf libwww package failed"
+ fi
+
+ if use mysql ; then
+ cd "${S}"/packages/dbdrivers/mysql
+ econf || die "econf mysql package failed"
+ fi
+
+ if use odbc ; then
+ cd "${S}"/packages/dbdrivers/odbc
+ econf || die "econf odbc package failed"
+ fi
+
+ if use xml ; then
+ cd "${S}"/packages/xpath
+ econf || die "econf xpath package failed"
+ fi
+
+ cd "${S}"/packages
+ emake -j1 || die "emake packages failed"
+
+ if use libwww ; then
+ emake -j1 libwww || die "emake libwww package failed"
+ fi
+
+ if use mysql ; then
+ emake -j1 mysql || die "emake mysql package failed"
+ fi
+
+ if use odbc ; then
+ emake -j1 odbc || die "emake odbc package failed"
+ fi
+
+ if use perl ; then
+ emake -j1 perlmatch || die "emake perlmatch package failed"
+ fi
+
+ if use xml ; then
+ emake -j1 xpath || die "emake xpath package failed"
+ fi
+}
+
+src_install() {
+ cd "${S}"/build
+ make DESTDIR="${D}" install || die
+
+ dosym /usr/lib/xsb/bin/xsb /usr/bin/xsb
+
+ cd "${S}"/packages
+ local PACKAGES=/usr/lib/xsb/packages
+ insinto ${PACKAGES}
+ doins *.xwam
+
+ insinto ${PACKAGES}/chr
+ doins chr/*.xwam
+
+ insinto ${PACKAGES}/chr_d
+ doins chr_d/*.xwam
+
+ insinto ${PACKAGES}/gap
+ doins gap/*.xwam
+
+ insinto ${PACKAGES}/justify
+ doins justify/*.xwam
+ doins justify/*.H
+
+ insinto ${PACKAGES}/regmatch
+ doins regmatch/*.xwam
+ insinto ${PACKAGES}/regmatch/cc
+ doins regmatch/cc/*.H
+
+ insinto ${PACKAGES}/sgml
+ doins sgml/*.xwam
+ insinto ${PACKAGES}/sgml/cc
+ doins sgml/cc/*.H
+ insinto ${PACKAGES}/sgml/cc/dtd
+ doins sgml/cc/dtd/*
+
+ insinto ${PACKAGES}/slx
+ doins slx/*.xwam
+
+ insinto ${PACKAGES}/wildmatch
+ doins wildmatch/*.xwam
+ insinto ${PACKAGES}/wildmatch/cc
+ doins wildmatch/cc/*.H
+
+ if use libwww ; then
+ insinto ${PACKAGES}/libwww
+ doins libwww/*.xwam
+ insinto ${PACKAGES}/libwww/cc
+ doins libwww/cc/*.H
+ fi
+
+ if use mysql || use odbc ; then
+ insinto ${PACKAGES}/dbdrivers
+ doins dbdrivers/*.xwam
+ doins dbdrivers/*.H
+ insinto ${PACKAGES}/dbdrivers/cc
+ doins dbdrivers/cc/*.H
+ if use mysql ; then
+ insinto ${PACKAGES}/dbdrivers/mysql
+ doins dbdrivers/mysql/*.xwam
+ insinto ${PACKAGES}/dbdrivers/mysql/cc
+ doins dbdrivers/mysql/cc/*.H
+ fi
+ if use odbc ; then
+ insinto ${PACKAGES}/dbdrivers/odbc
+ doins dbdrivers/odbc/*.xwam
+ insinto ${PACKAGES}/dbdrivers/odbc/cc
+ doins dbdrivers/odbc/cc/*.H
+ fi
+ fi
+
+ if use perl ; then
+ insinto ${PACKAGES}/perlmatch
+ doins perlmatch/*.xwam
+ insinto ${PACKAGES}/perlmatch/cc
+ doins perlmatch/cc/*.H
+ fi
+
+ if use xml ; then
+ insinto ${PACKAGES}/xpath
+ doins xpath/*xwam
+ insinto ${PACKAGES}/xpath/cc
+ doins xpath/cc/*.H
+ fi
+
+ cd "${S}"
+ dodoc FAQ README
+}