commit: 4c8db9a4950f76ee1640cf1f3900d884fc1cc80b Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr> AuthorDate: Mon Dec 1 13:42:17 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Dec 2 12:51:56 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c8db9a4
app-i18n/mozc: add 2.32.5994.102 few changes to facilitate the update backport a patch to fix a build failure Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr> Part-of: https://github.com/gentoo/gentoo/pull/44850 Closes: https://github.com/gentoo/gentoo/pull/44850 Signed-off-by: Sam James <sam <AT> gentoo.org> app-i18n/mozc/Manifest | 29 ++ ...ozc-2.32.5994.102-bazel_patch-fix_shebang.patch | 13 + .../mozc-2.32.5994.102-rm_reinterpret_cast.patch | 362 +++++++++++++++++ app-i18n/mozc/mozc-2.32.5994.102.ebuild | 435 +++++++++++++++++++++ 4 files changed, 839 insertions(+) diff --git a/app-i18n/mozc/Manifest b/app-i18n/mozc/Manifest index e37158933444..b8345eebde33 100644 --- a/app-i18n/mozc/Manifest +++ b/app-i18n/mozc/Manifest @@ -1,13 +1,22 @@ DIST abseil-cpp-20250127.0.tar.gz 2267275 BLAKE2B 70fa05a0db91b9e7ccf9f2828a7bf4b7fe6d7177b5f2d17b2f2f6f2a5e83289674d624fa7983410713a2d62b1025a5b5d957f1ba11e01cb727fc771ce76bc914 SHA512 2a021faad807ee3e23548716ffa4785dc2409edbb4be676cc4bc01d47885760de340f0a4afdcbf0aaa835affd6d78f7bc319bbf7d337dbc30e7a559d0088e4bd +DIST abseil-cpp-20250814.0.tar.gz 2235497 BLAKE2B f60f3604215f64f33fad902637360050061ec62cfa6413cafc4cd3794a1898c7ee67f7b6edf78e5cb7c6b0ed86b8d80338ad4abee3f2664e391c2cfae5997220 SHA512 4ee1a217203933382e728d354a149253a517150eee7580a0abecc69584b2eb200d91933ef424487e3a3fe0e8ab5e77b0288485cac982171b3585314a4417e7d4 DIST apple_support.1.16.0.tar.gz 86001 BLAKE2B 808539ad8ade84d1bed93654c25a41878bf75485cc4404a21ca9286eadb842cc37360aa85632d1c16ef176b32e2853f372124b266354961ffe5060afb0101311 SHA512 93281a271103dfc860e11bb1c8f72d3d3aeb129f3d4bfed8acc6b99fc1727f820fc0c7feaa336c03e5b935c5c39296c361cbc3abd58756a420d518dc1cb4808f +DIST apple_support.1.23.1.tar.gz 105227 BLAKE2B c8228fadf527ff4f091082bf71e3c5cf0859aa573b25927dad58c1531bef89334b05cff822d918ce459127c915e267c52448c3f4979812f1fe33f3b0cc6d180a SHA512 60991d408dc073245ab1ae407286e30a6e1390063546d9d6017aa2d395443dfb924b60a5553b930aa7b5ce549200e90354135dabda3ce397232ee300331f1ee8 DIST bazel-8.1.1-linux-arm64 60105888 BLAKE2B 5da13dafdff092d9d1846aae2c3cad0dca0dbf6b4cd1e1108beb6c1559cc87fb362b2ee04ce6af37e5dc2b1bcf49a42f164b7f57b0f614eb5654382907708825 SHA512 ec6efe3bdd59ea5ca918854c19d7b85bc6ae71c0b8291106618785213cdddf48ca6fc4056e51336e07fe221fa53c57c7cb0fdcd2c5d72240526c50447847af73 DIST bazel-8.1.1-linux-x86_64 61797304 BLAKE2B 54c0bea5572bc7a13435e89dc30ad291bf37801d38a65110c708d9b0e0942e60d28d4b64a9df6e5253e50affeedda45ee313643c674f8c1a7f3d06db60ab01db SHA512 9133ce3d0de0cc1f1d48fbf43e9b37a38bfdd025786ce223c2cd0b7be7d8034c5cb66f482946300f657fecfe3f1b90de14233b9296f9840a34d97a4241caeeca +DIST bazel-8.4.1-linux-arm64 62234235 BLAKE2B ad2faf33e4ca4f908ca01c6a415f4acf7f66d8f6c3bc880ff0c52300be8d02b84aedc55d6b476afb69a5b966008f73b58ed83f2a8f6560431e5acab49e3a9f9f SHA512 7462a0aa03c604e2fde7b8412cbd61262c2f3f0867468305c88d9421fc759d0b0bf5499334e0cedd44940522514f77ee76ff1706a64ee9ebe0de1fa1c9586f03 +DIST bazel-8.4.1-linux-x86_64 64058509 BLAKE2B 50e67de8a5c63f41831a52d5429913185939d6194d0b50d475c554f04c4bc64b4d4ed5e9612a76b4f693d479a58b6e66f46b94f2b2557f24ab4d72c41e4b664c SHA512 175f66a4666daab0efeba54a81ab67e4af4d4e3040c6c35cbfce5cc05b7c4ee04fcb9971d80cf62dc36c22c1908f991391785f9b3c08acecaefdacdba4fe060b DIST bazel-skylib-1.7.1.tar.gz 43566 BLAKE2B 2bafd7dc9aed2852227b1ec2fed91767461d8133338794e4633041263bd3ea1a6ad3665f4723237ba32d9f18ef670efd73f14c8cb273abc1e02846a0f3428e79 SHA512 cb786ab69e288d789ab056e41c663662d6f42c619f3464869f016b01eacd912f730d49fec986dfdd61c630167a697b52c74c4eebc70e69cce4369087aea62ef9 +DIST bazel-skylib-1.8.1.tar.gz 44537 BLAKE2B dd3b506ceb5e3a72636d9071f13e706f229a8012f9e97575f9dd51f1f3e766c64e7509039404c63570c9971592a19239ce2dab1b0db33c9403a404c141bb7d81 SHA512 519623c2ddce5606ffd101108667ca82b12a53da8c6f01d176b61339dae383b747ae4a6a96584e56b4ee6b1a57167813ee29ccae9736202907b8f3c401458d4f DIST bazel_features-v1.21.0.tar.gz 15880 BLAKE2B dfdba846d9411f0779f6170775d81b1fa34f3f71a094535745f3c132e406e96050a54248f514356e3b0ed979e789aab923c43751023771330c8f43bcce009be5 SHA512 0cd72b38335acf00f203446ee4618aad2d4bcb9df7059ea7196261a42b988b4d63a5ce6eac70fda49f0ecc3058e0f75ed277e3d40991d82b55c4556028ed95bc +DIST bazel_features-v1.30.0.tar.gz 16826 BLAKE2B 725739189337b9a4a014d972c9a63ca89c6899ec8fb8773cb7fee1787e3a20042691d700a393d60362e009dd1e3f0fd7c26f6aa13f39b162a900b170ea8b86e6 SHA512 9cca730483639e6b711c1e48d8d916839d5c618eda0b07ccb965184e79326ac6fcecc1446c61efcb4f7bb76b557e291cd2666b90e280dc8a4a76e1f9c09f1bb2 DIST cpython-3.11.10+20241016-aarch64-unknown-linux-gnu-install_only.tar.gz 25925656 BLAKE2B aa9c3df9c853b80a0e74ce5c3522e7f4c380a5409de521650dbd5ead81659040cfb77271dee4c5079905f742d33410c86193e9a97283b8e1b76b11fb7533943c SHA512 2317beda197edfd671690018069cd404bcf745e1156c79cddad36973117905ec50a67a668060e2fda02615561f824646fd4df5010cf06688d6160c2ad891863c DIST cpython-3.11.10+20241016-x86_64-unknown-linux-gnu-install_only.tar.gz 29718798 BLAKE2B cc5c8c49bc58dee4562438ca22d0cf91540942e6f6525d581077e7e447d428b6cd0d846ebf38367c0c47b9886bfd96da868a3f09845f2d0e1164932d249fa37d SHA512 0249257a1c50e58cfddd76bfc89a437e02fdae367c3949a9fb678bb9314f149d0c7e3c257a8c0db33d68008315f8ccd0da2aba47f583e19c8ce6c403771ec14a +DIST cpython-3.11.13+20250610-aarch64-unknown-linux-gnu-install_only.tar.gz 40970497 BLAKE2B e86c0988d8f60a836e569060402b80ebdc39b81c2de5e099299369a6b7466f61e1de03cd32c414631419e7c4da3e21842fff596a8c1148c209e1420417e5859f SHA512 1dae1385e6bf5009cf16d7cde8e25c214036183a62f59f0f390c6c36421fb25343bbd4241ee15cbd545a0c116a1a55087993230a92a69de9de9bf1f72a5cfc34 +DIST cpython-3.11.13+20250610-x86_64-unknown-linux-gnu-install_only.tar.gz 48611228 BLAKE2B 8ea831fe64cb31eed977e1a1ff65d318e335c0cc7eddf8f0fffbe75ac349f417b137fd3b318795f7225de5009d915cfcbb6c855cb1d85be0c44fb48b08bc8d8e SHA512 c4aa3a09324abcbc1a2d9aa6a6278645d74af63cad76666224e53c50620450fb686c067db0f799afe84fefe575e0b2bea13b1b952f55e7e075562194b8e5ac43 DIST fcitx-mozc-2.28.5029.102-2.28.5029.102.tar.gz 37246575 BLAKE2B 54381968e33870f2d9f769184cf49428548d04de66e767140c8f053fad7873f1b2e3b02be81ce54e51b824d2c9cd971da37bff8b60efe60c9e2c748ff298afbd SHA512 4962e9505b79d4680a260c257719ba2486a6fe127018298758728faa9535504bc2dd6b1bfb430ac2982cb377cda52c145430531afd0968f49f91d366fdd43d92 DIST googletest-1.15.2.tar.gz 872667 BLAKE2B 2525d7a8572364cc2c2c129197201fc31e3cb4aadf4be37a995447a9b8e393205628e666dd190dca9a169b693883a5a2a5cafd6432cc3d1263a0c834ff8cf121 SHA512 9046841044a2bf7edfd96854ad9c44ffae4fcb9fb59a075b367507c0762a98eb32cb6968d46663228272e26321e96f4dd287c95baa22c6af9bad902b8b6ede4e +DIST googletest-1.17.0.tar.gz 885595 BLAKE2B 194df0cbe44905b9748c3df75ce3e91f0b11d766c845a11a9b86bb65249d21448b6eac1c2ea9fc3c189105f173d2330af5d0622b051f712dbf661ba5917bc96b SHA512 0f57e9ef06925e5b7722df1eb92ef5850e8dce79220ea16a8aaff586a71c0b01460ef1713649ee24ffedb2e6ad5a51e9198c5a5ae1b2789e43feb1f494e7d45c DIST japanese-usage-dictionary-20180701040110.tar.gz 71285 BLAKE2B dfad056a1d5061b6764f583da15b9ad60a3c4421cee0430c4665d1c2779a64f9b31473c1746a3e2b9bda5167349432e51dcf7d4d48f75fde9543e9c16ff74c0d SHA512 68b4d3f52dd6cd4f00a8012a870b4f5929519cd69815b1729f3881d1f964802308f4aa101e236824b4c0f832183a9e8097437ed620403f2a652f126e7cdc1eb3 DIST japanese-usage-dictionary-2025-01-25.tar.gz 72003 BLAKE2B 3eef55aa1bd45c209e6457c6ef68105b2c157403be89b8d12cb2401f2e9d75b8b40d381a0ab24a6b99cf284208100fcc57213b4699db1a31a669a43ba7533aae SHA512 ac4be3e60f16804c8aba3491c6bd858bae13834951ea63d90a7d8811ee7a23221f56d161ed9009e5cc9c1df9f0379eee82668f0728c8674cd820051a54baf547 DIST mozc-2.28.5029.102-2.28.5029.102.tar.gz 37247099 BLAKE2B 4bb528991102d34a26321e6fa00a73cc83cb103e0b765f1ebb837dd6894387288b13ed75cc255003d07d6f0c4a82f963684fa4f2bd9b5043cfaddb57a5f5cef0 SHA512 b20aa45757db92f66d1c135eacf907b4cec937226a8d09e5f9f6768ae22a6b8464e3b75276773ce55413f2002ffcc3d8cae136e7fd3acfc0733e48bccf848d5b @@ -21,18 +30,38 @@ DIST mozc-2.31.5851.102-properties.svg 812 BLAKE2B 17f3facef4594c38b94a3be325d7a DIST mozc-2.31.5851.102-tool.png 360 BLAKE2B e699107fb3d5d8fd202ea8f65908a63b2d9b8c5aa4eaeed0db15a5bc5eb4af4735814f20b8e641736b08fbee2691836a5d5e8b94b4b653aac836f8afa982b791 SHA512 35f270784ff7b947aa3636d9531c502775315116f694f95a21a93ef9bf77d67ab7b194153b186a8371a78ce8b162ca82fb232aea92dc37ba2de86c79fe8f19b1 DIST mozc-2.31.5851.102-tool.svg 326 BLAKE2B df5947d23720f168d40403c00dc20e547ae30dd8f92c8448d5675fe28344903a65e139c4739c83fa64db9233b012ddcd3e5ad663d96417a8dcb4b83ba020d4ad SHA512 471ae428ca8312b4ecc8ab3f7348f89b2778e853a3106e21b5027b5fa23d8ea2eb301a18d64203af52e4ca8bfe51f184966e01670c514dc019a649c5f557e08a DIST mozc-2.31.5851.102.tar.gz 28443744 BLAKE2B a00530f469d15b897221673c96132386063f7a649f72f4ce467e17f50bb7f972051160a438f3e0aa930af9610d15a4cf2d6b68538a25a5515165d98a3d1da44b SHA512 468c5bdac8ef767b8872b794f76bcad675798ea2f423893bbb21212840cf78fd9498304ac2ee4c524c35a7f4478f0a7f5df4abdab0861c5308ff2c53fa996c15 +DIST mozc-2.32.5994.102-dictionary.png 205 BLAKE2B f92fdeae34eff41473c6c9b0f6fb5a3c784b7b98fd6932b03953131f78ab97c961eb94f88e542f593acf0d2af176e28a3d638e50e912aa695de882477117b2d6 SHA512 aac820bbf51b2dfe23a9e0de57c2c9f4301e021c3ae29047ec8918ccb22b698f775ceee1dfe5ceaf21ada9228085ae1a36e65ab33fd811acf072e4d380225d9c +DIST mozc-2.32.5994.102-dictionary.svg 294 BLAKE2B 24464c7238fc58056c4c9e94f72c9ece8313a09ef1fd57f07b2178dcf78b722fff4965d42ac867c135db969a905306f99e7d6e4f5c028029646b77d6eee3de33 SHA512 648b486ec244c117ae25aadbff1f14211a311df37161b7777c442aff2f7f8dd61d41912d81891a0de29383e3430ee80ecdad7d9b1fb9e0ea7addcbf97af018c3 +DIST mozc-2.32.5994.102-jigyosyo.zip 774194 BLAKE2B 46cb54e9d9ee183031dbda9cecbbcf24a341488a0320286f264fb2f9e44638373f432463bbfd2fadaa65f64dba9afce9ca4ae01b8315f3853dcf6b8361e1339d SHA512 ec76f0c9b02a8f0a8633d752ebdb80ac7c4d5c71dfd9916cc9140d446bae8e09755db8d40eca87fbb08d21c31db80ec977f307c497f0d731087c73a1df9ea0c7 +DIST mozc-2.32.5994.102-ken_all.zip 1694438 BLAKE2B 03879037406a9d95c33d14bbde6fdd33acae0e6fda328e960c9f10aad74f2f34353d8b03e98ea247659587821d839783be2f031c3e756eac292ec52094c7ede6 SHA512 00aef90b785a703d536813616eeec7057eeaf681b83bc35c6c4b597df298ccb6bbd97f97845c7570788e7f063d94b4c62e359ccc698fcaeff17ce472bc1b9225 +DIST mozc-2.32.5994.102-properties.png 557 BLAKE2B 33a12b009e0dff7a46385a59287a8d179ec931e6cd98a5b13480ade870035259928d8655ca578954307a76eca92ea98dbe4ec4f904f2074c21c848b3a2b6f0d7 SHA512 1cbd9307f0e96c1255c1cb915d10d2254281574c8fcf54e97a518d3a49475cc7775d6f4042a04e2358f7db5808986eef9cd9b84fff571dce1b9ec23f8fb3a8fd +DIST mozc-2.32.5994.102-properties.svg 812 BLAKE2B 17f3facef4594c38b94a3be325d7a00d5538c4f098853b5e70254b572305440adbba7e597cee4645ffd1884631cab5ff50dd25a5368b7aff1972290e6ceaab91 SHA512 637b8ec750fa0a5a32afbcefb43430d122de889d32ce6295327934dede6051d1a37678a895b8c2fa26ab0c28f5a372e7b6ca0aad7acebaf64cc5a88c32ff43de +DIST mozc-2.32.5994.102-tool.png 360 BLAKE2B e699107fb3d5d8fd202ea8f65908a63b2d9b8c5aa4eaeed0db15a5bc5eb4af4735814f20b8e641736b08fbee2691836a5d5e8b94b4b653aac836f8afa982b791 SHA512 35f270784ff7b947aa3636d9531c502775315116f694f95a21a93ef9bf77d67ab7b194153b186a8371a78ce8b162ca82fb232aea92dc37ba2de86c79fe8f19b1 +DIST mozc-2.32.5994.102-tool.svg 326 BLAKE2B df5947d23720f168d40403c00dc20e547ae30dd8f92c8448d5675fe28344903a65e139c4739c83fa64db9233b012ddcd3e5ad663d96417a8dcb4b83ba020d4ad SHA512 471ae428ca8312b4ecc8ab3f7348f89b2778e853a3106e21b5027b5fa23d8ea2eb301a18d64203af52e4ca8bfe51f184966e01670c514dc019a649c5f557e08a +DIST mozc-2.32.5994.102.tar.gz 28284987 BLAKE2B d62a1b77141e31b8991ed39e84d8daff8f9112efdae82a2ede77654fbe15d2d83b73b747a21b18fc4fcd1faa5324dac50c9e3dfff900ebd546e47ec1d1b4ccc0 SHA512 eac685aa710acfc3af6137793ac506870acfd79d8826ffbb053f6fda850d9cf680f0a9ab59a788a36d98f0dd1fe48d8d19dbf1328b9dcab5ed9976f4f80e13ea +DIST mozc-bcr-470a7a43196aeffd5f6c3ff41bbcfeb120a04341.tar.gz 4496750 BLAKE2B eff0dc194d6062e5be927244ebe4e94557391c71c1734e1c7be13071d2efee5d82b18eba7d750e60f7d6eab5db57a021135df54b5cb7f48b208c436543d8126b SHA512 ae05a1aa336ef0966533fca0542cb0e4a8403e3e232d8c4dc4565a9864fb0a26a3785029d3aeac257bc00b0cf45ca555420fd0db1205911c57ef28e737d96d01 DIST mozc-bcr-b553f46a71d17fe8f32661f64e755cf6fac03ada.tar.gz 3374577 BLAKE2B 20722deebafffe44f39246c2a2ca11af155585871106fd182f77fba010d5bab907107f078dbba667dfb9f38c375896322fa0b5c1b51fc5b0aef18d99c48d4f7d SHA512 45dea3670a932e370f9ffcd98a5b99e988dfe16fa7140d71230a27bd83b97343dc4dcf96a14ed3bdd50cb17976e484699dbd4e1ffc5b1aba420c16f00f05a37e DIST mozc-fcitx5-2.31.5851.102.tar.gz 28530201 BLAKE2B 4f42970b2bde2173d49cccaefafff0d65c792934b923dc5cbced83de143a5622fa0b9aca672a8e2b536cd5601100754740b09ea2953d00b662f5dc9e04f0f704 SHA512 d60b3d11110acb6e838300ecaa398b8abd652e9ad7a94bd0e2bbaf8cf7d217aaa62241916a607c4f8cf0fe6e9434a31b7fb8dae2a3cd7e20e0022fda137946f1 +DIST mozc-fcitx5-2.32.5994.102.tar.gz 28373979 BLAKE2B b38ce9527035e16916e5820f63b4e9e6cf93549f29ab1f88e8ee689f829429c459fff60772a3eff429c9c98b61afca931f5354f28c7afe583cce996b35021761 SHA512 9cee1ce170e55dc803c3eb739800c5f1cb9c50e7315361078bda6e12b767e50781c059ae03ab29316fc2b4647af07abb3d865a273c76e41e1c712129d62dbbbf DIST platforms-0.0.10.tar.gz 7680 BLAKE2B dd19db938cc7efe706c94f8149265952ecafe7e2811e84924377b1b1f0138e7104da2252d64a4dc03f66d8a3284716fa09888721294d885de852a69324fcb596 SHA512 a92e54fccebc6ac9715be6ffb09f0bb20d402de4837ad5002e9c292b54f8b84a573b049c0e8192f955bb51b19c9926a3affc880f3d4dce28f535f97241b0663f +DIST platforms-1.0.0.tar.gz 7879 BLAKE2B eaa82522a86d75669befeaa6023b46fb6c482cd9a0e818d5f99c602a2bf7e359e51ef61298aeda40cea15b7f281eba04cf9a37e637f92fc8c7b5d209693fd8e1 SHA512 cb05b7157e4e3b8ec05f1e4ac3e5eecc73d9a3ed5729455058a1290a5f04fb4e58be30368fc2ce6a90d6938ada331ea2abaeaaeaede16d1ae2ee091fa0c1faef DIST protobuf-29.3.zip 11127807 BLAKE2B 1889a4948335a5a27e6dee0549bab3f226e634eb8dbce97830b1aa84787026258c135431241afcbfebbe2433ce933d0733bebeeb990c5b5924f09d5e625edb43 SHA512 09cb3eed78d41444b336e5a7bbcc1ca3679ad7c625ecdceb6d5d3b6430baa924b7da3dd4befdf068f2124ecf9fe986f1cc4d7b3b97177a8117af0acb182e63c8 +DIST protobuf-32.0.zip 11559357 BLAKE2B 86ecede4efa0116e81cd39421a7a630fae3f6393d08421ab329d8f466ea01a3b5b1c0117f0f4e6a3339619201847b8279e3d95cadd13a9d4d042d1e4c368ba02 SHA512 53ba7921add31048adb7ae0fc442d819bf2e9dae5341163770cfc165795b80b19e81aa281f90757a637929acfff200c50ab1c1d09e8612e7a50cd0c3a6e374ba DIST rules_android_ndk-v0.1.3.tar.gz 25611 BLAKE2B bfad0cd27fc9bc2971663a197300794aef7f330659500a69a95a89a0ccdbc547ff4e6760104a1398b3a9981a38facc6a64aeac7b1e55a27bcf44f4eafd19a63c SHA512 6fc90f12ff4736a50e058b1d675b47fe2bb63320b27c42c3be996c52b0076e17248ce246849cc264cd96418c046d54075ebf8ee2ddb3b74b8813d605e8968135 DIST rules_apple.3.16.1.tar.gz 2387851 BLAKE2B 0ce5d0d2f0d048d6e462ef4f1e5553e9c4ab8e46d67d79cf12cbc20ed8cf741a0d9bf36a04759b2a9b59ed9021772fa70cf21c2ba4d5dd0e93560bf60c7bd19c SHA512 11523401df02c6b863c625e24ae78b54348ec958c253bec412adc4873f654c830bb7049d500d94e6ce890695899598eb7f785653cbdf264903ba7dd40496a783 +DIST rules_apple.4.1.2.tar.gz 2435331 BLAKE2B e56aadd96ea72ef714ead6dca3b020def6f9b7756d713e601afc3ab44568f17d59597d3e74e73945f387a94a3250318c91eb036b28e257cdab7c36837bd134da SHA512 0494e784c5140059903cf8eeabd900125c5f917c6e2afdd2bdcb39b8c5c01a928ef3f717ce24cf10c8c3c6fae252d9cb246abe6ece63a9a40bd9cfb1f995710b DIST rules_cc-0.0.17.tar.gz 178823 BLAKE2B 7e544f1752e335f9436fe24ee6ec77aa8c94723b2ecacb65a273f485809df9e11312d54924e0abd5f5c3e01641e055f6efbb72e6a3b407901b8a5364d4dd39f1 SHA512 6a9bb04ecfc93039ba32395e9decd6c1c0910558bb817f06ca80878ba508bc5ed199e7241ba79ae0a4bfa1e74f6dc6207fded47f3b8466cf611005b6c6084582 +DIST rules_cc-0.2.2.tar.gz 251269 BLAKE2B a1bd0906d00dba875e2d0bb7ae79738d02e45f3c5276e464ba3434c28a39ed60c5421cfd3c7b34dfe1d7db7a0cd47b6b8a26c2140c4504cf39a11f1b17227410 SHA512 1cbad05b9b40460f398d767d73c2d4edcf546c6402d38c98e703664b8201f6eacb9195713a632715613c49c65cc6d182c05193a3594835b5a85bcba59ef27b63 +DIST rules_java-8.14.0.tar.gz 112382 BLAKE2B d643d827277d49df734457f89c13b591d55679bb404518fb240e0536cca79bad8d70de8e723966431e6a41a022b37fc5af4934d56d04b8c817cda50767782cbd SHA512 b7ea0d839c9ed2edfe3042d8d7ffffeaee66547d9ec6670e71fcadadaa21a465e4fe0db7fae0fd2840a3499a06d1c4543378b96050387bd164ae28b657e9c1ce DIST rules_java-8.6.1.tar.gz 104565 BLAKE2B fc90d972ae704d7c627c408d044e6ae6c331661493ed0f0614ae67415806a33a1df9965d83164d923692e60db4cf711493eceead75181adf691c1ca73826eb0e SHA512 f45114b02d9892781797686be73bbeab988d122bf3bd12f3d854810c62716d3a59a7630b1ab02ecfe464fc80c6041f2caebb465f7eb88d13106645b3fe589fba DIST rules_kotlin-v1.9.6.tar.gz 23089629 BLAKE2B 1532ea7cc7807326c948be50cd4942a39f6c04f179690d9b51b41d354bde253581f453a2889048998e8bd381b8baad04315b81523e8cf2159ea33055704f43fb SHA512 0e2d538a4d4c200d40ad0041d7ccc3155670247144b2be322607c5db219262fd6f7de512b54df9ed3bae72213ca340b6919a0248a00260b451af93042ccd3216 DIST rules_license-1.0.0.tar.gz 35903 BLAKE2B 851db879f93a22fed62872fed37e32c8fe54d882c2d15e0df9f17f332d99c92345c7bd89dbb70a040e455d6033e23035a984a478fd1655a6573c35bd1b84300e SHA512 17801f13c8a019de7e85a81ccfe6147ee9b996bbb72bbf4753aadb62e13c7c05040012182f3e557395a36453d8c7e9ca504b624bd2e490447656d0196c0fc6bb DIST rules_pkg-1.0.1.tar.gz 90016 BLAKE2B 49a6faf5c17288bead1d94e071569c2f551b59d0ecb63467967c8abb3946cae7725cde71284623fc6b87a1a227969edfce8a73149853cc2596b2ae98c6c1a58d SHA512 5bbcba04093e91718f00ae48571005ace679a44a8996c5f975f6dd7e8431fd703999e10ce35d84b39a5a5e4fa92ce14d8ff8fc771001ff5c5575f4f6f5098625 +DIST rules_pkg-1.1.0.tar.gz 92951 BLAKE2B 272ada06effe826ce4eae590863423df9c550f97051c0a8b50fc90d2a323a4218359408e2e57f22d74d337457bb8ab1673f5382784652c546cadaac64eef9336 SHA512 8eae67ababbf596d0c86f5ac9d6c6a0853f301c682df50403509b3bf2a85fdfc8532c4ca0c11e4ab85dac2bdb23165c8bbbeb35eb695a58a29b83c12a40abf55 DIST rules_python-1.0.0.tar.gz 753569 BLAKE2B 036344fa385d808656b338f301fd6d76b2ea13088a7bbf69348bf54f3ccc9558573e15ad2f3befe7af404491f6febd735a456c83c64f83124a9f9bfc415d719f SHA512 47a341531548e1bdc90e9e1e2bc9d7199d9edb6b20815591f8fbc3bc2efc769adc213f3b2550e9f628548fe35be5a854a9cdcc44cc79355e6cff3ae5369e3382 +DIST rules_python-1.5.4.tar.gz 888827 BLAKE2B 81856a49c2da4d746658fa94524614a6ad5c755121ac00e23dc4c38c0ef9be0f1908226235a9b32578df059a1a4b4ffc32e361809bfe4c93b64797030b894562 SHA512 c702e38d13e7b502408aadc313878682272f5e86059350b7568ac07f518439c8645b69ad0ecacc997caa9405ea0c838b7dc08f2d4eb531190d6067c610d30237 DIST rules_shell-v0.2.0.tar.gz 14070 BLAKE2B cec6995e2227bd361ccd55ed4f964947d987752eb773ed12ed1f44f5ebd16cf8c6cae5e370a55328777185dbd38a64e0de2c26b617c355a839d82847c3eea445 SHA512 7d5a6ae362ad92b1886c81ac4779c6d027435ae559e6cd0ea0c3b3aba60e614dc5a6428e720d667b1061ee94065d10e86dfaa0c17e2eb0a11bc535c3d450d69d +DIST rules_shell-v0.3.0.tar.gz 22046 BLAKE2B ed0740f1e3f637f70e7c2fc76727f54722b767e764dfc0048099b2a16de453e355a1596927461d5abb5d9f2131c12fbbe0bfe6606f3e44c42af8f23eb0454036 SHA512 384f14574edf22fc7b515ca184b2af3868ea21aac31247a53aa5dab44293ed92dfed13807f1428051d6a539fd40f0fdb7e83ac2c8c8811be9ecdaa9725f044db DIST rules_swift.2.1.1.tar.gz 271370 BLAKE2B 5815e469e6577bbc40ac2980eed1e0ceee3ba7bc0ce053ad4ff61a107e4bb788fd8ebfa31122b108ca197dd2c0338c4b389cabc4cbc01db36db62ef20ba9a844 SHA512 444939266564bf418c2dd7fc3c15353818da85fc35e970257d6b79ea62cc1225f68979ef5e5aa7e88e84f4e07b269d1973f9f578edfcc10a50f35b545700cb53 +DIST rules_swift.3.1.2.tar.gz 326090 BLAKE2B fd8f66c6e2605596197fd0a06c6445545067949f30210fdafe5122eac7883e9d782121c5fbc38b9387d7aaa6fa955d4fd3aefb8479ff4071b619403179bd7dc1 SHA512 d3155ed53b2811e17d3f92f1e1641a09e115c50c8dce686766b138b618925d9e60a1322655394e978fd9e6abc503bbc2601ef1f15ffef63826cb955bd5899554 DIST zlib-1.3.1.tar.gz 1512791 BLAKE2B 872ef9cc41ba57e9809ab5714ffa15cc9d3ef6c4a948c57107f800fc373bcfe2475136407203cb9aa33b189994336f36f2757b7a582e065ad477bfd49260184b SHA512 580677aad97093829090d4b605ac81c50327e74a6c2de0b85dd2e8525553f3ddde17556ea46f8f007f89e435493c9a20bc997d1ef1c1c2c23274528e3c46b94f diff --git a/app-i18n/mozc/files/mozc-2.32.5994.102-bazel_patch-fix_shebang.patch b/app-i18n/mozc/files/mozc-2.32.5994.102-bazel_patch-fix_shebang.patch new file mode 100644 index 000000000000..ff1585c3a263 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.32.5994.102-bazel_patch-fix_shebang.patch @@ -0,0 +1,13 @@ +patch rules_python package to set shebang +this patch is applied by bazel, not portage +--- python/private/py_runtime_info.bzl ++++ python/private/py_runtime_info.bzl +@@ -15,7 +15,7 @@ + + load(":util.bzl", "define_bazel_6_provider") + +-DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3" ++DEFAULT_STUB_SHEBANG = "#!@PYTHON@" + + _PYTHON_VERSION_VALUES = ["PY2", "PY3"] + diff --git a/app-i18n/mozc/files/mozc-2.32.5994.102-rm_reinterpret_cast.patch b/app-i18n/mozc/files/mozc-2.32.5994.102-rm_reinterpret_cast.patch new file mode 100644 index 000000000000..35e54bd68694 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.32.5994.102-rm_reinterpret_cast.patch @@ -0,0 +1,362 @@ +backport https://github.com/google/mozc/commit/7118076.patch +Burn down unsafe `reinterpret_cast`s. +--- a/config/BUILD.bazel ++++ b/config/BUILD.bazel +@@ -137,6 +137,7 @@ mozc_cc_test( + "//protocol:config_cc_proto", + ], + windows = [ ++ "//base:bits", + "//base/win32:win_api_test_helper", + "@com_google_absl//absl/base", + "@com_google_absl//absl/container:flat_hash_map", +@@ -164,6 +165,7 @@ mozc_cc_library( + ], + deps = [ + ":config_handler", ++ "//base:bits", + "//base:config_file_stream", + "//base:number_util", + "//base:singleton", +--- a/config/character_form_manager.cc ++++ b/config/character_form_manager.cc +@@ -44,6 +44,7 @@ + #include "absl/strings/str_cat.h" + #include "absl/strings/string_view.h" + #include "absl/types/span.h" ++#include "base/bits.h" + #include "base/config_file_stream.h" + #include "base/number_util.h" + #include "base/singleton.h" +@@ -379,7 +380,7 @@ Config::CharacterForm CharacterFormManagerImpl::GetCharacterFormFromStorage( + if (value == nullptr) { + return Config::FULL_WIDTH; // Return default setting + } +- const uint32_t ivalue = *reinterpret_cast<const uint32_t*>(value); ++ const uint32_t ivalue = LoadUnaligned<uint32_t>(value); + return static_cast<Config::CharacterForm>(ivalue); + } + +--- a/config/stats_config_util_test.cc ++++ b/config/stats_config_util_test.cc +@@ -42,6 +42,7 @@ + #include <bit> + + #include "absl/container/flat_hash_map.h" ++#include "base/bits.h" + #include "base/singleton.h" + #include "base/win32/win_api_test_helper.h" + #endif // _WIN32 +@@ -228,7 +229,7 @@ class RegistryEmulator { + if (!CheckWritable(key)) { + return ERROR_ACCESS_DENIED; + } +- SetUsagestatsValue(key, *reinterpret_cast<const DWORD*>(data)); ++ SetUsagestatsValue(key, LoadUnaligned<DWORD>(data)); + return ERROR_SUCCESS; + } + static LSTATUS WINAPI TestRegCloseKey(HKEY key) { return ERROR_SUCCESS; } +--- a/converter/BUILD.bazel ++++ b/converter/BUILD.bazel +@@ -222,6 +222,7 @@ mozc_cc_library( + "//prediction:__pkg__", + ], + deps = [ ++ "//base:bits", + "//data_manager", + "//storage/louds:simple_succinct_bit_vector_index", + "@com_google_absl//absl/status", +@@ -241,6 +242,7 @@ mozc_cc_test( + ], + deps = [ + ":connector", ++ "//base:bits", + "//base:mmap", + "//base:vlog", + "//data_manager:connection_file_reader", +--- a/converter/connector.cc ++++ b/converter/connector.cc +@@ -45,6 +45,7 @@ + #include "absl/strings/escaping.h" + #include "absl/strings/str_cat.h" + #include "absl/strings/string_view.h" ++#include "base/bits.h" + #include "data_manager/data_manager.h" + #include "storage/louds/simple_succinct_bit_vector_index.h" + +@@ -245,11 +246,11 @@ absl::Status Connector::Init(absl::string_view connection_data) { + // |ptr| points to here now. Every uint8_t[] block needs to be aligned at + // 32-bit boundary. + VALIDATE_SIZE(ptr, 2, "Compact bits size of row ", i, "/", rsize); +- const uint16_t compact_bits_size = *reinterpret_cast<const uint16_t*>(ptr); ++ const uint16_t compact_bits_size = LoadUnaligned<uint16_t>(ptr); + ptr += 2; + + VALIDATE_SIZE(ptr, 2, "Values size of row ", i, "/", rsize); +- const uint16_t values_size = *reinterpret_cast<const uint16_t*>(ptr); ++ const uint16_t values_size = LoadUnaligned<uint16_t>(ptr); + ptr += 2; + + VALIDATE_SIZE(ptr, chunk_bits_size, "Chunk bits of row ", i, "/", rsize); +--- a/converter/connector_test.cc ++++ b/converter/connector_test.cc +@@ -39,6 +39,7 @@ + #include "absl/random/random.h" + #include "absl/status/statusor.h" + #include "absl/strings/string_view.h" ++#include "base/bits.h" + #include "base/mmap.h" + #include "base/vlog.h" + #include "data_manager/connection_file_reader.h" +@@ -102,7 +103,7 @@ TEST(ConnectorTest, BrokenData) { + // Invalid magic number. + { + data.assign(cmmap->begin(), cmmap->size()); +- *reinterpret_cast<uint16_t*>(&data[0]) = 0; ++ StoreUnaligned<uint16_t>(0, &data[0]); + const auto status = Connector::Create(data).status(); + MOZC_VLOG(1) << status; + EXPECT_FALSE(status.ok()); +--- a/converter/inner_segment.h ++++ b/converter/inner_segment.h +@@ -31,6 +31,7 @@ + #define MOZC_CONVERTER_INNER_SEGMENT_H_ + + #include <algorithm> ++#include <bit> + #include <cstddef> + #include <cstdint> + #include <iterator> +@@ -94,11 +95,11 @@ inline std::optional<uint32_t> EncodeLengths(uint32_t key_len, + + const internal::LengthData data{key_len, value_len, content_key_len, + content_value_len}; +- return *reinterpret_cast<const uint32_t*>(&data); ++ return std::bit_cast<uint32_t>(data); + } + + inline internal::LengthData DecodeLengths(uint32_t encoded) { +- return *reinterpret_cast<const struct internal::LengthData*>(&encoded); ++ return std::bit_cast<internal::LengthData>(encoded); + } + + // Iterator class to access inner segments. +--- a/data_manager/BUILD.bazel ++++ b/data_manager/BUILD.bazel +@@ -317,4 +317,5 @@ mozc_cc_library( + name = "emoji_data", + hdrs = ["emoji_data.h"], + visibility = ["//rewriter:__pkg__"], ++ deps = ["//base:bits"], + ) +--- a/data_manager/emoji_data.h ++++ b/data_manager/emoji_data.h +@@ -35,6 +35,8 @@ + #include <iterator> + #include <utility> + ++#include "base/bits.h" ++ + namespace mozc { + + // Emoji Version Data, in Unicode. +@@ -99,17 +101,13 @@ class EmojiDataIterator { + EmojiDataIterator() : ptr_(nullptr) {} + explicit EmojiDataIterator(const char* ptr) : ptr_(ptr) {} + +- uint32_t key_index() const { +- return *reinterpret_cast<const uint32_t*>(ptr_); +- } +- uint32_t emoji_index() const { +- return *reinterpret_cast<const uint32_t*>(ptr_ + 4); +- } ++ uint32_t key_index() const { return LoadUnaligned<uint32_t>(ptr_); } ++ uint32_t emoji_index() const { return LoadUnaligned<uint32_t>(ptr_ + 4); } + uint32_t unicode_version_index() const { +- return *reinterpret_cast<const uint32_t*>(ptr_ + 8); ++ return LoadUnaligned<uint32_t>(ptr_ + 8); + } + uint32_t description_utf8_index() const { +- return *reinterpret_cast<const uint32_t*>(ptr_ + 12); ++ return LoadUnaligned<uint32_t>(ptr_ + 12); + } + + // Returns key index as token array is searched by key. +--- a/data_manager/serialized_dictionary.h ++++ b/data_manager/serialized_dictionary.h +@@ -42,6 +42,7 @@ + + #include "absl/log/check.h" + #include "absl/strings/string_view.h" ++#include "base/bits.h" + #include "base/container/serialized_string_array.h" + + namespace mozc { +@@ -137,72 +138,35 @@ class SerializedDictionary { + : token_ptr_(token_ptr), string_array_(string_array) {} + iterator(const iterator& x) = default; + +- uint32_t key_index() { +- return *reinterpret_cast<const uint32_t*>(token_ptr_); +- } +- uint32_t key_index() const { +- return *reinterpret_cast<const uint32_t*>(token_ptr_); +- } +- absl::string_view key() { return (*string_array_)[key_index()]; } ++ uint32_t key_index() const { return LoadUnaligned<uint32_t>(token_ptr_); } + absl::string_view key() const { return (*string_array_)[key_index()]; } + +- uint32_t value_index() { +- return *reinterpret_cast<const uint32_t*>(token_ptr_ + 4); +- } + uint32_t value_index() const { +- return *reinterpret_cast<const uint32_t*>(token_ptr_ + 4); ++ return LoadUnaligned<uint32_t>(token_ptr_ + 4); + } +- absl::string_view value() { return (*string_array_)[value_index()]; } + absl::string_view value() const { return (*string_array_)[value_index()]; } + +- uint32_t description_index() { +- return *reinterpret_cast<const uint32_t*>(token_ptr_ + 8); +- } + uint32_t description_index() const { +- return *reinterpret_cast<const uint32_t*>(token_ptr_ + 8); ++ return LoadUnaligned<uint32_t>(token_ptr_ + 8); + } + +- absl::string_view description() { +- return (*string_array_)[description_index()]; +- } + absl::string_view description() const { + return (*string_array_)[description_index()]; + } + +- uint32_t additional_description_index() { +- return *reinterpret_cast<const uint32_t*>(token_ptr_ + 12); +- } + uint32_t additional_description_index() const { +- return *reinterpret_cast<const uint32_t*>(token_ptr_ + 12); +- } +- absl::string_view additional_description() { +- return (*string_array_)[additional_description_index()]; ++ return LoadUnaligned<uint32_t>(token_ptr_ + 12); + } + + absl::string_view additional_description() const { + return (*string_array_)[additional_description_index()]; + } + +- uint16_t lid() { +- return *reinterpret_cast<const uint16_t*>(token_ptr_ + 16); +- } +- uint16_t lid() const { +- return *reinterpret_cast<const uint16_t*>(token_ptr_ + 16); +- } ++ uint16_t lid() const { return LoadUnaligned<uint16_t>(token_ptr_ + 16); } + +- uint16_t rid() { +- return *reinterpret_cast<const uint16_t*>(token_ptr_ + 18); +- } +- uint16_t rid() const { +- return *reinterpret_cast<const uint16_t*>(token_ptr_ + 18); +- } ++ uint16_t rid() const { return LoadUnaligned<uint16_t>(token_ptr_ + 18); } + +- int16_t cost() { +- return *reinterpret_cast<const uint16_t*>(token_ptr_ + 20); +- } +- int16_t cost() const { +- return *reinterpret_cast<const uint16_t*>(token_ptr_ + 20); +- } ++ int16_t cost() const { return LoadUnaligned<int16_t>(token_ptr_ + 20); } + + absl::string_view operator*() { return key(); } + absl::string_view operator*() const { return key(); } +--- a/dictionary/BUILD.bazel ++++ b/dictionary/BUILD.bazel +@@ -546,6 +546,7 @@ mozc_cc_library( + "//rewriter:__pkg__", + ], + deps = [ ++ "//base:bits", + "//base/container:serialized_string_array", + "//base/strings:assign", + "//data_manager", +--- a/dictionary/user_pos.h ++++ b/dictionary/user_pos.h +@@ -40,6 +40,7 @@ + #include <vector> + + #include "absl/strings/string_view.h" ++#include "base/bits.h" + #include "base/container/serialized_string_array.h" + #include "data_manager/data_manager.h" + +@@ -132,17 +133,15 @@ class UserPos { + explicit iterator(const char* ptr) : ptr_(ptr) {} + iterator(const iterator& x) = default; + +- uint16_t pos_index() const { +- return *reinterpret_cast<const uint16_t*>(ptr_); +- } ++ uint16_t pos_index() const { return LoadUnaligned<uint16_t>(ptr_); } + uint16_t value_suffix_index() const { +- return *reinterpret_cast<const uint16_t*>(ptr_ + 2); ++ return LoadUnaligned<uint16_t>(ptr_ + 2); + } + uint16_t key_suffix_index() const { +- return *reinterpret_cast<const uint16_t*>(ptr_ + 4); ++ return LoadUnaligned<uint16_t>(ptr_ + 4); + } + uint16_t conjugation_id() const { +- return *reinterpret_cast<const uint16_t*>(ptr_ + 6); ++ return LoadUnaligned<uint16_t>(ptr_ + 6); + } + + uint16_t operator*() const { return pos_index(); } +--- a/prediction/BUILD.bazel ++++ b/prediction/BUILD.bazel +@@ -512,6 +512,7 @@ mozc_cc_library( + "//engine:__pkg__", + ], + deps = [ ++ "//base:bits", + "//base/container:serialized_string_array", + "@com_google_absl//absl/strings", + ], +--- a/prediction/zero_query_dict.h ++++ b/prediction/zero_query_dict.h +@@ -37,6 +37,7 @@ + #include <utility> + + #include "absl/strings/string_view.h" ++#include "base/bits.h" + #include "base/container/serialized_string_array.h" + + namespace mozc { +@@ -98,21 +99,17 @@ class ZeroQueryDict { + uint32_t operator*() const { return key_index(); } + + uint32_t operator[](ptrdiff_t n) const { +- return *reinterpret_cast<const uint32_t*>(ptr_ + n * kTokenByteSize); ++ return LoadUnaligned<uint32_t>(ptr_ + n * kTokenByteSize); + } + + const iterator* operator->() const { return this; } + +- uint32_t key_index() const { +- return *reinterpret_cast<const uint32_t*>(ptr_); +- } ++ uint32_t key_index() const { return LoadUnaligned<uint32_t>(ptr_); } + +- uint32_t value_index() const { +- return *reinterpret_cast<const uint32_t*>(ptr_ + 4); +- } ++ uint32_t value_index() const { return LoadUnaligned<uint32_t>(ptr_ + 4); } + + ZeroQueryType type() const { +- const uint16_t val = *reinterpret_cast<const uint16_t*>(ptr_ + 8); ++ const uint16_t val = LoadUnaligned<uint16_t>(ptr_ + 8); + return static_cast<ZeroQueryType>(val); + } + diff --git a/app-i18n/mozc/mozc-2.32.5994.102.ebuild b/app-i18n/mozc/mozc-2.32.5994.102.ebuild new file mode 100644 index 000000000000..7d94b4b6dd88 --- /dev/null +++ b/app-i18n/mozc/mozc-2.32.5994.102.ebuild @@ -0,0 +1,435 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..14} ) +inherit desktop dot-a edo elisp-common flag-o-matic multiprocessing python-any-r1 savedconfig toolchain-funcs xdg + +# USE_BAZEL_VERSION in .bazeliskrc +BAZEL_VER="8.4.1" +# 2025-10-22, date of release of mozc +BAZEL_BCR_HASH="470a7a43196aeffd5f6c3ff41bbcfeb120a04341" +# commit: Merge "Update BUILD_OSS to 5994" +MOZC_FCITX_HASH="6c54b5d52a3a9d949502ad8e6c2eab2c66e7f1a7" + +# submodules, but archives are fetched by bazel from bazel_dist +ABS_VER="20250814.0" +GTEST_VER="1.17.0" +JUD_VER="2025-01-25" +# sha256sum of tarball +JUD_CHECKSUM="ebfc8681eb207f14a2c36a7a71522b1aa8a405d10ab36a83a9a024d4ce58c0ca" +PROTO_VER="32.0" + +# to simplify update +CPYTHON_VER="3.11.13+20250610" +RPYTHON_VER="1.5.4" + +DESCRIPTION="Mozc - Japanese input method editor." +HOMEPAGE="https://github.com/google/mozc" +# for new release, update versions according to MODULE.bazel or failures of the fetch's phase of bazel +SRC_URI=" + amd64? ( + https://releases.bazel.build/${BAZEL_VER}/release/bazel-${BAZEL_VER}-linux-x86_64 + https://github.com/astral-sh/python-build-standalone/releases/download/${CPYTHON_VER#*+}/cpython-${CPYTHON_VER}-x86_64-unknown-linux-gnu-install_only.tar.gz + ) + arm64? ( + https://releases.bazel.build/${BAZEL_VER}/release/bazel-${BAZEL_VER}-linux-arm64 + https://github.com/astral-sh/python-build-standalone/releases/download/${CPYTHON_VER#*+}/cpython-${CPYTHON_VER}-aarch64-unknown-linux-gnu-install_only.tar.gz + ) + !fcitx5? ( https://github.com/google/${PN}/archive/refs/tags/${PV}.tar.gz + -> ${P}.tar.gz ) + fcitx5? ( https://github.com/fcitx/${PN}/archive/${MOZC_FCITX_HASH}.tar.gz + -> ${PN}-fcitx5-${PV}.tar.gz ) + test? ( https://github.com/google/googletest/releases/download/v${GTEST_VER}/googletest-${GTEST_VER}.tar.gz ) + https://github.com/bazelbuild/bazel-central-registry/archive/${BAZEL_BCR_HASH}.tar.gz + -> ${PN}-bcr-${BAZEL_BCR_HASH}.tar.gz + https://github.com/abseil/abseil-cpp/releases/download/${ABS_VER}/abseil-cpp-${ABS_VER}.tar.gz + https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/${JUD_VER}.tar.gz + -> japanese-usage-dictionary-${JUD_VER}.tar.gz + https://github.com/protocolbuffers/protobuf/releases/download/v${PROTO_VER}/protobuf-${PROTO_VER}.zip + https://github.com/bazel-contrib/rules_python/releases/download/${RPYTHON_VER}/rules_python-${RPYTHON_VER}.tar.gz + https://github.com/bazelbuild/apple_support/releases/download/1.23.1/apple_support.1.23.1.tar.gz + https://github.com/bazel-contrib/bazel_features/releases/download/v1.30.0/bazel_features-v1.30.0.tar.gz + https://github.com/bazelbuild/bazel-skylib/releases/download/1.8.1/bazel-skylib-1.8.1.tar.gz + https://github.com/bazelbuild/platforms/releases/download/1.0.0/platforms-1.0.0.tar.gz + https://github.com/bazelbuild/rules_android_ndk/releases/download/v0.1.3/rules_android_ndk-v0.1.3.tar.gz + https://github.com/bazelbuild/rules_apple/releases/download/4.1.2/rules_apple.4.1.2.tar.gz + https://github.com/bazelbuild/rules_cc/releases/download/0.2.2/rules_cc-0.2.2.tar.gz + https://github.com/bazelbuild/rules_java/releases/download/8.14.0/rules_java-8.14.0.tar.gz + https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.6/rules_kotlin-v1.9.6.tar.gz + https://github.com/bazelbuild/rules_license/releases/download/1.0.0/rules_license-1.0.0.tar.gz + https://github.com/bazelbuild/rules_pkg/releases/download/1.1.0/rules_pkg-1.1.0.tar.gz + https://github.com/bazelbuild/rules_shell/releases/download/v0.3.0/rules_shell-v0.3.0.tar.gz + https://github.com/bazelbuild/rules_swift/releases/download/3.1.2/rules_swift.3.1.2.tar.gz + https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz + https://github.com/hiroyuki-komatsu/japanpost_zipcode/raw/33524763837473258e7ba2f14b17fc3a70519831/ken_all.zip + -> ${P}-ken_all.zip + https://github.com/hiroyuki-komatsu/japanpost_zipcode/raw/33524763837473258e7ba2f14b17fc3a70519831/jigyosyo.zip + -> ${P}-jigyosyo.zip + https://raw.githubusercontent.com/google/material-design-icons/4.0.0/png/action/chrome_reader_mode/materialiconsoutlined/48dp/1x/outline_chrome_reader_mode_black_48dp.png + -> ${P}-dictionary.png + https://raw.githubusercontent.com/google/material-design-icons/4.0.0/src/action/chrome_reader_mode/materialiconsoutlined/24px.svg + -> ${P}-dictionary.svg + https://raw.githubusercontent.com/google/material-design-icons/4.0.0/png/action/settings/materialiconsround/48dp/1x/round_settings_black_48dp.png + -> ${P}-properties.png + https://raw.githubusercontent.com/google/material-design-icons/4.0.0/src/action/settings/materialiconsround/24px.svg + -> ${P}-properties.svg + https://raw.githubusercontent.com/google/material-design-icons/4.0.0/png/action/build/materialicons/48dp/1x/baseline_build_black_48dp.png + -> ${P}-tool.png + https://raw.githubusercontent.com/google/material-design-icons/4.0.0/src/action/build/materialicons/24px.svg + -> ${P}-tool.svg +" +S="${WORKDIR}/${P}/src" + +# Mozc: BSD +# src/data/dictionary_oss: ipadic, public-domain +# src/data/unicode: unicode +# japanese-usage-dictionary: BSD-2 +LICENSE="BSD BSD-2 ipadic public-domain unicode" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="debug emacs fcitx5 +gui +ibus renderer test" +REQUIRED_USE="|| ( emacs fcitx5 ibus )" +RESTRICT="!test? ( test )" + +DEPEND=" + fcitx5? ( app-i18n/fcitx:5 ) + gui? ( dev-qt/qtbase:6[gui,widgets] ) + ibus? ( + app-i18n/ibus + dev-libs/glib:2 + ) + renderer? ( dev-qt/qtbase:6[gui,widgets] ) +" +RDEPEND="${DEPEND} + emacs? ( app-editors/emacs:* ) +" +BDEPEND=" + ${PYTHON_DEPS} + app-arch/unzip + virtual/pkgconfig + fcitx5? ( sys-devel/gettext ) +" + +SITEFILE="50${PN}-gentoo.el" + +PATCHES=( + "${FILESDIR}"/${PN}-2.31.5851.102-fix_path.patch + # from upstream + "${FILESDIR}"/${PN}-2.32.5994.102-rm_reinterpret_cast.patch +) + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_unpack() { + case $(tc-arch) in + amd64) export EARCH=x86_64 ;; + arm64) export EARCH=arm64 ;; + *) die "architecture not supported: $(tc-arch)" ;; + esac + cp "${DISTDIR}"/bazel-${BAZEL_VER}-linux-${EARCH} bazel || die + chmod +x bazel || die + + unpack ${PN}-bcr-${BAZEL_BCR_HASH}.tar.gz + ln -sfT bazel-central-registry-${BAZEL_BCR_HASH} bcr || die + + # create symlinks for distdir with the name wanted by bazel + mkdir bazel_dist || die + pushd "${DISTDIR}" || die + for dep in *.{tar.gz,zip,png,svg}; do + ln -sfT "${DISTDIR}/${dep}" "${WORKDIR}/bazel_dist/${dep#${P}-}" || die + done + ln -sfT "${DISTDIR}"/japanese-usage-dictionary-${JUD_VER}.tar.gz "${WORKDIR}"/bazel_dist/${JUD_VER}.tar.gz || die + popd || die + + if use fcitx5; then + unpack ${PN}-fcitx5-${PV}.tar.gz + ln -sfT "${WORKDIR}"/${PN}-${MOZC_FCITX_HASH} "${WORKDIR}"/${P} || die + else + unpack ${P}.tar.gz + fi +} + +ebazel() { + debug-print-function ${FUNCNAME} "${@}" + + edo "${WORKDIR}"/bazel "$@" +} + +mozc_icons() { + if use fcitx5 || use gui || use ibus; then + return 0 + fi +} + +src_prepare() { + default + + # use tarball instead of zip for japanese-usage-dictionary (avoid CI failure) + sed -e "/^ *name = \"ja_usage_dict\"/,/^ *sha256/s/sha256 =.*,$/sha256 = \"${JUD_CHECKSUM}\",/" \ + -e "\@.*github.com/hiroyuki-komatsu/japanese-usage-dictionary@s:%s.zip:%s.tar.gz:" \ + -i MODULE.bazel || die + + # declare a patch to bazel for rules_python + cat >> MODULE.bazel <<-_EOF_ || die + single_version_override( + module_name = "rules_python", + patches = [ "bazel/rules_python_fix_shebang.patch" ], + version = "${RPYTHON_VER}", + ) + _EOF_ + # 'install' the patch for rules_python + # check py_runtime_info.bzl from ${WORKDIR}/bazel_dist/rules_python-${RPYTHON_VER}.tar.gz to update the patch + cp "${FILESDIR}"/${PN}-2.32.5994.102-bazel_patch-fix_shebang.patch bazel/rules_python_fix_shebang.patch || die + # fix shebang + sed -e "s:@PYTHON@:${PYTHON}:" \ + -i bazel/rules_python_fix_shebang.patch || die + + # fix paths to preserve compatibility + sed -e "/LINUX_MOZC_SERVER_DIR/s:=.*:= \"/usr/libexec/mozc\":" \ + -e "/IBUS_MOZC_PATH/s:=.*:= \"/usr/libexec/ibus-engine-mozc\":" \ + -i config.bzl || die + + # respect prefix + if [[ -n ${EPREFIX} ]]; then + sed -e "s@/usr@${EPREFIX}/usr@" -i config.bzl || die + fi + + # fix pkg-config for fcitx5 / ibus / glib / Qt + tc-export PKG_CONFIG + sed -e "s@\"pkg-config\"@\"${PKG_CONFIG}\"@" \ + -i bazel/pkg_config_repository.bzl || die + + # bug #877765 + restore_config mozcdic-ut.txt + if [[ -f /mozcdic-ut.txt && -s mozcdic-ut.txt ]]; then + einfo "mozcdic-ut.txt found. Adding to mozc dictionary..." + cat mozcdic-ut.txt >> "${S}"/data/dictionary_oss/dictionary00.txt || die + fi + + # custom the target 'package' defined in unix/BUILD.bazel + if ! mozc_icons; then + sed -e "\@:icons@d" \ + -i unix/BUILD.bazel || die + fi + + if ! use emacs; then + sed -e "\@//unix/emacs:mozc_emacs_helper@d" \ + -e "\@//unix/emacs:mozc.el@d" \ + -i unix/BUILD.bazel || die + fi + + if ! use gui; then + sed -e "\@//gui/tool:mozc_tool@d" \ + -i unix/BUILD.bazel || die + fi + + if ! use ibus; then + sed -e "\@//unix/ibus:gen_mozc_xml@d" \ + -e "\@//unix/ibus:ibus_mozc@d" \ + -i unix/BUILD.bazel || die + fi + + if ! use renderer; then + sed -e "\@//renderer/qt:mozc_renderer@d" \ + -i unix/BUILD.bazel || die + fi +} + +src_configure() { + # to investigate, but there's lot of static libs + lto-guarantee-fat + + # https://bazel.build/reference/be/make-variables + tc-export CC AR + + # fix external/zlib+ w/ clang-21 + append-cppflags -DHAVE_UNISTD_H=1 + + MYEBAZELARGS=( + --compilation_mode="$(usex debug dbg opt)" + --config="oss_linux" + --distdir="${WORKDIR}/bazel_dist" + --jobs="$(get_makeopts_jobs)" + --registry="file://${WORKDIR}/bcr" + --repository_cache="${WORKDIR}/bazel_cache" + --spawn_strategy="local" # portage is already sandboxed + --strip="$(usex debug never always)" + --subcommands # be verbose + --verbose_failures + ) + + if use fcitx5; then + MYEBAZELARGS+=( + unix/fcitx5/fcitx5-mozc.so + # just to be sure, use_server is enabled by default + --define server=1 + ) + fi + + # add all targets/testsuites by default, then filter + if use test; then + MYEBAZELARGS+=( /... ) + # not unix, no testsuite + SKIP_TESTS=( -protocol/... ) + ! use emacs && SKIP_TESTS+=( -unix/emacs/... ) + ! use gui && SKIP_TESTS+=( -gui/... ) + ! use ibus && SKIP_TESTS+=( -unix/ibus/... ) + ! use renderer && SKIP_TESTS+=( -renderer/... ) + use fcitx5 && SKIP_TESTS+=( -unix/fcitx/... ) + fi + + local cppflags + for cppflags in ${CPPFLAGS}; do + MYEBAZELARGS+=( --copt="${cppflags}" ) + done + + local cflags + for cflags in ${CFLAGS}; do + MYEBAZELARGS+=( --conlyopt="${cflags}" ) + done + + local cxxflags + for cxxflags in ${CXXFLAGS}; do + MYEBAZELARGS+=( --cxxopt="${cxxflags}" ) + done + + local ldflags + for ldflags in ${LDFLAGS}; do + MYEBAZELARGS+=( --linkopt="${ldflags}" ) + done + + # clean cache, just in case + ebazel clean --expunge + + # this build --nobuild generates bazel_cache + # this is useful to debug or make patch + ebazel build --nobuild package "${MYEBAZELARGS[@]}" -- "${SKIP_TESTS[@]}" +} + +src_compile() { + ebazel build package "${MYEBAZELARGS[@]}" -- "${SKIP_TESTS[@]}" + + # bazel-bin is a symlink, copy files to avoid problem with symlink then + cp -R bazel-bin/unix out_linux || die + + use emacs && elisp-compile unix/emacs/*.el +} + +src_test() { + ebazel test --build_tests_only "${MYEBAZELARGS[@]}" -- "${SKIP_TESTS[@]}" +} + +src_install() { + unzip -qo out_linux/mozc.zip -d "${ED}" || die + + # remove mozc.el, in a wrong path + # already compiled elsewhere and installed then + if use emacs; then + rm -r "${ED}"/usr/share/emacs/site-lisp/emacs-mozc || die + elisp-install ${PN} unix/emacs/*.{el,elc} + elisp-site-file-install "${FILESDIR}"/${SITEFILE} ${PN} + fi + + if mozc_icons; then + # remove tmp with duplicate icons zipped + rm -r "${ED}"/tmp || die + if ! use ibus; then + rm -r "${ED}"/usr/share/ibus-mozc || die + fi + if ! use gui; then + rm -r "${ED}"/usr/share/icons/mozc || die + fi + fi + + if use fcitx5; then + exeinto /usr/$(get_libdir)/fcitx5 + doexe out_linux/fcitx5/fcitx5-mozc.so + + # see scripts/install_fcitx5_data + insinto /usr/share/fcitx5/addon + newins unix/fcitx5/mozc-addon.conf mozc.conf + + insinto /usr/share/fcitx5/inputmethod + doins unix/fcitx5/mozc.conf + + export MOPREFIX="fcitx5-mozc" + local mo_file + for mo_file in unix/fcitx5/po/*.po; do + msgfmt "${mo_file}" -o "${mo_file%.po}.mo" && domo "${mo_file%.po}.mo" || die + done + + msgfmt --xml -d unix/fcitx5/po/ \ + --template unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml.in \ + -o unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml || die + insinto /usr/share/metainfo + doins unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml + + # see scripts/install_fcitx5_icons + local orgfcitx5="org.fcitx.Fcitx5.fcitx-mozc" + newicon -s 128 data/images/product_icon_32bpp-128.png ${orgfcitx5}.png + newicon -s 128 data/images/product_icon_32bpp-128.png fcitx-mozc.png + newicon -s 32 data/images/unix/ime_product_icon_opensource-32.png ${orgfcitx5}.png + newicon -s 32 data/images/unix/ime_product_icon_opensource-32.png fcitx-mozc.png + for uiimg in ../scripts/icons/ui-*.png; do + dimg="${uiimg#*ui-}" + newicon -s 48 "${uiimg}" "${orgfcitx5}-${dimg/_/-}" + newicon -s 48 "${uiimg}" "fcitx-mozc-${dimg/_/-}" + done + fi + + [[ -s mozcdic-ut.txt ]] && save_config mozcdic-ut.txt + + insinto /usr/libexec/mozc/documents + doins data/installer/credits_en.html +} + +pkg_postinst() { + elog + elog "ENVIRONMENTAL VARIABLES" + elog + elog "MOZC_SERVER_DIRECTORY" + elog " Mozc server directory" + elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc\"" + elog "MOZC_DOCUMENTS_DIRECTORY" + elog " Mozc documents directory" + elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc/documents\"" + elog "MOZC_CONFIGURATION_DIRECTORY" + elog " Mozc configuration directory" + elog " Value used by default: \"~/.mozc\"" + elog + if use emacs; then + elog + elog "USAGE IN EMACS" + elog + elog "mozc-mode is minor mode to input Japanese text using Mozc server." + elog "mozc-mode can be used via LEIM (Library of Emacs Input Method)." + elog + elog "In order to use mozc-mode by default, the following settings should be added to" + elog "Emacs init file (~/.emacs.d/init.el or ~/.emacs):" + elog + elog " (require 'mozc)" + elog " (set-language-environment \"Japanese\")" + elog " (setq default-input-method \"japanese-mozc\")" + elog + elog "With the above settings, typing C-\\ (which is bound to \"toggle-input-method\"" + elog "by default) will enable mozc-mode." + elog + elog "Alternatively, at run time, after loading mozc.el, mozc-mode can be activated by" + elog "calling \"set-input-method\" and entering \"japanese-mozc\"." + elog + + elisp-site-regen + fi + xdg_pkg_postinst +} + +pkg_postrm() { + if use emacs; then + elisp-site-regen + fi + xdg_pkg_postrm +}
