Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259933 - app-emacs/jde-2.3.6_pre20081208 (version bump)
Summary: app-emacs/jde-2.3.6_pre20081208 (version bump)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Emacs project
URL: https://jdee.svn.sourceforge.net/svnr...
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2009-02-22 19:39 UTC by Johan Andersson
Modified: 2009-03-28 18:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild (jde-2.3.6.ebuild,1.12 KB, text/plain)
2009-02-22 21:14 UTC, Johan Andersson
Details
Import patch (import.patch,1.12 KB, patch)
2009-02-22 21:15 UTC, Johan Andersson
Details | Diff
Load file (70jde-gentoo.el,105 bytes, text/plain)
2009-02-22 21:15 UTC, Johan Andersson
Details
jde-2.3.6_pre20081208.ebuild (jde-2.3.6_pre20081208.ebuild,1.74 KB, text/plain)
2009-03-10 12:22 UTC, Ulrich Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Andersson 2009-02-22 19:39:15 UTC
Quote from: http://www.emacswiki.org/emacs-en/JavaDevelopmentEnvironment
"January 2009: latest version 2.3.5.1 is very old and has lots of known bugs. Don’t use it and use the unreleased 2.3.6 instead, available as a branch inside the Subversion repositoy at: https://jdee.svn.sourceforge.net/svnroot/jdee. The main Subversion branch (labelled as JDEE 2.3.5.2) has less fixes than 2.3.6. So use 2.3.6! (unless new versions had appeared by the time you read this)."

I made an ebuild that fetches the source from SVN and compiles it with ant (didn't get eant to work). I also included a patch for a problem when removing unused imports.

The ebuild is found here: http://github.com/rejeep/ebuilds/tree/9f49cae751e6786ee3e2f4eaab6999adc55d76b6/app-emacs/jde (http://github.com/rejeep/ebuilds)

This is my first ebuild, so please check it and tell me if there's anything I should change.

Reproducible: Always

Steps to Reproduce:
Comment 1 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-02-22 20:17:11 UTC
Please attach ebuilds, not provide links to them.
Comment 2 Johan Andersson 2009-02-22 21:14:32 UTC
Created attachment 182812 [details]
Ebuild

Ebuild file
Comment 3 Johan Andersson 2009-02-22 21:15:29 UTC
Created attachment 182813 [details, diff]
Import patch

Patch for removing unused imports.
Comment 4 Johan Andersson 2009-02-22 21:15:58 UTC
Created attachment 182815 [details]
Load file

File that loads JDE
Comment 5 Ulrich Müller gentoo-dev 2009-03-04 10:05:52 UTC
Sorry, I had missed this one, since it was incorrectly assigned to maintainer-wanted (and didn't contain "emacs" in the summary ;-) ).

> This is my first ebuild, so please check it and tell me if there's anything
> I should change.

Some remarks / questions:
1. Please check if any additional build-time dependencies for ant are needed.
2. LICENSE might be incomplete, see java/lib/LICENSE.*
3. Looks like src_install() is based on jde-2.3.5.1 which had some QA problems.
   Could you change it, so that it resembles jde-2.3.5.1-r1?
4. Would it be possible to change the install locations, so that the elisp
   code goes to ${SITELISP}/${PN} (no further "lisp" subdirectory), and all
   java code goes to ${SITEETC}/${PN}, i.e. to /usr/share/emacs/etc/jde?
   ${SITELISP} really shouldn't contain anything other than lisp, since all
   its subdirectories will be unnecessarily added to Emacs's load-path.
   (Yes, jde-2.3.5.1-r1 also doesn't do this right...)
Comment 6 Ulrich Müller gentoo-dev 2009-03-05 07:40:28 UTC
5. Avoid wildcards in ESVN_PATCHES. This is bound to fail if at some later time
   additional patches are added to FILESDIR.
Comment 7 Johan Andersson 2009-03-09 15:10:40 UTC
> Some remarks / questions:
1. Could you please tell me how go about something like that? I have no idea where to start.
2. License for JDE is GPL. java/lib/LICENSE.* are licenses for packages that JDE uses. Such as BeanShell. Should these be included in this ebuild?
3. I cant find any jde-2.3.5.1-r1 ebuild.
4. Unfortunately there's a bug in JDE that makes this a bit harder. It should do it by setting bsh-jar to the absolute path of bsh.jar. But beanshell.el fails to set the variable jar in the bsh class to that value. To fix it you could set that variable directly. A simple patch would fix that. I can create such a patch if you think it's better. You maybe could use an advice, but I don't know how they work. Specially not with cedet.
5. Done!

I have not uploaded any of the new files here. They are on my Github repo. I first wanted to ask how I should upload them. Should I create a new attachment or update the existing files?
Comment 8 Christian Faulhammer (RETIRED) gentoo-dev 2009-03-09 15:18:34 UTC
(In reply to comment #7)
> > Some remarks / questions:
> 1. Could you please tell me how go about something like that? I have no idea
> where to start.

 require calls in Elisp, include statements (?) in Java and the like.  Check the code what packages are loaded.

> 2. License for JDE is GPL. java/lib/LICENSE.* are licenses for packages that
> JDE uses. Such as BeanShell. Should these be included in this ebuild?

 Which GPL?  And is BeanShell shipped with the JDE tarball?  If yes, all licenses must be included in the LICENSE field.

> 3. I cant find any jde-2.3.5.1-r1 ebuild.

 Please resync.

> 4. Unfortunately there's a bug in JDE that makes this a bit harder. It should
> do it by setting bsh-jar to the absolute path of bsh.jar. But beanshell.el
> fails to set the variable jar in the bsh class to that value. To fix it you
> could set that variable directly. A simple patch would fix that. I can create
> such a patch if you think it's better. You maybe could use an advice, but I
> don't know how they work. Specially not with cedet.

 A patch and a message to upstream would be great.

> 5. Done!

 Thanks.

> I have not uploaded any of the new files here. They are on my Github repo. I
> first wanted to ask how I should upload them. Should I create a new attachment
> or update the existing files?
 
 A new attachment. I am sure, the already attached files cannot be altered.

Get the ebuild in shape and then attach a new one here.
Comment 9 Alistair Bush (RETIRED) gentoo-dev 2009-03-09 22:06:05 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > > Some remarks / questions:
> 
> > 2. License for JDE is GPL. java/lib/LICENSE.* are licenses for packages that
> > JDE uses. Such as BeanShell. Should these be included in this ebuild?
> 
>  Which GPL?  And is BeanShell shipped with the JDE tarball?  If yes, all
> licenses must be included in the LICENSE field.

Small correction here.  All bundled java libraries (aka BeanShell) should be replaced with system libraries ( aka dev-java/beanshell ).  We have documentation on the java project page about useful functions to help with this.

> 
> Get the ebuild in shape and then attach a new one here.
> 

lots more work from a java perspective,  firstly 

inherit java-pkg-2 java-ant-2 elisp subversion 
you will need to watch out for eclasses exporting the same functions.  eg. pkg_setup, etc.

This will never hit the tree without using eant.  hopefully the above inherit line will fix your eant issue.

From a java perspective this needs a lot of work.  Join us on irc://freenode/#gentoo-java and we would be more than happy to help.
Comment 10 Alistair Bush (RETIRED) gentoo-dev 2009-03-09 22:11:39 UTC
Sorry for the bug spam. I should have included the following.

If you replace all the bundled java libraries you may not need to bother with the java license file.
Comment 11 Ulrich Müller gentoo-dev 2009-03-10 12:22:08 UTC
Created attachment 184561 [details]
jde-2.3.6_pre20081208.ebuild

Updated ebuild. This comprises changes by ali_bush (Java part) and by myself (Emacs part).

Please note:
- This uses a current snapshot of the 2.3.6 branch instead of being a live
  ebuild, so that we don't have a moving target.
- Work in progress. It compiles. ;-) It's unlikely to work though, since the
  Lisp code still contains the wrong paths. Unfortunately this is _not_
  configurable, but uses the infamous "locate-library" trickery.

So, what remains to be done (and this may well be the major part of the work) is to locate all places with hardcoded paths in the Lisp part (and maybe Java part, too?) and make them configurable, or at least replace them by the paths we currently have. At least one has to look for calls to "jde-root", "jde-find-jde-data-directory", "jde-find-jde-doc-directory", and "bsh-find-bsh-data-directory". Ideally such a patch would be sent upstream.

Now, as far as I know, ali_bush doesn't use Emacs. And I am no Java expert. So at this point help from someone who is qualified with both is needed and would really be appreciated.
Comment 12 Ulrich Müller gentoo-dev 2009-03-10 15:58:57 UTC
It might also be worthwhile to look into the Debian patchset which can be found at <http://ftp.de.debian.org/debian/pool/contrib/j/jde/jde_2.3.5.1-5.diff.gz>. Especially 0005-Set-the-location-of-needed-files-for-beanshell.el-an.patch might be useful for us.

(And since these patches originate from years 2004 to 2006, I wonder why they haven't found their way into the upstream sources. Have they been refused by the JDEE maintainers, or didn't Debian care to send them?)
Comment 13 Ulrich Müller gentoo-dev 2009-03-20 21:32:42 UTC
(In reply to comment #11)
> So, what remains to be done (and this may well be the major part of the work)
> is to locate all places with hardcoded paths in the Lisp part (and maybe Java
> part, too?) and make them configurable, or at least replace them by the paths
> we currently have. At least one has to look for calls to "jde-root",
> "jde-find-jde-data-directory", "jde-find-jde-doc-directory", and
> "bsh-find-bsh-data-directory".

Done, I hope that I've caught all such occurences.

jde-2.3.6_pre20081208.ebuild is available in the Emacs overlay for testing.
Comment 14 Ulrich Müller gentoo-dev 2009-03-28 18:48:27 UTC
(In reply to comment #13)
> jde-2.3.6_pre20081208.ebuild is available in the Emacs overlay for testing.

Committed to Portage tree, in order to get some wider testing for it.