From 3a86a798fef99859e78eeb0a34d5b5de37bf3870 Mon Sep 17 00:00:00 2001 From: fbrosson Date: Wed, 13 Jun 2018 14:32:46 +0000 Subject: [PATCH] gptfdisk: select the libuuid from util-linux if possible. (#2683) * On x86_gcc2 we only have the libuuid from the libuuid package. * On all other architectures we can switch to the libuuid from the util_linux package. * The libuuid from util-linux needs libintl, but the latter does not have a pkgconfig file, so we need to add "LDFLAGS=-lintl". --- sys-apps/gptfdisk/gptfdisk-1.0.3.recipe | 27 +++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/sys-apps/gptfdisk/gptfdisk-1.0.3.recipe b/sys-apps/gptfdisk/gptfdisk-1.0.3.recipe index 592bbe0e5..9bf5b0e6f 100644 --- a/sys-apps/gptfdisk/gptfdisk-1.0.3.recipe +++ b/sys-apps/gptfdisk/gptfdisk-1.0.3.recipe @@ -9,13 +9,21 @@ and enables changing partition types from primary to logical and vice-versa." HOMEPAGE="http://www.rodsbooks.com/gdisk/" COPYRIGHT="2013-2017 Rod Smith" LICENSE="GNU GPL v2" -REVISION="1" +REVISION="2" SOURCE_URI="https://downloads.sf.net/gptfdisk/gptfdisk-$portVersion.tar.gz" CHECKSUM_SHA256="89fd5aec35c409d610a36cb49c65b442058565ed84042f767bba614b8fc91b5c" PATCHES="gptfdisk-$portVersion.patchset" ARCHITECTURES="x86_gcc2 x86 x86_64" +if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then + libuuidMinimumVersion=1.0.0 +else + libuuidMinimumVersion=1.3.0 + # The libuuid from util_linux needs libintl. + export LDFLAGS=-lintl +fi + PROVIDES=" gptfdisk = $portVersion cmd:cgdisk @@ -25,17 +33,27 @@ PROVIDES=" " REQUIRES=" haiku - lib:libuuid + lib:libuuid >= $libuuidMinimumVersion lib:libncurses lib:libpopt " +if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then +REQUIRES+=" + lib:libintl + " +fi BUILD_REQUIRES=" haiku_devel - devel:libuuid + devel:libuuid >= $libuuidMinimumVersion devel:libncurses devel:libpopt " +if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then +BUILD_REQUIRES+=" + devel:libintl + " +fi BUILD_PREREQUIRES=" cmd:g++ cmd:install @@ -51,9 +69,6 @@ TEST_REQUIRES=" cmd:tail cmd:tr " -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - $TEST_REQUIRES - " BUILD() {