From f8c54f06bd39d54c1068c65dd286adbb793be028 Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 22 Sep 2025 08:24:53 +0000 Subject: [PATCH] libexpat: fix version line in expat.pc The last expat update introduced whitespace between # and define, which resulted in a bogus 'Version: ..' line in expat.pc. Teach the regex about such whitespace. Unbreaks the build of graphics/rawtherapee. ok matthieu --- lib/libexpat/generate_pkgconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libexpat/generate_pkgconfig.sh b/lib/libexpat/generate_pkgconfig.sh index f2a9a6f75e4..879f4ce36e7 100644 --- a/lib/libexpat/generate_pkgconfig.sh +++ b/lib/libexpat/generate_pkgconfig.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: generate_pkgconfig.sh,v 1.2 2012/07/07 08:25:21 jasper Exp $ +# $OpenBSD: generate_pkgconfig.sh,v 1.3 2025/09/22 08:24:53 tb Exp $ # # Copyright (c) 2010-2012 Jasper Lievisse Adriaanse # @@ -50,9 +50,9 @@ if [ ! -w "${objdir}" ]; then exit 1 fi -version_major_re="s/#define[[:blank:]]XML_MAJOR_VERSION[[:blank:]](.*)/\1/p" -version_minor_re="s/#define[[:blank:]]XML_MINOR_VERSION[[:blank:]](.*)/\1/p" -version_micro_re="s/#define[[:blank:]]XML_MICRO_VERSION[[:blank:]](.*)/\1/p" +version_major_re="s/#[[:blank:]]*define[[:blank:]]XML_MAJOR_VERSION[[:blank:]](.*)/\1/p" +version_minor_re="s/#[[:blank:]]*define[[:blank:]]XML_MINOR_VERSION[[:blank:]](.*)/\1/p" +version_micro_re="s/#[[:blank:]]*define[[:blank:]]XML_MICRO_VERSION[[:blank:]](.*)/\1/p" version_file=${curdir}/lib/expat.h lib_version=$(sed -nE ${version_major_re} ${version_file}).$(sed -nE ${version_minor_re} ${version_file}).$(sed -nE ${version_micro_re} ${version_file})