http://www.antlr.org/download.html Reproducible: Always
Created attachment 383938 [details] Ebuild for antlr v4.4 This ebuild forks well for me, hope it will help.
dev-java/antlr-4.5 was released on 2015-01-23.
+*antlr-4.4 (26 Mar 2015) + + 26 Mar 2015; Patrice Clement <monsieurp@gentoo.org> +antlr-4.4.ebuild: + Version bump courtesy of silver_ghost@list.ru. Fix bug 462778. +
As far as v4.5 is concerned, well... My day was, so far, fine. Until I decided to look into bumping this package to v4.5. So I opened the attachment linked to this bug and slapped it into an ebuild file. I then tried to see what would be the result, if miraculously, it would compile and install fine. Oh man how wrong I was. Since antlr-4.5 was released on 2015-01-23, as pointed out by Arfrever, I named the ebuild "antlr-4.5.ebuild". So far so good. patrice@vmint ~/gentoo-x86/dev-java/antlr $ ls antlr-2.7.7-r2.ebuild antlr-2.7.7-r5.ebuild antlr-3.1.3-r3.ebuild antlr-4.5.ebuild ChangeLog CVS files Manifest metadata.xml patrice@vmint ~/gentoo-x86/dev-java/antlr $ ebuild antlr-4.5.ebuild clean manifest configure test install Appending /home/patrice/gentoo-x86 to PORTDIR_OVERLAY... Forcing test. >>> Creating Manifest for /home/patrice/gentoo-x86/dev-java/antlr ... >>> Compiling source in /var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5 ... * Disabling all optional ANT_TASKS Buildfile: build.xml does not exist! Funny. No build.xml? Let's look into the directory to see what's inside. vmint antlr4-4.5 # pwd /var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5 vmint antlr4-4.5 # ls antlr4.iml antlr4-maven-plugin bild.py CHANGES.txt contributors.txt deploy.py LICENSE.txt README.md runtime tool vmint antlr4-4.5 # find . -type f -name build.xml vmint antlr4-4.5 # echo $? 0 Hm. Okay. What is this bild.py? #!/usr/bin/env python import os import string from collections import OrderedDict import shutil """ This script uses my experimental build tool http://www.bildtool.org In order to build the complete ANTLR4 product with Java, CSharp, Python 2/3, and JavaScript targets, do the following from a UNIX command line. Windows build using this script is not yet supported. You will also need python 2.7, python 3.4, node.js and mono (on Mac/Linux) """ Clearly the most backwards way to package a jar. https://github.com/antlr/antlr4/wiki/How-to-build-ANTLR-itself There's mkjar and compile. Let's try that: vmint antlr4-4.5 # python2.7 bild.py mkjar target mkjar require compile require parsers build compile skipping mkjar_complete Traceback (most recent call last): File "/var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5/bilder.py", line 857, in processargs target() File "bild.py", line 161, in mkjar _mkjar() File "bild.py", line 165, in _mkjar mkjar_complete() File "bild.py", line 91, in mkjar_complete require(compile) File "/var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5/bilder.py", line 434, in require raise Exception() Exception bild failed vmint antlr4-4.5 # cat bild.log [03/26/15 18:12:31 <module> bild.py:42 bilder.py:124] platform=linux2 [03/26/15 18:12:31 <module> bild.py:42 bilder.py:125] jdk={} [03/26/15 18:12:31] require parsers [03/26/15 18:12:31 require bild.py:77 bilder.py:422] require parsers [03/26/15 18:12:31] build compile [03/26/15 18:12:31 require bild.py:77 bilder.py:430] build compile [03/26/15 18:12:34 javac bild.py:87 bilder.py:503] 1.7.0_76 [03/26/15 18:12:34 javac bild.py:87 bilder.py:511] javac -d /var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5/out -cp /var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5/out:/root/.bild/jars/antlr-3.5.1-complete.jar:runtime/Java/lib/org.abego.treelayout.core.jar: -source 1.6 -target 1.6 -Xlint -Xlint:-serial -g -sourcepath gen3:gen4:runtime/Java/src:tool/src /var/tmp/portage/dev-java/antlr-4.5/work/antlr4-csharp/tool/src [03/26/15 18:12:37 javac bild.py:87 bilder.py:511] javac: invalid flag: /var/tmp/portage/dev-java/antlr-4.5/work/antlr4-csharp/tool/src Usage: javac <options> <source files> use -help for a list of possible options [03/26/15 18:15:24 javac bild.py:87 bilder.py:511] javac: invalid flag: /var/tmp/portage/dev-java/antlr-4.5/work/antlr4-javascript/tool/src Usage: javac <options> <source files> use -help for a list of possible options [03/26/15 18:15:24] error building mkjar_complete [03/26/15 18:15:24 require bild.py:91 bilder.py:433] error building mkjar_complete Traceback (most recent call last): File "/var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5/bilder.py", line 857, in processargs target() File "bild.py", line 161, in mkjar _mkjar() File "bild.py", line 165, in _mkjar mkjar_complete() File "bild.py", line 91, in mkjar_complete require(compile) File "/var/tmp/portage/dev-java/antlr-4.5/work/antlr4-4.5/bilder.py", line 434, in require raise Exception() Exception 419 def require(target): 420 global ERRORS 421 print "require", target.__name__ 422 log("require "+target.__name__) 423 if id(target) in bild_completed: 424 return 425 bild_completed.add(id(target)) 426 target() 427 caller = inspect.currentframe().f_back.f_code.co_name 428 if ERRORS==0: 429 print "build", caller 430 log("build "+caller) 431 else: 432 print "skipping", caller 433 log("error building "+caller) 434 raise Exception() Wow. He did reinvent the wheel. What went wrong? No idea. If someone is interested in bumping this package to v4.5, be my guest, open a bug and assign it to yourself. I'm not willing to waste my time deciphering a one-off script written by a maintainer who's clearly not aware of common Java packaging tools (ant, maven, gradle et al.).