[112830] trunk/dports/java/maven-devel/Portfile

Frank Schima macsforever2000 at macports.org
Sat Nov 2 14:39:13 PDT 2013


On Nov 2, 2013, at 8:17 AM, easieste at macports.org wrote:

> Revision
> 112830
> Author
> easieste at macports.org
> Date
> 2013-11-02 07:17:50 -0700 (Sat, 02 Nov 2013)
> Log Message
> 
> Update to apache-maven-3.1.1. 
> 
> Change the install path to the more recognizable 'apache-maven-3.1.1'
> instead of 'maven-devel'.
> 
> Whether/when we should replace java/maven3 with this port is still up
> in air depending on how things shake out with compatibility with
> existing Maven usages.  Maybe make an `java/maven31` port?
> Modified Paths
> 
> trunk/dports/java/maven-devel/Portfile
> Diff
> 
> Modified: trunk/dports/java/maven-devel/Portfile (112829 => 112830)
> 
> --- trunk/dports/java/maven-devel/Portfile	2013-11-02 12:46:02 UTC (rev 112829)
> +++ trunk/dports/java/maven-devel/Portfile	2013-11-02 14:17:50 UTC (rev 112830)
> @@ -5,7 +5,7 @@
>  PortGroup select 1.0
>  
>  name            maven-devel
> -version         3.1.0
> +version         3.1.1
>  
>  categories      java devel
>  license         Apache-2
> @@ -34,9 +34,9 @@
>  distname        apache-maven-${version}-bin
>  worksrcdir      apache-maven-${version}
>  
> -checksums       md5     e251cf1a584b4a5f13ae118abaacd08a \
> -                sha1    af0867027f0907631c1f85ecf668f74c08f5d5e9 \
> -                sha256  59088c62c14b996d597bbd55e720866b0e13e36daed8a46a81c01058ee74bd54
> +checksums           md5     6342fdf6b0aabc1457c7f8cc218127ed \
> +                    sha1    630eea2107b0742acb315b214009ba08602dda5f \
> +                    sha256  077ed466455991d5abb4748a1d022e2d2a54dc4d557c723ecbacdc857c61d51b
>  
>  depends_run     port:maven_select 
>  
> @@ -45,7 +45,7 @@
>  universal_variant no 
>  
>  select.group    maven
> -select.file     ${filespath}/${name}
> +select.file     ${filespath}/maven3
>  
>  # Source builds of maven are not possible. So, the default build is a binary
>  # install of the jars.
> @@ -53,10 +53,11 @@
>  }
>  
>  destroot {
> -    set mavendir ${destroot}${prefix}/share/java/${name}
> +    set maven_dir    apache-maven-${version}
> +    set maven_path   ${destroot}${prefix}/share/java/${maven_dir}
>  
>      # Create the target java directory exists
> -    xinstall -m 755 -d ${mavendir}
> +    xinstall -m 755 -d ${maven_path}
>  
>      # Copy over the needed elements of our directory tree
>      file copy \
> @@ -64,32 +65,32 @@
>          ${worksrcpath}/boot \
>          ${worksrcpath}/conf \
>          ${worksrcpath}/lib \
> -        ${mavendir}
> +        ${maven_path}
>  
>      # Remove extraneous bat files
> -    foreach f [glob -directory ${mavendir}/bin *.bat] {
> +    foreach f [glob -directory ${maven_path}/bin *.bat] {
>          file delete $f
>      }
>  
>      # Fix permissions on shell scripts
>      foreach f { maven install_repo.sh } {
> -        if [file exists ${mavendir}/bin/$f] {
> -            file attributes ${mavendir}/bin/$f -permissions +x
> +        if [file exists ${maven_path}/bin/$f] {
> +            file attributes ${maven_path}/bin/$f -permissions +x
>          }
>      }
>  
>      # Reduce the permissions on the distribution files.
> -    file attributes ${mavendir}/conf -permissions 0755
> -    file attributes ${mavendir}/conf/settings.xml -permissions 0644
> -    foreach f [glob -directory ${mavendir}/boot *.jar] {
> +    file attributes ${maven_path}/conf -permissions 0755
> +    file attributes ${maven_path}/conf/settings.xml -permissions 0644
> +    foreach f [glob -directory ${maven_path}/boot *.jar] {
>          file attributes $f -permissions 0644
>      }
> -    foreach f [glob -directory ${mavendir}/lib *.jar] {
> +    foreach f [glob -directory ${maven_path}/lib *.jar] {
>          file attributes $f -permissions 0644
>      }
>  
>      # Symlink maven into the bin directory
> -    system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${name}/bin/mvn mvn3"
> +    system "cd ${destroot}${prefix}/bin && ln -s ../share/java/${maven_dir}/bin/mvn mvn3”

Using system “cd” seems totally unnecessary here. It would be best to only use the ln command and simply use absolute paths for both files. 

>  }
>  
>  notes \
> _______________________________________________
> macports-changes mailing list
> macports-changes at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-changes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20131102/0ae5d32a/attachment-0001.html>


More information about the macports-dev mailing list