Last active
December 27, 2015 01:09
-
-
Save nikolay/7242850 to your computer and use it in GitHub Desktop.
Patch tup to use OSXFUSE and not Fuse4X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Tupfile b/Tupfile | |
index 132e4ea..03be53f 100644 | |
--- a/Tupfile | |
+++ b/Tupfile | |
@@ -23,7 +23,7 @@ ifeq (@(TUP_SUDO_SUID),y) | |
suid = ; chown root:$(TUP_SUID_GROUP) tup; chmod u+s tup | |
endif | |
-LDFLAGS += `pkg-config fuse --libs` | |
+LDFLAGS += `pkg-config osxfuse --libs` | |
LDFLAGS += -lm | |
: src/tup/tup/main.o libtup.a src/lua/liblua.a |> ^ LINK tup^ version=`git describe`; echo "const char *tup_version(void) {return \"$version\";}" | $(CC) -x c -c - -o tup-version.o $(CFLAGS) -Wno-missing-prototypes; $(CC) %f tup-version.o -o tup -lpthread $(LDFLAGS) $(suid) |> tup tup-version.o | |
diff --git a/Tuprules.tup b/Tuprules.tup | |
index 3f0953b..bb5024b 100644 | |
--- a/Tuprules.tup | |
+++ b/Tuprules.tup | |
@@ -34,7 +34,7 @@ LDFLAGS += -m32 | |
endif | |
export PKG_CONFIG_PATH | |
-CFLAGS += `pkg-config fuse --cflags` | |
+CFLAGS += `pkg-config osxfuse --cflags` | |
# Compatibility function prototypes and include path for wrapper functions | |
MINGWCFLAGS += -include $(TUP_CWD)/src/compat/win32/mingw.h | |
diff --git a/build.sh b/build.sh | |
index 173691b..09aaf5e 100755 | |
--- a/build.sh | |
+++ b/build.sh | |
@@ -2,8 +2,8 @@ | |
label=${TUP_LABEL:-bootstrap} | |
os=`uname -s` | |
-plat_cflags="`pkg-config fuse --cflags`" | |
-plat_ldflags="`pkg-config fuse --libs`" | |
+plat_cflags="`pkg-config osxfuse --cflags`" | |
+plat_ldflags="`pkg-config osxfuse --libs`" | |
plat_files="" | |
LDFLAGS="-lm" | |
CC=gcc | |
diff --git a/src/tup/server/fuse_server.c b/src/tup/server/fuse_server.c | |
index 4596d75..147e8fa 100644 | |
--- a/src/tup/server/fuse_server.c | |
+++ b/src/tup/server/fuse_server.c | |
@@ -209,7 +209,7 @@ int server_init(enum server_mode mode) | |
/* MacOSX is a wayward beast. On a filesystem mount event it notifies several processes such as | |
* antivirus scanner, file content indexer. | |
* The content indexer (Spotlight) creates a root-owned directory that keeps index data (.tup/mnt/.Spotlight-V100). | |
- * To prevent it we use "nobrowse" fuse4x flag - it tells Spotlight to skip the fs. | |
+ * To prevent it we use "nobrowse" osxfuse flag - it tells Spotlight to skip the fs. | |
* Unfortunately it does not help in case of a short-living filesystems (e.g. in tup tests). | |
* Tup mounts and then quickly unmounts the fs and when Sportlight checks "nobrowse" flag on a filesystem | |
* using statfs() - it gets data of the local filesystem (fuse fs is already unmount at this time). | |
diff --git a/test/t4027-fifo.sh b/test/t4027-fifo.sh | |
index 68155c4..7d20c3b 100755 | |
--- a/test/t4027-fifo.sh | |
+++ b/test/t4027-fifo.sh | |
@@ -21,7 +21,7 @@ | |
. ./tup.sh | |
check_no_windows mkfifo | |
if [ "$tupos" = "Darwin" ]; then | |
- echo "[33mFIFOs currently unsupported in fuse4x. Skipping test.[0m" | |
+ echo "[33mFIFOs currently unsupported in osxfuse. Skipping test.[0m" | |
eotup | |
fi | |
if [ "$tupos" = "FreeBSD" ]; then | |
diff --git a/tup.1 b/tup.1 | |
index 0b84224..23214b6 100644 | |
--- a/tup.1 | |
+++ b/tup.1 | |
@@ -461,10 +461,10 @@ will output the filenames a_binary.bin and b_binary.bin. Only the first glob exp | |
Set the $-variable "var" to the value on the right-hand side. Both forms are the same, and are allowed to more easily support converting old Makefiles. The $-variable "var" can later be referenced by using "$(var)". Variables referenced here are always expanded immediately. As such, setting a variable to have a %-flag does not make sense, because a %-flag is only valid in a :-rule. The syntax $(var_%e) is allowed in a :-rule. Variable references do not nest, so something like $(var1_$(var2)) does not make sense. You also cannot pass variable definitions in the command line or through the environment. Any $-variable that begins with the string "CONFIG_" is automatically converted to the @-variable of the same name minus the "CONFIG_" prefix. In other words, $(CONFIG_FOO) and @(FOO) are interchangeable. Attempting to assign a value to a CONFIG_ variable in a Tupfile results in an error, since these can only be set in the tup.config file. Note that you may see a syntax using back-ticks when setting variables, such as: | |
.nf | |
-CFLAGS += `pkg-config fuse --cflags` | |
+CFLAGS += `pkg-config osxfuse --cflags` | |
.fi | |
-Tup does not do any special processing for back-ticks, so the pkg-config command is not actually executed when the variable is set in this example. Instead, this is passed verbatim to any place that uses it. Therefore if a command later references $(CFLAGS), it will contain the string `pkg-config fuse --cflags`, so it will be parsed by the shell. | |
+Tup does not do any special processing for back-ticks, so the pkg-config command is not actually executed when the variable is set in this example. Instead, this is passed verbatim to any place that uses it. Therefore if a command later references $(CFLAGS), it will contain the string `pkg-config osxfuse --cflags`, so it will be parsed by the shell. | |
.TP | |
.B var += value | |
Append "value" to the end of the current value of "var". If "var" has not been set, this is equivalent to a regular '=' statement. If "var" already has a value, a space is appended to the $-variable before the new value is appended. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment