[Pkg-ocaml-maint-commits] r963 - in packages/ocaml/branches/cross: . debian debian/patches

Eric Cooper ecc-guest@costa.debian.org
Fri, 11 Feb 2005 23:04:04 +0100


Author: ecc-guest
Date: 2005-02-11 23:04:03 +0100 (Fri, 11 Feb 2005)
New Revision: 963

Added:
   packages/ocaml/branches/cross/debian/
   packages/ocaml/branches/cross/debian/changelog
   packages/ocaml/branches/cross/debian/control
   packages/ocaml/branches/cross/debian/copyright
   packages/ocaml/branches/cross/debian/patches/
   packages/ocaml/branches/cross/debian/patches/00list
   packages/ocaml/branches/cross/debian/patches/arm.patch
   packages/ocaml/branches/cross/debian/patches/cross.dpatch
   packages/ocaml/branches/cross/debian/patches/powerpc.dpatch
   packages/ocaml/branches/cross/debian/rules
   packages/ocaml/branches/cross/ocaml-powerpc_3.08.2.orig.tar.gz
Removed:
   packages/ocaml/branches/cross/debian/
Log:
Initial version of OCaml cross compiler support.
Currently, the control and rules files are only set up to build
for powerpc target, but patches for arm target are included as well.


Added: packages/ocaml/branches/cross/debian/changelog
===================================================================
--- packages/ocaml/branches/cross/debian/changelog	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/changelog	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,5 @@
+ocaml-powerpc (3.08.2-1) unstable; urgency=low
+
+  * Initial version
+
+ -- Eric Cooper <ecc@cmu.edu>  Wed,  9 Feb 2005 14:24:55 -0500

Added: packages/ocaml/branches/cross/debian/control
===================================================================
--- packages/ocaml/branches/cross/debian/control	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/control	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,12 @@
+Source: ocaml-powerpc
+Section: devel
+Priority: optional
+Maintainer: Eric Cooper <ecc@cmu.edu>
+Build-Depends: debhelper, binutils-powerpc-linux, gcc-powerpc-linux, libc6-dev-powerpc-cross, ocaml-native-compilers, dpatch
+Standards-Version: 3.6.1
+
+Package: ocaml-powerpc
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: OCaml cross-compiler and tools for powerpc
+ These tools allow you to build OCaml programs for powerpc target machines.

Added: packages/ocaml/branches/cross/debian/copyright
===================================================================
--- packages/ocaml/branches/cross/debian/copyright	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/copyright	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,150 @@
+			    Objective Caml
+	   Xavier Leroy, projet Cristal, INRIA Rocquencourt
+
+ Copyright 1999 Institut National de Recherche en Informatique et en
+		  Automatique.  All rights reserved.
+
+----------------------------------------------------------------------
+
+In the following, "the Library" refers to all files marked "Copyright
+INRIA" in the following directories and their sub-directories:
+
+  asmrun, byterun, camlp4, config, otherlibs, stdlib, win32caml
+
+and "the Compiler" refers to all files marked "Copyright INRIA" in the
+following directories and their sub-directories:
+
+  asmcomp, boot, bytecomp, debugger, driver, lex, ocamldoc, parsing,
+  tools, toplevel, typing, utils, yacc
+
+The Compiler is distributed under the terms of the Q Public License
+version 1.0 with a change to choice of law (included below).
+
+The Library is distributed under the terms of the GNU Library General
+Public License version 2, the complete text of which can be found in
+/usr/share/common-licenses/LGPL-2.
+
+As a special exception to the Q Public Licence, you may develop
+application programs, reusable components and other software items
+that link with the original or modified versions of the Compiler
+and are not made available to the general public, without any of the
+additional requirements listed in clause 6c of the Q Public licence.
+
+As a special exception to the GNU Library General Public License, you
+may link, statically or dynamically, a "work that uses the Library"
+with a publicly distributed version of the Library to produce an
+executable file containing portions of the Library, and distribute
+that executable file under terms of your choice, without any of the
+additional requirements listed in clause 6 of the GNU Library General
+Public License.  By "a publicly distributed version of the Library",
+we mean either the unmodified Library as distributed by INRIA, or a
+modified version of the Library that is distributed under the
+conditions defined in clause 3 of the GNU Library General Public
+License.  This exception does not however invalidate any other reasons
+why the executable file might be covered by the GNU Library General
+Public License.
+
+----------------------------------------------------------------------
+
+                   THE Q PUBLIC LICENSE version 1.0
+
+              Copyright (C) 1999 Troll Tech AS, Norway.
+                  Everyone is permitted to copy and
+                  distribute this license document.
+
+The intent of this license is to establish freedom to share and change
+the software regulated by this license under the open source model.
+
+This license applies to any software containing a notice placed by the
+copyright holder saying that it may be distributed under the terms of
+the Q Public License version 1.0. Such software is herein referred to
+as the Software. This license covers modification and distribution of
+the Software, use of third-party application programs based on the
+Software, and development of free software which uses the Software.
+
+                            Granted Rights
+
+1. You are granted the non-exclusive rights set forth in this license
+provided you agree to and comply with any and all conditions in this
+license. Whole or partial distribution of the Software, or software
+items that link with the Software, in any form signifies acceptance of
+this license.
+
+2. You may copy and distribute the Software in unmodified form
+provided that the entire package, including - but not restricted to -
+copyright, trademark notices and disclaimers, as released by the
+initial developer of the Software, is distributed.
+
+3. You may make modifications to the Software and distribute your
+modifications, in a form that is separate from the Software, such as
+patches. The following restrictions apply to modifications:
+
+      a. Modifications must not alter or remove any copyright notices
+      in the Software.
+
+      b. When modifications to the Software are released under this
+      license, a non-exclusive royalty-free right is granted to the
+      initial developer of the Software to distribute your
+      modification in future versions of the Software provided such
+      versions remain available under these terms in addition to any
+      other license(s) of the initial developer.
+
+4. You may distribute machine-executable forms of the Software or
+machine-executable forms of modified versions of the Software,
+provided that you meet these restrictions:
+
+      a. You must include this license document in the distribution.
+
+      b. You must ensure that all recipients of the machine-executable
+      forms are also able to receive the complete machine-readable
+      source code to the distributed Software, including all
+      modifications, without any charge beyond the costs of data
+      transfer, and place prominent notices in the distribution
+      explaining this.
+
+      c. You must ensure that all modifications included in the
+      machine-executable forms are available under the terms of this
+      license.
+
+5. You may use the original or modified versions of the Software to
+compile, link and run application programs legally developed by you or
+by others.
+
+6. You may develop application programs, reusable components and other
+software items that link with the original or modified versions of the
+Software. These items, when distributed, are subject to the following
+requirements:
+
+      a. You must ensure that all recipients of machine-executable
+      forms of these items are also able to receive and use the
+      complete machine-readable source code to the items without any
+      charge beyond the costs of data transfer.
+
+      b. You must explicitly license all recipients of your items to
+      use and re-distribute original and modified versions of the
+      items in both machine-executable and source code forms. The
+      recipients must be able to do so without any charges whatsoever,
+      and they must be able to re-distribute to anyone they choose.
+
+      c. If the items are not available to the general public, and the
+      initial developer of the Software requests a copy of the items,
+      then you must supply one.
+
+                       Limitations of Liability
+
+In no event shall the initial developers or copyright holders be
+liable for any damages whatsoever, including - but not restricted to -
+lost revenue or profits or other direct, indirect, special, incidental
+or consequential damages, even if they have been advised of the
+possibility of such damages, except to the extent invariable law, if
+any, provides otherwise.
+
+                             No Warranty
+
+The Software and this license document are provided AS IS with NO
+WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+                            Choice of Law
+
+This license is governed by the Laws of France.

Added: packages/ocaml/branches/cross/debian/patches/00list
===================================================================
--- packages/ocaml/branches/cross/debian/patches/00list	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/patches/00list	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,2 @@
+cross.dpatch
+powerpc.dpatch

Added: packages/ocaml/branches/cross/debian/patches/arm.patch
===================================================================
--- packages/ocaml/branches/cross/debian/patches/arm.patch	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/patches/arm.patch	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,107 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## arm.dpatch by Eric Cooper <ecc@cmu.edu>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Build cross-compiler for arm
+
+@DPATCH@
+diff -Naur ocaml-3.08.2-orig/asmcomp/arm/emit.mlp ocaml-3.08.2/asmcomp/arm/emit.mlp
+--- ocaml-3.08.2-orig/asmcomp/arm/emit.mlp	2004-05-03 08:46:50.000000000 -0400
++++ ocaml-3.08.2/asmcomp/arm/emit.mlp	2005-02-08 20:38:17.000000000 -0500
+@@ -645,12 +645,9 @@
+ (* Beginning / end of an assembly file *)
+ 
+ let begin_assembly() =
+-  `trap_ptr     .req    r11\n`;
+   `alloc_ptr    .req    r8\n`;
+   `alloc_limit  .req    r9\n`;
+-  `sp           .req    r13\n`;
+-  `lr           .req    r14\n`;
+-  `pc           .req    r15\n`;
++  `trap_ptr     .req    r11\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.global	{emit_symbol lbl_begin}\n`;
+diff -Naur ocaml-3.08.2-orig/asmcomp/arm/proc.ml ocaml-3.08.2/asmcomp/arm/proc.ml
+--- ocaml-3.08.2-orig/asmcomp/arm/proc.ml	2002-07-22 12:37:47.000000000 -0400
++++ ocaml-3.08.2/asmcomp/arm/proc.ml	2005-02-08 20:38:17.000000000 -0500
+@@ -190,7 +190,7 @@
+ (* Calling the assembler *)
+ 
+ let assemble_file infile outfile =
+-  Sys.command ("as -o " ^ Filename.quote outfile ^ " " ^ Filename.quote infile)
++  Sys.command ("arm-linux-as -o " ^ Filename.quote outfile ^ " " ^ Filename.quote infile)
+ 
+ open Clflags;;
+ open Config;;
+diff -Naur ocaml-3.08.2-orig/configure ocaml-3.08.2/configure
+--- ocaml-3.08.2-orig/configure	2004-11-18 09:08:57.000000000 -0500
++++ ocaml-3.08.2/configure	2005-02-09 20:44:20.000000000 -0500
+@@ -1,5 +1,8 @@
+ #! /bin/sh
+ 
++cross_target=arm
++version=3.08
++
+ #########################################################################
+ #                                                                       #
+ #                            Objective Caml                             #
+@@ -322,7 +315,7 @@
+ # Check the sizes of data types
+ 
+ echo "Checking the sizes of integers and pointers..."
+-set `sh ./runtest sizes.c`
++set 4 4 4 2
+ case "$2,$3" in
+   4,4) echo "OK, this is a regular 32 bit architecture."
+        echo "#undef ARCH_SIXTYFOUR" >> m.h;;
+@@ -357,8 +350,7 @@
+      echo '#define ARCH_INT64_PRINTF_FORMAT "l"' >> m.h
+      int64_native=true
+ else
+-  sh ./runtest longlong.c
+-  case $? in
++  case 0 in
+   0) echo "64-bit \"long long\" integer type found (printf with \"%ll\")."
+      echo "#define ARCH_INT64_TYPE long long" >> m.h
+      echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
+@@ -384,8 +376,7 @@
+ 
+ # Determine endianness
+ 
+-sh ./runtest endian.c
+-case $? in
++case 1 in
+   0) echo "This is a big-endian architecture."
+      echo "#define ARCH_BIG_ENDIAN" >> m.h;;
+   1) echo "This is a little-endian architecture."
+@@ -416,8 +407,7 @@
+       echo "#define ARCH_ALIGN_DOUBLE" >> m.h
+     fi;;
+   *)
+-    sh ./runtest dblalign.c
+-    case $? in
++    case 0 in
+       0) echo "Doubles can be word-aligned."
+          echo "#undef ARCH_ALIGN_DOUBLE" >> m.h;;
+       1) echo "Doubles must be doubleword-aligned."
+@@ -441,8 +431,7 @@
+         echo "#define ARCH_ALIGN_INT64" >> m.h
+       fi;;
+     *)
+-      sh ./runtest int64align.c
+-      case $? in
++      case 0 in
+         0) echo "64-bit integers can be word-aligned."
+            echo "#undef ARCH_ALIGN_INT64" >> m.h;;
+         1) echo "64-bit integers must be doubleword-aligned."
+@@ -460,8 +449,7 @@
+ 
+ # Check semantics of division and modulus
+ 
+-sh ./runtest divmod.c
+-case $? in
++case 0 in
+   0) echo "Native division and modulus have round-towards-zero semantics, will use them."
+      echo "#undef NONSTANDARD_DIV_MOD" >> m.h;;
+   1) echo "Native division and modulus do not have round-towards-zero semantics, will use software emulation."


Property changes on: packages/ocaml/branches/cross/debian/patches/arm.patch
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/ocaml/branches/cross/debian/patches/cross.dpatch
===================================================================
--- packages/ocaml/branches/cross/debian/patches/cross.dpatch	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/patches/cross.dpatch	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,383 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## cross.dpatch by Eric Cooper <ecc@cmu.edu>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Generic patches for cross-compiling
+
+@DPATCH@
+diff -Naur ocaml-3.08.2-orig/configure ocaml-3.08.2/configure
+--- ocaml-3.08.2-orig/configure	2004-11-18 09:08:57.000000000 -0500
++++ ocaml-3.08.2/configure	2005-02-09 20:44:20.000000000 -0500
+@@ -29,7 +32,7 @@
+ dllib=''
+ x11_include_dir=''
+ x11_lib_dir=''
+-tk_wanted=yes
++tk_wanted=no
+ pthread_wanted=yes
+ tk_defs=''
+ tk_libs=''
+@@ -149,31 +152,22 @@
+    *) echo "BINDIR=$bindir" >> Makefile;;
+ esac
+ case "$libdir" in
+-  "") echo 'LIBDIR=$(PREFIX)/lib/ocaml' >> Makefile
+-      libdir="$prefix/lib/ocaml";;
++  "") echo LIBDIR='$(PREFIX)'/lib/ocaml/$cross_target-linux/$version >> Makefile
++      libdir="$prefix/lib/ocaml/$cross_target-linux/$version";;
+    *) echo "LIBDIR=$libdir" >> Makefile;;
+ esac
+ echo 'STUBLIBDIR=$(LIBDIR)/stublibs' >> Makefile
+ case "$mandir" in
+-  "") echo 'MANDIR=$(PREFIX)/man' >> Makefile
+-      mandir="$prefix/man";;
++  "") echo 'MANDIR=$(PREFIX)/share/man' >> Makefile
++      mandir="$prefix/share/man";;
+    *) echo "MANDIR=$mandir" >> Makefile;;
+ esac
+ echo "MANEXT=$manext" >> Makefile
+ 
+ # Determine the system type
+ 
+-if test "$host_type" = "unknown"; then
+-  if host_type=`../gnu/config.guess`; then :; else
+-    echo "Cannot guess host type"
+-    echo "You must specify one with the -host option"
+-    exit 2
+-  fi
+-fi
+-if host=`../gnu/config.sub $host_type`; then :; else
+-  echo "Please specify the correct host type with the -host option"
+-  exit 2
+-fi
++echo "CROSS_TARGET=$cross_target" >> Makefile
++host=$cross_target-unknown-linux-gnu
+ echo "Configuring for a $host ..."
+ 
+ # Do we have gcc?
+@@ -308,8 +302,7 @@
+ 
+ # Check C compiler
+ 
+-sh ./runtest ansi.c
+-case $? in
++case 0 in
+   0) echo "The C compiler is ANSI-compliant.";;
+   1) echo "The C compiler $cc is not ANSI-compliant."
+      echo "You need an ANSI C compiler to build Objective Caml."
+@@ -483,7 +471,7 @@
+   case "$host" in
+     *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*)
+       sharedcccompopts="-fPIC"
+-      mksharedlib="$bytecc -shared -o"
++      mksharedlib="$cross_target-linux-gcc -shared -o"
+       bytecclinkopts="$bytecclinkopts -Wl,-E"
+       byteccrpath="-Wl,-rpath,"
+       mksharedlibrpath="-Wl,-rpath,"
+@@ -599,6 +587,7 @@
+   nativecc="$ccoption"
+ fi
+ 
++nativecc=$cross_target-linux-gcc
+ nativecccompopts=''
+ nativecclinkopts=''
+ nativeccrpath="$byteccrpath"
+@@ -621,7 +610,6 @@
+ aspp='$(AS)'
+ asppflags=''
+ asppprofflags='-DPROFILING'
+-
+ case "$arch,$model,$system" in
+   alpha,*,digital)  asflags='-O2'; asppflags='-O2 -DSYS_$(SYSTEM)';
+                     asppprofflags='-pg -DPROFILING';;
+@@ -660,12 +648,15 @@
+   *) profiling='noprof';;
+ esac
+ 
++aspp="$cross_target-linux-gcc"
++asppflags='-c'
++
+ # Where are GNU binutils?
+ 
+-binutils_objcopy=''
+-binutils_nm=''
++binutils_objcopy=$cross_target-linux-objcopy
++binutils_nm=$cross_target-linux-nm
+ 
+-if test "$arch" != "none"; then
++if false; then
+   binutils_path="${binutils_dir}:${PATH}:/usr/libexec/binutils"
+   old_IFS="$IFS"
+   IFS=':'
+@@ -691,10 +682,10 @@
+ 
+ # Where is ranlib?
+ 
+-if sh ./searchpath ranlib; then
++if true; then
+   echo "ranlib found"
+-  echo "RANLIB=ranlib" >> Makefile
+-  echo "RANLIBCMD=ranlib" >> Makefile
++  echo "RANLIB=$cross_target-linux-ranlib" >> Makefile
++  echo "RANLIBCMD=$cross_target-linux-ranlib" >> Makefile
+ else
+   echo "ranlib not used"
+   echo "RANLIB=ar rs" >> Makefile
+@@ -703,7 +694,7 @@
+ 
+ # Do #! scripts work?
+ 
+-if (SHELL=/bin/sh; export SHELL; (./sharpbang || ./sharpbang2) >/dev/null); then
++if true; then
+   echo "#! appears to work in shell scripts"
+   case "$host" in
+     *-*-sunos*|*-*-unicos*)
+@@ -729,8 +720,9 @@
+ 
+ # Use 64-bit file offset if possible
+ 
+-bytecccompopts="$bytecccompopts -D_FILE_OFFSET_BITS=64"
++bytecccompopts="$nativecccompopts -D_FILE_OFFSET_BITS=64"
+ nativecccompopts="$nativecccompopts -D_FILE_OFFSET_BITS=64"
++export cc="$nativecc -O $nativecclinkopts"
+ 
+ # Check the semantics of signal handlers
+ 
+@@ -908,7 +900,7 @@
+   has_wait=yes
+ fi
+ 
+-if sh ./hasgot -i limits.h && sh ./runtest getgroups.c; then
++if sh ./hasgot -i limits.h; then
+   echo "getgroups() found."
+   echo "#define HAS_GETGROUPS" >> s.h
+ fi
+@@ -921,12 +913,12 @@
+ 
+ # Async I/O under OSF1 3.x are so buggy that the test program hangs...
+ testasyncio=true
+-if test -f /usr/bin/uname; then
++if false; then
+   case "`/usr/bin/uname -s -r`" in
+     "OSF1 V3."*) testasyncio=false;;
+   esac
+ fi
+-if $testasyncio && sh ./runtest async_io.c; then
++if $testasyncio; then
+   echo "Asynchronous I/O are supported."
+   echo "#define HAS_ASYNC_IO" >> s.h
+ fi
+@@ -1154,6 +1146,7 @@
+     /usr/openwin/share/include \
+     ; \
+ do
++  if test $dir != /usr/$cross_target-linux/include; then continue; fi
+   if test -f $dir/X11/X.h; then
+     x11_include=$dir
+     break
+@@ -1209,6 +1202,7 @@
+     /usr/openwin/share/lib \
+     ; \
+ do
++  if test $dir != /usr/$cross_target-linux/lib; then continue; fi
+   if test -f $dir/libX11.a || \
+      test -f $dir/libX11.so || \
+      test -f $dir/libX11.dll.a || \
+@@ -1247,7 +1241,7 @@
+ dbm_link="not found"
+ use_gdbm_ndbm=no
+ 
+-for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
++for dir in /usr/$cross_target-linux/include; do
+   if test -f $dir/ndbm.h; then
+     dbm_include=$dir
+     if sh ./hasgot dbm_open; then
+diff -Naur ocaml-3.08.2-orig/Makefile ocaml-3.08.2/Makefile
+--- ocaml-3.08.2-orig/Makefile	2004-07-16 12:11:33.000000000 -0400
++++ ocaml-3.08.2/Makefile	2005-02-09 20:34:54.000000000 -0500
+@@ -17,17 +17,17 @@
+ include config/Makefile
+ include stdlib/StdlibModules
+ 
+-CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot
+-CAMLOPT=boot/ocamlrun ./ocamlopt -nostdlib -I stdlib
++CAMLC=ocamlc.opt
++CAMLOPT=ocamlopt.opt
+ COMPFLAGS=-warn-error A $(INCLUDES)
+ LINKFLAGS=
+ 
+-CAMLYACC=boot/ocamlyacc
++CAMLYACC=ocamlyacc
+ YACCFLAGS=-v
+-CAMLLEX=boot/ocamlrun boot/ocamllex
+-CAMLDEP=boot/ocamlrun tools/ocamldep
++CAMLLEX=ocamllex.opt
++CAMLDEP=ocamldep
+ DEPFLAGS=$(INCLUDES)
+-CAMLRUN=byterun/ocamlrun
++CAMLRUN=ocamlrun
+ SHELL=/bin/sh
+ MKDIR=mkdir -p
+ 
+@@ -161,15 +161,17 @@
+ 	$(MAKE) all
+ 	$(MAKE) compare
+ 
++CROSS_CC=BYTECC="$(NATIVECC)" BYTECCCOMPOPTS="$(NATIVECCCOMPOPTS)" MKLIB=$(shell pwd)/tools/ocamlmklib
++
+ LIBFILES=stdlib.cma std_exit.cmo *.cmi camlheader
+ 
+ # Start up the system from the distribution compiler
+ coldstart:
+-	cd byterun; $(MAKE) all
++	cd byterun; $(MAKE) $(CROSS_CC) all
+ 	cp byterun/ocamlrun$(EXE) boot/ocamlrun$(EXE)
+ 	cd yacc; $(MAKE) all
+ 	cp yacc/ocamlyacc$(EXE) boot/ocamlyacc$(EXE)
+-	cd stdlib; $(MAKE) COMPILER=../boot/ocamlc all
++	cd stdlib; $(MAKE) RUNTIME= COMPILER=/usr/bin/ocamlc.opt all
+ 	cd stdlib; cp $(LIBFILES) ../boot
+ 	if test -f boot/libcamlrun.a; then :; else \
+           ln -s ../byterun/libcamlrun.a boot/libcamlrun.a; fi
+@@ -240,40 +242,29 @@
+           dllthreads.so dllunix.so dllgraphics.so dllmldbm.so dllstr.so \
+           dlltkanim.so
+ 	cd byterun; $(MAKE) install
+-	cp ocamlc $(BINDIR)/ocamlc$(EXE)
+-	cp ocaml $(BINDIR)/ocaml$(EXE)
+ 	cd stdlib; $(MAKE) install
+-	cp lex/ocamllex $(BINDIR)/ocamllex$(EXE)
+-	cp yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
+ 	cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
+ 	cp expunge $(LIBDIR)/expunge$(EXE)
+ 	cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
+ 	cp toplevel/topstart.cmo $(LIBDIR)
+ 	cp toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi $(LIBDIR)
+-	cd tools; $(MAKE) install
+-	-cd man; $(MAKE) install
++	cp tools/ocamlmklib $(BINDIR)/$(CROSS_TARGET)-linux-ocamlmklib
+ 	for i in $(OTHERLIBRARIES); do \
+           (cd otherlibs/$$i; $(MAKE) install) || exit $$?; \
+         done
+-	cd ocamldoc; $(MAKE) install
+ 	if test -f ocamlopt; then $(MAKE) installopt; else :; fi
+-	cd camlp4; $(MAKE) install BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) MANDIR=$(MANDIR)
+-	if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
+-	   else :; fi
++#	if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
++#	   else :; fi
+ 
+ # Installation of the native-code compiler
+ installopt:
+ 	cd asmrun; $(MAKE) install
+-	cp ocamlopt $(BINDIR)/ocamlopt$(EXE)
++	cp ocamlopt $(BINDIR)/$(CROSS_TARGET)-linux-ocamlopt$(EXE)
+ 	cd stdlib; $(MAKE) installopt
+ 	cd ocamldoc; $(MAKE) installopt
+ 	for i in $(OTHERLIBRARIES); do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
+-	if test -f ocamlc.opt; \
+-	  then cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
+ 	if test -f ocamlopt.opt; \
+-	  then cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
+-	if test -f lex/ocamllex.opt; \
+-	  then cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
++	  then cp ocamlopt.opt $(BINDIR)/$(CROSS_TARGET)-linux-ocamlopt.opt$(EXE); else :; fi
+ 
+ clean:: partialclean
+ 
+@@ -292,7 +283,7 @@
+ 
+ ocamlopt: $(OPTOBJS)
+ 	$(CAMLC) $(LINKFLAGS) -o ocamlopt $(OPTOBJS)
+-	@sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|' \
++	@sed -e 's|@compiler@|ocamlrun $$topdir/ocamlopt|' \
+ 	  driver/ocamlcomp.sh.in > ocamlcompopt.sh
+ 	@chmod +x ocamlcompopt.sh
+ 
+@@ -302,7 +293,7 @@
+ # The toplevel
+ 
+ ocaml: $(TOPOBJS) expunge
+-	$(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp $(TOPOBJS)
++	$(CAMLC) -I boot $(LINKFLAGS) -linkall -o ocaml.tmp $(TOPOBJS)
+ 	- $(CAMLRUN) ./expunge ocaml.tmp ocaml $(PERVASIVES)
+ 	rm -f ocaml.tmp
+ 
+@@ -487,7 +478,7 @@
+ beforedepend:: asmcomp/emit.ml
+ 
+ tools/cvt_emit: tools/cvt_emit.mll
+-	cd tools; $(MAKE) CAMLC="../$(CAMLRUN) ../ocamlc -I ../stdlib" cvt_emit
++	cd tools; $(MAKE) CAMLC=ocamlc.opt CAMLLEX=ocamllex.opt cvt_emit
+ 
+ # The "expunge" utility
+ 
+@@ -500,7 +491,7 @@
+ # The runtime system for the bytecode compiler
+ 
+ runtime:
+-	cd byterun; $(MAKE) all
++	cd byterun; $(MAKE) $(CROSS_CC) all
+ 	if test -f stdlib/libcamlrun.a; then :; else \
+           ln -s ../byterun/libcamlrun.a stdlib/libcamlrun.a; fi
+ clean::
+@@ -529,7 +520,7 @@
+ library-cross:
+ 	cd stdlib; $(MAKE) RUNTIME=../byterun/ocamlrun all
+ libraryopt:
+-	cd stdlib; $(MAKE) allopt
++	cd stdlib; $(MAKE) RUNTIME=ocamlrun COMPILER=/usr/bin/ocamlc CAMLDEP=ocamldep allopt
+ partialclean::
+ 	cd stdlib; $(MAKE) clean
+ alldepend::
+@@ -576,12 +567,15 @@
+ # The extra libraries
+ 
+ otherlibraries:
++	@sed -e 's|@compiler@|ocamlc.opt|' \
++	  driver/ocamlcomp.sh.in > ocamlcomp.sh
++	@chmod +x ocamlcomp.sh
+ 	for i in $(OTHERLIBRARIES); do \
+-          (cd otherlibs/$$i; $(MAKE) RUNTIME=$(RUNTIME) all) || exit $$?; \
++          (cd otherlibs/$$i; $(MAKE) $(CROSS_CC) all) || exit $$?; \
+         done
+ otherlibrariesopt:
+ 	for i in $(OTHERLIBRARIES); do \
+-          (cd otherlibs/$$i; $(MAKE) allopt) || exit $$?; \
++          (cd otherlibs/$$i; $(MAKE) $(CROSS_CC) allopt) || exit $$?; \
+         done
+ partialclean::
+ 	for i in $(OTHERLIBRARIES); do \
+@@ -595,7 +589,7 @@
+ # The replay debugger
+ 
+ ocamldebugger: ocamlc ocamlyacc ocamllex
+-	cd debugger; $(MAKE) all
++	cd debugger; $(MAKE) CAMLLEX=ocamllex.opt CAMLYACC=ocamlyacc CAMLDEP=ocamldep all
+ partialclean::
+ 	cd debugger; $(MAKE) clean
+ alldepend::
+diff -Naur ocaml-3.08.2-orig/otherlibs/dynlink/Makefile ocaml-3.08.2/otherlibs/dynlink/Makefile
+--- ocaml-3.08.2-orig/otherlibs/dynlink/Makefile	2004-02-22 10:07:51.000000000 -0500
++++ ocaml-3.08.2/otherlibs/dynlink/Makefile	2005-02-09 18:26:24.000000000 -0500
+@@ -17,7 +17,7 @@
+ 
+ include ../../config/Makefile
+ 
+-CAMLC=../../boot/ocamlrun ../../ocamlc
++CAMLC=ocamlc.opt
+ INCLUDES=-I ../../utils -I ../../typing -I ../../bytecomp
+ COMPFLAGS=-warn-error A -I ../../stdlib $(INCLUDES)
+ 
+diff -Naur ocaml-3.08.2-orig/otherlibs/unix/getgroups.c ocaml-3.08.2/otherlibs/unix/getgroups.c
+--- ocaml-3.08.2-orig/otherlibs/unix/getgroups.c	2004-08-23 07:31:44.000000000 -0400
++++ ocaml-3.08.2/otherlibs/unix/getgroups.c	2005-02-09 18:26:24.000000000 -0500
+@@ -23,7 +23,7 @@
+ #ifdef HAS_UNISTD
+ #include <unistd.h>
+ #endif
+-#include <limits.h>
++#include <sys/param.h>
+ #include "unixsupport.h"
+ 
+ CAMLprim value unix_getgroups(value unit)


Property changes on: packages/ocaml/branches/cross/debian/patches/cross.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/ocaml/branches/cross/debian/patches/powerpc.dpatch
===================================================================
--- packages/ocaml/branches/cross/debian/patches/powerpc.dpatch	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/patches/powerpc.dpatch	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,90 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## powerpc.dpatch by Eric Cooper <ecc@cmu.edu>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Build cross-compiler for powerpc
+
+@DPATCH@
+diff -Naur ocaml-3.08.2-orig/asmcomp/power/proc.ml ocaml-3.08.2/asmcomp/power/proc.ml
+--- ocaml-3.08.2-orig/asmcomp/power/proc.ml	2004-06-19 13:39:35.000000000 -0400
++++ ocaml-3.08.2/asmcomp/power/proc.ml	2005-02-09 18:26:24.000000000 -0500
+@@ -237,7 +237,7 @@
+   and outfile = Filename.quote outfile in
+   match Config.system with
+   | "elf" ->
+-      Ccomp.command ("as -u -m ppc -o " ^ outfile ^ " " ^ infile)
++      Ccomp.command ("powerpc-linux-as -u -m ppc -o " ^ outfile ^ " " ^ infile)
+   | "rhapsody" | "bsd" ->
+       Ccomp.command ("as -o " ^ outfile ^ " " ^ infile)
+   | _ -> assert false
+diff -Naur ocaml-3.08.2-orig/configure ocaml-3.08.2/configure
+--- ocaml-3.08.2-orig/configure	2004-11-18 09:08:57.000000000 -0500
++++ ocaml-3.08.2/configure	2005-02-09 20:44:20.000000000 -0500
+@@ -1,5 +1,8 @@
+ #! /bin/sh
+ 
++cross_target=powerpc
++version=3.08
++
+ #########################################################################
+ #                                                                       #
+ #                            Objective Caml                             #
+@@ -322,7 +315,7 @@
+ # Check the sizes of data types
+ 
+ echo "Checking the sizes of integers and pointers..."
+-set `sh ./runtest sizes.c`
++set 4 4 4 2
+ case "$2,$3" in
+   4,4) echo "OK, this is a regular 32 bit architecture."
+        echo "#undef ARCH_SIXTYFOUR" >> m.h;;
+@@ -357,8 +350,7 @@
+      echo '#define ARCH_INT64_PRINTF_FORMAT "l"' >> m.h
+      int64_native=true
+ else
+-  sh ./runtest longlong.c
+-  case $? in
++  case 0 in
+   0) echo "64-bit \"long long\" integer type found (printf with \"%ll\")."
+      echo "#define ARCH_INT64_TYPE long long" >> m.h
+      echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
+@@ -384,8 +376,7 @@
+ 
+ # Determine endianness
+ 
+-sh ./runtest endian.c
+-case $? in
++case 0 in
+   0) echo "This is a big-endian architecture."
+      echo "#define ARCH_BIG_ENDIAN" >> m.h;;
+   1) echo "This is a little-endian architecture."
+@@ -416,8 +407,7 @@
+       echo "#define ARCH_ALIGN_DOUBLE" >> m.h
+     fi;;
+   *)
+-    sh ./runtest dblalign.c
+-    case $? in
++    case 0 in
+       0) echo "Doubles can be word-aligned."
+          echo "#undef ARCH_ALIGN_DOUBLE" >> m.h;;
+       1) echo "Doubles must be doubleword-aligned."
+@@ -441,8 +431,7 @@
+         echo "#define ARCH_ALIGN_INT64" >> m.h
+       fi;;
+     *)
+-      sh ./runtest int64align.c
+-      case $? in
++      case 0 in
+         0) echo "64-bit integers can be word-aligned."
+            echo "#undef ARCH_ALIGN_INT64" >> m.h;;
+         1) echo "64-bit integers must be doubleword-aligned."
+@@ -460,8 +449,7 @@
+ 
+ # Check semantics of division and modulus
+ 
+-sh ./runtest divmod.c
+-case $? in
++case 0 in
+   0) echo "Native division and modulus have round-towards-zero semantics, will use them."
+      echo "#undef NONSTANDARD_DIV_MOD" >> m.h;;
+   1) echo "Native division and modulus do not have round-towards-zero semantics, will use software emulation."


Property changes on: packages/ocaml/branches/cross/debian/patches/powerpc.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/ocaml/branches/cross/debian/rules
===================================================================
--- packages/ocaml/branches/cross/debian/rules	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/debian/rules	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1,124 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess.
+
+CROSS_TARGET=powerpc
+VERSION=3.08
+
+OCAML_LIB=usr/lib/ocaml/$(CROSS_TARGET)-linux/$(VERSION)
+TARGET_DIR=debian/tmp/$(OCAML_LIB)/target
+
+include /usr/share/dpatch/dpatch.make
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+config-stamp: patch
+	dh_testdir
+
+	# Add here commands to configure the package.
+	./configure --prefix /usr
+
+	touch config-stamp
+
+build: build-stamp
+
+build-stamp: config-stamp
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE) coldstart ocaml
+	$(MAKE) -C tools CAMLC=/usr/bin/ocamlc.opt ocamlmklib
+	$(MAKE) otherlibraries opt-core ocamlopt.opt otherlibrariesopt
+
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp config-stamp patch-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+	-cd config && $(RM) Makefile m.h s.h
+	-cd boot && $(RM) ocamlrun ocamlyacc stdlib.cma std_exit.cmo *.cmi camlheader libcamlrun.a
+	-cd tools && $(RM) *.bak
+	-cd camlp4/config && $(RM) Makefile Makefile.cnf
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	$(MAKE) PREFIX=$(CURDIR)/debian/tmp/usr install
+	$(RM) debian/tmp/$(OCAML_LIB)/ld.conf
+
+	# Simulate dh_strip here, since it chokes on foreign obj files.
+	# Static libs:
+	$(CROSS_TARGET)-linux-strip \
+	    --strip-debug \
+	    debian/tmp/$(OCAML_LIB)/*.a
+	# Executables:
+	$(CROSS_TARGET)-linux-strip \
+	    --remove-section=.comment --remove-section=.note \
+	    debian/tmp/usr/bin/ocamlrun
+	# Shared libs:
+	$(CROSS_TARGET)-linux-strip \
+	    --remove-section=.comment --remove-section=.note --strip-unneeded \
+	    debian/tmp/$(OCAML_LIB)/stublibs/*.so
+
+	# Move target executables and runtime libs to a subdirectory.
+	mkdir $(TARGET_DIR)
+	mv debian/tmp/usr/bin/ocamlrun $(TARGET_DIR)
+	mv debian/tmp/$(OCAML_LIB)/stublibs $(TARGET_DIR)
+	# Create ld.conf for the target.
+	echo /usr/local/lib/ocaml/$(VERSION)/stublibs > $(TARGET_DIR)/ld.conf
+	echo /usr/lib/ocaml/$(VERSION)/stublibs >> $(TARGET_DIR)/ld.conf
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installcatalogs
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+#	dh_undocumented
+	dh_installman
+	dh_link
+	# Exclude foreign obj files.
+	dh_strip --exclude=.a --exclude=/target/
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb
+	# Exclude foreign obj files.
+	dh_shlibdeps --exclude=/target/
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: patch build unpatch clean binary-indep binary-arch binary install
+
+# -*- makefile-mode -*-


Property changes on: packages/ocaml/branches/cross/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/ocaml/branches/cross/ocaml-powerpc_3.08.2.orig.tar.gz
===================================================================
--- packages/ocaml/branches/cross/ocaml-powerpc_3.08.2.orig.tar.gz	2005-02-11 21:54:20 UTC (rev 962)
+++ packages/ocaml/branches/cross/ocaml-powerpc_3.08.2.orig.tar.gz	2005-02-11 22:04:03 UTC (rev 963)
@@ -0,0 +1 @@
+link ocaml_3.08.2.orig.tar.gz
\ No newline at end of file


Property changes on: packages/ocaml/branches/cross/ocaml-powerpc_3.08.2.orig.tar.gz
___________________________________________________________________
Name: svn:special
   + *