summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-22 04:03:30 +0100
committerSam James <sam@gentoo.org>2022-09-22 04:03:30 +0100
commit8fb0d9000464e255de67283f67805ec15683ab69 (patch)
treed896219fb8f2aaa0140de22615728851cc28740c
parentapp-misc/tmux: backport Clang fixes (diff)
downloadgentoo-8fb0d9000464e255de67283f67805ec15683ab69.tar.gz
gentoo-8fb0d9000464e255de67283f67805ec15683ab69.tar.bz2
gentoo-8fb0d9000464e255de67283f67805ec15683ab69.zip
sys-fs/ntfs3g: fix configure bashism
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch36
-rw-r--r--sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild94
2 files changed, 130 insertions, 0 deletions
diff --git a/sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch b/sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch
new file mode 100644
index 000000000000..280620d0ee68
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch
@@ -0,0 +1,36 @@
+https://github.com/tuxera/ntfs-3g/pull/58
+
+From a008fc4b3553583369111b145172a92542de4598 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 22 Sep 2022 04:00:45 +0100
+Subject: [PATCH] configure.ac: fix bashism in fuse check
+
+configure scripts need to be runnable with a POSIX-compliant /bin/sh.
+
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors
+like this aren't spotted. Notably Debian defaults to /bin/sh provided
+by dash which doesn't tolerate such bashisms as '=='.
+
+This retains compatibility with bash.
+
+Fixes configure warnings/errors like:
+```
+checking Windows OS... no
+./configure: 13360: test: xinternal: unexpected operator
+checking for pthread_create in -lpthread... yes
+checking Solaris OS... no
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -228,7 +228,7 @@ esac
+
+ if test "x${enable_ntfs_3g}" != "xyes"; then
+ with_fuse="none"
+-elif test "x${with_fuse}" == "x"; then
++elif test "x${with_fuse}" = "x"; then
+ AC_MSG_CHECKING([fuse compatibility])
+ case "${target_os}" in
+ linux*|solaris*)
+
diff --git a/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild b/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild
new file mode 100644
index 000000000000..085691d55b6d
--- /dev/null
+++ b/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 2006-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+MY_P="ntfs-3g_ntfsprogs-${PV}"
+
+DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
+HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
+HOMEPAGE="https://jp-andre.pagesperso-orange.fr/advanced-ntfs-3g.html"
+SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+# The subslot matches the SONAME major #.
+SLOT="0/89"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug +fuse +mount-ntfs ntfsdecrypt +ntfsprogs static-libs suid xattr"
+
+RDEPEND="
+ sys-apps/util-linux:0=
+ ntfsdecrypt? (
+ >=dev-libs/libgcrypt-1.2.2:0
+ >=net-libs/gnutls-1.4.4
+ )
+"
+DEPEND="${RDEPEND}
+ sys-apps/attr
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2022.5.17-configure-bashism.patch
+)
+
+src_prepare() {
+ default
+
+ # Only needed for bashism patch
+ eautoreconf
+}
+
+src_configure() {
+ tc-ld-disable-gold
+
+ local myconf=(
+ # passing --exec-prefix is needed as the build system is trying to be clever
+ # and install itself into / instead of /usr in order to be compatible with
+ # separate-/usr setups (which we don't support without an initrd).
+ --exec-prefix="${EPREFIX}"/usr
+
+ --disable-ldconfig
+ --enable-extras
+ $(use_enable debug)
+ $(use_enable fuse ntfs-3g)
+ $(use_enable acl posix-acls)
+ $(use_enable xattr xattr-mappings)
+ $(use_enable ntfsdecrypt crypto)
+ $(use_enable ntfsprogs)
+ $(use_enable static-libs static)
+
+ --with-uuid
+
+ # disable hd library until we have the right library in the tree and
+ # don't links to hwinfo one causing issues like bug #602360
+ --without-hd
+
+ # Needed for suid
+ # https://bugs.gentoo.org/822024
+ --with-fuse=internal
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ if use fuse; then
+ # Plugins directory
+ keepdir "/usr/$(get_libdir)/ntfs-3g"
+ if use suid; then
+ fperms u+s /usr/bin/ntfs-3g
+ fi
+ if use mount-ntfs; then
+ dosym mount.ntfs-3g /sbin/mount.ntfs
+ fi
+ fi
+ find "${ED}" -name '*.la' -type f -delete || die
+}