[Pkg-ocaml-maint-commits] [SCM] mingw32-ocaml packaging branch, master, updated. 5c46a737ede030402db23ec683543fbdb8ad14ea

Romain Beauxis toots at rastageeks.org
Mon Jan 11 22:20:32 UTC 2010


The following commit has been merged in the master branch:
commit 5c46a737ede030402db23ec683543fbdb8ad14ea
Author: Romain Beauxis <toots at rastageeks.org>
Date:   Mon Jan 11 16:25:42 2010 -0600

    Fixed threads lib and other stuff

diff --git a/debian/patches/mingw32-ocaml-fix-ocamlrun-path.patch b/debian/patches/mingw32-ocaml-fix-ocamlrun-path.patch
new file mode 100644
index 0000000..c43f868
--- /dev/null
+++ b/debian/patches/mingw32-ocaml-fix-ocamlrun-path.patch
@@ -0,0 +1,22 @@
+Index: build-tree/ocaml-3.11.1/otherlibs/systhreads/Makefile.nt
+===================================================================
+--- build-tree.orig/ocaml-3.11.1/otherlibs/systhreads/Makefile.nt	2010-01-11 12:16:40.000000000 -0600
++++ build-tree/ocaml-3.11.1/otherlibs/systhreads/Makefile.nt	2010-01-11 12:17:11.000000000 -0600
+@@ -37,7 +37,7 @@
+ allopt: lib$(LIBNAME).$(A) $(LIBNAME).cmxa $(LIBNAME).cmxs $(CMIFILES)
+ 
+ $(LIBNAME).cma: $(CAMLOBJS)
+-	$(MKLIB) -o $(LIBNAME) -ocamlc "..\\..\\boot\\ocamlrun ..\\..\\ocamlc" -linkall $(CAMLOBJS) $(LINKOPTS)
++	$(MKLIB) -o $(LIBNAME) -ocamlc "../../boot/ocamlrun ../../ocamlc" -linkall $(CAMLOBJS) $(LINKOPTS)
+ 
+ lib$(LIBNAME).$(A): $(COBJS)
+ 	$(MKLIB) -o $(LIBNAME) $(COBJS) $(LDOPTS)
+@@ -49,7 +49,7 @@
+ 
+ 
+ $(LIBNAME).cmxa: $(CAMLOBJS:.cmo=.cmx)
+-	$(MKLIB) -o $(LIBNAME)nat -ocamlopt "..\\..\\boot\\ocamlrun ..\\..\\ocamlopt" -linkall $(CAMLOBJS:.cmo=.cmx) $(LINKOPTS)
++	$(MKLIB) -o $(LIBNAME)nat -ocamlopt "../../boot/ocamlrun ../../ocamlopt" -linkall $(CAMLOBJS:.cmo=.cmx) $(LINKOPTS)
+ 	mv $(LIBNAME)nat.cmxa $(LIBNAME).cmxa
+ 	mv $(LIBNAME)nat.$(A) $(LIBNAME).$(A)
+ 
diff --git a/debian/patches/mingw32-ocaml-fix-opt-link-opts.patch b/debian/patches/mingw32-ocaml-fix-opt-link-opts.patch
index 40dd2e1..25b1736 100644
--- a/debian/patches/mingw32-ocaml-fix-opt-link-opts.patch
+++ b/debian/patches/mingw32-ocaml-fix-opt-link-opts.patch
@@ -1,7 +1,7 @@
 Index: build-tree/ocaml-3.11.1/otherlibs/win32unix/Makefile.nt
 ===================================================================
---- build-tree.orig/ocaml-3.11.1/otherlibs/win32unix/Makefile.nt	2010-01-09 16:58:29.000000000 +0100
-+++ build-tree/ocaml-3.11.1/otherlibs/win32unix/Makefile.nt	2010-01-09 17:02:24.000000000 +0100
+--- build-tree.orig/ocaml-3.11.1/otherlibs/win32unix/Makefile.nt	2008-07-29 10:31:41.000000000 +0200
++++ build-tree/ocaml-3.11.1/otherlibs/win32unix/Makefile.nt	2010-01-09 17:37:19.000000000 +0100
 @@ -40,7 +40,7 @@
  COBJS=$(ALL_FILES:.c=.$(O))
  CAMLOBJS=unix.cmo unixLabels.cmo
@@ -13,8 +13,8 @@ Index: build-tree/ocaml-3.11.1/otherlibs/win32unix/Makefile.nt
  HEADERS=unixsupport.h
 Index: build-tree/ocaml-3.11.1/otherlibs/str/Makefile
 ===================================================================
---- build-tree.orig/ocaml-3.11.1/otherlibs/str/Makefile	2010-01-09 16:58:29.000000000 +0100
-+++ build-tree/ocaml-3.11.1/otherlibs/str/Makefile	2010-01-09 17:02:24.000000000 +0100
+--- build-tree.orig/ocaml-3.11.1/otherlibs/str/Makefile	2007-11-06 16:16:56.000000000 +0100
++++ build-tree/ocaml-3.11.1/otherlibs/str/Makefile	2010-01-09 17:37:19.000000000 +0100
 @@ -19,6 +19,7 @@
  LIBNAME=str
  COBJS=strstubs.$(O)
@@ -25,8 +25,8 @@ Index: build-tree/ocaml-3.11.1/otherlibs/str/Makefile
  
 Index: build-tree/ocaml-3.11.1/otherlibs/num/Makefile
 ===================================================================
---- build-tree.orig/ocaml-3.11.1/otherlibs/num/Makefile	2010-01-09 16:58:29.000000000 +0100
-+++ build-tree/ocaml-3.11.1/otherlibs/num/Makefile	2010-01-09 17:02:24.000000000 +0100
+--- build-tree.orig/ocaml-3.11.1/otherlibs/num/Makefile	2008-09-10 18:10:43.000000000 +0200
++++ build-tree/ocaml-3.11.1/otherlibs/num/Makefile	2010-01-09 17:37:19.000000000 +0100
 @@ -21,6 +21,7 @@
    ratio.cmo num.cmo arith_status.cmo
  CMIFILES=big_int.cmi nat.cmi num.cmi ratio.cmi arith_status.cmi
@@ -37,8 +37,8 @@ Index: build-tree/ocaml-3.11.1/otherlibs/num/Makefile
  
 Index: build-tree/ocaml-3.11.1/otherlibs/win32graph/Makefile.nt
 ===================================================================
---- build-tree.orig/ocaml-3.11.1/otherlibs/win32graph/Makefile.nt	2010-01-09 16:58:30.000000000 +0100
-+++ build-tree/ocaml-3.11.1/otherlibs/win32graph/Makefile.nt	2010-01-09 17:02:24.000000000 +0100
+--- build-tree.orig/ocaml-3.11.1/otherlibs/win32graph/Makefile.nt	2007-11-06 16:16:56.000000000 +0100
++++ build-tree/ocaml-3.11.1/otherlibs/win32graph/Makefile.nt	2010-01-09 17:37:19.000000000 +0100
 @@ -18,7 +18,7 @@
  CAMLOBJS=graphics.cmo
  WIN32LIBS=$(call SYSLIB,kernel32) $(call SYSLIB,gdi32) $(call SYSLIB,user32)
@@ -50,8 +50,8 @@ Index: build-tree/ocaml-3.11.1/otherlibs/win32graph/Makefile.nt
  
 Index: build-tree/ocaml-3.11.1/otherlibs/bigarray/Makefile.nt
 ===================================================================
---- build-tree.orig/ocaml-3.11.1/otherlibs/bigarray/Makefile.nt	2010-01-09 16:58:29.000000000 +0100
-+++ build-tree/ocaml-3.11.1/otherlibs/bigarray/Makefile.nt	2010-01-09 17:02:24.000000000 +0100
+--- build-tree.orig/ocaml-3.11.1/otherlibs/bigarray/Makefile.nt	2008-01-04 16:01:48.000000000 +0100
++++ build-tree/ocaml-3.11.1/otherlibs/bigarray/Makefile.nt	2010-01-09 17:37:19.000000000 +0100
 @@ -19,6 +19,7 @@
  COBJS=bigarray_stubs.$(O) mmap_win32.$(O)
  CAMLOBJS=bigarray.cmo
@@ -60,3 +60,30 @@ Index: build-tree/ocaml-3.11.1/otherlibs/bigarray/Makefile.nt
  
  include ../Makefile.nt
  
+Index: build-tree/ocaml-3.11.1/byterun/Makefile.nt
+===================================================================
+--- build-tree.orig/ocaml-3.11.1/byterun/Makefile.nt	2010-01-09 17:38:28.000000000 +0100
++++ build-tree/ocaml-3.11.1/byterun/Makefile.nt	2010-01-09 17:39:01.000000000 +0100
+@@ -18,8 +18,9 @@
+ CFLAGS=-DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR)
+ 
+ DBGO=d.$(O)
+-OBJS=$(COMMONOBJS:.o=.$(O)) win32.$(O) main.$(O)
++OBJS=$(COMMONOBJS:.o=.$(O)) win32.$(O) main.$(O) prims.$(O)
+ DOBJS=$(OBJS:.$(O)=.$(DBGO)) instrtrace.$(DBGO)
++LDOPTS=-L/usr/i586-mingw32msvc/lib
+ 
+ ocamlrun$(EXE): libcamlrun.$(A) prims.$(O)
+ 	$(MKEXE) -o ocamlrun$(EXE) prims.$(O) $(call SYSLIB,ws2_32) $(EXTRALIBS) libcamlrun.$(A) 
+Index: build-tree/ocaml-3.11.1/otherlibs/systhreads/Makefile.nt
+===================================================================
+--- build-tree.orig/ocaml-3.11.1/otherlibs/systhreads/Makefile.nt	2010-01-09 17:43:55.000000000 +0100
++++ build-tree/ocaml-3.11.1/otherlibs/systhreads/Makefile.nt	2010-01-09 17:44:03.000000000 +0100
+@@ -21,6 +21,7 @@
+ COMPFLAGS=-warn-error A -g
+ MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
+ CFLAGS=-I../../byterun $(EXTRACFLAGS)
++LDOPTS=-L/usr/i586-mingw32msvc/lib
+ 
+ CAMLOBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
+ CMIFILES=$(CAMLOBJS:.cmo=.cmi)
diff --git a/debian/patches/series b/debian/patches/series
index 176c224..15902d0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ mingw32-ocaml-combined-Makefile.patch
 mingw32-ocaml-filename-win32-dirsep.patch
 mingw32-ocaml-no-stdlib-dir.patch
 mingw32-ocaml-fix-opt-link-opts.patch
+mingw32-ocaml-fix-ocamlrun-path.patch
diff --git a/debian/rules b/debian/rules
index b9f5453..938b573 100755
--- a/debian/rules
+++ b/debian/rules
@@ -60,7 +60,9 @@ stamp-prepare-cross-build:
 	# Makefile -> Makefile.nt for these cases.
 	for d in $(DEB_BUILDDIR)/$(OCAML_DIR)/otherlibs/win32unix \
 	         $(DEB_BUILDDIR)/$(OCAML_DIR)/otherlibs/win32graph \
-		 $(DEB_BUILDDIR)/$(OCAML_DIR)/otherlibs/bigarray; do \
+		 $(DEB_BUILDDIR)/$(OCAML_DIR)/otherlibs/bigarray \
+		 $(DEB_BUILDDIR)/$(OCAML_DIR)/otherlibs/systhreads \
+		 $(DEB_BUILDDIR)/$(OCAML_DIR)/byterun; do \
  	  ln -sf Makefile.nt $$d/Makefile; \
 	done
 	# Now clean the temporary files from the previous build.  This
@@ -75,14 +77,20 @@ stamp-prepare-cross-build:
 stamp-build-mingw32-ocaml:
 	# Just rebuild some small bits that we need for the following
 	# 'make opt' to work.  Note that 'make all' fails here.
-	cd $(DEB_BUILDDIR)/$(OCAML_DIR) && make -C byterun libcamlrun.a
+	cd $(DEB_BUILDDIR)/$(OCAML_DIR) && make -C byterun IFLEXDIR=-I$(CURDIR)/$(DEB_BUILDDIR)/$(FLEXDLL_DIR) libcamlrun.a
 	cd $(DEB_BUILDDIR)/$(OCAML_DIR) && make ocaml ocamlc
 	cd $(DEB_BUILDDIR)/$(OCAML_DIR) && make -C stdlib
 	cd $(DEB_BUILDDIR)/$(OCAML_DIR) && make -C tools ocamlmklib
-	#
 	# Build ocamlopt
 	cd $(DEB_BUILDDIR)/$(OCAML_DIR) && PATH=$(CURDIR)/$(DEB_BUILDDIR)/$(FLEXDLL_DIR):$(PATH) \
-					   make IFLEXDIR=-I$(CURDIR)/$(DEB_BUILDDIR)/$(FLEXDLL_DIR) opt
+	                                   make IFLEXDIR=-I$(CURDIR)/$(DEB_BUILDDIR)/$(FLEXDLL_DIR) opt
+	# Now build otherlibs for ocamlopt
+	cd $(DEB_BUILDDIR)/$(OCAML_DIR) && \
+	for i in $(OTHER_LIBS); do \
+	  make -C otherlibs/$$i clean; \
+	  make -C otherlibs/$$i all; \
+	  make -C otherlibs/$$i allopt; \
+	done
 	touch stamp-build-mingw32-ocaml
 
 stamp-build-findlib:

-- 
mingw32-ocaml packaging



More information about the Pkg-ocaml-maint-commits mailing list