Ticket #38495: Portfile.patch

File Portfile.patch, 2.6 KB (added by alexs@…, 12 years ago)

After rebooting and using the above patch for a while, I found it wasn't very reliable. Forcing cassandra to stay foregrounded into daemondo seems to help with this.

  • Portfile

     
    44PortSystem              1.0
    55
    66name                    cassandra
    7 version                 1.2.2
     7set upver               1.2.2
     8set patchver            1
     9version                 ${upver}_${patchver}
    810categories              databases
    911maintainers             nomaintainer
    1012homepage                http://cassandra.apache.org/
    1113platforms               darwin
    1214license                 Apache-2
    1315master_sites            apache
    14 master_sites.mirror_subdir  ${name}/${version}
    15 distname                apache-${name}-${version}-src
     16master_sites.mirror_subdir  ${name}/${upver}
     17distname                apache-${name}-${upver}-src
    1618
    1719description             A highly scalable, eventually consistent, \
    1820                        distributed, structured key-value store.
     
    4244                        port:google-guava
    4345
    4446set java_basepath       ${prefix}/share/java
    45 set cassandra_destpath  ${java_basepath}/${name}-${version}
     47set cassandra_destpath  ${java_basepath}/${name}-${upver}
    4648
    4749set mp_libs {antlr junit jline slf4j-api slf4j-log4j12 commons-cli \
    4850    commons-lang commons-codec jakarta-log4j \
     
    6567destroot {
    6668    # create directories
    6769    set cas_home ${destroot}${cassandra_destpath}
    68     set doc_dir ${destroot}${prefix}/share/doc/${name}-${version}
     70    set doc_dir ${destroot}${prefix}/share/doc/${name}-${upver}
    6971    xinstall -m 755 -d ${cas_home}/lib ${doc_dir}
    7072   
    7173    # move in docs
     
    8183    eval xinstall -m 755 [glob ${worksrcpath}/bin/*] ${destroot}${prefix}/bin
    8284
    8385    # install jars
    84     xinstall -m 644 ${worksrcpath}/build/apache-${name}-${version}-SNAPSHOT.jar \
     86    xinstall -m 644 ${worksrcpath}/build/apache-${name}-${upver}-SNAPSHOT.jar \
    8587        ${cas_home}/lib/${name}.jar
    86     xinstall -m 644 ${worksrcpath}/build/apache-${name}-thrift-${version}-SNAPSHOT.jar \
     88    xinstall -m 644 ${worksrcpath}/build/apache-${name}-thrift-${upver}-SNAPSHOT.jar \
    8789        ${cas_home}/lib/${name}-thrift.jar
    8890    eval xinstall -m 644 [glob ${worksrcpath}/lib/*.jar] ${cas_home}/lib/
    8991   
     
    106108}
    107109
    108110startupitem.create      yes
    109 startupitem.executable  sudo -u ${cassandrauser} ${prefix}/bin/cassandra
     111startupitem.executable  sudo -u ${cassandrauser} env PATH=${prefix}/bin:${prefix}/sbin:/usr/bin:/bin:/usr/sbin:/sbin \
     112                                                     __CFPREFERENCES_AVOID_DAEMON=1 \
     113                                                     ${prefix}/bin/cassandra -f
    110114
    111115livecheck.type          regex
    112116livecheck.url           ${homepage}download/