this repo has no description

[new release] clangml.4.1.0, clangml-transforms.0.25, conf-libclang.10, pattern.0.2.0 (#16446)

* [new release] clangml.4.1.0, clangml-transforms.0.25,
conf-libclang.10, pattern.0.2.0

* Fix hash

* clangml.4.0.1 does not support Clang 10

* Add missing package llvm-devel for CentOS

* Do not know where libclang is on freebsd

* Install LLVM 9 on Mac OS X with conf-libclang <10

* Backport changes on conf-libclang 1.0.0

* Fix homebrew formula name

* Install llvm@8: llvm@9 installs 9.0.1, unsupported by clangml 4.0.1

* Fix tests for Mac OS X

* Relax lower-bound on dune

Suggested by Marcello Seri.

* Fix lower-bound on dune

Reported by Marcello Seri.

* Add ppx_deriving to clangml.4.0.1 dependencies

(Before override.0.3.0, ppx_deriving was implied by override, but it
is no longer the case.)

* Install LLVM and Clang 8 for clangml.4.0.1 on Debian

* Make clangml.4.0.1 work with Clang/LLVM 9.0.1

Debian testing (bullseye) has just switched to LLVM 9.0.1 as
llvm-dev (and provides llvm-8-dev to install older version) but Debian
stable does not provide llvm-8-dev. If we want depexts rules that work
on both releases, we have to make clangml.4.0.1 compatible with
llvm-dev, common to both Debian releases.

* Use --with-llvm-version only with Clang 9.0.1

* Now allow Clang 9.0.1 on Mac OS X with clangml.4.0.1

* Revert "Now allow Clang 9.0.1 on Mac OS X with clangml.4.0.1"

This reverts commit 4353cd36c6f2f97951b305c080d6b77a53ff429e.
The "cpp" test fails with Clang 9 on Mac OS X (due to oddities in
declaration order when some system headers are included: these cases
are better handled in clangml.4.1.0 tests).

Changed files
+236 -10
packages
clangml
clangml.4.0.1
clangml.4.1.0
clangml-transforms
clangml-transforms.0.24
clangml-transforms.0.25
conf-libclang
conf-libclang.1.0.0
conf-libclang.10
pattern
pattern.0.2.0
+1 -1
packages/clangml-transforms/clangml-transforms.0.24/opam
···
depends: [
"ocaml"
"dune" {>= "1.10"}
-
"clangml" {>= "4.0.1"}
+
"clangml" {>= "4.0.1" & < "4.1.0"}
"visitors" {>= "20190711"}
"dolog" {>= "4.0.0"}
]
+35
packages/clangml-transforms/clangml-transforms.0.25/opam
···
+
opam-version: "2.0"
+
synopsis: "Code transformers for clangml"
+
maintainer: ["Thierry Martinez <thierry.martinez@inria.fr>"]
+
authors: ["Thierry Martinez <thierry.martinez@inria.fr>"]
+
license: "BSD-2-Clause"
+
homepage: "https://gitlab.inria.fr/memcad/clangml-transforms"
+
doc: "https://gitlab.inria.fr/memcad/clangml-transforms"
+
bug-reports: "https://gitlab.inria.fr/memcad/clangml-transforms/issues"
+
depends: [
+
"ocaml" {>= "4.03.0" & < "4.12.0"}
+
"dune" {>= "1.11.0"}
+
"clangml" {>= "4.1.0"}
+
"dolog" {>= "4.0.0"}
+
"traverse" {>= "0.2.0"}
+
"refl" {>= "0.1.0"}
+
]
+
build: [
+
["dune" "subst"] {pinned}
+
[
+
"dune"
+
"build"
+
"-p"
+
name
+
"-j"
+
jobs
+
"@install"
+
"@runtest" {with-test}
+
"@doc" {with-doc}
+
]
+
]
+
dev-repo: "git+https://gitlab.inria.fr/memcad/clangml-transforms"
+
url {
+
src: "https://gitlab.inria.fr/memcad/clangml-transforms/-/archive/v0.25/clangml-transforms-v0.25.tar.gz"
+
checksum: "sha512=7432844f7be84ce89299d8611fe6379b1174eb24723dc9e8805ba75f2b700475f281cef13c7b8a40f54776e57200a288fcde1210c77686c0f693df665f535414"
+
}
+10 -3
packages/clangml/clangml.4.0.1/opam
···
clangml provides bindings to call the Clang API from OCaml.
"""
depends: [
-
"conf-libclang"
+
"conf-libclang" { < "10" }
"conf-ncurses"
"conf-zlib"
"dune" {>= "1.10.0"}
"ppxlib" {>= "0.9.0"}
"stdcompat" {>= "10"}
"override" {>= "0.1.0"}
+
"ppx_deriving" {>= "4.3"}
"ocaml" {>= "4.04.0"}
"ocamlfind" {build & >= "1.8.0"}
"ocamlcodoc" {with-test}
-
"pattern" {with-test}
+
"pattern" {with-test & >= "0.1.0" & < "0.2.0"}
]
+
# $equivalent_version is used by clangml.4.0.1, which does not recognize
+
# Clang/LLVM 9.0.1, but there is no change in API between Clang 9.0.0 and
+
# Clang 9.0.1.
build: [
-
["./configure" "--prefix=%{prefix}%" "--with-llvm-config=%{conf-libclang:config}%"]
+
["./configure" "--prefix=%{prefix}%"
+
"--with-llvm-config=%{conf-libclang:config}%"
+
"--with-llvm-version=%{conf-libclang:equivalent_version}%"
+
{conf-libclang:equivalent_version != ""}]
["dune" "build" "-p" name "-j" jobs]]
run-test: [["dune" "runtest" "-p" name "-j" jobs]]
url {
+35
packages/clangml/clangml.4.1.0/opam
···
+
# This file is generated by dune, edit dune-project instead
+
opam-version: "2.0"
+
synopsis: "OCaml bindings for Clang API"
+
description: """
+
clangml provides bindings to call the Clang API from OCaml.
+
"""
+
maintainer: ["Thierry Martinez <thierry.martinez@inria.fr>"]
+
authors: ["Thierry Martinez <thierry.martinez@inria.fr>"]
+
license: "BSD-2-Clause"
+
homepage: "https://memcad.gitlabpages.inria.fr/clangml/"
+
doc: "https://memcad.gitlabpages.inria.fr/clangml/doc/clangml/index.html"
+
bug-reports: "https://gitlab.inria.fr/memcad/clangml/issues"
+
depends: [
+
"conf-libclang"
+
"conf-ncurses"
+
"conf-zlib"
+
"dune" {>= "1.11.0"}
+
"stdcompat" {>= "13"}
+
"ocaml" {>= "4.03.0" & < "4.12.0"}
+
"ocamlfind" {build & >= "1.8.0"}
+
"ocamlcodoc" {with-test & >= "1.0.1"}
+
"pattern" {with-test & >= "0.2.0"}
+
"metapp" {>= "0.1.0"}
+
"metaquot" {>= "0.1.0"}
+
"refl" {>= "0.1.0"}
+
]
+
dev-repo: "git+https://gitlab.inria.fr/memcad/clangml"
+
build: [
+
["./configure" "--prefix=%{prefix}%" "--with-llvm-config=%{conf-libclang:config}%"]
+
["dune" "build" "-p" name "-j" jobs]]
+
run-test: [["dune" "runtest" "-p" name "-j" jobs]]
+
url {
+
src: "https://gitlab.inria.fr/memcad/clangml/-/archive/v4.1.0/clangml-v4.1.0.tar.gz"
+
checksum: "sha512=18120b67e803f26ce1538afac0c2b11b240e02775ec63fae2dc3b5e1d9296058409faab809105ce596ad0f4a0726d2670b421558ab59fa38956143e1637971ed"
+
}
+10
packages/conf-libclang/conf-libclang.1.0.0/files/configure.sh
···
( clean_tempdir; echo "Error: cannot execute libclang test."; exit 1 )
clean_tempdir
+
# $equivalent_version is used by clangml.4.0.1, which does not recognize
+
# Clang/LLVM 9.0.1, but there is no change in API between Clang 9.0.0 and
+
# Clang 9.0.1.
+
if [ "$llvm_version" = 9.0.1 ]; then
+
equivalent_version=9.0.0
+
else
+
equivalent_version=
+
fi
+
echo "config: \"$llvm_config\"" >> conf-libclang.config
echo "version: \"$llvm_version\"" >> conf-libclang.config
+
echo "equivalent_version: \"$equivalent_version\"" >> conf-libclang.config
+7 -6
packages/conf-libclang/conf-libclang.1.0.0/opam
···
["bash" "-ex" "configure.sh" version]
]
depexts: [
-
["llvm"] {os-distribution = "homebrew" & os = "macos"}
-
["llvm"] {os-distribution = "macports" & os = "macos"}
+
["llvm@8"] {os-distribution = "homebrew" & os = "macos"}
+
["llvm@8"] {os-distribution = "macports" & os = "macos"}
["libclang-dev" "llvm-dev"] {os-family = "debian"}
["clang-dev" "llvm-dev" "clang-static"] {os-distribution = "alpine"}
-
["clang-devel" "llvm-static" "zlib-devel"] {os-distribution = "centos"}
+
["clang-devel" "llvm-devel" "llvm-static" "zlib-devel"]
+
{os-distribution = "centos"}
["clang-devel" "llvm-devel" "zlib-devel" "redhat-rpm-config"]
{os-distribution = "fedora"}
["llvm-clang-devel"] {os-family = "suse"}
-
["devel/clang" "devel/llvm"] {os = "freebsd"}
+
# ["devel/clang" "devel/llvm"] {os = "freebsd"}
["sys-devel/clang"] {os-distribution = "gentoo"}
]
extra-files: [[
-
"configure.sh" "sha512=7bff64d4185ddd97597d096d26d255a59b1a68fb96776823cc4fe161ccaf24ff50d30c39f7880fdff2f10b7a9c75c967280085bda5e2aba27433159c6b33ceeb"
+
"configure.sh" "sha512=5ab8e6adac378413740efc3fb02eee8409a643f64bff32a3fb2e50853132fee2ed6a32bb46ce86fe79c5e416a90d14858635e08d5e6f3a7d1924ae98009bb217"
]]
-
synopsis: "Virtual package relying on the installation of llvm and clang libraries (any version)"
+
synopsis: "Virtual package relying on the installation of llvm and clang libraries (version <10)"
flags: conf
+78
packages/conf-libclang/conf-libclang.10/files/configure.sh
···
+
#!/bin/bash -ex
+
+
find_llvm_config () {
+
# Locate llvm-config (taken from conf-llvm's configure.sh file)
+
+
shopt -s nullglob
+
for version in 10 9 8 7 6 5 4 3; do
+
if hash brew 2>/dev/null; then
+
brew_llvm_config="$(brew --cellar)"/llvm*/${version}*/bin/llvm-config
+
fi
+
for llvm_config in \
+
llvm-config-${version} llvm-config-${version}.0 \
+
llvm-config${version}0 llvm-config-mp-$version \
+
llvm-config-mp-${version}.0 $brew_llvm_config \
+
/usr/lib64/llvm/${version}/bin/llvm-config \
+
/usr/lib/llvm/${version}/bin/llvm-config \
+
llvm-config; do
+
llvm_version="`$llvm_config --version`" || continue
+
return
+
done
+
done
+
+
echo "Error: LLVM is not installed."
+
exit 1
+
}
+
+
find_llvm_config
+
+
LLVM_CFLAGS="`\"$llvm_config\" --cflags`"
+
LLVM_LDFLAGS="`\"$llvm_config\" --ldflags`"
+
LLVM_LIBDIR="`\"$llvm_config\" --libdir`"
+
+
# These filters enable compilation with gcc.
+
# Filter -Wstring-conversion for OpenSUSE
+
LLVM_CFLAGS="`echo $LLVM_CFLAGS | sed s/-Wstring-conversion\\ //`"
+
+
# Filter -Werror=unguarded-availability-new and -Wcovered-switch-default
+
# (which appear with LLVM 7)
+
LLVM_CFLAGS="`echo $LLVM_CFLAGS | sed s/-Werror=unguarded-availability-new\\ //`"
+
LLVM_CFLAGS="`echo $LLVM_CFLAGS | sed s/-Wcovered-switch-default\\ //`"
+
+
# Filter "-Wdelete-non-virtual-dtor" (warning only)
+
LLVM_CFLAGS="`echo $LLVM_CFLAGS | sed s/-Wdelete-non-virtual-dtor\\ //`"
+
+
tempdir="`mktemp -d`"
+
+
clean_tempdir () {
+
rm -f "$tempdir/test_libclang.c" "$tempdir/test_libclang.o" \
+
"$tempdir/test_libclang"
+
rmdir "$tempdir"
+
}
+
+
cat >"$tempdir/test_libclang.c" <<EOF
+
#include <clang-c/Index.h>
+
#include <stdlib.h>
+
+
int
+
main(int argc, char *argv[])
+
{
+
CXIndex idx = clang_createIndex(1, 1);
+
clang_disposeIndex(idx);
+
return EXIT_SUCCESS;
+
}
+
EOF
+
CC=cc
+
"$CC" -o "$tempdir/test_libclang.o" -c $LLVM_CFLAGS \
+
"$tempdir/test_libclang.c" || \
+
( clean_tempdir; echo "Error: cannot compile libclang test."; exit 1 )
+
"$CC" -o "$tempdir/test_libclang" \
+
$LLVM_LDFLAGS "$tempdir/test_libclang.o" \
+
"-lclang" "-Wl,-rpath,$LLVM_LIBDIR" || \
+
( clean_tempdir; echo "Error: cannot link libclang test."; exit 1 )
+
"$tempdir/test_libclang" || \
+
( clean_tempdir; echo "Error: cannot execute libclang test."; exit 1 )
+
clean_tempdir
+
+
echo "config: \"$llvm_config\"" >> conf-libclang.config
+
echo "version: \"$llvm_version\"" >> conf-libclang.config
+27
packages/conf-libclang/conf-libclang.10/opam
···
+
opam-version: "2.0"
+
maintainer: "Thierry Martinez <martinez@nsup.org>"
+
authors: "The LLVM team"
+
homepage: "http://llvm.org"
+
bug-reports: "https://llvm.org/bugs/"
+
license: "MIT"
+
build: [
+
["bash" "-ex" "configure.sh" version]
+
]
+
depexts: [
+
["llvm"] {os-distribution = "homebrew" & os = "macos"}
+
["llvm"] {os-distribution = "macports" & os = "macos"}
+
["libclang-dev" "llvm-dev"] {os-family = "debian"}
+
["clang-dev" "llvm-dev" "clang-static"] {os-distribution = "alpine"}
+
["clang-devel" "llvm-devel" "llvm-static" "zlib-devel"]
+
{os-distribution = "centos"}
+
["clang-devel" "llvm-devel" "zlib-devel" "redhat-rpm-config"]
+
{os-distribution = "fedora"}
+
["llvm-clang-devel"] {os-family = "suse"}
+
# ["devel/clang" "devel/llvm"] {os = "freebsd"}
+
["sys-devel/clang"] {os-distribution = "gentoo"}
+
]
+
extra-files: [[
+
"configure.sh" "sha512=3cb05a41bed0441d44c6e73561741e85e2ddd23d8df1c645d45048a911d62bf3d82d726e9fc8a279ee28f9a0cc73612558dec5f223291646be73c391f21823d4"
+
]]
+
synopsis: "Virtual package relying on the installation of llvm and clang libraries (any version)"
+
flags: conf
+33
packages/pattern/pattern.0.2.0/opam
···
+
opam-version: "2.0"
+
build: [
+
["dune" "subst"] {pinned}
+
["dune" "build" "-p" name "-j" jobs]
+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
+
["dune" "build" "-p" name "@doc"] {with-doc}
+
]
+
maintainer: ["Thierry Martinez <thierry.martinez@inria.fr>"]
+
authors: ["Thierry Martinez <thierry.martinez@inria.fr>"]
+
bug-reports: "https://github.com/thierry-martinez/pattern"
+
homepage: "https://github.com/thierry-martinez/pattern"
+
doc: "https://github.com/thierry-martinez/pattern"
+
license: "BSD-2-Clause"
+
dev-repo: "git+https://github.com/thierry-martinez/pattern.git"
+
synopsis: "Run-time patterns that explain match failures"
+
description: """
+
pattern is a PPX extension that generates functions from patterns
+
that explain match failures by returning the common context and
+
the list of differences between a pattern and a value.
+
"""
+
depends: [
+
"ocaml" {>= "4.03.0" & < "4.12.0"}
+
"dune" {>= "1.10.0"}
+
"metapp" {>= "0.1.0"}
+
"metaquot" {>= "0.1.0"}
+
"refl" {>= "0.1.0"}
+
"ocaml-migrate-parsetree" {>= "1.5.0"}
+
"stdcompat" {>= "10"}
+
]
+
url {
+
src: "https://github.com/thierry-martinez/pattern/archive/v0.2.0.tar.gz"
+
checksum: "sha512=70c02987409883b83e241c940a1391e90238a856826ca985bd50b64a2966a22057d64b8188445632b3c85610f0ed9c0e5622244f81e95cf3aafdc29bc46e32b3"
+
}