Ticket #52072: protobuf3-java.patch

File protobuf3-java.patch, 2.9 KB (added by jeff@…, 8 years ago)

patch for protobuf3-java.patch

  • Portfile

     
    44PortGroup       github 1.0
    55
    66name            protobuf3-java
    7 version         0.0.0.2
    8 set real_version 3.0.0-alpha-3
     7version         3.0.0
    98categories      devel
    109maintainers     blair
    1110license         BSD
     
    2928                logical record of information, containing a series of \
    3029                name-value pairs.
    3130
    32 github.setup    google protobuf-java ${real_version} v
     31github.setup    google protobuf-java ${version} v
    3332github.tarball_from releases
    34 # REMOVE THE VERSION LINE WHEN THERE IS A GA RELEASE AND LEAVE THE ONE ABOVE
    35 version         0.0.0.2
    3633homepage        https://github.com/google/protobuf
    37 master_sites    https://github.com/google/protobuf/releases/download/v${real_version}
    38 distfiles       protobuf-java-${real_version}.tar.gz
    39 worksrcdir      protobuf-${real_version}/java
     34master_sites    https://github.com/google/protobuf/releases/download/v${version}
     35distfiles       protobuf-java-${version}.tar.gz
     36worksrcdir      protobuf-${version}/java
    4037
    41 checksums       sha1   9af47e30aaa218fa37ff9b0dff887fab30c4d898 \
    42                 sha256 479ecd501632c15b194de10879fe5a5000cd3cde2fa942fedf65b328bfd58d0e
     38checksums       sha1   bbb5bbed9e0fde6dc72a0d55e359ad81030420a8 \
     39                sha256 411eb52ee294386cf04e0fcc5a68a93280c90d90908915f0ce2a28a695d42702
    4340
    4441platforms       darwin
    4542
     
    4744depends_build   port:maven3
    4845
    4946patch {
    50     reinplace "s#../src/protoc#${prefix}/bin/protoc#g" ${worksrcpath}/pom.xml
     47    reinplace "s#\$\{protobuf.source.dir\}/protoc#${prefix}/bin/protoc#g" ${worksrcpath}/pom.xml
    5148}
    5249
    5350use_configure   no
    5451
    5552build.cmd       mvn3
    56 build.target    install ## javadoc:javadoc
     53build.target    install javadoc:javadoc -DskipTests
    5754build.env       MAVEN_OPTS=-Duser.home=${workpath}/.home
    5855
    59 post-build {
    60     ## This command exists with a non-zero status but does build some
    61     ## docs, so ignore the error.
    62     system -W ${worksrcpath} "${build.env} mvn3 javadoc:javadoc || :"
    63 }
    64 
    6556destroot {
    6657    set javadir ${destroot}${prefix}/share/java
    6758    set docdir ${destroot}${prefix}/share/doc/${name}
    68 
     59    set utildocdir ${destroot}${prefix}/share/doc/${name}-util
     60   
    6961    xinstall -d -m 755 ${javadir}
    7062    xinstall -d -m 755 ${docdir}
     63    xinstall -d -m 755 ${utildocdir}
    7164
    72     file copy ${worksrcpath}/target/protobuf-java-${real_version}.jar ${javadir}/protobuf.jar
    73     file copy ${worksrcpath}/target/site/apidocs ${docdir}/api
     65    file copy ${worksrcpath}/core/target/protobuf-java-${version}.jar ${javadir}/protobuf.jar
     66    file copy ${worksrcpath}/util/target/protobuf-java-util-${version}.jar ${javadir}/protobuf-util.jar
     67    file copy ${worksrcpath}/core/target/site/apidocs ${docdir}/api
     68    file copy ${worksrcpath}/util/target/site/apidocs ${utildocdir}/api
    7469}
    7570
    7671test.run    yes