1 |
commit: 8fb0d9000464e255de67283f67805ec15683ab69 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 22 03:03:30 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 22 03:03:30 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fb0d900 |
7 |
|
8 |
sys-fs/ntfs3g: fix configure bashism |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
.../files/ntfs3g-2022.5.17-configure-bashism.patch | 36 +++++++++ |
13 |
sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild | 94 ++++++++++++++++++++++ |
14 |
2 files changed, 130 insertions(+) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 000000000000..280620d0ee68 |
19 |
--- /dev/null |
20 |
+++ b/sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch |
21 |
@@ -0,0 +1,36 @@ |
22 |
+https://github.com/tuxera/ntfs-3g/pull/58 |
23 |
+ |
24 |
+From a008fc4b3553583369111b145172a92542de4598 Mon Sep 17 00:00:00 2001 |
25 |
+From: Sam James <sam@g.o> |
26 |
+Date: Thu, 22 Sep 2022 04:00:45 +0100 |
27 |
+Subject: [PATCH] configure.ac: fix bashism in fuse check |
28 |
+ |
29 |
+configure scripts need to be runnable with a POSIX-compliant /bin/sh. |
30 |
+ |
31 |
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors |
32 |
+like this aren't spotted. Notably Debian defaults to /bin/sh provided |
33 |
+by dash which doesn't tolerate such bashisms as '=='. |
34 |
+ |
35 |
+This retains compatibility with bash. |
36 |
+ |
37 |
+Fixes configure warnings/errors like: |
38 |
+``` |
39 |
+checking Windows OS... no |
40 |
+./configure: 13360: test: xinternal: unexpected operator |
41 |
+checking for pthread_create in -lpthread... yes |
42 |
+checking Solaris OS... no |
43 |
+``` |
44 |
+ |
45 |
+Signed-off-by: Sam James <sam@g.o> |
46 |
+--- a/configure.ac |
47 |
++++ b/configure.ac |
48 |
+@@ -228,7 +228,7 @@ esac |
49 |
+ |
50 |
+ if test "x${enable_ntfs_3g}" != "xyes"; then |
51 |
+ with_fuse="none" |
52 |
+-elif test "x${with_fuse}" == "x"; then |
53 |
++elif test "x${with_fuse}" = "x"; then |
54 |
+ AC_MSG_CHECKING([fuse compatibility]) |
55 |
+ case "${target_os}" in |
56 |
+ linux*|solaris*) |
57 |
+ |
58 |
|
59 |
diff --git a/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild b/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild |
60 |
new file mode 100644 |
61 |
index 000000000000..085691d55b6d |
62 |
--- /dev/null |
63 |
+++ b/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild |
64 |
@@ -0,0 +1,94 @@ |
65 |
+# Copyright 2006-2022 Gentoo Authors |
66 |
+# Distributed under the terms of the GNU General Public License v2 |
67 |
+ |
68 |
+EAPI=8 |
69 |
+ |
70 |
+inherit autotools toolchain-funcs |
71 |
+ |
72 |
+MY_P="ntfs-3g_ntfsprogs-${PV}" |
73 |
+ |
74 |
+DESCRIPTION="Open source read-write NTFS driver that runs under FUSE" |
75 |
+HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/" |
76 |
+HOMEPAGE="https://jp-andre.pagesperso-orange.fr/advanced-ntfs-3g.html" |
77 |
+SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz" |
78 |
+ |
79 |
+LICENSE="GPL-2" |
80 |
+# The subslot matches the SONAME major #. |
81 |
+SLOT="0/89" |
82 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" |
83 |
+IUSE="acl debug +fuse +mount-ntfs ntfsdecrypt +ntfsprogs static-libs suid xattr" |
84 |
+ |
85 |
+RDEPEND=" |
86 |
+ sys-apps/util-linux:0= |
87 |
+ ntfsdecrypt? ( |
88 |
+ >=dev-libs/libgcrypt-1.2.2:0 |
89 |
+ >=net-libs/gnutls-1.4.4 |
90 |
+ ) |
91 |
+" |
92 |
+DEPEND="${RDEPEND} |
93 |
+ sys-apps/attr |
94 |
+" |
95 |
+BDEPEND=" |
96 |
+ virtual/pkgconfig |
97 |
+" |
98 |
+ |
99 |
+S="${WORKDIR}/${MY_P}" |
100 |
+ |
101 |
+PATCHES=( |
102 |
+ "${FILESDIR}"/${PN}-2022.5.17-configure-bashism.patch |
103 |
+) |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ default |
107 |
+ |
108 |
+ # Only needed for bashism patch |
109 |
+ eautoreconf |
110 |
+} |
111 |
+ |
112 |
+src_configure() { |
113 |
+ tc-ld-disable-gold |
114 |
+ |
115 |
+ local myconf=( |
116 |
+ # passing --exec-prefix is needed as the build system is trying to be clever |
117 |
+ # and install itself into / instead of /usr in order to be compatible with |
118 |
+ # separate-/usr setups (which we don't support without an initrd). |
119 |
+ --exec-prefix="${EPREFIX}"/usr |
120 |
+ |
121 |
+ --disable-ldconfig |
122 |
+ --enable-extras |
123 |
+ $(use_enable debug) |
124 |
+ $(use_enable fuse ntfs-3g) |
125 |
+ $(use_enable acl posix-acls) |
126 |
+ $(use_enable xattr xattr-mappings) |
127 |
+ $(use_enable ntfsdecrypt crypto) |
128 |
+ $(use_enable ntfsprogs) |
129 |
+ $(use_enable static-libs static) |
130 |
+ |
131 |
+ --with-uuid |
132 |
+ |
133 |
+ # disable hd library until we have the right library in the tree and |
134 |
+ # don't links to hwinfo one causing issues like bug #602360 |
135 |
+ --without-hd |
136 |
+ |
137 |
+ # Needed for suid |
138 |
+ # https://bugs.gentoo.org/822024 |
139 |
+ --with-fuse=internal |
140 |
+ ) |
141 |
+ |
142 |
+ econf "${myconf[@]}" |
143 |
+} |
144 |
+ |
145 |
+src_install() { |
146 |
+ default |
147 |
+ if use fuse; then |
148 |
+ # Plugins directory |
149 |
+ keepdir "/usr/$(get_libdir)/ntfs-3g" |
150 |
+ if use suid; then |
151 |
+ fperms u+s /usr/bin/ntfs-3g |
152 |
+ fi |
153 |
+ if use mount-ntfs; then |
154 |
+ dosym mount.ntfs-3g /sbin/mount.ntfs |
155 |
+ fi |
156 |
+ fi |
157 |
+ find "${ED}" -name '*.la' -type f -delete || die |
158 |
+} |