summaryrefslogtreecommitdiff
path: root/dev-java/openjdk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-06 19:06:26 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-06 19:06:26 +0000
commitf8f68d6f93dd8510c09261f47d4f64cadf303815 (patch)
tree2d317143f2696b93a06c8d26452ea901a1f2fd74 /dev-java/openjdk
parent0113c4c9eb49e26aee006787c9564c1165909926 (diff)
gentoo auto-resync : 06:03:2024 - 19:06:26
Diffstat (limited to 'dev-java/openjdk')
-rw-r--r--dev-java/openjdk/Manifest22
-rw-r--r--dev-java/openjdk/files/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch41
-rw-r--r--dev-java/openjdk/files/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch48
-rw-r--r--dev-java/openjdk/files/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch38
-rw-r--r--dev-java/openjdk/files/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch61
-rw-r--r--dev-java/openjdk/metadata.xml1
-rw-r--r--dev-java/openjdk/openjdk-11.0.20.1_p1.ebuild2
-rw-r--r--dev-java/openjdk/openjdk-11.0.22_p7.ebuild312
-rw-r--r--dev-java/openjdk/openjdk-17.0.10_p7.ebuild327
-rw-r--r--dev-java/openjdk/openjdk-17.0.8.1_p1.ebuild2
-rw-r--r--dev-java/openjdk/openjdk-21.0.1_p12.ebuild2
-rw-r--r--dev-java/openjdk/openjdk-21.0.2_p13.ebuild320
-rw-r--r--dev-java/openjdk/openjdk-8.382_p05-r2.ebuild2
-rw-r--r--dev-java/openjdk/openjdk-8.402_p06.ebuild244
14 files changed, 1413 insertions, 9 deletions
diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index 8d39127f5f52..68706aa9c3f0 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -1,12 +1,20 @@
AUX openjdk-8-insantiate-arrayallocator.patch 647 BLAKE2B b2403d842ace7198520a25bf7c2027e6d74b5d418b52321722b21cac866df883d47e53e4f5e040aed55a9cc4bf03b5a62d008a0877add6c649a41f6230d78a38 SHA512 4bf002ec25844f4e55b588d0516e658c548700d3bcae79be74bf75d9cf30cf9cd448767db36935924dd3b07f34d0cf087321cb35abb4943690353d11485ab0de
+AUX openjdk-8.402_p06-0001-Fix-Wint-conversion.patch 1457 BLAKE2B bf40827358b66f4f74ed506daec28f90c2c36609e28bbdd1a1df289a7a7b6b837c58f4978fffd18e580e0d49a6caaba31e54c3fcfbc66a218203cc2e05ec595d SHA512 4c2c9a6b99f833318fdd955ad015813326f8f9a5ad7e5327b74ccd2b638f1c7f8935223c3a1af26946f470b5d7c19ac130c72291b3a5ce0ec4a729df3a3915b9
+AUX openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch 2254 BLAKE2B 6e8e008b6735262d9447605e60fbf0a5937068d5efbac014dad86910d55320cba048b88dd2a4436bcac407d1660137f94eab037b8b99453c9a5cf6721e22f4bc SHA512 8f6659dcbc63c0fa637a636b0e09141a09eecb31e2296f863f3446ce1c820922d2be12063822f6b12ce4702e920fcd5a6573494e4b88224cd3505be46574e8ba
+AUX openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch 1687 BLAKE2B 435c9609dee9f7eaa492a8d9206a8d6d2a655313e7647876ea513e2c3bc213047578cc2067bb1e894d2bbb06961ed3dc0663bb55ac527dcd28a62b6ad18acc96 SHA512 9223c6491321787d32bce7a666517fec4201ba117bdd738cecdf098d4cd7e286b16243e110bff7a5fbcbe215bd277493b708937f0f47f3b06aeb0ba82c4ac81a
+AUX openjdk-8.402_p06-0004-Fix-misc.-warnings.patch 3075 BLAKE2B 8da8de4830a45451c10fe67195ee2b40c1e6571306ea36d7a4e2ffbd124a5938a4b770289193e54a337bc8c2dbbc21ff56928947a4e897f9da90c69bef80f1cf SHA512 cdec600647b93cfa8574e463f674ae1a6bae53fff6210f7c9a8cae6a5c655a021a1c8859a1541669a51c14416e53d9e4e9f3f81131f1db1c200c5697dfa7eacb
AUX openjdk-8.env.sh 687 BLAKE2B 4bb851545955fafa6a4b08f2589fa9a5441ef37484eb21ac5db06cde111d325903e70b5b7473659973a0bab972386c8f33ded1da57858fdca325cfa29b1122f5 SHA512 a43fc0fcf57108350235d47d6da65a12fb9f77f12f6163c649ceceacb3317c6a25516efa060efe129b74138a529945163343e5a7d1de2b7af36f6580054ed5e5
AUX openjdk.env.sh 432 BLAKE2B 8779a373af2f9e52473cb5e3bc2bbcb7fa83c6d09382d498466888dd322299adc1b736c6e3723fa68e92a80067599228b3511cc2826e1ebc3c5845a7a2f62fa3 SHA512 e6604a88fb857945a618e4b7735d49dbc23bdd4c6fb70fc5753470e9c1047825208a40fe25107bcde95f290656b44f92e1667ebc414454cbae2e71f16fec5fbd
DIST java17-riscv64.patch 2253475 BLAKE2B a10a257f0b8bf590cdc011cf0c5af4854d49d6bbdf68dd74b2f996b70e0ecdd2b87bc4a02394f67ded5e664efb41f8dd03bb312fbfcffd84c289afdcbf7868de SHA512 06230b121e1f28189877025a4eab99e6d8cba176a17c88f073498fec6c73ab26130ce1500ea4f83235cc6abbc1742e47b227d60b5ff77465740048abdc52d165
DIST openjdk-11.0.18-riscv.patch.xz 272672 BLAKE2B b079612032a5bf135b05bdd1da16f2823772a5d9a18447a435f191daf78c5429a15c2e9ea64758dc9b26ee2a88275532b4f27714b2a7e4489f920c0ed2f5003b SHA512 c0426f243c5aa581d90366cb01ce811e34883a9d8a0298cab420378470e8eb427a56932ca1fbb5ed57e7430be2b38c6bc4491028ebaa25be0a938ba0bb2baf45
DIST openjdk-11.0.20.1_p1.tar.gz 116165519 BLAKE2B 3f3627d6535770c6654226ca2c188ac4aa0f332c7f66d79ab1991274e019ee4aee5194b285bace03175593543017a2ec75494e8e50b5488df82c7d437bf31398 SHA512 765f90a24629e5db5afb23b09edc38a3d460ba27d1de53980942e711783fe9fdf1c4ef29a75d2ffd6d93864611ffce60d515e032180917cd053967a0d4ecfc69
+DIST openjdk-11.0.22_p7.tar.gz 116235391 BLAKE2B 50b845b8f1e316da37e45c94a1890939659b554a314a1a455903e8cc58465cd69cd485548b6b42c445150187e37df5cf946d52bca754236a198f6aa10d7de37e SHA512 b88d0db9750d8201dfb4b027045de4023be766e42cca7a3ff5e0cb28db4c6da3f146a57819a6b81cb33e5837726986bcc3780ecf88bf525f445c2cd35a3993d8
+DIST openjdk-17.0.10_p7.tar.gz 106398664 BLAKE2B 48cb2bc7d063da25a62834734ba4a887d26a27a8d84c535255df67419bf4f6d8b060c48ef37bd7324e14e957a141791380d4d9e42335a90f72dc34bc7b1d12fe SHA512 c2dfd66debdce488de044efcfc3f57cc9eb07ead2cfb7dd6e28e5748d48ec89f0c326a4c3f4a5c740019b8e5a02b858d93dd74a0c6626de445144b9840d3a426
DIST openjdk-17.0.8.1_p1.tar.gz 105878760 BLAKE2B e4d752dc87717855bfe4bd84c97056f0d93b554c67bdbb3e750e20479e2156628c85aea7b404577ea6ff40d49669d5f53aab06d0c4cf9aa926b060a0cd93cd03 SHA512 0d8e9e54173be855c15d121d4d6cd36996700e1e2fb194ad93ba8ad794a342c87b7d2f81a32d0bb215e45f1dc1f4efdfe1be5e8de99395730902d443ac773813
DIST openjdk-21.0.1_p12.tar.gz 112241360 BLAKE2B 68a542a1dd65cf74b826e255d08350ec662c37337e45aec18d91e0dbdcce5c6e50172ad482cc21f1aacbf356722e009d4b6431aecf5a1d6b67b74a5007ca702a SHA512 def4b6688f063758235bc454bbbdb4caefa45d2724a9f2296af11d684801f05f1375f0be771b52d9235676e7f89dec816a34b3a1a1cc972662ee50de89600455
+DIST openjdk-21.0.2_p13.tar.gz 112252812 BLAKE2B a7cbdc67d05a4e7db75ddb7043f06928c599139bd6eab02a23749194eb340f82038061036e84961ed124b8c8a0320bc3a2a890100b643765e1a87b8b129f30f9 SHA512 01a2f57dc432ea31f64d79092ae722f752e7ff111291cb5fb874046079a0fee985ede9d3aac991d946c9c6e712854827dd45284ff4cf39592add3629dbb94ace
DIST openjdk-8.382_p05.tar.gz 93105951 BLAKE2B 07e2961dbbd8de153650a1f92fd88960e6b1b39e7d212cc158bd943d35da5fdab0595583226ac12134eb176b1c550576e7aef5dfaf4a76ac0060daa42f4b4495 SHA512 5879cfbd5795f0260897c52fe2503754767faf1e229832e0c4c6dd9957055fd7105d14403d82ccf92eed0adfecc5bc858a89643e68d3c81d437fd543fbfce49a
+DIST openjdk-8.402_p06.tar.gz 93136112 BLAKE2B 023422ca2b4dfc08fd3642e3cb3ec0503d57d09dbcb54841e4a04f67a6cd118712cba90b7760eaf9135f9f001f7c15221c4bcb19986547fb2b6b3fb852bb8af4 SHA512 476d195ef500d8dd2013b17de0669a77ef8076b55c2753eb88b1a13f7a48526b1be7a1befabd284eb9ee8411df19ab1f39c81287ab659984d2d67e8aa7192d79
DIST openjdk-bootstrap-11.0.13_p8-ppc64.tar.xz 108215404 BLAKE2B 5e6c0b905b34b437137922b73a9724da96b8832186fea945f8c73d941db822ca1cc5718f3ecb4607ed98d1f8241c9f365b54caaf978863e8b84680a94f067b5d SHA512 732e2220219d42be10589fcaf2420da87ebc8564b4afc6bd02f61f31cdca9c31b339366e34d374fb814499b92f8aa796435a18f28e10c8cb00d9a0f5953bb60e
DIST openjdk-bootstrap-11.0.13_p8-x86.tar.xz 105420236 BLAKE2B d3137ad497937a9a04dedf38776f3ac45bf3b115d275991fd8582b72ade48390b6aa8ad89e0b4d34fa6a787a3c413dab20b32ef347dc8733544e810150c55d29 SHA512 f71a7ef8fbf19b0595dd7d4ebe52bbe1c95b8c17f34d092472c5f5ce8caf52a053f22db8587f1649f9a96ad01c0c632be343342812f5a8cc4ff843b33b8d9b0f
DIST openjdk-bootstrap-11.0.14_p9-riscv.tar.xz 104601676 BLAKE2B 5f976e8a626a829fae70ad6c007f10bfeff79e29c85d6c75fb2f5ff8984fd2a2bd44ee6e07958dbbdaaed761c6839d375e1b5ba6cffc63b02ad9e2c9178310db SHA512 580dec81626553fe3e7afd0f6385a733ba80a0502cf0f9e8bdc973048887290c9ab6171267d61d8838c4ece4de58c9ca8b78540bd52b1757495a27175057ec64
@@ -16,8 +24,12 @@ DIST openjdk-bootstrap-17.0.2_p8-arm64-musl.tar.xz 115353932 BLAKE2B 0cc4ab07808
DIST openjdk-bootstrap-17.0.3_p7-riscv.tar.xz 113344052 BLAKE2B 69ae326c600ecf1840a0874b1e26545779434b979e195a3bc7975615f873cd9ffce324f291e56a2800edc304447845baec774b2a08964afde274bd8e0dd3f704 SHA512 4a483faa32b26758f6fae605fdb3d3b77814c627a3a560e91ca88e2d36a88543a53f019a59b5a6456b87ca671e8b7129d5766210bd5cd52125cb3a040ec2a23f
DIST openjdk-bootstrap-21.0.0_p35-ppc64.tar.xz 125375264 BLAKE2B 28802995f393dc76362dae766f8b598fd56085051418075d4c426293e6431b441ea38a2d2e4676fc89173d10324e3aafac52c97a5d9459bb0199168a07807e16 SHA512 cbd3992450c44764373c25313f6ce32f0c8a47abec557e4a10f7f8517435bf450ba5ac9fa9c8cdfb41f1536b55829d733426dc12dc2b5a2eebf5a94e9094752a
DIST openjdk-bootstrap-21.0.0_p35-x86.tar.xz 120906212 BLAKE2B c3a56f4e51a8aca1c318b9c32bebdb4c09e42d80416ce1843bc80077f09466b7f54627ab6992f9149fdabdb4d5557c3cad6b5e93b37ba3d89d84f736fc07a57a SHA512 40f0cf60adaebd0c6ae11badb6b71727a5cc64c89077731b0f7cc82f203297b9b780ae43ec74eca9dd5a64de1209f519c2ad0f9083c017cf474d1020206f762c
-EBUILD openjdk-11.0.20.1_p1.ebuild 8954 BLAKE2B 6fc8e1e5ceb6c4c30a70dd08d199123f24c356752444cf7e24612b46a8c0bc8578d8b2d4da1bee3b0ac92be5228e3e0965a9eab16772813d188449f326d239e0 SHA512 e3268551384c6fbc45a310072a5a0621c6237de2cdcb9df124e87de8b470234e770dba1a1cc5831ec52f554707ddebc6915c121e8a69c9458236dda705a015e4
-EBUILD openjdk-17.0.8.1_p1.ebuild 9748 BLAKE2B 7a6340dd5805a785edb59bf194f1de6b2f00f4be26c78a6f8efadbe34350b4834d2e7a8488998a744a24a1dd1ba8b314c5d8a030220c89fd3a05acb35c79d857 SHA512 cea0f18e4e9da6131c7652d4d2fafc8cccdeac5d40a61058a8c0effbca4453070c39238e00eadea486244944521aca0748c5452701276282c826cf4b18baae67
-EBUILD openjdk-21.0.1_p12.ebuild 9341 BLAKE2B 12e0ba91c2209b646903e40f7d72e1a44173bd8ef0635b05408404b59cd4f8e7b98d78b1bbc16393276a5a74beb1edd8879d11099ccd79eda62b8a865097766b SHA512 319b2decbb6afcfacbccae7c9b83b488545962447319fd15a34349a9663d42585105a713ce4fce21ad0b7dbf9b86cf89afc1363f171823eccbb1bc7d7027d863
-EBUILD openjdk-8.382_p05-r2.ebuild 6494 BLAKE2B 2a99d21d84dfd6d6113c7f4983cb74e1ebb4190f116bca7dc956fa41af8279edc839b7156b9161e12dcb8598538366a5669426982cf5a13733813376aa63cee8 SHA512 8f9909a88f201162e7472c07cab45d6c041e0da90eda4fb71052f827bd13b0fb9fc32aca7017c61afab30c1e2bd9b0b1bf15f8d9d4f5fe5e3499cdc468eee6e4
-MISC metadata.xml 1495 BLAKE2B af223deac1715bfcf1a02d0d9c387d2bb09b01985795a60472ffde2288c8e3a1f4541a20c24a230894a585f875246863749d79ce2195eb2378c9dff807079a60 SHA512 c6b568fcc3c07914a761225600aea1984c4bdcf95f1b23c773174eee29f63a3206856db483f80aca45669dd6dcb124db7ff00db7e7da15a2c7b574f4d3aa48de
+EBUILD openjdk-11.0.20.1_p1.ebuild 8946 BLAKE2B 4bb6494b6c74786baa05f61a48c597d6efe1d2dc81139e8cb1e82c11e46db5ddedb87527a8c76aabfea04690c3eff3bf790a114117c0c42949b8246c45809232 SHA512 95f6555995f2b5d2989e242a1c61c7253d4b4adab406689a2cf1fb611ef4712921ce9c6f56077e3ddbd67c59eb28fd213010093d911abe6241bbb5a553f20eb8
+EBUILD openjdk-11.0.22_p7.ebuild 8868 BLAKE2B a35d2c2caab6362c508a4e9354c2e9d37944a4699483a2187af9a66928d7cc32e463ada9c508b3fa5946b0a84bf4a72a82fa39158f6dc38436a8518fd89fde28 SHA512 a5653dc9c1e78c679c9d0b823d387e0b832e8f02b51e49f2966a6d956adc1e8bee17ada80c45afbf145b2a4c5d021402d36b0247fbbb9e0ce80cc4e53dddf19f
+EBUILD openjdk-17.0.10_p7.ebuild 9662 BLAKE2B 3668984f5900fa87206c96d71df1051e1542afa7ffe8bc4a80e1facaf3c21d96848ab4464d2c24966d379fbffa673b75020294e5b2ee0d08b87e4cc7d3b6c588 SHA512 4ff90276739544a965a1400cff0ca9a7268d04ab2a27b1c0ea99ab579cbd9ea387143acf970b4bc3487490783189ebc9f6d02d2c448fe44b53a328faf9417a80
+EBUILD openjdk-17.0.8.1_p1.ebuild 9740 BLAKE2B 1d3a3fad44fa75628fdc11af4427023ce0a2bebbd45677866d2efcdc5b9fec11af864d97bb6bafdb656fd593de45d28e95ad33962dcb16b5065032261def7845 SHA512 3879516f49709d2c1f11e8012c82d887ba4528061310922cd7003d13948969751bb718f717a1a1e3f408b105d45b877a46029e81599b94d9274f45d3d0653d10
+EBUILD openjdk-21.0.1_p12.ebuild 9333 BLAKE2B c7c29d8daea264b8f7830e124f2ac023ffe2cefc5f455c47938928d61487ef73a21d9ba29e448d8963c607449e88bc83627ec00d0df07c3cd9da6d64ff46ed0d SHA512 6b94fbabe997d18601c24156f9e1f49b5f10ca0229b004bacc174990d5cbe265a3f15fe575d4b74ce9c66ff6c860a78ed2526dca2c0e9573d935bb1043a4b408
+EBUILD openjdk-21.0.2_p13.ebuild 9251 BLAKE2B e7fd409656211864689d2040d738a45a132d5e3150fc8fa180d7957255aaac6cff2a44dfb87bbcf0f519791f39f09bb6788bbe730738c70778d5f22c85e9fa00 SHA512 73ff9f0d4034dee508403f2ffc1924294265465629a6c0d9c33c4e5df776a474c6a7fae19eb0b446e7861cb30fc24929970b718b3da69ecb446bac994bb22950
+EBUILD openjdk-8.382_p05-r2.ebuild 6486 BLAKE2B c1df22ba01c79c413b7a2cfc034ea7361c8dd43d075398114a6b8aadeed00d5ba3bdadc4ea2f709800cbd9c51f6398d479683bfeee54ffdb4fce5084dc782b09 SHA512 3e260a5c699ab1b626f0104291729fdad94194839ffc04e7f4dcd47fb80ac14933a4d13827879651b79628762002b927ab18e2350e321b81fcb8e6381c54fb31
+EBUILD openjdk-8.402_p06.ebuild 6748 BLAKE2B b37b29e91665eb9c410be52c8fffb5d830d85ab0bef9b08c9fae9e9ddfc19302adb056a23cfc9d5565fbda2ed7608a13de40c1e2a495873352bece4ae24aba84 SHA512 27de7dca0e9ee5413ea52534763cebfbf77183c6b0cdb682f42902652162d0a3d50fc800fdaba08876eb2a3c3538e25545f822f453d3468f51df35c6cb6e6da7
+MISC metadata.xml 1549 BLAKE2B 5f7caf2330b7d8eb264df12fe6eebbf1e4acf91b04e37a4c6ea6c45101a39f2e84b4d40152d58c93e63a1d2d6fdb5649b096a314f7269d33ce72da263d392c90 SHA512 8fa15bf9544f2665a47185a3701c3a9ce1654ddedf1aebfb344f77f544a71a3bda33c2d4f3c1d5d65d7ea42b6c1f04a6e1dfaaae723c1a5fcaf63ec48d79f3de
diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch
new file mode 100644
index 000000000000..317f1aa226b3
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch
@@ -0,0 +1,41 @@
+From cc568d4d246ffc9bf08a96db0889d3b89c852718 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 11:22:11 +0000
+Subject: [PATCH 1/4] Fix -Wint-conversion
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport of upstream commit https://github.com/openjdk/jdk21u-dev/commit/7b1455163ed893639059b3d62b71b2ff347c2e3f.
+
+Fixes the following warning/error:
+```
+jdk8u-jdk8u402-ga/jdk/src/share/bin/splashscreen_stubs.c:64:5: error: returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/bin/splashscreen_stubs.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/jdk/src/share/bin/splashscreen_stubs.c b/jdk/src/share/bin/splashscreen_stubs.c
+index 9c1f514..666634f 100644
+--- a/jdk/src/share/bin/splashscreen_stubs.c
++++ b/jdk/src/share/bin/splashscreen_stubs.c
+@@ -61,11 +61,11 @@ typedef char* (*SplashGetScaledImageName_t)(const char* fileName,
+ #define INVOKEV(name) _INVOKE(name, ,;)
+
+ int DoSplashLoadMemory(void* pdata, int size) {
+- INVOKE(SplashLoadMemory, NULL)(pdata, size);
++ INVOKE(SplashLoadMemory, 0)(pdata, size);
+ }
+
+ int DoSplashLoadFile(const char* filename) {
+- INVOKE(SplashLoadFile, NULL)(filename);
++ INVOKE(SplashLoadFile, 0)(filename);
+ }
+
+ void DoSplashInit(void) {
+--
+2.44.0
+
diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch
new file mode 100644
index 000000000000..3e8a5d17113c
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch
@@ -0,0 +1,48 @@
+From 57b8fef20b090ffdf99bcf2c3f5fc8d0d4472788 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 11:54:24 +0000
+Subject: [PATCH 2/4] Fix -Wincompatible-pointer-types
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport https://github.com/openjdk/jdk17u/commit/6632e6c6ca74101b45b052fb7962376fbe97605e.
+
+```
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c: In function ‘Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage’:
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2853:19: error: passing argument 1 of ‘freeArray’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 2853 | freeArray(scale, numBands);
+ | ^~~~~
+ | |
+ | UINT8 ** {aka unsigned char **}
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2689:30: note: expected ‘void **’ but argument is of type ‘UINT8 **’ {aka ‘unsigned char **’}
+ 2689 | static void freeArray(void** arr, jint size) {
+ | ~~~~~~~^~~
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2860:19: error: passing argument 1 of ‘freeArray’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 2860 | freeArray(scale, numBands);
+ | ^~~~~
+ | |
+ | UINT8 ** {aka unsigned char **}
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+index 7e1d8c9..163003c 100644
+--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
++++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+@@ -2686,7 +2686,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables
+ RELEASE_ARRAYS(env, data, NULL);
+ }
+
+-static void freeArray(void** arr, jint size) {
++static void freeArray(UINT8** arr, jint size) {
+ int i;
+ if (arr != NULL) {
+ for (i = 0; i < size; i++) {
+--
+2.44.0
+
diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch
new file mode 100644
index 000000000000..3e4296d21aac
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch
@@ -0,0 +1,38 @@
+From 685bf942bdf5b265a3b343c2b682b01b11b6e58a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 12:20:03 +0000
+Subject: [PATCH 3/4] Fix negative value left shift
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport of https://github.com/openjdk/jdk17u/commit/51be7db96f3fc32a7ddb24f8af19fb4fc0577aaf.
+
+```
+jdk/src/share/native/com/sun/java/util/jar/pack/constants.h:226:37: error: left operand of shift expression ‘(-1 << 13)’ is negative [-fpermissive]
+jdk/src/share/native/com/sun/java/util/jar/pack/constants.h:226:39: error: enumerator value for ‘AO_UNUSED_MBZ’ is not an integer constant
+ 226 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
+ | ^~
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/native/com/sun/java/util/jar/pack/constants.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h
+index f1a1f73..536003b 100644
+--- a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h
++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h
+@@ -223,7 +223,7 @@ enum {
+ AO_HAVE_FIELD_FLAGS_HI = 1<<10,
+ AO_HAVE_METHOD_FLAGS_HI = 1<<11,
+ AO_HAVE_CODE_FLAGS_HI = 1<<12,
+- AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
++ AO_UNUSED_MBZ = (int)((~0U)<<13), // options bits reserved for future use.
+
+ #define ARCHIVE_BIT_DO(F) \
+ F(AO_HAVE_SPECIAL_FORMATS) \
+--
+2.44.0
+
diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch
new file mode 100644
index 000000000000..44c5268646d8
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch
@@ -0,0 +1,61 @@
+From 24f51a75b79aec29bd1631d320e051a646b9fae4 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 12:23:41 +0000
+Subject: [PATCH 4/4] Fix misc. warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport of https://github.com/openjdk/jdk11u/commit/49dec121161c162f4aa94caf8c09413253d89377.
+
+```
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp: In function ‘_jobject* Java_com_sun_java_util_jar_Unpack_getUnusedInput(JNIEnv*, jobject)’:
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp:295:12: error: cannot convert ‘bool’ to ‘jobject’ {aka ‘_jobject*’} in return
+ 295 | return false;
+ | ^~~~~
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp: In function ‘jlong Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv*, jobject)’:
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp:315:3: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
+ 315 | CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL);
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp:315:3: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
+[...]
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
+index 5fbc726..4c002e7 100644
+--- a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
+@@ -292,7 +292,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_getUnusedInput(JNIEnv *env, jobject
+
+ if (uPtr->aborting()) {
+ THROW_IOE(uPtr->get_abort_message());
+- return false;
++ return null;
+ }
+
+ // We have fetched all the files.
+@@ -312,7 +312,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) {
+ // There's no need to create a new unpacker here if we don't already have one
+ // just to immediatly free it afterwards.
+ unpacker* uPtr = get_unpacker(env, pObj, /* noCreate= */ true);
+- CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL);
++ CHECK_EXCEPTION_RETURN_VALUE(uPtr, 0);
+ size_t consumed = uPtr->input_consumed();
+ // free_unpacker() will set the unpacker field on 'pObj' to null
+ free_unpacker(env, pObj, uPtr);
+@@ -323,6 +323,7 @@ JNIEXPORT jboolean JNICALL
+ Java_com_sun_java_util_jar_pack_NativeUnpack_setOption(JNIEnv *env, jobject pObj,
+ jstring pProp, jstring pValue) {
+ unpacker* uPtr = get_unpacker(env, pObj);
++ CHECK_EXCEPTION_RETURN_VALUE(uPtr, false);
+ const char* prop = env->GetStringUTFChars(pProp, JNI_FALSE);
+ CHECK_EXCEPTION_RETURN_VALUE(prop, false);
+ const char* value = env->GetStringUTFChars(pValue, JNI_FALSE);
+--
+2.44.0
+
diff --git a/dev-java/openjdk/metadata.xml b/dev-java/openjdk/metadata.xml
index bb834a6a0f83..543587cc5399 100644
--- a/dev-java/openjdk/metadata.xml
+++ b/dev-java/openjdk/metadata.xml
@@ -27,5 +27,6 @@
<remote-id type="github">openjdk/jdk8u</remote-id>
<remote-id type="github">openjdk/jdk11u</remote-id>
<remote-id type="github">openjdk/jdk17u</remote-id>
+ <remote-id type="github">openjdk/jdk21u</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-java/openjdk/openjdk-11.0.20.1_p1.ebuild b/dev-java/openjdk/openjdk-11.0.20.1_p1.ebuild
index e05303dde86e..dbb9da687c7f 100644
--- a/dev-java/openjdk/openjdk-11.0.20.1_p1.ebuild
+++ b/dev-java/openjdk/openjdk-11.0.20.1_p1.ebuild
@@ -258,7 +258,7 @@ src_compile() {
$(usex doc docs '')
$(usex jbootstrap bootcycle-images product-images)
)
- emake "${myemakeargs[@]}" -j1 #nowarn
+ emake "${myemakeargs[@]}" -j1
}
src_install() {
diff --git a/dev-java/openjdk/openjdk-11.0.22_p7.ebuild b/dev-java/openjdk/openjdk-11.0.22_p7.ebuild
new file mode 100644
index 000000000000..35c84c8eae14
--- /dev/null
+++ b/dev-java/openjdk/openjdk-11.0.22_p7.ebuild
@@ -0,0 +1,312 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eapi8-dosym check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
+
+# don't change versioning scheme
+# to find correct _p number, look at
+# https://github.com/openjdk/jdk${SLOT}u/tags
+# you will see, for example, jdk-17.0.4.1-ga and jdk-17.0.4.1+1, both point
+# to exact same commit sha. we should always use the full version.
+# -ga tag is just for humans to easily identify General Availability release tag.
+# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to
+# set build version properly
+MY_PV="${PV%_p*}-ga"
+SLOT="${MY_PV%%[.+]*}"
+
+# variable name format: <UPPERCASE_KEYWORD>_XPAK
+PPC64_XPAK="11.0.13_p8" # big-endian bootstrap tarball
+RISCV_XPAK="11.0.14_p9" # lp64d bootstrap tarball
+X86_XPAK="11.0.13_p8"
+
+# Usage: bootstrap_uri <keyword> <version> [extracond]
+# Example: $(bootstrap_uri ppc64 17.0.1_p12 big-endian)
+# Output: ppc64? ( big-endian? ( https://...17.0.1_p12-ppc64.tar.xz ) )
+bootstrap_uri() {
+ local baseuri="https://dev.gentoo.org/~arthurzam/distfiles/dev-java/${PN}/${PN}-bootstrap"
+ local suff="tar.xz"
+ local kw="${1:?${FUNCNAME[0]}: keyword not specified}"
+ local ver="${2:?${FUNCNAME[0]}: version not specified}"
+ local cond="${3-}"
+
+ # here be dragons
+ echo "${kw}? ( ${cond:+${cond}? (} ${baseuri}-${ver}-${kw}.${suff} ${cond:+) })"
+}
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.org"
+SRC_URI="
+ https://github.com/${PN}/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz
+ -> ${P}.tar.gz
+ !system-bootstrap? (
+ $(bootstrap_uri ppc64 ${PPC64_XPAK} big-endian)
+ $(bootstrap_uri riscv ${RISCV_XPAK})
+ $(bootstrap_uri x86 ${X86_XPAK})
+ )
+ riscv? ( https://dev.gentoo.org/~arthurzam/distfiles/dev-java/openjdk/openjdk-11.0.18-riscv.patch.xz )
+"
+
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+
+IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap lto selinux source system-bootstrap systemtap"
+
+REQUIRED_USE="
+ javafx? ( alsa !headless-awt )
+ !system-bootstrap? ( jbootstrap )
+"
+
+COMMON_DEPEND="
+ media-libs/freetype:2=
+ media-libs/giflib:0/7
+ media-libs/harfbuzz:=
+ media-libs/libpng:0=
+ media-libs/lcms:2=
+ sys-libs/zlib
+ media-libs/libjpeg-turbo:0=
+ systemtap? ( dev-debug/systemtap )
+"
+
+# Many libs are required to build, but not to run, make is possible to remove
+# by listing conditionally in RDEPEND unconditionally in DEPEND
+RDEPEND="
+ ${COMMON_DEPEND}
+ >=sys-apps/baselayout-java-0.1.0-r1
+ !headless-awt? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ )
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ selinux? ( sec-policy/selinux-java )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ app-arch/zip
+ media-libs/alsa-lib
+ net-print/cups
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ javafx? ( dev-java/openjfx:${SLOT}= )
+ system-bootstrap? (
+ || (
+ dev-java/openjdk-bin:${SLOT}[gentoo-vm(+)]
+ dev-java/openjdk:${SLOT}[gentoo-vm(+)]
+ )
+ )
+"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
+
+# The space required to build varies wildly depending on USE flags,
+# ranging from 2GB to 16GB. This function is certainly not exact but
+# should be close enough to be useful.
+openjdk_check_requirements() {
+ local M
+ M=2048
+ M=$(( $(usex jbootstrap 2 1) * $M ))
+ M=$(( $(usex debug 3 1) * $M ))
+ M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M ))
+
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ openjdk_check_requirements
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876"
+ fi
+}
+
+pkg_setup() {
+ openjdk_check_requirements
+ java-vm-2_pkg_setup
+
+ [[ ${MERGE_TYPE} == "binary" ]] && return
+
+ JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}"
+ JAVA_PKG_WANT_SOURCE="${SLOT}"
+ JAVA_PKG_WANT_TARGET="${SLOT}"
+
+ if use system-bootstrap; then
+ for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
+ if [[ -d ${BROOT}/usr/lib/jvm/${vm} ]]; then
+ java-pkg-2_pkg_setup
+ return
+ fi
+ done
+ fi
+}
+
+src_prepare() {
+ use riscv && eapply "${WORKDIR}"/openjdk-11.0.18-riscv.patch
+ default
+ chmod +x configure || die
+}
+
+src_configure() {
+ if ! use system-bootstrap; then
+ local xpakvar="${ARCH^^}_XPAK"
+ export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}"
+ fi
+
+ # Work around stack alignment issue, bug #647954.
+ use x86 && append-flags -mincoming-stack-boundary=2
+
+ # bug 906987; append-cppflags doesnt work
+ use elibc_musl && append-flags -D_LARGEFILE64_SOURCE
+
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
+
+ # Strip lto related flags, we rely on USE=lto and --with-jvm-features=link-time-opt
+ # https://bugs.gentoo.org/833097
+ # https://bugs.gentoo.org/833098
+ filter-lto
+ filter-flags -fdevirtualize-at-ltrans
+
+ # Enabling full docs appears to break doc building. If not
+ # explicitly disabled, the flag will get auto-enabled if pandoc and
+ # graphviz are detected. pandoc has loads of dependencies anyway.
+
+ local myconf=(
+ --disable-ccache
+ --disable-precompiled-headers
+ --enable-full-docs=no
+ --with-boot-jdk="${JDK_HOME}"
+ --with-extra-cflags="${CFLAGS}"
+ --with-extra-cxxflags="${CXXFLAGS}"
+ --with-extra-ldflags="${LDFLAGS}"
+ --with-freetype="${XPAK_BOOTSTRAP:-system}"
+ --with-giflib="${XPAK_BOOTSTRAP:-system}"
+ --with-harfbuzz="${XPAK_BOOTSTRAP:-system}"
+ --with-lcms="${XPAK_BOOTSTRAP:-system}"
+ --with-libjpeg="${XPAK_BOOTSTRAP:-system}"
+ --with-libpng="${XPAK_BOOTSTRAP:-system}"
+ --with-native-debug-symbols=$(usex debug internal none)
+ --with-vendor-name="Gentoo"
+ --with-vendor-url="https://gentoo.org"
+ --with-vendor-bug-url="https://bugs.gentoo.org"
+ --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
+ --with-vendor-version-string="${PVR}"
+ --with-version-pre=""
+ --with-version-string="${PV%_p*}"
+ --with-version-build="${PV#*_p}"
+ --with-zlib="${XPAK_BOOTSTRAP:-system}"
+ --enable-dtrace=$(usex systemtap yes no)
+ --enable-headless-only=$(usex headless-awt yes no)
+ $(tc-is-clang && echo "--with-toolchain-type=clang")
+ )
+ ! use riscv && myconf+=( --with-jvm-features=shenandoahgc )
+
+ use lto && myconf+=( --with-jvm-features=link-time-opt )
+
+ if use javafx; then
+ # this is not useful for users, just for upstream developers
+ # build system compares mesa version in md file
+ # https://bugs.gentoo.org/822612
+ export LEGAL_EXCLUDES=mesa3d.md
+
+ local zip="${EPREFIX}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
+ if [[ -r ${zip} ]]; then
+ myconf+=( --with-import-modules="${zip}" )
+ else
+ die "${zip} not found or not readable"
+ fi
+ fi
+
+ if use !system-bootstrap ; then
+ addpredict /dev/random
+ addpredict /proc/self/coredump_filter
+ fi
+
+ (
+ unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS
+ CFLAGS= CXXFLAGS= LDFLAGS= \
+ CONFIG_SITE=/dev/null \
+ econf "${myconf[@]}"
+ )
+}
+
+src_compile() {
+ # Too brittle - gets confused by e.g. -Oline
+ export MAKEOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+ unset GNUMAKEFLAGS MAKEFLAGS
+
+ local myemakeargs=(
+ JOBS=$(makeopts_jobs)
+ LOG=debug
+ CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
+ NICE= # Use PORTAGE_NICENESS, don't adjust further down
+ $(usex doc docs '')
+ $(usex jbootstrap bootcycle-images product-images)
+ )
+ emake "${myemakeargs[@]}" -j1
+}
+
+src_install() {
+ local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+ local ddest="${ED}/${dest#/}"
+
+ cd "${S}"/build/*-release/images/jdk || die
+
+ # Create files used as storage for system preferences.
+ mkdir .systemPrefs || die
+ touch .systemPrefs/.system.lock || die
+ touch .systemPrefs/.systemRootModFile || die
+
+ # Oracle and IcedTea have libjsoundalsa.so depending on
+ # libasound.so.2 but OpenJDK only has libjsound.so. Weird.
+ if ! use alsa ; then
+ rm -v lib/libjsound.* || die
+ fi
+
+ if ! use examples ; then
+ rm -vr demo/ || die
+ fi
+
+ if ! use source ; then
+ rm -v lib/src.zip || die
+ fi
+
+ rm -v lib/security/cacerts || die
+
+ dodir "${dest}"
+ cp -pPR * "${ddest}" || die
+
+ dosym8 -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
+
+ # must be done before running itself
+ java-vm_set-pax-markings "${ddest}"
+
+ einfo "Creating the Class Data Sharing archives and disabling usage tracking"
+ "${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
+
+ java-vm_install-env "${FILESDIR}"/${PN}.env.sh
+ java-vm_revdep-mask
+ java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
+
+ if use doc ; then
+ docinto html
+ dodoc -r "${S}"/build/*-release/images/docs/*
+ dosym8 -r /usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
+ fi
+}
+
+pkg_postinst() {
+ java-vm-2_pkg_postinst
+}
diff --git a/dev-java/openjdk/openjdk-17.0.10_p7.ebuild b/dev-java/openjdk/openjdk-17.0.10_p7.ebuild
new file mode 100644
index 000000000000..2e4abb1bd319
--- /dev/null
+++ b/dev-java/openjdk/openjdk-17.0.10_p7.ebuild
@@ -0,0 +1,327 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
+
+# variable name format: <UPPERCASE_KEYWORD>_XPAK
+ARM64_XPAK="17.0.2_p8" # musl bootstrap install
+PPC64_XPAK="17.0.1_p12" # big-endian bootstrap tarball
+RISCV_XPAK="17.0.3_p7"
+X86_XPAK="17.0.1_p12"
+
+# Usage: bootstrap_uri <keyword> <version> [extracond]
+# Example: $(bootstrap_uri ppc64 17.0.1_p12 big-endian)
+# Output: ppc64? ( big-endian? ( https://...17.0.1_p12-ppc64.tar.xz ) )
+bootstrap_uri() {
+ local baseuri="https://dev.gentoo.org/~arthurzam/distfiles/dev-java/${PN}/${PN}-bootstrap"
+ local suff="tar.xz"
+ local kw="${1:?${FUNCNAME[0]}: keyword not specified}"
+ local ver="${2:?${FUNCNAME[0]}: version not specified}"
+ local cond="${3-}"
+ [[ ${cond} == elibc_musl* ]] && local musl=yes
+
+ # here be dragons
+ echo "${kw}? ( ${cond:+${cond}? (} ${baseuri}-${ver}-${kw}${musl:+-musl}.${suff} ${cond:+) })"
+}
+
+# don't change versioning scheme
+# to find correct _p number, look at
+# https://github.com/openjdk/jdk${SLOT}u/tags
+# you will see, for example, jdk-17.0.4.1-ga and jdk-17.0.4.1+1, both point
+# to exact same commit sha. we should always use the full version.
+# -ga tag is just for humans to easily identify General Availability release tag.
+MY_PV="${PV%_p*}-ga"
+SLOT="${MY_PV%%[.+]*}"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.org"
+SRC_URI="
+ https://github.com/${PN}/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz
+ -> ${P}.tar.gz
+ !system-bootstrap? (
+ $(bootstrap_uri arm64 ${ARM64_XPAK} elibc_musl)
+ $(bootstrap_uri ppc64 ${PPC64_XPAK} big-endian)
+ $(bootstrap_uri x86 ${X86_XPAK})
+ $(bootstrap_uri riscv ${RISCV_XPAK})
+ )
+ riscv? ( https://dev.gentoo.org/~gyakovlev/distfiles/dev-java/openjdk/java17-riscv64.patch )
+"
+# riscv patch origin:
+# https://raw.githubusercontent.com/felixonmars/archriscv-packages/master/java17-openjdk/java17-riscv64.patch
+
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+
+IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap lto selinux source system-bootstrap systemtap"
+
+REQUIRED_USE="
+ javafx? ( alsa !headless-awt )
+ !system-bootstrap? ( jbootstrap )
+"
+
+COMMON_DEPEND="
+ media-libs/freetype:2=
+ media-libs/giflib:0/7
+ media-libs/harfbuzz:=
+ media-libs/libpng:0=
+ media-libs/lcms:2=
+ sys-libs/zlib
+ media-libs/libjpeg-turbo:0=
+ systemtap? ( dev-debug/systemtap )
+"
+
+# Many libs are required to build, but not to run, make is possible to remove
+# by listing conditionally in RDEPEND unconditionally in DEPEND
+RDEPEND="
+ ${COMMON_DEPEND}
+ >=sys-apps/baselayout-java-0.1.0-r1
+ !headless-awt? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ )
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ selinux? ( sec-policy/selinux-java )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ app-arch/zip
+ media-libs/alsa-lib
+ net-print/cups
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ javafx? ( dev-java/openjfx:${SLOT}= )
+ system-bootstrap? (
+ || (
+ dev-java/openjdk-bin:${SLOT}
+ dev-java/openjdk:${SLOT}
+ )
+ )
+"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV//+/-}"
+
+# The space required to build varies wildly depending on USE flags,
+# ranging from 2GB to 16GB. This function is certainly not exact but
+# should be close enough to be useful.
+openjdk_check_requirements() {
+ local M
+ M=2048
+ M=$(( $(usex jbootstrap 2 1) * $M ))
+ M=$(( $(usex debug 3 1) * $M ))
+ M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M ))
+
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ openjdk_check_requirements
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876"
+ fi
+}
+
+pkg_setup() {
+ openjdk_check_requirements
+ java-vm-2_pkg_setup
+
+ [[ ${MERGE_TYPE} == "binary" ]] && return
+
+ JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}"
+ JAVA_PKG_WANT_SOURCE="${SLOT}"
+ JAVA_PKG_WANT_TARGET="${SLOT}"
+
+ # The nastiness below is necessary while the gentoo-vm USE flag is
+ # masked. First we call java-pkg-2_pkg_setup if it looks like the
+ # flag was unmasked against one of the possible build VMs. If not,
+ # we try finding one of them in their expected locations. This would
+ # have been slightly less messy if openjdk-bin had been installed to
+ # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env
+ # file but disable it so that it would not normally be selectable.
+
+ local vm
+ for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
+ if [[ -d ${BROOT}/usr/lib/jvm/${vm} ]]; then
+ java-pkg-2_pkg_setup
+ return
+ fi
+ done
+}
+
+src_prepare() {
+ use riscv && eapply "${DISTDIR}"/java17-riscv64.patch
+ default
+ chmod +x configure || die
+}
+
+src_configure() {
+ if has_version dev-java/openjdk:${SLOT}; then
+ export JDK_HOME=${BROOT}/usr/$(get_libdir)/openjdk-${SLOT}
+ elif use !system-bootstrap ; then
+ local xpakvar="${ARCH^^}_XPAK"
+ export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}"
+ else
+ JDK_HOME=$(best_version -b dev-java/openjdk-bin:${SLOT})
+ [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
+ JDK_HOME=${JDK_HOME#*/}
+ JDK_HOME=${BROOT}/opt/${JDK_HOME%-r*}
+ export JDK_HOME
+ fi
+
+ # Work around stack alignment issue, bug #647954. in case we ever have x86
+ use x86 && append-flags -mincoming-stack-boundary=2
+
+ # bug 906987; append-cppflags doesnt work
+ use elibc_musl && append-flags -D_LARGEFILE64_SOURCE
+
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
+
+ # Strip lto related flags, we rely on USE=lto and --with-jvm-features=link-time-opt
+ # https://bugs.gentoo.org/833097
+ # https://bugs.gentoo.org/833098
+ filter-lto
+ filter-flags -fdevirtualize-at-ltrans
+
+ # Enabling full docs appears to break doc building. If not
+ # explicitly disabled, the flag will get auto-enabled if pandoc and
+ # graphviz are detected. pandoc has loads of dependencies anyway.
+
+ local myconf=(
+ --disable-ccache
+ --disable-precompiled-headers
+ --disable-warnings-as-errors
+ --enable-full-docs=no
+ --with-boot-jdk="${JDK_HOME}"
+ --with-extra-cflags="${CFLAGS}"
+ --with-extra-cxxflags="${CXXFLAGS}"
+ --with-extra-ldflags="${LDFLAGS}"
+ --with-freetype="${XPAK_BOOTSTRAP:-system}"
+ --with-giflib="${XPAK_BOOTSTRAP:-system}"
+ --with-harfbuzz="${XPAK_BOOTSTRAP:-system}"
+ --with-lcms="${XPAK_BOOTSTRAP:-system}"
+ --with-libjpeg="${XPAK_BOOTSTRAP:-system}"
+ --with-libpng="${XPAK_BOOTSTRAP:-system}"
+ --with-native-debug-symbols=$(usex debug internal none)
+ --with-vendor-name="Gentoo"
+ --with-vendor-url="https://gentoo.org"
+ --with-vendor-bug-url="https://bugs.gentoo.org"
+ --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
+ --with-vendor-version-string="${PVR}"
+ --with-version-pre=""
+ --with-version-string="${PV%_p*}"
+ --with-version-build="${PV#*_p}"
+ --with-zlib="${XPAK_BOOTSTRAP:-system}"
+ --enable-jvm-feature-dtrace=$(usex systemtap yes no)
+ --enable-headless-only=$(usex headless-awt yes no)
+ $(tc-is-clang && echo "--with-toolchain-type=clang")
+ )
+
+ use riscv && myconf+=( --with-boot-jdk-jvmargs="-Djdk.lang.Process.launchMechanism=vfork" )
+
+ use lto && myconf+=( --with-jvm-features=link-time-opt )
+
+ if use javafx; then
+ local zip="${EPREFIX}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
+ if [[ -r ${zip} ]]; then
+ myconf+=( --with-import-modules="${zip}" )
+ else
+ die "${zip} not found or not readable"
+ fi
+ fi
+
+ if use !system-bootstrap ; then
+ addpredict /dev/random
+ addpredict /proc/self/coredump_filter
+ fi
+
+ (
+ unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS
+ CFLAGS= CXXFLAGS= LDFLAGS= \
+ CONFIG_SITE=/dev/null \
+ econf "${myconf[@]}"
+ )
+}
+
+src_compile() {
+ # Too brittle - gets confused by e.g. -Oline
+ export MAKEOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+ unset GNUMAKEFLAGS MAKEFLAGS
+
+ local myemakeargs=(
+ JOBS=$(makeopts_jobs)
+ LOG=debug
+ CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
+ NICE= # Use PORTAGE_NICENESS, don't adjust further down
+ $(usex doc docs '')
+ $(usex jbootstrap bootcycle-images product-images)
+ )
+ emake "${myemakeargs[@]}" -j1
+}
+
+src_install() {
+ local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+ local ddest="${ED}/${dest#/}"
+
+ cd "${S}"/build/*-release/images/jdk || die
+
+ # Create files used as storage for system preferences.
+ mkdir .systemPrefs || die
+ touch .systemPrefs/.system.lock || die
+ touch .systemPrefs/.systemRootModFile || die
+
+ # Oracle and IcedTea have libjsoundalsa.so depending on
+ # libasound.so.2 but OpenJDK only has libjsound.so. Weird.
+ if ! use alsa ; then
+ rm -v lib/libjsound.* || die
+ fi
+
+ if ! use examples ; then
+ rm -vr demo/ || die
+ fi
+
+ if ! use source ; then
+ rm -v lib/src.zip || die
+ fi
+
+ rm -v lib/security/cacerts || die
+
+ dodir "${dest}"
+ cp -pPR * "${ddest}" || die
+
+ dosym8 -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
+
+ # must be done before running itself
+ java-vm_set-pax-markings "${ddest}"
+
+ einfo "Creating the Class Data Sharing archives and disabling usage tracking"
+ "${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
+
+ java-vm_install-env "${FILESDIR}"/${PN}.env.sh
+ java-vm_revdep-mask
+ java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
+
+ if use doc ; then
+ docinto html
+ dodoc -r "${S}"/build/*-release/images/docs/*
+ dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
+ fi
+}
+
+pkg_postinst() {
+ java-vm-2_pkg_postinst
+}
diff --git a/dev-java/openjdk/openjdk-17.0.8.1_p1.ebuild b/dev-java/openjdk/openjdk-17.0.8.1_p1.ebuild
index b7024ebb2a6b..715fd2f4e5e5 100644
--- a/dev-java/openjdk/openjdk-17.0.8.1_p1.ebuild
+++ b/dev-java/openjdk/openjdk-17.0.8.1_p1.ebuild
@@ -273,7 +273,7 @@ src_compile() {
$(usex doc docs '')
$(usex jbootstrap bootcycle-images product-images)
)
- emake "${myemakeargs[@]}" -j1 #nowarn
+ emake "${myemakeargs[@]}" -j1
}
src_install() {
diff --git a/dev-java/openjdk/openjdk-21.0.1_p12.ebuild b/dev-java/openjdk/openjdk-21.0.1_p12.ebuild
index 7ba18116be89..8a14694848ca 100644
--- a/dev-java/openjdk/openjdk-21.0.1_p12.ebuild
+++ b/dev-java/openjdk/openjdk-21.0.1_p12.ebuild
@@ -266,7 +266,7 @@ src_compile() {
$(usex doc docs '')
$(usex jbootstrap bootcycle-images product-images)
)
- emake "${myemakeargs[@]}" -j1 #nowarn
+ emake "${myemakeargs[@]}" -j1
}
src_install() {
diff --git a/dev-java/openjdk/openjdk-21.0.2_p13.ebuild b/dev-java/openjdk/openjdk-21.0.2_p13.ebuild
new file mode 100644
index 000000000000..9da45c9869b2
--- /dev/null
+++ b/dev-java/openjdk/openjdk-21.0.2_p13.ebuild
@@ -0,0 +1,320 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
+
+# variable name format: <UPPERCASE_KEYWORD>_XPAK
+PPC64_XPAK="21.0.0_p35" # big-endian bootstrap tarball
+X86_XPAK="21.0.0_p35"
+
+# Usage: bootstrap_uri <keyword> <version> [extracond]
+# Example: $(bootstrap_uri ppc64 17.0.1_p12 big-endian)
+# Output: ppc64? ( big-endian? ( https://...17.0.1_p12-ppc64.tar.xz ) )
+bootstrap_uri() {
+ local baseuri="https://dev.gentoo.org/~arthurzam/distfiles/dev-java/${PN}/${PN}-bootstrap"
+ local suff="tar.xz"
+ local kw="${1:?${FUNCNAME[0]}: keyword not specified}"
+ local ver="${2:?${FUNCNAME[0]}: version not specified}"
+ local cond="${3-}"
+ [[ ${cond} == elibc_musl* ]] && local musl=yes
+
+ # here be dragons
+ echo "${kw}? ( ${cond:+${cond}? (} ${baseuri}-${ver}-${kw}${musl:+-musl}.${suff} ${cond:+) })"
+}
+
+# don't change versioning scheme
+# to find correct _p number, look at
+# https://github.com/openjdk/jdk${SLOT}u/tags
+# you will see, for example, jdk-17.0.4.1-ga and jdk-17.0.4.1+1, both point
+# to exact same commit sha. we should always use the full version.
+# -ga tag is just for humans to easily identify General Availability release tag.
+MY_PV="${PV%_p*}-ga"
+SLOT="${MY_PV%%[.+]*}"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.org"
+SRC_URI="
+ https://github.com/${PN}/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz
+ -> ${P}.tar.gz
+ !system-bootstrap? (
+ $(bootstrap_uri ppc64 ${PPC64_XPAK} big-endian)
+ $(bootstrap_uri x86 ${X86_XPAK})
+ )
+"
+
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap lto selinux source +system-bootstrap systemtap"
+
+REQUIRED_USE="
+ javafx? ( alsa !headless-awt )
+ !system-bootstrap? ( jbootstrap )
+ !system-bootstrap? ( || ( ppc64 x86 ) )
+"
+
+COMMON_DEPEND="
+ media-libs/freetype:2=
+ media-libs/giflib:0/7
+ media-libs/harfbuzz:=
+ media-libs/libpng:0=
+ media-libs/lcms:2=
+ sys-libs/zlib
+ media-libs/libjpeg-turbo:0=
+ systemtap? ( dev-debug/systemtap )
+"
+
+# Many libs are required to build, but not to run, make is possible to remove
+# by listing conditionally in RDEPEND unconditionally in DEPEND
+RDEPEND="
+ ${COMMON_DEPEND}
+ >=sys-apps/baselayout-java-0.1.0-r1
+ !headless-awt? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ )
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ selinux? ( sec-policy/selinux-java )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ app-arch/zip
+ media-libs/alsa-lib
+ net-print/cups
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ javafx? ( dev-java/openjfx:${SLOT}= )
+ system-bootstrap? (
+ || (
+ dev-java/openjdk-bin:${SLOT}
+ dev-java/openjdk:${SLOT}
+ )
+ )
+"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV//+/-}"
+
+# The space required to build varies wildly depending on USE flags,
+# ranging from 2GB to 16GB. This function is certainly not exact but
+# should be close enough to be useful.
+openjdk_check_requirements() {
+ local M
+ M=2048
+ M=$(( $(usex jbootstrap 2 1) * $M ))
+ M=$(( $(usex debug 3 1) * $M ))
+ M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M ))
+
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ openjdk_check_requirements
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876"
+ fi
+}
+
+pkg_setup() {
+ openjdk_check_requirements
+ java-vm-2_pkg_setup
+
+ [[ ${MERGE_TYPE} == "binary" ]] && return
+
+ JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}"
+ JAVA_PKG_WANT_SOURCE="${SLOT}"
+ JAVA_PKG_WANT_TARGET="${SLOT}"
+
+ # The nastiness below is necessary while the gentoo-vm USE flag is
+ # masked. First we call java-pkg-2_pkg_setup if it looks like the
+ # flag was unmasked against one of the possible build VMs. If not,
+ # we try finding one of them in their expected locations. This would
+ # have been slightly less messy if openjdk-bin had been installed to
+ # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env
+ # file but disable it so that it would not normally be selectable.
+
+ local vm
+ for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
+ if [[ -d ${BROOT}/usr/lib/jvm/${vm} ]]; then
+ java-pkg-2_pkg_setup
+ return
+ fi
+ done
+}
+
+src_prepare() {
+ default
+ chmod +x configure || die
+}
+
+src_configure() {
+ if has_version dev-java/openjdk:${SLOT}; then
+ export JDK_HOME=${BROOT}/usr/$(get_libdir)/openjdk-${SLOT}
+ elif use !system-bootstrap ; then
+ local xpakvar="${ARCH^^}_XPAK"
+ export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}"
+ else
+ JDK_HOME=$(best_version -b dev-java/openjdk-bin:${SLOT})
+ [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
+ JDK_HOME=${JDK_HOME#*/}
+ JDK_HOME=${BROOT}/opt/${JDK_HOME%-r*}
+ export JDK_HOME
+ fi
+
+ # Work around stack alignment issue, bug #647954. in case we ever have x86
+ use x86 && append-flags -mincoming-stack-boundary=2
+
+ # bug 906987; append-cppflags doesnt work
+ use elibc_musl && append-flags -D_LARGEFILE64_SOURCE
+
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
+
+ # Strip lto related flags, we rely on USE=lto and --with-jvm-features=link-time-opt
+ # https://bugs.gentoo.org/833097
+ # https://bugs.gentoo.org/833098
+ filter-lto
+ filter-flags -fdevirtualize-at-ltrans
+
+ # Enabling full docs appears to break doc building. If not
+ # explicitly disabled, the flag will get auto-enabled if pandoc and
+ # graphviz are detected. pandoc has loads of dependencies anyway.
+
+ local myconf=(
+ --disable-ccache
+ --disable-precompiled-headers
+ --disable-warnings-as-errors
+ --enable-full-docs=no
+ --with-boot-jdk="${JDK_HOME}"
+ --with-extra-cflags="${CFLAGS}"
+ --with-extra-cxxflags="${CXXFLAGS}"
+ --with-extra-ldflags="${LDFLAGS}"
+ --with-freetype="${XPAK_BOOTSTRAP:-system}"
+ --with-giflib="${XPAK_BOOTSTRAP:-system}"
+ --with-harfbuzz="${XPAK_BOOTSTRAP:-system}"
+ --with-lcms="${XPAK_BOOTSTRAP:-system}"
+ --with-libjpeg="${XPAK_BOOTSTRAP:-system}"
+ --with-libpng="${XPAK_BOOTSTRAP:-system}"
+ --with-native-debug-symbols=$(usex debug internal none)
+ --with-vendor-name="Gentoo"
+ --with-vendor-url="https://gentoo.org"
+ --with-vendor-bug-url="https://bugs.gentoo.org"
+ --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
+ --with-vendor-version-string="${PVR}"
+ --with-version-pre=""
+ --with-version-string="${PV%_p*}"
+ --with-version-build="${PV#*_p}"
+ --with-zlib="${XPAK_BOOTSTRAP:-system}"
+ --enable-jvm-feature-dtrace=$(usex systemtap yes no)
+ --enable-headless-only=$(usex headless-awt yes no)
+ $(tc-is-clang && echo "--with-toolchain-type=clang")
+ )
+
+ use riscv && myconf+=( --with-boot-jdk-jvmargs="-Djdk.lang.Process.launchMechanism=vfork" )
+
+ use lto && myconf+=( --with-jvm-features=link-time-opt )
+
+ if use javafx; then
+ local zip="${EPREFIX}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
+ if [[ -r ${zip} ]]; then
+ myconf+=( --with-import-modules="${zip}" )
+ else
+ die "${zip} not found or not readable"
+ fi
+ fi
+
+ if use !system-bootstrap ; then
+ addpredict /dev/random
+ addpredict /proc/self/coredump_filter
+ fi
+
+ (
+ unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS
+ CFLAGS= CXXFLAGS= LDFLAGS= \
+ CONFIG_SITE=/dev/null \
+ econf "${myconf[@]}"
+ )
+}
+
+src_compile() {
+ # Too brittle - gets confused by e.g. -Oline
+ export MAKEOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+ unset GNUMAKEFLAGS MAKEFLAGS
+
+ local myemakeargs=(
+ JOBS=$(makeopts_jobs)
+ LOG=debug
+ CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
+ NICE= # Use PORTAGE_NICENESS, don't adjust further down
+ $(usex doc docs '')
+ $(usex jbootstrap bootcycle-images product-images)
+ )
+ emake "${myemakeargs[@]}" -j1
+}
+
+src_install() {
+ local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+ local ddest="${ED}/${dest#/}"
+
+ cd "${S}"/build/*-release/images/jdk || die
+
+ # Create files used as storage for system preferences.
+ mkdir .systemPrefs || die
+ touch .systemPrefs/.system.lock || die
+ touch .systemPrefs/.systemRootModFile || die
+
+ # Oracle and IcedTea have libjsoundalsa.so depending on
+ # libasound.so.2 but OpenJDK only has libjsound.so. Weird.
+ if ! use alsa ; then
+ rm -v lib/libjsound.* || die
+ fi
+
+ if ! use examples ; then
+ rm -vr demo/ || die
+ fi
+
+ if ! use source ; then
+ rm -v lib/src.zip || die
+ fi
+
+ rm -v lib/security/cacerts || die
+
+ dodir "${dest}"
+ cp -pPR * "${ddest}" || die
+
+ dosym8 -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
+
+ # must be done before running itself
+ java-vm_set-pax-markings "${ddest}"
+
+ einfo "Creating the Class Data Sharing archives and disabling usage tracking"
+ "${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
+
+ java-vm_install-env "${FILESDIR}"/${PN}.env.sh
+ java-vm_revdep-mask
+ java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
+
+ if use doc ; then
+ docinto html
+ dodoc -r "${S}"/build/*-release/images/docs/*
+ dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
+ fi
+}
+
+pkg_postinst() {
+ java-vm-2_pkg_postinst
+}
diff --git a/dev-java/openjdk/openjdk-8.382_p05-r2.ebuild b/dev-java/openjdk/openjdk-8.382_p05-r2.ebuild
index a0f00644cae2..bc55f5f3948c 100644
--- a/dev-java/openjdk/openjdk-8.382_p05-r2.ebuild
+++ b/dev-java/openjdk/openjdk-8.382_p05-r2.ebuild
@@ -189,7 +189,7 @@ src_compile() {
$(usex doc docs '')
$(usex jbootstrap bootcycle-images images)
)
- emake "${myemakeargs[@]}" -j1 #nowarn
+ emake "${myemakeargs[@]}" -j1
}
src_install() {
diff --git a/dev-java/openjdk/openjdk-8.402_p06.ebuild b/dev-java/openjdk/openjdk-8.402_p06.ebuild
new file mode 100644
index 000000000000..d597a7255843
--- /dev/null
+++ b/dev-java/openjdk/openjdk-8.402_p06.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
+
+# don't change versioning scheme
+# to find correct _p number, look at
+# https://github.com/openjdk/jdk${SLOT}u/tags
+# you will see, for example, jdk-17.0.4.1-ga and jdk-17.0.4.1+1, both point
+# to exact same commit sha. we should always use the full version.
+# -ga tag is just for humans to easily identify General Availability release tag.
+# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to
+# set build version properly
+MY_PV="$(ver_rs 1 'u' 2 '-' ${PV%_p*}-ga)"
+SLOT="${PV%%[.+]*}"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.org"
+SRC_URI="https://github.com/openjdk/jdk${SLOT}u/archive/refs/tags/jdk${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~amd64 arm64 ppc64 ~x86"
+IUSE="alsa debug cups doc examples headless-awt javafx +jbootstrap selinux source"
+
+COMMON_DEPEND="
+ media-libs/freetype:2=
+ media-libs/giflib:0/7
+ sys-libs/zlib
+"
+# Many libs are required to build, but not to run, make is possible to remove
+# by listing conditionally in RDEPEND unconditionally in DEPEND
+RDEPEND="
+ ${COMMON_DEPEND}
+ >=sys-apps/baselayout-java-0.1.0-r1
+ !headless-awt? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ )
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ selinux? ( sec-policy/selinux-java )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ app-arch/zip
+ media-libs/alsa-lib
+ net-print/cups
+ virtual/pkgconfig
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ || (
+ dev-java/openjdk-bin:${SLOT}
+ dev-java/icedtea-bin:${SLOT}
+ dev-java/openjdk:${SLOT}
+ )
+"
+
+BDEPEND="
+ virtual/pkgconfig
+"
+
+PDEPEND="javafx? ( dev-java/openjfx:${SLOT} )"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}/openjdk-8-insantiate-arrayallocator.patch"
+ "${FILESDIR}/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch"
+ "${FILESDIR}/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch"
+ "${FILESDIR}/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch"
+ "${FILESDIR}/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch"
+)
+
+# The space required to build varies wildly depending on USE flags,
+# ranging from 2GB to 16GB. This function is certainly not exact but
+# should be close enough to be useful.
+openjdk_check_requirements() {
+ local M
+ M=2048
+ M=$(( $(usex debug 3 1) * $M ))
+ M=$(( $(usex jbootstrap 2 1) * $M ))
+ M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M ))
+
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ openjdk_check_requirements
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876"
+ fi
+}
+
+pkg_setup() {
+ openjdk_check_requirements
+
+ JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}"
+ JAVA_PKG_WANT_SOURCE="${SLOT}"
+ JAVA_PKG_WANT_TARGET="${SLOT}"
+
+ java-vm-2_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # new warnings in new gcc https://bugs.gentoo.org/685426
+ sed -i '/^WARNINGS_ARE_ERRORS/ s/-Werror/-Wno-error/' \
+ hotspot/make/linux/makefiles/gcc.make || die
+
+ chmod +x configure || die
+}
+
+src_configure() {
+ # general build info found here:
+ # https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
+
+ # -Wregister use (bug #918655)
+ append-cxxflags -std=gnu++14
+
+ # Work around stack alignment issue, bug #647954.
+ use x86 && append-flags -mincoming-stack-boundary=2
+
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
+
+ # Strip lto related flags, no support in this version.
+ # https://bugs.gentoo.org/833097
+ # https://bugs.gentoo.org/833098
+ filter-lto
+ filter-flags -fdevirtualize-at-ltrans
+
+ tc-export_build_env CC CXX PKG_CONFIG STRIP
+
+ local myconf=(
+ --disable-ccache
+ --disable-freetype-bundling
+ --disable-precompiled-headers
+ --enable-unlimited-crypto
+ --with-boot-jdk="${JDK_HOME}"
+ --with-extra-cflags="${CFLAGS}"
+ --with-extra-cxxflags="${CXXFLAGS}"
+ --with-extra-ldflags="${LDFLAGS}"
+ --with-freetype-lib="$( $(tc-getPKG_CONFIG) --variable=libdir freetype2 )"
+ --with-freetype-include="$( $(tc-getPKG_CONFIG) --variable=includedir freetype2)/freetype2"
+ --with-giflib=system
+ --with-jtreg=no
+ --with-jobs=1
+ --with-num-cores=1
+ --with-update-version="$(ver_cut 2)"
+ --with-build-number="b$(ver_cut 4)"
+ --with-milestone="fcs" # magic variable that means "release version"
+ --with-vendor-name="Gentoo"
+ --with-vendor-url="https://gentoo.org"
+ --with-vendor-bug-url="https://bugs.gentoo.org"
+ --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
+ --with-zlib=system
+ --with-native-debug-symbols=$(usex debug internal none)
+ $(usex headless-awt --disable-headful '')
+ $(tc-is-clang && echo "--with-toolchain-type=clang")
+ )
+
+ (
+ unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC MAKE XARGS
+ CFLAGS= CXXFLAGS= LDFLAGS= \
+ CONFIG_SITE=/dev/null \
+ CONFIG_SHELL="${BROOT}/bin/bash"
+ econf "${myconf[@]}"
+ )
+}
+
+src_compile() {
+ # Too brittle - gets confused by e.g. -Oline
+ export MAKEOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+ unset GNUMAKEFLAGS MAKEFLAGS
+
+ local myemakeargs=(
+ JOBS=$(makeopts_jobs)
+ LOG=debug
+ CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
+ NICE= # Use PORTAGE_NICENESS, don't adjust further down
+ $(usex doc docs '')
+ $(usex jbootstrap bootcycle-images images)
+ )
+ emake "${myemakeargs[@]}" -j1
+}
+
+src_install() {
+ local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+ local ddest="${ED}/${dest#/}"
+
+ cd "${S}"/build/*-release/images/j2sdk-image || die
+
+ if ! use alsa; then
+ rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die
+ fi
+
+ # build system does not remove that
+ if use headless-awt ; then
+ rm -fvr jre/lib/$(get_system_arch)/lib*{[jx]awt,splashscreen}* \
+ {,jre/}bin/policytool bin/appletviewer || die
+ fi
+
+ if ! use examples ; then
+ rm -vr demo/ || die
+ fi
+
+ if ! use source ; then
+ rm -v src.zip || die
+ fi
+
+ dodir "${dest}"
+ cp -pPR * "${ddest}" || die
+
+ dosym8 -r /etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts
+
+ java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
+ java-vm_set-pax-markings "${ddest}"
+ java-vm_revdep-mask
+ java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
+
+ if use doc ; then
+ docinto html
+ dodoc -r "${S}"/build/*-release/docs/*
+ fi
+}
+
+pkg_postinst() {
+ java-vm-2_pkg_postinst
+ einfo "JavaWebStart functionality provided by icedtea-web package"
+}