Ticket #50588: osxfuse.diff

File osxfuse.diff, 12.7 KB (added by mkhon, 9 years ago)
  • dports/fuse/osxfuse/Portfile

     
    44PortSystem          1.0
    55
    66name                osxfuse
    7 version             2.8.2
    8 set branch          [join [lrange [split ${version} .] 0 1] .]
     7version             3.1.0
    98categories          fuse devel
    109platforms           macosx
    1110license             BSD APSL
     
    4645
    4746distfiles
    4847set mp.dist {
    49     osxfuse     bf71481
    50     kext        b6b3cbe
    51     framework   2ab904a
    52     prefpane    8ad486b
    53     fuse        98b9960
    54     support     664d8ba
     48    osxfuse     6cfb2b6
     49    kext        2a0383e
     50    framework   b5d552d
     51    prefpane    a135b78
     52    fuse        06f648c
     53    support     faf1f6f
    5554}
    5655
    5756depends_build       port:autoconf \
     
    6968
    7069if { $use_signed_kext } {
    7170    master_sites-append sourceforge
     71    master_sites-append https://github.com/osxfuse/osxfuse/releases/download/osxfuse-${version}
    7272    distfiles-append ${name}-${version}.dmg
    7373}
    7474
    75 checksums           osxfuse-bf71481.tar.gz \
    76                     rmd160  121cc22174e19ecb32c6b61552c007c327be26b7 \
    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  84e64541e5ad1baeb70a513960349edad736da1e1ad83ef889d938a571086c58 \
    93                     osxfuse-2.8.2.dmg \
    94                     rmd160  eaf94873fe650584a68fd011bb6bb6195a373e91 \
    95                     sha256  c0cc4066642136fdd4f5fead10bed2e495f636f86f451deee85dbb5aa95fa7fa
     75checksums           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
    9696
    9797# extract phase will just extract the dmg; post-extract will expand
    9898# the tarballs
     
    104104post-extract {
    105105    # Extract the pkg and the appropriate payload from the binary dmg
    106106    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"
    109109    }
    110110
    111111    # Extract the source tarballs
     
    121121    }
    122122}
    123123
    124 patchfiles          patch-buildsystem.diff \
    125                     patch-kext-location.diff \
    126                     patch-xcode-7.2.diff
    127 
    128 post-patch {
    129     reinplace "s,@@TMP@@,${workpath}/.tmp,g" ${worksrcpath}/build.sh
    130 
    131     # Only build the archs we want, not the hardcoded universal archs
    132     reinplace -E "s,@@ARCHS@@,[get_canonical_archs],g" ${worksrcpath}/build.sh
    133 
    134     # Inject the destroot path as the buildsystem tries to write to the prefix directly
    135     reinplace -E "s,@@DESTROOT@@,${destroot},g" ${worksrcpath}/build.sh
    136 
    137     # Correct the location of the kext
    138     reinplace -E "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/kext/common/fuse_param.h
    139 }
    140 
    141124use_configure   no
    142125
    143 build.cmd       ./build.sh
    144 # Yes, they really named this target homebrew
    145 build.target    -t homebrew
    146 build.args      -f ${prefix}
     126build.cmd       ./build.sh -t packagemanager
     127build.target    -a build
     128build.args      --build-directory="${workpath}" --\
     129                -a [join [get_canonical_archs] " -a "]\
     130                --framework-prefix="${prefix}"\
     131                --fsbundle-prefix="${prefix}"\
     132                --library-prefix="${prefix}"
    147133
    148 # The build step already does everything
    149 destroot {}
     134destroot.target -a install
     135destroot.args   --build-directory="${workpath}"
     136destroot.destdir -- "${destroot}${prefix}"
    150137
    151138# Move filesystem bundle into place
    152139post-destroot {
     
    155142        file attributes $f -owner root -group wheel
    156143    }
    157144    # Enable setuid on helper binary
    158     file attributes ${destroot}${prefix}/Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs -permissions 04755
     145    file attributes ${destroot}${prefix}/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse -permissions 04755
    159146}
    160147
    161148
     
    169156# signed binary instead here too.
    170157if { $use_signed_kext } {
    171158    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}
    177162    }
    178163}
    179164
     
    181166
    182167notes {
    183168    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.osxfusefs
     169    Unloading can be done via: sudo kextunload -b com.github.osxfuse.filesystems.osxfuse
    185170    Alternatively (or if this fails), just reboot your computer now.
    186171}
    187172
  • dports/fuse/osxfuse/files/patch-buildsystem.diff

     
    1 --- build.sh.orig       2014-06-09 15:41:49.000000000 -0500
    2 +++ build.sh    2014-10-16 21:26:27.000000000 -0500
    3 @@ -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=/tmp
    8 +readonly M_CONF_TMPDIR=@@TMP@@
    9  readonly M_PLISTSIGNER_TEST_KEY="`dirname $0`/prefpane/autoinstaller/TestKeys/private_key.der"
    10  
    11  # Other constants
    12 @@ -104,37 +104,37 @@
    13  declare M_XCODE_VERSION_REQUIRED=""
    14  
    15  # SDK 10.5
    16 -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.6
    23 -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.7
    30 -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.8
    37 -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.9
    44 -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.10
    51 -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      then
    65 @@ -1984,7 +1984,7 @@
    66      xcrun make -j4 >$m_stdout 2>$m_stderr
    67      m_exit_on_error "make failed while compiling the OSXFUSE library."
    68  
    69 -    xcrun make install >$m_stdout 2>$m_stderr
    70 +    xcrun make install DESTDIR="@@DESTROOT@@" >$m_stdout 2>$m_stderr
    71      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 +0100
    2 +++ kext/common/fuse_param.h    2013-12-22 18:50:44.000000000 +0100
    3 @@ -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 +0100
    3 +++ build.sh    2015-12-11 15:04:41.000000000 +0100
    4 @@ -117,6 +117,9 @@
    5  declare M_XCODE71=""
    6  declare M_XCODE71_VERSION=7.1
    7  readonly M_XCODE71_COMPILER="com.apple.compilers.llvm.clang.1_0"
    8 +declare M_XCODE72=""
    9 +declare M_XCODE72_VERSION=7.2
    10 +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_version
    16                  fi
    17                  ;;
    18 +            7.2*)
    19 +                m_version_compare $M_XCODE72_VERSION $m_xcode_version
    20 +                if [[ $? != 2 ]]
    21 +                then
    22 +                    M_XCODE72="$m_xcode_root"
    23 +                    M_XCODE72_VERSION=$m_xcode_version
    24 +                fi
    25 +                ;;
    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      fi
    33 +    if [[ -n "$M_XCODE72" ]]
    34 +    then
    35 +        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 +    fi
    42  
    43      m_read_input "$@"
    44