"CMC" == C.M. Connelly <c...@math.hmc.edu>

    CMC> I noticed that the RPMForge Subversion packages don't
    CMC> include the JavaHL bindings, which means getting
    CMC> Subclipse* working with the RPMForge Subversion packages
    CMC> (on CentOS 5) is pretty tough.

Attached is a diff to get the existing spec file to work to build
the Java bindings, plus a patch you need to apply to actually get
them to link properly.

   Claire

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  Claire M. Connelly                             c...@math.hmc.edu
  System Administrator, Dept. of Mathematics, Harvey Mudd College
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

--- subversion.spec.orig        2010-09-30 16:23:45.000000000 -0700
+++ subversion.spec     2010-09-30 16:23:54.000000000 -0700
@@ -2,6 +2,10 @@
 # Authority: dag
 # Upstream: CollabNet <dev$subversion,apache,org>
 
+%define _with_java 1
+# set JDK path to build javahl; default for JPackage
+%define jdk_path /usr/lib/jvm/java
+
 #{?el3:#define _without_swig 1}
 %{?rh9:%define _without_pie 1}
 %{?rh9:%define _without_swig 1}
@@ -23,7 +27,7 @@
 Summary: Modern Version Control System designed to replace CVS
 Name: subversion
 Version: 1.6.12
-Release: 0.1%{?dist}
+Release: 0.2%{?dist}
 License: BSD
 Group: Development/Tools
 URL: http://subversion.tigris.org/
@@ -43,6 +47,7 @@
 Patch6: subversion-1.6.0-pie.patch
 Patch7: subversion-1.1.3-java.patch
 Patch8: subversion-1.6.6-ruby-rpath.patch
+Patch100: subversion-1.6.12-javahl-pic.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires: apr-devel >= 0.9.4
@@ -134,6 +139,7 @@
 %patch3 -p1 -b .rpath
 %{!?_without_pie:%patch6 -p1 -b .pie}
 %{?_with_java:%patch7 -p1 -b .java}
+%{?_with_java:%patch100 -p1 -b .java-pic}
 %{!?_without_ruby:%patch8 -p0 -b .ruby-rpath}
 
 %{__rm} -rf neon apr apr-util
@@ -166,7 +172,7 @@
 export svn_cv_ruby_sitedir_libsuffix=""
 export svn_cv_ruby_sitedir_archsuffix=""
 
-export CC=gcc CXX=g++
+export CC=gcc CXX=g++ %{?_with_java:JAVA_HOME=%{jdk_path}} 
CFLAGS="$RPM_OPT_FLAGS"
 %configure \
     --disable-mod-activation \
     --disable-neon-version-check \
@@ -179,20 +185,23 @@
     --with-ruby-sitedir="%{ruby_sitearch}" \
     --with-sasl="%{_prefix}" \
     --with-ssl \
-%{!?_without_swig:--with-swig="swig-%{swig_version}/install"}
+%{!?_without_swig:--with-swig="swig-%{swig_version}/install"} \
+%{?_with_java:--enable-javahl} \
+|| (cat config.log; exit 1)
 #    --disable-neon-version-check \
 # 1.3.0 tarball ships with generated swig sources
 #%{__make} extraclean-swig-headers swig-headers
 %{__make} %{?_smp_mflags} all tools
 
 %if %{!?_without_swig:1}0
-%{__make} %{?_smp_mflags} swig-py swig-py-lib %{swigdirs}
-%{__make} %{?_smp_mflags} swig-pl swig-pl-lib
+%{__make}  %{?_smp_mflags} swig-py swig-py-lib %{swigdirs}
+%{__make}  %{?_smp_mflags} swig-pl swig-pl-lib
 %{!?_without_ruby:%{__make} %{?_smp_mflags} swig-rb swig-rb-lib}
 %endif
 
-%{?_with_java:%{_make} %{?_smp_mflags} javahl-java javahl-javah}
-%{?_with_java:%{_make} %{?_smp_mflags} javahl}
+# javahl-javah does not parallel-make with javahl
+%{?_with_java:%{__make} javahl-java javahl-javah}
+%{?_with_java:%{__make} %{?_smp_mflags} javahl}
 
 %install
 %{__rm} -rf %{buildroot}
@@ -207,7 +216,7 @@
         PERL_INSTALL_ROOT="%{buildroot}"
 %endif
 
-%{?_with_java:%{__make} install-javahl install-javahl-lib 
DESTDIR="%{buildroot}"}
+%{?_with_java:%{__make} install-javahl-java install-javahl-lib 
javahl_javadir=%{_javadir} DESTDIR="%{buildroot}"}
 
 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/subversion
 
@@ -324,10 +333,13 @@
 %files javahl
 %defattr(-, root, root, 0755)
 %{_libdir}/libsvnjavahl-1.*
-%{_libdir}/svn-javahl/
+%{_javadir}/svn-javahl.jar
 %endif
 
 %changelog
+* Mon Sep 13 2010 Claire M. Connelly <c...@math.hmc.edu> - 1.6.12-0.2 - hmcmath
+- Reenable building of Java packages.
+
 * Tue Jun 22 2010 Dag Wieers <d...@wieers.com> - 1.6.12-0.1 - 8792+/dag
 - Updated to release 1.6.12.
 
--- subversion-1.6.12/Makefile.in.orig  2010-09-27 18:05:40.000000000 -0700
+++ subversion-1.6.12/Makefile.in       2010-09-27 18:06:49.000000000 -0700
@@ -182,7 +182,7 @@
 COMPILE_SWIG_RB = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_RB_COMPILE) 
$(CPPFLAGS) $(SWIG_RB_INCLUDES) $(INCLUDES) -o $@ -c
 
 # special compilation for files destined for javahl (i.e. C++)
-COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) 
$(JAVAHL_INCLUDES) -o $@ -c
+COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) 
-fno-pie -prefer-pic $(JAVAHL_INCLUDES) -o $@ -c
 COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
 COMPILE_JAVAHL_JAVAH = $(JAVAH)
 

Attachment: pgpPSnqd3taEf.pgp
Description: PGP signature

_______________________________________________
suggest mailing list
suggest@lists.rpmforge.net
http://lists.rpmforge.net/mailman/listinfo/suggest

Reply via email to