I never packaged Java libraries for Linux, but I'm marginally familiar
with packaging Common Lisp. Of course it's not the same, but some
principles will most likely apply there too. So, the idea is that
packages are made to depend on some other package, which handles their
installation and provides all other relevant info about what's already
installed and where. Linux distros usually publish their policies for
packaging different languages. Seeing how Java is a popular language,
there must be a lot of material explaining how to do that. So, I'd
need to find out who's that "resident" program is, and call it to
figure out what there is.
Here's one such description:
http://fedoraproject.org/wiki/Packaging:Java (it doesn't mention any
resident programs, but it has a predefined %{_javadir}. I'll need to
look into some actual packages to figure out how they do it.

Another way to go about it, although it would require more work would
be to ask RPM / DEB / Emerge and whatever other package managers are
there for what's installed. Yet another way would be to simply call
`locate some.jar`, but that might find jars not meant to be used in
the project. On my machine these jars live in /usr/share/java/ so it
might be a good fallback for distros, where one is unable to identify
the package manager used...

The simplest way to go about it: the one I used, I guess. I symlinked
the jars from /usr/share/java to the lib directory of the project.
This allowed me to keep all paths intact.

How much work it would be to add this to the current build script -
I'm not yet ready to tell, but I'll look into this in the next few
days.

...

On Tue, Dec 30, 2014 at 6:10 PM, Alex Harui <aha...@adobe.com> wrote:
>
>
> On 12/30/14, 1:06 AM, "Left Right" <olegsivo...@gmail.com> wrote:
>
>>Re' patches: many of the jars loaded by the build script may already
>>exist on the user's system. At least Guava, JFlex, ANTLR, Java CUP,
>>JBurg and LZMA are all installable on Linux in a more conventional way
>>(i.e. through the package manager). Wouldn't it be better to first
>>test for installed jars and only then load them? (I would have
>>preferred that this was the default which can be overridden).
>>I also think that this is possible to achieve on Cygwin (i.e. have
>>Cygwin provide the global locations of the above jars). I don't know
>>what is the policy wrt common jar location on Mac or Windows.
>
> Interesting idea.  I don’t know enough about Java and Linux to know how
> our jars would find those jars and make sure they are the right version.
> Also any tweaking of configs and class paths needs to be done via Ant.  Is
> that easy to do?
>
> -Alex
>

Reply via email to