rpms/ocaml-perl4caml/devel ocaml-perl4caml.spec,1.2,1.3

Richard W.M. Jones (rjones) fedora-extras-commits at redhat.com
Wed Mar 12 10:45:21 UTC 2008


Author: rjones

Update of /cvs/pkgs/rpms/ocaml-perl4caml/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9527

Modified Files:
	ocaml-perl4caml.spec 
Log Message:
* Wed Mar 12 2008 Richard W.M. Jones <rjones at redhat.com> - 0.9.5-3
- Fix %check rule (#436785).
- Use rpath for dllperl4caml.so as per this thread:
  https://www.redhat.com/archives/fedora-packaging/2008-March/thread.html#00070
  (#436807).
- Require rpath.



Index: ocaml-perl4caml.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-perl4caml/devel/ocaml-perl4caml.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ocaml-perl4caml.spec	4 Mar 2008 09:17:08 -0000	1.2
+++ ocaml-perl4caml.spec	12 Mar 2008 10:44:50 -0000	1.3
@@ -3,7 +3,7 @@
 
 Name:           ocaml-perl4caml
 Version:        0.9.5
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        OCaml library for calling Perl libraries and code
 
 Group:          Development/Libraries
@@ -16,7 +16,6 @@
 BuildRequires:  ocaml-ocamldoc
 BuildRequires:  perl >= 5.8
 BuildRequires:  perl-ExtUtils-Embed
-BuildRequires:  chrpath
 
 # Perl4caml provides type-safe wrappers for these Perl modules:
 #Requires:  perl-Date-Calc
@@ -31,6 +30,16 @@
 #Requires:  perl-URI
 #Requires:  perl-WWW-Mechanize
 
+# Because we're embedding an rpath into the library, we need to
+# depend on that path.  See:
+# https://www.redhat.com/archives/fedora-packaging/2008-March/thread.html#00070
+# https://www.redhat.com/archives/fedora-devel-list/2008-March/msg00922.html
+%global libperldir %(perl -MExtUtils::Embed -e ldopts 2> /dev/null | egrep -o '/[^[:space:]]*CORE' | head -1)
+%if "%{?libperldir}" != "%{nil}"
+Requires: %{?libperldir}/libperl.so
+%endif
+
+
 %define _use_internal_dependency_generator 0
 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
 %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
@@ -64,15 +73,9 @@
 
 
 %check
-# This fails if perl4caml is installed.  The bytecode programs
-# load dllperl4caml.so from OCaml's stublibs, instead of the
-# one we just built.  Since dllperl4caml.so in stublibs
-# (wrongly) lacks an rpath for libperl.so, it won't find
-# libperl.so in the obscure directory where it resides.
-# Monkeying around with LD_LIBRARY_PATH doesn't help because
-# ocamlrun uses $libdir/ocaml/ld.conf to find directories
-# containing the stublibs.
-make test ||:
+# Set the library path used by ocamlrun so it uses the library
+# we just built in the current directory.
+CAML_LD_LIBRARY_PATH=`pwd` make test
 
 
 %install
@@ -84,10 +87,10 @@
 make install
 
 strip $DESTDIR/%{_libdir}/ocaml/stublibs/dll*.so
-# Deleting the rpath in this shared library is wrong because
-# it means it can't find libperl.so, but Fedora policy requires
-# us to do it ...
-chrpath --delete $DESTDIR/%{_libdir}/ocaml/stublibs/dll*.so
+
+# Don't delete rpath!  See:
+# https://www.redhat.com/archives/fedora-packaging/2008-March/thread.html#00070
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -118,6 +121,13 @@
 
 
 %changelog
+* Wed Mar 12 2008 Richard W.M. Jones <rjones at redhat.com> - 0.9.5-3
+- Fix %check rule (#436785).
+- Use rpath for dllperl4caml.so as per this thread:
+  https://www.redhat.com/archives/fedora-packaging/2008-March/thread.html#00070
+  (#436807).
+- Require rpath.
+
 * Tue Mar  4 2008 Richard W.M. Jones <rjones at redhat.com> - 0.9.5-2
 - Rebuild for ppc64.
 




More information about the fedora-extras-commits mailing list