This is an automated email from the git hooks/post-receive script.

josch-guest pushed a commit to branch master
in repository ocp-indent.

commit ca92ea1c3b56da489b956e3c52eb45405f8cb117
Author: josch <j.scha...@email.de>
Date:   Sat Sep 13 11:11:19 2014 +0200

    package new upstream version
    
     - remove Makefile.simple patch because applied upstream
     - fix syntax error introduced into Makefile.simple by new patch
     - remove approx_common from being required in Makefile.simple
     - add dynlink and findlib to ocamlbuild invocation for ocp-indent
       executable
     - do not build native versions on systems without ocamlopt
     - use OCAMLINIT_SED functionality of dh_ocamlinit to prefix lines in
       *.install.in files with DYN and OPT to selectively include files
---
 debian/changelog                                   | 17 ++++++
 debian/libocp-indent-lib-ocaml-dev.install.in      |  8 ++-
 debian/libocp-indent-lib-ocaml.install.in          |  2 +-
 debian/patches/Makefile.simple.patch               | 30 -----------
 debian/patches/fix-Makefile.simple-syntax-error    | 16 ++++++
 ...let-Makefile.simple-respect-OCAML_HAVE_OCAMLOPT | 60 ++++++++++++++++++++++
 .../remove-approx_common-from-Makefile.simple      | 33 ++++++++++++
 debian/patches/series                              |  4 +-
 debian/rules                                       | 17 ++++--
 9 files changed, 148 insertions(+), 39 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6a686ec..a39e9c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+ocp-indent (1.4.2-1) unstable; urgency=low
+
+  * New upstream version
+  * remove Makefile.simple patch because applied upstream
+  * fix syntax error introduced into Makefile.simple by new patch
+       -> debian/patches/fix-Makefile.simple-syntax-error
+  * remove approx_common from being required in Makefile.simple
+       -> debian/patches/remove-approx_common-from-Makefile.simple
+  * do not build native versions on systems without ocamlopt
+       -> debian/patches/let-Makefile.simple-respect-OCAML_HAVE_OCAMLOPT
+  * add dynlink and findlib to ocamlbuild invocation for ocp-indent
+    executable
+  * use OCAMLINIT_SED functionality of dh_ocamlinit to prefix lines in
+    *.install.in files with DYN and OPT to selectively include files
+
+ -- Johannes Schauer <j.scha...@email.de>  Sat, 13 Sep 2014 11:10:27 +0200
+
 ocp-indent (1.4.1-2) unstable; urgency=medium
 
   * do not call dh_auto_clean on Makefile.simple but clean manually
diff --git a/debian/libocp-indent-lib-ocaml-dev.install.in 
b/debian/libocp-indent-lib-ocaml-dev.install.in
index 748c56f..7710560 100644
--- a/debian/libocp-indent-lib-ocaml-dev.install.in
+++ b/debian/libocp-indent-lib-ocaml-dev.install.in
@@ -1,3 +1,7 @@
-@OCamlStdlibDir@/ocp-indent-lib/*.cm{o,i,x,xa}
-@OCamlStdlibDir@/ocp-indent-lib/*.{o,a}
+#@OCamlStdlibDir@/ocp-indent-lib/*.cmo
+@OCamlStdlibDir@/ocp-indent-lib/*.cmi
 @OCamlStdlibDir@/ocp-indent-lib/*.ml*
+#OPT: @OCamlStdlibDir@/ocp-indent-lib/*.o
+OPT: @OCamlStdlibDir@/ocp-indent-lib/*.cmxa
+OPT: @OCamlStdlibDir@/ocp-indent-lib/*.a
+OPT: @OCamlStdlibDir@/ocp-indent-lib/*.cmx
diff --git a/debian/libocp-indent-lib-ocaml.install.in 
b/debian/libocp-indent-lib-ocaml.install.in
index 41ddf0b..764ec13 100644
--- a/debian/libocp-indent-lib-ocaml.install.in
+++ b/debian/libocp-indent-lib-ocaml.install.in
@@ -1,3 +1,3 @@
 @OCamlStdlibDir@/ocp-indent-lib/META
 @OCamlStdlibDir@/ocp-indent-lib/ocp-indent-lib.cma
-@OCamlStdlibDir@/ocp-indent-lib/ocp-indent-lib.cmxs
+DYN: @OCamlStdlibDir@/ocp-indent-lib/ocp-indent-lib.cmxs
diff --git a/debian/patches/Makefile.simple.patch 
b/debian/patches/Makefile.simple.patch
deleted file mode 100644
index 28e2971..0000000
--- a/debian/patches/Makefile.simple.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/Makefile.simple
-+++ b/Makefile.simple
-@@ -9,7 +9,7 @@ COMPAT_DIR = src/ocaml_$(OCAML_MAJOR)/
- 
- LIB = ocp-indent-lib
- 
--all: $(LIB).cma $(LIB).cmxa
-+all: $(LIB).cma $(LIB).cmxa $(LIB).cmxs
- 
- src/compat.ml: ALWAYS
-       cp $(COMPAT_DIR)/compat.ml src/
-@@ -28,6 +28,9 @@ ALWAYS:
- %.cmxa: ALWAYS $(GENERATED)
-       ocamlbuild src/$@
- 
-+%.cmxs: ALWAYS $(GENERATED)
-+      ocamlbuild src/$@
-+
- .PHONY: clean
- clean:
-       rm -rf $(GENERATED) META _build
-@@ -45,5 +48,7 @@ install: _build/src/META $(LIB).cma $(LI
-       ocamlfind remove ${LIB} || true
-       cd _build/src && ocamlfind install $(LIB) META \
-         $(INTERFACES:=.cmi) \
--        $(LIB).cma $(LIB).cmxa $(LIB).a
-+        $(INTERFACES:=.mli) \
-+        $(INTERFACES:=.cmx) \
-+        $(LIB).cma $(LIB).cmxa $(LIB).cmxs $(LIB).a
- 
diff --git a/debian/patches/fix-Makefile.simple-syntax-error 
b/debian/patches/fix-Makefile.simple-syntax-error
new file mode 100644
index 0000000..ce87e85
--- /dev/null
+++ b/debian/patches/fix-Makefile.simple-syntax-error
@@ -0,0 +1,16 @@
+Description: fix syntax error in Makefile.simple
+ Introduced in commit ae057b47
+Author: josch <j.scha...@email.de>
+Forwarded: https://github.com/OCamlPro/ocp-indent/issues/146
+
+--- a/Makefile.simple
++++ b/Makefile.simple
+@@ -29,7 +29,7 @@ ALWAYS:
+       ocamlbuild src/$@
+ 
+ %.cmxs: ALWAYS $(GENERATED)
+-   ocamlbuild src/$@
++      ocamlbuild src/$@
+ 
+ .PHONY: clean
+ clean:
diff --git a/debian/patches/let-Makefile.simple-respect-OCAML_HAVE_OCAMLOPT 
b/debian/patches/let-Makefile.simple-respect-OCAML_HAVE_OCAMLOPT
new file mode 100644
index 0000000..6979f94
--- /dev/null
+++ b/debian/patches/let-Makefile.simple-respect-OCAML_HAVE_OCAMLOPT
@@ -0,0 +1,60 @@
+Description: allow to build without ocamlopt
+ Some platforms don't have ocamlopt. Allow upstream makefile to not build
+ native targets in this case as controlled by the OCAML_HAVE_OCAMLOPT variable.
+Author: josch <j.scha...@email.de>
+Forwarded: https://github.com/OCamlPro/ocp-indent/issues/148
+
+--- a/Makefile.simple
++++ b/Makefile.simple
+@@ -9,7 +9,16 @@ COMPAT_DIR = src/ocaml_$(OCAML_MAJOR)/
+ 
+ LIB = ocp-indent-lib
+ 
+-all: $(LIB).cma $(LIB).cmxa $(LIB).cmxs
++OCAML_HAVE_OCAMLOPT ?= yes
++
++TARGETS := $(LIB).cma
++ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
++      TARGETS += $(LIB).cmxa $(LIB).cmxs $(LIB).a
++      SRCMETALASTLINE := 'archive(native) = "'$(LIB)'.cmxa"'
++endif
++
++.PHONY: all
++all: $(TARGETS)
+ 
+ src/compat.ml: ALWAYS
+       cp $(COMPAT_DIR)/compat.ml src/
+@@ -28,6 +37,9 @@ ALWAYS:
+ %.cmxs: ALWAYS $(GENERATED)
+       ocamlbuild src/$@
+ 
++%.a: ALWAYS $(GENERATED)
++      ocamlbuild src/$@
++
+ .PHONY: clean
+ clean:
+       rm -rf $(GENERATED) META _build
+@@ -36,15 +48,17 @@ _build/src/META:
+       mkdir -p _build/src
+       echo 'version = "'$(VERSION)'"' > $@
+       echo 'archive(byte) = "'$(LIB)'.cma"' >> $@
+-      echo 'archive(native) = "'$(LIB)'.cmxa"' >> $@
++      echo $(SRCMETALASTLINE) >> $@
+ 
+ INTERFACES = approx_lexer pos util indentConfig indentBlock indentPrinter 
nstream
+ 
++IFEXP := $(INTERFACES:=.cmi) $(INTERFACES:=.mli)
++ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
++      IFEXP += $(INTERFACES:=.cmx)
++endif
++
+ .PHONY: install
+-install: _build/src/META $(LIB).cma $(LIB).cmxa
++install: _build/src/META $(TARGETS)
+       ocamlfind remove ${LIB} || true
+       cd _build/src && ocamlfind install $(LIB) META \
+-        $(INTERFACES:=.cmi) \
+-        $(INTERFACES:=.mli) \
+-        $(INTERFACES:=.cmx) \
+-        $(LIB).cma $(LIB).cmxa $(LIB).cmxs $(LIB).a
++        $(IFEXP) $(TARGETS)
diff --git a/debian/patches/remove-approx_common-from-Makefile.simple 
b/debian/patches/remove-approx_common-from-Makefile.simple
new file mode 100644
index 0000000..d185d99
--- /dev/null
+++ b/debian/patches/remove-approx_common-from-Makefile.simple
@@ -0,0 +1,33 @@
+Description: remove approx_common.ml from being generated
+ Commit 845d6a68 removed src/approx_common.ml but did not adjust
+ Makefile.simple or src/ocp-indent-lib.mllib
+Author: josch <j.scha...@email.de>
+Forwarded: https://github.com/OCamlPro/ocp-indent/issues/147
+
+--- a/Makefile.simple
++++ b/Makefile.simple
+@@ -1,6 +1,6 @@
+ # -*- makefile -*-
+ 
+-GENERATED = src/indentVersion.ml src/approx_common.ml src/compat.ml
++GENERATED = src/indentVersion.ml src/compat.ml
+ 
+ VERSION = $(shell awk -F'[(,)]' '/AC_INIT/ { print $$3 }' configure.ac)
+ 
+@@ -17,9 +17,6 @@ src/compat.ml: ALWAYS
+ src/indentVersion.ml:
+       echo 'let version = "'$(VERSION)'"' > $@
+ 
+-src/approx_common.ml: src/approx_common.mli
+-      cp $< $@
+-
+ ALWAYS:
+ 
+ %.cma: ALWAYS $(GENERATED)
+--- a/src/ocp-indent-lib.mllib
++++ b/src/ocp-indent-lib.mllib
+@@ -1,4 +1,3 @@
+-Approx_common
+ Approx_tokens
+ Approx_lexer
+ Compat
diff --git a/debian/patches/series b/debian/patches/series
index f2a7e94..81aaf2b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
-Makefile.simple.patch
+fix-Makefile.simple-syntax-error
+remove-approx_common-from-Makefile.simple
+let-Makefile.simple-respect-OCAML_HAVE_OCAMLOPT
diff --git a/debian/rules b/debian/rules
index ebdf2e9..0f7b905 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,23 +4,30 @@ include /usr/share/ocaml/ocamlvars.mk
 
 export DESTDIR := $(CURDIR)/debian/tmp
 export OCAMLFIND_DESTDIR := $(DESTDIR)$(OCAML_STDLIB_DIR)
+export OCAML_HAVE_OCAMLOPT
+
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+       INDENTMAIN = src/indentMain.native
+else
+       INDENTMAIN = src/indentMain.byte
+endif
 
 %:
        dh $@ --with ocaml
 
 override_dh_auto_clean:
        rm -f config.status config.log Makefile.config version.ocp
-       rm -f indentMain.byte ocp-indent.1 src/approx_lexer.mli src/util.mli
+       rm -f $(INDENTMAIN) ocp-indent.1 src/approx_lexer.mli src/util.mli
        rm -f src/indentVersion.ml src/approx_common.ml src/compat.ml
-       rm -f META _build
+       rm -rf META _build
 
 override_dh_auto_build:
        # build library
        dh_auto_build -- -f Makefile.simple
        # build ocp-indent program
-       ocamlbuild -cflags -I,+cmdliner -lflags -I,`ocamlfind query cmdliner` 
-libs cmdliner src/indentMain.byte
+       ocamlbuild -use-ocamlfind -package findlib -package dynlink -package 
cmdliner $(INDENTMAIN)
        # build man page
-       _build/src/indentMain.byte --help=groff > ocp-indent.1
+       _build/$(INDENTMAIN) --help=groff > ocp-indent.1
        # create the mli for util.ml and approx_lexer.mll
        ocamlc -i src/util.ml > src/util.mli
        ocamlc -I _build/src -i _build/src/approx_lexer.ml > 
src/approx_lexer.mli
@@ -34,7 +41,7 @@ override_dh_install:
 override_dh_auto_install:
        mkdir -p $(OCAMLFIND_DESTDIR)
        mkdir -p $(DESTDIR)/usr/bin
-       cp _build/src/indentMain.byte $(DESTDIR)/usr/bin/ocp-indent
+       cp _build/$(INDENTMAIN) $(DESTDIR)/usr/bin/ocp-indent
        mkdir -p $(DESTDIR)/usr/share/emacs/site-lisp
        cp tools/ocp-indent.el 
$(DESTDIR)/usr/share/emacs/site-lisp/ocp-indent.el
        mkdir -p $(DESTDIR)/usr/share/vim/addons/syntax

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-ocaml-maint/packages/ocp-indent.git

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to