I was curious when graaff said that he'd unbundled antlr from mysql-workbench so I took a look. This is what I found: * The jar path is being passed to cmake without using java-pkg-2.eclass to properly set the correct JVM beforehand. * It isn't including stringtemplate, a dependency, in the classpath. * antlr-runtime.jar is being given, which does nothing by itself. * None of this is being used anyway because pregenerated files are included in the tarball and GENERATE_FILES in library/mysql.parser/grammar/build-parser is false. Assuming you still want to generate the files, the simplest and safest way to deal with this is not to use java-pkg-2.eclass but to patch build-parser to use our antlr launcher script instead. The important lines should look like this. antlr3.5 -make $SOURCE_FILE -o $TARGET_DIRECTORY -Xmaxswitchcaselabels 30 antlr3.5 -make $SOURCE_FILE2 -o $TARGET_DIRECTORY -Xmaxswitchcaselabels 30 I didn't want to install the long list of dependencies to actually try the build but I was able to run build-parser manually anyway. Both antlr3.5 and antlr3 spit out tons of warnings but they seem to generate the files regardless. The only way to know for sure whether either of them are compatible is to build the rest of the package. Please use 3.5 over 3 if it works. I note that antlr-c is still bundled in ext/antlr-runtime but I also note that CMakeLists.txt says the upstream 3.5 is buggy. I've looked into this and the fixes went into 3.5.2. We have dev-java/antlr-3.5.2 in the tree but only dev-libs/antlr-c-3.5. I was working on antlr-c-3.5.2 but got sidetracked. I'll get moving on this if you're interested.
(In reply to James Le Cuirot from comment #0) > I note that antlr-c is still bundled in ext/antlr-runtime but I also note > that CMakeLists.txt says the upstream 3.5 is buggy. I've looked into this > and the fixes went into 3.5.2. We have dev-java/antlr-3.5.2 in the tree but > only dev-libs/antlr-c-3.5. I was working on antlr-c-3.5.2 but got > sidetracked. I'll get moving on this if you're interested. Yes, please! Due to the way antlr-c is bundled we currently need to restrict the build to -j1 which has a big impact on build time.
(In reply to James Le Cuirot from comment #0) > * None of this is being used anyway because pregenerated files are included > in the tarball and GENERATE_FILES in > library/mysql.parser/grammar/build-parser is false. Thanks for the analysis. I've confirmed that this is not actually needed for mysql-workbench 6.3.4 by building the package. I've dropped the dependency.
antlr-c has now been bumped to 3.5.2. :)
Now my part is done, I'll close this to let bug #507838 finish the journey.