commit:     14336c40363bacaee85fe71b867d81b2ffdcf9e1
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Sat Feb  6 05:54:37 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat Feb  6 05:54:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=14336c40

sys-fs/dwarfs: cleaning up things

Added fuse2 use flag for those who want optional fuse2
bindings

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 .../{dwarfs-0.3.1-r1.ebuild => dwarfs-0.3.1-r2.ebuild} | 18 ++++++++++++------
 sys-fs/dwarfs/metadata.xml                             |  3 +++
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/sys-fs/dwarfs/dwarfs-0.3.1-r1.ebuild 
b/sys-fs/dwarfs/dwarfs-0.3.1-r2.ebuild
similarity index 85%
rename from sys-fs/dwarfs/dwarfs-0.3.1-r1.ebuild
rename to sys-fs/dwarfs/dwarfs-0.3.1-r2.ebuild
index 4dcf6a8e..d3be4941 100644
--- a/sys-fs/dwarfs/dwarfs-0.3.1-r1.ebuild
+++ b/sys-fs/dwarfs/dwarfs-0.3.1-r2.ebuild
@@ -15,7 +15,7 @@ 
SRC_URI="https://github.com/mhx/dwarfs/releases/download/v${PV}/dwarfs-${PV}.tar
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="python +jemalloc"
+IUSE="python +jemalloc fuse2"
 
 #test IUSE disabled because there is no googletest in portage tree
 #-DWITH_TESTS=$(usex test ON OFF)
@@ -38,6 +38,7 @@ RDEPEND="dev-libs/boost[context,threads,python?]
                dev-cpp/gflags
                dev-cpp/glog[gflags]
                sys-fs/fuse:3
+               fuse2? ( sys-fs/fuse:0 )
                sys-libs/binutils-libs
                sys-libs/zlib
                sys-libs/libunwind
@@ -52,8 +53,8 @@ CHECKREQS_DISK_BUILD="768M"
 
 DOCS=( "README.md" "CHANGES.md" "TODO" )
 
-CMAKE_IN_SOURCE_BUILD=true
-CMAKE_WARN_UNUSED_CLI=no
+CMAKE_IN_SOURCE_BUILD=1
+CMAKE_WARN_UNUSED_CLI=0
 
 QA_SONAME="${D}/usr/lib64/libdwarfs.so ${D}/usr/lib64/libxxhash.so"
 
@@ -78,6 +79,14 @@ src_install(){
        cmake_src_install
        dolib.so libmetadata_thrift.so libthrift_light.so
        dolib.so folly/libfolly.so.0.58.0-dev folly/libfolly.so
+       if ! use fuse2; then
+               rm "${D}"/usr/sbin/dwarfs2
+               rm "${D}"/usr/sbin/mount.dwarfs2
+               else
+                       ewarn "If you have both sys-fs/fuse:2 and sys-fs/fuse:3 
installed"
+                       ewarn "Dwarfs will install /sbin/dwarfs for fuse3 and 
/sbin/dwarfs2 for fuse2"
+                       ewarn "See https://github.com/mhx/dwarfs/issues/32";
+       fi
 }
 
 pkg_postinst(){
@@ -91,7 +100,4 @@ pkg_postinst(){
        elog "${HOMEPAGE}"
        elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md"
        elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md"
-       ewarn "If you have both sys-fs/fuse:2 and sys-fs/fuse:3 installed"
-       ewarn "Dwarfs will install /sbin/dwarfs for fuse3 and /sbin/dwarfs2 for 
fuse2"
-       ewarn "See https://github.com/mhx/dwarfs/issues/32";
 }

diff --git a/sys-fs/dwarfs/metadata.xml b/sys-fs/dwarfs/metadata.xml
index 17e2efa0..f3f1fbff 100644
--- a/sys-fs/dwarfs/metadata.xml
+++ b/sys-fs/dwarfs/metadata.xml
@@ -16,4 +16,7 @@
                * Highly multi-threaded implementation. Both the file system 
creation tool as well as the FUSE driver are able to make good use of the many 
cores of your system.
                * Optional experimental Lua support to provide custom filtering 
and ordering functionality.
        </longdescription>
+       <use>
+               <flag name="fuse2">Install optional fuse2 bindings in addition 
to fuse3.</flag>
+       </use>
 </pkgmetadata>

Reply via email to