summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2006-12-04 09:07:13 +0000
committerKeri Harris <keri@gentoo.org>2006-12-04 09:07:13 +0000
commitf527362c6be34f04fb5f0c6b8077673c3c5c0472 (patch)
treea2a5d4767d8f20b1a47039c54bcdf52e2dc965a9 /dev-lang/mercury-extras
parentstable x86, bug #156964 (diff)
downloadhistorical-f527362c6be34f04fb5f0c6b8077673c3c5c0472.tar.gz
historical-f527362c6be34f04fb5f0c6b8077673c3c5c0472.tar.bz2
historical-f527362c6be34f04fb5f0c6b8077673c3c5c0472.zip
Version bump.
Package-Manager: portage-2.1.2_rc2-r3
Diffstat (limited to 'dev-lang/mercury-extras')
-rw-r--r--dev-lang/mercury-extras/ChangeLog19
-rw-r--r--dev-lang/mercury-extras/Manifest60
-rw-r--r--dev-lang/mercury-extras/files/digest-mercury-extras-0.13.13
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-concurrency.patch11
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-curs.patch600
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-dynamic_linking.patch11
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-lex.patch22
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_glut.patch24
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_opengl.patch81
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_tcltk.patch14
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-odbc.patch18
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-posix.patch11
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-references.patch13
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-trailed_update.patch23
-rw-r--r--dev-lang/mercury-extras/mercury-extras-0.13.1.ebuild138
15 files changed, 1043 insertions, 5 deletions
diff --git a/dev-lang/mercury-extras/ChangeLog b/dev-lang/mercury-extras/ChangeLog
index 12137726c205..2b5b5cc8a8e6 100644
--- a/dev-lang/mercury-extras/ChangeLog
+++ b/dev-lang/mercury-extras/ChangeLog
@@ -1,6 +1,23 @@
# ChangeLog for dev-lang/mercury-extras
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury-extras/ChangeLog,v 1.57 2006/11/10 07:42:06 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury-extras/ChangeLog,v 1.58 2006/12/04 09:07:13 keri Exp $
+
+*mercury-extras-0.13.1 (04 Dec 2006)
+
+ 04 Dec 2006; keri <keri@gentoo.org>
+ +files/mercury-extras-0.13.1-concurrency.patch,
+ +files/mercury-extras-0.13.1-curs.patch,
+ +files/mercury-extras-0.13.1-dynamic_linking.patch,
+ +files/mercury-extras-0.13.1-lex.patch,
+ +files/mercury-extras-0.13.1-mercury_glut.patch,
+ +files/mercury-extras-0.13.1-mercury_opengl.patch,
+ +files/mercury-extras-0.13.1-mercury_tcltk.patch,
+ +files/mercury-extras-0.13.1-odbc.patch,
+ +files/mercury-extras-0.13.1-posix.patch,
+ +files/mercury-extras-0.13.1-references.patch,
+ +files/mercury-extras-0.13.1-trailed_update.patch,
+ +mercury-extras-0.13.1.ebuild:
+ Version bump.
10 Nov 2006; keri <keri@gentoo.org>
files/mercury-extras-0.13.0-mercury_opengl.patch:
diff --git a/dev-lang/mercury-extras/Manifest b/dev-lang/mercury-extras/Manifest
index d45878ae8673..8bd0e3c23bbe 100644
--- a/dev-lang/mercury-extras/Manifest
+++ b/dev-lang/mercury-extras/Manifest
@@ -90,8 +90,53 @@ AUX mercury-extras-0.13.0-trailed_update.patch 759 RMD160 d079c3a8d19b74f71bf8d9
MD5 56cd11cec1d931c51b9f366dcdeae204 files/mercury-extras-0.13.0-trailed_update.patch 759
RMD160 d079c3a8d19b74f71bf8d972577f52c492f7d214 files/mercury-extras-0.13.0-trailed_update.patch 759
SHA256 034c6dfde10f3514646491630eee005bd35365f427cbf236739ff89ed0cc4f33 files/mercury-extras-0.13.0-trailed_update.patch 759
+AUX mercury-extras-0.13.1-concurrency.patch 316 RMD160 b276785f155cf4fe7c8ba5bd8f984ef709fc4048 SHA1 c676a08c625909bc3944c4d5e8b9e146f3c8813b SHA256 339ed5ac235eff5a7e1c380a80fd80fce7d8d09328c42216b856ea27de0bb1b7
+MD5 e8eceadfc5996137cc47b41a275cf0ae files/mercury-extras-0.13.1-concurrency.patch 316
+RMD160 b276785f155cf4fe7c8ba5bd8f984ef709fc4048 files/mercury-extras-0.13.1-concurrency.patch 316
+SHA256 339ed5ac235eff5a7e1c380a80fd80fce7d8d09328c42216b856ea27de0bb1b7 files/mercury-extras-0.13.1-concurrency.patch 316
+AUX mercury-extras-0.13.1-curs.patch 18585 RMD160 19a3bb0881aa56554c1f2bc0fe3b8ca595d85b3f SHA1 0565cb3b11539da73063381cf768ccfb1af72a1e SHA256 66a9220fe4fe80cf425a08b148d7651c9762a08f159442e93325a5038319b692
+MD5 2ddac3107c13c8ffd60798d0579dfb13 files/mercury-extras-0.13.1-curs.patch 18585
+RMD160 19a3bb0881aa56554c1f2bc0fe3b8ca595d85b3f files/mercury-extras-0.13.1-curs.patch 18585
+SHA256 66a9220fe4fe80cf425a08b148d7651c9762a08f159442e93325a5038319b692 files/mercury-extras-0.13.1-curs.patch 18585
+AUX mercury-extras-0.13.1-dynamic_linking.patch 376 RMD160 b39123b3713bc0e7cd35d1090eda6a404751be0f SHA1 996dbe39f6f229fe1e759ba8e2ce5ba85a8174b6 SHA256 8db33d8438f12f341b8074b13274063841380cedbd42c7468d8b3f125061c9b5
+MD5 c541118260dee0878b7af74279d57455 files/mercury-extras-0.13.1-dynamic_linking.patch 376
+RMD160 b39123b3713bc0e7cd35d1090eda6a404751be0f files/mercury-extras-0.13.1-dynamic_linking.patch 376
+SHA256 8db33d8438f12f341b8074b13274063841380cedbd42c7468d8b3f125061c9b5 files/mercury-extras-0.13.1-dynamic_linking.patch 376
+AUX mercury-extras-0.13.1-lex.patch 736 RMD160 ae8e9185a7201848cad58d261d98777812a92eed SHA1 b7e7570bcbdef2fa99938115d9e60c75bac8ab25 SHA256 d5eff7470cdcaf6496f2e4250f955f49e2e2e31d13b0904187ac5f6b1f250c14
+MD5 c68fc6ae9686ec5128c77eb2cac3009a files/mercury-extras-0.13.1-lex.patch 736
+RMD160 ae8e9185a7201848cad58d261d98777812a92eed files/mercury-extras-0.13.1-lex.patch 736
+SHA256 d5eff7470cdcaf6496f2e4250f955f49e2e2e31d13b0904187ac5f6b1f250c14 files/mercury-extras-0.13.1-lex.patch 736
+AUX mercury-extras-0.13.1-mercury_glut.patch 758 RMD160 d19e1c034d1e1aa2adfa3226e200e67dc8746d2a SHA1 18fe7d93fe7b48c379073ff505fb4b6308d78be9 SHA256 fa5d6cdf06fe333a90834bd65b129d79dcc61b8dc3fc786462b4b11804e1cc70
+MD5 f664f21bc81b85b208c21b3b528be5d8 files/mercury-extras-0.13.1-mercury_glut.patch 758
+RMD160 d19e1c034d1e1aa2adfa3226e200e67dc8746d2a files/mercury-extras-0.13.1-mercury_glut.patch 758
+SHA256 fa5d6cdf06fe333a90834bd65b129d79dcc61b8dc3fc786462b4b11804e1cc70 files/mercury-extras-0.13.1-mercury_glut.patch 758
+AUX mercury-extras-0.13.1-mercury_opengl.patch 3364 RMD160 dff7e267629aa1f593e40b0399982f1ffa21c7da SHA1 a1f358b8b7d7299c840700d2930eb1e77de6bd8d SHA256 9da38d524cd7802b477062e8199cb3a7f35e6ff0f84ad1acca1c46c53540ffae
+MD5 8ecd6a373a9dbec59fb3187f2d768846 files/mercury-extras-0.13.1-mercury_opengl.patch 3364
+RMD160 dff7e267629aa1f593e40b0399982f1ffa21c7da files/mercury-extras-0.13.1-mercury_opengl.patch 3364
+SHA256 9da38d524cd7802b477062e8199cb3a7f35e6ff0f84ad1acca1c46c53540ffae files/mercury-extras-0.13.1-mercury_opengl.patch 3364
+AUX mercury-extras-0.13.1-mercury_tcltk.patch 514 RMD160 017b0645322f622bbac569e8eefb4a58f2ff88e8 SHA1 91c6e32f27c14e07f6894745486fbf150adf3c48 SHA256 ad14d78321d44ecd5a8e36f4e8528c817c8ebf217e5223fcda52c5a01f4d4f6a
+MD5 e457795332e5e7607c0a0e50801b00de files/mercury-extras-0.13.1-mercury_tcltk.patch 514
+RMD160 017b0645322f622bbac569e8eefb4a58f2ff88e8 files/mercury-extras-0.13.1-mercury_tcltk.patch 514
+SHA256 ad14d78321d44ecd5a8e36f4e8528c817c8ebf217e5223fcda52c5a01f4d4f6a files/mercury-extras-0.13.1-mercury_tcltk.patch 514
+AUX mercury-extras-0.13.1-odbc.patch 420 RMD160 0ca91b65a8a3b7907abe793940b59756bb913fa1 SHA1 c66d99db6d2682c97312dea00d89d7dfe4239093 SHA256 39425688328508864a4335c116891c9cd8e1bd7bd0a51dc7e8bcf916eebe9cea
+MD5 fa7bd6d2f5361c893a5ea11bd0e3b352 files/mercury-extras-0.13.1-odbc.patch 420
+RMD160 0ca91b65a8a3b7907abe793940b59756bb913fa1 files/mercury-extras-0.13.1-odbc.patch 420
+SHA256 39425688328508864a4335c116891c9cd8e1bd7bd0a51dc7e8bcf916eebe9cea files/mercury-extras-0.13.1-odbc.patch 420
+AUX mercury-extras-0.13.1-posix.patch 373 RMD160 56f1d00fa93aaf41400428b80f79f72c69126ba3 SHA1 6e72e54a7dd0e5e5dcd0f464c5dc86e472ab9f5a SHA256 7a31af4cb9621ada7653caa2c4acf3e882ec1472909ec5906c45ac815b25297d
+MD5 879eb5cc5e95fb5d5efe99aa6acf42e5 files/mercury-extras-0.13.1-posix.patch 373
+RMD160 56f1d00fa93aaf41400428b80f79f72c69126ba3 files/mercury-extras-0.13.1-posix.patch 373
+SHA256 7a31af4cb9621ada7653caa2c4acf3e882ec1472909ec5906c45ac815b25297d files/mercury-extras-0.13.1-posix.patch 373
+AUX mercury-extras-0.13.1-references.patch 513 RMD160 e9e24c95c60ac0eb5b7145d9c345ab604f0bbe93 SHA1 a07a8217d22a1f8fbdc5da804b074e6bc70cd29b SHA256 02e4142693f792af9457f68b90ee39560b62b4041e86a3099f7f9c49f07f30a6
+MD5 1f3595ccab1c235b110dcee1716c9f59 files/mercury-extras-0.13.1-references.patch 513
+RMD160 e9e24c95c60ac0eb5b7145d9c345ab604f0bbe93 files/mercury-extras-0.13.1-references.patch 513
+SHA256 02e4142693f792af9457f68b90ee39560b62b4041e86a3099f7f9c49f07f30a6 files/mercury-extras-0.13.1-references.patch 513
+AUX mercury-extras-0.13.1-trailed_update.patch 759 RMD160 f8bfff3e44e0cce647f523c0685ab9e35a31ef8b SHA1 6a1b232464a5f484cea259913eff730eef91ac46 SHA256 5d3aba19d04b7cee5ae6345d325def9406a95dcf58d3abcacc3ad2d708fb63a9
+MD5 9c23a60c1bc27f201d381c4ad041b917 files/mercury-extras-0.13.1-trailed_update.patch 759
+RMD160 f8bfff3e44e0cce647f523c0685ab9e35a31ef8b files/mercury-extras-0.13.1-trailed_update.patch 759
+SHA256 5d3aba19d04b7cee5ae6345d325def9406a95dcf58d3abcacc3ad2d708fb63a9 files/mercury-extras-0.13.1-trailed_update.patch 759
DIST mercury-extras-0.12.2.tar.gz 759070 RMD160 3e7c4c67590408d2da056135c9560ff4d078eff6 SHA1 fc0f446f8b7f448c27f61bfe226a33fbaa007e0a SHA256 3a5be0941fad7ed8f8d2e967138984127510ba388b65b0f3f35f46ae8b6b43a8
DIST mercury-extras-0.13.0.tar.gz 876713 RMD160 a310a51b050647ec49e797a6469ce11145368c6d SHA1 4e12415003488eac13991c55164f42e10d827fcc SHA256 0e4238a9b891067f75c9f792e9dc970005d66a3248be6e8a4adc24e5291b1f24
+DIST mercury-extras-0.13.1.tar.gz 688974 RMD160 d14aeeefe29a2bc6ae59d174043a18808e2a6875 SHA1 3871d523400e0c0ac0396918b6ba74a378269b15 SHA256 33580108aed30359facde24645b23d5ca559fe0c9c50f448199d3d7b751b7c4c
EBUILD mercury-extras-0.12.2-r2.ebuild 3529 RMD160 e633b859019ef063addf1dcd22866897b05d08cc SHA1 97a9ec99c7d556d6de63c5d2450e236e121f182b SHA256 fc5c984ad3dc1f95c7a4621fee2b53a055b15b794f5f0ec158f5ee4816e2979d
MD5 f3a3a2c045d28bd56519c7f2c317236e mercury-extras-0.12.2-r2.ebuild 3529
RMD160 e633b859019ef063addf1dcd22866897b05d08cc mercury-extras-0.12.2-r2.ebuild 3529
@@ -100,10 +145,14 @@ EBUILD mercury-extras-0.13.0.ebuild 3690 RMD160 4da76f68b272730e6ea5606137c083d4
MD5 32d50ad63d719caf9a198d7e7cccf854 mercury-extras-0.13.0.ebuild 3690
RMD160 4da76f68b272730e6ea5606137c083d43a80543c mercury-extras-0.13.0.ebuild 3690
SHA256 e7adab6e16db34107e694497245b24276bfa7861783cbdea55973aa9ef63619d mercury-extras-0.13.0.ebuild 3690
-MISC ChangeLog 14982 RMD160 72bade46979cb582ba0f3a960f2d0b1333ab31d8 SHA1 645cb6e57c95609fb061f9f453aabb345ad5509b SHA256 bbb98ecda23217b00f3966ac869cae99d2c9c1756a3bcef3beeae3ac68bc67fd
-MD5 8438a71abce7582aa7b2c24cd30928bd ChangeLog 14982
-RMD160 72bade46979cb582ba0f3a960f2d0b1333ab31d8 ChangeLog 14982
-SHA256 bbb98ecda23217b00f3966ac869cae99d2c9c1756a3bcef3beeae3ac68bc67fd ChangeLog 14982
+EBUILD mercury-extras-0.13.1.ebuild 3689 RMD160 772c9f8e8532d9205016246383bc060defd18369 SHA1 439ae4eca0455b18a003ac3c11ce97239f84acc7 SHA256 4f7d782b223560028a3a6640182c2ba4299b5ab98e113c8d26040ac665b22569
+MD5 d64515274b70a0a4a253f20b3c547603 mercury-extras-0.13.1.ebuild 3689
+RMD160 772c9f8e8532d9205016246383bc060defd18369 mercury-extras-0.13.1.ebuild 3689
+SHA256 4f7d782b223560028a3a6640182c2ba4299b5ab98e113c8d26040ac665b22569 mercury-extras-0.13.1.ebuild 3689
+MISC ChangeLog 15642 RMD160 9e73bca8af2ca9a57205b8c66f3832702e3bff4a SHA1 1d95c71fc19de0be362f419572150465e9bae8d9 SHA256 1cf32fb63296db3b11cc3f1ad7a64a2f68cabf15894c1b1b9106c9c951998a7b
+MD5 2edf0e72a6bb65b9e40c653aa5a12ed6 ChangeLog 15642
+RMD160 9e73bca8af2ca9a57205b8c66f3832702e3bff4a ChangeLog 15642
+SHA256 1cf32fb63296db3b11cc3f1ad7a64a2f68cabf15894c1b1b9106c9c951998a7b ChangeLog 15642
MISC metadata.xml 247 RMD160 1b3df3c501d9a3b2e2651668be405677e8416397 SHA1 7b705a8a3368abab6ad31ea2fcb5e5db865d92b1 SHA256 2768d0688d443184194068497dcafb2e5d67521980cb46b7e8efc07d3900bcaa
MD5 6fca20d17d6d55a28537204aa9bb626f metadata.xml 247
RMD160 1b3df3c501d9a3b2e2651668be405677e8416397 metadata.xml 247
@@ -114,3 +163,6 @@ SHA256 087bf13f383826ff1da30ff861cfc48008b7037a9a844f14fee94f51934ec525 files/di
MD5 0df6fdfa0b711ce32f82e6661f9ac4a1 files/digest-mercury-extras-0.13.0 265
RMD160 083abb2da996e9c79af8b8d6a733cbb25bb8e657 files/digest-mercury-extras-0.13.0 265
SHA256 c0f9ca9a8d69c1b6ee73c253c883466c77ab8ef199e217603293df430241f827 files/digest-mercury-extras-0.13.0 265
+MD5 6159deec0c75dceb480cc62c647de9ac files/digest-mercury-extras-0.13.1 265
+RMD160 96e77422cc86dcc7cbfdc0a9339d446d19972e09 files/digest-mercury-extras-0.13.1 265
+SHA256 e978ef6387e98dbb013feb4b00b7dc9fc8f05f6d5805238a83c08630a11a3cbe files/digest-mercury-extras-0.13.1 265
diff --git a/dev-lang/mercury-extras/files/digest-mercury-extras-0.13.1 b/dev-lang/mercury-extras/files/digest-mercury-extras-0.13.1
new file mode 100644
index 000000000000..b69189f50657
--- /dev/null
+++ b/dev-lang/mercury-extras/files/digest-mercury-extras-0.13.1
@@ -0,0 +1,3 @@
+MD5 465ef230ae2d7a58dd184adc4c6464ec mercury-extras-0.13.1.tar.gz 688974
+RMD160 d14aeeefe29a2bc6ae59d174043a18808e2a6875 mercury-extras-0.13.1.tar.gz 688974
+SHA256 33580108aed30359facde24645b23d5ca559fe0c9c50f448199d3d7b751b7c4c mercury-extras-0.13.1.tar.gz 688974
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-concurrency.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-concurrency.patch
new file mode 100644
index 000000000000..a05fe55f7614
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-concurrency.patch
@@ -0,0 +1,11 @@
+--- mercury-extras-0.13.1.orig/concurrency/Mmakefile 2006-04-20 19:43:31.000000000 +1200
++++ mercury-extras-0.13.1/concurrency/Mmakefile 2006-12-04 21:56:38.000000000 +1300
+@@ -8,6 +8,8 @@
+
+ TESTS = philo philo2 philo3 midimon
+
++LIBGRADES := $(LIBGRADES:hlc.gc=)
++
+ -include ../Mmake.params
+
+ default_target: all
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-curs.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-curs.patch
new file mode 100644
index 000000000000..ac3d346e8e81
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-curs.patch
@@ -0,0 +1,600 @@
+diff -urN mercury-extras-0.13.1.orig/curs/curs.m mercury-extras-0.13.1/curs/curs.m
+--- mercury-extras-0.13.1.orig/curs/curs.m 2006-04-21 15:42:46.000000000 +1200
++++ mercury-extras-0.13.1/curs/curs.m 2006-12-04 21:58:18.000000000 +1300
+@@ -31,6 +31,8 @@
+ :- import_module io.
+ :- import_module string.
+
++:- include_module curs__panel.
++
+ %-----------------------------------------------------------------------------%
+
+ % Start a curses session (colour, unbuffered input, no echoing,
+@@ -210,90 +212,6 @@
+ :- func cyan = colour.
+ :- func white = colour.
+
+- %-------------------------------------------------------------------------%
+- %-------------------------------------------------------------------------%
+-
+- % Panels are windows over the main display; they may be
+- % stacked, moved, ordered and hidden. Contents of panels
+- % closer to the top of the stack obscure the parts of panels
+- % they overlap that are lower in the stack.
+- %
+- :- module panel.
+- :- interface.
+-
+- :- type panel.
+-
+- % new(Rows, Cols, Row, Col, Attr, Panel) creates a new panel
+- % Panel whose size is given by (Rows, Cols) and whose position
+- % on the display is given by (Row, Col). The new panel starts
+- % visible and at the top of the stack. The default attributes
+- % for the panel are set to Attr.
+- %
+- :- pred new(int::in, int::in, int::in, int::in, attr::in, panel::out,
+- io::di, io::uo) is det.
+-
+- % Destroy a panel.
+- %
+- :- pred delete(panel::in, io::di, io::uo) is det.
+-
+- % Raise/lower a panel to the top/bottom of the stack.
+- %
+- :- pred raise(panel::in, io::di, io::uo) is det.
+- :- pred lower(panel::in, io::di, io::uo) is det.
+-
+- % Hide/reveal a panel (revealing places it at the top of the stack).
+- %
+- :- pred hide(panel::in, io::di, io::uo) is det.
+- :- pred reveal(panel::in, io::di, io::uo) is det.
+-
+- % Move a panel to (Row, Col) on the display.
+- %
+- :- pred relocate(panel::in, int::in, int::in, io::di, io::uo) is det.
+-
+- % Clear a panel.
+- %
+- :- pred clear(panel::in, io::di, io::uo) is det.
+-
+- % Move the virtual cursor to given row and column; (0, 0) are the
+- % coordinates for the upper left hand corner of the panel.
+- %
+- :- pred move(panel::in, int::in, int::in, io::di, io::uo) is det.
+-
+- % Add a char/string to a panel with the given attributes.
+- % Note that char codes are passed rather than plain chars.
+- %
+- :- pred addch(panel::in, attr::in, int::in, io::di, io::uo) is det.
+- :- pred addstr(panel::in, attr::in, string::in, io::di, io::uo) is det.
+-
+- % Turn on/off or set attributes that will be applied by default.
+- %
+- :- pred attr_on(panel::in, attr::in, io::di, io::uo) is det.
+- :- pred attr_off(panel::in, attr::in, io::di, io::uo) is det.
+- :- pred attr_set(panel::in, attr::in, io::di, io::uo) is det.
+-
+- % Update the display (also calls doupdate).
+- % NOTE: doupdate does not call update_panels.
+- %
+- :- pred update_panels(io::di, io::uo) is det.
+-
+- % Draws a border around the inside edge of the display.
+- %
+- :- pred border(panel::in, io::di, io::uo) is det.
+-
+- % Draws an horizontal line of length N moving to the right.
+- %
+- :- pred hline(panel::in, int::in, int::in, io::di, io::uo) is det.
+-
+- % Draws a vertical line of length N moving down.
+- %
+- :- pred vline(panel::in, int::in, int::in, io::di, io::uo) is det.
+-
+- :- end_module panel.
+-
+- %-------------------------------------------------------------------------%
+- %-------------------------------------------------------------------------%
+-
+-%-----------------------------------------------------------------------------%
+ %-----------------------------------------------------------------------------%
+
+ :- implementation.
+@@ -1044,210 +962,4 @@
+ IO = IO0;
+ ").
+
+- %-------------------------------------------------------------------------%
+- %-------------------------------------------------------------------------%
+-
+- :- module panel.
+-
+- :- implementation.
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_decl("C", "
+-
+- #include <ncurses.h>
+- #include <panel.h>
+-
+- ").
+-
+- :- pragma foreign_type("C", panel, "PANEL *").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- new(Rows::in, Cols::in, Row::in, Col::in, Attr::in, Panel::out,
+- IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- WINDOW *w = newwin(Rows, Cols, Row, Col);
+- scrollok(w, TRUE);
+- wattrset(w, Attr);
+- wcolor_set(w, Attr, NULL);
+- wclear(w);
+- Panel = new_panel(w);
+-
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- delete(Panel::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- delwin(panel_window(Panel));
+- del_panel(Panel);
+-
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- raise(Panel::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- top_panel(Panel);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- lower(Panel::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- bottom_panel(Panel);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- hide(Panel::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- hide_panel(Panel);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- reveal(Panel::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- show_panel(Panel);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- relocate(Panel::in, Row::in, Col::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- move_panel(Panel, Row, Col);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- clear(Panel::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- wclear(panel_window(Panel));
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- move(Panel::in, Row::in, Col::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- wmove(panel_window(Panel), Row, Col);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- addch(Panel::in, Attr::in, CharCode::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- waddch(panel_window(Panel), (chtype)Attr | (chtype)CharCode);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- addstr(Panel, Attr, Str, !IO) :-
+- string.foldl(
+- ( pred(Char::in, !.IO::di, !:IO::uo) is det :-
+- addch(Panel, Attr, char.to_int(Char), !IO)
+- ),
+- Str, !IO
+- ).
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- attr_on(Panel::in, Attr::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- wattron(panel_window(Panel), Attr);
+- IO = IO0;
+- ").
+-
+- :- pragma foreign_proc("C",
+- attr_off(Panel::in, Attr::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- wattroff(panel_window(Panel), Attr);
+- IO = IO0;
+- ").
+-
+- :- pragma foreign_proc("C",
+- attr_set(Panel::in, Attr::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- wattrset(panel_window(Panel), Attr);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- update_panels(IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- update_panels();
+- doupdate();
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+-
+- :- pragma foreign_proc("C",
+- border(Panel::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- wborder(panel_window(Panel), 0, 0, 0, 0, 0, 0, 0, 0);
+- IO = IO0;
+- ").
+-
+- :- pragma foreign_proc("C",
+- hline(Panel::in, C::in, N::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- whline(panel_window(Panel), C, N);
+- IO = IO0;
+- ").
+-
+- :- pragma foreign_proc("C",
+- vline(Panel::in, C::in, N::in, IO0::di, IO::uo),
+- [will_not_call_mercury, promise_pure],
+- "
+- wvline(panel_window(Panel), C, N);
+- IO = IO0;
+- ").
+-
+- %-------------------------------------------------------------------------%
+- :- end_module panel.
+- %-------------------------------------------------------------------------%
+- %-------------------------------------------------------------------------%
+-
+-%-----------------------------------------------------------------------------%
+ %-----------------------------------------------------------------------------%
+diff -urN mercury-extras-0.13.1.orig/curs/curs.panel.m mercury-extras-0.13.1/curs/curs.panel.m
+--- mercury-extras-0.13.1.orig/curs/curs.panel.m 1970-01-01 12:00:00.000000000 +1200
++++ mercury-extras-0.13.1/curs/curs.panel.m 2006-12-04 21:58:18.000000000 +1300
+@@ -0,0 +1,282 @@
++%-----------------------------------------------------------------------------%
++% curs.panel.m
++% Copyright (C) 2001 Ralph Becket <rbeck@microsoft.com>
++% Thu Jan 11 13:47:25 GMT 2001
++% vim: ts=4 sw=4 et tw=0 wm=0 ff=unix ft=mercury
++%
++% THIS FILE IS HEREBY CONTRIBUTED TO THE MERCURY PROJECT TO
++% BE RELEASED UNDER WHATEVER LICENCE IS DEEMED APPROPRIATE
++% BY THE ADMINISTRATORS OF THE MERCURY PROJECT.
++%
++% Simplified Mercury interface to the ncurses panel library.
++%
++%-----------------------------------------------------------------------------%
++
++:- module curs__panel.
++:- interface.
++
++:- type panel.
++
++ % new(Rows, Cols, Row, Col, Attr, Panel) creates a new panel
++ % Panel whose size is given by (Rows, Cols) and whose position
++ % on the display is given by (Row, Col). The new panel starts
++ % visible and at the top of the stack. The default attributes
++ % for the panel are set to Attr.
++ %
++:- pred new(int::in, int::in, int::in, int::in, attr::in, panel::out,
++ io::di, io::uo) is det.
++
++ % Destroy a panel.
++ %
++:- pred delete(panel::in, io::di, io::uo) is det.
++
++ % Raise/lower a panel to the top/bottom of the stack.
++ %
++:- pred raise(panel::in, io::di, io::uo) is det.
++:- pred lower(panel::in, io::di, io::uo) is det.
++
++ % Hide/reveal a panel (revealing places it at the top of the stack).
++ %
++:- pred hide(panel::in, io::di, io::uo) is det.
++:- pred reveal(panel::in, io::di, io::uo) is det.
++
++ % Move a panel to (Row, Col) on the display.
++ %
++:- pred relocate(panel::in, int::in, int::in, io::di, io::uo) is det.
++
++ % Clear a panel.
++ %
++:- pred clear(panel::in, io::di, io::uo) is det.
++
++ % Move the virtual cursor to given row and column; (0, 0) are the
++ % coordinates for the upper left hand corner of the panel.
++ %
++:- pred move(panel::in, int::in, int::in, io::di, io::uo) is det.
++
++ % Add a char/string to a panel with the given attributes.
++ % Note that char codes are passed rather than plain chars.
++ %
++:- pred addch(panel::in, attr::in, int::in, io::di, io::uo) is det.
++:- pred addstr(panel::in, attr::in, string::in, io::di, io::uo) is det.
++
++ % Turn on/off or set attributes that will be applied by default.
++ %
++:- pred attr_on(panel::in, attr::in, io::di, io::uo) is det.
++:- pred attr_off(panel::in, attr::in, io::di, io::uo) is det.
++:- pred attr_set(panel::in, attr::in, io::di, io::uo) is det.
++
++ % Update the display (also calls doupdate).
++ % NOTE: doupdate does not call update_panels.
++ %
++:- pred update_panels(io::di, io::uo) is det.
++
++ % Draws a border around the inside edge of the display.
++ %
++:- pred border(panel::in, io::di, io::uo) is det.
++
++ % Draws an horizontal line of length N moving to the right.
++ %
++:- pred hline(panel::in, int::in, int::in, io::di, io::uo) is det.
++
++ % Draws a vertical line of length N moving down.
++ %
++:- pred vline(panel::in, int::in, int::in, io::di, io::uo) is det.
++
++%-----------------------------------------------------------------------------%
++
++:- implementation.
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_decl("C", "
++
++ #include <ncurses.h>
++ #include <panel.h>
++
++").
++
++:- pragma foreign_type("C", panel, "PANEL *").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ new(Rows::in, Cols::in, Row::in, Col::in, Attr::in, Panel::out,
++ IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ WINDOW *w = newwin(Rows, Cols, Row, Col);
++ scrollok(w, TRUE);
++ wattrset(w, Attr);
++ wcolor_set(w, Attr, NULL);
++ wclear(w);
++ Panel = new_panel(w);
++
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ delete(Panel::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ delwin(panel_window(Panel));
++ del_panel(Panel);
++
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ raise(Panel::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ top_panel(Panel);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ lower(Panel::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ bottom_panel(Panel);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ hide(Panel::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ hide_panel(Panel);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ reveal(Panel::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ show_panel(Panel);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ relocate(Panel::in, Row::in, Col::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ move_panel(Panel, Row, Col);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ clear(Panel::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ wclear(panel_window(Panel));
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ move(Panel::in, Row::in, Col::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ wmove(panel_window(Panel), Row, Col);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ addch(Panel::in, Attr::in, CharCode::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ waddch(panel_window(Panel), (chtype)Attr | (chtype)CharCode);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++addstr(Panel, Attr, Str, !IO) :-
++ string.foldl(
++ ( pred(Char::in, !.IO::di, !:IO::uo) is det :-
++ addch(Panel, Attr, char.to_int(Char), !IO)
++ ),
++ Str, !IO
++ ).
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ attr_on(Panel::in, Attr::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ wattron(panel_window(Panel), Attr);
++ IO = IO0;
++").
++
++:- pragma foreign_proc("C",
++ attr_off(Panel::in, Attr::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ wattroff(panel_window(Panel), Attr);
++ IO = IO0;
++").
++
++:- pragma foreign_proc("C",
++ attr_set(Panel::in, Attr::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ wattrset(panel_window(Panel), Attr);
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ update_panels(IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ update_panels();
++ doupdate();
++ IO = IO0;
++").
++
++%-------------------------------------------------------------------------%
++
++:- pragma foreign_proc("C",
++ border(Panel::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ wborder(panel_window(Panel), 0, 0, 0, 0, 0, 0, 0, 0);
++ IO = IO0;
++").
++
++:- pragma foreign_proc("C",
++ hline(Panel::in, C::in, N::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ whline(panel_window(Panel), C, N);
++ IO = IO0;
++").
++
++:- pragma foreign_proc("C",
++ vline(Panel::in, C::in, N::in, IO0::di, IO::uo),
++ [will_not_call_mercury, promise_pure],
++"
++ wvline(panel_window(Panel), C, N);
++ IO = IO0;
++").
++
++%-----------------------------------------------------------------------------%
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-dynamic_linking.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-dynamic_linking.patch
new file mode 100644
index 000000000000..940323e0495d
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-dynamic_linking.patch
@@ -0,0 +1,11 @@
+--- mercury-extras-0.13.1.orig/dynamic_linking/Mmakefile 2005-01-25 20:49:05.000000000 +1300
++++ mercury-extras-0.13.1/dynamic_linking/Mmakefile 2006-12-04 21:59:53.000000000 +1300
+@@ -11,7 +11,7 @@
+ MLFLAGS = --shared
+
+ # Link in the `-ldl' library (this may not be needed on some systems)
+-MLLIBS = -ldl
++MLLIBS = -L/usr/lib -ldl
+
+ # enable C-level debugging
+ CFLAGS = -g
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-lex.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-lex.patch
new file mode 100644
index 000000000000..fcecb73100c6
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-lex.patch
@@ -0,0 +1,22 @@
+--- mercury-extras-0.13.1.orig/lex/Mmakefile 2002-12-03 17:48:31.000000000 +1300
++++ mercury-extras-0.13.1/lex/Mmakefile 2006-12-04 22:00:45.000000000 +1300
+@@ -25,7 +25,7 @@
+ # Omit this line if you want to install the default grades.
+ # Edit this line if you want to install with different grades.
+ #
+-LIBGRADES = asm_fast.gc hlc.gc asm_fast.gc.tr.debug
++#LIBGRADES = asm_fast.gc hlc.gc asm_fast.gc.tr.debug
+
+ # Any application using these libraries will also need the following
+ # in its Mmakefile:
+@@ -47,7 +47,9 @@
+
+ depend: lex.depend regex.depend
+
+-install: liblex.install libregex.install
++install:
++ $(MMAKE) $(MMAKEFLAGS) liblex.install
++ $(MMAKE) $(MMAKEFLAGS) libregex.install
+
+ check: install
+ (cd tests; mmake check)
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_glut.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_glut.patch
new file mode 100644
index 000000000000..c300c48b4046
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_glut.patch
@@ -0,0 +1,24 @@
+--- mercury-extras-0.13.1.orig/graphics/mercury_glut/Mmakefile 2006-03-30 14:52:44.000000000 +1200
++++ mercury-extras-0.13.1/graphics/mercury_glut/Mmakefile 2006-12-04 22:01:58.000000000 +1300
+@@ -13,10 +13,10 @@
+ # The following libraries are for X on Linux (Debian) using Mesa.
+
+ # Libaries required by X windows.
+-X_LIBS = -lX11 -lXext -lXt -lXi -lSM -lICE -L/usr/X11R6/lib
++#X_LIBS = -lX11 -lXext -lXt -lXi -lSM -lICE -L/usr/X11R6/lib
+
+ # Libraries required by OpenGL.
+-GL_LIBS = -lGL -LGL
++#GL_LIBS = -lGL -LGL
+
+ MCFLAGS-mercury_glut+=--no-warn-nothing-exported --no-warn-interface-imports
+
+@@ -26,7 +26,7 @@
+ MGNUCFLAGS = --pic-reg
+ EXTRA_MLFLAGS = -shared
+
+-MLLIBS = -lglut $(X_LIBS) $(GL_LIBS)
++MLLIBS = -lglut
+
+ depend: mercury_glut.depend
+
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_opengl.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_opengl.patch
new file mode 100644
index 000000000000..493cf20acca8
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_opengl.patch
@@ -0,0 +1,81 @@
+--- mercury-extras-0.13.1.orig/graphics/mercury_opengl/Mmakefile 2006-03-30 14:52:44.000000000 +1200
++++ mercury-extras-0.13.1/graphics/mercury_opengl/Mmakefile 2006-12-04 22:03:01.000000000 +1300
+@@ -11,7 +11,7 @@
+
+ # Specify what libraries we need to link against for OpenGL on this system.
+ # (The following works on Debian with mesa as the OpenGL implementation).
+-GL_LIBS = -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXi -lXt -lICE -lXext -lSM
++GL_LIBS = -lGL -lGLU
+
+ # Don't issue a warning because mercury_opengl doesn't export anything.
+ MCFLAGS-mercury_opengl = --no-warn-nothing-exported
+--- mercury-extras-0.13.1.orig/graphics/mercury_opengl/Mmakefile.mtogl 2004-12-01 14:45:30.000000000 +1300
++++ mercury-extras-0.13.1/graphics/mercury_opengl/Mmakefile.mtogl 2006-12-04 22:03:01.000000000 +1300
+@@ -11,29 +11,30 @@
+ MLOBJS-mtogl = togl.o
+
+ # Specify the location of the `mercury_tcltk' package.
+-MERCURY_TCLTK_DIR = ../mercury_tcltk
++#MERCURY_TCLTK_DIR = ../mercury_tcltk
+
+ # Specify the version of Tcl/Tk.
+-TCLTK_VERSION = 8.0
++TCLTK_VERSION = 8.4
+
+ # Specify what libraries we need to link against for Tcl/Tk on this system.
+-TCLTK_LIBS = -ltcl$(TCLTK_VERSION) -ltk$(TCLTK_VERSION) -ldl
++TCLTK_LIBS = -ltcl -ltk -ldl
++GL_LIBS = -lGL -lGLU -lX11 -lXmu
+
+ # Tell mmake to use the `mercury_tcltk' library.
+-VPATH = $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
+-MCFLAGS = -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
+-MLFLAGS = -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
+- -L$(MERCURY_TCLTK_DIR)
+-MLLIBS = $(TCLTK_LIBS) $(EXTRA_MLLIBS)
+-C2INITARGS = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init
++#VPATH = $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
++#MCFLAGS = -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
++#MLFLAGS = -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
++# -L$(MERCURY_TCLTK_DIR)
++MLLIBS = $(TCLTK_LIBS) $(GL_LIBS) $(EXTRA_MLLIBS)
++#C2INITARGS = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init
+
+ # We may need to tell mmake where tcl.h and tk.h are.
+ # If we are using Tcl/Tk version 8.0 on Debian the include directory
+ # we need is `/usr/include/tcl8.0/generic'.
+-CFLAGS = -I/usr/include/tcl$(TCLTK_VERSION)
++#CFLAGS = -I/usr/include/tcl$(TCLTK_VERSION)
+
+ # We need to also access mtcltk.mh
+-MGNUCFLAGS = -I$(MERCURY_TCLTK_DIR)
++MGNUCFLAGS = -I/usr/lib/tk$(TCLTK_VERSION)/include/generic
+
+ depend: mtogl.depend
+
+--- mercury-extras-0.13.1.orig/graphics/mercury_opengl/togl.c 2003-08-13 17:49:46.000000000 +1200
++++ mercury-extras-0.13.1/graphics/mercury_opengl/togl.c 2006-12-04 22:03:01.000000000 +1300
+@@ -274,22 +274,7 @@
+ #include <tcl.h>
+ #include <tk.h>
+ #if defined(X11)
+-#if TK_MAJOR_VERSION==4 && TK_MINOR_VERSION==0
+-# include "tkInt4.0.h"
+-# define NO_TK_CURSOR
+-#elif TK_MAJOR_VERSION==4 && TK_MINOR_VERSION==1
+-# include "tkInt4.1.h"
+-#elif TK_MAJOR_VERSION==4 && TK_MINOR_VERSION==2
+-# include "tkInt4.2.h"
+-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==0 && TK_RELEASE_SERIAL==0
+-# include "tkInt8.0.h"
+-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==0 && TK_RELEASE_SERIAL==2
+-# include "tkInt8.0p2.h"
+-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==0 && TK_RELEASE_SERIAL==5
+-# include "tkInt8.0p5.h"
+-#else
+- Sorry, you will have to edit togl.c to include the right tkInt.h file
+-#endif
++#include <tkInt.h>
+ #elif defined(WIN32)
+ #if TK_MAJOR_VERSION<8
+ Sorry Windows version requires Tcl/Tk ver 8.0 or higher.
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_tcltk.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_tcltk.patch
new file mode 100644
index 000000000000..a6e437fcf0e7
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-mercury_tcltk.patch
@@ -0,0 +1,14 @@
+--- mercury-extras-0.13.1.orig/graphics/mercury_tcltk/Mmakefile 2005-08-15 16:11:42.000000000 +1200
++++ mercury-extras-0.13.1/graphics/mercury_tcltk/Mmakefile 2006-12-04 22:04:50.000000000 +1300
+@@ -8,10 +8,7 @@
+
+ # You may need to modify the line below
+
+-MLLIBS = -ltk8.4 -ltcl8.4 -L/usr/X11R6/lib -lX11 -lXmu -lXext -lm -ldl \
+- -lXt -lICE -lSM
+-
+-MLFLAGS = -R/usr/X11R6/lib
++MLLIBS = -ltk -ltcl
+
+ # On some Linux machines you may need to let mgnuc know where the
+ # tcl/tk header files are.
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-odbc.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-odbc.patch
new file mode 100644
index 000000000000..0acf03d28bd9
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-odbc.patch
@@ -0,0 +1,18 @@
+--- mercury-extras-0.13.1.orig/odbc/Mmakefile 2006-04-04 13:49:14.000000000 +1200
++++ mercury-extras-0.13.1/odbc/Mmakefile 2006-12-04 22:05:56.000000000 +1300
+@@ -48,10 +48,13 @@
+ # note: on a DEC Alpha using OSF1 remove the -ldl.
+ endif
+
+-MAIN_TARGET=odbc_test
++MAIN_TARGET=libodbc
+
+ .PHONY: depend
+-depend: odbc_test.depend
++depend: odbc.depend
++
++.PHONY: install
++install: libodbc.install
+
+ .PHONY: check
+ check:
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-posix.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-posix.patch
new file mode 100644
index 000000000000..270f0da84162
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-posix.patch
@@ -0,0 +1,11 @@
+--- mercury-extras-0.13.1.orig/posix/Mmakefile 2004-02-11 17:35:14.000000000 +1300
++++ mercury-extras-0.13.1/posix/Mmakefile 2006-12-04 22:06:43.000000000 +1300
+@@ -34,7 +34,7 @@
+
+ .PHONY: install
+ install: libposix.install
+- cp $(ADDITIONAL_HDRS) $(INSTALL_PREFIX)/lib/mercury/inc
++ cp $(ADDITIONAL_HDRS) $(INSTALL_PREFIX)/lib/mercury-0.13.0/inc
+
+ .PHONY: clean
+ clean:
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-references.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-references.patch
new file mode 100644
index 000000000000..d257289fd4e1
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-references.patch
@@ -0,0 +1,13 @@
+--- mercury-extras-0.13.1.orig/references/Mmakefile 2006-04-21 17:01:39.000000000 +1200
++++ mercury-extras-0.13.1/references/Mmakefile 2006-12-04 22:07:20.000000000 +1300
+@@ -10,7 +10,9 @@
+
+ # Install in an "extras" subdirectory of the main installation tree
+ INSTALL_PREFIX := $(INSTALL_PREFIX)/extras
+-LIBGRADES = asm_fast.gc.tr asm_fast.gc.tr.debug
++LIBGRADES := $(foreach grade,$(LIBGRADES), \
++ $(subst .tr.,$(grade),$(findstring .tr.,$(grade))) \
++ $(filter %.tr,$(grade)))
+
+ MAIN_TARGET = libglobal
+
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-trailed_update.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-trailed_update.patch
new file mode 100644
index 000000000000..54bc932cf0ee
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-trailed_update.patch
@@ -0,0 +1,23 @@
+--- mercury-extras-0.13.1.orig/trailed_update/Mmakefile 2004-07-30 19:03:46.000000000 +1200
++++ mercury-extras-0.13.1/trailed_update/Mmakefile 2006-12-04 22:07:58.000000000 +1300
+@@ -4,6 +4,10 @@
+ # Public License - see the file COPYING.LIB in the Mercury distribution.
+ #-----------------------------------------------------------------------------#
+
++LIBGRADES := $(foreach grade,$(LIBGRADES), \
++ $(subst .tr.,$(grade),$(findstring .tr.,$(grade))) \
++ $(filter %.tr,$(grade)))
++
+ GRADEFLAGS += --use-trail
+
+ # enable C debugging
+@@ -30,6 +34,9 @@
+ cd samples && mmake $(MMAKEFLAGS) check
+ cd tests && mmake $(MMAKEFLAGS) check
+
++.PHONY: install
++install: libtrailed_update.install
++
+ .PHONY: clean
+ clean:
+ cd samples && mmake $(MMAKEFLAGS) clean
diff --git a/dev-lang/mercury-extras/mercury-extras-0.13.1.ebuild b/dev-lang/mercury-extras/mercury-extras-0.13.1.ebuild
new file mode 100644
index 000000000000..f9da616c007e
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-0.13.1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury-extras/mercury-extras-0.13.1.ebuild,v 1.1 2006/12/04 09:07:13 keri Exp $
+
+inherit eutils
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
+SRC_URI="ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/mercury-extras-0.13.1.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc ~sparc ~x86"
+
+IUSE="doc glut iodbc ncurses odbc opengl tcl tk xml"
+
+DEPEND="~dev-lang/mercury-${PV}
+ glut? ( virtual/glut )
+ odbc? ( dev-db/unixODBC )
+ iodbc? ( !odbc? ( dev-db/libiodbc ) )
+ ncurses? ( sys-libs/ncurses )
+ opengl? ( virtual/opengl )
+ tcl? ( tk? (
+ =dev-lang/tcl-8.4*
+ =dev-lang/tk-8.4*
+ x11-libs/libX11
+ x11-libs/libXmu ) )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-concurrency.patch
+ epatch "${FILESDIR}"/${P}-curs.patch
+ epatch "${FILESDIR}"/${P}-dynamic_linking.patch
+ epatch "${FILESDIR}"/${P}-lex.patch
+ epatch "${FILESDIR}"/${P}-mercury_glut.patch
+ epatch "${FILESDIR}"/${P}-mercury_tcltk.patch
+ epatch "${FILESDIR}"/${P}-mercury_opengl.patch
+ epatch "${FILESDIR}"/${P}-odbc.patch
+ epatch "${FILESDIR}"/${P}-posix.patch
+ epatch "${FILESDIR}"/${P}-references.patch
+ epatch "${FILESDIR}"/${P}-trailed_update.patch
+
+ sed -i -e "s:curs:concurrency curs:" \
+ -e "s:posix:posix quickcheck:" \
+ -e "s:windows_installer_generator ::" Mmakefile
+
+ if built_with_use dev-lang/mercury minimal; then
+ sed -i -e "s:references::" Mmakefile
+ else
+ sed -i -e "s:xml:trailed_update xml:" Mmakefile
+ fi
+
+ use glut && sed -i -e "s: lex : graphics/mercury_glut lex :" Mmakefile
+ use tcl && use tk && sed -i -e "s: lex : graphics/mercury_tcltk lex :" Mmakefile
+ use opengl && sed -i -e "s: lex : graphics/mercury_opengl lex :" Mmakefile
+
+ if use odbc ; then
+ sed -i -e "s:moose:moose odbc:" Mmakefile
+ elif use iodbc ; then
+ sed -i -e "s:moose:moose odbc:" Mmakefile
+ sed -i -e "s:MODBC_DRIVER=MODBC_UNIX:MODBC_DRIVER=MODBC_IODBC:" odbc/Mmakefile
+ fi
+
+ ! use ncurses && sed -i -e "s:curs curses::" Mmakefile
+ ! use xml && sed -i -e "s:xml::" Mmakefile
+}
+
+src_compile() {
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ depend || die "mmake depend failed"
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ || die "mmake failed"
+
+ if use opengl && use tcl && use tk ; then
+ cd "${S}"/graphics/mercury_opengl
+ cp ../mercury_tcltk/mtcltk.m ./
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ -f Mmakefile.mtogl \
+ depend || die "mmake depend mtogl failed"
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ -f Mmakefile.mtogl \
+ || die "mmake mtogl failed"
+ fi
+}
+
+src_install() {
+ cd "${S}"
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ INSTALL_PREFIX="${D}"/usr \
+ install || die "mmake install failed"
+
+ if use opengl && use tcl && use tk ; then
+ cd "${S}"/graphics/mercury_opengl
+ mv Mmakefile Mmakefile.opengl
+ mv Mmakefile.mtogl Mmakefile
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ INSTALL_PREFIX="${D}"/usr \
+ install || die "mmake install mtogl failed"
+ fi
+
+ find "${D}"/usr/lib/mercury-${PV} -type l | xargs rm
+
+ cd "${S}"
+ if use doc ; then
+ docinto samples/complex_numbers
+ dodoc complex_numbers/samples/*.m
+
+ if use ncurses ; then
+ docinto samples/curs
+ dodoc curs/samples/*.m
+
+ docinto samples/curses
+ dodoc curses/sample/*.m
+ fi
+
+ docinto samples/dynamic_linking
+ dodoc dynamic_linking/hello.m
+
+ docinto samples/lex
+ dodoc lex/samples/*.m
+
+ docinto samples/moose
+ dodoc moose/samples/*.m moose/samples/*.moo
+
+ docinto samples/references
+ dodoc references/samples/*.m
+ fi
+
+ dodoc README
+}