Upstream status: submitted to bug-libextractor@gnu.org. From 1fc6daaeaf829fb941a176831c011888a73c43b9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 11 Mar 2024 09:36:26 -0400 Subject: [PATCH] html_extractor: Add support for modern tidy-html. * configure.ac: Use PKG_PROG_PKG_CONFIG to initialize pkg-config detection. : Check for library via pkg-config. * src/plugins/html_extractor.c: Standardize tidy include file names. --- configure.ac | 28 +++++++++------------------- src/plugins/html_extractor.c | 4 ++-- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index d17ff39..e89d70c 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,8 @@ AS_CASE(["$target_os"], AM_ICONV +PKG_PROG_PKG_CONFIG() + # We define the paths here, because MinGW/GCC expands paths # passed through the command line ("-DLOCALEDIR=..."). This would # lead to hard-coded paths ("C:\mingw\mingw\bin...") that do @@ -424,25 +426,13 @@ AC_CHECK_LIB(magic, magic_open, AM_CONDITIONAL(HAVE_MAGIC, false))], AM_CONDITIONAL(HAVE_MAGIC, false)) -AC_MSG_CHECKING(for tidyNodeGetValue -ltidy) -AC_LANG_PUSH(C++) -SAVED_LIBS=$LIBS -LIBS="$LIBS -ltidy" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[ Bool b = tidyNodeGetValue (NULL, NULL, NULL); ]])], - [AC_MSG_RESULT(yes) - AM_CONDITIONAL(HAVE_TIDY, true) - AC_DEFINE(HAVE_TIDY,1,[Have tidyNodeGetValue in libtidy])], - [AC_MSG_RESULT(no) - AM_CONDITIONAL(HAVE_TIDY, false)]) -LIBS=$SAVED_LIBS -AC_LANG_POP(C++) - -# restore LIBS -LIBS=$LIBSOLD - - +dnl tidyNodeGetValue was already available in 5.0.0, released in 2015. +PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0], + [AC_DEFINE(HAVE_TIDY, 1, [Have tidy]) + AM_CONDITIONAL(HAVE_TIDY, true)], + [AM_CONDITIONAL(HAVE_TIDY, false)]) +CFLAGS="$CFLAGS $TIDY_CFLAGS" +LIBS="$LIBS $TIDY_LIBS" # should 'make check' run tests? AC_MSG_CHECKING(whether to run tests) diff --git a/src/plugins/html_extractor.c b/src/plugins/html_extractor.c index 5ebf97b..88100d3 100644 --- a/src/plugins/html_extractor.c +++ b/src/plugins/html_extractor.c @@ -26,8 +26,8 @@ #include "platform.h" #include "extractor.h" #include -#include -#include +#include +#include /** * Mapping of HTML META names to LE types. base-commit: a75f40b64b5868967c95ea214e8eaac4f7088b23 -- 2.41.0 a>)Author 2022-10-22Remove now unnecessary uses of (guix grafts)....These modules would use (guix grafts) just to access '%graft?' and related bindings, which are now in (guix store). * gnu/ci.scm, guix/gexp.scm, guix/lint.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/deploy.scm, guix/scripts/environment.scm, guix/scripts/home.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/pull.scm, guix/scripts/size.scm, guix/scripts/system.scm, guix/scripts/weather.scm, tests/builders.scm, tests/channels.scm, tests/cpan.scm, tests/derivations.scm, tests/gexp.scm, tests/graph.scm, tests/guix-daemon.sh, tests/monads.scm, tests/pack.scm, tests/packages.scm, tests/profiles.scm, tests/system.scm: Remove #:use-module (guix grafts). Ludovic Courtès 2022-06-15system: <operating-system> compiler truly honors the 'system' argument....Fixes <https://issues.guix.gnu.org/55951>. * gnu/system.scm (operating-system-compiler): Parameterize '%current-system' and '%current-target-system' before calling 'operating-system-derivation'. * tests/system.scm ("lower-object, %current-system sensitivity"): New test. Ludovic Courtès 2021-08-29Migrate to the new 'targets' field of bootloader-configuration....The old 'target' field is deprecated; adjust the sources to use the new 'targets' one instead. * doc/guix-cookbook.texi<target>: Replace by 'targets'. * gnu/bootloader/grub.scm: Likewise. * gnu/installer/parted.scm: Likewise. * gnu/machine/digital-ocean.scm: Likewise. * gnu/system/examples/asus-c201.tmpl: Likewise * gnu/system/examples/bare-bones.tmpl: Likewise * gnu/system/examples/bare-hurd.tmpl: Likewise * gnu/system/examples/beaglebone-black.tmpl: Likewise * gnu/system/examples/desktop.tmpl: Likewise * gnu/system/examples/docker-image.tmpl: Likewise * gnu/system/examples/lightweight-desktop.tmpl: Likewise * gnu/system/examples/vm-image.tmpl: Likewise * gnu/system/examples/yggdrasil.tmpl: Likewise * gnu/system/hurd.scm: Likewise * gnu/system/images/hurd.scm: Likewise * gnu/system/images/novena.scm: Likewise * gnu/system/images/pine64.scm: Likewise * gnu/system/images/pinebook-pro.scm: Likewise * gnu/system/images/rock64.scm: Likewise * gnu/system/install.scm: Likewise * gnu/system/vm.scm: Likewise * gnu/tests.scm: Likewise * gnu/tests/ganeti.scm: Likewise * gnu/tests/install.scm: Likewise * gnu/tests/nfs.scm: Likewise * gnu/tests/telephony.scm: Likewise * tests/boot-parameters.scm: Likewise * tests/system.scm: Likewise Maxim Cournoyer