app-emulation/skopeo: Make btrfs optional
authorJonathan Callen <en.ABCD@gmail.com>
Sat, 4 Apr 2020 22:06:28 +0000 (18:06 -0400)
committerWilliam Hubbs <williamh@gentoo.org>
Sat, 2 May 2020 14:07:20 +0000 (09:07 -0500)
Closes: https://bugs.gentoo.org/716236
Signed-off-by: William Hubbs <williamh@gentoo.org>
app-emulation/skopeo/metadata.xml
app-emulation/skopeo/skopeo-0.2.0.ebuild

index c36c37139fadf08a10ea795a3b658bcaa9b595ee..6027ac0be078a46b4693e611ef6ccf7feb8fa5a1 100644 (file)
@@ -5,4 +5,7 @@
                <email>williamh@gentoo.org</email>
                <name>William Hubbs</name>
        </maintainer>
+       <use>
+               <flag name="btrfs">Enables dependencies for the "btrfs" graph driver.</flag>
+       </use>
 </pkgmetadata>
index 41797bfbd1bb6a008225aece10e5170eb390d695..c6caefe701f8b233886f9f808a81e35d5db57516 100644 (file)
@@ -12,11 +12,12 @@ SRC_URI="https://github.com/containers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.g
 LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT"
 SLOT="0"
 KEYWORDS="~amd64"
+IUSE="btrfs"
 
 COMMON_DEPEND=">=app-crypt/gpgme-1.5.5:=
        >=dev-libs/libassuan-2.4.3:=
        dev-libs/libgpg-error:=
-       >=sys-fs/btrfs-progs-4.0.1
+       btrfs? ( >=sys-fs/btrfs-progs-4.0.1 )
        >=sys-fs/lvm2-2.02.145:="
 DEPEND="${COMMON_DEPEND}
        dev-go/go-md2man"
@@ -25,7 +26,8 @@ RDEPEND="${COMMON_DEPEND}"
 RESTRICT="test"
 
 src_compile() {
-       local BUILDTAGS="containers_image_ostree_stub"
+       local BUILDTAGS
+       BUILDTAGS="containers_image_ostree_stub $(usex btrfs "" exclude_graphdriver_btrfs)"
        set -- go build -mod=vendor -ldflags "-X main.gitCommit=${COMMIT}" \
                -gcflags "${GOGCFLAGS}" -tags "${BUILDTAGS}" \
                -o skopeo ./cmd/skopeo