Ticket #38834: Portfile.diff
File Portfile.diff, 4.8 KB (added by ajdudman, 12 years ago) |
---|
-
(a) ../Portfile.old vs. (b) /tmp/Portfile
a b 3 3 PortSystem 1.0 4 4 5 5 name samba4 6 version 4.0.0tp5 7 revision 1 6 version 4.0.5 7 revision 0 8 maintainers mww 8 9 categories net 9 10 platforms darwin 10 maintainers mww11 11 license GPL-3 12 description SMB/CIFS server and client, ALPHArelease12 description SMB/CIFS server and client, beta-grade, stable release 13 13 long_description Samba is an software suite that provides seamless file \ 14 14 and print services to SMB/CIFS clients. \ 15 This is an ALPHA release! 15 This is a BETA-grade, stable release! 16 notes "This is a BETA-grade, stable release!" 16 17 17 18 homepage http://www.samba.org/ 18 master_sites http ://download.samba.org/samba/ftp/samba4/ \19 ftp://de.samba.org/ samba.org/samba4/19 master_sites https://ftp.samba.org/pub/samba/stable/ \ 20 ftp://de.samba.org/pub/samba/stable/ 20 21 distname samba-${version} 21 checksums md5 dbc2e04455d67b01d2020808065b96df \ 22 sha1 8897cc7a824a594b3543245cdbbceaea32e9e08d \ 23 rmd160 1870f67aa851751e381a3b03dadfa1d0afa28a12 22 checksums md5 58ec2fec08872b72f8fd526f2da20a9e \ 23 sha1 6e6faeb5741bb96816936c0acc3f5522d630b0ee \ 24 rmd160 294c96a14f978a0fda42f0fb6fdd5710547faacf 25 26 conflicts samba3 talloc tdb 27 28 depends_build port:docbook-xsl \ 29 port:perl5 \ 30 port:pkgconfig \ 31 port:python27 \ 32 port:libxslt 33 34 depends_lib port:db47 \ 35 port:gnutls \ 36 port:libiconv \ 37 port:openldap \ 38 port:popt \ 39 port:readline \ 40 port:sqlite3 \ 41 port:zlib 42 43 # The wafadmin patches came by running 'buildtools/update-waf.sh'. 44 patch.pre_args -p1 -b -z .orig 45 patchfiles patch-buildtools-wafadmin-Tools-python.py.diff \ 46 patch-buildtools-wafadmin-Utils.py.diff \ 47 patch-buildtools-wafsamba-wafsamba.py.diff \ 48 patch-buildtools-wafsamba-wscript.diff \ 49 patch-lib-ldb-tests-test-ldap.sh.diff \ 50 patch-lib-testtools-testtools-tests-test_compat.py.diff \ 51 patch-source4-scripting-bin-samba_backup.diff 24 52 25 depends_lib port:gnutls port:readline port:libiconv port:popt port:sqlite3 port:zlib port:gettext 53 post-patch { 54 reinplace "s|JOBS=1|JOBS=${build.jobs}|" ${worksrcpath}/configure 55 } 26 56 27 worksrcdir samba-${version}/source 57 pre-configure { 58 if {![catch {set vers [lindex [registry_active samba4] 0]}]} { 59 ui_error "Linking conflicts may occur. Please deactivate samba4 while building samba4." 60 return -code error "conflict" 61 } 62 if {![variant_isset mitkrb5] && ![catch {set vers [lindex [registry_active kerberos5] 0]}]} { 63 ui_error "Linking conflicts may occur. Please deactivate kerberos5 while building samba4." 64 return -code error "conflict" 65 } 66 } 28 67 29 configure.args --with-fhs \ 30 --mandir=${prefix}/share/man \ 31 --with-libiconv=${prefix} --with-readline=${prefix} --with-sqlite3 68 # waf 69 configure.args --enable-fhs \ 70 --with-libiconv=${prefix} \ 71 --destdir=${destroot} 32 72 33 destroot.target-append installman34 73 post-destroot { 35 # add a postfix of '4' to all executables to avoid file conflicts 36 foreach dir {bin sbin} { 37 foreach bin [glob -directory "${destroot}${prefix}/${dir}" -type f *] { 38 file rename "${bin}" "${bin}4" 74 set change [list] 75 set dlist [list] 76 set bogus ${destroot}${prefix}/lib/libnss_wins 77 if {[file isfile ${bogus}.so.2]} { 78 file rename ${bogus}.so.2 ${bogus}.2.dylib 79 file delete ${bogus}.so 80 ln -s [file tail ${bogus}.2.dylib] ${bogus}.dylib 81 } 82 fs-traverse f ${destroot}${prefix}/lib { 83 switch -exact -- "[file type $f][file extension $f]" { 84 file.dylib - 85 file.so { 86 set o [exec otool -D $f | sed "1d;s/.inst.dylib/.dylib/"] 87 set n [string range $f [string length ${destroot}] end] 88 lappend change "-change '$o' '$n'" 89 lappend dlist $f 90 system "install_name_tool -id '$n' '$f'" 91 } 39 92 } 40 93 } 41 # ..and also to the manpages42 foreach dir [glob -directory "${destroot}${prefix}/share/man" "man\[138\]"] {43 foreach man [glob -directory "${dir}" -type f *]{44 file rename "${man}" [string range "${man}" 0 [expr [string last . "${man}"] - 1]]4[string range "${man}" [string last . "${man}"] [string length "${man}"]]94 foreach f [glob ${destroot}${prefix}/*bin/*] { 95 if {[string equal [file type $f] "file"] && [file executable $f] && 96 ![catch {exec /usr/bin/file $f | grep -qw Mach-O} res]} { 97 lappend dlist $f 45 98 } 46 99 } 100 foreach f $dlist { 101 exec xargs -J % install_name_tool % "$f" << [join ${change} "\n"] 102 } 103 } 104 105 variant mitkrb5 description "Build with MIT Kerberos 5" { 106 depends_lib-append kerberos5 107 config.args-append --with-system-mitkrb5 47 108 } 48 109 49 110 livecheck.type regex 50 livecheck.url http://us4.samba.org/samba/ftp/samba4/?M=D111 livecheck.url [lindex ${master_sites} 0] 51 112 livecheck.regex samba-(\[0-9a-z.\]+)\\.tar\\.gz 52 113