Ticket #42114: maven-devel-fix-select.patch

File maven-devel-fix-select.patch, 3.8 KB (added by robsonpeixoto@…, 11 years ago)
  • Portfile

     
    66
    77name            maven-devel
    88version         3.1.1
     9revision        1
    910
    1011categories      java devel
    1112license         Apache-2
     
    3334master_sites    apache:maven/maven-3/${version}/binaries
    3435distname        apache-maven-${version}-bin
    3536worksrcdir      apache-maven-${version}
     37checksums       md5     6342fdf6b0aabc1457c7f8cc218127ed \
     38                sha1    630eea2107b0742acb315b214009ba08602dda5f \
     39                sha256  077ed466455991d5abb4748a1d022e2d2a54dc4d557c723ecbacdc857c61d51b
    3640
    37 checksums           md5     6342fdf6b0aabc1457c7f8cc218127ed \
    38                     sha1    630eea2107b0742acb315b214009ba08602dda5f \
    39                     sha256  077ed466455991d5abb4748a1d022e2d2a54dc4d557c723ecbacdc857c61d51b
     41depends_run     port:maven_select \
     42                bin:java:kaffe
    4043
    41 depends_run     port:maven_select
     44use_configure   no
     45universal_variant no
    4246
    43 use_configure     no
    44 # hmm? 
    45 universal_variant no
    46 
    4747select.group    maven
    48 select.file     ${filespath}/maven3
     48select.file     ${filespath}/${name}
    4949
    5050# Source builds of maven are not possible. So, the default build is a binary
    5151# install of the jars.
     
    5353}
    5454
    5555destroot {
    56     set maven_dir    apache-maven-${version}
    57     set maven_path   ${destroot}${prefix}/share/java/${maven_dir}
     56    set mavendir ${destroot}${prefix}/share/java/${name}
    5857
    5958    # Create the target java directory exists
    60     xinstall -m 755 -d ${maven_path}
     59    xinstall -m 755 -d ${mavendir}
    6160
    6261    # Copy over the needed elements of our directory tree
    6362    file copy \
     
    6564        ${worksrcpath}/boot \
    6665        ${worksrcpath}/conf \
    6766        ${worksrcpath}/lib \
    68         ${maven_path}
     67        ${mavendir}
    6968
    7069    # Remove extraneous bat files
    71     foreach f [glob -directory ${maven_path}/bin *.bat] {
     70    foreach f [glob -directory ${mavendir}/bin *.bat] {
    7271        file delete $f
    7372    }
    7473
    7574    # Fix permissions on shell scripts
    7675    foreach f { maven install_repo.sh } {
    77         if [file exists ${maven_path}/bin/$f] {
    78             file attributes ${maven_path}/bin/$f -permissions +x
     76        if [file exists ${mavendir}/bin/$f] {
     77            file attributes ${mavendir}/bin/$f -permissions +x
    7978        }
    8079    }
    8180
    8281    # Reduce the permissions on the distribution files.
    83     file attributes ${maven_path}/conf -permissions 0755
    84     file attributes ${maven_path}/conf/settings.xml -permissions 0644
    85     foreach f [glob -directory ${maven_path}/boot *.jar] {
     82    file attributes ${mavendir}/conf -permissions 0755
     83    file attributes ${mavendir}/conf/settings.xml -permissions 0644
     84    foreach f [glob -directory ${mavendir}/boot *.jar] {
    8685        file attributes $f -permissions 0644
    8786    }
    88     foreach f [glob -directory ${maven_path}/lib *.jar] {
     87    foreach f [glob -directory ${mavendir}/lib *.jar] {
    8988        file attributes $f -permissions 0644
    9089    }
    9190
    9291    # Symlink maven into the bin directory
    93     ln -s ${prefix}/share/java/${maven_dir}/bin/mvn ${prefix}/bin/mvn3
     92    system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${name}/bin/mvn mvn-devel"
    9493}
    9594
    9695notes \
     
    9998
    10099livecheck.type  regex
    101100livecheck.url   ${homepage}download.html
    102 livecheck.regex apache-maven-(3\\.\[0-9.\]+)-bin\\.tar
     101livecheck.regex apache-maven-(3\\.1\\.\[0-9\]+)-bin\\.tar
  • files/maven-devel

     
    1 bin/mvn3
     1bin/mvn-devel
  • files/maven3

     
    1 bin/mvn3