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:
Please attach ebuilds, not provide links to them.
Created attachment 182812 [details] Ebuild Ebuild file
Created attachment 182813 [details, diff] Import patch Patch for removing unused imports.
Created attachment 182815 [details] Load file File that loads JDE
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...)
5. Avoid wildcards in ESVN_PATCHES. This is bound to fail if at some later time additional patches are added to FILESDIR.
> 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?
(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.
(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.
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.
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.
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?)
(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.
(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.