Skip to content

Conversation

@robcd
Copy link

@robcd robcd commented Dec 7, 2025

+# -- 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 +
PortSystem 1.0

-name javacc
-version 6.0
+revision 4
+PortGroup github 1.0
+
+use_zip yes
+github.setup javacc javacc 7.0.13
+description Java Compiler Compiler, a parser generator for use with Java
categories java lang devel
-platforms any
-supported_archs noarch
-maintainers nomaintainer
license BSD
-description Java Compiler Compiler, a parser generator for use with Java
long_description Java Compiler Compiler (JavaCC) is the most popular \

 with JavaCC), actions, debugging, etc.

-homepage https://javacc.org/
-master_sites http://java.net/projects/javacc/downloads/download/
-checksums rmd160 bac11ae2993642b254e4b90303e15de3599295eb \

  •                sha256  4147023112d0a959756e9cfab93c33b5d940b58692a39a6785897e4be85e16a6
    

-use_zip yes

-post-extract {

  • these wrappers are missing in the v6.0 zip-file

  • file copy ${filespath}/javacc ${filespath}/jjdoc ${filespath}/jjrun ${filespath}/jjtree \
  •    ${worksrcpath}/bin
    

-}
+github.master_sites https://github.com/${github.author}/${name}/archive:source \

  •                https://repo1.maven.org/maven2/net/java/dev/${github.author}/${name}/${version}:binary
    

+distfiles ${distname}${extract.suffix}:source \

  •                ${distname}.jar:binary
    

+platforms any
+supported_archs noarch
+maintainers nomaintainer
+checksums ${distname}${extract.suffix} \

  •                    rmd160 b8ac61e85f3881d08cac08c40b6298e351e81d4e \
    
  •                    sha256 735d39bca711aeb77ed3bc113747f97844ba29f5e91c78c8a6fc317068de3157 \
    
  •                    size 3612611 \
    
  •                ${distname}.jar \
    
  •                    rmd160 087ef8f84326064ac4503228f98b406be401e311 \
    
  •                    sha256 a4ea46021ec567d89ca305763eedf738ba8a63601445e1aad08a329a6554502a \
    
  •                    size 637847
    

+worksrcdir ${github.author}-${github.project}-${github.version}

configure {

  • reinplace "s|@jar@|${prefix}/share/java/javacc.jar|g" \
  •    ${worksrcpath}/bin/javacc ${worksrcpath}/bin/jjdoc ${worksrcpath}/bin/jjtree
    
  • reinplace "s|target|share/java|g" \
  •    ${worksrcpath}/scripts/javacc \
    
  •    ${worksrcpath}/scripts/jjdoc \
    
  •    ${worksrcpath}/scripts/jjtree
    

}

build {}

destroot {
xinstall -d -m 755 ${destroot}${prefix}/share/java
${destroot}${prefix}/share/doc/

  • file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
  • xinstall -m 644 ${worksrcpath}/bin/lib/javacc.jar \
  •    ${destroot}${prefix}/share/java/
    
  • xinstall -m 755 -W ${worksrcpath}/bin javacc jjdoc jjtree jjrun \
  • file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
  • file rename ${distpath}/${distname}.jar \
  •    ${destroot}${prefix}/share/java/${name}.jar
    
  • xinstall -m 755 -W ${worksrcpath}/scripts javacc jjdoc jjtree jjrun
    ${destroot}${prefix}/bin
    xinstall -m 644 -W ${worksrcpath} LICENSE
    ${destroot}${prefix}/share/doc/${name}
    }

-livecheck.type regex
-livecheck.url ${homepage}
-livecheck.regex javacc-([0-9.]+).zip

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS x.y
Xcode x.y / Command Line Tools x.y.z

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

+# -*- 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
+
 PortSystem 1.0

-name                javacc
-version             6.0
+revision            4
+PortGroup           github 1.0
+
+use_zip             yes
+github.setup        javacc javacc 7.0.13
+description         Java Compiler Compiler, a parser generator for use with Java
 categories          java lang devel
-platforms           any
-supported_archs     noarch
-maintainers         nomaintainer
 license             BSD
-description         Java Compiler Compiler, a parser generator for use with Java
 long_description    Java Compiler Compiler (JavaCC) is the most popular \

     with JavaCC), actions, debugging, etc.
-
-homepage            https://javacc.org/
-master_sites        http://java.net/projects/javacc/downloads/download/
-checksums           rmd160  bac11ae2993642b254e4b90303e15de3599295eb \
-                    sha256  4147023112d0a959756e9cfab93c33b5d940b58692a39a6785897e4be85e16a6
-
-use_zip             yes
-
-post-extract {
-    # these wrappers are missing in the v6.0 zip-file
-    file copy ${filespath}/javacc ${filespath}/jjdoc ${filespath}/jjrun ${filespath}/jjtree \
-        ${worksrcpath}/bin
-}
+github.master_sites https://github.com/${github.author}/${name}/archive:source \
+                    https://repo1.maven.org/maven2/net/java/dev/${github.author}/${name}/${version}:binary
+distfiles           ${distname}${extract.suffix}:source \
+                    ${distname}.jar:binary
+platforms           any
+supported_archs     noarch
+maintainers         nomaintainer
+checksums           ${distname}${extract.suffix} \
+                        rmd160 b8ac61e85f3881d08cac08c40b6298e351e81d4e \
+                        sha256 735d39bca711aeb77ed3bc113747f97844ba29f5e91c78c8a6fc317068de3157 \
+                        size 3612611 \
+                    ${distname}.jar \
+                        rmd160 087ef8f84326064ac4503228f98b406be401e311 \
+                        sha256 a4ea46021ec567d89ca305763eedf738ba8a63601445e1aad08a329a6554502a \
+                        size 637847
+worksrcdir          ${github.author}-${github.project}-${github.version}

 configure {
-    reinplace "s|@jar@|${prefix}/share/java/javacc.jar|g" \
-        ${worksrcpath}/bin/javacc ${worksrcpath}/bin/jjdoc ${worksrcpath}/bin/jjtree
+    reinplace "s|target|share/java|g" \
+        ${worksrcpath}/scripts/javacc \
+        ${worksrcpath}/scripts/jjdoc \
+        ${worksrcpath}/scripts/jjtree
 }
-
+
 build {}

 destroot {
     xinstall -d -m 755 ${destroot}${prefix}/share/java \
         ${destroot}${prefix}/share/doc/
-    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
-    xinstall -m 644 ${worksrcpath}/bin/lib/javacc.jar \
-        ${destroot}${prefix}/share/java/
-    xinstall -m 755 -W ${worksrcpath}/bin javacc jjdoc jjtree jjrun \
+    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
+    file rename ${distpath}/${distname}.jar \
+        ${destroot}${prefix}/share/java/${name}.jar
+    xinstall -m 755 -W ${worksrcpath}/scripts javacc jjdoc jjtree jjrun \
         ${destroot}${prefix}/bin
     xinstall -m 644 -W ${worksrcpath} LICENSE \
         ${destroot}${prefix}/share/doc/${name}
 }
-
-livecheck.type      regex
-livecheck.url       ${homepage}
-livecheck.regex     javacc-(\[0-9\.\]+).zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants