summaryrefslogtreecommitdiff
path: root/sys-apps/gptfdisk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-22 05:27:18 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-22 05:27:18 +0100
commit992aa50a54a56c9e705ca4e85d809ec8989d74a2 (patch)
tree163a97df1174c6bc492ee86ad54667f5267306cf /sys-apps/gptfdisk
parentce5c22ea4ab2c848cb8e0fe7be18977d51f5f0bb (diff)
gentoo auto-resync : 22:09:2022 - 05:27:18
Diffstat (limited to 'sys-apps/gptfdisk')
-rw-r--r--sys-apps/gptfdisk/Manifest2
-rw-r--r--sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch22
-rw-r--r--sys-apps/gptfdisk/gptfdisk-1.0.9-r2.ebuild61
3 files changed, 85 insertions, 0 deletions
diff --git a/sys-apps/gptfdisk/Manifest b/sys-apps/gptfdisk/Manifest
index bdd9f246e9f5..ea9797e12cd6 100644
--- a/sys-apps/gptfdisk/Manifest
+++ b/sys-apps/gptfdisk/Manifest
@@ -1,4 +1,6 @@
AUX gptfdisk-1.0.9-libuuid.patch 899 BLAKE2B 534038452a7184945486b8435099adf7f1992c4bb8618a0ed5432c7675eb653374b25417b2b21c8fc2ec0b0860303e054fb0dc71f880941712e6230ddb029358 SHA512 590b6e7c5b16762abffe68767f255414a56f7fbd691a47837a93b288bde5210a3ab4addf93725c313134c48e6d6bc69701ad3742455f48de793412616be51df3
+AUX gptfdisk-1.0.9-popt_segv.patch 671 BLAKE2B 1d46905caca1b7a403d1d200f5f0afa89953b86997f834df16002780d4371027bc34988c58b9a67e6b10a8978d4c99e93b2e711cbe00f5c49f3a868f708efc29 SHA512 b559c479dd2d62208b41a4ba3c6e68cf3e3b099d999bb8c2bbe251d77f217ccde28a44de0ca26c86004a6cecc17cf8360a120f3f1dd884ab4616c061110fde60
DIST gptfdisk-1.0.9.tar.gz 215065 BLAKE2B 1939ffd75972a4d7f92af2bfab90c7b0223825b5478b6b808dd35af943c687d38ba81663cd7ba5e0f9400656db4dac019c13a9f75d90b7bd716568c676c24dd2 SHA512 c2489ac7e196cb53b9fdb18d0e421571eca43c366de8922c5c7f550aadf192558e7af69b181c30747d6cf607c1670126223465eaa5e231cc589402d94a4e97a2
EBUILD gptfdisk-1.0.9-r1.ebuild 1287 BLAKE2B 9a46d6625eb48a72b7e4882d8ff08d5a8525f7cd9884e2b5ecaa43c13e4295a9570894d857b1b2dc5cdc3a8128de2d3439a216b0e35c1b8c08e02c297cb07713 SHA512 2083c0cf8325732699c6703545089768934f1221fc5ec93b4996e1c973a9fe6c113aef9665a2b7942d0ecefe4c907dfe3a40c04b6cec720a1ec41235c89df5d3
+EBUILD gptfdisk-1.0.9-r2.ebuild 1364 BLAKE2B 0ea266b003a89d033c6eec58246a8c328ebea8bbe503a8f17f40207daac9f8d84fd13a131afab079949c4e44d47272b22664ef81628e87599fdffee4d70e86a8 SHA512 188f2dd8c5e88725a43055e5a0e6b019010a858476ccccee0c06727aa9413d59a24f0ccd9444da61c5e2688f13c01dc9d2e782b02e86a8961e7b85a90d70aa61
MISC metadata.xml 324 BLAKE2B 71325b739cb7e216be64dfff099ebf3a3f24d8a714ce59838780b6944a65f7d9abdb9b0afb43c617364071778768a7d90da9ef8c7eb4c3bc0cd6b5dc9e04c773 SHA512 ad7457ef87228bef7db385c72bee2c9cf1f913cf261641582a57e4b72c05e7106ad39092c55e2aae1e4d92f86a0bf6f4537dd7de9fdd6e1dc64677b36df4a273
diff --git a/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch b/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch
new file mode 100644
index 000000000000..470defd33cf6
--- /dev/null
+++ b/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch
@@ -0,0 +1,22 @@
+--- a/gptcl.cc
++++ b/gptcl.cc
+@@ -156,9 +156,10 @@
+
+ // Assume first non-option argument is the device filename....
+ device = (char*) poptGetArg(poptCon);
+- poptResetContext(poptCon);
+
+ if (device != NULL) {
++ device = strdup(device);
++ poptResetContext(poptCon);
+ JustLooking(); // reset as necessary
+ BeQuiet(); // Tell called functions to be less verbose & interactive
+ if (LoadPartitions((string) device)) {
+@@ -498,6 +499,7 @@
+ cerr << "Error encountered; not saving changes.\n";
+ retval = 4;
+ } // if
++ free(device);
+ } // if (device != NULL)
+ poptFreeContext(poptCon);
+ return retval;
diff --git a/sys-apps/gptfdisk/gptfdisk-1.0.9-r2.ebuild b/sys-apps/gptfdisk/gptfdisk-1.0.9-r2.ebuild
new file mode 100644
index 000000000000..5ccaa186a5da
--- /dev/null
+++ b/sys-apps/gptfdisk/gptfdisk-1.0.9-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="GPT partition table manipulator for Linux"
+HOMEPAGE="https://www.rodsbooks.com/gdisk/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="ncurses static"
+
+# libuuid from util-linux is required.
+RDEPEND="!static? (
+ dev-libs/popt
+ ncurses? ( sys-libs/ncurses:=[unicode(+)] )
+ kernel_linux? ( sys-apps/util-linux )
+ )"
+DEPEND="
+ ${RDEPEND}
+ static? (
+ dev-libs/popt[static-libs(+)]
+ ncurses? ( sys-libs/ncurses:=[unicode(+),static-libs(+)] )
+ kernel_linux? ( sys-apps/util-linux[static-libs(+)] )
+ )
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.9-libuuid.patch" #844073
+ "${FILESDIR}/${PN}-1.0.9-popt_segv.patch" #872131
+)
+
+src_prepare() {
+ default
+
+ tc-export CXX PKG_CONFIG
+
+ if ! use ncurses ; then
+ sed -i \
+ -e '/^all:/s: cgdisk::' \
+ Makefile || die
+ fi
+
+ sed \
+ -e '/g++/s:=:?=:g' \
+ -e 's:-lncursesw:$(shell $(PKG_CONFIG) --libs ncursesw):g' \
+ -i Makefile || die
+
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dosbin gdisk sgdisk $(usex ncurses cgdisk '') fixparts
+ doman *.8
+ dodoc NEWS README
+}