From 752d6256e5204b958b0ef7905675a940b5e9172f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 12 May 2022 16:42:50 +0300 Subject: gentoo resync : 12.05.2022 --- sys-block/gparted/Manifest | 5 ++- .../gparted/files/gparted-1.3.1-musl-nullptr.patch | 51 ++++++++++++++++++++++ sys-block/gparted/gparted-1.3.1.ebuild | 6 ++- sys-block/gparted/gparted-1.4.0.ebuild | 4 ++ 4 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 sys-block/gparted/files/gparted-1.3.1-musl-nullptr.patch (limited to 'sys-block/gparted') diff --git a/sys-block/gparted/Manifest b/sys-block/gparted/Manifest index c7c5db8af5e0..dc708c7b9554 100644 --- a/sys-block/gparted/Manifest +++ b/sys-block/gparted/Manifest @@ -1,5 +1,6 @@ +AUX gparted-1.3.1-musl-nullptr.patch 2446 BLAKE2B a1a0e278edfecaac9de5068d4ff37bd7f8ee7223c46004e64ae7d26ff1e9b463e2064d20ef0e4d15fdd6a0bc00253acabee6102feb604e0016e4f2e558b6ff68 SHA512 386f3e79cd443dcd7db1c9dae2f79b070d254e86a3651b8de2386934f69724651e398e41db1365859060bb0869d35528418cec683173ee4f0d9e39fa430ac81d DIST gparted-1.3.1.tar.gz 4169647 BLAKE2B 0e79ea51df79460ae70e15a0f4d5bb1158dd808b52224bdf78f153bada278e6a8cb1606aa99e564016db0b4755e4063e0db151628d8d03904626e9f5648d61a1 SHA512 2dd2b1eae72f627d8f302d34286e684c6b884faf0246f1f534795213d243a9416ff2a7ead48f44958de1ce00248550336176c0df2469ede825b22ed1b5915c76 DIST gparted-1.4.0.tar.gz 4308426 BLAKE2B 834782196e7cfe5c5553200743cbbaf700e59ef01076919d16138e736ebbbb16185ec68cd27546f1ff851ff742c51fc170a0f6596e9b014684b8be1d29acfea9 SHA512 20f94622fc1a2727f1fc9bb39ea9f04f14af06b0ff7e47c2149730d5eb339089b0d3c21cd3c9ce6f971e955a9f6ab89cc32fd5b7545a5e340b451297d87e8f39 -EBUILD gparted-1.3.1.ebuild 2749 BLAKE2B 8e39e13a04028fe6d9f19088df2daf5b157c8a2df61eee43d0fbe6ab0b6e3d8edbd209b71418feaa4164e712647af6abb272314ce9f8f33b59a4d5d00965796c SHA512 d911cae15189272fb991b2dbc98da7528bc7fc8f75b21dd41baefd397c223e7aabdd92804945e466e26f825cd90ed5b1630f02e271a02415e712b88f2213aad3 -EBUILD gparted-1.4.0.ebuild 2760 BLAKE2B 6e889dd2da616b33a965150add96787031687a099557dd865c4a2bf430ef9fcf6e812748c455e57791155b2fda2b48c7eb49271f0d15c131217b463ea6cf9d4d SHA512 c22889177f0f9a28f157df8a334cb5bb8c27234190a9945c86ac168a9e1c4fe9deb04681a4007463e5d1956bc98ff3bedc80e0c8b02854794a775807291de0d9 +EBUILD gparted-1.3.1.ebuild 2808 BLAKE2B cc84d49cb77db5bf0b582e3bce8cf280c5cdffd378c7a5ae266930ec6fd1bf69dd2a41bc91bc403decab2638800f9a3dddc97be7e173a3842fe8d864bd063358 SHA512 4f4b19616bcc9e5158114e28a86452f0fd5a7d32dd0eb6144ae6a6b290de4ffcf614f916066df6adf916ad15fede72c0ba5de73ffb5b9715372144922de0e811 +EBUILD gparted-1.4.0.ebuild 2819 BLAKE2B 092bdc7b8c454344176701edb934ff556a40d480a8210f394e2246ba460cce2846fb32f97c3fdddda99f0cebe02dc25310b676bf7809e8c97c06a396d70ed38e SHA512 4fd82d8f29e739fe1b2874dc336b10153bcc8699785dc8441f7ca462b35dbaa9b3bdcc25ae4fab2cd2f9bc4b440d7fcaf81968cc800ce848112cb5470580f5d1 MISC metadata.xml 915 BLAKE2B 0d1b9e847455a3920c9826b8f352481448aa08b6a7625db5d19da403b5d20dcf4dcc78a9b7a3925fe06915a5078979668028c7c1e8da869a3f9d493fed22d2cb SHA512 7df8fd771da273681728e142d7e6ef10b5434dd40ac96eb2da96c1331116dbc33c7a25be5ca69dd8a56d3eb4ed961d4a51d4f0c554b44e5752169b0f5b9d2e8a diff --git a/sys-block/gparted/files/gparted-1.3.1-musl-nullptr.patch b/sys-block/gparted/files/gparted-1.3.1-musl-nullptr.patch new file mode 100644 index 000000000000..2a4f648db609 --- /dev/null +++ b/sys-block/gparted/files/gparted-1.3.1-musl-nullptr.patch @@ -0,0 +1,51 @@ +https://gitlab.gnome.org/GNOME/gparted/-/commit/3d4b1c1e7b33f229efd254fb0cc06660af627ea0 +https://bugs.gentoo.org/838466 + +From: Dominika Liberda +Date: Sun, 10 Apr 2022 21:09:56 +0200 +Subject: [PATCH] Fix NULL == 0 assumption in call to ped_partition_flag_next() + (!100) + +GParted fails to build on Alpine Linux Edge (development tree for the +next release) like this: + + GParted_Core.cc: In constructor 'GParted::GParted_Core::GParted_Core()': + GParted_Core.cc:75:64: error: invalid 'static_cast' from type 'std::nullptr_t' to type 'PedPartitionFlag' + 75 | for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast( NULL ) ) ; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The code is failing to compile now because musl libc 1.2.3 has became +more C++11 strict [1][2] by defining NULL [3] as nullptr [4] rather than +as 0. The parameter to ped_partition_flag_next() [5] should always have +been numeral 0 cast to an enumeration and never the NULL pointer. + +Fixes this commit [6] from 2004-12-27 which changed the parameter from 0 +to NULL. + +[1] define NULL as nullptr when used in C++11 or later + https://git.musl-libc.org/cgit/musl/commit?id=98e688a9da5e7b2925dda17a2d6820dddf1fb28 +[2] NULL vs nullptr (Why was it replaced?) [duplicate] + https://stackoverflow.com/questions/20509734/null-vs-nullptr-why-was-it-replaced +[3] C++ reference, NULL + https://en.cppreference.com/w/cpp/types/NULL +[4] C++ reference, nullptr + https://en.cppreference.com/w/cpp/language/nullptr +[5] libparted Documentation, ped_partition_flag_next() + https://www.gnu.org/software/parted/api/group__PedPartition.html#g0ce9ce4247b320011bc8e9d957c8cdbb +[6] Added cylsize to Device and made Operation contain a Device instead + commit 174f0cff77c5799a713954a22b2c54306d03036c + +Closes !100 - Fix NULL == 0 assumption in call to + ped_partition_flag_next() +--- a/src/GParted_Core.cc ++++ b/src/GParted_Core.cc +@@ -72,7 +72,7 @@ GParted_Core::GParted_Core() + ped_exception_set_handler( ped_exception_handler ) ; + + //get valid flags ... +- for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast( NULL ) ) ; ++ for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast( 0 ) ) ; + flag ; + flag = ped_partition_flag_next( flag ) ) + flags .push_back( flag ) ; +GitLab diff --git a/sys-block/gparted/gparted-1.3.1.ebuild b/sys-block/gparted/gparted-1.3.1.ebuild index 1368424f32cc..1119005c1bb3 100644 --- a/sys-block/gparted/gparted-1.3.1.ebuild +++ b/sys-block/gparted/gparted-1.3.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -35,6 +35,10 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${PN}-1.3.1-musl-nullptr.patch +) + src_configure() { gnome2_src_configure \ --enable-doc \ diff --git a/sys-block/gparted/gparted-1.4.0.ebuild b/sys-block/gparted/gparted-1.4.0.ebuild index 1a1cd973c18d..a209f0a714db 100644 --- a/sys-block/gparted/gparted-1.4.0.ebuild +++ b/sys-block/gparted/gparted-1.4.0.ebuild @@ -35,6 +35,10 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${PN}-1.3.1-musl-nullptr.patch +) + src_configure() { gnome2_src_configure \ --enable-doc \ -- cgit v1.2.3