Merge pull request #207012 from Homebrew/bump-tailwindcss-4.0.5
[Homebrew/homebrew-core.git] / Formula / e / ext2fuse.rb
blob85b582cc859a764b507e21c1ca951e8d6eda2d38
1 class Ext2fuse < Formula
2   desc "Compact implementation of ext2 file system using FUSE"
3   homepage "https://sourceforge.net/projects/ext2fuse/"
4   url "https://downloads.sourceforge.net/project/ext2fuse/ext2fuse/0.8.1/ext2fuse-src-0.8.1.tar.gz"
5   sha256 "431035797b2783216ec74b6aad5c721b4bffb75d2174967266ee49f0a3466cd9"
6   license "GPL-2.0-or-later"
7   revision 2
9   bottle do
10     rebuild 1
11     sha256 cellar: :any_skip_relocation, x86_64_linux: "fe9d3ea0a65c95de091aecb536ee498015bdc07b7c12e4367617cf9e78c76941"
12   end
14   depends_on "e2fsprogs"
15   depends_on "libfuse@2"
16   depends_on :linux # on macOS, requires closed-source macFUSE
18   # Fix build failure because of missing argument to open() Linux.
19   # Patch submitted upstream to SourceForge page:
20   # https://sourceforge.net/p/ext2fuse/patches/2/
21   patch :DATA
23   def install
24     ENV.append "CFLAGS", "-D__i386__"
25     ENV.append "CFLAGS", "-DHAVE_TYPE_SSIZE_T"
26     ENV.append "CFLAGS", "-DNO_INLINE_FUNCS"
27     ENV.append "CFLAGS", "-I#{Formula["libfuse@2"].opt_include}/fuse"
28     system "./configure", "--disable-debug", "--disable-dependency-tracking",
29                           "--prefix=#{prefix}"
30     system "make", "install"
31   end
32 end
34 __END__
35 diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c
36 index 1b9cd36..a7d8235 100644
37 --- a/lib/ext2fs/ismounted.c
38 +++ b/lib/ext2fs/ismounted.c
39 @@ -150,7 +150,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file,
40  is_root:
41  #define TEST_FILE "/.ismount-test-file"                
42                 *mount_flags |= EXT2_MF_ISROOT;
43 -               fd = open(TEST_FILE, O_RDWR|O_CREAT);
44 +               fd = open(TEST_FILE, O_RDWR|O_CREAT, S_IRUSR|S_IRGRP);
45                 if (fd < 0) {
46                         if (errno == EROFS)
47                                 *mount_flags |= EXT2_MF_READONLY;