[hivex/f15] Really fix OCaml make install rule. (cherry picked from commit 2532068415e9539d978595fa99e1a64947a96

Richard W.M. Jones rjones at fedoraproject.org
Mon Sep 26 18:57:15 UTC 2011


commit ddd6600fe82fae3aa16a263bbfcd95e307501dd5
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue May 17 17:41:11 2011 +0100

    Really fix OCaml make install rule.
    (cherry picked from commit 2532068415e9539d978595fa99e1a64947a96089)

 ...ackage-name-when-installing-native-bindin.patch |    2 +-
 0002-ocaml-Really-fix-make-install-rule.patch      |   46 +++++++++++++++++
 hivex.spec                                         |   12 +++--
 ocaml-Fix-autotools.patch                          |   52 ++++++++++++++++++++
 4 files changed, 107 insertions(+), 5 deletions(-)
---
diff --git a/0001-ocaml-Set-package-name-when-installing-native-bindin.patch b/0001-ocaml-Set-package-name-when-installing-native-bindin.patch
index 5ea2571..cc856ce 100644
--- a/0001-ocaml-Set-package-name-when-installing-native-bindin.patch
+++ b/0001-ocaml-Set-package-name-when-installing-native-bindin.patch
@@ -1,7 +1,7 @@
 From f408b757b1d75429fae5fa7630a4fc5451844de7 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Tue, 17 May 2011 17:19:27 +0100
-Subject: [PATCH] ocaml: Set package name when installing native bindings.
+Subject: [PATCH 1/2] ocaml: Set package name when installing native bindings.
 
 This fixes commit b8ad15031cacf910634b4f4f4632232949c4acd2.
 ---
diff --git a/0002-ocaml-Really-fix-make-install-rule.patch b/0002-ocaml-Really-fix-make-install-rule.patch
new file mode 100644
index 0000000..9198b06
--- /dev/null
+++ b/0002-ocaml-Really-fix-make-install-rule.patch
@@ -0,0 +1,46 @@
+From 5fc8bc9d9ef6dd23d55771c8def7c369f32e7919 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Tue, 17 May 2011 17:37:31 +0100
+Subject: [PATCH 2/2] ocaml: Really fix 'make install' rule.
+
+This fixes commit b8ad15031cacf910634b4f4f4632232949c4acd2
+and commit f408b757b1d75429fae5fa7630a4fc5451844de7.
+---
+ ocaml/Makefile.am |   16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
+index 58fa8e3..c688df0 100644
+--- a/ocaml/Makefile.am
++++ b/ocaml/Makefile.am
+@@ -88,19 +88,19 @@ include .depend
+ SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
+ 
+ # Do the installation by hand, because we want to run ocamlfind.
++install_files = META *.so *.a *.cma *.cmi *.mli
++
++if HAVE_OCAMLOPT
++install_files += *.cmx *.cmxa
++endif
++
+ install-data-hook:
+ 	mkdir -p $(DESTDIR)$(OCAMLLIB)
+ 	mkdir -p $(DESTDIR)$(OCAMLLIB)/stublibs
+ 	$(OCAMLFIND) install \
+ 	  -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
+-	  hivex \
+-	  META *.so *.a *.cma *.cmi *.mli
+-if HAVE_OCAMLOPT
+-	$(OCAMLFIND) install \
+-	  -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
+-	  hivex \
+-	  *.cmx *.cmxa
+-endif
++	  $(PACKAGE_NAME) \
++	  $(install_files)
+ 
+ CLEANFILES += $(noinst_DATA)
+ 
+-- 
+1.7.5.1
+
diff --git a/hivex.spec b/hivex.spec
index 9d07908..09ab478 100644
--- a/hivex.spec
+++ b/hivex.spec
@@ -7,7 +7,7 @@
 
 Name:           hivex
 Version:        1.2.7
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Read and write Windows Registry binary hive files
 
 Group:          Development/Libraries
@@ -38,8 +38,10 @@ Conflicts:      libguestfs <= 1:1.0.84
 # Fix Perl directory install path.
 Patch0:         %{name}-1.2.3-dirs.patch
 
-# Add upstream patch to fix ocaml install rule.
+# Add upstream patches to fix ocaml install rule.
 Patch1:         0001-ocaml-Set-package-name-when-installing-native-bindin.patch
+Patch2:         0002-ocaml-Really-fix-make-install-rule.patch
+Patch3:         ocaml-Fix-autotools.patch
 
 
 %description
@@ -148,6 +150,8 @@ python-%{name} contains Python bindings for %{name}.
 
 %patch0 -p1 -b .dirs
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 
 %build
@@ -256,10 +260,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Tue May 17 2011 Richard W.M. Jones <rjones at redhat.com> - 1.2.7-2
+* Tue May 17 2011 Richard W.M. Jones <rjones at redhat.com> - 1.2.7-3
 - New upstream version 1.2.7.
 - Removed patch which is now upstream.
-- Add upstream patch to fix ocaml install rule.
+- Add upstream patches to fix ocaml install rule.
 
 * Thu May 12 2011 Richard W.M. Jones <rjones at redhat.com> - 1.2.6-2
 - New upstream version 1.2.6.
diff --git a/ocaml-Fix-autotools.patch b/ocaml-Fix-autotools.patch
new file mode 100644
index 0000000..8796402
--- /dev/null
+++ b/ocaml-Fix-autotools.patch
@@ -0,0 +1,52 @@
+--- hivex/ocaml/Makefile.in.orig	2011-05-17 17:38:17.300761216 +0100
++++ hivex/ocaml/Makefile.in	2011-05-17 17:38:27.668965851 +0100
+@@ -54,7 +54,8 @@
+ @HAVE_OCAMLOPT_TRUE@@HAVE_OCAML_TRUE at am__append_1 = mlhivex.cmxa
+ DIST_COMMON = $(srcdir)/.depend $(srcdir)/META.in \
+ 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
+- at HAVE_OCAML_TRUE@am__append_2 = $(noinst_DATA)
++ at HAVE_OCAMLOPT_TRUE@@HAVE_OCAML_TRUE at am__append_2 = *.cmx *.cmxa
++ at HAVE_OCAML_TRUE@am__append_3 = $(noinst_DATA)
+ subdir = ocaml
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+@@ -870,7 +871,7 @@
+ 	t/*.ml
+ 
+ CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so t/*.cmi \
+-	t/*.cmo t/*.cmx t/*.o t/*.a t/*.so $(am__append_2)
++	t/*.cmo t/*.cmx t/*.o t/*.a t/*.so $(am__append_3)
+ AM_CPPFLAGS = \
+   -I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \
+   -I$(top_srcdir)/lib \
+@@ -894,6 +895,10 @@
+ @HAVE_OCAML_TRUE@	t/hivex_300_fold
+ 
+ @HAVE_OCAML_TRUE at SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
++
++# Do the installation by hand, because we want to run ocamlfind.
++ at HAVE_OCAML_TRUE@install_files = META *.so *.a *.cma *.cmi *.mli \
++ at HAVE_OCAML_TRUE@	$(am__append_2)
+ all: all-am
+ 
+ .SUFFIXES:
+@@ -1211,17 +1216,13 @@
+ @HAVE_OCAML_TRUE at hivex.cmo: hivex.cmi
+ @HAVE_OCAML_TRUE at hivex.cmx: hivex.cmi
+ 
+-# Do the installation by hand, because we want to run ocamlfind.
+ @HAVE_OCAML_TRUE at install-data-hook:
+ @HAVE_OCAML_TRUE@	mkdir -p $(DESTDIR)$(OCAMLLIB)
+ @HAVE_OCAML_TRUE@	mkdir -p $(DESTDIR)$(OCAMLLIB)/stublibs
+ @HAVE_OCAML_TRUE@	$(OCAMLFIND) install \
+ @HAVE_OCAML_TRUE@	  -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
+- at HAVE_OCAML_TRUE@	  hivex \
+- at HAVE_OCAML_TRUE@	  META *.so *.a *.cma *.cmi *.mli
+- at HAVE_OCAMLOPT_TRUE@@HAVE_OCAML_TRUE@	$(OCAMLFIND) install \
+- at HAVE_OCAMLOPT_TRUE@@HAVE_OCAML_TRUE@	  -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
+- at HAVE_OCAMLOPT_TRUE@@HAVE_OCAML_TRUE@	  *.cmx *.cmxa
++ at HAVE_OCAML_TRUE@	  $(PACKAGE_NAME) \
++ at HAVE_OCAML_TRUE@	  $(install_files)
+ 
+ # Tell version 3.79 and up of GNU make to not build goals in this
+ # directory in parallel.  (See RHBZ#502309).


More information about the scm-commits mailing list