Opened 20 years ago

Closed 20 years ago

Last modified 9 years ago

#2649 closed enhancement (fixed)

UPDATE: subversion-1.1.3

Reported by: jay@… Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port: subversion

Description (last modified by ryandesign (Ryan Carsten Schmidt))

This patch adds a java variant which builds and installs the javahl bindings. A couple of thoughts: I wasn't sure if a separate port was preferred (python bindings are a variant, but perl is a separate port). Also, this probalby won't work on anything other than OS X b/c of the java location. (It's likely not hard to create the bsd and linux variants, but I don't have the systems to test that.) Also, I wonder about my use of a reinplace to change one line, I'm a tcl / portfile newbie. One final thing is that I left the jar out in /opt/local/lib/svn-javahl; I for one don't take lightly to things getting shoved into system dirs unless absolutely necessary (which is necessary for the .jnilib file in /Libraray/Java/Extensions, unfortunately).

--- /opt/darwinports/dports/devel/subversion/Portfile   Sun Jan 30 16:15:39 2005
+++ dports/devel/subversion/Portfile    Sun Jan 30 16:16:32 2005
@@ -34,6 +34,23 @@
 post-configure {       reinplace "s|need_relink=yes|need_relink=no|g" \
                                ${worksrcpath}/libtool
                        }
+
+variant java darwin {
+       configure.args-append --enable-javahl --without-jikes
+       build.args-append javahl
+       destroot.target-append install-javahl
+       pre-configure {
+                               reinplace "s|\\(LINK_JAVAHL_CXX.*\\)-rpath|\\1-dynamiclib -rpath|g" \
+                                       ${worksrcpath}/Makefile.in
+                               reinplace "s|libsvnjavahl-1.la|libsvnjavahl.jnilib|g" \
+                                       ${worksrcpath}/build-outputs.mk
+       }
+       post-destroot {
+               file mkdir ${destroot}/Library/Java/Extensions
+               file copy ${destroot}${prefix}/lib/libsvnjavahl.jnilib \
+                       ${destroot}/Library/Java/Extensions
+       }
+}
 
 variant mod_dav_svn {  depends_build path:${prefix}/apache2/bin/apxs:apache2
                        configure.args-append \

Attachments (1)

subjava.patch (920 bytes) - added by jay@… 20 years ago.
Patch for java bindings variant

Download all attachments as: .zip

Change History (5)

Changed 20 years ago by jay@…

Attachment: subjava.patch added

Patch for java bindings variant

comment:1 Changed 20 years ago by danielluke (Daniel J. Luke)

Status: newassigned

Thanks for this submission, I'll get it committed soon.

Perhaps we can have it symlink the .jnilib to the /Library/Java/Extensions directory (and also perhaps the .jar file to somewhere appropriate?)

I would also like as few things out of ${prefix} as possible, but if we have to have things there for it to work, then we have to have things there for it to work.

comment:2 Changed 20 years ago by jay@…

(In reply to comment #2)

Perhaps we can have it symlink the .jnilib to the /Library/Java/Extensions directory (and also perhaps the .jar file to somewhere appropriate?)

I just tested a symlink and it seems to work. As for the jar, I think the main reason anyone would want this patch is to run Subclipse, and the jar comes with the plugin. AFAIK, there's no good general place to symlink jars.

I would also like as few things out of ${prefix} as possible, but if we have to have things there for it to work, then we have to have things there for it to work.

For native libraries, the default java.library.path is

.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

Pick your poison. And I don't think it's right to say "start up java with -Djava.library.path=..."; it's like saying "run all your programs like 'LD_LIBRARY_PATH=... prog args ...'

comment:3 Changed 20 years ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: assignedclosed

I've just committed your patch (modified to use a symlink instead of a copy of the file).

Thanks!

comment:4 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: subversion added
Note: See TracTickets for help on using tickets.