sys-apps/gptfdisk: Sync with Gentoo

It's from Gentoo commit cb6fca52f4cbb863b5cb15fd431298374e23633d.
This commit is contained in:
Flatcar Buildbot 2024-04-08 07:16:52 +00:00 committed by Krzesimir Nowak
parent 994fb0a8da
commit d4f8876847
3 changed files with 81 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST gptfdisk-1.0.10.tar.gz 220787 BLAKE2B 9047bf68a2c5c254bda9b2815488963dc19a9415c90fbf4a127268a37fe8a545b7d45a333e356bd9da22e37ef649d9f60896ffedfdc35b60c7642a48e4ed2e5a SHA512 76764e176cd92470648a1d7a8d2570ebc41005204e73b0f2dd5a7aff2fc1981d3bec61a3bd68b855cc3474bcb7cf49c1cb2ea25843d4e7945bef7648d548383d
DIST gptfdisk-1.0.9.tar.gz 215065 BLAKE2B 1939ffd75972a4d7f92af2bfab90c7b0223825b5478b6b808dd35af943c687d38ba81663cd7ba5e0f9400656db4dac019c13a9f75d90b7bd716568c676c24dd2 SHA512 c2489ac7e196cb53b9fdb18d0e421571eca43c366de8922c5c7f550aadf192558e7af69b181c30747d6cf607c1670126223465eaa5e231cc589402d94a4e97a2

View File

@ -0,0 +1,19 @@
From ade1729d1ca44b34678653fdf12e787e1afc5fd8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Wed, 13 Mar 2024 20:38:37 +0100
Subject: [PATCH] gptpart.cc: Fix Unicode to UTF-8 conversion in GetDescription
--- a/gptpart.cc
+++ b/gptpart.cc
@@ -131,7 +131,7 @@ string GPTPart::GetDescription(void) {
} // if
else {
utf8 += (char) ( 0xf0 | ( uni >> 18 ) ) ;
- utf8 += (char) ( 0xe0 | ( ( uni >> 12 ) & 0x3f ) ) ;
+ utf8 += (char) ( 0x80 | ( ( uni >> 12 ) & 0x3f ) ) ;
utf8 += (char) ( 0x80 | ( ( uni >> 6 ) & 0x3f ) ) ;
utf8 += (char) ( 0x80 | ( uni & 0x3f ) ) ;
} // if
--
2.44.0

View File

@ -0,0 +1,61 @@
# Copyright 1999-2024 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-build_flags.patch
"${FILESDIR}"/${PN}-1.0.10_utf16-to-utf8-conversion.patch
)
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
}