Ticket #50588: osxfuse.diff
File osxfuse.diff, 12.7 KB (added by mkhon, 9 years ago) |
---|
-
dports/fuse/osxfuse/Portfile
4 4 PortSystem 1.0 5 5 6 6 name osxfuse 7 version 2.8.2 8 set branch [join [lrange [split ${version} .] 0 1] .] 7 version 3.1.0 9 8 categories fuse devel 10 9 platforms macosx 11 10 license BSD APSL … … 46 45 47 46 distfiles 48 47 set mp.dist { 49 osxfuse bf7148150 kext b6b3cbe51 framework 2ab904a52 prefpane 8ad486b53 fuse 98b996054 support 664d8ba48 osxfuse 6cfb2b6 49 kext 2a0383e 50 framework b5d552d 51 prefpane a135b78 52 fuse 06f648c 53 support faf1f6f 55 54 } 56 55 57 56 depends_build port:autoconf \ … … 69 68 70 69 if { $use_signed_kext } { 71 70 master_sites-append sourceforge 71 master_sites-append https://github.com/osxfuse/osxfuse/releases/download/osxfuse-${version} 72 72 distfiles-append ${name}-${version}.dmg 73 73 } 74 74 75 checksums osxfuse- bf71481.tar.gz \76 rmd160 1 21cc22174e19ecb32c6b61552c007c327be26b7\77 sha256 b0cdfb642d2b2ed5b30d561803c875913eb27ec86a440601101d4e468eaa17c4\78 kext- b6b3cbe.tar.gz \79 rmd160 07e2aca43b53dad2104f8306db42e082e75351ef \80 sha256 7f776c43ad15e0b1916d6ebea3d56c0b4f7c7b0beb81f28fe380099759bd2349\81 framework- 2ab904a.tar.gz \82 rmd160 af79296880d18d8f8a27803e348ff6429280f0e7\83 sha256 1591c26d0d01311007105ab3789d43abc6e824aaee681aef8b601413dafea65e\84 prefpane- 8ad486b.tar.gz \85 rmd160 c157ff7907743ab66e1ecb03106deb816aeffb70\86 sha256 d1b6233640c77d124c7c7e97c5bc370fa8ade8b041b127b6bbc1ae4a44b8bad4\87 fuse- 98b9960.tar.gz \88 rmd160 589cbe0c819caded56dc4be64727580e1400fd9e\89 sha256 f60205e19c2971228b78d180dc65cda2a6271a567229acdeb19567fcbcebb641\90 support- 664d8ba.tar.gz \91 rmd160 d4c578037996dc5959eb8aa2097ff1ccf4f7b619\92 sha256 8 4e64541e5ad1baeb70a513960349edad736da1e1ad83ef889d938a571086c58\93 osxfuse- 2.8.2.dmg \94 rmd160 eaf94873fe650584a68fd011bb6bb6195a373e91\95 sha256 c0cc4066642136fdd4f5fead10bed2e495f636f86f451deee85dbb5aa95fa7fa75 checksums osxfuse-6cfb2b6.tar.gz \ 76 rmd160 10ddf7da77ae5d23ad6aae727880bf8bcae2b24c \ 77 sha256 f011bc152c49ddfa63089b6635244f130470f7f89ac3cfec37bf4e2860188f25 \ 78 kext-2a0383e.tar.gz \ 79 rmd160 b85530d85f5d679b1808979a7678cb7bac64491f \ 80 sha256 49f5ba4ade7dae85e477c00d652f92caec02774c7f7db1f16c6dfd42edd638e6 \ 81 framework-b5d552d.tar.gz \ 82 rmd160 94a98dea2474790d8d45ef9e69fa3fbc954417f0 \ 83 sha256 f4da3963574f59febc59f691c560dc90489b2d5587a4114754b977426f1b6d10 \ 84 prefpane-a135b78.tar.gz \ 85 rmd160 6001d585764454e6fe244b8bb40f5e3ce1d4f24d \ 86 sha256 f75e9a12ee0fdc48d78921335ceba08572954228bb690f999e3d77d06131f178 \ 87 fuse-06f648c.tar.gz \ 88 rmd160 1fd618360a273ca14d8de6657102818d13e9cfcb \ 89 sha256 d76e58bf88e595ada73698e8adcdf0dd4018835cfa81670f96b80429a8a07810 \ 90 support-faf1f6f.tar.gz \ 91 rmd160 95f1817f30946cd86cce82735d344d25e594ed3d \ 92 sha256 8d20b9ac55bb913e757a042d349551bf30119df6af9aebcdcd2eafcd90b2af84 \ 93 osxfuse-3.1.0.dmg \ 94 rmd160 34419520f7fcaea090ee7ef13b2e6491892b8745 \ 95 sha256 903128f6ff873e2c00c742e1ec0cac6b21a5cfac27d56ed092b27e34bf1bb007 96 96 97 97 # extract phase will just extract the dmg; post-extract will expand 98 98 # the tarballs … … 104 104 post-extract { 105 105 # Extract the pkg and the appropriate payload from the binary dmg 106 106 if { $use_signed_kext } { 107 system -W ${workpath}/${name}-${version} "pkgutil --expand ' Install OSXFUSE ${branch}.pkg' ${workpath}/pkg"108 system -W ${workpath}/pkg/ 10.9/OSXFUSECore.pkg "gzip -dc Payload | cpio -id"107 system -W ${workpath}/${name}-${version} "pkgutil --expand 'FUSE for OS X' ${workpath}/pkg" 108 system -W ${workpath}/pkg/Core.pkg "gzip -dc Payload | cpio -id" 109 109 } 110 110 111 111 # Extract the source tarballs … … 121 121 } 122 122 } 123 123 124 patchfiles patch-buildsystem.diff \125 patch-kext-location.diff \126 patch-xcode-7.2.diff127 128 post-patch {129 reinplace "s,@@TMP@@,${workpath}/.tmp,g" ${worksrcpath}/build.sh130 131 # Only build the archs we want, not the hardcoded universal archs132 reinplace -E "s,@@ARCHS@@,[get_canonical_archs],g" ${worksrcpath}/build.sh133 134 # Inject the destroot path as the buildsystem tries to write to the prefix directly135 reinplace -E "s,@@DESTROOT@@,${destroot},g" ${worksrcpath}/build.sh136 137 # Correct the location of the kext138 reinplace -E "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/kext/common/fuse_param.h139 }140 141 124 use_configure no 142 125 143 build.cmd ./build.sh 144 # Yes, they really named this target homebrew 145 build.target -t homebrew 146 build.args -f ${prefix} 126 build.cmd ./build.sh -t packagemanager 127 build.target -a build 128 build.args --build-directory="${workpath}" --\ 129 -a [join [get_canonical_archs] " -a "]\ 130 --framework-prefix="${prefix}"\ 131 --fsbundle-prefix="${prefix}"\ 132 --library-prefix="${prefix}" 147 133 148 # The build step already does everything 149 destroot {} 134 destroot.target -a install 135 destroot.args --build-directory="${workpath}" 136 destroot.destdir -- "${destroot}${prefix}" 150 137 151 138 # Move filesystem bundle into place 152 139 post-destroot { … … 155 142 file attributes $f -owner root -group wheel 156 143 } 157 144 # Enable setuid on helper binary 158 file attributes ${destroot}${prefix}/Library/Filesystems/osxfuse fs.fs/Support/load_osxfusefs-permissions 04755145 file attributes ${destroot}${prefix}/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse -permissions 04755 159 146 } 160 147 161 148 … … 169 156 # signed binary instead here too. 170 157 if { $use_signed_kext } { 171 158 post-destroot { 172 delete ${destroot}${prefix}/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext \ 173 ${destroot}${prefix}/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext.dSYM 174 175 file copy ${workpath}/pkg/10.9/OSXFUSECore.pkg/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext \ 176 ${destroot}${prefix}/Library/Filesystems/osxfusefs.fs/Support 159 delete ${destroot}${prefix}/Library/Filesystems/osxfuse.fs/Contents/Extensions/${macosx_deployment_target}/osxfuse.kext 160 file copy ${workpath}/pkg/Core.pkg/Library/Filesystems/osxfuse.fs/Contents/Extensions/10.9/osxfuse.kext\ 161 ${destroot}${prefix}/Library/Filesystems/osxfuse.fs/Contents/Extensions/${macosx_deployment_target} 177 162 } 178 163 } 179 164 … … 181 166 182 167 notes { 183 168 When upgrading, unmount all FUSE filesystems and then unload the kernel extension. 184 Unloading can be done via: sudo kextunload -b com.github.osxfuse.filesystems.osxfuse fs169 Unloading can be done via: sudo kextunload -b com.github.osxfuse.filesystems.osxfuse 185 170 Alternatively (or if this fails), just reboot your computer now. 186 171 } 187 172 -
dports/fuse/osxfuse/files/patch-buildsystem.diff
1 --- build.sh.orig 2014-06-09 15:41:49.000000000 -05002 +++ build.sh 2014-10-16 21:26:27.000000000 -05003 @@ -12,7 +12,7 @@4 # Beware: GNU libtool cannot handle directory names containing whitespace.5 # Therefore, do not set M_CONF_TMPDIR to such a directory.6 #7 -readonly M_CONF_TMPDIR=/tmp8 +readonly M_CONF_TMPDIR=@@TMP@@9 readonly M_PLISTSIGNER_TEST_KEY="`dirname $0`/prefpane/autoinstaller/TestKeys/private_key.der"10 11 # Other constants12 @@ -104,37 +104,37 @@13 declare M_XCODE_VERSION_REQUIRED=""14 15 # SDK 10.516 -readonly M_SDK_105_ARCHS="ppc ppc64 i386 x86_64"17 +readonly M_SDK_105_ARCHS="@@ARCHS@@"18 declare M_SDK_105=""19 declare M_SDK_105_XCODE=""20 declare M_SDK_105_COMPILER=""21 22 # SDK 10.623 -readonly M_SDK_106_ARCHS="i386 x86_64"24 +readonly M_SDK_106_ARCHS="@@ARCHS@@"25 declare M_SDK_106=""26 declare M_SDK_106_XCODE=""27 declare M_SDK_106_COMPILER=""28 29 # SDK 10.730 -readonly M_SDK_107_ARCHS="i386 x86_64"31 +readonly M_SDK_107_ARCHS="@@ARCHS@@"32 declare M_SDK_107=""33 declare M_SDK_107_XCODE=""34 declare M_SDK_107_COMPILER=""35 36 # SDK 10.837 -readonly M_SDK_108_ARCHS="i386 x86_64"38 +readonly M_SDK_108_ARCHS="@@ARCHS@@"39 declare M_SDK_108=""40 declare M_SDK_108_XCODE=""41 declare M_SDK_108_COMPILER=""42 43 # SDK 10.944 -readonly M_SDK_109_ARCHS="i386 x86_64"45 +readonly M_SDK_109_ARCHS="@@ARCHS@@"46 declare M_SDK_109=""47 declare M_SDK_109_XCODE=""48 declare M_SDK_109_COMPILER=""49 50 # SDK 10.1051 -readonly M_SDK_1010_ARCHS="i386 x86_64"52 +readonly M_SDK_1010_ARCHS="@@ARCHS@@"53 declare M_SDK_1010=""54 declare M_SDK_1010_XCODE=""55 declare M_SDK_1010_COMPILER=""56 @@ -1880,7 +1880,7 @@57 58 local ms_osxfuse_out="$M_CONF_TMPDIR/osxfuse-homebrew-$ms_os_version-$ms_osxfuse_version"59 local ms_osxfuse_build="$ms_osxfuse_out/build/"60 - local ms_osxfuse_root="$m_prefix"61 + local ms_osxfuse_root="@@DESTROOT@@$m_prefix"62 63 if [ -e "$ms_osxfuse_out" ]64 then65 @@ -1984,7 +1984,7 @@66 xcrun make -j4 >$m_stdout 2>$m_stderr67 m_exit_on_error "make failed while compiling the OSXFUSE library."68 69 - xcrun make install >$m_stdout 2>$m_stderr70 + xcrun make install DESTDIR="@@DESTROOT@@" >$m_stdout 2>$m_stderr71 m_exit_on_error "cannot prepare library build for installation."72 73 for f in "$ms_osxfuse_root"/lib/libosxfuse_i64*.dylib; do -
dports/fuse/osxfuse/files/patch-kext-location.diff
1 --- kext/common/fuse_param.h.orig 2013-12-22 18:50:41.000000000 +01002 +++ kext/common/fuse_param.h 2013-12-22 18:50:44.000000000 +01003 @@ -59,7 +59,7 @@4 5 /* Paths */6 7 -#define OSXFUSE_BUNDLE_PATH "/Library/Filesystems/osxfusefs.fs"8 +#define OSXFUSE_BUNDLE_PATH "@@PREFIX@@/Library/Filesystems/osxfusefs.fs"9 #define OSXFUSE_KEXT OSXFUSE_BUNDLE_PATH "/Support/osxfusefs.kext"10 #define OSXFUSE_LOAD_PROG OSXFUSE_BUNDLE_PATH "/Support/load_osxfusefs"11 #define OSXFUSE_MOUNT_PROG OSXFUSE_BUNDLE_PATH "/Support/mount_osxfusefs" -
dports/fuse/osxfuse/files/patch-xcode-7.2.diff
1 Upstream-Status: Inappropriate (Upstream has refactored their build system and this patch would no longer apply)2 --- build.sh.orig 2015-12-11 15:04:10.000000000 +01003 +++ build.sh 2015-12-11 15:04:41.000000000 +01004 @@ -117,6 +117,9 @@5 declare M_XCODE71=""6 declare M_XCODE71_VERSION=7.17 readonly M_XCODE71_COMPILER="com.apple.compilers.llvm.clang.1_0"8 +declare M_XCODE72=""9 +declare M_XCODE72_VERSION=7.210 +readonly M_XCODE72_COMPILER="com.apple.compilers.llvm.clang.1_0"11 12 declare M_ACTUAL_PLATFORM=""13 declare M_PLATFORMS=""14 @@ -2652,6 +2655,14 @@15 M_XCODE71_VERSION=$m_xcode_version16 fi17 ;;18 + 7.2*)19 + m_version_compare $M_XCODE72_VERSION $m_xcode_version20 + if [[ $? != 2 ]]21 + then22 + M_XCODE72="$m_xcode_root"23 + M_XCODE72_VERSION=$m_xcode_version24 + fi25 + ;;26 *)27 m_log "skip unsupported Xcode version in '$m_xcode_root'."28 ;;29 @@ -2929,6 +2940,15 @@30 M_SDK_1011_COMPILER="$M_XCODE71_COMPILER"31 m_platform_realistic_add "10.11"32 fi33 + if [[ -n "$M_XCODE72" ]]34 + then35 + m_xcode_latest="$M_XCODE72"36 +37 + M_SDK_1011="$M_XCODE72/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"38 + M_SDK_1011_XCODE="$M_XCODE72"39 + M_SDK_1011_COMPILER="$M_XCODE72_COMPILER"40 + m_platform_realistic_add "10.11"41 + fi42 43 m_read_input "$@"44