Changes between Initial Version and Version 1 of Ticket #25658


Ignore:
Timestamp:
Jul 13, 2010, 11:34:52 PM (14 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25658

    • Property Status changed from new to assigned
    • Property Owner changed from macports-tickets@… to ryandesign@…
  • Ticket #25658 – Description

    initial v1  
    11I am attaching a Portfile and file, sbt.sh, for the simple-build-tool (sbt) project.
    2 
    3 The ''Portfile'' contents are:
    4 {{{
    5 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    6 # $Id$
    7 
    8 PortSystem                      1.0
    9 
    10 # Note the googlecode project full name.
    11 set project_name "simple-build-tool"
    12 
    13 name                    sbt
    14 version                 0.7.4
    15 
    16 categories              devel java
    17 maintainers             jon.buffington.name:me
    18 platforms               darwin
    19 
    20 description             Simple build tool (sbt) is designed to simplify building Scala projects.
    21 
    22 long_description        Simple build tool (sbt) is provides unintrusive and easy to set up for simple \
    23                                         Scala projects. All configuration, customization, and extension are done in Scala. \
    24                                         Sbt supports continuous compilation and testing with triggered execution in \
    25                                         mixed Scala/Java projects.
    26 
    27 homepage                        http://code.google.com/p/${project_name}/
    28 
    29 master_sites            googlecode:${project_name}
    30 
    31 checksums               md5     8903fb141037056a497925f3efdb9edf \
    32                         sha1    2b7cfadf05b3b26285bb2038145479741268d334 \
    33                         rmd160  19c39da679d05b600fde06acf9acf657a7701f93
    34 
    35 depends_build           bin:java:kaffe
    36 
    37 distname                        ${name}-launch-${version}
    38 
    39 # Name the wrapper shell script.
    40 set wrapper "sbt.sh"
    41 
    42 extract.suffix          .jar
    43 extract.mkdir           yes
    44 pre-extract {
    45         file copy ${filespath}/${wrapper} ${worksrcpath}
    46 }
    47 
    48 set jarname ${distname}${extract.suffix}
    49 
    50 configure {
    51         reinplace "s|__SBT_LAUNCHER_PATH__|${prefix}/share/${name}/${jarname}|g" ${worksrcpath}/${wrapper}
    52 }
    53 
    54 use_configure           no
    55 universal_variant       no
    56 build               {}
    57 
    58 destroot {
    59         set sbtdir "${destroot}${prefix}/share/${name}"
    60 
    61         xinstall -m 755 -d ${sbtdir}
    62         xinstall -m 644 ${distpath}/${jarname} ${sbtdir}/
    63         xinstall -m 755 ${worksrcpath}/${wrapper} ${sbtdir}/${name}
    64 
    65         # Symlink sbt into the bin directory.
    66         system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/${name}/${name}"
    67 }
    68 }}}
    69 
    70 The ''files/sbt.sh'' contents are:
    71 {{{
    72 #!/bin/sh
    73 #
    74 # Copyright (c) 2007-2009 Jon Buffington. All rights reserved.
    75 #
    76 # Licensed under the Apache License, Version 2.0 (the "License");
    77 # you may not use this file except in compliance with the License.
    78 # You may obtain a copy of the License at
    79 #
    80 #     http://www.apache.org/licenses/LICENSE-2.0
    81 #
    82 # Unless required by applicable law or agreed to in writing, software
    83 # distributed under the License is distributed on an "AS IS" BASIS,
    84 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    85 # See the License for the specific language governing permissions and
    86 # limitations under the License.
    87 
    88 # Is the location of the SBT launcher JAR file.
    89 LAUNCHJAR="__SBT_LAUNCHER_PATH__"
    90 
    91 # Capture any arguments
    92 QUOTED_ARGS=""
    93 while [ "$1" != "" ] ; do
    94         QUOTED_ARGS="$QUOTED_ARGS \"$1\""
    95         shift
    96 done
    97 
    98 # Ensure enough heap space is created for SBT.
    99 if [ -z "$JAVA_OPTS" ]; then
    100         JAVA_OPTS="-Xmx512M"
    101 fi
    102 
    103 # Assume java is already in the shell path.
    104 exec java $JAVA_OPTS -jar "$LAUNCHJAR" $QUOTED_ARGS
    105 }}}