On Sun, 9 Apr 2017 14:36:14 +0200
Sylvestre Ledru <sylves...@debian.org> wrote:
> If you are interested to bring it back, please start from r2529
> (and try in a clean pbuilder, your patch had missing build deps)

I could not make it work for r2529 specifically (some dependency
generation problems with `dh_shlibdeps` at the end of the build), but
attached patch seems to work with later r2543. Is it OK? I can
investigate r2529 some more if necessary.

Here are the steps I took:

    sudo pbuilder clean
    sudo pbuider update

    mkdir libllvm-3.8-ocaml-dev-test
    cd libllvm-3.8-ocaml-dev-test
    debcheckout llvm-toolchain-3.8  # Checked out r2543
    cd llvm-toolchain-3.8
    patch -p0 < ../../libllvm-3.8-ocaml-dev-enable.patch
    sudo pdebuild -- --debbuildopts "-j6 -b -uc -us"  # Have a walk

    cd /var/cache/pbuilder/result
    dpkg -c libllvm-3.8-ocaml-dev_3.8.1-19\~exp4_amd64.deb # Looks OK
    sudo dpkg -i libllvm-3.8-ocaml-dev_3.8.1-19\~exp4_amd64.deb \
        llvm-3.8-dev_3.8.1-19\~exp4_amd64.deb \
        libllvm3.8_3.8.1-19\~exp4_amd64.deb \
        llvm-3.8_3.8.1-19\~exp4_amd64.deb \
        llvm-3.8-runtime_3.8.1-19\~exp4_amd64.deb

I then tested the library with some of my OCaml codebase, and it looks
fine so far. My tests are far from exhaustive, but result certainly
looks better than with the empty package :-)

> This is blocking me on other bugs and I don't have time for this bug.

I am already grateful that you are willing to accept contributions for
this seldom-used package. I hope this patch applies more cleanly.

Thanks,
-- 
"Liberty and democracy become unholy when their hands are dyed red
 with innocent blood."                                  Mahatma Gandhi

Cyril Soldani <cyril.sold...@legiasoft.com>
Index: debian/control
===================================================================
--- debian/control	(revision 2543)
+++ debian/control	(working copy)
@@ -7,8 +7,8 @@
     cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9),
     lsb-release, patchutils, diffstat, xz-utils, python-dev,
     libedit-dev, swig, python-six, python-sphinx, binutils-dev,
-    libjsoncpp-dev, 
-# ocaml-nox, libctypes-ocaml, ocaml-findlib, libctypes-ocaml-dev, dh-ocaml,
+    libjsoncpp-dev, ocaml-nox, libctypes-ocaml, ocaml-findlib,
+    libctypes-ocaml-dev, dh-ocaml,
     lcov, procps, help2man, zlib1g-dev,
     g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32]
 Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev,
@@ -332,26 +332,26 @@
  .
  This package provides tools for testing.
 
-# Package: libllvm-3.8-ocaml-dev
-# Section: ocaml
-# Architecture: any
-# Suggests: llvm-3.8-doc
-# Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-3.8-dev (= ${binary:Version})
-# Provides: ${ocaml:Provides}
-# Description: Modular compiler and toolchain technologies, OCaml bindings
-#  LLVM is a collection of libraries and tools that make it easy to build
-#  compilers, optimizers, just-in-time code generators, and many other
-#  compiler-related programs.
-#  .
-#  LLVM uses a single, language-independent virtual instruction set both
-#  as an offline code representation (to communicate code between
-#  compiler phases and to run-time systems) and as the compiler internal
-#  representation (to analyze and transform programs). This persistent
-#  code representation allows a common set of sophisticated compiler
-#  techniques to be applied at compile-time, link-time, install-time,
-#  run-time, or "idle-time" (between program runs).
-#  .
-#  This package provides the OCaml bindings to develop applications using llvm.
+Package: libllvm-3.8-ocaml-dev
+Section: ocaml
+Architecture: any
+Suggests: llvm-3.8-doc
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-3.8-dev (= ${binary:Version})
+Provides: ${ocaml:Provides}
+Description: Modular compiler and toolchain technologies, OCaml bindings
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the OCaml bindings to develop applications using llvm.
 
 Package: llvm-3.8-doc
 Section: doc
Index: debian/rules
===================================================================
--- debian/rules	(revision 2543)
+++ debian/rules	(working copy)
@@ -27,7 +27,7 @@
 DEB_HOST_ARCH_BITS  = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
 DEB_HOST_ARCH       = $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
-#OCAML_STDLIB_DIR    ?= $(shell ocamlc -where)
+OCAML_STDLIB_DIR    ?= $(shell ocamlc -where)
 
 LDFLAGS_EXTRA =
 CXXFLAGS_EXTRA = -std=c++0x -gsplit-dwarf
@@ -148,10 +148,10 @@
 		f2=$$(echo $$f | sed 's/\.in$$//;s/X\.Y/$(LLVM_VERSION)/'); \
 		echo "$$f => $$f2"; \
 		sed -e 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' \
+			-e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" \
 			-e "s|@LLVM_VERSION_FULL@|$(LLVM_VERSION_FULL)|g" \
 			-e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" $$f > $$f2; \
 	done
-#                        -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g"
 
 # Override this two targets. They are trying to manage the .in conversion for me
 #override_dh_ocamlinit:
@@ -285,7 +285,7 @@
 build_doc:
 	cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
 	cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
-#	$(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc
+	$(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc
 
 # Rename manpages
 	d=$(CURDIR)/docs/_build/man/; \
@@ -444,11 +444,11 @@
 	fi
 
 # Rename OCaml bindings
-#	if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \
-#		mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \
-#		mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \
-#			"$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \
-#	fi
+	if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \
+		mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \
+		mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \
+			"$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \
+	fi
 
 # Delete the target build directory to save some space on the build systems
 # All the files have been installed in $(CURDIR)/debian/tmp/ already

Attachment: pgpMzEHshZ3lF.pgp
Description: OpenPGP digital signature

Reply via email to