summaryrefslogtreecommitdiff
path: root/sysutils/wiimms/files/patch-setup.sh
blob: 1eebb19b806a358e119f97e8eab9e36a23c5d038 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- setup.sh.orig	2013-02-09 21:55:43.000000000 +0100
+++ setup.sh	2013-09-12 21:34:08.051742488 +0200
@@ -19,8 +19,9 @@
 tim=($(date '+%s %Y-%m-%d %T'))
 
 have_fuse=0
-[[ $NO_FUSE != 1 && -r /usr/include/fuse.h || -r /usr/local/include/fuse.h ]] \
-	&& have_fuse=1
+# TO DO: Fix fuse compilation (need to add a dependency to the port Makefile too
+#[[ $NO_FUSE != 1 && -r /usr/include/fuse.h || -r /usr/local/include/fuse.h ]] \
+#	&& have_fuse=1
 
 if [[ $M32 = 1 ]]
 then
@@ -38,9 +39,13 @@
 	&& grep -qw fallocate /usr/include/bits/fcntl.h \
 	&& defines="$defines -DHAVE_FALLOCATE=1"
 
-[[ -r /usr/include/fcntl.h ]] \
-	&& grep -qw posix_fallocate /usr/include/fcntl.h \
-	&& defines="$defines -DHAVE_POSIX_FALLOCATE=1"
+# Wrong test: FreeBSD fcntl.h include a comment with string "posix_fallocate"
+#[[ -r /usr/include/fcntl.h ]] \
+#	&& grep -qw posix_fallocate /usr/include/fcntl.h \
+#	&& defines="$defines -DHAVE_POSIX_FALLOCATE=1"
+
+# FreeBSD didn't support Pre-alloc
+defines="$defines -DNO_PREALLOC"
 
 [[ -r /usr/include/linux/fiemap.h ]] \
 	&& grep -qw fiemap_extent /usr/include/linux/fiemap.h \
@@ -110,6 +115,6 @@
 
 	---EOT---
 
-gcc $xflags system.c -o system.tmp && ./system.tmp >>Makefile.setup
+${CC} $xflags system.c -o system.tmp && ./system.tmp >>Makefile.setup
 rm -f system.tmp