Ticket #52072: protobuf3-java.patch
File protobuf3-java.patch, 2.9 KB (added by jeff@…, 8 years ago) |
---|
-
Portfile
4 4 PortGroup github 1.0 5 5 6 6 name protobuf3-java 7 version 0.0.0.2 8 set real_version 3.0.0-alpha-3 7 version 3.0.0 9 8 categories devel 10 9 maintainers blair 11 10 license BSD … … 29 28 logical record of information, containing a series of \ 30 29 name-value pairs. 31 30 32 github.setup google protobuf-java ${ real_version} v31 github.setup google protobuf-java ${version} v 33 32 github.tarball_from releases 34 # REMOVE THE VERSION LINE WHEN THERE IS A GA RELEASE AND LEAVE THE ONE ABOVE35 version 0.0.0.236 33 homepage 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.gz39 worksrcdir protobuf-${ real_version}/java34 master_sites https://github.com/google/protobuf/releases/download/v${version} 35 distfiles protobuf-java-${version}.tar.gz 36 worksrcdir protobuf-${version}/java 40 37 41 checksums sha1 9af47e30aaa218fa37ff9b0dff887fab30c4d898 \42 sha256 4 79ecd501632c15b194de10879fe5a5000cd3cde2fa942fedf65b328bfd58d0e38 checksums sha1 bbb5bbed9e0fde6dc72a0d55e359ad81030420a8 \ 39 sha256 411eb52ee294386cf04e0fcc5a68a93280c90d90908915f0ce2a28a695d42702 43 40 44 41 platforms darwin 45 42 … … 47 44 depends_build port:maven3 48 45 49 46 patch { 50 reinplace "s# ../src/protoc#${prefix}/bin/protoc#g" ${worksrcpath}/pom.xml47 reinplace "s#\$\{protobuf.source.dir\}/protoc#${prefix}/bin/protoc#g" ${worksrcpath}/pom.xml 51 48 } 52 49 53 50 use_configure no 54 51 55 52 build.cmd mvn3 56 build.target install ## javadoc:javadoc53 build.target install javadoc:javadoc -DskipTests 57 54 build.env MAVEN_OPTS=-Duser.home=${workpath}/.home 58 55 59 post-build {60 ## This command exists with a non-zero status but does build some61 ## docs, so ignore the error.62 system -W ${worksrcpath} "${build.env} mvn3 javadoc:javadoc || :"63 }64 65 56 destroot { 66 57 set javadir ${destroot}${prefix}/share/java 67 58 set docdir ${destroot}${prefix}/share/doc/${name} 68 59 set utildocdir ${destroot}${prefix}/share/doc/${name}-util 60 69 61 xinstall -d -m 755 ${javadir} 70 62 xinstall -d -m 755 ${docdir} 63 xinstall -d -m 755 ${utildocdir} 71 64 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 74 69 } 75 70 76 71 test.run yes