Limit the archs where the ocaml binding is built

Should fix the FTBFS
Currently amd64 arm64 armel armhf i386
This commit is contained in:
Sylvestre Ledru 2017-04-15 15:19:21 +00:00
parent 3486e452b6
commit 575d1a798d
3 changed files with 59 additions and 37 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
llvm-toolchain-4.0 (1:4.0-4) unstable; urgency=medium
* Limit the archs where the ocaml binding is built
Should fix the FTBFS
Currently amd64 arm64 armel armhf i386
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 15 Apr 2017 12:03:30 +0200
llvm-toolchain-4.0 (1:4.0-3) unstable; urgency=medium
* Explicit the dep of clang-tidy on same version of llvm to avoid

45
debian/control vendored
View File

@ -8,8 +8,11 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect,
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,
lcov, procps, help2man, zlib1g-dev,
ocaml-nox [amd64 arm64 armel armhf i386],
ocaml-findlib [amd64 arm64 armel armhf i386],
libctypes-ocaml-dev [amd64 arm64 armel armhf i386],
dh-ocaml [amd64 arm64 armel armhf i386],
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,
libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev
@ -334,26 +337,26 @@ Description: Modular compiler and toolchain technologies, tools
.
This package provides tools for testing.
#Package: libllvm-4.0-ocaml-dev
#Section: ocaml
#Architecture: any
#Suggests: llvm-4.0-doc
#Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-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-4.0-ocaml-dev
Section: ocaml
Architecture: amd64 arm64 armel armhf i386
Suggests: llvm-4.0-doc
Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-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-4.0-doc
Section: doc

41
debian/rules vendored
View File

@ -22,8 +22,6 @@ DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
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)
LDFLAGS_EXTRA =
CXXFLAGS_EXTRA = -std=c++0x
CONFIGURE_EXTRA =
@ -126,7 +124,6 @@ else
COVERITY_ENABLE=0
endif
LLDB_ENABLE=yes
LLDB_DISABLE_ARCHS := hurd-i386 ia64 ppc64el powerpc s390x sparc64 mips64el ppc64
# hurd has threading issues
@ -140,25 +137,34 @@ endif
LLD_ENABLE=yes
%:
dh $@
# --with ocaml
DH_OPTIONS=
OCAML_ENABLE= no
OCAML_ARCHS := amd64 arm64 armel armhf i386
ifneq (,$(filter $(DEB_HOST_ARCH),$(OCAML_ARCHS)))
# Enable OCAML for this arch.
OCAML_ENABLE=yes
OCAML_STDLIB_DIR ?= $(shell ocamlc -where)
DH_OPTIONS=--with ocaml
endif
%:
dh $@ $(DH_OPTIONS)
preconfigure:
for f in debian/*.in; do \
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:
#override_dh_ocamlclean:
override_dh_ocamlinit:
override_dh_ocamlclean:
override_dh_auto_configure: preconfigure
echo "Using gcc: "
@ -273,7 +279,9 @@ override_dh_prep: build_doc
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
if test "$(OCAML_ENABLE)" = yes; then \
$(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc; \
fi
# Continue if failing, Ubuntu precise cannot generate manpages as sphinx is too old
-(cd $(TARGET_BUILD) && make $(NJOBS) docs-llvm-html docs-clang-html docs-clang-tools-html docs-polly-html docs-polly-man docs-clang-tools-man docs-clang-man docs-llvm-man)
@ -391,6 +399,7 @@ override_dh_auto_install:
rm -rf clang/tools/scan-build-py-$(LLVM_VERSION)
cp -fR $(CURDIR)/clang/tools/scan-build-py clang/tools/scan-build-py-$(LLVM_VERSION)
chmod +x clang/tools/scan-build-py-$(LLVM_VERSION)/bin/*
rm -rf clang/tools/scan-view-$(LLVM_VERSION)
cp -fR $(CURDIR)/clang/tools/scan-view clang/tools/scan-view-$(LLVM_VERSION)
@ -423,11 +432,13 @@ override_dh_auto_install:
cp -R $(TARGET_BUILD)/tools/clang/tools/extra/docs/html $(CURDIR)/debian/usr/share/doc/clang-$(LLVM_VERSION)-doc/clang-extra
# 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 "$(OCAML_ENABLE)" = yes; then \
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; \
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