Skip to content

Commit

Permalink
groovyserv: set supported_archs, platforms; other fixes
Browse files Browse the repository at this point in the history
Use github portgroup; fixes livecheck. Modernize checksums. Because this
port installs a binary, indicate the architecture of that binary in
supported_archs and indicate platforms {darwin any}. Remove unnecessary
workTarget variable. Simplify to avoid foreach and system. Use leading 0
on octal numbers.

Closes: https://trac.macports.org/ticket/70934
  • Loading branch information
ryandesign committed Sep 26, 2024
1 parent 310a6a2 commit 691588e
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions devel/groovyserv/Portfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
PortSystem 1.0
PortGroup github 1.0

github.setup kobo groovyserv 0.9 v
revision 0
checksums rmd160 24482827f878985361f8147b60901843a4f37d4b \
sha256 975ffbdefecc146a4d234163b4c07319065d975bf4e16e1c914fe357f7decf7f \
size 906076

name groovyserv
version 0.9
categories devel groovy
maintainers nomaintainer
description GroovyServ makes Groovy startup time quicker, by pre-invoking groovy as a TCP/IP server.
Expand All @@ -11,15 +16,12 @@ long_description In the case of scripting in dynamic-type languages, quick respo
be intolerable. \
GroovyServ reduces the startup time of JVM and Groovy runtime significantly.
homepage https://kobo.github.io/groovyserv/
platforms darwin
platforms {darwin any}
supported_archs x86_64
distname ${name}-${version}-macosx-x86_64-bin
master_sites https://github.com/downloads/kobo/groovyserv
checksums md5 99dc7505ba03fe4ed22353e492e20121 \
sha1 8c3ee10527af0f390a15a3d75b5199b1fa05c90e \
rmd160 24482827f878985361f8147b60901843a4f37d4b
github.tarball_from downloads

worksrcdir ${name}-${version}
set workTarget ""

use_zip yes
use_configure no
Expand All @@ -28,21 +30,17 @@ build {}

pre-destroot {
# Remove extraneous bat files
foreach f [glob -directory ${worksrcpath}${workTarget}/bin *.bat] {
file delete $f
}
delete {*}[glob ${worksrcpath}/bin/*.bat]
}

destroot {
# Create the target java directory
xinstall -m 755 -d ${destroot}${prefix}/share/devel/${name}
xinstall -m 0755 -d ${destroot}${prefix}/share/devel/${name}

# Copy over the needed elements of our directory tree
file copy ${worksrcpath}/lib \
${worksrcpath}/bin \
${destroot}${prefix}/share/devel/${name}
copy ${worksrcpath}/lib ${worksrcpath}/bin ${destroot}${prefix}/share/devel/${name}

# Symlink groovyserv into the bin directory
system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/devel/${name}/bin/groovyserver"
system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/devel/${name}/bin/groovyclient"
ln -s ${prefix}/share/devel/${name}/bin/groovyserver ${destroot}${prefix}/bin
ln -s ${prefix}/share/devel/${name}/bin/groovyclient ${destroot}${prefix}/bin
}

0 comments on commit 691588e

Please sign in to comment.