summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-09-19 06:46:18 +0000
committerJustin Lecher <jlec@gentoo.org>2014-09-19 06:46:18 +0000
commite0f7abcc101d5f06c10b72bb5227ebc44f585dd9 (patch)
tree074eea25f33c3728310d99ff9fc625399de875ac /sys-cluster/torque
parentBump (diff)
downloadhistorical-e0f7abcc101d5f06c10b72bb5227ebc44f585dd9.tar.gz
historical-e0f7abcc101d5f06c10b72bb5227ebc44f585dd9.tar.bz2
historical-e0f7abcc101d5f06c10b72bb5227ebc44f585dd9.zip
sys-cluster/torque: Version Bump
Package-Manager: portage-2.2.13/cvs/Linux x86_64 Manifest-Sign-Key: 0xB9D4F231BD1558AB!
Diffstat (limited to 'sys-cluster/torque')
-rw-r--r--sys-cluster/torque/ChangeLog8
-rw-r--r--sys-cluster/torque/Manifest33
-rw-r--r--sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch99
-rw-r--r--sys-cluster/torque/torque-4.2.9.ebuild220
4 files changed, 344 insertions, 16 deletions
diff --git a/sys-cluster/torque/ChangeLog b/sys-cluster/torque/ChangeLog
index 4d7b58d3f81d..1946008ba733 100644
--- a/sys-cluster/torque/ChangeLog
+++ b/sys-cluster/torque/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-cluster/torque
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.169 2014/09/18 13:19:21 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.170 2014/09/19 06:46:17 jlec Exp $
+
+*torque-4.2.9 (19 Sep 2014)
+
+ 19 Sep 2014; Justin Lecher <jlec@gentoo.org> +torque-4.2.9.ebuild,
+ +files/torque-4.2.9-tcl8.6.patch:
+ Version Bump
18 Sep 2014; Justin Lecher <jlec@gentoo.org> torque-4.1.7.ebuild:
Bump EAPI and give some prefix love
diff --git a/sys-cluster/torque/Manifest b/sys-cluster/torque/Manifest
index b30f3b34f415..e34fa09722f6 100644
--- a/sys-cluster/torque/Manifest
+++ b/sys-cluster/torque/Manifest
@@ -13,6 +13,7 @@ AUX pbs_server-init.d 1614 SHA256 85e82e2dd594c3e8beb11d95ccf8df9e2df576d9337f4b
AUX pbs_server-init.d-munge 1688 SHA256 13d35f2a73fd09100a2932f6c6e4ac0befc7524769d2a20e7153e4fac6adff94 SHA512 9ec9f40f850bf917831e9cfb9ad62af7a2cf163bfb03033c5a9b34feb58a5a5564e05f181a46d17f48f130fc4f52a210ea314e82dbdc1ed6377e99196a9a2807 WHIRLPOOL 5244dccff02e8ffd3a015bc371fabd0f910068d09950f1e5528b3f0dace260f0a99def906be82b6e5365d97f399e89f3d918dd666fcc9c1795d661acae6f23aa
AUX tcl8.6.patch 2396 SHA256 02905289c2707b2bc60b3aed513d9d4578cb597b346ee79deb89b1e72131af2b SHA512 a288526bf43cd39d0b5505938f02ee38ccd70481a1b6351a80c5cd151376604d5cdc925293d3bd7f2d4bbe50182993448da645ca42f58e3f1bdf59bce9363b4a WHIRLPOOL cbccee8ce08d3bf36bc30b49cf0740753f10d1d309558a702aa8df8f0d9ec5069e37cc3e7cb47caa686d69935f90c6b6f2dbdae55eba98864f3bbc22f4fa7ada
AUX torque-4.1.5.1-tcl8.6.patch 2546 SHA256 3b03036181df73cee7e2dea6746b822368a92d4f76953018e226c4e7c26abe86 SHA512 0cd584784b5254daf11635e1d6252fa4fe3c5f2e46a0771452016f66ff0e3be01b91d154cef0a793cf0ab0df223ef5c51303d35c419f1d9addc64ea26a892521 WHIRLPOOL b335acece9491ecfa5adbb9a64122826f8e6944ac33aac862ac4c57c7cf73c0ed823b60228a3567c249f1710d1a8ab0fac8ce2fbb301500eeb0bf8d832c0f117
+AUX torque-4.2.9-tcl8.6.patch 2702 SHA256 cd894a32a300b9b8b5fa343c79ac0ff9f44dc02e12eae9d7bb69d5f8799ead34 SHA512 9844a1f633f049a66cf31d3721f6a5e205ede26186da1357e0b0aa2c0c4d064cbdff45e2f7e685d6c4afd09d961e59ff1759163e4a2ae349fa866e960c1bcf77 WHIRLPOOL a4acb94a7d64e84b25c8ebb0898ab3c4523a141c17719f51eb19276604a3543041374de5e828664dcc1dc35269148512231628d3990c09a9872ade353aa7479f
AUX torque-conf.d 649 SHA256 4139da44a55dbcb4a8227fd0aedede8e091971fd63c0e08644712f4a91e7b174 SHA512 b82f6c1d661bed03a32c3761530c4b303715167a317e467371091b11d3ae0e19e9784b1588577ee5f65397cb0699818ed5f621aeb66d3f2d218df12d0cf39bde WHIRLPOOL 0f0db60c037400ce87013d7639a5e126b65388e914e1f3bde81548ebc1e8fcefb17972c4deec03509973973a263c5006856699d3f51fad0133b8428e13e2e04c
AUX torque-conf.d-munge 784 SHA256 7b8e47737211fd0d05dcc7938021ea5dbb1575010c53075440ef0b6b5d43d8b1 SHA512 a78634a6f2bdf3c24e8c99d3cd7a9634daa32d69244a9ddfcc26199f4d04e901abbfa79ad057f5a4e4c492c9e21bc0c65edd8465ac6935fb7c67c8c639e75d68 WHIRLPOOL 90ed407a5a98fb7b4509610c3c23dd1d38566886e4b02fa4db4a9708f8c45b500369e782c25b7b9f02fc685bdcb965049e681c829bad58206729690e6eeadbb9
AUX torque-env.d 240 SHA256 d04eab3b1314645ee2014c718c4cf79ca74950dee1357d814b85c9faa5ef6002 SHA512 275ce5ccf9f138bcee504a9996c9d838cd34714d352d4b7ac2d631d0fca662bf38a2ef7e8745605d9b3847049015e0791c937340cfdacbf44800482ce73bb042 WHIRLPOOL b7cdc4d6752d00b315fb369f6382e1a6684c1cb8a3486545bd406270ed09811936c2735755fc01175fceed0422139e5d7d8dcd67868e2e40c8ebbb406c2eec57
@@ -21,28 +22,30 @@ DIST torque-2.5.12.tar.gz 5862988 SHA256 436b4d84464e3be0538a4dc0a657b5ae113da6b
DIST torque-2.5.13.tar.gz 5854910 SHA256 ab59d4c8e8b45383ddd8202fa83956816175e348bb955a4ad5f7e3cd4dde5ff9 SHA512 e08ddf3950bb32177f4bc504a502fae3928a616739c28ca9687c5207606817d4589583306508a2c568cf19fc8c5617dc4a9decc81576c2875660b715c256cfcf WHIRLPOOL 29eefb89d1eb9d6a81735aa117922a1eb0b72e14eeccab7dbd70cdcf01431b7ecd9c3927e1c5c28b7f42d6739b28f45386740b92adb790ccdf9803e4c6e38534
DIST torque-4.1.5.1.tar.gz 6214726 SHA256 10fa10625256d26e9371abbc98ca8ecf307ccc2ef117e32a0bf806de105037dd SHA512 630b4a9c7d9d6b14bc807dfba868e78894856d24e7b10703c76b519edf78876e33ef158edd6dd8abeb3ffb6bfe8036e74eff23501d476ef9ebe817b46d2e3c5c WHIRLPOOL 6709a3eec73f39c27d4dd02ab62d74448a93a442bdf585d5f244142de8f54b42fdd841c773226589de4c3e0a9c881bdd51d4c04bf57235136086cab18dd6fa42
DIST torque-4.1.7.tar.gz 6218108 SHA256 3c86b2d84589f54ac222e81dd1953d153e1d836163d2000412369fefd25fb2af SHA512 5a085c0a7b205fed075bff4599db90ca5c4bb5f22d87d76fd56539d5cc1935bb8eeffcd4d18ba84401bd4ca128718070b69c8b91ab6814a4638622ba351654e6 WHIRLPOOL cae9216f0cebc22927eec2d1f007b1a3c4a6cc619f2926c40a5f46e0bd0eec19691f9aafcad4fe727e2c5ed2485d11c972603cca613269f82147ff1dc41f1ba4
+DIST torque-4.2.9.tar.gz 6294022 SHA256 46f1f319683af6d3820e18cda69ce59113c9a5c192e1f07826007be69385889b SHA512 898703fa1d02310c22e2a02b86d67ca52ebed46684597931944edebb39f8293746739c8dca9cd10e07c2e7274c3dd7f65a5664d1980817e3feec58952c4cf4d1 WHIRLPOOL e65be66b056a519ebd1c30c2c1ae2ddf43bc4e617a52d3caced1e6dfd2b0d8b2a83c26a0f2e6e41cfae791aca68b6f91424745b2baffa2085fccc8f6ae9b8e04
EBUILD torque-2.5.12-r1.ebuild 7637 SHA256 06709db3e6a4de2c545467584813f05385b76e64350f77e9c70b3559aae068fb SHA512 ec992ccb9430bf74e85025b3d23154f2a91c2281e9b424818002d75873152940424543c7b06e70b3c2d3d58a15b4e241022b42128a189fe587833918eed0eac7 WHIRLPOOL ee89d2da1fdbd11bcc8e3012b0c4acdc895271e483e9d70ca2e7d7db65e3532f2d251b70884757861842c0708cdfdf8ceef2cd15d61f786a361ca1dc7084e8d9
EBUILD torque-2.5.13.ebuild 7749 SHA256 d6341222bcd51c48f59f0d1703cefae99e81665251da24ee2bc29391f82a05fa SHA512 9fc230bd7b698faa26eca29efbfe1f05843d4385e034de5194a638c22ddc3d8e35f36406685ade448094f8b1f9b89bac2f961aafa1739f5cce850f0693fd2185 WHIRLPOOL 14e1bd68466c463be5063f3db371a14588ad84db0fe6629f7fecf244ae2669d63c683da6f665e7e54ce369b152cd53ba80d1f1f26f5f96a5bc73261e2526e39f
EBUILD torque-4.1.5.1-r1.ebuild 7128 SHA256 81805f6dcf0d469c9e496f223a7690757c55bd9d7225b7eac2233566383d9cb8 SHA512 03e920f78833f41d5a2b83484df73ff8bd29ec83e85f63dbbd07922d5609e921e47a7d91da6689caad72afd537dc16dab7b7b6db4a9c7ef1c747905e7424cb92 WHIRLPOOL 8bb64bf0223ec2e710d04159e6943e400bc44158f76b0b90688ac1d9a13a89c2da44caaeb8ba4f0da50653d86bb6922f31d0cc7ed54344c4f7f5ba01d9feddc4
EBUILD torque-4.1.7.ebuild 7084 SHA256 2c96df24876569453b2ef1b3107e02194a4f7c601d06817527e025b97bb7fb51 SHA512 5a35a81454b432a90de38c3f5407dc35dd8f704515dcccecf4c7cc572812e81752127ffc14438d9f284057358645e902e93c9404f5bd16c005be56c25f8dcda9 WHIRLPOOL f95005a34282266c7f65d63f279c46de685d6a489ad5a34bfa4825ef38ca440be53f3cba97fefa173b60f82f0254ade8e29940a2bfedf6c6e0fb9039a53b6ea3
-MISC ChangeLog 28830 SHA256 49e31a9ef66f8c2b2155df834e984366f51b0fa9fadae743692dd74dd58c0de0 SHA512 96401e84fa4cea87fca423855724cc0d7fcb0c7037deb432e8ce473c34fc14de29796bf927ebd965b06a59a5307ee4ae91fc7759bea30e4540043543aff2cba3 WHIRLPOOL 0923392bcea64ea4d8158b770cbb2f8c946c109692e3231dfef6e21f919e0198ecfaf39f8d3d2683ec8449d1475f885aab90fd821b5bb28f6f314f30306f3122
+EBUILD torque-4.2.9.ebuild 7018 SHA256 ee5b2e366f5ac8008dc6125ebc26cc01c8c657f6bf26e034b5105ef3bab755a3 SHA512 99478a24118c121728229ead194c5cb94b51fcbedd59b7416306300525f8ec0aa77c34aa33ac8385553815786dc2eeca5ed092beefdabe8b2fb90d4792faf5cd WHIRLPOOL a5565bbb6c4002a38ddb4a8e808e5a5f03f866ce7fc841edbb1a0d5a23ac006f83a9210fc42ce73188fc35a1618512c904474a8fa8935de34196de282d06b236
+MISC ChangeLog 28980 SHA256 75b402e303c81730ec51756bb8fd0a73c01abc7bfa8f1b39e92f5034d816fc69 SHA512 d420a25e3a4ec4595a40dfe9a9cede80ceb31b43a92abb60c495f297e86448f61b43ae068e02a46325a7c7456af6561392205624badc835b92d7f91938ac3949 WHIRLPOOL ac957437c4e4cb697f0fe548ba10e0eea3897522a89b949818ad43d40e27b7e56a937b310f169baa28dd394a1e08bfd8cc9aae8276dd78c127040b8c11c93f6f
MISC metadata.xml 628 SHA256 10fab1886476e44fabbcda6e7dbbc8452d07cb0de0cefcf6e594312dfe89f7af SHA512 d1c78c4247f209eda60a61c9c611c4a4b87d52f85b112a78b96a4dee6f3cd660aef49547323074d69ffce8c1b916c3914f00282781e2f68f76658e6f9ac7ff9b WHIRLPOOL 243373e602f92a256118e6bee6c3071d5894caf3d53a663abee6929a310cf306b15a6a7bd2a0e76882cfe36cd4e8b6c06bb9e12f49f678d085883d61d4a84cf9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0
-iQJ8BAEBCgBmBQJUGtvaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+iQJ8BAEBCgBmBQJUG9E6XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyQ0JDQjFGMzBDQ0UxMjFGNENDNDgxMDdC
-OUQ0RjIzMUJEMTU1OEFCAAoJELnU8jG9FVir1mYP/Aq2t0FbHUKAngMScpFbq+ap
-sUy/a+ZVD+yd1YM5azLk/bRoXbAEYgfzay/Iv3HUKSNk258O27vMpWljs9H10eq7
-QKwgX9d+anFMwLMVmUlIBoNUM6WCPXuVqRFOX+z1hOChJr21gvrAjt95lVsk0EVa
-VyM8Xr7TPLCJdGqQ2YDfbIOwm9nePy7noOtsPuwOSy7bii5jKBKOCj4GwEWqKT9Q
-gkqRPkdQlLPglzohr62bfD/nCePP/UDRgj/uK0991BUgkaEVduT+4xWxPgGBPeKu
-XPc7iFQ1cbVl2AOpuRNs4zgAJHg9aBc82Xi1DJVMqCEzObQQJArcAcjdw6BOguGF
-BT5zKcpdrQKfkdGdouYICZ6TAhdHY4ITBrBAadETzOX3PJE27bbyiEiTEvnQZboX
-h9+354UHGSnZUcbrAdX95E0hziMWEU+ewYe0t7a21j/WiEhIlQ720ZwfC+jEGrgf
-ZblTLQhIHt1kP14SdGNo7xRq6L+wqjHrnb01ykr5Zp7GXsAAOrIggH57ydfSxlBA
-QJ/ASMmPg5qMIs7+B0iBfOyqw4weRcIIfNtvi797PDRDKRBfVklibm7LbVjB0ACe
-Ke9KAha2W5Rjh859X1gERARTKBaAJmBaxsbUs3sc3jfDqos1oCpM6LCfTRtqh8QT
-PoBz8jFDuazpg31KGuYp
-=KGdt
+OUQ0RjIzMUJEMTU1OEFCAAoJELnU8jG9FVirz6IP/jZMuSM2E5Pm7gS0A9we3NpD
+yRPbqXeemc1FXjvczIvWdnuJ13a2DuO6MKQZyuQR+izp96xRQ+DtFA7QelXc7xvi
+OnzURCmQd1FoEU3n+KxTHLxAgxj9xvRVeifrUKuBwRXp4MtmaTe3vdksIcjPkoJE
+ggeZAPhK/gNRl4e5OG7qCwdPHQiOszWltPk/Z7x/e8j6huwIBO3qgR3fGBMsPmpq
+X/DvS0RTY6Z1tsl4CmSt7KCzrqYOqihsDkXVs/nvtjTC2K0FoG9f03p9zpbCY6vj
+4qeEwoIO10IUMiy9BmeA0rRwGsGsqVQpeDtkyguV9WUIBhthbCuT1jhcPla0pWVI
+Qeqswsitoh3pZDl4wQIMO9+RG2A1493GjpbA/sw3P9sskeYxXNPR3N27jJxYNsHH
+zIsbgwqudVuZKaoCf7FOdVER57Z5E4YPpIfdrHZ5+u36q0IvBYivqMx8xixyoXnr
+VYlPqldal3hZLK2NFUYURxWd7UABhdaf+lgqcqx/D0hUEEF1qm0BydOsSgc8YeH3
+/wZ/rDH7tkSEYbwuNizZz8N/pOLAPG5W0XeMkWd4SQmFsb7jL7DNphRqNMjOg9+a
+A9F4+Tc9ElN+gdFUUX03c9azsLr/k/Sm5/+H7t18VTwkYNcqO9XruTs/I1c164GT
+SGo8q/MpMncDux2U4dLn
+=XR4I
-----END PGP SIGNATURE-----
diff --git a/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch b/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch
new file mode 100644
index 000000000000..3a2a28ce4a2b
--- /dev/null
+++ b/sys-cluster/torque/files/torque-4.2.9-tcl8.6.patch
@@ -0,0 +1,99 @@
+ src/cmds/qstat.c | 20 +++++++++++++++++++-
+ src/scheduler.tcl/pbs_tclWrap.c | 13 +++++++++++++
+ 2 files changed, 32 insertions(+), 1 deletion(-)
+
+diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c
+index f275cf8..23414b8 100644
+--- a/src/cmds/qstat.c
++++ b/src/cmds/qstat.c
+@@ -2203,8 +2203,13 @@ tcl_init(void)
+
+ if (Tcl_Init(interp) == TCL_ERROR)
+ {
++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+ fprintf(stderr, "Tcl_Init error: %s",
+ interp->result);
++#else
++ fprintf(stderr, "Tcl_Init error: %s",
++ Tcl_GetStringResult(interp));
++#endif
+ }
+
+ #if TCLX
+@@ -2216,8 +2221,14 @@ tcl_init(void)
+ if (Tclx_Init(interp) == TCL_ERROR)
+ {
+ #endif
++
++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+ fprintf(stderr, "Tclx_Init error: %s",
+ interp->result);
++#else
++ fprintf(stderr, "Tclx_Init error: %s",
++ Tcl_GetStringResult(interp));
++#endif
+ }
+
+ #endif /* TCLX */
+@@ -2328,15 +2339,22 @@ void tcl_run(
+
+ if (f_opt && Tcl_EvalFile(interp, script) != TCL_OK)
+ {
+- char *trace;
++ const char *trace;
+
+ trace = (char *)Tcl_GetVar(interp, "errorInfo", 0);
+
+ if (trace == NULL)
++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+ trace = interp->result;
+
+ fprintf(stderr, "%s: TCL error @ line %d: %s\n",
+ script, interp->errorLine, trace);
++#else
++ trace = Tcl_GetStringResult(interp);
++
++ fprintf(stderr, "%s: TCL error @ line %d: %s\n",
++ script, Tcl_GetErrorLine(interp), trace);
++#endif
+ }
+
+ Tcl_DeleteInterp(interp);
+diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c
+index 3eea0b0..7d0d610 100644
+--- a/src/scheduler.tcl/pbs_tclWrap.c
++++ b/src/scheduler.tcl/pbs_tclWrap.c
+@@ -935,8 +935,13 @@ int PBS_ReRun(
+
+ if (argc != 2)
+ {
++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+ sprintf(interp->result,
+ "%s: wrong # args: job_id", argv[0]);
++#else
++ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
++ "%s: wrong # args: job_id", argv[0]));
++#endif
+ return TCL_ERROR;
+ }
+
+@@ -947,11 +952,19 @@ int PBS_ReRun(
+ return TCL_OK;
+ }
+
++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+ interp->result = strdup("0");
++#else
++ Tcl_SetResult(interp, "0", TCL_STATIC);
++#endif
+
+ if (pbs_rerunjob_err(connector, strdup(argv[1]), extend, &local_errno))
+ {
++#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+ interp->result = strdup("-1");
++#else
++ Tcl_SetResult(interp, "-1", TCL_STATIC);
++#endif
+ msg = pbs_geterrmsg(connector);
+ sprintf(log_buffer, "%s (%d)", msg ? msg : fail, local_errno);
+ log_err(-1, argv[0], log_buffer);
diff --git a/sys-cluster/torque/torque-4.2.9.ebuild b/sys-cluster/torque/torque-4.2.9.ebuild
new file mode 100644
index 000000000000..7565dc147e9a
--- /dev/null
+++ b/sys-cluster/torque/torque-4.2.9.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/torque-4.2.9.ebuild,v 1.1 2014/09/19 06:46:17 jlec Exp $
+
+EAPI=5
+
+inherit flag-o-matic eutils linux-info
+
+DESCRIPTION="Resource manager and queuing system based on OpenPBS"
+HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque"
+# TODO: hopefully moving to github tags soon
+# http://www.supercluster.org/pipermail/torquedev/2013-May/004519.html
+SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=2849 -> ${P}.tar.gz"
+
+LICENSE="torque-2.5"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="cpusets +crypt doc drmaa kernel_linux munge nvidia server +syslog tk"
+
+DEPEND_COMMON="
+ sys-libs/ncurses
+ sys-libs/readline
+ cpusets? ( sys-apps/hwloc )
+ munge? ( sys-auth/munge )
+ nvidia? ( >=x11-drivers/nvidia-drivers-275 )
+ tk? ( dev-lang/tk )
+ syslog? ( virtual/logger )
+ !games-util/qstat"
+
+DEPEND="${DEPEND_COMMON}
+ !sys-cluster/slurm"
+
+RDEPEND="${DEPEND_COMMON}
+ crypt? ( net-misc/openssh )
+ !crypt? ( net-misc/netkit-rsh )"
+
+pkg_setup() {
+ PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/${PN}}"
+
+ # Find a Torque server to use. Check environment, then
+ # current setup (if any), and fall back on current hostname.
+ if [ -z "${PBS_SERVER_NAME}" ]; then
+ if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then
+ PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)"
+ else
+ PBS_SERVER_NAME=$(hostname -f)
+ fi
+ fi
+
+ USE_CPUSETS="--disable-cpuset"
+ if use cpusets; then
+ if ! use kernel_linux; then
+ einfo
+ elog " Torque currently only has support for cpusets in linux."
+ elog "Assuming you didn't really want this USE flag."
+ einfo
+ else
+ linux-info_pkg_setup
+ if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then
+ einfo
+ elog " Torque support for cpusets will require that you recompile"
+ elog "your kernel with CONFIG_CPUSETS enabled."
+ einfo
+ fi
+ USE_CPUSETS="--enable-cpuset"
+ fi
+ fi
+}
+
+src_prepare() {
+ # Unused and causes breakage when switching from glibc to tirpc.
+ # https://github.com/adaptivecomputing/torque/pull/148
+ sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die
+
+ # We install to a valid location, no need to muck with ld.so.conf
+ # --without-loadlibfile is supposed to do this for us...
+ sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die
+
+ epatch "${FILESDIR}"/${P}-tcl8.6.patch
+}
+
+src_configure() {
+ local myconf="--with-rcp=mom_rcp"
+
+ use crypt && myconf="--with-rcp=scp"
+
+ econf \
+ $(use_enable tk gui) \
+ $(use_enable syslog) \
+ $(use_enable server) \
+ $(use_enable drmaa) \
+ $(use_enable munge munge-auth) \
+ $(use_enable nvidia nvidia-gpus) \
+ --with-server-home=${PBS_SERVER_HOME} \
+ --with-environ=/etc/pbs_environment \
+ --with-default-server=${PBS_SERVER_NAME} \
+ --disable-gcc-warnings \
+ --with-tcp-retry-limit=2 \
+ --without-loadlibfile \
+ ${USE_CPUSETS} \
+ ${myconf}
+}
+
+src_install() {
+ local dir
+
+ DOCS=( CHANGELOG README.* Release_Notes )
+ use doc && DOCS+=( doc/admin_guide.ps doc/*.pdf )
+
+ default
+
+ # The build script isn't alternative install location friendly,
+ # So we have to fix some hard-coded paths in tclIndex for xpbs* to work
+ for file in $(find "${ED}" -iname tclIndex); do
+ sed \
+ -e "s/${ED//\// }/ /" \
+ -i "${file}" || die
+ done
+
+ for dir in $(find "${ED}/${PBS_SERVER_HOME}" -type d); do
+ keepdir "${dir#${ED}}"
+ done
+
+ if use server; then
+ newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server
+ newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched
+ fi
+ newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom
+ newconfd "${FILESDIR}"/${PN}-conf.d-munge ${PN}
+ newinitd "${FILESDIR}"/trqauthd-init.d trqauthd
+ newenvd "${FILESDIR}"/${PN}-env.d 25${PN}
+}
+
+pkg_preinst() {
+ if [[ -f "${ROOT}etc/pbs_environment" ]]; then
+ cp "${ROOT}etc/pbs_environment" "${ED}"/etc/pbs_environment || die
+ fi
+
+ if [[ -f "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" ]]; then
+ cp \
+ "${EROOT}${PBS_SERVER_HOME}/server_priv/nodes" \
+ "${ED}/${PBS_SERVER_HOME}/server_priv/nodes" || die
+ fi
+
+ echo "${PBS_SERVER_NAME}" > "${ED}${PBS_SERVER_HOME}/server_name" || die
+
+ # Fix up the env.d file to use our set server home.
+ sed \
+ -e "s:/var/spool/${PN}:${PBS_SERVER_HOME}:g" \
+ -i "${ED}"/etc/env.d/25${PN} || die
+
+ if use munge; then
+ sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${ED}"/etc/conf.d/${PN} || die
+ fi
+}
+
+pkg_postinst() {
+ elog " If this is the first time torque has been installed, then you are not"
+ elog "ready to start the server. Please refer to the documentation located at:"
+ elog "http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki"
+ echo ""
+ elog " For a basic setup, you may use emerge --config ${PN}"
+ echo ""
+ if [[ -z "${REPLACING_VERSIONS}" ]] || [[ ${REPLACING_VERSIONS} < 4 ]]; then
+ elog "Important 4.0+ updates"
+ elog " - The on-wire protocol version has been changed."
+ elog " Versions of Torque before 4.0.0 are no longer able to communicate."
+ elog " - pbs_iff has been replaced by trqauthd, you will now need to add"
+ elog " trqauthd to your default runlevel."
+ fi
+}
+
+# root will be setup as the primary operator/manager, the local machine
+# will be added as a node and we'll create a simple queue, batch.
+pkg_config() {
+ local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')"
+ local rc=0
+
+ ebegin "Configuring Torque"
+ einfo "Using ${h} as the pbs homedir"
+ einfo "Using ${PBS_SERVER_NAME} as the pbs_server"
+
+ # Check for previous configuration and bail if found.
+ if [ -e "${h}/server_priv/acl_svr/operators" ] \
+ || [ -e "${h}/server_priv/nodes" ] \
+ || [ -e "${h}/mom_priv/config" ]; then
+ ewarn "Previous Torque configuration detected. Press Enter to"
+ ewarn "continue or Control-C to abort now"
+ read
+ fi
+
+ # pbs_mom configuration.
+ echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config" || die
+ echo "\$logevent 255" >> "${h}/mom_priv/config" || die
+
+ if use server; then
+ local qmgr="${EROOT}/usr/bin/qmgr -c"
+ # pbs_server bails on repeated backslashes.
+ if ! "${EROOT}"/usr/sbin/pbs_server -f -d "${h}" -t create; then
+ eerror "Failed to start pbs_server"
+ rc=1
+ else
+ ${qmgr} "set server operators = root@$(hostname -f)" ${PBS_SERVER_NAME} \
+ && ${qmgr} "create queue batch" ${PBS_SERVER_NAME} \
+ && ${qmgr} "set queue batch queue_type = Execution" ${PBS_SERVER_NAME} \
+ && ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME} \
+ && ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME} \
+ && ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME} \
+ && ${qmgr} "set server resources_default.nodes = 1" ${PBS_SERVER_NAME} \
+ && ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME} \
+ || die
+
+ "${EROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1
+
+ # Add the local machine as a node.
+ echo "$(hostname -f) np=1" > "${h}/server_priv/nodes" || die
+ fi
+ fi
+ eend ${rc}
+}