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 2021-12-19home: Add gexp-compiler for home-environments....* gnu/home.scm (home-environment-compiler): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Andrew Tropin 2021-10-09Move (gnu home-services) to (gnu home services)....* gnu/home-services.scm (%guix-home-root-directory): Replace gnu/home-services.scm with "gnu/home/services.scm". Rename to gnu/home/services.scm. * gnu/local.mk (GNU_SYSTEM_MODULES): Rename gnu/home-services.scm to gnu/home/services.scm. * doc/he-config-bare-bones.scm: Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Same. * gnu/home/services/fontutils.scm: Same. * gnu/home/services/mcron.scm: Same. * gnu/home/services/shells.scm: Same. * gnu/home/services/shepherd.scm: Same. * gnu/home/services/symlink-manager.scm: Same. * gnu/home/services/xdg.scm: Same. * guix/scripts/home.scm: Same. * guix/self.scm: Same. Oleg Pykhalov 2021-10-08gnu: Move (gnu home-services) to (gnu home services)....* gnu/home-services/configuration.scm: Move the content ... * gnu/home/services/configuration.scm: ... here. * doc/guix.texi: Replace (gnu home-services mcron) with (gnu home services mcron). Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Replace (gnu home-services fontutils) with (gnu services fontutils). Replace (gnu home-services shells) with (gnu home services shells). Replace (gnu home-services symlink-manager) with (gnu home services symlink-manager). Replace (gnu home-services xdg) with (gnu home services xdg). * gnu/home-services/fontutils.scm: Rename to gnu/services/fontutils.scm. * gnu/home-services/mcron.scm: Move to gnu/home/services/mcron.scm. Replace (gnu home-services shepherd) with (gnu home services shepherd). * gnu/home-services.scm (%service-type-path): Search home services in "gnu/services". * gnu/home-services/shells.scm: Replace (gnu home-services configuration) with (gnu home services configuration). Rename to gnu/home/services/shells.scm. Replace (gnu home-services utils) with (gnu home services utils). * gnu/home-services/shepherd.scm: Move to gnu/home/services/shepherd.scm. * gnu/home-services/symlink-manager.scm: Rename to gnu/home/services/symlink-manager.scm. * gnu/home-services/utils.scm: Rename to gnu/home/services/utils.scm. * gnu/home-services/xdg.scm: Rename to gnu/home/services/xdg.scm. * guix/scripts/home/import.scm: Replace (gnu home-services bash) with (gnu home services bash). * gnu/home-services.scm: Update documentation string. * doc/he-config-bare-bones.scm: Apply new (gnu home-services ...) modules location. * gnu/local.mk (GNU_SYSTEM_MODULES): Same. Oleg Pykhalov 2021-09-09gnu: home: Add doc comment about the module....Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com> Andrew Tropin 2021-09-09home: Add home-environment....* gnu/home.scm (home-environment, home-environment?, this-home-environment) (home-environment-derivation, home-environment-user-services) (home-environment-essential-services, home-environment-services) (home-environment-location, home-environment-with-provenance): New variables. * gnu/local.mk (GNU_SYSTEM_MODULES): Add home.scm. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com> Andrew Tropin