diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-14 01:14:50 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-14 01:14:50 +0000 |
commit | 94eb99943eafb48140b436b347abaaee77209c01 (patch) | |
tree | bb4f0519a6c0880b24c88b1666976a36a464a8df /dev-build | |
parent | a7ec94f7d22ee22df2e424c1d3f842510b7993aa (diff) |
gentoo auto-resync : 14:01:2024 - 01:14:49
Diffstat (limited to 'dev-build')
31 files changed, 2285 insertions, 0 deletions
diff --git a/dev-build/Manifest.gz b/dev-build/Manifest.gz Binary files differindex 26a4a9034b12..f97be08e6f22 100644 --- a/dev-build/Manifest.gz +++ b/dev-build/Manifest.gz diff --git a/dev-build/meson-format-array/Manifest b/dev-build/meson-format-array/Manifest new file mode 100644 index 000000000000..9d4e02acacba --- /dev/null +++ b/dev-build/meson-format-array/Manifest @@ -0,0 +1,3 @@ +AUX meson-format-array 642 BLAKE2B 5daa5807f11f35c96d9451e5c6b7198950b4edf24119fa606620f00133075a6a830c98a05f1d3d2c7a5fac1f15107c571d6e8750a5790e3ab945cf8a07d2f51f SHA512 54c173f286cd0b98d6b69633d45b4d57dae26c561dd8c3f3bb2e6690773422c925e5f1d510d0a00f7723136b3f1ab51c5738d4bf207dcaad4d35ae6b8409cf8c +EBUILD meson-format-array-0.ebuild 640 BLAKE2B 3ef282d5ff2b5fb575d8d9d6d2946c4715377b0bd1ba2bf9332d1f81a69a62f6dabda3c05a200d866b9f1b5386a2440801f9e08becdbbcbbe40edc8d216eaa14 SHA512 c472a83cc2b27d3a0cfa349f9536a28542489bc5d2ae02a47e9f09ec11056d37e867f584b8340e94797d130e33a8c5645dea1f470f29098afec505268b88d9d3 +MISC metadata.xml 271 BLAKE2B a2279fc595f4360379e0df7685e0e2d2f14c0b06ecfc3cada635d7d993af586c3fecf94d36534208266b9f8cbe3111d1d88c5cbad3618a62694ba367eeab5369 SHA512 5d347bfa3c17b76d8f226a33620534d142c58006734529b3345791a51966b87c92a578b70cab1104caec353dfcbd6838a309d608783fea37ab36660533f62142 diff --git a/dev-build/meson-format-array/files/meson-format-array b/dev-build/meson-format-array/files/meson-format-array new file mode 100644 index 000000000000..d2bf49ba8e59 --- /dev/null +++ b/dev-build/meson-format-array/files/meson-format-array @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +import itertools +import shlex +import sys + +def quote(s): + return "'" + s.replace("\\", "\\\\").replace("'", "\\'") + "'" + +def main(args): + # Split each argument according to shell rules + args = (shlex.split(x) for x in args) + + # Flatten the resulting list of lists + args = itertools.chain.from_iterable(args) + + # Add quotes and escape embedded quotes + args = (quote(x) for x in args) + + # Format the result + print("[" + ", ".join(args) + "]") + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/dev-build/meson-format-array/meson-format-array-0.ebuild b/dev-build/meson-format-array/meson-format-array-0.ebuild new file mode 100644 index 000000000000..e9b3d6f92bc7 --- /dev/null +++ b/dev-build/meson-format-array/meson-format-array-0.ebuild @@ -0,0 +1,22 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-r1 + +DESCRIPTION="Format shell expressions into a meson array" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RDEPEND="${PYTHON_DEPS}" +S="${WORKDIR}" + +src_install() { + python_foreach_impl python_doscript "${FILESDIR}"/meson-format-array +} diff --git a/dev-build/meson-format-array/metadata.xml b/dev-build/meson-format-array/metadata.xml new file mode 100644 index 000000000000..f684895450ba --- /dev/null +++ b/dev-build/meson-format-array/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>floppym@gentoo.org</email> + <name>Mike Gilbert</name> + </maintainer> + <stabilize-allarches/> +</pkgmetadata> diff --git a/dev-build/meson/Manifest b/dev-build/meson/Manifest new file mode 100644 index 000000000000..48af99013a53 --- /dev/null +++ b/dev-build/meson/Manifest @@ -0,0 +1,37 @@ +AUX 0001-Only-convert-boolean-values-for-cmake-formats.patch 1094 BLAKE2B 3c65ba28fab604a1c63e195650a88a9ae7539a04d373e46d48fb742f372efdcebcb68977a669e7d6ceacec98db02c21b6daec45c1fea569c9cec29728ef83e6f SHA512 b6e4ee780969f858f5bd8a92998b012988df5aa6deba4666108dbed8bc77012c224499a3b09ce5278e67c41f7eaabe2cfa1452ece8877509f05241a3d5e2d7c2 +AUX 0001-Revert-clike-Deduplicate-rpath-linker-flags.patch 2283 BLAKE2B e90a39bcfbdb5695eafce58d4e2a458d61377228a8b37352862fee7e15c14137ea508d325e76eff8ca65bbba13c5d1fdbb5d51064299d8652394d79a34b85560 SHA512 095a9fd8960616a12aa1bbc3a89ff2792eb18c5c7e9b482e50fe2d39d825d073128aa77d56745ac98cefbb8de72d8f125972503ef3377bd743a6b296308951e7 +AUX 0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch 12301 BLAKE2B 44875bf6aa6e18de99e9c7202cd931f95a43dc29dac69a83cfa1cefbdf5442bc292920bd46b2479e39f150a534afe9f8db72022eb029c344b4c3e5f59a7274a6 SHA512 f106bf93bdedb82d079061715178bb0cbdf333113555ca0f61da0d0112ca6eff08135585d7e442d16a85b65232ff501a33e5ad208d230ea6d9fa10b30271f247 +AUX 1.2.2/0001-python-dependency-ensure-that-setuptools-doesn-t-inj.patch 1547 BLAKE2B 4a61642466aa4ed4eee39fce2e796832b8325938f8ca15ea86a5d4f255dbe65be837ccbcf82ebb1a766d0ff5e7d8a69e93b7676f3af421bbc6907fec0e6ca231 SHA512 efdd2b0cb9fac0188b5c21cb3f98152d488c5299820a055031f2f75598bc0a8811988511091dfc7f99440b48defdf7e80a783cb7c374ccbba2a1e4d20a9065e3 +AUX 1.2.2/0002-python-module-stop-using-distutils-schemes-on-suffic.patch 2799 BLAKE2B 1806655c247c4f009b41062e5ae5c90cb7ea3150c311bbdbc768e37a1d6e4a4599568584c1cd00a06315159422150ea953cda2325e97aae761bf6c7fb8b4b89e SHA512 3654092cd93f54af7ec7ea89f396c0e947d00b6a626037b827be589926502f37ecf3795c01d514b97a9990d95c6b5050f1304ba1de2ae867a86b3ca73a163893 +AUX 1.2.2/0003-python-module-refactor-pypy-detection-into-a-consist.patch 1295 BLAKE2B 5422ac19ec0e44e2f773851895e0fee95d71a8c2c76b904779af04d36f1e59b457f7378a2898496b24873be2262cb24a17216d1d3bbd13ced864b55047ca16e6 SHA512 5c2e389dc313fb0ac7d2a717eeda602839c610120e1251b110201e75fdd2b1e65a1870229fb327c5947ccb5ebc9f6165bb301ab6c20468943ba91dc5e6a6b36c +AUX 1.2.2/0004-python-module-stop-using-distutils-link-to-libpython.patch 3030 BLAKE2B f0e8e914799e2cc1ddd76ba70acbbaf3d6de113a8259c2910cd2fd2fe73d2c4f003314bffffd1db3ccb6338faa9a932bed43fa26b60b48d6dde89d6bbd3e2111 SHA512 97ebb84f2b76a0b08b1fafd4e7e537960d3f2c547eb03389b83f35f27f82135ae3fdba0002ae9871c0ca0b90afbea42ebb7e3a4947500d51af74536aa7acaa7e +AUX 1.2.2/0005-tests-fix-test-case-to-not-import-distutils-on-pytho.patch 1313 BLAKE2B d1555c748afcc9a77252ce72e3fe95311584f8c33802a203cbe3b5777bda03a282afcf24a45cb8ec977a99bbcdad4538a124443f8ff837a2f47d3ee6da31a5c3 SHA512 3f25299c21ab967d860a3845a75d77fc032ee5b63ce6de14cec5fb21dbc826f27923409a02d685d73a9b04ac6ab74b1b92caab7f064087bc809fc93de9609a5e +AUX 1.2.2/0006-mark-the-PyPI-metadata-as-supporting-python-3.12.patch 1092 BLAKE2B 21fd1a0edec2de670d58eab734bf5d86159c73df3016baa7c2c863a5a65b312129aaa90b26e9c64943fba5798ab87090076426f1feb4e67b590a4ed66fca8b6d SHA512 f0f56ce827ced24135d1b571cc0e28a26a21826f3a964ec59fecc16495d9fe69d7f104e53ab05c8555e6d4fc249f4c5c09e9404784aff65a0015c8ea863a74a4 +AUX 1.2.2/0007-Revert-rust-apply-global-project-and-environment-C-a.patch 4822 BLAKE2B 4746bbb6ddc587df50f1fdff039115aab0715dac5413af495fc4ccf0dc98f4d87e5eb79349ad9b26a365794ea0532f8fdd5bdb3a13257417038f7127a64c3b0b SHA512 03394dab9ca6e777cc7d41cc339da6857bf7728b8c503522948a3c67c257353063159f2bf12d652ace90761d8bae3edeaac5b1c6b125ff4781b6a99fe1a75d79 +AUX meson-0.63-xtools-support.patch 1136 BLAKE2B 7600b29f1c4accbf33ca587b848566d4f9d30e26695b125aa895ec8a48ee0f7355c7692845c0d9bbb59eb452fc0cd8b634bd2a90d8918efa0b65ef4759b56d8e SHA512 725b193afe229690b6ef0d7a2a832695b7c09ca3376512097baec597a84df6e8e18791e9f29221e8a4a3537ad2371672e74041aa05ec6a218ed9b6218ea2ab61 +AUX meson-1.2.1-llvm-17.patch 1658 BLAKE2B d111537d4b9befbb848a7da9ffc72f5cebf8caa80f2ab95f5dc3caa30481f3f055dd415e101438cb2f2b4ca8650b3c32a99dfde7029096e05d3cf9bb9ddc1828 SHA512 bc6b2bc1d60343502bf43beb655642bde3d04c10b7c068dba4bae1acec09e7907a9c09ceeacd2e82b35434c2e4f6090cc7df96130650787d4057a46d58b24ea3 +AUX meson-1.2.1-python-path.patch 1233 BLAKE2B 0e40fae6cbb9a66929d7f8d5d4e73f6e0105730722ec8db0236fc5376ad58fb4ef961531bf459d69eb4521efa3d26d74332a97fa0012b6107a49b20a86667c33 SHA512 0f072ff2eb310c9884db2fa255a6b7634d69e28f3a1e9ec3782fe63aeec1b544ff0208c5c087bb29ce08dc28a998482a5d3854bcaac372e958b483830d3c8c08 +AUX meson-1.3.1-xtools-support.patch 1174 BLAKE2B 317f723447df25cc4b9607e1ba92e1f8c1296c6c7ed7539c0b8b43d71fefa784d292786d4e4df19d0aef395eff92a72609c10555abb7b172eda7bb9fea5da685 SHA512 e13216c4fda26feae64437997b5939dab21d7d2b24bf6450657cbae4361ec50a25edf4c9e30810ae8f036c03533481b77499bc3a34727ac55592c073c7099327 +DIST meson-1.1.1.tar.gz 2125503 BLAKE2B 295b46d19c8a1d64d326a6c826e2abe11d9768902ed2f8816df18677e7f3f58decc0c660925821825ecd9a4955a65bda8b2aa66a7bb1961810d8f78f92a3fd8a SHA512 c6259d73566d2532b87e8a23951363103f7be2aacdf120e50946273a2fed6b1602104a3ffbfda159138ac8f780d2c3e67a6fe2c8c228b73c1266775491797adb +DIST meson-1.1.1.tar.gz.asc 833 BLAKE2B 165f3a0e8093995e82efcdea78b8cf0d2479505aeec145cf0c4bf3448dd74f0b5d1631e574e7d945d5b5976e11c065043ab0a6efe5646484a5bcd6386050a073 SHA512 004ec7e530ad21b012e461c8d50322295e4ec96a1a3197dbcbeb24b8bd6465a34008541e6fc547e451a50dce53f7ce170ec1bfd8c465ded56a5924e880aa0539 +DIST meson-1.2.1.tar.gz 2182126 BLAKE2B b79fa78618cbebfb26ea40e698c495e63d722ba3204d4fed92d087e4a588b49666b476c55916f1435b7ca62f24843c683f1da09751754e928c838c1bf138ce58 SHA512 6221a14a6046aaba2c6eb601a9a5b928308bbd9da813ccec16b8f7578296b27d741e30e9343723770c3c7825c86b53193b41b9672dd17468d06d3b8d743bf52e +DIST meson-1.2.1.tar.gz.asc 833 BLAKE2B e4c1ee16f65631815ce5c1be49df77b7eab91e9f256ffcbf3555d257cf468bbcca49ee79ce6ddb701f35b9be0ce6c315809094b87ccfeff8f4de2d1995dbf6ff SHA512 c41b4a6686016cddc407497b003590939760c4f19d1f4481c315024f76f1ecd055dd6f8c7ba3647549c7ff192ab10097b9d0ad64e449ab83f623ea62d0ae4703 +DIST meson-1.2.2.tar.gz 2190455 BLAKE2B b355c8e5ab7508fca51dbe5c95eea68f91b995a670ad20eb9b7e93d3c97ad5363afe3fbd39cd554d1a6953a07166851257d16706acc9db6d5265e6452e40a857 SHA512 8dde3235f31862953e2f4db2527e441dfa9413b5f7545c85949ebc0f3b58819307ca124bf04d481d6f1425d6a4c93051239a659554322af893c97b651379fa86 +DIST meson-1.2.2.tar.gz.asc 833 BLAKE2B 21c12a94ea5803b8a608d522988f9da63826bff9ce4a74c8c2cf9721d87504b930135532697e9a18710f732446dde2dc70f1c972f825542d043ae20bb76ed9f5 SHA512 9d4117a09f6852bcad7c91c0084bf6f37c05295b134d297a77b8ca5958edb93f030d05e216206c42cf2739e5a6ccdf680fb612056f3a21da9ec3ee80922236df +DIST meson-1.2.3.tar.gz 2184484 BLAKE2B 7d76c54bddba249ab97ebd5dd0afc448177ff9fa70812a8ca0cc9fe308c9b145b3fbc3ee068acae0fdc73edff42134b7a0b618cd80a05347a424aca7bc8bbef8 SHA512 cdcadc731effc1ffb2de98b795ba37955f934ed9b54b9f7f3ac5fe96ab33268d4de4fce734a4c2ef7d2ecc5051616df127e1f8665e197ff954310bf1483b81fc +DIST meson-1.2.3.tar.gz.asc 833 BLAKE2B 1416c49302aab80b5f647cc1d6cd18c36f6199e79c7d13ea284143b2423267b5823850218578626937c14589ebcdf19069b310394c63bc762ab8f59d7ebe3780 SHA512 852c031ecfe032cb48d284bb270597d114294b7d1be5dd0df6ec2f78a62e1a5ba82711bc14ae410e47ced54f99a639055a1628b0acf7aa07a3a80034fce5ebc9 +DIST meson-1.3.0.tar.gz 2222383 BLAKE2B cb9ac8e00fe924df67166938687584a9de35e784e1e52bff281649d787695d37e3044ea3d6d5869181fe1e9676b5136548293dbd5cdbd091a6de0c449b8932f5 SHA512 fbcbdd9551ad12b7be84411b96357e01c7c0c38a8e9933093d2e71ed7e12bd4278245798684d389c332eb75dd50c99310affc9acb01cf8bedd45265335083a32 +DIST meson-1.3.0.tar.gz.asc 833 BLAKE2B d83b819e75e732d694ac98412717af39a8115defc7371f1983e4619cf990b5cdfd7ab7c93911f2a8b6c7055c7252ebeba04d15f508f4278b506e326fa1801a25 SHA512 8c72bfe5f3bdec9c9f787dd5a7186599bb44079a89d0a87a535a6e890adb7718cbf570b2ac74583b72b92aa05160823a8571ca530384787c428e49d6fbe095ba +DIST meson-1.3.1.tar.gz 2222386 BLAKE2B 64d53eddc8cb321a4e2dabaa4b7499798a7b68764b1a7a5182bfa21d081dc07105acab616119b88ff610e5d75504f03d1c0aefee3602ddf538fc491ff3d0204a SHA512 6e694beb70329535faca9405358c04e2fd5a490b0c0d2678d5831b7de3477e0fcf4f6a242f1bc6218da04ac4f6e096ee53cdf273c6b6a38a35d370e8c16694ba +DIST meson-1.3.1.tar.gz.asc 833 BLAKE2B 1db7aabe3b7d491dfcd288a780d10784517a73e07348f2d5b98d1fa347dd08b2afa210511c7f5ff867b10ecd3ce470ea764b5ce6907aa7dcaa4d619f705e339c SHA512 0f652d375fa7700f3048266330d783664593c08da47d4f0d87af0be5d8b5e21113521651fb923c6a1cfe88aef7067ebd85b27946f19e71133d7c9805839fc873 +EBUILD meson-1.1.1.ebuild 3287 BLAKE2B d449d5e7511b47baf4d26aae0359183d4ef9ea21bf163d5af5fbe6cc78c44bd9788d5c807486f106be3a8abfb07cc1d34782616cffed333e94dd4225f6650056 SHA512 9fca53429ebd722f91084a4796bc1c466216b2021cb6b88e76cdaa559fefa17651d76e744e32c3126b2bad5b4ca36f5b17d402cec57a764340406610e7c97dae +EBUILD meson-1.2.1-r1.ebuild 3278 BLAKE2B b826205796d6ba329718e2fabf420ba227b26ef8c26eff417253342f4df76f3f81cd3d431018d0cc0024a55930cfaa1f484d70bd98102765f6614e585cfd87e7 SHA512 1a44a84296a297a3927230bd390d188051af6439759dddc2364871e10879b74ab1a70b52a754c7840771050ef97341ef21e8b516d8cdcc2a34e29f7c40a004b2 +EBUILD meson-1.2.1-r2.ebuild 3320 BLAKE2B 086a61e7b7e1583faf4e3e652466cf9bbf8aba03c3bff66f48e443e564d181bfde85c721c9d2696c28082ce7569533c1de78ac833a9a3809336a914e1d4aa1d4 SHA512 2ca3f9c81f5286df86c0e1b7a507686ae1ee933222bab7b1d1805f57d09da23efa81a4009dc90e09a0a5ec8582bf6fe5b709bfef4db6cece18727a893a625090 +EBUILD meson-1.2.2-r1.ebuild 3306 BLAKE2B 3407c0dd432035182c2fc2f8b346b4c71e7ccea2011359d5b655a2f74c33acc5dc771d152c4bf63c23f07552fb9e8f6215cc196a6cb048ab989a417f42efcc73 SHA512 7cb7b50865efbb26e82f54014e822c7e75bbe937d0ad7800e2122dd3274d96f60307dde8a3a807b91be9cbadcb143fd1503dff8faf0d4575f53bc07c5bcaa900 +EBUILD meson-1.2.2.ebuild 3293 BLAKE2B 2e4f4bb4e7281e0af6b93874dfe05e2536d41e00fd5997ede3ee2f20d7ea10cffa850904f881a829c51ce59e300ef71f2b5c868a21be62ed67c847f8fa43be96 SHA512 b777ef452ce8237664bd050eba18eb5b6df0d754965a7e1d42b3cc91561b58f068d649b708fe3ae8f4474693af17291e34840e843e6bf8c80da8dce4cb23169a +EBUILD meson-1.2.3.ebuild 3285 BLAKE2B f937d7add71afbfb05e1ce2f7a07c9077a76b8018d6cc3e7e5ebc029419aa45e57cb98f0b05e7236500bfdcee35a35ddbedad9c3c00133817c4b0867cea71730 SHA512 e8415edf199ad281e253331e72e7ed4e2398c658d006b54a7a89b24b9e2ce3950fb6d750c8a6b728849e973af7e576e9d95b7510d3aa27a320fc38614ec439bc +EBUILD meson-1.3.0-r1.ebuild 3410 BLAKE2B 76f565c4ecf7f1b08e3447133c87221da251362d17152e5e7151c69e33057064d9998a181a9b10c0576d2caa744e62295b41a37a27eaa4e3ebca6aa10b273a59 SHA512 15ae4d826750895062d0986130612e993b8ce4a64d7ef154e1aae458b09a7985bc5f52d0319223b4db6b8995a8cff713f3a152c5d7785e0fddbc359c355f8d1b +EBUILD meson-1.3.0-r2.ebuild 3566 BLAKE2B 2fe99b8c567c73a21c6d693fdd6bce7e27080e737bd18733bdeecdaf6d8e887b634561a0ccea9ddeef9d37fbc961e9cd81efd774a2cbc4a5c42245db3138e01c SHA512 2848384b4b620a1328463b715a40efe78265c65d6ff25cc647da9ac7adaca8c8ebe688770df45fbaadc01d5f47883799dd63aaa3db9cd2eda9ada6336198d4fb +EBUILD meson-1.3.1.ebuild 3636 BLAKE2B 6f2fe1c9eb23bd9f2bcddffc0093214f926e21b830abc45711f0e6c995d737105975a944ebf18e1b68be5073eab9721d02d0dcddd756910b5d7b000f116e494b SHA512 416fc8b13ed941a9c2a4ae5d279f01fb093fe25726585b2784a700ca5a60c07511899d42f4ede437e6f0c470a6f810bbc4b01bc7755f4fd3b4691a5cd48016e3 +EBUILD meson-9999.ebuild 3235 BLAKE2B a70383fb27538f5539c16d0ca07f1cff24def033d6bde05053657c8c5217798ce65c3e15f599aa15f54f173b7ddcceefc4debb5af4ab53284cf75900a1e97152 SHA512 6d6afb4820807ef0d852ea7d7284ca574d089767917a4f1157726505e98aad1e4c485701023bbb99d7bec174dda802ccb16375237d5e05c874b59f058eceda43 +MISC metadata.xml 472 BLAKE2B 559073667cf007cd507f379014c8d0d494908742f606ca5eeb2a0cef3b5a8cb63cea4e9aa33b228163211dff8f794d178cbcd6c91bb283f894e6b072db28bacc SHA512 9232fe05900dca57d21f41023255c9a6fba57b213737ac8842ea180681488d9a2a306c8fbeba66cf02204f4523192e64af745aa65db946beac723cfe271e4fd5 diff --git a/dev-build/meson/files/0001-Only-convert-boolean-values-for-cmake-formats.patch b/dev-build/meson/files/0001-Only-convert-boolean-values-for-cmake-formats.patch new file mode 100644 index 000000000000..394b1bbb7c1b --- /dev/null +++ b/dev-build/meson/files/0001-Only-convert-boolean-values-for-cmake-formats.patch @@ -0,0 +1,31 @@ +From 9016e6958bb83feb9a724f20d8badb116bf7c5f2 Mon Sep 17 00:00:00 2001 +From: Jan200101 <sentrycraft123@gmail.com> +Date: Tue, 21 Nov 2023 08:42:56 +0100 +Subject: [PATCH] Only convert boolean values for cmake formats + +This caused a regression with mesondefine where + `conf_data.set("FOO", true)` +turned into + `#define FOO 1` +instead of + `#define FOO` +--- + mesonbuild/utils/universal.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py +index 26194628c..93e64c0a2 100644 +--- a/mesonbuild/utils/universal.py ++++ b/mesonbuild/utils/universal.py +@@ -1210,7 +1210,7 @@ def do_replacement(regex: T.Pattern[str], line: str, + var, _ = confdata.get(varname) + if isinstance(var, str): + var_str = var +- elif isinstance(var, bool): ++ elif variable_format.startswith("cmake") and isinstance(var, bool): + var_str = str(int(var)) + elif isinstance(var, int): + var_str = str(var) +-- +2.41.0 + diff --git a/dev-build/meson/files/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch b/dev-build/meson/files/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch new file mode 100644 index 000000000000..3d40616fec1f --- /dev/null +++ b/dev-build/meson/files/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch @@ -0,0 +1,55 @@ +From 2fbc7b5ce3aced483b196dd10ca9eee1713b7494 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Tue, 26 Dec 2023 15:06:12 -0500 +Subject: [PATCH] Revert "clike: Deduplicate rpath linker flags" + +This reverts commit 53ea59ad8455277797117d225f326851fe7d369c. + +This breaks at least: +- frameworks/17 mpi +- frameworks/30 scalapack + +The problem is that openmpi's pkg-config emitted link arguments +includes: + +``` +-Wl,-rpath -Wl,/path/to/libdir +``` + +The deduplication logic in meson doesn't contain sufficient information +to tell when the compiler is passing an argument that requires values, +and definitely cannot tell when that argument is split across argv. But +for arguments that *can* do this, it is not possible to deduplicate a +single argument as standalone, because it is not standalone. + +The argument for deduplicating rpath here was that if you have multiple +dependencies that all add the same rpath, the Apple ld64 emits a +non-fatal warning "duplicate -rpath ignored". Since this is non-fatal, +it's not a major issue. A major issue is when builds fatally error out +with: + +``` +FAILED: scalapack_c +cc -o scalapack_c scalapack_c.p/main.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib64/libscalapack.so /usr/lib64/liblapack.so /usr/lib64/libblas.so -Wl,-rpath -Wl,/usr/lib64 -Wl,/usr/lib64 -Wl,--enable-new-dtags /usr/lib64/libmpi.so -Wl,--end-group +/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: error: /usr/lib64: read: Is a directory +``` +--- + mesonbuild/compilers/mixins/clike.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py +index b3fc96cec..76c8e0413 100644 +--- a/mesonbuild/compilers/mixins/clike.py ++++ b/mesonbuild/compilers/mixins/clike.py +@@ -54,7 +54,7 @@ class CLikeCompilerArgs(arglist.CompilerArgs): + + # NOTE: not thorough. A list of potential corner cases can be found in + # https://github.com/mesonbuild/meson/pull/4593#pullrequestreview-182016038 +- dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,--export-dynamic', '-Wl,-rpath') ++ dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,--export-dynamic') + dedup1_suffixes = ('.lib', '.dll', '.so', '.dylib', '.a') + dedup1_args = ('-c', '-S', '-E', '-pipe', '-pthread') + +-- +2.41.0 + diff --git a/dev-build/meson/files/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch b/dev-build/meson/files/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch new file mode 100644 index 000000000000..652ffd25228b --- /dev/null +++ b/dev-build/meson/files/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch @@ -0,0 +1,250 @@ +From 5f659af870011e74299d1455a65c2cd5f5ace51f Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Tue, 5 Dec 2023 14:26:54 -0500 +Subject: [PATCH] ninja backend: don't hide all compiler warnings for + transpiled languages + +This was originally added for vala only, with the rationale that vala +generates bad code that has warnings. Unfortunately, the rationale was +fatally flawed. The compiler warns about a number of things, which the +user can control depending on their code (or their code generator's +code), but some of those things are absolutely critical to warn about. + +In particular, GCC 14 and clang 17 are updating their defaults to warn +-- and error by default for -- invalid C code that breaks the standard, +but has been silently accepted for over 20 years "because lots of people +do it". The code in question is UB, and compilers will generate faulty +machine code that behaves erroneously and probably has a mass of CVEs +waiting to happen. + +Compiler warnings are NOT safe to just... universally turn off. Compiler +warnings could be either: + +- coding style lints + +- threatening statements that the code is factually and behaviorally wrong + +There is no magic bullet to ignore the former while respecting the +latter. And the very last thing we should ever do is pass `-w`, since +that causes ALL warnings to be disabled, even the manually added +`-Werror=XXX`. + +If vala generated code creates warnings, then the vala compiler can +decrease the log level by generating better code, or by adding warning +suppression pragmas for *specific* issues, such as unused functions. +--- + mesonbuild/backend/backends.py | 13 ++----- + mesonbuild/backend/ninjabackend.py | 19 ++++------ + .../failing build/1 vala c werror/meson.build | 10 ----- + .../failing build/1 vala c werror/prog.vala | 7 ---- + .../1 vala c werror/unused-var.c | 8 ---- + test cases/vala/5 target glib/meson.build | 4 -- + unittests/linuxliketests.py | 37 ------------------- + 7 files changed, 11 insertions(+), 87 deletions(-) + delete mode 100644 test cases/failing build/1 vala c werror/meson.build + delete mode 100644 test cases/failing build/1 vala c werror/prog.vala + delete mode 100644 test cases/failing build/1 vala c werror/unused-var.c + +diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py +index 2c24e4c31..639e07b2a 100644 +--- a/mesonbuild/backend/backends.py ++++ b/mesonbuild/backend/backends.py +@@ -986,7 +986,7 @@ class Backend: + return compiler.get_no_stdinc_args() + return [] + +- def generate_basic_compiler_args(self, target: build.BuildTarget, compiler: 'Compiler', no_warn_args: bool = False) -> 'CompilerArgs': ++ def generate_basic_compiler_args(self, target: build.BuildTarget, compiler: 'Compiler') -> 'CompilerArgs': + # Create an empty commands list, and start adding arguments from + # various sources in the order in which they must override each other + # starting from hard-coded defaults followed by build options and so on. +@@ -999,17 +999,12 @@ class Backend: + commands += self.get_no_stdlib_args(target, compiler) + # Add things like /NOLOGO or -pipe; usually can't be overridden + commands += compiler.get_always_args() +- # Only add warning-flags by default if the buildtype enables it, and if +- # we weren't explicitly asked to not emit warnings (for Vala, f.ex) +- if no_warn_args: +- commands += compiler.get_no_warn_args() +- else: +- # warning_level is a string, but mypy can't determine that +- commands += compiler.get_warn_args(T.cast('str', target.get_option(OptionKey('warning_level')))) ++ # warning_level is a string, but mypy can't determine that ++ commands += compiler.get_warn_args(T.cast('str', target.get_option(OptionKey('warning_level')))) + # Add -Werror if werror=true is set in the build options set on the + # command-line or default_options inside project(). This only sets the + # action to be done for warnings if/when they are emitted, so it's ok +- # to set it after get_no_warn_args() or get_warn_args(). ++ # to set it after or get_warn_args(). + if target.get_option(OptionKey('werror')): + commands += compiler.get_werror_args() + # Add compile args for c_* or cpp_* build options set on the +diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py +index 049ae253f..cdb747d73 100644 +--- a/mesonbuild/backend/ninjabackend.py ++++ b/mesonbuild/backend/ninjabackend.py +@@ -1939,7 +1939,7 @@ class NinjaBackend(backends.Backend): + if cratetype in {'bin', 'dylib'}: + args.extend(rustc.get_linker_always_args()) + +- args += self.generate_basic_compiler_args(target, rustc, False) ++ args += self.generate_basic_compiler_args(target, rustc) + # Rustc replaces - with _. spaces or dots are not allowed, so we replace them with underscores + args += ['--crate-name', target.name.replace('-', '_').replace(' ', '_').replace('.', '_')] + depfile = os.path.join(target.subdir, target.name + '.d') +@@ -2804,10 +2804,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) + bargs = [] + return (sargs, bargs) + +- def _generate_single_compile(self, target: build.BuildTarget, compiler: 'Compiler', +- is_generated: bool = False) -> 'CompilerArgs': ++ def _generate_single_compile(self, target: build.BuildTarget, compiler: Compiler) -> CompilerArgs: + commands = self._generate_single_compile_base_args(target, compiler) +- commands += self._generate_single_compile_target_args(target, compiler, is_generated) ++ commands += self._generate_single_compile_target_args(target, compiler) + return commands + + def _generate_single_compile_base_args(self, target: build.BuildTarget, compiler: 'Compiler') -> 'CompilerArgs': +@@ -2825,14 +2824,10 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) + return commands + + @lru_cache(maxsize=None) +- def _generate_single_compile_target_args(self, target: build.BuildTarget, compiler: 'Compiler', +- is_generated: bool = False) -> 'ImmutableListProtocol[str]': +- # The code generated by valac is usually crap and has tons of unused +- # variables and such, so disable warnings for Vala C sources. +- no_warn_args = is_generated == 'vala' ++ def _generate_single_compile_target_args(self, target: build.BuildTarget, compiler: Compiler) -> ImmutableListProtocol[str]: + # Add compiler args and include paths from several sources; defaults, + # build options, external dependencies, etc. +- commands = self.generate_basic_compiler_args(target, compiler, no_warn_args) ++ commands = self.generate_basic_compiler_args(target, compiler) + # Add custom target dirs as includes automatically, but before + # target-specific include directories. + if target.implicit_include_directories: +@@ -2901,7 +2896,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) + if use_pch and 'mw' not in compiler.id: + commands += self.get_pch_include_args(compiler, target) + +- commands += self._generate_single_compile_target_args(target, compiler, is_generated=False) ++ commands += self._generate_single_compile_target_args(target, compiler) + + # Metrowerks compilers require PCH include args to come after intraprocedural analysis args + if use_pch and 'mw' in compiler.id: +@@ -2935,7 +2930,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) + if use_pch and 'mw' not in compiler.id: + commands += self.get_pch_include_args(compiler, target) + +- commands += self._generate_single_compile_target_args(target, compiler, is_generated) ++ commands += self._generate_single_compile_target_args(target, compiler) + + # Metrowerks compilers require PCH include args to come after intraprocedural analysis args + if use_pch and 'mw' in compiler.id: +diff --git a/test cases/failing build/1 vala c werror/meson.build b/test cases/failing build/1 vala c werror/meson.build +deleted file mode 100644 +index 736d7aa43..000000000 +--- a/test cases/failing build/1 vala c werror/meson.build ++++ /dev/null +@@ -1,10 +0,0 @@ +-project('valatest', 'c', default_options : 'werror=true') +- +-if find_program('valac', required : false).found() +- add_languages('vala') +- valadeps = [dependency('glib-2.0'), dependency('gobject-2.0')] +- # Must fail due to -Werror and unused variable in C file +- executable('valaprog', 'prog.vala', 'unused-var.c', dependencies : valadeps) +-else +- executable('failprog', 'unused-var.c') +-endif +diff --git a/test cases/failing build/1 vala c werror/prog.vala b/test cases/failing build/1 vala c werror/prog.vala +deleted file mode 100644 +index 638e77660..000000000 +--- a/test cases/failing build/1 vala c werror/prog.vala ++++ /dev/null +@@ -1,7 +0,0 @@ +-class MainProg : GLib.Object { +- +- public static int main(string[] args) { +- stdout.printf("Vala is working.\n"); +- return 0; +- } +-} +diff --git a/test cases/failing build/1 vala c werror/unused-var.c b/test cases/failing build/1 vala c werror/unused-var.c +deleted file mode 100644 +index 6b85078c9..000000000 +--- a/test cases/failing build/1 vala c werror/unused-var.c ++++ /dev/null +@@ -1,8 +0,0 @@ +-#warning "something" +- +-int +-somelib(void) +-{ +- int unused_var; +- return 33; +-} +diff --git a/test cases/vala/5 target glib/meson.build b/test cases/vala/5 target glib/meson.build +index f285d9f16..089bb3c97 100644 +--- a/test cases/vala/5 target glib/meson.build ++++ b/test cases/vala/5 target glib/meson.build +@@ -1,9 +1,5 @@ + project('valatest', 'vala', 'c') + +-if not meson.is_unity() +- add_global_arguments('-Werror', language : 'c') +-endif +- + valadeps = [dependency('glib-2.0', version : '>=2.32'), dependency('gobject-2.0')] + + e = executable('valaprog', 'GLib.Thread.vala', 'retcode.c', dependencies : valadeps) +diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py +index 4fcf52e09..a02c99e8f 100644 +--- a/unittests/linuxliketests.py ++++ b/unittests/linuxliketests.py +@@ -298,43 +298,6 @@ class LinuxlikeTests(BasePlatformTests): + self.build() + self._run(self.mtest_command) + +- def test_vala_c_warnings(self): +- ''' +- Test that no warnings are emitted for C code generated by Vala. This +- can't be an ordinary test case because we need to inspect the compiler +- database. +- https://github.com/mesonbuild/meson/issues/864 +- ''' +- if not shutil.which('valac'): +- raise SkipTest('valac not installed.') +- testdir = os.path.join(self.vala_test_dir, '5 target glib') +- self.init(testdir) +- compdb = self.get_compdb() +- vala_command = None +- c_command = None +- for each in compdb: +- if each['file'].endswith('GLib.Thread.c'): +- vala_command = each['command'] +- elif each['file'].endswith('GLib.Thread.vala'): +- continue +- elif each['file'].endswith('retcode.c'): +- c_command = each['command'] +- else: +- m = 'Unknown file {!r} in vala_c_warnings test'.format(each['file']) +- raise AssertionError(m) +- self.assertIsNotNone(vala_command) +- self.assertIsNotNone(c_command) +- # -w suppresses all warnings, should be there in Vala but not in C +- self.assertIn(" -w ", vala_command) +- self.assertNotIn(" -w ", c_command) +- # -Wall enables all warnings, should be there in C but not in Vala +- self.assertNotIn(" -Wall ", vala_command) +- self.assertIn(" -Wall ", c_command) +- # -Werror converts warnings to errors, should always be there since it's +- # injected by an unrelated piece of code and the project has werror=true +- self.assertIn(" -Werror ", vala_command) +- self.assertIn(" -Werror ", c_command) +- + @skipIfNoPkgconfig + def test_qtdependency_pkgconfig_detection(self): + ''' +-- +2.41.0 + diff --git a/dev-build/meson/files/1.2.2/0001-python-dependency-ensure-that-setuptools-doesn-t-inj.patch b/dev-build/meson/files/1.2.2/0001-python-dependency-ensure-that-setuptools-doesn-t-inj.patch new file mode 100644 index 000000000000..c552831cfd6b --- /dev/null +++ b/dev-build/meson/files/1.2.2/0001-python-dependency-ensure-that-setuptools-doesn-t-inj.patch @@ -0,0 +1,39 @@ +From 5f96e35b873d6230970fd63ba2e706bbd3f4e26f Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Fri, 8 Sep 2023 16:54:48 -0400 +Subject: [PATCH 1/7] python dependency: ensure that setuptools doesn't inject + itself into distutils + +We do not use setuptools for anything, and only lightly use distutils. +Unpredictable issues can occur due to setuptools monkey-patching, which +interferes with our intended use. Tell setuptools to simply never get +involved. + +Note: while it's otherwise possible to check if the probe is run using +sys.executable and avoid forking, setuptools unconditionally injects +itself at startup in a way that requires subprocess isolation to +disable. + +(cherry picked from commit 9f610ad5b72ea91de2d7aeb6f3266d0a7477062e) +--- + mesonbuild/dependencies/python.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py +index 160772888..f04494674 100644 +--- a/mesonbuild/dependencies/python.py ++++ b/mesonbuild/dependencies/python.py +@@ -113,7 +113,9 @@ class BasicPythonExternalProgram(ExternalProgram): + + with importlib.resources.path('mesonbuild.scripts', 'python_info.py') as f: + cmd = self.get_command() + [str(f)] +- p, stdout, stderr = mesonlib.Popen_safe(cmd) ++ env = os.environ.copy() ++ env['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib' ++ p, stdout, stderr = mesonlib.Popen_safe(cmd, env=env) + + try: + info = json.loads(stdout) +-- +2.42.0 + diff --git a/dev-build/meson/files/1.2.2/0002-python-module-stop-using-distutils-schemes-on-suffic.patch b/dev-build/meson/files/1.2.2/0002-python-module-stop-using-distutils-schemes-on-suffic.patch new file mode 100644 index 000000000000..51c13d6926ff --- /dev/null +++ b/dev-build/meson/files/1.2.2/0002-python-module-stop-using-distutils-schemes-on-suffic.patch @@ -0,0 +1,72 @@ +From cb4e62a8c55118988babac8b8254e0af1dc9698b Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz@archlinux.org> +Date: Mon, 21 Nov 2022 20:47:14 -0500 +Subject: [PATCH 2/7] python module: stop using distutils schemes on + sufficiently new Debian + +Since 3.10.3, Debian finally started patching sysconfig with custom +paths, instead of just distutils. This means we can now go use that +instead. It reduces our reliance on the deprecated distutils module. + +Partial fix for #7702 + +(cherry picked from commit 40f897fa92f7d3cc43788d3000733310ce77cf0c) +--- + mesonbuild/scripts/python_info.py | 32 +++++++++++++++++++++++-------- + 1 file changed, 24 insertions(+), 8 deletions(-) + +diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py +index 9c3a0791a..65597b121 100755 +--- a/mesonbuild/scripts/python_info.py ++++ b/mesonbuild/scripts/python_info.py +@@ -13,7 +13,6 @@ if sys.path[0].endswith('scripts'): + del sys.path[0] + + import json, os, sysconfig +-import distutils.command.install + + def get_distutils_paths(scheme=None, prefix=None): + import distutils.dist +@@ -37,15 +36,32 @@ def get_distutils_paths(scheme=None, prefix=None): + # default scheme to a custom one pointing to /usr/local and replacing + # site-packages with dist-packages. + # See https://github.com/mesonbuild/meson/issues/8739. +-# XXX: We should be using sysconfig, but Debian only patches distutils. ++# ++# We should be using sysconfig, but before 3.10.3, Debian only patches distutils. ++# So we may end up falling back. + +-if 'deb_system' in distutils.command.install.INSTALL_SCHEMES: +- paths = get_distutils_paths(scheme='deb_system') +- install_paths = get_distutils_paths(scheme='deb_system', prefix='') +-else: +- paths = sysconfig.get_paths() ++def get_install_paths(): ++ if sys.version_info >= (3, 10): ++ scheme = sysconfig.get_default_scheme() ++ else: ++ scheme = sysconfig._get_default_scheme() ++ ++ if sys.version_info >= (3, 10, 3): ++ if 'deb_system' in sysconfig.get_scheme_names(): ++ scheme = 'deb_system' ++ else: ++ import distutils.command.install ++ if 'deb_system' in distutils.command.install.INSTALL_SCHEMES: ++ paths = get_distutils_paths(scheme='deb_system') ++ install_paths = get_distutils_paths(scheme='deb_system', prefix='') ++ return paths, install_paths ++ ++ paths = sysconfig.get_paths(scheme=scheme) + empty_vars = {'base': '', 'platbase': '', 'installed_base': ''} +- install_paths = sysconfig.get_paths(vars=empty_vars) ++ install_paths = sysconfig.get_paths(scheme=scheme, vars=empty_vars) ++ return paths, install_paths ++ ++paths, install_paths = get_install_paths() + + def links_against_libpython(): + from distutils.core import Distribution, Extension +-- +2.42.0 + diff --git a/dev-build/meson/files/1.2.2/0003-python-module-refactor-pypy-detection-into-a-consist.patch b/dev-build/meson/files/1.2.2/0003-python-module-refactor-pypy-detection-into-a-consist.patch new file mode 100644 index 000000000000..484e967c8328 --- /dev/null +++ b/dev-build/meson/files/1.2.2/0003-python-module-refactor-pypy-detection-into-a-consist.patch @@ -0,0 +1,36 @@ +From c179c18765514d5c37737dec996b4c91cb31477f Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Mon, 2 Oct 2023 16:40:15 -0400 +Subject: [PATCH 3/7] python module: refactor pypy detection into a consistent + variable + +(cherry picked from commit 3d3a10ef022284c8377bd9f8e1b1adec73c50d95) +--- + mesonbuild/scripts/python_info.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py +index 65597b121..d17b3a376 100755 +--- a/mesonbuild/scripts/python_info.py ++++ b/mesonbuild/scripts/python_info.py +@@ -72,6 +72,8 @@ def links_against_libpython(): + variables = sysconfig.get_config_vars() + variables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)}) + ++is_pypy = '__pypy__' in sys.builtin_module_names ++ + if sys.version_info < (3, 0): + suffix = variables.get('SO') + elif sys.version_info < (3, 8, 7): +@@ -88,7 +90,7 @@ print(json.dumps({ + 'install_paths': install_paths, + 'version': sysconfig.get_python_version(), + 'platform': sysconfig.get_platform(), +- 'is_pypy': '__pypy__' in sys.builtin_module_names, ++ 'is_pypy': is_pypy, + 'is_venv': sys.prefix != variables['base_prefix'], + 'link_libpython': links_against_libpython(), + 'suffix': suffix, +-- +2.42.0 + diff --git a/dev-build/meson/files/1.2.2/0004-python-module-stop-using-distutils-link-to-libpython.patch b/dev-build/meson/files/1.2.2/0004-python-module-stop-using-distutils-link-to-libpython.patch new file mode 100644 index 000000000000..2ebdbcc2b30f --- /dev/null +++ b/dev-build/meson/files/1.2.2/0004-python-module-stop-using-distutils-link-to-libpython.patch @@ -0,0 +1,72 @@ +From 3c493dae4bd8410bfb09e8f654605f65e15d8e66 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz@archlinux.org> +Date: Tue, 22 Nov 2022 22:56:10 -0500 +Subject: [PATCH 4/7] python module: stop using distutils "link to libpython" + probe on recent python + +On python >=3.8, this information is expected to be encoded in the +sysconfig vars. + +In distutils, it is always necessary to link to libpython on Windows; +for posix platforms, it depends on the value of LIBPYTHON (which is the +library to link to, possibly the empty string) as generated by +configure.ac and embedded into python.pc and python-config.sh, and then +coded a second time in the distutils python sources. + +There are a couple of caveats which have ramifications for Cygwin and +Android: + +- python.pc and python-config.sh disagree with distutils when python is + not built shared. In that case, the former act the same as a shared + build, while the latter *never* links to libpython + +- python.pc disagrees with python-config.sh and distutils when python is + built shared. The former never links to libpython, while the latter do + +The disagreement is resolved in favor of distutils' behavior in all +cases, and python.pc is correct for our purposes on python 3.12; see: +https://github.com/python/cpython/pull/100356 +https://github.com/python/cpython/pull/100967 + +Although it was not backported to older releases, Cygwin at least has +always patched in a fix for python.pc, which behavior is now declared +canonical. We can reliably assume it is always correct. + +This is the other half of the fix for #7702 + +(cherry picked from commit 2d6c10908b3771216e7ce086af1ee4dc77e698c2) +--- + mesonbuild/scripts/python_info.py | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py +index d17b3a376..a3f3d3535 100755 +--- a/mesonbuild/scripts/python_info.py ++++ b/mesonbuild/scripts/python_info.py +@@ -64,10 +64,19 @@ def get_install_paths(): + paths, install_paths = get_install_paths() + + def links_against_libpython(): +- from distutils.core import Distribution, Extension +- cmd = Distribution().get_command_obj('build_ext') +- cmd.ensure_finalized() +- return bool(cmd.get_libraries(Extension('dummy', []))) ++ # on versions supporting python-embed.pc, this is the non-embed lib ++ # ++ # PyPy is not yet up to 3.12 and work is still pending to export the ++ # relevant information (it doesn't automatically provide arbitrary ++ # Makefile vars) ++ if sys.version_info >= (3, 8) and not is_pypy: ++ variables = sysconfig.get_config_vars() ++ return bool(variables.get('LIBPYTHON', 'yes')) ++ else: ++ from distutils.core import Distribution, Extension ++ cmd = Distribution().get_command_obj('build_ext') ++ cmd.ensure_finalized() ++ return bool(cmd.get_libraries(Extension('dummy', []))) + + variables = sysconfig.get_config_vars() + variables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)}) +-- +2.42.0 + diff --git a/dev-build/meson/files/1.2.2/0005-tests-fix-test-case-to-not-import-distutils-on-pytho.patch b/dev-build/meson/files/1.2.2/0005-tests-fix-test-case-to-not-import-distutils-on-pytho.patch new file mode 100644 index 000000000000..078e9035e228 --- /dev/null +++ b/dev-build/meson/files/1.2.2/0005-tests-fix-test-case-to-not-import-distutils-on-pytho.patch @@ -0,0 +1,31 @@ +From ae44d9a379faca6274db819be44ffca3e0159f56 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Mon, 2 Oct 2023 23:51:57 -0400 +Subject: [PATCH 5/7] tests: fix test case to not import distutils on python + 3.12 + +Testing the correctness of the `modules: ` kwarg can be done with other +guaranteed stdlib modules that are even more guaranteed since they +didn't get deprecated for removal. + +(cherry picked from commit ecf261330c498783760cbde00b613b7469f8d3c0) +--- + test cases/python/5 modules kwarg/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test cases/python/5 modules kwarg/meson.build b/test cases/python/5 modules kwarg/meson.build +index 9751adaab..41a9a4fae 100644 +--- a/test cases/python/5 modules kwarg/meson.build ++++ b/test cases/python/5 modules kwarg/meson.build +@@ -1,7 +1,7 @@ + project('python kwarg') + + py = import('python') +-prog_python = py.find_installation('python3', modules : ['distutils']) ++prog_python = py.find_installation('python3', modules : ['os', 'sys', 're']) + assert(prog_python.found() == true, 'python not found when should be') + prog_python = py.find_installation('python3', modules : ['thisbetternotexistmod'], required : false) + assert(prog_python.found() == false, 'python not found but reported as found') +-- +2.42.0 + diff --git a/dev-build/meson/files/1.2.2/0006-mark-the-PyPI-metadata-as-supporting-python-3.12.patch b/dev-build/meson/files/1.2.2/0006-mark-the-PyPI-metadata-as-supporting-python-3.12.patch new file mode 100644 index 000000000000..0e1f167b32fb --- /dev/null +++ b/dev-build/meson/files/1.2.2/0006-mark-the-PyPI-metadata-as-supporting-python-3.12.patch @@ -0,0 +1,25 @@ +From d9abf4a97dc182b3c57204a792000d620f9f941e Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Tue, 3 Oct 2023 00:22:25 -0400 +Subject: [PATCH 6/7] mark the PyPI metadata as supporting python 3.12 + +meson itself runs okay on 3.12, and the last issue for *probing* against +3.12 is solved. Tests pass here locally. + +(cherry picked from commit 880f21281ee359e01de659fe7d45549d19e6b84d) +--- + setup.cfg | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.cfg b/setup.cfg +index dfaba76dd..2f2962eed 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -30,6 +30,7 @@ classifiers = + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 ++ Programming Language :: Python :: 3.12 + Topic :: Software Development :: Build Tools + long_description = Meson is a cross-platform build system designed to be both as fast and as user friendly as possible. It supports many languages and compilers, including GCC, Clang, PGI, Intel, and Visual Studio. Its build definitions are written in a simple non-Turing complete DSL. + diff --git a/dev-build/meson/files/1.2.2/0007-Revert-rust-apply-global-project-and-environment-C-a.patch b/dev-build/meson/files/1.2.2/0007-Revert-rust-apply-global-project-and-environment-C-a.patch new file mode 100644 index 000000000000..4ada76ae909b --- /dev/null +++ b/dev-build/meson/files/1.2.2/0007-Revert-rust-apply-global-project-and-environment-C-a.patch @@ -0,0 +1,141 @@ +From 9d1d4ae746ce39d1916dfe71fd6dcc5fce27e828 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Tue, 3 Oct 2023 16:52:56 +0100 +Subject: [PATCH 7/7] Revert "rust: apply global, project, and environment C + args to bindgen" + +This reverts commit 36210f64f22dc10d324db76bb1a7988c9cd5b14e. + +This ended up not doing what was intended - see https://github.com/mesonbuild/meson/issues/12065#issuecomment-1742263677. + +Bug: https://bugs.gentoo.org/914989 +Bug: https://bugs.gentoo.org/915014 +Signed-off-by: Sam James <sam@gentoo.org> +--- + mesonbuild/modules/rust.py | 6 ------ + test cases/rust/12 bindgen/meson.build | 18 ------------------ + .../rust/12 bindgen/src/global-project.h | 10 ---------- + test cases/rust/12 bindgen/src/global.c | 5 ----- + test cases/rust/12 bindgen/src/global.rs | 14 -------------- + test cases/rust/12 bindgen/test.json | 5 +---- + 6 files changed, 1 insertion(+), 57 deletions(-) + delete mode 100644 test cases/rust/12 bindgen/src/global-project.h + delete mode 100644 test cases/rust/12 bindgen/src/global.c + delete mode 100644 test cases/rust/12 bindgen/src/global.rs + +diff --git a/mesonbuild/modules/rust.py b/mesonbuild/modules/rust.py +index e6e5c633f..3514412e6 100644 +--- a/mesonbuild/modules/rust.py ++++ b/mesonbuild/modules/rust.py +@@ -232,12 +232,6 @@ class RustModule(ExtensionModule): + elif isinstance(s, CustomTarget): + depends.append(s) + +- clang_args.extend(state.global_args.get('c', [])) +- clang_args.extend(state.project_args.get('c', [])) +- cargs = state.get_option('args', state.subproject, lang='c') +- assert isinstance(cargs, list), 'for mypy' +- clang_args.extend(cargs) +- + if self._bindgen_bin is None: + self._bindgen_bin = state.find_program('bindgen') + +diff --git a/test cases/rust/12 bindgen/meson.build b/test cases/rust/12 bindgen/meson.build +index e7cb5f3db..c05cc0631 100644 +--- a/test cases/rust/12 bindgen/meson.build ++++ b/test cases/rust/12 bindgen/meson.build +@@ -8,9 +8,6 @@ if not prog_bindgen.found() + error('MESON_SKIP_TEST bindgen not found') + endif + +-add_project_arguments('-DPROJECT_ARG', language : 'c') +-add_global_arguments('-DGLOBAL_ARG', language : 'c') +- + # This seems to happen on windows when libclang.dll is not in path or is not + # valid. We must try to process a header file for this to work. + # +@@ -84,18 +81,3 @@ test('generated header', rust_bin2) + + subdir('sub') + subdir('dependencies') +- +-gp = rust.bindgen( +- input : 'src/global-project.h', +- output : 'global-project.rs', +-) +- +-gp_lib = static_library('gp_lib', 'src/global.c') +- +-gp_exe = executable( +- 'gp_exe', +- structured_sources(['src/global.rs', gp]), +- link_with : gp_lib, +-) +- +-test('global and project arguments', gp_exe) +diff --git a/test cases/rust/12 bindgen/src/global-project.h b/test cases/rust/12 bindgen/src/global-project.h +deleted file mode 100644 +index 6084e8ed6..000000000 +--- a/test cases/rust/12 bindgen/src/global-project.h ++++ /dev/null +@@ -1,10 +0,0 @@ +-#ifndef GLOBAL_ARG +-char * success(void); +-#endif +-#ifndef PROJECT_ARG +-char * success(void); +-#endif +-#ifndef CMD_ARG +-char * success(void); +-#endif +-int success(void); +diff --git a/test cases/rust/12 bindgen/src/global.c b/test cases/rust/12 bindgen/src/global.c +deleted file mode 100644 +index 10f6676f7..000000000 +--- a/test cases/rust/12 bindgen/src/global.c ++++ /dev/null +@@ -1,5 +0,0 @@ +-#include "src/global-project.h" +- +-int success(void) { +- return 0; +-} +diff --git a/test cases/rust/12 bindgen/src/global.rs b/test cases/rust/12 bindgen/src/global.rs +deleted file mode 100644 +index 4b70b1ecc..000000000 +--- a/test cases/rust/12 bindgen/src/global.rs ++++ /dev/null +@@ -1,14 +0,0 @@ +-// SPDX-license-identifer: Apache-2.0 +-// Copyright © 2023 Intel Corporation +- +-#![allow(non_upper_case_globals)] +-#![allow(non_camel_case_types)] +-#![allow(non_snake_case)] +- +-include!("global-project.rs"); +- +-fn main() { +- unsafe { +- std::process::exit(success()); +- }; +-} +diff --git a/test cases/rust/12 bindgen/test.json b/test cases/rust/12 bindgen/test.json +index b3a758562..f94ee85f9 100644 +--- a/test cases/rust/12 bindgen/test.json ++++ b/test cases/rust/12 bindgen/test.json +@@ -1,10 +1,7 @@ + { +- "env": { +- "CFLAGS": "-DCMD_ARG" +- }, + "stdout": [ + { +- "line": "test cases/rust/12 bindgen/meson.build:30: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]." ++ "line": "test cases/rust/12 bindgen/meson.build:27: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]." + } + ] + } +-- +2.42.0 + diff --git a/dev-build/meson/files/meson-0.63-xtools-support.patch b/dev-build/meson/files/meson-0.63-xtools-support.patch new file mode 100644 index 000000000000..ea1e8597b00a --- /dev/null +++ b/dev-build/meson/files/meson-0.63-xtools-support.patch @@ -0,0 +1,26 @@ +linkers_detect: detect xtools (Apple ld64 derivative) + +xtools is in use on x86_64 and ppc based darwin Prefix installs. Pick +it up as a valid linker. + +Meson is the only thing known at this point to try and figure out what +linker is in use exactly, so instead of changing the linker (xtools), +just teach Meson about xtools. + +Author: Fabian Groffen <grobian@gentoo.org> +Bug: https://bugs.gentoo.org/868516 + +--- a/mesonbuild/linkers/detect.py ++++ b/mesonbuild/linkers/detect.py +@@ -188,6 +188,11 @@ + v = search_version(o) + + linker = LLVMDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) ++ # detect xtools first, bug #868516 ++ elif 'xtools-' in o.split('\n')[0]: ++ xtools = o.split(' ')[0] ++ v = xtools.split('-')[1] ++ linker = AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) + # first might be apple clang, second is for real gcc, the third is icc + elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option:' in e: + if isinstance(comp_class.LINKER_PREFIX, str): diff --git a/dev-build/meson/files/meson-1.2.1-llvm-17.patch b/dev-build/meson/files/meson-1.2.1-llvm-17.patch new file mode 100644 index 000000000000..ceee1dcd292b --- /dev/null +++ b/dev-build/meson/files/meson-1.2.1-llvm-17.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/914576 +https://github.com/mesonbuild/meson/commit/d0b09898c703f6c10ec5a6b2aeace0df2e3570aa +https://github.com/mesonbuild/meson/commit/9c74c73bc7107c794e7f9896cc4220e50ad32bba + +From d0b09898c703f6c10ec5a6b2aeace0df2e3570aa Mon Sep 17 00:00:00 2001 +From: Christoph Reiter <reiter.christoph@gmail.com> +Date: Sat, 23 Sep 2023 17:21:43 +0200 +Subject: [PATCH] get_llvm_tool_names: add llvm 17 + +this fixes the "frameworks: 15 llvm" tests with llvm 17 +--- a/mesonbuild/environment.py ++++ b/mesonbuild/environment.py +@@ -157,6 +157,7 @@ def get_llvm_tool_names(tool: str) -> T.List[str]: + # unless it becomes a stable release. + suffixes = [ + '', # base (no suffix) ++ '-17', '17', + '-16', '16', + '-15', '15', + '-14', '14', + +From 9c74c73bc7107c794e7f9896cc4220e50ad32bba Mon Sep 17 00:00:00 2001 +From: Christoph Reiter <reiter.christoph@gmail.com> +Date: Sat, 23 Sep 2023 14:10:29 +0200 +Subject: [PATCH] openmp: add 5.1/5.2, fixes openmp with llvm v17 + +llvm v17 defaults to 5.1 and without this meson fails to find +openmp: 'ERROR: Dependency "openmp" not found, tried system' + +Add 5.2 as well while at it. +--- a/mesonbuild/dependencies/misc.py ++++ b/mesonbuild/dependencies/misc.py +@@ -85,6 +85,8 @@ def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): + class OpenMPDependency(SystemDependency): + # Map date of specification release (which is the macro value) to a version. + VERSIONS = { ++ '202111': '5.2', ++ '202011': '5.1', + '201811': '5.0', + '201611': '5.0-revision1', # This is supported by ICC 19.x + '201511': '4.5', diff --git a/dev-build/meson/files/meson-1.2.1-python-path.patch b/dev-build/meson/files/meson-1.2.1-python-path.patch new file mode 100644 index 000000000000..d6151881f83f --- /dev/null +++ b/dev-build/meson/files/meson-1.2.1-python-path.patch @@ -0,0 +1,26 @@ +From 2b33c94e6315e9a397dd48a58a5becb0df3b8aba Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Sat, 12 Aug 2023 09:56:44 +0100 +Subject: [PATCH 2/2] python module: Respect PATH when python is not given in + machine file + +We should only fall back to the Python interpreter running Meson itself +if `python3` is not found in the PATH. + +https://github.com/mesonbuild/meson/pull/12116 + +diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py +index 5654e4231..2b2395a9b 100644 +--- a/mesonbuild/modules/python.py ++++ b/mesonbuild/modules/python.py +@@ -381,7 +381,9 @@ class PythonModule(ExtensionModule): + + def _find_installation_impl(self, state: 'ModuleState', display_name: str, name_or_path: str, required: bool) -> MaybePythonProg: + if not name_or_path: +- python = PythonExternalProgram('python3', mesonlib.python_command) ++ python = PythonExternalProgram('python3') ++ if not python.found(): ++ python = PythonExternalProgram('python3', mesonlib.python_command) + else: + tmp_python = ExternalProgram.from_entry(display_name, name_or_path) + python = PythonExternalProgram(display_name, ext_prog=tmp_python) diff --git a/dev-build/meson/files/meson-1.3.1-xtools-support.patch b/dev-build/meson/files/meson-1.3.1-xtools-support.patch new file mode 100644 index 000000000000..6e9e670ba8da --- /dev/null +++ b/dev-build/meson/files/meson-1.3.1-xtools-support.patch @@ -0,0 +1,26 @@ +linkers_detect: detect xtools (Apple ld64 derivative) + +xtools is in use on x86_64 and ppc based darwin Prefix installs. Pick +it up as a valid linker. + +Meson is the only thing known at this point to try and figure out what +linker is in use exactly, so instead of changing the linker (xtools), +just teach Meson about xtools. + +Author: Fabian Groffen <grobian@gentoo.org> +Bug: https://bugs.gentoo.org/868516 + +--- a/mesonbuild/linkers/detect.py ++++ b/mesonbuild/linkers/detect.py +@@ -185,6 +185,11 @@ + v = search_version(o) + + linker = linkers.LLVMDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) ++ # detect xtools first, bug #868516 ++ elif 'xtools-' in o.split('\n')[0]: ++ xtools = o.split(' ')[0] ++ v = xtools.split('-')[1] ++ linker = AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v) + # First might be apple clang, second is for real gcc, the third is icc. + # Note that "ld: unknown option: " sometimes instead is "ld: unknown options:". + elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option' in e: diff --git a/dev-build/meson/meson-1.1.1.ebuild b/dev-build/meson/meson-1.1.1.ebuild new file mode 100644 index 000000000000..e7cc67555212 --- /dev/null +++ b/dev-build/meson/meson-1.1.1.ebuild @@ -0,0 +1,129 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.63-xtools-support.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.2.1-r1.ebuild b/dev-build/meson/meson-1.2.1-r1.ebuild new file mode 100644 index 000000000000..5443030fc815 --- /dev/null +++ b/dev-build/meson/meson-1.2.1-r1.ebuild @@ -0,0 +1,129 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-python-path.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.2.1-r2.ebuild b/dev-build/meson/meson-1.2.1-r2.ebuild new file mode 100644 index 000000000000..8394dad75715 --- /dev/null +++ b/dev-build/meson/meson-1.2.1-r2.ebuild @@ -0,0 +1,130 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-python-path.patch + "${FILESDIR}"/${P}-llvm-17.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.2.2-r1.ebuild b/dev-build/meson/meson-1.2.2-r1.ebuild new file mode 100644 index 000000000000..f19775d1fd3d --- /dev/null +++ b/dev-build/meson/meson-1.2.2-r1.ebuild @@ -0,0 +1,130 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch + "${FILESDIR}"/1.2.2 +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.2.2.ebuild b/dev-build/meson/meson-1.2.2.ebuild new file mode 100644 index 000000000000..2562b7ab025f --- /dev/null +++ b/dev-build/meson/meson-1.2.2.ebuild @@ -0,0 +1,129 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.2.3.ebuild b/dev-build/meson/meson-1.2.3.ebuild new file mode 100644 index 000000000000..9c472cdd34c0 --- /dev/null +++ b/dev-build/meson/meson-1.2.3.ebuild @@ -0,0 +1,129 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.3.0-r1.ebuild b/dev-build/meson/meson-1.3.0-r1.ebuild new file mode 100644 index 000000000000..63d6c0a17684 --- /dev/null +++ b/dev-build/meson/meson-1.3.0-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch + + # backport fix for broken configure_file() + "${FILESDIR}"/0001-Only-convert-boolean-values-for-cmake-formats.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.3.0-r2.ebuild b/dev-build/meson/meson-1.3.0-r2.ebuild new file mode 100644 index 000000000000..c663b7fe3456 --- /dev/null +++ b/dev-build/meson/meson-1.3.0-r2.ebuild @@ -0,0 +1,135 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch + + # backport fix for broken configure_file() + "${FILESDIR}"/0001-Only-convert-boolean-values-for-cmake-formats.patch + + # backport fix for hiding compiler warnings (such as Modern C) in vala and cython + "${FILESDIR}"/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-1.3.1.ebuild b/dev-build/meson/meson-1.3.1.ebuild new file mode 100644 index 000000000000..0f026f75c31e --- /dev/null +++ b/dev-build/meson/meson-1.3.1.ebuild @@ -0,0 +1,134 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-python-path.patch + "${FILESDIR}"/${PN}-1.3.1-xtools-support.patch + + # backport fix for hiding compiler warnings (such as Modern C) in vala and cython + "${FILESDIR}"/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch + + # backport revert for broken rpath changes: https://github.com/mesonbuild/meson/pull/12672 + "${FILESDIR}"/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch +) + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # remove unwanted python_wrapper_setup contents + # We actually do want to non-error if python2 is installed and tested. + remove="${T}/${EPYTHON}/bin:" + PATH=${PATH/${remove}/} + + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + ${EPYTHON} -u run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/meson-9999.ebuild b/dev-build/meson/meson-9999.ebuild new file mode 100644 index 000000000000..4e7497b5c819 --- /dev/null +++ b/dev-build/meson/meson-9999.ebuild @@ -0,0 +1,125 @@ +# Copyright 2016-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +DISTUTILS_USE_PEP517=setuptools + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="https://github.com/mesonbuild/meson" + inherit git-r3 +else + inherit verify-sig + + MY_PV=${PV/_/} + MY_P=${P/_/} + S=${WORKDIR}/${MY_P} + + SRC_URI=" + https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz + verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc ) + " + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +inherit bash-completion-r1 distutils-r1 toolchain-funcs + +DESCRIPTION="Open source build system" +HOMEPAGE="https://mesonbuild.com/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-libs/glib:2 + dev-libs/gobject-introspection + app-alternatives/ninja + dev-vcs/git + sys-libs/zlib[static-libs(+)] + virtual/pkgconfig + ) +" +RDEPEND=" + virtual/pkgconfig +" + +python_prepare_all() { + local disable_unittests=( + # ASAN and sandbox both want control over LD_PRELOAD + # https://bugs.gentoo.org/673016 + -e 's/test_generate_gir_with_address_sanitizer/_&/' + + # ASAN is unsupported on some targets + # https://bugs.gentoo.org/692822 + -e 's/test_pch_with_address_sanitizer/_&/' + + # https://github.com/mesonbuild/meson/issues/7203 + -e 's/test_templates/_&/' + + # Broken due to python2 wrapper + -e 's/test_python_module/_&/' + ) + + sed -i "${disable_unittests[@]}" unittests/*.py || die + + # Broken due to python2 script created by python_wrapper_setup + rm -r "test cases/frameworks/1 boost" || die + + distutils-r1_python_prepare_all +} + +src_test() { + tc-export PKG_CONFIG + if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then + ewarn "Found Qt5Core but not Qt5Gui; skipping tests" + else + distutils-r1_src_test + fi +} + +python_test() { + ( + # test_meson_installed + unset PYTHONDONTWRITEBYTECODE + + # https://bugs.gentoo.org/687792 + unset PKG_CONFIG + + # test_cross_file_system_paths + unset XDG_DATA_HOME + + # 'test cases/unit/73 summary' expects 80 columns + export COLUMNS=80 + + # If JAVA_HOME is not set, meson looks for javac in PATH. + # If javac is in /usr/bin, meson assumes /usr/include is a valid + # JDK include path. Setting JAVA_HOME works around this broken + # autodetection. If no JDK is installed, we should end up with an empty + # value in JAVA_HOME, and the tests should get skipped. + export JAVA_HOME=$(java-config -O 2>/dev/null) + + # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled. + python3 run_tests.py + ) || die "Testing failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /usr/share/vim/vimfiles + doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax} + + insinto /usr/share/zsh/site-functions + doins data/shell-completions/zsh/_meson + + dobashcomp data/shell-completions/bash/meson +} diff --git a/dev-build/meson/metadata.xml b/dev-build/meson/metadata.xml new file mode 100644 index 000000000000..f4b485f0bec2 --- /dev/null +++ b/dev-build/meson/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>eschwartz93@gmail.com</email> + <name>Eli Schwartz</name> + </maintainer> + <upstream> + <remote-id type="github">mesonbuild/meson</remote-id> + <remote-id type="pypi">meson</remote-id> + </upstream> +</pkgmetadata> |