diff options
Diffstat (limited to 'dev-lang/polyml')
18 files changed, 885 insertions, 0 deletions
diff --git a/dev-lang/polyml/Manifest b/dev-lang/polyml/Manifest new file mode 100644 index 000000000000..6486db358498 --- /dev/null +++ b/dev-lang/polyml/Manifest @@ -0,0 +1,24 @@ +AUX polyml-5.4.1-asm.patch 1026 SHA256 9879c43c7e82e53ff6d15b838b159df3336b791c46e9f80a38f21c4180500bed SHA512 bf19cedff74b11feba72c0ba2f5a9b6ee8169b5bb1b783d3559640070025ca0e7627d751bc703c41d812025d6909cba56101e49f0199f2aee310bc95ca4f2d6d WHIRLPOOL 4e0fda223b89b12801b06be970c98b8c0caece7bc8fb6994e8cebfe8ebf25d1efc8fec0311b360c5665f45279b0bd72ada9199041ad2245ecf4849118ef034ca +AUX polyml-5.4.1-configure.patch 459 SHA256 89e712f53a08386505d8a503f23d6e29310ae1b1ce39e3acaa024ab47ab3b20d SHA512 4e3a5e6651c8b6b9cb018f72f100755eee0265ad7dd0ba57030b7bce95670ff35e7191661be469b59206266f5eb51042d98504601311629bc2e83ed36a0cef8f WHIRLPOOL fa3b63cc9ecb46fe099d9a3e7ce050018c7384c269ceb9359dd9f5bfc02dc36317e79acad6dd728758a89486ac0020b00733ddadd43ced831576961f6708289c +AUX polyml-5.5.0-asm.patch 351 SHA256 2cf50de0e1401e84c30558f141d781bce8aabeea06ae1790d8d273d5a2f66c32 SHA512 92a14615483aaac76e708ae19fccab132f80223ebaad7a390482af164335199a7d2e52be8726cc96d7971efae73a9cdf0284ec96f014af606edce2024d5b3996 WHIRLPOOL 6f4be3a701cc23c03a0b21055633f6ab2bf55c5f8f1ae29ba78bd7d09c3e56d98c268e0b16f1b0a62abcd4d6b10d4cbd5bba2e7b8e0d51876d2d4e089c95c926 +AUX polyml-5.5.0-configure.patch 4658 SHA256 97a22b91138bba455e846cc3bfc7eb4db2ef851e5165513d9ca1a93bda5991d7 SHA512 d4a8ee5d41469d958d7f61a6608c5d4bd50e5497fadcd5333b2a94cd253c65d27f493bd743574eb3ccab37a39fdb2182e25106443f1855b30be1a70c9d450cc6 WHIRLPOOL 0ec51689a392a9d85bba2617af34704dc119ba0d3a9e9b969061b1609b568a4898dbb4ceb561c8a5ae1aaadb181ea2e94e0f25e2161be1dc7b8b46a9350b621c +AUX polyml-5.5.0-x-it-basis.patch 562 SHA256 114c8b973ec601a616700c5301d09aa74da90a2a1e62cf9e697e1d856dc4bfe3 SHA512 ed5864b7ce5767133a47d914b5b439177e5c841669870292f90a73edee2e505aff6883b9a80baf0036d87bf728038ffa4609f9bacde4a704bfca291aa9cf50a4 WHIRLPOOL d2cdd33be477faa4d1e66c4a033390505bc7e7a47376c977a6e8d563353fabf10afdbda26801d66e91c22ba650bbfc713118e3f68ce4ccbc595bfdd67028bdfb +AUX polyml-5.5.1-inputN-return-for-zero-chars.patch 1476 SHA256 9e70b70856a9a6a52cefcc4de9cc289bf4f6ed336db94805d9209a31cc42d11f SHA512 998e9eb09a3b35bbbb6a9748e0b19c423f2204ccfb3f5a6de3173ca91f67d523884743f382052c22d14655310265ef7f8259e5104c61f9ab2b9a52f7257a011f WHIRLPOOL 4cab45f4358d91fc42232cf2fbfa194cf982f5587c5139fc17f9722a09a60926d386a9d9b93108076b97ea5556331b9f6fc27f6b78c83ae2af4418b78db1b51e +AUX polyml-5.5.1-optimize-closure.patch 6695 SHA256 d8afd738322172af863966b831a486a1de233028cd84cee5d9f0d09247828b62 SHA512 7cf1c66114058c8b3c9ceed3a84fe9a99f0cf063cce3364be79c7402353e8e29c5082cfedef16a32f38cb4275b0b3622db88cf7746115d1c43c483635a46f147 WHIRLPOOL 17ae6543b16275309133fa0c29208d38fd1dfa6637a1b21a81efcb3f4944c21a145a610df8ed6976d78636834293983eeb4b5234e9c4fab2fe62b5a55282306e +AUX polyml-5.5.2-r1952-check_for_negative_sized_array.patch 548 SHA256 b65ba50d7184a5f94cc2d841de82180218711b4b312442d51bb5fa87c447bea1 SHA512 d979c6542a2a983ab1b536e8b983d4d0a154f4f5e00f3d4161dd38f965f63ea5bd339785904690928a715ec43cb2a296f535ff6af1da522b096ffae0bba759a4 WHIRLPOOL adf5310406e02e3d258fa6148a1a5e4a7c5097aa330c9c1a046b64f5ef8a2b5a1c50d300e3f97e938557a8a89dabd98f11e85431e1c9fb30b6381bbf97413c7a +AUX polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch 4089 SHA256 a2f08bc8f5708df1fbb1b91170f43d35b9d6d69b7b7f44ca9ee67e4b747b5d5f SHA512 8b4f174ace31a839ea592402c10068af62f03227a43a663ea17ea5eefecf52472fc6a3437cd99f1593de7d575af57ae4b8156756695623c7db0f9e726e5f21a6 WHIRLPOOL be034af4b9e9f594895ce0cebccd6a8e9cc262a5e2b0c44f45496a57a9c6159385a86c35acccd8e258cd78c61d258ebaaf14c7ed466ff61e0c4450a334334a8f +AUX polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch 1247 SHA256 9e5a5c254b84ac272fa15ce09494ac61c817d47499c3729bfdf65290cada489b SHA512 ac2d1baff1c8d743ee783ac81f31df12cc4598874dd5a9a7855cd06fb179af2c64bc02a87d85a72238f19c805128143693839bd0a58d9a4002bc75fae985303b WHIRLPOOL a2f044c74b9b8898130436c9e59510321af9a71e24287f78f353b8efaa72c0854c456607fa92c44625f980a3f32ec60f543ae1e6fb1c3fabf4000689d699f1dd +AUX polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch 951 SHA256 9612b28a09e7097440962ba9b59678fefcc0ab85a80fd6436484028682a015f3 SHA512 644e90f26ef80aa8e945257eafa4da1ee2da9d353db40b5c6e367d032f41db4a6589a2527bce9d84d45794d88d31edaeb3cea53d57b4421bf209f6c07be69cf0 WHIRLPOOL d82c663331d7e72ace67a3c20edbab4dd2672dd04e0adaa26e47d953f2357cc4654dfb96a5145579d7485f7b0075647c7614952b6b8d3be9adaf1caaad2ba36c +DIST polyml-5.6.tar.gz 6066166 SHA256 20d7b98ae56fe030c64054dbe0644e9dc02bae781caa8994184ea65a94a0a615 SHA512 cd4f25c225831dec512f7136dfda4ba31abd6939d9e8e0cacdb6d48212488b56ba5969c76e76fcbfcfa83d015a67d9cf62457286086f3c2b3f7914a7939d7b59 WHIRLPOOL a50042ed5cd309ca2b148cfb33a98681803b79c80f8efde1ad2b39cabdfb6dd85da6a66dd21f92f603d3be9685008e3fd4f5303eadd24d8cec493acead29acc3 +DIST polyml.5.4.1.tar.gz 6107319 SHA256 514d1d07be487b783d4dfa29dbd550b3396640579ce135a9eb5a61f08e7f9cac SHA512 4a7b404ed648b5a9fd9d52917214688d15f4f9a5f4570ba13b52a8304bde1cc4b534f539ffc3c9554283816ae130e4c898a179d776df6d3220fba9743a19b175 WHIRLPOOL 048db0b2210d699c0a86940daaafd24bfc81debae412f7e7dcad2585cd5514253f6c47e0006277ef00b640ab971a031d74e64c78c4abcc09712fa9e8593d1720 +DIST polyml.5.5.1.tar.gz 5465794 SHA256 cf8009dabc8b5d308d92e201dcd01f17ce14289d30caa8021a87365f4b8e209a SHA512 283954c8bf5599d83ea69916b827b1acae7137fe4add67537026092da2e6f1a89d71d3a394dbba599bbe9e967ded1446f39f4d81afb90301532db6be949f7a6f WHIRLPOOL 5bfeb8dcedcfe9b0a925ed089abc246d70d1269631ee46e9c78b123d461afb80e68640d6c08d77f47e69b0c244e9c7a27750dd7350741911e007f9dbcb2e7f76 +DIST polyml.5.5.2.tar.gz 5599140 SHA256 73fd2be89f7e3ff0567e27ef525ef788775d9f963d6db54069cb34d53040a682 SHA512 248c2a38c4691898bc1243a041f4683bf227d9c8a98c6c3545af2a8a3249ed5ed96f33f90cb2dede8809b42f33c0557650147302cfe046a5fba965ccd93cbc5b WHIRLPOOL d8dae553b6d4effef80b4303ea8fdbb95f8470790ab7ff49e62ae2a47d70d9d0b11b2113caa28302c029049041bd0286ba06a2153b5266b88a6c26eb1714abf7 +DIST polyml.5.5.tar.gz 5504389 SHA256 2b20e597e6fe43df1b0ed01e78e410c6b51d0ac7911833e91d94fcc9eb05d831 SHA512 4725c2e4a786b8c63bc6fc1cadad0de818ed935014d51040af43defa07b03ba7bedb2185bfb2e39a0db7284479e79e698b31ec7fe8463c306b668de1eda69b89 WHIRLPOOL 166c7d0037dff771251c95e17d86a6208d926a5adbbac0188426dfe09b7cdbab1b620919068a722f34377fbc59966145ebd1cba5dcb0664943cc82c10d3b5688 +EBUILD polyml-5.4.1.ebuild 881 SHA256 ec25b16ff380ce8b87e07b2f75e5dd1a9fec105272e09e784d4028aa14f1f4cc SHA512 ba04f994d7650f1c95a11efae7d6c1462996359c8eaaeed87514ad4e330a0805db8e3f045458e8478bda8de335aaf1e09ddbaf711598e8ae7b371788312631c1 WHIRLPOOL 084a12b88b10e7c0440c15b1bd22d8413bea6506fed55aab4dfdbaf34813fcbe0f9d7f2dd54a0f12cf82b62182f404b70843d2ac61b6dec2aae3f869c82c5aeb +EBUILD polyml-5.5.0.ebuild 1120 SHA256 dd8d4cb2c68a2dc52b25dc80bfd89f5fd3ef027c0472e93c8c40959afe664315 SHA512 28331b4280dc7e46a61b83f51f4abf12e9302247f7c38ff122b68f31b53be4b7c93c0ce2f9e0b850a1baf919124b3762f48604e42e437526ba421f5fe7251946 WHIRLPOOL efad3432c4f029297141433e3f0c032f5ea745e5d8c44781e2f2b00786497e719ccd7cf150f3a60f2f6e210ce835a759c4a263ff6fca331e03d58faa77dc4162 +EBUILD polyml-5.5.1.ebuild 1805 SHA256 ce180e4e523a3ac97938cd4e5be068c4fa90de37f29eb9e653406df815e94bd2 SHA512 da0057b1a59f8ae20be68e6ee4735b8ee5d737e3b7a6ba5ca0ac414a04bb7f869a95b5149dee00f9a1b1989d1cd3f6f444f9ba6db2bf77cf2ddcc2cbcd7ae088 WHIRLPOOL 1362d570e91b9e0b7b5f8a1b8fef50d0749ee841b5a5911c33a35542a9730585510413122f44cf558f81dd5b0fe81a40aba29a602472a46bfb3e0b36f85e30fb +EBUILD polyml-5.5.2.ebuild 1962 SHA256 e148166ce0560d1d39084843d48a938d5a05655992c6457166d375bd578e9c2f SHA512 49ac070096e8401b028ebb2b66141d85520349192f74666050941d0be984974c5797c93ebd9410e233cbb6a9fe700f454f0ea86688250c9f1de6015f8c00dead WHIRLPOOL 7ca6bb31e7629fe0d572468e97bc3421d280ad669d9df6f1ca5b17d44a09916406b5cb5759178e8369a0529609db8a85b180f081f0ad09c45f16b761a5880947 +EBUILD polyml-5.6.ebuild 1102 SHA256 ee6d84a049b04ab418524787b91733ef02f3a6c3703565d1ac9f71250f57cdf0 SHA512 90a5a0083b803d9c8c353d5609c7274ae736d203d3515e506dfb5ca68c5237135807de4527d83528ed81d55bcb734a0dab2a262b0de00ad354d60772ef9eb424 WHIRLPOOL 48696da3fd0a39d30e71da55ba90b61550aff0608596ef491d19bd3255246cf1f133dd0fe088f2b2740302c7f9c52b3e56c077e8510433c765c8382986cb46f9 +MISC ChangeLog 3751 SHA256 319413f9f6c3e1e7c4ce8515ff6557d3b3407d60d0982c196fdb95b2c009d6ab SHA512 18409236273a9773c5cff99d29e84795f4d8066630d9251d4e2c6cc3ed749365581fc5f926bd79ef1e66c67f3cfdc7a86587599b7d3eb0692e53daab6ccfb0dc WHIRLPOOL e44e9df9bc8cda9e632dd656cd84bea88f6ff807666669238a03d0b073fdad801f0e2c35ebf49d13a4694a376b79d4cd5209e8a5ddca6bced0940d0b2c7e291b +MISC ChangeLog-2015 3467 SHA256 e234d6a82bafcf318ab6bf7cce265924c9c974509ac66df2f84f498ddaa1a837 SHA512 219f020da6115415d7dbd9c076bcf25e9809a99168cdd336916e193c8412b70b681f03504e64bf33900afad95f936ba6cd5841c2eb3b5711a1fb83d795316e1b WHIRLPOOL 92517471801ceb4e0083bb4990da61729f7bdf3fcf8e30acf1528c3e1203f368d641eba1cd3e8c0e292e5a4c7987e5df8673f4f126e59f04d8187ab2c26e6d6e +MISC metadata.xml 562 SHA256 8483763f59bcbe26be3a367c52bc0afecccb5a00aed904e08aee44cee0c1373e SHA512 d6cd496acc03dbcca4b50f5cc49bec9818764dc2aca36ab83eb4b82102fda5c562d8a73eb83e400eb254bb2c7db1a1a68453cfbe655d780ed67a149712a74038 WHIRLPOOL c4b1f477e08c3808cd8cc4b59cba859e77cea7a4535d6834a01ecf675773bc9f9ee8dc875d106dd1652fab82613c7b1799a6f5474a6ea42eded601b1d2d8a20a diff --git a/dev-lang/polyml/files/polyml-5.4.1-asm.patch b/dev-lang/polyml/files/polyml-5.4.1-asm.patch new file mode 100644 index 000000000000..af8bd8d49149 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.4.1-asm.patch @@ -0,0 +1,28 @@ +--- polyml.5.4.1-orig/libpolyml/x86asm.asm 2011-07-13 00:06:49.000000000 +1000 ++++ polyml.5.4.1/libpolyml/x86asm.asm 2012-01-08 16:00:09.740684843 +1100 +@@ -2714,4 +2714,7 @@ + + + ENDIF ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif + END +--- polyml.5.4.1-orig/libpolyml/power_assembly.S 2010-04-09 01:49:20.000000000 +1000 ++++ polyml.5.4.1/libpolyml/power_assembly.S 2012-01-08 15:46:35.006200143 +1100 +@@ -1735,3 +1735,6 @@ + dd Mask_assign_byte /* 254 */ + dd Mask_assign_word /* 255 */ + ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +--- polyml.5.4.1-orig/libpolyml/sparc_assembly.S 2010-08-13 01:01:36.000000000 +1000 ++++ polyml.5.4.1/libpolyml/sparc_assembly.S 2012-01-08 15:46:12.516642791 +1100 +@@ -1498,3 +1498,6 @@ + .long Mask_assign_byte /* 254 */ + .long Mask_assign_word /* 255 */ + ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif diff --git a/dev-lang/polyml/files/polyml-5.4.1-configure.patch b/dev-lang/polyml/files/polyml-5.4.1-configure.patch new file mode 100644 index 000000000000..aaaed02f8e16 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.4.1-configure.patch @@ -0,0 +1,11 @@ +--- polyml.5.4.1-orig/configure.ac 2010-09-03 21:22:40.000000000 +1000 ++++ polyml.5.4.1/configure.ac 2012-01-09 22:44:04.153668402 +1100 +@@ -321,7 +321,7 @@ + AC_ARG_WITH([portable], + [AS_HELP_STRING([--with-portable], + [Build the portable interpreter version of Poly/ML instead of native @<:@default=no@:>@])], [ +- ac_cv_with_portable=yes], [ ++ ac_cv_with_portable="$withval"], [ + ac_cv_with_portable=no]) + + case "${host_cpu}" in diff --git a/dev-lang/polyml/files/polyml-5.5.0-asm.patch b/dev-lang/polyml/files/polyml-5.5.0-asm.patch new file mode 100644 index 000000000000..cffa627b9f32 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.0-asm.patch @@ -0,0 +1,10 @@ +--- polyml.5.5-orig/libpolyml/x86asm.asm 2012-05-03 21:07:59.000000000 +1000 ++++ polyml.5.5/libpolyml/x86asm.asm 2012-09-19 17:41:51.767737295 +1000 +@@ -3003,4 +3003,7 @@ + dd Mask_assign_byte ;# 254 + dd Mask_assign_word ;# 255 + ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif + END diff --git a/dev-lang/polyml/files/polyml-5.5.0-configure.patch b/dev-lang/polyml/files/polyml-5.5.0-configure.patch new file mode 100644 index 000000000000..1a2e114e6503 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.0-configure.patch @@ -0,0 +1,138 @@ +Index: polyml/configure +=================================================================== +--- polyml/configure (revision 1599) ++++ polyml/configure (revision 1600) +@@ -20870,10 +20870,8 @@ + # Check whether --with-portable was given. + if test "${with_portable+set}" = set; then : + withval=$with_portable; +- ac_cv_with_portable=yes + else +- +- ac_cv_with_portable=no ++ with_portable=check + fi + + +@@ -20894,36 +20892,46 @@ + + $as_echo "#define HOSTARCHITECTURE_SPARC 1" >>confdefs.h + +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + power* | ppc*) + + $as_echo "#define HOSTARCHITECTURE_PPC 1" >>confdefs.h + +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + arm*) + + $as_echo "#define HOSTARCHITECTURE_ARM 1" >>confdefs.h + +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + ia64*) + + $as_echo "#define HOSTARCHITECTURE_IA64 1" >>confdefs.h + +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + *) as_fn_error $? "Poly/ML is not supported for this architecture" "$LINENO" 5 ;; + esac + +-# If we have explicitly set --with-portable or we are on a machine without +-# a code-generator set to use the interpreter. +-if test "$ac_cv_with_portable" = "yes"; then ++# If we explicitly asked to use the interpreter set the architecture to interpreted. ++if test "x$with_portable" = "xyes" ; then ++ polyarch=interpret ++fi + ++# If we asked not to use the interpreter check we have native code support. ++if test "x$with_portable" = "xno" ; then ++ if test "x$polyarch" = "xinterpret" ; then ++ as_fn_error $? "--without-portable was given but native code is not supported on this platform" "$LINENO" 5 ++ fi ++fi ++ ++# Set the define if this is the interpreter. This is no longer actually used. ++if test "x$polyarch" = "xinterpret" ; then ++ + $as_echo "#define INTERPRETED 1" >>confdefs.h + +- polyarch=interpret + fi + + # Put this test at the end where it's less likely to be missed. +Index: polyml/configure.ac +=================================================================== +--- polyml/configure.ac (revision 1599) ++++ polyml/configure.ac (revision 1600) +@@ -368,10 +368,10 @@ + # Test the --with-portable option to build the interpreter even if + # we have a code-generator. + AC_ARG_WITH([portable], +- [AS_HELP_STRING([--with-portable], +- [Build the portable interpreter version of Poly/ML instead of native @<:@default=no@:>@])], [ +- ac_cv_with_portable=yes], [ +- ac_cv_with_portable=no]) ++ [AS_HELP_STRING([--with-portable], ++ [Build the portable interpreter version of Poly/ML instead of native @<:@default=no@:>@])], ++ [], ++ [with_portable=check]) + + case "${host_cpu}" in + i[[3456]]86*) +@@ -384,28 +384,39 @@ + ;; + sparc*) + AC_DEFINE([HOSTARCHITECTURE_SPARC], [1], [Define if the host is a Sparc (32 bit)]) +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + power* | ppc*) + AC_DEFINE([HOSTARCHITECTURE_PPC], [1], [Define if the host is a Power PC (32 bit)]) +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + arm*) + AC_DEFINE([HOSTARCHITECTURE_ARM], [1], [Define if the host is an ARM (32 bit)]) +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + ia64*) + AC_DEFINE([HOSTARCHITECTURE_IA64], [1], [Define if the host is Itanium]) +- ac_cv_with_portable=yes ++ polyarch=interpret + ;; + *) AC_MSG_ERROR([Poly/ML is not supported for this architecture]) ;; + esac + +-# If we have explicitly set --with-portable or we are on a machine without +-# a code-generator set to use the interpreter. +-if test "$ac_cv_with_portable" = "yes"; then ++# If we explicitly asked to use the interpreter set the architecture to interpreted. ++if test "x$with_portable" = "xyes" ; then ++ polyarch=interpret ++fi ++ ++# If we asked not to use the interpreter check we have native code support. ++if test "x$with_portable" = "xno" ; then ++ if test "x$polyarch" = "xinterpret" ; then ++ AC_MSG_ERROR( ++ [--without-portable was given but native code is not supported on this platform]) ++ fi ++fi ++ ++# Set the define if this is the interpreter. This is no longer actually used. ++if test "x$polyarch" = "xinterpret" ; then + AC_DEFINE([INTERPRETED], [1], [Define if using the interpreter] ) +- polyarch=interpret + fi + + # Put this test at the end where it's less likely to be missed. diff --git a/dev-lang/polyml/files/polyml-5.5.0-x-it-basis.patch b/dev-lang/polyml/files/polyml-5.5.0-x-it-basis.patch new file mode 100644 index 000000000000..2f6ce7b864bd --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.0-x-it-basis.patch @@ -0,0 +1,21 @@ +Index: polyml/mlsource/extra/XWindows/ml_bind.ML +=================================================================== +--- polyml/mlsource/extra/XWindows/ml_bind.ML (revision 1600) ++++ polyml/mlsource/extra/XWindows/ml_bind.ML (revision 1601) +@@ -2437,7 +2437,7 @@ + + exception XWindows = XWindows.XWindows; + +-let ++local + open XWindows; + + fun printRect _ _ (r:XRectangle) = +@@ -2447,6 +2447,6 @@ + PolyML.PrettyString ("Rect " ^ PolyML.makestring R) + end; + in +- PolyML.addPrettyPrinter printRect ++ val () = PolyML.addPrettyPrinter printRect + end; + diff --git a/dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch b/dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch new file mode 100644 index 000000000000..8f5b02ee9084 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch @@ -0,0 +1,33 @@ +https://sourceforge.net/p/polyml/code/1875/ +Required for sci-mathematics/isabelle-2013.2 + +------------------------------------------------------------------------ +r1875 | dcjm | 2013-10-30 10:49:05 -0600 (Wed, 30 Oct 2013) | 1 line + +Backport commit 1874 from trunk. This fixes TextIO.inputN and StreamIO.inputN so they return immediately if the request is for zero characters. +Index: polyml/basis/BasicStreamIO.sml +=================================================================== +--- polyml/basis/BasicStreamIO.sml (revision 1851) ++++ polyml/basis/BasicStreamIO.sml (working copy) +@@ -213,6 +213,8 @@ + fun inputN (f, n) = + if n < 0 + then raise Size ++ else if n = 0 (* Defined to return the empty vector and f *) ++ then (emptyVec, f) + else + let + val (vecs, f') = inputNList (f, n) +Index: polyml/basis/TextIO.sml +=================================================================== +--- polyml/basis/TextIO.sml (revision 1851) ++++ polyml/basis/TextIO.sml (working copy) +@@ -597,6 +597,8 @@ + | inputN' n (ref(Direct(strm as {buffer, bufp, buflimit, ...}))) = + if n < 0 orelse n > CharVector.maxLen + then raise Size ++ else if n = 0 ++ then "" (* Return the empty string without blocking *) + else if !buflimit = 0 + then (* Last read returned end-of-file. Clear the EOF state once + we return this empty string. *) diff --git a/dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch b/dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch new file mode 100644 index 000000000000..5b33203d69e1 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch @@ -0,0 +1,141 @@ +https://sourceforge.net/p/polyml/code/1869/ +Required for sci-mathematics/isabelle-2013.2 + +------------------------------------------------------------------------ +r1869 | dcjm | 2013-10-11 05:59:58 -0600 (Fri, 11 Oct 2013) | 1 line + +Back-port commits 1855 and 1867 from trunk. These fix two optimiser bugs. Includes the regression tests. + +Index: polyml/mlsource/MLCompiler/CodeTree/CODETREE_OPTIMISER.sml +=================================================================== +--- polyml/mlsource/MLCompiler/CodeTree/CODETREE_OPTIMISER.sml (revision 1851) ++++ polyml/mlsource/MLCompiler/CodeTree/CODETREE_OPTIMISER.sml (working copy) +@@ -645,8 +645,9 @@ + (thisDec :: decs, thisArg @ args, LoadLocal newAddr :: mapList) + end + +- | mapPattern(ArgPattCurry(currying, ArgPattTuple{allConst=false, filter, ...}) :: patts, n, m) = +- (* It's a function that returns a tuple. *) ++ | mapPattern(ArgPattCurry(currying as [_], ArgPattTuple{allConst=false, filter, ...}) :: patts, n, m) = ++ (* It's a function that returns a tuple. The function must not be curried because ++ otherwise it returns a function not a tuple. *) + let + val (thisDec, thisArg, thisMap) = + transformFunctionArgument(currying, [LoadArgument m], [LoadArgument n], SOME filter) +@@ -657,7 +658,7 @@ + + | mapPattern(ArgPattCurry(currying as firstArgSet :: _, _) :: patts, n, m) = + (* Transform it if it's curried or if there is a tuple in the first arg. *) +- if List.length currying >= 2 orelse ++ if (*List.length currying >= 2 orelse *) (* This transformation is unsafe. *) + List.exists(fn ArgPattTuple{allConst=false, ...} => true | _ => false) firstArgSet + then + let +@@ -685,6 +686,13 @@ + + and transformFunctionArgument(argumentArgs, loadPack, loadThisArg, filterOpt) = + let ++ (* Disable the transformation of curried arguments for the moment. ++ This is unsafe. See Test146. The problem is that this transformation ++ is only safe if the function is applied immediately to all the arguments. ++ However the usage information is propagated so that if the result of ++ the first application is bound to a variable and then that variable is ++ applied it still appears as curried. *) ++ val argumentArgs = [hd argumentArgs] + (* We have a function that takes a series of curried argument. + Change that so that the function takes a list of arguments. *) + val newAddr = ! localCounter before localCounter := ! localCounter + 1 +@@ -1214,9 +1222,11 @@ + let + fun checkArg (ArgPattTuple{allConst=false, ...}) = true + (* Function has at least one tupled arg. *) +- | checkArg (ArgPattCurry(_, ArgPattTuple{allConst=false, ...})) = true +- (* Function has an arg that is a function that returns a tuple. *) +- | checkArg (ArgPattCurry(_ :: _ :: _, _)) = true ++ | checkArg (ArgPattCurry([_], ArgPattTuple{allConst=false, ...})) = true ++ (* Function has an arg that is a function that returns a tuple. ++ It must not be curried otherwise it returns a function not a tuple. *) ++ (* This transformation is unsafe. See comment in transformFunctionArgument above. *) ++ (*| checkArg (ArgPattCurry(_ :: _ :: _, _)) = true *) + (* Function has an arg that is a curried function. *) + | checkArg (ArgPattCurry(firstArgSet :: _, _)) = + (* Function has an arg that is a function that +Index: polyml/Tests/Succeed/Test146.ML +=================================================================== +--- polyml/Tests/Succeed/Test146.ML (revision 0) ++++ polyml/Tests/Succeed/Test146.ML (revision 1875) +@@ -0,0 +1,24 @@ ++(* Bug in transformation of arguments which are curried functions. It is not ++ safe to transform "f" in the argument to "bar". Although it is curried ++ the application to the first argument "()" is not immediately followed ++ by the application to the second. *) ++ ++local ++ val r = ref 0 ++in ++ (* Foo should be called exactly once *) ++ fun foo () = (r:= !r+1; fn i => i) ++ ++ fun checkOnce () = if !r = 1 then () else raise Fail "bad" ++end; ++ ++fun bar f = let val r = f() in (r 1; r 2; List.map r [1, 2, 3]) end; ++ ++bar foo; ++ ++checkOnce(); ++ ++exception A and B and C; ++fun rA () = raise A and rB () = raise B; ++fun h (f, g) = let val a = f() in g(); a () end; ++h(rA, rB) handle A => (); + +Property changes on: polyml/Tests/Succeed/Test146.ML +___________________________________________________________________ +Added: svn:eol-style +## -0,0 +1 ## ++native +\ No newline at end of property +Index: polyml/Tests/Succeed/Test147.ML +=================================================================== +--- polyml/Tests/Succeed/Test147.ML (revision 0) ++++ polyml/Tests/Succeed/Test147.ML (revision 1875) +@@ -0,0 +1,31 @@ ++(* Bug in optimiser transformation. A function argument that returns a tuple ++ can be transformed to take a container but only if it is not curried. *) ++ ++(* Cut down example from Isabelle that caused an internal error exception. *) ++ ++fun one _ [] = raise Fail "bad" ++ | one pred (x :: xs) = ++ if pred x then (x, xs) else raise Fail "bad"; ++ ++fun foo (scan, f) xs = let val (x, y) = scan xs in (f x, y) end; ++ ++fun bar (scan1, scan2) xs = ++ let ++ val (x, ys) = scan1 xs; ++ val (y, zs) = scan2 x ys; ++ in ((x, y), zs) end; ++ ++fun bub (scan1, scan2) = foo(bar(scan1, (fn _ => scan2)), op ^); ++ ++val qqq: string list -> string * int = bub(one (fn _ => raise Match), (foo((fn _ => raise Match), String.concat))); ++ ++(* Further example - This caused a segfault. *) ++ ++PolyML.Compiler.maxInlineSize := 1; ++fun f g = let val (x,y) = g 1 2 in x+y end; ++ ++fun r (x, y, z) = fn _ => (x, y+z); ++ ++val h: int-> int*int = r (4,5,6); ++ ++f (fn _ => h); + +Property changes on: polyml/Tests/Succeed/Test147.ML +___________________________________________________________________ +Added: svn:eol-style +## -0,0 +1 ## ++native +\ No newline at end of property diff --git a/dev-lang/polyml/files/polyml-5.5.2-r1952-check_for_negative_sized_array.patch b/dev-lang/polyml/files/polyml-5.5.2-r1952-check_for_negative_sized_array.patch new file mode 100644 index 000000000000..1451d2df8d84 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.2-r1952-check_for_negative_sized_array.patch @@ -0,0 +1,13 @@ +Index: polyml/basis/Array.sml +=================================================================== +--- polyml/basis/Array.sml (revision 1951) ++++ polyml/basis/Array.sml (revision 1952) +@@ -129,7 +129,7 @@ + + fun array(len, a) = + let +- val () = if len >= maxLen then raise General.Size else () ++ val () = if len < 0 orelse len >= maxLen then raise General.Size else () + val vec = System_alloc(len+1, 0wx40, RunCall.unsafeCast a) + in + System_setw(vec, 0, RunCall.unsafeCast len); diff --git a/dev-lang/polyml/files/polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch b/dev-lang/polyml/files/polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch new file mode 100644 index 000000000000..783577026f67 --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch @@ -0,0 +1,112 @@ +Index: polyml/libpolyml/foreign.cpp +=================================================================== +--- polyml/libpolyml/foreign.cpp (revision 1953) ++++ polyml/libpolyml/foreign.cpp (revision 1954) +@@ -4,7 +4,7 @@ + + Copyright (c) 2000-7 + Cambridge University Technical Services Limited +- Further development Copyright David C.J. Matthews 2008-2011. ++ Further development Copyright David C.J. Matthews 2008-2014. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public +@@ -251,6 +251,10 @@ + + static Volatile *vols; + static PLock volLock; // Mutex to protect vols. ++// TODO: There is a theoretical risk of deadlock if any ML allocation is made while this ++// lock is held. An allocation can result in a GC which requires all threads to release ++// ML memory but another thread could block waiting for the mutex. ++// N.B. raising an exception involves an allocation. + + #define FIRST_VOL 0 + +@@ -268,24 +272,8 @@ + static unsigned callBackEntries = 0; + static PLock callbackTableLock; // Mutex to protect table. + +- + /********************************************************************** + * +- * Malloc / Free Wrappers +- * +- **********************************************************************/ +- +-static POLYUNSIGNED malloc_count = 0; +-#if 0 +-#define Vmalloc(where,size) {where = malloc(size); printf("malloc: %p,%d\n",where,size); fflush(stdout); malloc_count++;} +-#else +-#define Vmalloc(where,size) {where = malloc(size); malloc_count++;} +-#endif +-#define Vfree(p) { free(p); malloc_count--;} +- +- +-/********************************************************************** +- * + * Volatile Allocation + * + **********************************************************************/ +@@ -349,8 +337,12 @@ + PLocker plocker(&volLock); + Handle res = vol_alloc(taskData); + trace(("size= %" POLYUFMT "\n",size)); +- Vmalloc( C_POINTER(UNVOLHANDLE(res)), size ); ++ void *p = malloc(size); ++ if (p == 0) ++ RAISE_EXN("Insufficient memory"); ++ C_POINTER(UNVOLHANDLE(res)) = p; + OWN_C_SPACE(UNVOLHANDLE(res)) = true; ++ + return res; + } + +@@ -685,7 +677,7 @@ + { + // Can now free this. + trace(("Freeing malloc space of <%" POLYUFMT ">\n",from)); +- Vfree(vols[from].C_pointer); ++ free(vols[from].C_pointer); + vols[from].C_pointer = 0; + vols[from].Own_C_space = false; + } +@@ -702,7 +694,6 @@ + } + } + next_vol = to; +- info(("unfreed mallocs=<%" POLYUFMT "> next_vol=<%" POLYUFMT ">\n", malloc_count, next_vol)); + + /* Callback table. Added DCJM 12/4/04. We always process these as strong references. + For the time being at any rate we treat these as permanent entries so that once a +@@ -910,8 +901,9 @@ + RAISE_EXN("libffi error: ffi_prep_cif failed"); + + // malloc memory for the result +- void *result; +- Vmalloc(result, result_type->size); ++ void *result = malloc(result_type->size); ++ if (result == 0) ++ RAISE_EXN("Insufficient memory to allocate space for result"); + + processes->ThreadReleaseMLMemory(taskData); + ffi_call(&cif, sym, result, arg_values); +@@ -1580,6 +1572,9 @@ + + unsigned num_args = length_list(argTypeList->Word()); + ffi_type **arg_types = (ffi_type**)malloc(num_args * sizeof(ffi_type*)); ++ if (arg_types == 0) ++ RAISE_EXN("Insufficient memory to allocate space for arguments"); ++ + PolyWord p = argTypeList->Word(); + for (POLYUNSIGNED i=0; i<num_args; i++,p=Tail(p)) + arg_types[i] = ctypeToFfiType(taskData, Head(p)); +@@ -1587,6 +1582,9 @@ + + // The cif needs to be on the heap so that it is available in the callback. + ffi_cif *cif = (ffi_cif *)malloc(sizeof(ffi_cif)); ++ if (cif == 0) ++ RAISE_EXN("Insufficient memory to allocate space for cif"); ++ + if (ffi_prep_cif(cif, abi, num_args, result_type, arg_types) != FFI_OK) + RAISE_EXN("libffi error: ffi_prep_cif failed"); + diff --git a/dev-lang/polyml/files/polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch b/dev-lang/polyml/files/polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch new file mode 100644 index 000000000000..36c82947f37b --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch @@ -0,0 +1,27 @@ +Index: polyml/libpolyml/gc_mark_phase.cpp +=================================================================== +--- polyml/libpolyml/gc_mark_phase.cpp (revision 2006) ++++ polyml/libpolyml/gc_mark_phase.cpp (revision 2007) +@@ -130,13 +130,6 @@ + if (locPtr == LARGECACHE_SIZE) locPtr = 0; + largeObjectCache[locPtr].base = obj; + largeObjectCache[locPtr].current = currentPtr; +- // To try to narrow down a bug that results in the ASSERT failing, +- // add these extra checks. +- POLYUNSIGNED lengthWord = obj->LengthWord(); +- ASSERT (OBJ_IS_LENGTH(lengthWord)); +- POLYUNSIGNED length = OBJ_OBJECT_LENGTH(lengthWord); +- ASSERT(length == originalLength); +- ASSERT(currentPtr > (PolyWord*)obj && currentPtr < ((PolyWord*)obj)+length); + } + } + else StackOverflow(obj); +@@ -579,6 +572,8 @@ + ASSERT(nInUse == 0); + MTGCProcessMarkPointers *marker = &markStacks[0]; + marker->active = true; ++ marker->locPtr = 0; ++ marker->largeObjectCache[0].base = 0; + nInUse = 1; + + // Scan the permanent mutable areas. diff --git a/dev-lang/polyml/files/polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch b/dev-lang/polyml/files/polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch new file mode 100644 index 000000000000..0629f12f72ca --- /dev/null +++ b/dev-lang/polyml/files/polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch @@ -0,0 +1,21 @@ +Index: polyml/libpolyml/gc_mark_phase.cpp +=================================================================== +--- polyml/libpolyml/gc_mark_phase.cpp (revision 2008) ++++ polyml/libpolyml/gc_mark_phase.cpp (revision 2009) +@@ -176,6 +176,16 @@ + // Clear the mark stack + for (unsigned i = 0; i < MARK_STACK_SIZE; i++) + markStack[i] = 0; ++ // Clear the large object cache. Actually only largeObjectCache[0].base ++ // needs to be set to zero and for the objects allocated on the heap it is ++ // cleared before each GC in either MarkRoots or MarkPointersTask. ++ // The remianing case is the RescanMarked sub-class which is allocated on the stack ++ // but it doesn't hurt to clear it in all cases. ++ for (unsigned j = 0; j < LARGECACHE_SIZE; j++) ++ { ++ largeObjectCache[locPtr].base = 0; ++ largeObjectCache[locPtr].current = 0; ++ } + } + + // Called when the stack has overflowed. We need to include this diff --git a/dev-lang/polyml/metadata.xml b/dev-lang/polyml/metadata.xml new file mode 100644 index 000000000000..e5460b6ae6dc --- /dev/null +++ b/dev-lang/polyml/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ml@gentoo.org</email> + <name>Gentoo ML Project</name> + </maintainer> + <longdescription lang="en"> +Poly/ML is a full implementation of Standard ML available as open-source. +</longdescription> + <use> + <flag name="portable">Build the portable interpreter version of Poly/ML + instead of native.</flag> + </use> + <upstream> + <remote-id type="sourceforge">polyml</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lang/polyml/polyml-5.4.1.ebuild b/dev-lang/polyml/polyml-5.4.1.ebuild new file mode 100644 index 000000000000..291dc04c0507 --- /dev/null +++ b/dev-lang/polyml/polyml-5.4.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit base autotools + +MY_P=${PN}.${PV} + +DESCRIPTION="Poly/ML is a full implementation of Standard ML" +HOMEPAGE="http://www.polyml.org" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="X elibc_glibc +gmp portable test +threads" + +RDEPEND="X? ( x11-libs/motif:0 ) + gmp? ( >=dev-libs/gmp-5 ) + elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +PATCHES=("${FILESDIR}/${PN}-5.4.1-configure.patch" + "${FILESDIR}/${PN}-5.4.1-asm.patch") + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + $(use_with X x) \ + $(use_with gmp) \ + $(use_with portable) \ + $(use_with threads) +} + +src_test() { + emake tests || die "tests failed" +} diff --git a/dev-lang/polyml/polyml-5.5.0.ebuild b/dev-lang/polyml/polyml-5.5.0.ebuild new file mode 100644 index 000000000000..c8799c914844 --- /dev/null +++ b/dev-lang/polyml/polyml-5.5.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit base autotools versionator + +# Although the download is called 5.5, after building it poly -v says +# it is 5.5.0. +MY_PV=$(get_version_component_range "1-2" "${PV}") +MY_P="${PN}.${MY_PV}" + +DESCRIPTION="Poly/ML is a full implementation of Standard ML" +HOMEPAGE="http://www.polyml.org" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="X elibc_glibc +gmp portable test +threads" + +RDEPEND="X? ( x11-libs/motif:0 ) + gmp? ( >=dev-libs/gmp-5 ) + elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) + virtual/libffi" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +PATCHES=("${FILESDIR}/${PN}-5.5.0-configure.patch" + "${FILESDIR}/${PN}-5.5.0-x-it-basis.patch" + "${FILESDIR}/${PN}-5.5.0-asm.patch") + +src_prepare() { + base_src_prepare + eautoreconf +} + +src_configure() { + econf \ + --with-system-libffi \ + $(use_with X x) \ + $(use_with gmp) \ + $(use_with portable) \ + $(use_with threads) +} + +src_test() { + emake tests || die "tests failed" +} diff --git a/dev-lang/polyml/polyml-5.5.1.ebuild b/dev-lang/polyml/polyml-5.5.1.ebuild new file mode 100644 index 000000000000..675e79082702 --- /dev/null +++ b/dev-lang/polyml/polyml-5.5.1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit base autotools pax-utils + +MY_P="${PN}.${PV}" + +DESCRIPTION="Poly/ML is a full implementation of Standard ML" +HOMEPAGE="http://www.polyml.org" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="X elibc_glibc +gmp portable test +threads" + +RDEPEND="X? ( x11-libs/motif:0 ) + gmp? ( >=dev-libs/gmp-5 ) + elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) + virtual/libffi" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + # Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly + # comes from the polyml generated ./polyexport.o file. + "${FILESDIR}/${PN}-5.5.0-asm.patch" + # https://sourceforge.net/p/polyml/code/1875/ for isabelle-2013.2 + "${FILESDIR}/${PN}-5.5.1-inputN-return-for-zero-chars.patch" + # https://sourceforge.net/p/polyml/code/1869/ + # Adds Test146.ML that fails, applying it anyway as it is required by + # sci-mathematics/isabelle-2013.2 + "${FILESDIR}/${PN}-5.5.1-optimize-closure.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf + if [ -f "${S}/Tests/Succeed/Test146.ML" ]; then + mv "${S}/Tests/Succeed/Test146.ML" "${S}/Tests/Succeed/Test146.ML.disable-test-as-it-fails" + fi +} + +src_configure() { + econf \ + --enable-shared \ + --disable-static \ + --with-system-libffi \ + $(use_with X x) \ + $(use_with gmp) \ + $(use_with portable) \ + $(use_with threads) +} + +src_compile() { + # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?) + pushd libpolyml || die "Could not cd to libpolyml" + emake + popd + emake polyimport + pax-mark m "${S}/.libs/polyimport" + emake + pax-mark m "${S}/.libs/poly" +} + +src_test() { + emake tests || die "tests failed" +} diff --git a/dev-lang/polyml/polyml-5.5.2.ebuild b/dev-lang/polyml/polyml-5.5.2.ebuild new file mode 100644 index 000000000000..85e846f17afc --- /dev/null +++ b/dev-lang/polyml/polyml-5.5.2.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit base autotools pax-utils + +MY_P="${PN}.${PV}" + +DESCRIPTION="Poly/ML is a full implementation of Standard ML" +HOMEPAGE="http://www.polyml.org" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="X elibc_glibc +gmp portable test +threads" + +RDEPEND="X? ( x11-libs/motif:0 ) + gmp? ( >=dev-libs/gmp-5 ) + elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) + virtual/libffi" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + # Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly + # comes from the polyml generated ./polyexport.o file. + "${FILESDIR}/${PN}-5.5.0-asm.patch" + # Patches from https://sourceforge.net/p/polyml/code/HEAD/tree/fixes-5.5.2 + # which are required to build and run sci-mathematics/isabelle-2015 + "${FILESDIR}/${PN}-5.5.2-r1952-check_for_negative_sized_array.patch" + "${FILESDIR}/${PN}-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch" + "${FILESDIR}/${PN}-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch" + "${FILESDIR}/${PN}-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch" +) + +src_prepare() { + base_src_prepare + eautoreconf + if [ -f "${S}/Tests/Succeed/Test146.ML" ]; then + mv "${S}/Tests/Succeed/Test146.ML" "${S}/Tests/Succeed/Test146.ML.disable-test-as-it-fails" + fi +} + +src_configure() { + econf \ + --enable-shared \ + --disable-static \ + --with-system-libffi \ + $(use_with X x) \ + $(use_with gmp) \ + $(use_with portable) \ + $(use_with threads) +} + +src_compile() { + # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?) + pushd libpolyml || die "Could not cd to libpolyml" + emake + popd + emake polyimport + pax-mark m "${S}/.libs/polyimport" + emake + pax-mark m "${S}/.libs/poly" +} + +src_test() { + emake tests || die "tests failed" +} diff --git a/dev-lang/polyml/polyml-5.6.ebuild b/dev-lang/polyml/polyml-5.6.ebuild new file mode 100644 index 000000000000..96e7f5c91558 --- /dev/null +++ b/dev-lang/polyml/polyml-5.6.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit autotools pax-utils + +DESCRIPTION="Poly/ML is a full implementation of Standard ML" +HOMEPAGE="http://www.polyml.org" +SRC_URI="https://codeload.github.com/polyml/polyml/tar.gz/v${PV} -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="X elibc_glibc +gmp portable test +threads" + +RDEPEND="X? ( x11-libs/motif:0 ) + gmp? ( >=dev-libs/gmp-5 ) + elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) + virtual/libffi" +DEPEND="${RDEPEND}" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --enable-shared \ + --disable-static \ + --with-system-libffi \ + $(use_with X x) \ + $(use_with gmp) \ + $(use_with portable) \ + $(use_with threads) +} + +src_compile() { + # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?) + pushd libpolyml || die "Could not cd to libpolyml" + emake + popd + emake polyimport + pax-mark m "${S}/.libs/polyimport" + emake + pax-mark m "${S}/.libs/poly" +} + +src_test() { + emake tests || die "tests failed" +} |