summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2006-08-30 10:07:44 +0000
committerKeri Harris <keri@gentoo.org>2006-08-30 10:07:44 +0000
commit87c449559b9286ad441d0e05e12ae1f78aab42c5 (patch)
tree637b3acbe585f88f4fda2913e3a62b2ef5cc43eb /dev-lang/swi-prolog
parentStable for x86. See bug #145571 (diff)
downloadhistorical-87c449559b9286ad441d0e05e12ae1f78aab42c5.tar.gz
historical-87c449559b9286ad441d0e05e12ae1f78aab42c5.tar.bz2
historical-87c449559b9286ad441d0e05e12ae1f78aab42c5.zip
Refactor build process in order to avoid lengthy autoconf runs.
Package-Manager: portage-2.1.1_rc1-r1
Diffstat (limited to 'dev-lang/swi-prolog')
-rw-r--r--dev-lang/swi-prolog/ChangeLog15
-rw-r--r--dev-lang/swi-prolog/Manifest67
-rw-r--r--dev-lang/swi-prolog/files/digest-swi-prolog-5.6.17-r13
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-CFLAGS-r1.patch310
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-PLBASE-r1.patch84
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-cppproxy.patch11
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-db-docs.patch21
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-db-versioned.patch31
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-jpl-install.patch11
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-jpl-ppc.patch90
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-libtai.patch11
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-ltx2htm.patch68
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-portage.patch40
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-semweb-sparc-alignment.patch14
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-thread-tests.patch61
-rw-r--r--dev-lang/swi-prolog/files/swi-prolog-xpce-test.patch154
-rw-r--r--dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild140
17 files changed, 1126 insertions, 5 deletions
diff --git a/dev-lang/swi-prolog/ChangeLog b/dev-lang/swi-prolog/ChangeLog
index 2d12a54e9862..3a853503ab62 100644
--- a/dev-lang/swi-prolog/ChangeLog
+++ b/dev-lang/swi-prolog/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for dev-lang/swi-prolog
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/swi-prolog/ChangeLog,v 1.28 2006/08/28 10:29:02 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/swi-prolog/ChangeLog,v 1.29 2006/08/30 10:07:44 keri Exp $
+
+*swi-prolog-5.6.17-r1 (30 Aug 2006)
+
+ 30 Aug 2006; keri <keri@gentoo.org> +files/swi-prolog-CFLAGS-r1.patch,
+ +files/swi-prolog-PLBASE-r1.patch, +files/swi-prolog-cppproxy.patch,
+ +files/swi-prolog-db-docs.patch, +files/swi-prolog-db-versioned.patch,
+ +files/swi-prolog-jpl-install.patch, +files/swi-prolog-jpl-ppc.patch,
+ +files/swi-prolog-libtai.patch, +files/swi-prolog-ltx2htm.patch,
+ +files/swi-prolog-portage.patch,
+ +files/swi-prolog-semweb-sparc-alignment.patch,
+ +files/swi-prolog-thread-tests.patch, +files/swi-prolog-xpce-test.patch,
+ +swi-prolog-5.6.17-r1.ebuild:
+ Refactor build process in order to avoid lengthy autoconf runs.
28 Aug 2006; keri <keri@gentoo.org> files/swi-prolog-packages-test.patch:
Handle single-threaded check for X server. Bug #144665.
diff --git a/dev-lang/swi-prolog/Manifest b/dev-lang/swi-prolog/Manifest
index 3b57c705d56f..19b9a4e41950 100644
--- a/dev-lang/swi-prolog/Manifest
+++ b/dev-lang/swi-prolog/Manifest
@@ -1,11 +1,47 @@
+AUX swi-prolog-CFLAGS-r1.patch 8903 RMD160 7e6c0e80fd80ba0b10548380e59096f4401821c2 SHA1 7b9a5216579800697c9828fd5ed5dcfb3de19ee9 SHA256 3e19a2a395ea2abd0931256868020350524aa8788a268f1dd352c35760b2bc0c
+MD5 83022342c8d6d1af20e63d469eee073f files/swi-prolog-CFLAGS-r1.patch 8903
+RMD160 7e6c0e80fd80ba0b10548380e59096f4401821c2 files/swi-prolog-CFLAGS-r1.patch 8903
+SHA256 3e19a2a395ea2abd0931256868020350524aa8788a268f1dd352c35760b2bc0c files/swi-prolog-CFLAGS-r1.patch 8903
AUX swi-prolog-CFLAGS.patch 8657 RMD160 da997f0fb6a068744a81bcd91b15e7f35e025267 SHA1 c19e04ce5cdeb66bb799fbcccc9e0dad7563759c SHA256 2626faefcfcac1a41ef4d1aaccf7ad80f5fe0ae9fbb3cb3dc692182712d40b71
MD5 bc91650feaf27f01c834bffd69a0b279 files/swi-prolog-CFLAGS.patch 8657
RMD160 da997f0fb6a068744a81bcd91b15e7f35e025267 files/swi-prolog-CFLAGS.patch 8657
SHA256 2626faefcfcac1a41ef4d1aaccf7ad80f5fe0ae9fbb3cb3dc692182712d40b71 files/swi-prolog-CFLAGS.patch 8657
+AUX swi-prolog-PLBASE-r1.patch 2612 RMD160 98a2aec985aa0bc38e5a76d460dd724ab199b442 SHA1 9fa1e995a30d93be737a5883779dba3f3128c006 SHA256 91b090d1c5ddd14f24671d43d0f021e47d1fd6652f1dd518f1889052c0e601d8
+MD5 5735709fce96aead1b7ba6c23bd83ba6 files/swi-prolog-PLBASE-r1.patch 2612
+RMD160 98a2aec985aa0bc38e5a76d460dd724ab199b442 files/swi-prolog-PLBASE-r1.patch 2612
+SHA256 91b090d1c5ddd14f24671d43d0f021e47d1fd6652f1dd518f1889052c0e601d8 files/swi-prolog-PLBASE-r1.patch 2612
AUX swi-prolog-PLBASE.patch 3884 RMD160 b7b08ca7150503b9ee40f33e392147612dc3c2b9 SHA1 a93f82133892df4478291d8d8cf791e3672e3d62 SHA256 c49a3fa0c40a16dc9cd11a3cbc4e7d05c527a6361b22a9660b069c99bd09ee91
MD5 9709fe20e8ef457682eb0a5bff5d9940 files/swi-prolog-PLBASE.patch 3884
RMD160 b7b08ca7150503b9ee40f33e392147612dc3c2b9 files/swi-prolog-PLBASE.patch 3884
SHA256 c49a3fa0c40a16dc9cd11a3cbc4e7d05c527a6361b22a9660b069c99bd09ee91 files/swi-prolog-PLBASE.patch 3884
+AUX swi-prolog-cppproxy.patch 390 RMD160 81a1c19958c21b428b3c61abc6a055a7bfe9436e SHA1 57ccb1471993c9ce1dade846292820409a932da2 SHA256 b8016032b89531e2c43d1203e310887ad3d2f40a4942d9ec86f8009a7761e508
+MD5 acd8694967fddd7a24fd3bdaca01f115 files/swi-prolog-cppproxy.patch 390
+RMD160 81a1c19958c21b428b3c61abc6a055a7bfe9436e files/swi-prolog-cppproxy.patch 390
+SHA256 b8016032b89531e2c43d1203e310887ad3d2f40a4942d9ec86f8009a7761e508 files/swi-prolog-cppproxy.patch 390
+AUX swi-prolog-db-docs.patch 586 RMD160 67fd22362a8bd870b71109d44b3b8a76c777225a SHA1 a75e83c6885b7181cf4293122600b7d7cb9d0377 SHA256 a7f1c48098b4bc7dbedf2d0702b588bc39446b8ee5ebaba8354449785f171760
+MD5 f21fe8dc0256eb1680227cdd45534f33 files/swi-prolog-db-docs.patch 586
+RMD160 67fd22362a8bd870b71109d44b3b8a76c777225a files/swi-prolog-db-docs.patch 586
+SHA256 a7f1c48098b4bc7dbedf2d0702b588bc39446b8ee5ebaba8354449785f171760 files/swi-prolog-db-docs.patch 586
+AUX swi-prolog-db-versioned.patch 961 RMD160 b5a3ea3e46f32c12ccbfdee5c421399b91ca2fb1 SHA1 e5b3dc95f4073fffe29861f606e1bd7bcf230fec SHA256 99e82b6511c2bf0cfc7014de7b5af8e8d924d9383192031d3f5618a1fbddc734
+MD5 3066f6d0fdba637c6dc31e1da430dc9f files/swi-prolog-db-versioned.patch 961
+RMD160 b5a3ea3e46f32c12ccbfdee5c421399b91ca2fb1 files/swi-prolog-db-versioned.patch 961
+SHA256 99e82b6511c2bf0cfc7014de7b5af8e8d924d9383192031d3f5618a1fbddc734 files/swi-prolog-db-versioned.patch 961
+AUX swi-prolog-jpl-install.patch 557 RMD160 db14237ac6951b5bb26276759114ef575776415b SHA1 cf661d9f9d502e30febb85de8d1e920e498dad67 SHA256 497b5c80dd316f55a21c5c954208449543bd6988d40e71719a067278daeeab78
+MD5 689af0808e7024052c262d6be879076c files/swi-prolog-jpl-install.patch 557
+RMD160 db14237ac6951b5bb26276759114ef575776415b files/swi-prolog-jpl-install.patch 557
+SHA256 497b5c80dd316f55a21c5c954208449543bd6988d40e71719a067278daeeab78 files/swi-prolog-jpl-install.patch 557
+AUX swi-prolog-jpl-ppc.patch 2472 RMD160 16066b6d0ac2bfc4e892ab4b434d43bdc5365077 SHA1 be3fd617f6a502cd3ded8e64872640ec3e9f2038 SHA256 0f979e5b4963815a7f48fb1615a960af94d58a09149e07ad3d8a5a2d5c705828
+MD5 8cad07a25d271d9f5caea4c3d1a79266 files/swi-prolog-jpl-ppc.patch 2472
+RMD160 16066b6d0ac2bfc4e892ab4b434d43bdc5365077 files/swi-prolog-jpl-ppc.patch 2472
+SHA256 0f979e5b4963815a7f48fb1615a960af94d58a09149e07ad3d8a5a2d5c705828 files/swi-prolog-jpl-ppc.patch 2472
+AUX swi-prolog-libtai.patch 313 RMD160 cab656936f1ca1e74199a20c4d910e80b137e572 SHA1 a40f29d73de967dcbbb0e29bfbc38fcf138d0508 SHA256 3785ef968fac325ae82e45c91639f5f2d8eda906ca89c32095307f50663497e9
+MD5 5d0d3338e93387277e55086b131efa22 files/swi-prolog-libtai.patch 313
+RMD160 cab656936f1ca1e74199a20c4d910e80b137e572 files/swi-prolog-libtai.patch 313
+SHA256 3785ef968fac325ae82e45c91639f5f2d8eda906ca89c32095307f50663497e9 files/swi-prolog-libtai.patch 313
+AUX swi-prolog-ltx2htm.patch 2337 RMD160 fee31e36070d7e244793d03607348212ce37c8ff SHA1 1842a5d39e20b3434b19321359e735dc61a80d31 SHA256 741a67cf6afb96b12fcb14d68bfc9aa467b21de7579b34d2e97116862fc5afc1
+MD5 dad8ba83737bbb4abaa96c95e9ad5ad7 files/swi-prolog-ltx2htm.patch 2337
+RMD160 fee31e36070d7e244793d03607348212ce37c8ff files/swi-prolog-ltx2htm.patch 2337
+SHA256 741a67cf6afb96b12fcb14d68bfc9aa467b21de7579b34d2e97116862fc5afc1 files/swi-prolog-ltx2htm.patch 2337
AUX swi-prolog-packages-cppproxy.patch 390 RMD160 81a1c19958c21b428b3c61abc6a055a7bfe9436e SHA1 57ccb1471993c9ce1dade846292820409a932da2 SHA256 b8016032b89531e2c43d1203e310887ad3d2f40a4942d9ec86f8009a7761e508
MD5 acd8694967fddd7a24fd3bdaca01f115 files/swi-prolog-packages-cppproxy.patch 390
RMD160 81a1c19958c21b428b3c61abc6a055a7bfe9436e files/swi-prolog-packages-cppproxy.patch 390
@@ -38,6 +74,14 @@ AUX swi-prolog-packages-test.patch 8017 RMD160 35756ef63a311e9b75b5b33faca71eda0
MD5 42541efa6c6cf06c3786eee8669ade82 files/swi-prolog-packages-test.patch 8017
RMD160 35756ef63a311e9b75b5b33faca71eda02e1d3b9 files/swi-prolog-packages-test.patch 8017
SHA256 7109f8cf753ba0397e875b4bc5868f2eca4d41f6b1925a75bd139f0ef454929c files/swi-prolog-packages-test.patch 8017
+AUX swi-prolog-portage.patch 1313 RMD160 1e39cf3eace82d805fd1dcdbce72fd7a0cc0b18e SHA1 695311e22748c7b32e357fcc96ecfc717183d249 SHA256 043e86898cfe185fde4d34f20d2299e59d77e68529bd6cae7808e5640db8de37
+MD5 59a03d4ccddf260137fcd84ace39a7bb files/swi-prolog-portage.patch 1313
+RMD160 1e39cf3eace82d805fd1dcdbce72fd7a0cc0b18e files/swi-prolog-portage.patch 1313
+SHA256 043e86898cfe185fde4d34f20d2299e59d77e68529bd6cae7808e5640db8de37 files/swi-prolog-portage.patch 1313
+AUX swi-prolog-semweb-sparc-alignment.patch 493 RMD160 01dbb170b0ba4f808fcedfa4e4baa93177a40ff1 SHA1 40fe01368d8988d88a49508953bf276f4f08663f SHA256 3cff34e6f3dedf5b549c93826593109669a486a188a11ae8d878286b52282e2a
+MD5 6e51d8bc5b62b73596a976e4e9ce4dc5 files/swi-prolog-semweb-sparc-alignment.patch 493
+RMD160 01dbb170b0ba4f808fcedfa4e4baa93177a40ff1 files/swi-prolog-semweb-sparc-alignment.patch 493
+SHA256 3cff34e6f3dedf5b549c93826593109669a486a188a11ae8d878286b52282e2a files/swi-prolog-semweb-sparc-alignment.patch 493
AUX swi-prolog-test.patch 549 RMD160 c9e997ed980a1821a5113b8f42ee21444da91096 SHA1 2cac0dba39db04eff6b607ce3c91ac2b92443eac SHA256 81fc9a77480226ad519a7020d3c97fb59be6e9bba8e3d8b3b22553c5c6fc7e30
MD5 7ab7ba6c84ff9a85c66105fdcb3434b9 files/swi-prolog-test.patch 549
RMD160 c9e997ed980a1821a5113b8f42ee21444da91096 files/swi-prolog-test.patch 549
@@ -46,8 +90,20 @@ AUX swi-prolog-test_date.patch 4324 RMD160 998a7451af5f0de4a73f7f6497ffa57c012f3
MD5 aaac0d487788ab74f26c127a713923a0 files/swi-prolog-test_date.patch 4324
RMD160 998a7451af5f0de4a73f7f6497ffa57c012f3ee6 files/swi-prolog-test_date.patch 4324
SHA256 0998d9f89e0b84e53efb16a70fdc8c4a7f2ac0f700e9f8502fb53c1d8dd89388 files/swi-prolog-test_date.patch 4324
+AUX swi-prolog-thread-tests.patch 1983 RMD160 a7a291dd8450ba410425173d98757695e2d45eb8 SHA1 551f92f22026794aacf54cc52da7c8bb8b6e9c54 SHA256 d48be25497fdeeb6f1e56068a4a0d78d0c67eccf59fd720c089e961e1c2d4b11
+MD5 9aba6fad224825963ced3cf129919bcd files/swi-prolog-thread-tests.patch 1983
+RMD160 a7a291dd8450ba410425173d98757695e2d45eb8 files/swi-prolog-thread-tests.patch 1983
+SHA256 d48be25497fdeeb6f1e56068a4a0d78d0c67eccf59fd720c089e961e1c2d4b11 files/swi-prolog-thread-tests.patch 1983
+AUX swi-prolog-xpce-test.patch 4534 RMD160 2d2b04ae715eb04e53825d8eb4ce3f60e4c253f1 SHA1 590d36578596e3f46b6c53bea240ff1888086d37 SHA256 315591c9375734f4ed06096b58ee696df3b4e560236564b8538e71377bc94d3c
+MD5 3ef8db1add28c3d49a27892307e86794 files/swi-prolog-xpce-test.patch 4534
+RMD160 2d2b04ae715eb04e53825d8eb4ce3f60e4c253f1 files/swi-prolog-xpce-test.patch 4534
+SHA256 315591c9375734f4ed06096b58ee696df3b4e560236564b8538e71377bc94d3c files/swi-prolog-xpce-test.patch 4534
DIST pl-5.6.17.tar.gz 10652203 RMD160 7f6786013b43c2e00b8e4a3799cbad1f7cac2fab SHA1 e46e98b3ec8a69de3dc2eb147a9df9cbd1a17399 SHA256 4768761ec4ad4c7160373950bc21d6124c3641dfff9dbe5db4dd7c48433e0072
DIST pl-5.6.8.tar.gz 9157044 RMD160 449a866a9fadf13c068393f8a4f76862ecbd2207 SHA1 56de45066ba1680ebf6a74d3b7be6ab8cd23293a SHA256 4ccfd6ed684f56750c089a8103e2d640c6591873e3f36b47a2e2d39958cccdf3
+EBUILD swi-prolog-5.6.17-r1.ebuild 3625 RMD160 8ff817007c432c45193e45f9495c710fd1451a15 SHA1 7ac35c349d88e925a9df7a3f3e7b19504a7b8e14 SHA256 68f9267b83928db3887442de0dc86567a88f6003cd61fa1ab34bb0ad4605fd06
+MD5 70de334a014db1a9157668d32f907167 swi-prolog-5.6.17-r1.ebuild 3625
+RMD160 8ff817007c432c45193e45f9495c710fd1451a15 swi-prolog-5.6.17-r1.ebuild 3625
+SHA256 68f9267b83928db3887442de0dc86567a88f6003cd61fa1ab34bb0ad4605fd06 swi-prolog-5.6.17-r1.ebuild 3625
EBUILD swi-prolog-5.6.17.ebuild 3672 RMD160 0a11551f5d45e207faa40150554116778dc15b97 SHA1 eb936067acba903cd05b6f21df2c008f3b00e613 SHA256 a08be6aad3f82ec06dc23cb3072c7f4675f075d53580b42108184fd668f56c87
MD5 c9e2f68799bdcf5a6b07aefa25c7e71a swi-prolog-5.6.17.ebuild 3672
RMD160 0a11551f5d45e207faa40150554116778dc15b97 swi-prolog-5.6.17.ebuild 3672
@@ -56,10 +112,10 @@ EBUILD swi-prolog-5.6.8.ebuild 3535 RMD160 53fdbdda0ba795e9590b9ec4c094984f0cd50
MD5 66b0e48b5e024bebc6040b005693ef10 swi-prolog-5.6.8.ebuild 3535
RMD160 53fdbdda0ba795e9590b9ec4c094984f0cd50780 swi-prolog-5.6.8.ebuild 3535
SHA256 0a5a0a46d97b8603f18a12c93948581e844f38fa5cbe9a88256da52d97a297ea swi-prolog-5.6.8.ebuild 3535
-MISC ChangeLog 5294 RMD160 626e3854c5c695d4e327dd45941125f5f88ec5e0 SHA1 73dafdf0dba35fc789966804a5a6155fb1b68f06 SHA256 ee501133e9d6793aacbe49e9495762835767f1922706160524ecfca6211d063a
-MD5 c687cdc2541e7cdcd7ab6a50b5519b0d ChangeLog 5294
-RMD160 626e3854c5c695d4e327dd45941125f5f88ec5e0 ChangeLog 5294
-SHA256 ee501133e9d6793aacbe49e9495762835767f1922706160524ecfca6211d063a ChangeLog 5294
+MISC ChangeLog 5946 RMD160 1b8ae3a7dcc5dbc8d3184dbe17ce8dbe4fedec2d SHA1 2410f03e6101ea5e7f922a04e37d0a9fcbb4cd13 SHA256 869eafea691befaa023adf3c7e2b3ec343983999fd142786fc66fc8afdc65744
+MD5 847749bdf4eb868b4d6861fa301f666e ChangeLog 5946
+RMD160 1b8ae3a7dcc5dbc8d3184dbe17ce8dbe4fedec2d ChangeLog 5946
+SHA256 869eafea691befaa023adf3c7e2b3ec343983999fd142786fc66fc8afdc65744 ChangeLog 5946
MISC metadata.xml 159 RMD160 38d27fd1c5faabedefa5507dfd83cb4c952fbc8c SHA1 52b92682cf41e53e71bf432537a16215bd9546b1 SHA256 851bf218a4283a1d8ea6ef98af0119a40eaa78bfaaec49c2f3440437f52889ba
MD5 9187f53634e60ab7eb2ac7e98b0b19f7 metadata.xml 159
RMD160 38d27fd1c5faabedefa5507dfd83cb4c952fbc8c metadata.xml 159
@@ -67,6 +123,9 @@ SHA256 851bf218a4283a1d8ea6ef98af0119a40eaa78bfaaec49c2f3440437f52889ba metadata
MD5 b4d993594a190404c1182c9bdb35bf9f files/digest-swi-prolog-5.6.17 235
RMD160 034d25c7f8734034d1e3656c79ae4920a50dd70d files/digest-swi-prolog-5.6.17 235
SHA256 56784b2db722fb8073bd5d963a45ba523b837ae255022761ed84c18b875f74fd files/digest-swi-prolog-5.6.17 235
+MD5 b4d993594a190404c1182c9bdb35bf9f files/digest-swi-prolog-5.6.17-r1 235
+RMD160 034d25c7f8734034d1e3656c79ae4920a50dd70d files/digest-swi-prolog-5.6.17-r1 235
+SHA256 56784b2db722fb8073bd5d963a45ba523b837ae255022761ed84c18b875f74fd files/digest-swi-prolog-5.6.17-r1 235
MD5 69c20c79c5aeb698888e72036cb021c6 files/digest-swi-prolog-5.6.8 229
RMD160 221664df6018bc92d6323e5c138dbb23e68f8d20 files/digest-swi-prolog-5.6.8 229
SHA256 c74fedc27886eb5e2b6fb24da242d983b5f0f34c0502f0b46386dbd7355ce76a files/digest-swi-prolog-5.6.8 229
diff --git a/dev-lang/swi-prolog/files/digest-swi-prolog-5.6.17-r1 b/dev-lang/swi-prolog/files/digest-swi-prolog-5.6.17-r1
new file mode 100644
index 000000000000..56aaea0e1546
--- /dev/null
+++ b/dev-lang/swi-prolog/files/digest-swi-prolog-5.6.17-r1
@@ -0,0 +1,3 @@
+MD5 3858e1f3073deac18ca1f76986f8b69c pl-5.6.17.tar.gz 10652203
+RMD160 7f6786013b43c2e00b8e4a3799cbad1f7cac2fab pl-5.6.17.tar.gz 10652203
+SHA256 4768761ec4ad4c7160373950bc21d6124c3641dfff9dbe5db4dd7c48433e0072 pl-5.6.17.tar.gz 10652203
diff --git a/dev-lang/swi-prolog/files/swi-prolog-CFLAGS-r1.patch b/dev-lang/swi-prolog/files/swi-prolog-CFLAGS-r1.patch
new file mode 100644
index 000000000000..101420fec7a5
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-CFLAGS-r1.patch
@@ -0,0 +1,310 @@
+--- pl-5.6.17.orig/src/configure 2006-07-11 20:31:16.000000000 +1200
++++ pl-5.6.17/src/configure 2006-08-26 17:49:55.000000000 +1200
+@@ -3807,7 +3807,7 @@
+ esac
+ fi
+ else
+- COFLAGS=$CFLAGS
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ fi
+
+
+@@ -14213,7 +14213,7 @@
+ LNLIBS="$LIBS"
+ fi
+
+-echo " CFLAGS=$CWFLAGS $COFLAGS $CIFLAGS $CMFLAGS"
++echo " CFLAGS=$CWFLAGS $COFLAGS $CMFLAGS"
+ echo " LDFLAGS=$LDFLAGS"
+ echo " LIBS=$LIBS"
+
+--- pl-5.6.17.orig/src/Makefile.in 2006-07-15 01:51:53.000000000 +1200
++++ pl-5.6.17/src/Makefile.in 2006-08-26 17:47:12.000000000 +1200
+@@ -69,7 +69,7 @@
+ CWFLAGS=@CWFLAGS@
+ CIFLAGS=@CIFLAGS@
+ CMFLAGS=@CMFLAGS@
+-CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
++CFLAGS= $(CWFLAGS) $(COFLAGS) $(CMFLAGS)
+ LDFLAGS=@LDFLAGS@
+
+ PLFOREIGN=@PLFOREIGN@
+--- pl-5.6.17.orig/src/rc/Makefile.in 2006-07-11 20:22:28.000000000 +1200
++++ pl-5.6.17/src/rc/Makefile.in 2006-08-26 17:47:52.000000000 +1200
+@@ -30,7 +30,7 @@
+ CIFLAGS=@CIFLAGS@
+ CMFLAGS=@CMFLAGS@
+ LDFLAGS=@LDFLAGS@
+-CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
++CFLAGS= $(CWFLAGS) $(COFLAGS) $(CMFLAGS)
+
+ INSTALL=@INSTALL@
+ INSTALL_PROGRAM=@INSTALL_PROGRAM@
+--- pl-5.6.17.orig/src/libtai/Makefile.in 2006-07-11 20:41:05.000000000 +1200
++++ pl-5.6.17/src/libtai/Makefile.in 2006-08-26 17:52:02.000000000 +1200
+@@ -29,7 +29,7 @@
+ CIFLAGS=@CIFLAGS@
+ CMFLAGS=@CMFLAGS@
+ LDFLAGS=@LDFLAGS@
+-CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
++CFLAGS= $(CWFLAGS) $(COFLAGS) $(CMFLAGS)
+
+ INSTALL=@INSTALL@
+ INSTALL_PROGRAM=@INSTALL_PROGRAM@
+--- pl-5.6.17.orig/packages/clib/configure 2006-01-11 09:41:55.000000000 +1300
++++ pl-5.6.17/packages/clib/configure 2006-08-26 16:23:26.000000000 +1200
+@@ -3117,7 +3117,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -3709,7 +3708,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/clib/maildrop/rfc2045/configure 2005-07-25 02:37:57.000000000 +1200
++++ pl-5.6.17/packages/clib/maildrop/rfc2045/configure 2006-08-26 16:31:05.000000000 +1200
+@@ -3155,7 +3155,7 @@
+
+ if test "$GCC" = yes ; then
+ CXXFLAGS="$CXXFLAGS -Wall"
+- CFLAGS="$CFLAGS -Wall"
++ CFLAGS="$CFLAGS -fpic -Wall"
+ fi
+
+
+pl-5.6.17/packages/clib/maildrop/rfc822/configure
+--- pl-5.6.17.orig/packages/clib/maildrop/rfc822/configure 2005-07-25 02:37:57.000000000 +1200
++++ pl-5.6.17/packages/clib/maildrop/rfc822/configure 2006-08-26 16:32:11.000000000 +1200
+@@ -3144,7 +3144,7 @@
+
+ if test "$GCC" = yes ; then
+ CXXFLAGS="$CXXFLAGS -Wall"
+- CFLAGS="$CFLAGS -Wall"
++ CFLAGS="$CFLAGS -fpic -Wall"
+ fi
+
+
+--- pl-5.6.17.orig/packages/cppproxy/configure 2006-01-23 22:29:29.000000000 +1300
++++ pl-5.6.17/packages/cppproxy/configure 2006-08-26 16:40:49.000000000 +1200
+@@ -3111,7 +3111,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -3703,7 +3702,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/db/configure.in 2006-07-07 23:29:11.000000000 +1200
++++ pl-5.6.17/packages/db/configure.in 2006-08-26 18:35:22.000000000 +1200
+@@ -93,13 +93,13 @@
+ AC_ISC_POSIX
+ AC_HEADER_STDC
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+ CWFLAGS=
+ fi
+-CFLAGS="$CMFLAGS $CIFLAGS"
++
+ AC_FUNC_ALLOCA
+ AC_C_BIGENDIAN
+
+--- pl-5.6.17.orig/packages/jpl/configure.in 2005-01-31 23:47:37.000000000 +1300
++++ pl-5.6.17/packages/jpl/configure.in 2006-08-26 18:50:11.000000000 +1200
+@@ -70,10 +70,10 @@
+ AC_PROG_INSTALL
+ AC_ISC_POSIX
+ AC_HEADER_STDC
+-CFLAGS="$CMFLAGS"
++
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS="-Wall -Wno-strict-aliasing"
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/ltx2htm/configure 2004-09-22 02:28:17.000000000 +1200
++++ pl-5.6.17/packages/ltx2htm/configure 2006-08-26 15:58:58.000000000 +1200
+@@ -1351,6 +1351,7 @@
+ CC=$PLLD
+ LD=$PLLD
+ LDSOFLAGS=-shared
++CMFLAGS=-fpic
+
+ SO="$PLSOEXT"
+
+@@ -2925,7 +2926,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -3455,7 +3455,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS=-O2
++ COFLAGS="$CFLAGS"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/nlp/configure 2005-11-26 23:54:48.000000000 +1300
++++ pl-5.6.17/packages/nlp/configure 2006-08-26 17:33:02.000000000 +1200
+@@ -3111,7 +3111,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -3703,7 +3702,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/odbc/configure 2006-02-16 09:48:34.000000000 +1300
++++ pl-5.6.17/packages/odbc/configure 2006-08-26 17:34:38.000000000 +1200
+@@ -3147,7 +3147,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -3739,7 +3738,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/semweb/configure 2006-03-08 03:43:04.000000000 +1300
++++ pl-5.6.17/packages/semweb/configure 2006-08-26 17:35:48.000000000 +1200
+@@ -3145,7 +3145,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -4294,7 +4293,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O3 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/sgml/configure 2006-02-04 04:38:50.000000000 +1300
++++ pl-5.6.17/packages/sgml/configure 2006-08-26 17:37:53.000000000 +1200
+@@ -3184,16 +3184,12 @@
+ fi
+
+ if test ! -z "$GCC"; then
+- if test $gmake = yes; then
+- COFLAGS='$(shell if test -r .coflags; then cat .coflags; else echo "-O2"; fi)'
+- else
+- COFLAGS="-O2 -fno-strict-aliasing"
+- fi
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS="$CWFLAGS -Wall"
+ else
+ COFLAGS=-O
+ fi
+-CFLAGS="$CMFLAGS"
++
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+ echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+ if test "${ac_cv_c_bigendian+set}" = set; then
+--- pl-5.6.17.orig/packages/ssl/configure 2006-02-04 04:38:50.000000000 +1300
++++ pl-5.6.17/packages/ssl/configure 2006-08-26 17:40:02.000000000 +1200
+@@ -3147,7 +3147,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -3739,7 +3738,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/table/configure 2005-01-31 23:47:37.000000000 +1300
++++ pl-5.6.17/packages/table/configure 2006-08-26 17:41:22.000000000 +1200
+@@ -3112,7 +3112,6 @@
+
+ fi
+
+-CFLAGS="$CMFLAGS"
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+@@ -3704,7 +3703,7 @@
+
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ CWFLAGS=-Wall
+ else
+ COFLAGS=-O
+--- pl-5.6.17.orig/packages/xpce/src/configure 2006-04-05 19:29:14.000000000 +1200
++++ pl-5.6.17/packages/xpce/src/configure 2006-08-26 17:43:18.000000000 +1200
+@@ -4391,7 +4391,7 @@
+ fi
+
+ if test ! -z "$GCC"; then
+- COFLAGS="-O2 -fno-strict-aliasing"
++ COFLAGS="$CFLAGS -fno-strict-aliasing"
+ if test "$ac_cv_header_stdc" = "yes" || test "$syslibh" = "yes"; then
+ CWFLAGS=-Wall
+ else
+@@ -4401,7 +4401,7 @@
+ COFLAGS=-O
+ CWFLAGS=
+ fi
+-CFLAGS="$CMFLAGS"
++
+ echo "$as_me:$LINENO: checking for inline" >&5
+ echo $ECHO_N "checking for inline... $ECHO_C" >&6
+ if test "${ac_cv_c_inline+set}" = set; then
diff --git a/dev-lang/swi-prolog/files/swi-prolog-PLBASE-r1.patch b/dev-lang/swi-prolog/files/swi-prolog-PLBASE-r1.patch
new file mode 100644
index 000000000000..058427316ae7
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-PLBASE-r1.patch
@@ -0,0 +1,84 @@
+--- pl-5.6.17.orig/src/rc/Makefile.in 2006-07-11 20:22:28.000000000 +1200
++++ pl-5.6.17/src/rc/Makefile.in 2006-08-26 19:44:07.000000000 +1200
+@@ -14,7 +14,7 @@
+ srcdir=@srcdir@
+ @VPATH@ @srcdir@
+ bindir=$(exec_prefix)/bin
+-PLBASE=$(prefix)/lib/@PL@-$(PLVERSION)
++PLBASE=@libdir@/@PL@-$(PLVERSION)
+ man_prefix=$(prefix)/man
+ mansec=1
+ lmansec=3
+--- pl-5.6.17.orig/src/Makefile.in 2006-07-15 01:51:53.000000000 +1200
++++ pl-5.6.17/src/Makefile.in 2006-08-26 19:44:07.000000000 +1200
+@@ -36,6 +36,7 @@
+ srcdir=@srcdir@
+ @VPATH@ @srcdir@
+ bindir=@bindir@
++libdir=@libdir@
+ mandir=@mandir@
+ mansec=1
+ lmansec=3
+@@ -46,7 +47,7 @@
+ PLVERSION=@PLVERSION@
+ PL=@PL@@RT@
+ PLV=@PL@@RT@-@PLVERSION@
+-PLBASE=$(prefix)/lib/@PL@@RT@-@PLVERSION@
++PLBASE=$(libdir)/@PL@@RT@-@PLVERSION@
+ BOOTFILE=@BOOTFILE@
+
+ CC=@CC@
+@@ -360,7 +361,7 @@
+ $(INSTALL_DATA) libplimp.a $(DESTDIR)$(PLBASE)/lib/$(ARCH)
+
+ idirs::
+- if [ ! -d $(DESTDIR)$(prefix)/lib ]; then $(MKDIR) $(DESTDIR)$(prefix)/lib; fi
++ if [ ! -d $(DESTDIR)$(libdir) ]; then $(MKDIR) $(DESTDIR)$(libdir); fi
+ if [ ! -d $(DESTDIR)$(PLBASE) ]; then $(MKDIR) $(DESTDIR)$(PLBASE); fi
+ for d in $(installdirs); do \
+ if [ ! -d $(DESTDIR)$(PLBASE)/$$d ]; then \
+@@ -423,7 +424,7 @@
+ # runtime-only environment installation
+ #
+
+-RTHOME= $(DESTDIR)$(prefix)/lib/$(PLV)
++RTHOME= $(DESTDIR)$(libdir)/$(PLV)
+ RTDIRS= $(RTHOME) $(RTHOME)/bin $(RTHOME)/lib $(RTHOME)/lib/$(ARCH) \
+ $(RTHOME)/man $(RTHOME)/bin/$(ARCH) $(RTHOME)/include
+
+--- pl-5.6.17.orig/src/configure 2006-07-11 20:31:16.000000000 +1200
++++ pl-5.6.17/src/configure 2006-08-26 19:56:00.000000000 +1200
+@@ -2546,7 +2546,7 @@
+
+
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+-PLBASE=$prefix/lib/$PL-$PLVERSION
++PLBASE=$libdir/$PL-$PLVERSION
+
+
+ for ac_prog in gmake make
+--- pl-5.6.17.orig/packages/Makefile.in 2005-11-13 03:15:23.000000000 +1300
++++ pl-5.6.17/packages/Makefile.in 2006-08-26 19:44:07.000000000 +1200
+@@ -28,9 +28,10 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ bindir=@bindir@
++libdir=@libdir@
+ PL=@PL@@RT@
+ PLVERSION=@PLVERSION@
+-PLBASE=$(prefix)/lib/@PL@-$(PLVERSION)
++PLBASE=$(libdir)/@PL@-$(PLVERSION)
+ PKGDOC=$(PLBASE)/doc/packages
+ PLLIBS=@LIBS@
+ PLARCH=@ARCH@
+--- pl-5.6.17.orig/packages/ltx2htm/Makefile.in 2005-12-02 21:53:05.000000000 +1300
++++ pl-5.6.17/packages/ltx2htm/Makefile.in 2006-08-30 20:44:21.000000000 +1200
+@@ -33,7 +33,7 @@
+ INSTALL_DATA=@INSTALL_DATA@
+
+ # Don't change, this is also in latex2html.in!
+-LIBDIR=$(prefix)/lib/latex2html
++LIBDIR=@libdir@/latex2html
+
+ OBJ= tex.o psfile.o
+ LIB= latex2html.pl latex.cmd pl.pl pl.cmd xpce.pl xpce.cmd
diff --git a/dev-lang/swi-prolog/files/swi-prolog-cppproxy.patch b/dev-lang/swi-prolog/files/swi-prolog-cppproxy.patch
new file mode 100644
index 000000000000..ba18dbbdd7b3
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-cppproxy.patch
@@ -0,0 +1,11 @@
+--- pl-5.6.7.orig/packages/configure.in 2005-11-30 05:26:17.000000000 +1300
++++ pl-5.6.7/packages/configure.in 2006-02-15 21:16:23.000000000 +1300
+@@ -54,7 +54,7 @@
+
+
+ if [ -z "$PKG" ]; then
+- PKG="clib cpp odbc table xpce sgml sgml/RDF semweb http chr clpqr nlp ssl jpl"
++ PKG="clib cpp cppproxy odbc table xpce sgml sgml/RDF semweb http chr clpqr nlp ssl jpl"
+ fi
+
+ configoptions=""
diff --git a/dev-lang/swi-prolog/files/swi-prolog-db-docs.patch b/dev-lang/swi-prolog/files/swi-prolog-db-docs.patch
new file mode 100644
index 000000000000..12b7389fe918
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-db-docs.patch
@@ -0,0 +1,21 @@
+--- pl-5.6.17.orig/packages/db/Makefile.in 2005-12-15 04:54:38.000000000 +1300
++++ pl-5.6.17/packages/db/Makefile.in 2006-08-27 10:41:12.000000000 +1200
+@@ -9,6 +9,7 @@
+ PL=@PL@
+ PLBASE=@PLBASE@
+ PLARCH=@PLARCH@
++PKGDOC=$(PLBASE)/doc/packages
+ PCEHOME=/staff/jan/src/xpce
+ DESTDIR=
+
+@@ -57,6 +58,10 @@
+ $(INSTALL) -m 644 $(LIBPL) $(DESTDIR)$(PLBASE)/library
+ $(PL) -f none -g make -t halt
+
++html-install::
++ mkdir -p $(DESTDIR)$(PKGDOC)
++ $(INSTALL_DATA) $(DOC).html $(DESTDIR)$(PKGDOC)
++
+ uninstall:
+ (cd $(PLBASE)/library && rm -f $(LIBPL))
+ $(PL) -f none -g make -t halt
diff --git a/dev-lang/swi-prolog/files/swi-prolog-db-versioned.patch b/dev-lang/swi-prolog/files/swi-prolog-db-versioned.patch
new file mode 100644
index 000000000000..969a3e851a58
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-db-versioned.patch
@@ -0,0 +1,31 @@
+--- pl-5.6.17.orig/packages/db/configure.in 2006-07-07 23:29:11.000000000 +1200
++++ pl-5.6.17/packages/db/configure.in 2006-08-27 11:08:41.000000000 +1200
+@@ -112,20 +112,17 @@
+ AC_DEFINE(HAVE_LIBNSL, 1,
+ [Define if you have the nsl library]))
+
+-AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$LIBDB''_db_create])
+-AC_CACHE_CHECK([for db_create in -l$LIBDB], ac_Lib,
+- [ac_check_lib_save_LIBS=$LIBS
++AC_CHECK_HEADERS(db.h)
++AC_MSG_CHECKING(db_create in -ldb)
+ LIBS="-l$LIBDB $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <db.h>]],
+ [[db_create(0,0,0)]])],
+- [AS_VAR_SET(ac_Lib, yes)
+- LIBS="-l$LIBDB $LIBS"
+- HAVEDB=yes],
+- [AS_VAR_SET(ac_Lib, no)
+- HAVEDB=no])
+-LIBS=$ac_check_lib_save_LIBS])
+-
+-AC_CHECK_HEADERS(db.h)
++ [HAVEDB=yes
++ AC_MSG_RESULT(yes)
++ ],
++ [HAVEDB=no
++ AC_MSG_RESULT(no)
++ ])
+
+ AC_MSG_CHECKING(Whether environment is sane)
+ if test "$HAVEDB" = "yes"; then
diff --git a/dev-lang/swi-prolog/files/swi-prolog-jpl-install.patch b/dev-lang/swi-prolog/files/swi-prolog-jpl-install.patch
new file mode 100644
index 000000000000..61e794e2d972
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-jpl-install.patch
@@ -0,0 +1,11 @@
+--- pl-5.6.16.orig/packages/jpl/Makefile.in 2006-02-04 04:38:49.000000000 +1300
++++ pl-5.6.16/packages/jpl/Makefile.in 2006-07-08 16:26:06.000000000 +1200
+@@ -157,7 +157,7 @@
+ if [ -f examples/java/$$d/$$plfile ]; then \
+ $(INSTALL_DATA) examples/java/$$d/$$plfile $(DESTDIR)$(EXJAVA)/$$d ;\
+ fi; \
+- $(INSTALL_DATA) examples/java/$$d/$$d.class $(DESTDIR)$(EXJAVA)/$$d ;\
++ $(INSTALL_DATA) examples/java/$$d/$$d*.class $(DESTDIR)$(EXJAVA)/$$d ;\
+ done
+ $(INSTALL_DATA) examples/java/SemWeb/test.rdf $(DESTDIR)$(EXJAVA)/SemWeb
+
diff --git a/dev-lang/swi-prolog/files/swi-prolog-jpl-ppc.patch b/dev-lang/swi-prolog/files/swi-prolog-jpl-ppc.patch
new file mode 100644
index 000000000000..f132cea2f512
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-jpl-ppc.patch
@@ -0,0 +1,90 @@
+--- pl-5.6.17.orig/packages/jpl/Makefile.in 2006-02-04 04:38:49.000000000 +1300
++++ pl-5.6.17/packages/jpl/Makefile.in 2006-08-26 14:24:40.000000000 +1200
+@@ -34,6 +34,7 @@
+ JAVA_HOME=@JAVA_HOME@
+ JAVAC=@JAVAC@
+ JAVALIBS=@JAVALIBS@
++JAVALDPATH=@JAVALDPATH@
+
+ DOCTOTEX=$(PCEHOME)/bin/doc2tex
+ PLTOTEX=$(PCEHOME)/bin/pl2tex
+@@ -68,7 +69,7 @@
+ ################################################################
+
+ check:: TestJPL.class
+- $(PL) -q -f check.pl -g test,halt -t 'halt(1)'
++ LD_LIBRARY_PATH=$(JAVALDPATH) $(PL) -q -f check.pl -g test,halt -t 'halt(1)'
+
+ TestJPL.class: TestJPL.java
+ $(JAVAC) -classpath jpl.jar TestJPL.java
+pl-5.6.17/packages/jpl/ac/ac_jni_include_dirs.m4
+--- pl-5.6.17.orig/packages/jpl/ac/ac_jni_include_dirs.m4 2006-02-04 04:38:49.000000000 +1300
++++ pl-5.6.17/packages/jpl/ac/ac_jni_include_dirs.m4 2006-08-26 10:16:50.000000000 +1200
+@@ -54,19 +54,32 @@
+ done
+
+ case "$host_cpu" in
+- i?86) _JNI_LIBDIRS="i386"
++ i?86)
++ _JNI_LIBDIRS="lib/i386"
+ _JNI_LIBSUBDIR="client"
+ ;;
+- x86_64) _JNI_LIBDIRS="amd64"
++ x86_64)
++ _JNI_LIBDIRS="lib/amd64"
+ _JNI_LIBSUBDIR="server"
+ ;;
+- *) _JNI_LIBDIRS=""
++ powerpc)
++ case "$host_os" in
++ linux*)
++ _JNI_LIBDIRS="bin"
++ _JNI_LIBSUBDIR="classic"
++ ;;
++ *)
++ _JNI_LIBDIRS=""
++ esac
++ ;;
++ *)
++ _JNI_LIBDIRS=""
+ esac
+
+ for d in $_JNI_LIBDIRS; do
+- echo "Trying $_JTOPDIR/jre/lib/$d/$_JNI_LIBSUBDIR"
+- if test -d $_JTOPDIR/jre/lib/$d/$_JNI_LIBSUBDIR; then
+- JNI_CLIENT_DIRS="$JNI_CLIENT_DIRS $_JTOPDIR/jre/lib/$d/$_JNI_LIBSUBDIR $_JTOPDIR/jre/lib/$d"
++ echo "Trying $_JTOPDIR/jre/$d/$_JNI_LIBSUBDIR"
++ if test -d $_JTOPDIR/jre/$d/$_JNI_LIBSUBDIR; then
++ JNI_CLIENT_DIRS="$JNI_CLIENT_DIRS $_JTOPDIR/jre/$d/$_JNI_LIBSUBDIR $_JTOPDIR/jre/$d"
+ fi
+ done
+
+pl-5.6.17/packages/jpl/configure.in
+--- pl-5.6.17.orig/packages/jpl/configure.in 2005-01-31 23:47:37.000000000 +1300
++++ pl-5.6.17/packages/jpl/configure.in 2006-08-26 18:50:11.000000000 +1200
+@@ -18,6 +18,7 @@
+ AC_SUBST(LDSOFLAGS)
+ AC_SUBST(JAVA_HOME)
+ AC_SUBST(JAVALIBS)
++AC_SUBST(JAVALDPATH)
+
+ AC_ARG_ENABLE(mt, [ --enable-mt Enable Multi-threading],
+ [case "$enableval" in
+@@ -84,6 +85,9 @@
+ *darwin*)
+ JAVALIBS="-Wl,-framework,JavaVM"
+ ;;
++ *powerpc-linux*)
++ JAVALIBS="-ljava -ljvm"
++ ;;
+ *)
+ JAVALIBS="-ljava -lverify -ljvm"
+ ;;
+@@ -128,6 +132,7 @@
+
+ for d in $JNI_CLIENT_DIRS; do
+ LDSOFLAGS="$LDSOFLAGS -L$d"
++ JAVALDPATH="$JAVALDPATH:$d"
+ done
+
+ if test "$java_abs_paths" = yes; then
diff --git a/dev-lang/swi-prolog/files/swi-prolog-libtai.patch b/dev-lang/swi-prolog/files/swi-prolog-libtai.patch
new file mode 100644
index 000000000000..1d6be873a74c
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-libtai.patch
@@ -0,0 +1,11 @@
+--- pl-5.6.17.orig/src/pl-tai.c 2006-07-28 21:20:12.000000000 +1200
++++ pl-5.6.17/src/pl-tai.c 2006-08-30 21:55:37.000000000 +1200
+@@ -664,7 +664,7 @@
+ break;
+ case '+':
+ { char buf[26];
+-
++ cal_ftm(ftm, HAS_WYDAY);
+ asctime_r(&ftm->tm, buf);
+ buf[24] = EOS;
+ OUTSTR(buf);
diff --git a/dev-lang/swi-prolog/files/swi-prolog-ltx2htm.patch b/dev-lang/swi-prolog/files/swi-prolog-ltx2htm.patch
new file mode 100644
index 000000000000..de6df69900de
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-ltx2htm.patch
@@ -0,0 +1,68 @@
+--- pl-5.6.4.orig/packages/ltx2htm/doc2tex 1997-01-21 06:39:40.000000000 +1300
++++ pl-5.6.4/packages/ltx2htm/doc2tex 2006-02-13 23:29:54.000000000 +1300
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ sub printTeX
+ { s/`([@\w]+)\s*<->(\w+)/\\index{\l\1,\\both{\2}}`\1 \\both{\2}/g;
+--- pl-5.6.17.orig/packages/ltx2htm/Makefile.in 2005-12-02 21:53:05.000000000 +1300
++++ pl-5.6.17/packages/ltx2htm/Makefile.in 2006-08-26 16:12:20.000000000 +1200
+@@ -11,9 +11,11 @@
+
+ MAKE=@MAKE@
+
+-PL=@PL@
++PL=../@PL@.sh
++PLBASE=@PLBASE@
+ PLARCH=@PLARCH@
+ PLHOME=@PLHOME@
++PKGDOC=$(PLBASE)/doc/packages
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ bindir=@bindir@
+@@ -38,32 +40,29 @@
+ OBJ= tex.o psfile.o
+ LIB= latex2html.pl latex.cmd pl.pl pl.cmd xpce.pl xpce.cmd
+
+-all:
+- @echo "==============================================================="
+- @echo "Usage:"
+- @echo ""
+- @echo "$(MAKE) install Install the package"
+- @echo "$(MAKE) html Translate the documentation into HTML"
+- @echo "$(MAKE) dvi Translate the documentation into DVI"
+- @echo "==============================================================="
++all: tex.@SO@
+
+ install: tex.@SO@
+- mkdir -p $(DESTDIR)$(LIBDIR)/lib/$(PLARCH)
+- $(INSTALL_DATA) tex.@SO@ $(DESTDIR)$(LIBDIR)/lib/$(PLARCH)
+- $(INSTALL_PROGRAM) latex2html $(DESTDIR)$(bindir)
+- for f in $(LIB); do $(INSTALL_DATA) $$f $(DESTDIR)$(LIBDIR); done
+- mkdir -p $(DESTDIR)$(LIBDIR)/icons
+- for f in icons/*.gif; do $(INSTALL_DATA) $$f $(DESTDIR)$(LIBDIR)/icons; done
++ mkdir -p $(DESTDIR)$(PLBASE)/lib/$(PLARCH)
++ $(INSTALL_DATA) -m 755 tex.@SO@ $(DESTDIR)$(PLBASE)/lib/$(PLARCH)
++ mkdir -p $(DESTDIR)$(PLBASE)/library
++ for f in $(LIB); do $(INSTALL_DATA) $$f $(DESTDIR)$(PLBASE)/library; done
+
+ tex.@SO@: $(OBJ)
+ $(LD) $(LDFLAGS) -o $@ $(OBJ)
+
++html-install: html
++ mkdir -p $(DESTDIR)$(PKGDOC)/latex2html
++ for f in manual/*; do $(INSTALL_DATA) $$f $(DESTDIR)$(PKGDOC)/latex2html; done
++
++check::
++
+ ################################################################
+ # Documentation
+ ################################################################
+
+ html: manual.tex
+- latex2html manual
++ $(PL) -p library=. -f none -g "assert(user:file_search_path(foreign, '.')),load_files(library(latex2html),[silent(true)]),latex2html('manual.tex')" -t halt
+
+ dvi: manual.tex
+ latex manual
diff --git a/dev-lang/swi-prolog/files/swi-prolog-portage.patch b/dev-lang/swi-prolog/files/swi-prolog-portage.patch
new file mode 100644
index 000000000000..9e5d6a15fd6b
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-portage.patch
@@ -0,0 +1,40 @@
+--- pl-5.6.4.orig/packages/Makefile.in 2005-11-13 03:15:23.000000000 +1300
++++ pl-5.6.4/packages/Makefile.in 2006-02-13 23:09:00.000000000 +1300
+@@ -76,7 +76,7 @@
+
+ install::
+ for p in $(PKG); do \
+- if [ -r $$p/Makefile ]; then ( cd $$p && $(MAKE) $@ ); fi; \
++ if [ -r $$p/Makefile ]; then $(MAKE) -C $$p $@ || exit 1; fi; \
+ done
+ @echo "*** Forcing update of library index ***"
+ rm -f $(DESTDIR)$(PLLIB)/INDEX.pl
+@@ -110,7 +110,7 @@
+ echo "**********************"; \
+ echo "* Package $$p"; \
+ echo "**********************"; \
+- ( cd $$p && $(CONFIG) ); \
++ ( cd $$p && $(CONFIG) ) || exit 1; \
+ fi; \
+ done
+
+@@ -127,7 +127,7 @@
+
+ check::
+ for p in $(PKG); do \
+- if [ -r $$p/Makefile ]; then ( cd $$p && $(MAKE) $@ ); fi; \
++ if [ -r $$p/Makefile ]; then $(MAKE) -C $$p $@ || exit 1; fi; \
+ done
+
+ # test environment
+--- pl-5.6.17.orig/packages/db/Makefile.in 2005-12-15 04:54:38.000000000 +1300
++++ pl-5.6.17/packages/db/Makefile.in 2006-08-27 10:42:25.000000000 +1200
+@@ -61,6 +61,8 @@
+ (cd $(PLBASE)/library && rm -f $(LIBPL))
+ $(PL) -f none -g make -t halt
+
++check::
++
+ ################################################################
+ # Documentation
+ ################################################################
diff --git a/dev-lang/swi-prolog/files/swi-prolog-semweb-sparc-alignment.patch b/dev-lang/swi-prolog/files/swi-prolog-semweb-sparc-alignment.patch
new file mode 100644
index 000000000000..b73480777523
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-semweb-sparc-alignment.patch
@@ -0,0 +1,14 @@
+--- pl-5.6.17.orig/packages/semweb/avl.h 2006-03-07 04:23:47.000000000 +1300
++++ pl-5.6.17/packages/semweb/avl.h 2006-08-15 21:59:09.000000000 +1200
+@@ -58,7 +58,11 @@
+ /* structure for a node in an AVL tree */
+ typedef struct avl_node
+ { struct avl_node *subtree[2]; /* LEFT and RIGHT subtrees */
++#ifndef __sparc__
+ short bal; /* balance factor */
++#else
++ long bal; /* balance factor */
++#endif
+ char data[1]; /* data on my back */
+ } AVLnode, *AVLtree;
+
diff --git a/dev-lang/swi-prolog/files/swi-prolog-thread-tests.patch b/dev-lang/swi-prolog/files/swi-prolog-thread-tests.patch
new file mode 100644
index 000000000000..150b10e95bfb
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-thread-tests.patch
@@ -0,0 +1,61 @@
+--- pl-5.6.17.orig/packages/clib/testsocket.pl 2004-09-22 02:28:16.000000000 +1200
++++ pl-5.6.17/packages/clib/testsocket.pl 2006-08-27 09:57:19.000000000 +1200
+@@ -35,6 +35,12 @@
+ client/1 % +Address
+ ]).
+
++:- ( current_prolog_flag(system_thread_id, _)
++ -> true
++ ; format('Disabling tcp_test on single-threaded engine~n~n', []),
++ halt
++ ).
++
+ :- asserta(user:file_search_path(foreign, '.')).
+
+ :- use_module(socket).
+--- pl-5.6.17.orig/packages/semweb/litmap_test.pl 2006-03-07 02:17:30.000000000 +1300
++++ pl-5.6.17/packages/semweb/litmap_test.pl 2006-08-27 10:13:14.000000000 +1200
+@@ -3,6 +3,13 @@
+ test/1,
+ test/2
+ ]).
++
++:- ( current_prolog_flag(system_thread_id, _)
++ -> true
++ ; format('Disabling literal map test on single-threaded engine~n~n', []),
++ halt
++ ).
++
+ :- use_module(library(debug)).
+ :- use_module(library(debug)).
+ :- asserta(user:file_search_path(foreign, '../sgml')).
+--- pl-5.6.17.orig/packages/semweb/rdf_db_test.pl 2006-03-09 03:32:48.000000000 +1300
++++ pl-5.6.17/packages/semweb/rdf_db_test.pl 2006-08-27 10:11:29.000000000 +1200
+@@ -5,6 +5,12 @@
+ Copyright (C) 1996 University of Amsterdam. All rights reserved.
+ */
+
++:- ( current_prolog_flag(system_thread_id, _)
++ -> true
++ ; format('Disabling RDF_DB test suite on single-threaded engine~n~n', []),
++ halt
++ ).
++
+ :- asserta(file_search_path(foreign, '../sgml')).
+ :- asserta(file_search_path(library, '../sgml')).
+ :- asserta(file_search_path(library, '../sgml/RDF')).
+--- pl-5.6.17.orig/packages/ssl/ssl_test.pl 2006-06-21 19:51:59.000000000 +1200
++++ pl-5.6.17/packages/ssl/ssl_test.pl 2006-08-27 10:17:41.000000000 +1200
+@@ -29,6 +29,12 @@
+ the GNU General Public License.
+ */
+
++:- ( current_prolog_flag(system_thread_id, _)
++ -> true
++ ; format('Disabling SSL test on single-threaded engine~n~n', []),
++ halt
++ ).
++
+ :- asserta(user:file_search_path(foreign, '.')).
+
+ :- use_module(ssl).
diff --git a/dev-lang/swi-prolog/files/swi-prolog-xpce-test.patch b/dev-lang/swi-prolog/files/swi-prolog-xpce-test.patch
new file mode 100644
index 000000000000..4983b0baae66
--- /dev/null
+++ b/dev-lang/swi-prolog/files/swi-prolog-xpce-test.patch
@@ -0,0 +1,154 @@
+--- pl-5.6.17.orig/packages/xpce/src/Makefile.in 2006-07-28 08:29:29.000000000 +1200
++++ pl-5.6.17/packages/xpce/src/Makefile.in 2006-08-27 10:22:16.000000000 +1200
+@@ -125,6 +125,7 @@
+ PLBINDIR=$(PLBASE)/bin/$(PLARCH)
+ PL=@PL@
+ PLBUILD=@PLBUILD@
++PCEBUILD=$(PCEHOME)/src/xpce.sh
+ PLNAME=@PLNAME@
+ PLLD=@PLLD@
+
+@@ -897,7 +898,8 @@
+ ################################################################
+
+ check::
+- $(PLBUILD) -q -g "['../src/test.pl'],test,halt" -t 'halt(1)'
++ $(PCEBUILD) -q -g "['./find_display.pl'],find_display,halt" -t 'halt(0)'
++ $(PCEBUILD) -q -g "['../src/test.pl'],test,halt" -t 'halt(1)'
+
+
+ ################################################################
+--- pl-5.6.17.orig/packages/xpce/src/find_display.pl 1970-01-01 12:00:00.000000000 +1200
++++ pl-5.6.17/packages/xpce/src/find_display.pl 2006-08-28 21:47:54.000000000 +1200
+@@ -0,0 +1,13 @@
++:- asserta(library_directory('../prolog/lib')).
++:- use_module(library(pce)).
++
++find_display :-
++ current_input(InputStream),
++ open_null_stream(NullStream),
++ set_prolog_IO(InputStream, NullStream, NullStream),
++ ( exists_file('display_exists')
++ -> delete_file('display_exists')
++ ; true),
++ get(@display, visual_type, _),
++ open('display_exists', update, Fd),
++ close(Fd).
+--- pl-5.6.17.orig/packages/xpce/src/test.pl 2006-03-30 01:42:18.000000000 +1200
++++ pl-5.6.17/packages/xpce/src/test.pl 2006-08-28 21:47:10.000000000 +1200
+@@ -35,11 +35,23 @@
+ ?- test.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
++:- asserta(library_directory('../prolog/lib')).
++:- use_module(library(pce)).
++:- use_module(library(pce_util)).
++
+ :- get(@pce, version, V),
+ format('XPCE/SWI-Prolog test suite. (XPCE version ~w)~n\
+ To run all tests run ?- test.~n~n', [V]).
+
++:- dynamic
++ display_enabled/0.
+
++:- format('Checking for usable X server~n', []),
++ ( exists_file('display_exists')
++ -> format('X server found.~n~n', []),
++ assert(display_enabled)
++ ; format('No usable X server found. Some tests are disabled.~n~n', [])
++ ).
+
+ /*******************************
+ * NAMES *
+@@ -163,12 +175,12 @@
+ *******************************/
+
+ srcsink(contents-1) :-
+- numlist(32, 1000, L),
++ numlist(32, 255, L),
+ tmp_file(test, Tmp),
+- open(Tmp, write, Out, [encoding(utf8)]),
++ open(Tmp, write, Out, [encoding(iso_latin_1)]),
+ maplist(put_code(Out), L),
+ close(Out),
+- new(File, file(Tmp, utf8)),
++ new(File, file(Tmp, iso_latin_1)),
+ get(File, contents, String),
+ delete_file(Tmp),
+ get(String, value, Atom),
+@@ -193,7 +205,7 @@
+ *******************************/
+
+ foreign(Name) :-
+- atom_codes(Name, [1087, 1083, 1072, 1090, 1085, 1072, 1103]).
++ atom_codes(Name, [102, 105, 108, 101, 110, 97, 109, 101]).
+
+ file(env-1) :-
+ new(F, file('$PCEHOME/Defaults')),
+@@ -202,11 +214,6 @@
+ get(F, name, PceName),
+ same_file(PceName, PlName),
+ send(F, same, PlName).
+-file(home-1) :-
+- new(F, file('~/foobar')),
+- get(F, name, PceName),
+- expand_file_name('~/foobar', [PlName]),
+- same_file(PceName, PlName).
+ file(abs-1) :-
+ new(F, file(foobar)),
+ get(F, absolute_path, Abs),
+@@ -221,13 +228,15 @@
+ -> send(file(F), exists)
+ ; \+ send(file(F), exists)
+ )).
+-file(utf8-1) :-
++file(ascii-1) :-
+ foreign(Name),
+ new(F, file(Name)),
++ send(F, encoding, iso_latin_1),
+ send(F, open, write),
+ send(F, append, 'Hello world\n'),
+ send(F, close),
+ new(F2, file(Name)),
++ send(F2, encoding, iso_latin_1),
+ exists_file(Name),
+ send(F2, exists),
+ get(F2, contents, string('Hello world\n')),
+@@ -312,12 +321,12 @@
+ atom_concat(hello, Wide, New).
+ textbuffer(file-1) :-
+ new(TB, text_buffer),
+- numlist(32, 1000, L),
++ numlist(32, 255, L),
+ atom_codes(WAtom, L),
+ send(TB, append, WAtom),
+ tmp_file(test, Tmp),
+- send(TB, save, file(Tmp, utf8)),
+- get(file(Tmp, utf8), contents, string(Copy)),
++ send(TB, save, file(Tmp, iso_latin_1)),
++ get(file(Tmp, iso_latin_1), contents, string(Copy)),
+ delete_file(Tmp),
+ Copy == WAtom.
+ textbuffer(store-1) :-
+@@ -635,6 +644,10 @@
+ testset(regex). % Regular expression matches
+ testset(type). % Check type logic
+
++display_required(bom).
++display_required(selection).
++display_required(image).
++
+ % testdir(Dir)
+ %
+ % Enumerate directories holding tests.
+@@ -683,6 +696,10 @@
+ ).
+
+ runtest(Name) :-
++ display_required(Name),
++ \+display_enabled,
++ format('Disabling test set "~w"~n', [Name]).
++runtest(Name) :-
+ format('Running test set "~w" ', [Name]),
+ flush,
+ functor(Head, Name, 1),
diff --git a/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild b/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild
new file mode 100644
index 000000000000..a89147755607
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild,v 1.1 2006/08/30 10:07:44 keri Exp $
+
+inherit autotools eutils
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc-macos ~sparc ~x86"
+IUSE="berkdb doc gmp java minimal odbc readline ssl static tetex threads X"
+
+DEPEND="!dev-lang/swi-prolog-lite
+ sys-libs/ncurses
+ odbc? ( dev-db/unixODBC )
+ berkdb? ( sys-libs/db )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.4 )
+ X? ( media-libs/jpeg
+ || ( (
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-proto/xproto )
+ virtual/x11 ) )"
+
+S="${WORKDIR}/pl-${PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i -e "s/man boot library/boot library/" src/Makefile.in
+ epatch "${FILESDIR}"/${PN}-portage.patch
+ epatch "${FILESDIR}"/${PN}-CFLAGS-r1.patch
+ epatch "${FILESDIR}"/${PN}-PLBASE-r1.patch
+ epatch "${FILESDIR}"/${PN}-test_date.patch
+ epatch "${FILESDIR}"/${PN}-cppproxy.patch
+ epatch "${FILESDIR}"/${PN}-db-versioned.patch
+ epatch "${FILESDIR}"/${PN}-db-docs.patch
+ epatch "${FILESDIR}"/${PN}-jpl-ppc.patch
+ epatch "${FILESDIR}"/${PN}-jpl-install.patch
+ epatch "${FILESDIR}"/${PN}-libtai.patch
+ epatch "${FILESDIR}"/${PN}-ltx2htm.patch
+ epatch "${FILESDIR}"/${PN}-semweb-sparc-alignment.patch
+ epatch "${FILESDIR}"/${PN}-thread-tests.patch
+ epatch "${FILESDIR}"/${PN}-xpce-test.patch
+}
+
+src_compile() {
+ einfo "Building SWI-Prolog compiler"
+
+ local threadconf
+ if use java && ! use minimal || use threads ; then
+ threadconf="--enable-mt"
+ else
+ threadconf="--disable-mt"
+ fi
+
+ cd "${S}"/src
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ ${threadconf} \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable !static shared) \
+ --disable-custom-flags \
+ || die "econf failed"
+ emake -j1 || die "emake failed"
+
+ if ! use minimal ; then
+ einfo "Building SWI-Prolog additional packages"
+
+ for package in db jpl
+ do
+ cd "${S}/packages/${package}"
+ eautoreconf
+ done
+
+ cd "${S}/packages"
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ ${threadconf} \
+ $(use_enable !static shared) \
+ --without-C-sicstus \
+ --with-chr \
+ --with-clib \
+ --with-clpqr \
+ --with-cpp \
+ --with-cppproxy \
+ $(use_with berkdb db) \
+ --with-http \
+ --without-jasmine \
+ $(use_with java jpl) \
+ $(use_with tetex ltx2htm) \
+ --with-nlp \
+ $(use_with odbc) \
+ --with-semweb \
+ --with-sgml \
+ --with-sgml/RDF \
+ $(use_with ssl) \
+ --with-table \
+ $(use_with X xpce) \
+ || die "packages econf failed"
+
+ emake -j1 || die "packages emake failed"
+ fi
+}
+
+src_install() {
+ make -C src DESTDIR="${D}" install || die "install src failed"
+
+ if ! use minimal ; then
+ make -C packages DESTDIR="${D}" install || die "install packages failed"
+ if use doc ; then
+ make -C packages DESTDIR="${D}" html-install || die "html-install failed"
+ make -C packages/cppproxy DESTDIR="${D}" install-examples || die "install-examples failed"
+ fi
+ fi
+
+ dodoc ANNOUNCE ChangeLog INSTALL INSTALL.notes PORTING README README.GUI VERSION
+}
+
+src_test() {
+ cd "${S}/src"
+ make check || die "make check failed. See above for details."
+
+ if ! use minimal ; then
+ cd "${S}/packages"
+ make check || die "make check failed. See above for details."
+ fi
+}