Changeset 97746
- Timestamp:
- Sep 14, 2012, 6:54:20 AM (12 years ago)
- Location:
- trunk/dports/java/hadoop
- Files:
-
- 5 added
- 5 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/java/hadoop/Portfile
r97554 r97746 6 6 name hadoop 7 7 version 1.0.3 8 revision 38 revision 4 9 9 categories java devel science 10 10 maintainers hum openmaintainer … … 23 23 sha256 716ab51f75ffb70343c3cca02f7ba4722f42376edb67eecbd42a426a054e6423 24 24 25 patchfiles patch- hadoop-env.sh.diff \26 patch- native.diff \27 patch- c++.diff25 patchfiles patch-conf-hadoop-env.sh.diff \ 26 patch-src-native.diff \ 27 patch-src-c++.diff 28 28 29 29 depends_build bin:ant:apache-ant … … 51 51 } 52 52 53 universal_variant no 53 variant universal {} 54 54 55 55 use_configure no 56 56 57 # Build native and c++ libraries. 57 set java_include -I/System/Library/Frameworks/JavaVM.framework/Headers 58 set cflags "${configure.cflags} [get_canonical_archflags]" 59 set cxxflags "${configure.cxxflags} [get_canonical_archflags cxx]" 60 set ldflags "${configure.ldflags} [get_canonical_archflags] -framework JavaVM" 61 set cppflags "${configure.cppflags} ${java_include}" 62 63 # Set configure args to build native and c++-libhdfs. 64 post-patch { 65 set libs "-ldl -lz -lsnappy" 66 reinplace "s|@cc@|${configure.cc}|g" ${worksrcpath}/build.xml 67 reinplace "s|@cflags@|${cflags}|g" ${worksrcpath}/build.xml 68 reinplace "s|@cxx@|${configure.cxx}|g" ${worksrcpath}/build.xml 69 reinplace "s|@cxxflags@|${cxxflags}|g" ${worksrcpath}/build.xml 70 reinplace "s|@ldflags@|${ldflags}|g" ${worksrcpath}/build.xml 71 reinplace "s|@libs@|${libs}|g" ${worksrcpath}/build.xml 72 reinplace "s|@cppflags@|${cppflags}|g" ${worksrcpath}/build.xml 73 reinplace "s|@args@|--prefix=${prefix}|g" ${worksrcpath}/build.xml 74 } 75 76 # Build native and c++-libhdfs. 58 77 build.cmd ant 59 78 build.args -Dcompile.native=true \ … … 64 83 65 84 # Fix install_name of dylib. 66 p ost-build{85 pre-destroot { 67 86 foreach file [glob ${worksrcpath}/build/native/**/lib/*.dylib \ 68 87 ${worksrcpath}/build/c++/**/lib/*.dylib] { … … 98 117 depends_lib-append port:fuse4x 99 118 100 patchfiles-append patch-fusedfs.diff 101 102 post-patch { 103 set cppflags "-I${prefix}/include -I/System/Library/Frameworks/JavaVM.framework/Headers" 104 set ldflags "-L${prefix}/lib -L$@" 105 reinplace "s|configure|configure CPPFLAGS=\"${cppflags}\" LDFLAGS=\"${ldflags}\"|" \ 106 ${worksrcpath}/src/contrib/fuse-dfs/bootstrap.sh 107 } 108 119 patchfiles-append patch-src-contrib-fusedfs.diff 120 121 # libhdfs.dylib must be built before configuring fuse-dfs. 109 122 post-build { 123 set libs "-lfuse -lhdfs" 124 # "$@" is replaced with "${hadoop.root}/build/c++/${build.platform}/lib". 125 # See files/patch-src-contrib-fusedfs.diff. 126 set args "--prefix=${prefix} \ 127 CC=${configure.cc} \ 128 CFLAGS=\"${cflags}\" \ 129 LDFLAGS=\"${ldflags} -L$@\" \ 130 LIBS=\"${libs}\" \ 131 CPPFLAGS=\"${cppflags}\"" 132 set sh ${worksrcpath}/src/contrib/fuse-dfs/bootstrap.sh 133 reinplace "s|\./configure|\./configure ${args}|" ${sh} 134 # Build fusedfs. 110 135 system -W ${worksrcpath} "ant compile-contrib -Dlibhdfs=1 -Dfusedfs=1" 111 136 } … … 115 140 ${worksrcpath}/build/contrib/fuse-dfs/fuse_dfs \ 116 141 ${destroot}${prefix}/bin 142 # Fix install_name in fuse_dfs. 143 set bin ${destroot}${prefix}/bin/fuse_dfs 144 regexp {(\S+\/libhdfs\S+dylib)} [exec otool -L ${bin}] path 145 system "install_name_tool -change ${path} ${prefix}/lib/libhdfs.dylib ${bin}" 117 146 # Install fuse_dfs_wrapper.sh. 118 147 xinstall -m 755 ${filespath}/fuse_dfs_wrapper.sh ${destroot}${hadoop_home}/bin … … 194 223 195 224 variant pseudo description {Run on a single-node in a pseudo-distributed mode} { 196 patchfiles-append patch- conf.diff225 patchfiles-append patch-pseudo.diff 197 226 198 227 post-destroot {
Note: See TracChangeset
for help on using the changeset viewer.