Merge branch 'staging-next'
It's not completely without regressions, but ATM it seems to bring more upsides than downsides and the iteration is too long already.
This commit is contained in:
@@ -312,7 +312,7 @@ stdenv.mkDerivation ({
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||
optionals hostPlatform.isSunOS [
|
||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||
# On Illumos/Solaris GNU as is preferred
|
||||
|
||||
@@ -325,7 +325,7 @@ stdenv.mkDerivation ({
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||
optionals hostPlatform.isSunOS [
|
||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||
# On Illumos/Solaris GNU as is preferred
|
||||
|
||||
@@ -324,7 +324,7 @@ stdenv.mkDerivation ({
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||
optionals hostPlatform.isSunOS [
|
||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||
# On Illumos/Solaris GNU as is preferred
|
||||
|
||||
@@ -326,7 +326,7 @@ stdenv.mkDerivation ({
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||
optionals hostPlatform.isSunOS [
|
||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||
# On Illumos/Solaris GNU as is preferred
|
||||
|
||||
@@ -289,7 +289,7 @@ stdenv.mkDerivation ({
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||
optionals hostPlatform.isSunOS [
|
||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||
# On Illumos/Solaris GNU as is preferred
|
||||
|
||||
@@ -277,7 +277,7 @@ stdenv.mkDerivation ({
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
|
||||
# Platform-specific flags
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
||||
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||
optionals hostPlatform.isSunOS [
|
||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||
# On Illumos/Solaris GNU as is preferred
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
, fetchpatch
|
||||
, debugVersion ? false
|
||||
, enableManpages ? false
|
||||
# Mesa requires AMDGPU target
|
||||
, enableTargets ? [ stdenv.hostPlatform stdenv.targetPlatform "AMDGPU" ]
|
||||
, enableSharedLibraries ? true
|
||||
# Mesa requires AMDGPU target
|
||||
# BPF is used by bcc
|
||||
, enableTargets ? [ stdenv.hostPlatform stdenv.targetPlatform "AMDGPU" "BPF" ]
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -27,10 +28,6 @@ let
|
||||
shortVersion = with stdenv.lib;
|
||||
concatStringsSep "." (take 2 (splitString "." release_version));
|
||||
|
||||
inherit
|
||||
(import ../common.nix { inherit (stdenv) lib; })
|
||||
llvmBackendList;
|
||||
|
||||
in stdenv.mkDerivation (rec {
|
||||
name = "llvm-${version}";
|
||||
|
||||
@@ -51,11 +48,16 @@ in stdenv.mkDerivation (rec {
|
||||
propagatedBuildInputs = [ ncurses zlib ];
|
||||
|
||||
patches = [
|
||||
# fixes tests, included in llvm_7
|
||||
# Patches to fix tests, included in llvm_7
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm-mirror/llvm/commit/737553be0c9c25c497b45a241689994f177d5a5d.patch";
|
||||
sha256 = "0hnaxnkx7zy5yg98f1ggv8a9l0r6g19n6ygqsv26masrnlcbccli";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm-mirror/llvm/commit/1c0dd31a7837c3e2f1c4ac14e4d5ac640688bd1f.patch";
|
||||
includes = [ "test/tools/gold/X86/common.ll" ];
|
||||
sha256 = "0fxgrxmfnjx17w3lcq19rk68b2xksh1bynz3ina784kma7hp4wdb";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = optionalString stdenv.isDarwin ''
|
||||
@@ -93,7 +95,6 @@ in stdenv.mkDerivation (rec {
|
||||
"-DLLVM_ENABLE_RTTI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
|
||||
"-DLLVM_TARGETS_TO_BUILD=${llvmBackendList enableTargets}"
|
||||
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
] ++ optionals enableSharedLibraries [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, python
|
||||
, libffi
|
||||
@@ -14,8 +15,6 @@
|
||||
, debugVersion ? false
|
||||
, enableManpages ? false
|
||||
, enableSharedLibraries ? true
|
||||
# Mesa requires AMDGPU target
|
||||
, enableTargets ? [ stdenv.hostPlatform stdenv.targetPlatform "AMDGPU" ]
|
||||
, enablePFM ? !stdenv.isDarwin
|
||||
}:
|
||||
|
||||
@@ -28,9 +27,6 @@ let
|
||||
shortVersion = with stdenv.lib;
|
||||
concatStringsSep "." (take 1 (splitString "." release_version));
|
||||
|
||||
inherit
|
||||
(import ../common.nix { inherit (stdenv) lib; })
|
||||
llvmBackendList;
|
||||
in stdenv.mkDerivation (rec {
|
||||
name = "llvm-${version}";
|
||||
|
||||
@@ -51,6 +47,24 @@ in stdenv.mkDerivation (rec {
|
||||
|
||||
propagatedBuildInputs = [ ncurses zlib ];
|
||||
|
||||
patches = [
|
||||
# https://bugs.llvm.org/show_bug.cgi?id=39427
|
||||
# https://github.com/NixOS/nixpkgs/issues/54370
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm-mirror/llvm/commit/57567def148f387153a8149fb590bd39b1b006a1.patch";
|
||||
sha256 = "1w1xg5pxpc6cals1nf5j5k4p6qi8lcrpvn0paxc86m415i79xmcg";
|
||||
})
|
||||
# backport, fix building rust crates with lto
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm-mirror/llvm/commit/da1fb72bb305d6bc1f3899d541414146934bf80f.patch";
|
||||
sha256 = "0p81gkhc1xhcx0hmnkwyhrn8x8l8fd24xgaj1whni29yga466dwc";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm-mirror/llvm/commit/cc1f2a595ead516812a6c50398f0f3480ebe031f.patch";
|
||||
sha256 = "0k6k1p5yisgwx417a67s7sr9930rqh1n0zv5jvply8vjjy4b3kf8";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = optionalString stdenv.isDarwin ''
|
||||
substituteInPlace cmake/modules/AddLLVM.cmake \
|
||||
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
|
||||
@@ -88,7 +102,6 @@ in stdenv.mkDerivation (rec {
|
||||
"-DLLVM_ENABLE_RTTI=ON"
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
|
||||
"-DLLVM_TARGETS_TO_BUILD=${llvmBackendList enableTargets}"
|
||||
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
|
||||
"-DLLVM_ENABLE_DUMP=ON"
|
||||
] ++ optionals enableSharedLibraries [
|
||||
@@ -134,7 +147,7 @@ in stdenv.mkDerivation (rec {
|
||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||
'';
|
||||
|
||||
doCheck = stdenv.isLinux && (!stdenv.isi686);
|
||||
doCheck = stdenv.isLinux && (!stdenv.isx86_32);
|
||||
|
||||
checkTarget = "check-all";
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{ lib }:
|
||||
|
||||
rec {
|
||||
llvmBackend = platform:
|
||||
if builtins.typeOf platform == "string" then
|
||||
platform
|
||||
else if platform.parsed.cpu.family == "x86" then
|
||||
"X86"
|
||||
else if platform.parsed.cpu.name == "aarch64" then
|
||||
"AArch64"
|
||||
else if platform.parsed.cpu.family == "arm" then
|
||||
"ARM"
|
||||
else if platform.parsed.cpu.family == "mips" then
|
||||
"Mips"
|
||||
else if platform.parsed.cpu.family == "power" then
|
||||
"PowerPC"
|
||||
else
|
||||
throw "Unsupported system";
|
||||
|
||||
llvmBackendList = platforms:
|
||||
lib.concatStringsSep ";" (map llvmBackend platforms);
|
||||
}
|
||||
@@ -1,11 +1,46 @@
|
||||
{ stdenv, lib, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, automake, graphviz
|
||||
, glib, libiconv, libintl, libtool, expat
|
||||
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, flex, bison, libxslt, autoconf, automake, autoreconfHook
|
||||
, graphviz, glib, libiconv, libintl, libtool, expat
|
||||
}:
|
||||
|
||||
let
|
||||
generic = { major, minor, sha256, extraNativeBuildInputs ? [], extraBuildInputs ? [] }:
|
||||
generic = lib.makeOverridable ({
|
||||
major, minor, sha256,
|
||||
extraNativeBuildInputs ? [],
|
||||
extraBuildInputs ? [],
|
||||
withGraphviz ? false
|
||||
}:
|
||||
let
|
||||
atLeast = lib.versionAtLeast "${major}.${minor}";
|
||||
|
||||
# Patches from the openembedded-core project to build vala without graphviz
|
||||
# support. We need to apply an additional patch to allow building when the
|
||||
# header file isn't available at all, but that patch (./gvc-compat.patch)
|
||||
# can be shared between all versions of Vala so far.
|
||||
graphvizPatch =
|
||||
let
|
||||
fp = { commit, sha256 }: fetchpatch {
|
||||
url = "https://github.com/openembedded/openembedded-core/raw/${commit}/meta/recipes-devtools/vala/vala/disable-graphviz.patch";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
in {
|
||||
"0.38" = fp {
|
||||
commit = "2c290f7253bba5ceb0d32e7d0b0ec0d0e81cc263";
|
||||
sha256 = "056ybapfx18d7xw1k8k85nsjrc26qk2q2d9v9nz2zrcwbq5brhkp";
|
||||
};
|
||||
|
||||
# NOTE: the openembedded-core project doesn't have a patch for 0.40.12
|
||||
# or 0.42.4 just yet; we've fixed the single merge conflict in the
|
||||
# patches below and checked them in here.
|
||||
# 0.40.12: https://github.com/openembedded/openembedded-core/raw/8553c52f174af4c8c433c543f806f5ed5c1ec48c/meta/recipes-devtools/vala/vala/disable-graphviz.patch
|
||||
# 0.42.4: https://github.com/openembedded/openembedded-core/raw/dfbbff39cfd413510abbd60930232a9c6b35d765/meta/recipes-devtools/vala/vala/disable-graphviz.patch
|
||||
"0.40" = ./disable-graphviz-0.40.12.patch;
|
||||
"0.42" = ./disable-graphviz-0.42.4.patch;
|
||||
|
||||
}.${major} or (throw "no graphviz patch for this version of vala");
|
||||
|
||||
disableGraphviz = atLeast "0.38" && !withGraphviz;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "vala-${version}";
|
||||
version = "${major}.${minor}";
|
||||
@@ -19,16 +54,24 @@ let
|
||||
patchShebangs tests
|
||||
'';
|
||||
|
||||
# If we're disabling graphviz, apply the patches and corresponding
|
||||
# configure flag. We also need to override the path to the valac compiler
|
||||
# so that it can be used to regenerate documentation.
|
||||
patches = lib.optionals disableGraphviz [ graphvizPatch ./gvc-compat.patch ];
|
||||
configureFlags = lib.optional disableGraphviz "--disable-graphviz";
|
||||
preBuild = lib.optional disableGraphviz "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")";
|
||||
|
||||
outputs = [ "out" "devdoc" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgconfig flex bison libxslt
|
||||
] ++ lib.optional (stdenv.isDarwin && (atLeast "0.38")) expat
|
||||
++ lib.optional disableGraphviz autoreconfHook # if we changed our ./configure script, need to reconfigure
|
||||
++ extraNativeBuildInputs;
|
||||
|
||||
buildInputs = [
|
||||
glib libiconv libintl
|
||||
] ++ lib.optional (atLeast "0.38") graphviz
|
||||
] ++ lib.optional (atLeast "0.38" && withGraphviz) graphviz
|
||||
++ extraBuildInputs;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -42,7 +85,7 @@ let
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ antono jtojnar lethalman peterhoeg ];
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
in rec {
|
||||
vala_0_36 = generic {
|
||||
|
||||
208
pkgs/development/compilers/vala/disable-graphviz-0.40.12.patch
Normal file
208
pkgs/development/compilers/vala/disable-graphviz-0.40.12.patch
Normal file
@@ -0,0 +1,208 @@
|
||||
diff --git i/configure.ac w/configure.ac
|
||||
index 694ffd200..915062053 100644
|
||||
--- i/configure.ac
|
||||
+++ w/configure.ac
|
||||
@@ -112,34 +112,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
|
||||
AC_SUBST(GMODULE_CFLAGS)
|
||||
AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
|
||||
-AC_MSG_CHECKING([for CGRAPH])
|
||||
-cgraph_tmp_LIBADD="$LIBADD"
|
||||
-cgraph_tmp_CFLAGS="$CFLAGS"
|
||||
-LIBADD="$LIBADD $LIBGVC_LIBS"
|
||||
-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
|
||||
-AC_RUN_IFELSE(
|
||||
- [AC_LANG_SOURCE([
|
||||
- #include <gvc.h>
|
||||
-
|
||||
- int main(void) {
|
||||
- #ifdef WITH_CGRAPH
|
||||
- return 0;
|
||||
- #else
|
||||
- return -1;
|
||||
- #endif
|
||||
- }
|
||||
- ])], [
|
||||
- AC_MSG_RESULT([yes])
|
||||
- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
|
||||
- have_cgraph=yes
|
||||
- ], [
|
||||
- AC_MSG_RESULT([no])
|
||||
- have_cgraph=no
|
||||
- ]
|
||||
-)
|
||||
-LIBADD="$cgraph_tmp_LIBADD"
|
||||
-CFLAGS="$cgraph_tmp_CFLAGS"
|
||||
+AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
|
||||
+if test x$enable_graphviz = xyes; then
|
||||
+ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
|
||||
+ AC_MSG_CHECKING([for CGRAPH])
|
||||
+ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
|
||||
+ cgraph_tmp_LIBADD="$LIBADD"
|
||||
+ cgraph_tmp_CFLAGS="$CFLAGS"
|
||||
+ LIBADD="$LIBADD $LIBGVC_LIBS"
|
||||
+ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
|
||||
+ AC_RUN_IFELSE(
|
||||
+ [AC_LANG_SOURCE([
|
||||
+ #include <gvc.h>
|
||||
+ int main(void) {
|
||||
+ #ifdef WITH_CGRAPH
|
||||
+ return 0;
|
||||
+ #else
|
||||
+ return -1;
|
||||
+ #endif
|
||||
+ }
|
||||
+ ])], [
|
||||
+ AC_MSG_RESULT([yes])
|
||||
+ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
|
||||
+ have_cgraph=yes
|
||||
+ ], [
|
||||
+ AC_MSG_RESULT([no])
|
||||
+ have_cgraph=no
|
||||
+ ]
|
||||
+ )
|
||||
+ LIBADD="$cgraph_tmp_LIBADD"
|
||||
+ CFLAGS="$cgraph_tmp_CFLAGS"
|
||||
+fi
|
||||
+AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
|
||||
AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
|
||||
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc], :)
|
||||
diff --git i/libvaladoc/Makefile.am w/libvaladoc/Makefile.am
|
||||
index f3f790e76..3c5dc4c80 100644
|
||||
--- i/libvaladoc/Makefile.am
|
||||
+++ w/libvaladoc/Makefile.am
|
||||
@@ -128,10 +128,6 @@ libvaladoc_la_VALASOURCES = \
|
||||
content/tablerow.vala \
|
||||
content/taglet.vala \
|
||||
content/text.vala \
|
||||
- charts/chart.vala \
|
||||
- charts/chartfactory.vala \
|
||||
- charts/hierarchychart.vala \
|
||||
- charts/simplechartfactory.vala \
|
||||
parser/manyrule.vala \
|
||||
parser/oneofrule.vala \
|
||||
parser/optionalrule.vala \
|
||||
@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
|
||||
highlighter/codetoken.vala \
|
||||
highlighter/highlighter.vala \
|
||||
html/basicdoclet.vala \
|
||||
- html/htmlchartfactory.vala \
|
||||
html/linkhelper.vala \
|
||||
html/cssclassresolver.vala \
|
||||
html/htmlmarkupwriter.vala \
|
||||
html/htmlrenderer.vala \
|
||||
$(NULL)
|
||||
|
||||
+if ENABLE_GRAPHVIZ
|
||||
+libvaladoc_la_VALASOURCES += \
|
||||
+ charts/chart.vala \
|
||||
+ charts/chartfactory.vala \
|
||||
+ charts/hierarchychart.vala \
|
||||
+ charts/simplechartfactory.vala \
|
||||
+ html/htmlchartfactory.vala \
|
||||
+ $(NULL)
|
||||
+
|
||||
+LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
|
||||
+endif
|
||||
+
|
||||
libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
|
||||
libvaladoc.vala.stamp \
|
||||
$(libvaladoc_la_VALASOURCES:.vala=.c) \
|
||||
@@ -184,11 +191,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
|
||||
--library valadoc \
|
||||
--vapi valadoc@PACKAGE_SUFFIX@.vapi \
|
||||
--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
|
||||
- --vapidir $(top_srcdir)/vapi --pkg libgvc \
|
||||
--vapidir $(top_srcdir)/gee --pkg gee \
|
||||
--vapidir $(top_srcdir)/vala --pkg vala \
|
||||
--vapidir $(top_srcdir)/ccode --pkg ccode \
|
||||
--vapidir $(top_srcdir)/codegen --pkg codegen \
|
||||
+ $(LIBGVC_PKG) \
|
||||
--pkg config \
|
||||
$(filter %.vala %.c,$^)
|
||||
touch $@
|
||||
@@ -217,6 +224,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
|
||||
|
||||
valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
|
||||
cp $< $@
|
||||
+if !ENABLE_GRAPHVIZ
|
||||
+ sed -i "s/libgvc //g" $@
|
||||
+endif
|
||||
|
||||
vapidir = $(datadir)/vala/vapi
|
||||
dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
|
||||
@@ -224,6 +234,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
|
||||
|
||||
valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
|
||||
cp $< $@
|
||||
+if !ENABLE_GRAPHVIZ
|
||||
+ sed -i "s/libgvc//g" $@
|
||||
+endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(libvaladoc_la_VALASOURCES) \
|
||||
diff --git i/libvaladoc/html/basicdoclet.vala w/libvaladoc/html/basicdoclet.vala
|
||||
index 192e488cd..ec0960222 100644
|
||||
--- i/libvaladoc/html/basicdoclet.vala
|
||||
+++ w/libvaladoc/html/basicdoclet.vala
|
||||
@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
protected HtmlRenderer _renderer;
|
||||
protected Html.MarkupWriter writer;
|
||||
protected Html.CssClassResolver cssresolver;
|
||||
+#if HAVE_GRAPHVIZ
|
||||
protected Charts.Factory image_factory;
|
||||
+#else
|
||||
+ protected void* image_factory;
|
||||
+#endif
|
||||
protected ErrorReporter reporter;
|
||||
protected string package_list_link = "../index.html";
|
||||
|
||||
@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
this.linker = new LinkHelper ();
|
||||
|
||||
_renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
|
||||
+#if HAVE_GRAPHVIZ
|
||||
this.image_factory = new SimpleChartFactory (settings, linker);
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1026,6 +1032,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
}
|
||||
|
||||
protected void write_image_block (Api.Node element) {
|
||||
+#if HAVE_GRAPHVIZ
|
||||
if (element is Class || element is Interface || element is Struct) {
|
||||
unowned string format = (settings.use_svg_images ? "svg" : "png");
|
||||
var chart = new Charts.Hierarchy (image_factory, element);
|
||||
@@ -1045,6 +1052,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
this.get_img_path_html (element, format)});
|
||||
writer.add_usemap (chart);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
public void write_namespace_content (Namespace node, Api.Node? parent) {
|
||||
diff --git i/libvaladoc/html/htmlmarkupwriter.vala w/libvaladoc/html/htmlmarkupwriter.vala
|
||||
index dcc4dad76..cf9c860b8 100644
|
||||
--- i/libvaladoc/html/htmlmarkupwriter.vala
|
||||
+++ w/libvaladoc/html/htmlmarkupwriter.vala
|
||||
@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
|
||||
}
|
||||
}
|
||||
|
||||
+#if HAVE_GRAPHVIZ
|
||||
public MarkupWriter add_usemap (Charts.Chart chart) {
|
||||
string? buf = (string?) chart.write_buffer ("cmapx");
|
||||
if (buf != null) {
|
||||
raw_text ("\n");
|
||||
raw_text ((!) buf);
|
||||
}
|
||||
+#else
|
||||
+ public MarkupWriter add_usemap (void* chart) {
|
||||
+#endif
|
||||
|
||||
return this;
|
||||
}
|
||||
208
pkgs/development/compilers/vala/disable-graphviz-0.42.4.patch
Normal file
208
pkgs/development/compilers/vala/disable-graphviz-0.42.4.patch
Normal file
@@ -0,0 +1,208 @@
|
||||
diff --git i/configure.ac w/configure.ac
|
||||
index 730c72d7b..af8198637 100644
|
||||
--- i/configure.ac
|
||||
+++ w/configure.ac
|
||||
@@ -119,34 +119,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
|
||||
AC_SUBST(GMODULE_CFLAGS)
|
||||
AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
|
||||
-AC_MSG_CHECKING([for CGRAPH])
|
||||
-cgraph_tmp_LIBADD="$LIBADD"
|
||||
-cgraph_tmp_CFLAGS="$CFLAGS"
|
||||
-LIBADD="$LIBADD $LIBGVC_LIBS"
|
||||
-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
|
||||
-AC_RUN_IFELSE(
|
||||
- [AC_LANG_SOURCE([
|
||||
- #include <gvc.h>
|
||||
-
|
||||
- int main(void) {
|
||||
- #ifdef WITH_CGRAPH
|
||||
- return 0;
|
||||
- #else
|
||||
- return -1;
|
||||
- #endif
|
||||
- }
|
||||
- ])], [
|
||||
- AC_MSG_RESULT([yes])
|
||||
- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
|
||||
- have_cgraph=yes
|
||||
- ], [
|
||||
- AC_MSG_RESULT([no])
|
||||
- have_cgraph=no
|
||||
- ]
|
||||
-)
|
||||
-LIBADD="$cgraph_tmp_LIBADD"
|
||||
-CFLAGS="$cgraph_tmp_CFLAGS"
|
||||
+AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
|
||||
+if test x$enable_graphviz = xyes; then
|
||||
+ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
|
||||
+ AC_MSG_CHECKING([for CGRAPH])
|
||||
+ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
|
||||
+ cgraph_tmp_LIBADD="$LIBADD"
|
||||
+ cgraph_tmp_CFLAGS="$CFLAGS"
|
||||
+ LIBADD="$LIBADD $LIBGVC_LIBS"
|
||||
+ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
|
||||
+ AC_RUN_IFELSE(
|
||||
+ [AC_LANG_SOURCE([
|
||||
+ #include <gvc.h>
|
||||
+ int main(void) {
|
||||
+ #ifdef WITH_CGRAPH
|
||||
+ return 0;
|
||||
+ #else
|
||||
+ return -1;
|
||||
+ #endif
|
||||
+ }
|
||||
+ ])], [
|
||||
+ AC_MSG_RESULT([yes])
|
||||
+ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
|
||||
+ have_cgraph=yes
|
||||
+ ], [
|
||||
+ AC_MSG_RESULT([no])
|
||||
+ have_cgraph=no
|
||||
+ ]
|
||||
+ )
|
||||
+ LIBADD="$cgraph_tmp_LIBADD"
|
||||
+ CFLAGS="$cgraph_tmp_CFLAGS"
|
||||
+fi
|
||||
+AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
|
||||
AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
|
||||
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc], :)
|
||||
diff --git i/libvaladoc/Makefile.am w/libvaladoc/Makefile.am
|
||||
index f3f790e76..3c5dc4c80 100644
|
||||
--- i/libvaladoc/Makefile.am
|
||||
+++ w/libvaladoc/Makefile.am
|
||||
@@ -128,10 +128,6 @@ libvaladoc_la_VALASOURCES = \
|
||||
content/tablerow.vala \
|
||||
content/taglet.vala \
|
||||
content/text.vala \
|
||||
- charts/chart.vala \
|
||||
- charts/chartfactory.vala \
|
||||
- charts/hierarchychart.vala \
|
||||
- charts/simplechartfactory.vala \
|
||||
parser/manyrule.vala \
|
||||
parser/oneofrule.vala \
|
||||
parser/optionalrule.vala \
|
||||
@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
|
||||
highlighter/codetoken.vala \
|
||||
highlighter/highlighter.vala \
|
||||
html/basicdoclet.vala \
|
||||
- html/htmlchartfactory.vala \
|
||||
html/linkhelper.vala \
|
||||
html/cssclassresolver.vala \
|
||||
html/htmlmarkupwriter.vala \
|
||||
html/htmlrenderer.vala \
|
||||
$(NULL)
|
||||
|
||||
+if ENABLE_GRAPHVIZ
|
||||
+libvaladoc_la_VALASOURCES += \
|
||||
+ charts/chart.vala \
|
||||
+ charts/chartfactory.vala \
|
||||
+ charts/hierarchychart.vala \
|
||||
+ charts/simplechartfactory.vala \
|
||||
+ html/htmlchartfactory.vala \
|
||||
+ $(NULL)
|
||||
+
|
||||
+LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
|
||||
+endif
|
||||
+
|
||||
libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
|
||||
libvaladoc.vala.stamp \
|
||||
$(libvaladoc_la_VALASOURCES:.vala=.c) \
|
||||
@@ -184,11 +191,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
|
||||
--library valadoc \
|
||||
--vapi valadoc@PACKAGE_SUFFIX@.vapi \
|
||||
--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
|
||||
- --vapidir $(top_srcdir)/vapi --pkg libgvc \
|
||||
--vapidir $(top_srcdir)/gee --pkg gee \
|
||||
--vapidir $(top_srcdir)/vala --pkg vala \
|
||||
--vapidir $(top_srcdir)/ccode --pkg ccode \
|
||||
--vapidir $(top_srcdir)/codegen --pkg codegen \
|
||||
+ $(LIBGVC_PKG) \
|
||||
--pkg config \
|
||||
$(filter %.vala %.c,$^)
|
||||
touch $@
|
||||
@@ -217,6 +224,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
|
||||
|
||||
valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
|
||||
cp $< $@
|
||||
+if !ENABLE_GRAPHVIZ
|
||||
+ sed -i "s/libgvc //g" $@
|
||||
+endif
|
||||
|
||||
vapidir = $(datadir)/vala/vapi
|
||||
dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
|
||||
@@ -224,6 +234,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
|
||||
|
||||
valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
|
||||
cp $< $@
|
||||
+if !ENABLE_GRAPHVIZ
|
||||
+ sed -i "s/libgvc//g" $@
|
||||
+endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(libvaladoc_la_VALASOURCES) \
|
||||
diff --git i/libvaladoc/html/basicdoclet.vala w/libvaladoc/html/basicdoclet.vala
|
||||
index 192e488cd..ec0960222 100644
|
||||
--- i/libvaladoc/html/basicdoclet.vala
|
||||
+++ w/libvaladoc/html/basicdoclet.vala
|
||||
@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
protected HtmlRenderer _renderer;
|
||||
protected Html.MarkupWriter writer;
|
||||
protected Html.CssClassResolver cssresolver;
|
||||
+#if HAVE_GRAPHVIZ
|
||||
protected Charts.Factory image_factory;
|
||||
+#else
|
||||
+ protected void* image_factory;
|
||||
+#endif
|
||||
protected ErrorReporter reporter;
|
||||
protected string package_list_link = "../index.html";
|
||||
|
||||
@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
this.linker = new LinkHelper ();
|
||||
|
||||
_renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
|
||||
+#if HAVE_GRAPHVIZ
|
||||
this.image_factory = new SimpleChartFactory (settings, linker);
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1026,6 +1032,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
}
|
||||
|
||||
protected void write_image_block (Api.Node element) {
|
||||
+#if HAVE_GRAPHVIZ
|
||||
if (element is Class || element is Interface || element is Struct) {
|
||||
unowned string format = (settings.use_svg_images ? "svg" : "png");
|
||||
var chart = new Charts.Hierarchy (image_factory, element);
|
||||
@@ -1045,6 +1052,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
|
||||
this.get_img_path_html (element, format)});
|
||||
writer.add_usemap (chart);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
public void write_namespace_content (Namespace node, Api.Node? parent) {
|
||||
diff --git i/libvaladoc/html/htmlmarkupwriter.vala w/libvaladoc/html/htmlmarkupwriter.vala
|
||||
index 5aa4afdea..e79b0b8f5 100644
|
||||
--- i/libvaladoc/html/htmlmarkupwriter.vala
|
||||
+++ w/libvaladoc/html/htmlmarkupwriter.vala
|
||||
@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
|
||||
}
|
||||
}
|
||||
|
||||
+#if HAVE_GRAPHVIZ
|
||||
public unowned MarkupWriter add_usemap (Charts.Chart chart) {
|
||||
string? buf = (string?) chart.write_buffer ("cmapx");
|
||||
if (buf != null) {
|
||||
raw_text ("\n");
|
||||
raw_text ((!) buf);
|
||||
}
|
||||
+#else
|
||||
+ public unowned MarkupWriter add_usemap (void* chart) {
|
||||
+#endif
|
||||
|
||||
return this;
|
||||
}
|
||||
19
pkgs/development/compilers/vala/gvc-compat.patch
Normal file
19
pkgs/development/compilers/vala/gvc-compat.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
diff --git i/libvaladoc/Makefile.am w/libvaladoc/Makefile.am
|
||||
index 8dc398cf1..a5d8a45b4 100644
|
||||
--- i/libvaladoc/Makefile.am
|
||||
+++ w/libvaladoc/Makefile.am
|
||||
@@ -176,9 +176,13 @@ endif
|
||||
libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
|
||||
libvaladoc.vala.stamp \
|
||||
$(libvaladoc_la_VALASOURCES:.vala=.c) \
|
||||
- gvc-compat.c \
|
||||
$(NULL)
|
||||
|
||||
+if ENABLE_GRAPHVIZ
|
||||
+libvaladoc@PACKAGE_SUFFIX@_la_SOURCES += \
|
||||
+ gvc-compat.c
|
||||
+endif
|
||||
+
|
||||
valadoc@PACKAGE_SUFFIX@.vapi valadoc.h: libvaladoc.vala.stamp
|
||||
libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
|
||||
$(VALA_V)$(VALAC) \
|
||||
Reference in New Issue
Block a user