community/dvdauthor: use .pc to detect libxml

for some reason, the other detection utilising m4 has m4 allocate in a loop until oom
This commit is contained in:
psykose 2023-04-29 06:12:53 +00:00
parent 0a407f3a05
commit d9a59940b7
2 changed files with 80 additions and 1 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dvdauthor
pkgver=0.7.2
pkgrel=8
pkgrel=9
pkgdesc="DVD authoring tools"
url="https://dvdauthor.sourceforge.net/"
arch="all"
@ -20,6 +20,7 @@ makedepends="
"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
libxml-pc.patch
pkgconfig-1.patch
"
builddir="$srcdir/$pkgname"
@ -48,5 +49,6 @@ package() {
sha512sums="
202b8bba38939d122dc864921a57e89906ca99ddabf44e3b07419cc42cc052567cd892b41f1171c9c195c9a770758e9319a942ea64d14ee8fa847588c7761125 dvdauthor-0.7.2.tar.gz
47e6141afa6321c12b73dbedcef6b1ccd6274528af3fc9bddf85fc7f43b9673b8db93f1341c3c9b205d19468b93f38847189fc04fa433848936558de3b0306c8 libxml-pc.patch
3dd640f1569d4d99c1ef67f8515c06b04bf9b23e6aa98ca7642735a8e01d22fed507b328c7c6a9b7797e1e76e827fd4da59fec214eba57b9595dfba2e619dc8c pkgconfig-1.patch
"

View File

@ -0,0 +1,77 @@
From 45705ece5ec5d7d6b9ab3e7a68194796a398e855 Mon Sep 17 00:00:00 2001
From: Hugh McMaster <hugh.mcmaster@outlook.com>
Date: Wed, 26 Feb 2020 23:44:23 +1100
Subject: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library
---
configure.ac | 8 +++-----
src/Makefile.am | 8 ++++----
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index f4b270f..f4e1715 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,8 @@ LT_INIT
AC_PROG_INSTALL
+PKG_PROG_PKG_CONFIG
+
AC_SYS_LARGEFILE
AC_HEADER_STDBOOL
@@ -100,6 +102,7 @@ else
AC_MSG_ERROR([freetype not found])
fi
+PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.6.0])
AC_ARG_ENABLE([default-video-format],
AS_HELP_STRING([--enable-default-video-format=format], [specify a default video format, either NTSC or PAL, to be used if no configuration or input setting is given]),
@@ -135,11 +138,6 @@ dnl AM_LANGINFO_CODESET
AM_ICONV
-ifdef([AM_PATH_XML2],
- [AM_PATH_XML2(2.6.0, , AC_MSG_ERROR([You must have libxml2 >= 2.6.0 installed]))],
- [errprint([You must have libxml2 (>= 2.6.0) installed
-])m4_exit(1)AC_MSG_ERROR([You must have libxml2 (>= 2.6.0) installed])])
-
AC_CHECK_DECLS(O_BINARY, , , [ #include <fcntl.h> ] )
AC_OUTPUT(Makefile doc/Makefile src/Makefile)
diff --git a/src/Makefile.am b/src/Makefile.am
index c7f89a9..37b3fd1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,7 +8,7 @@ endif
nodist_bin_SCRIPTS = dvddirdel
AM_CPPFLAGS = -DSYSCONFDIR="\"$(sysconfdir)\"" \
- @XML_CPPFLAGS@ @MAGICK_CPPFLAGS@ @FREETYPE_CPPFLAGS@ @FRIBIDI_CFLAGS@ @FONTCONFIG_CFLAGS@
+ @XML2_CFLAGS@ @MAGICK_CPPFLAGS@ @FREETYPE_CPPFLAGS@ @FRIBIDI_CFLAGS@ @FONTCONFIG_CFLAGS@
AM_CFLAGS = -Wall
dvdauthor_SOURCES = dvdauthor.c common.h dvdauthor.h da-internal.h \
@@ -16,17 +16,17 @@ dvdauthor_SOURCES = dvdauthor.c common.h dvdauthor.h da-internal.h \
dvdifo.c dvdvob.c dvdpgc.c \
dvdcli.c readxml.c readxml.h \
conffile.c conffile.h compat.c compat.h rgb.h
-dvdauthor_LDADD = $(LIBICONV) $(XML_LIBS)
+dvdauthor_LDADD = $(LIBICONV) $(XML2_LIBS)
dvdunauthor_SOURCES = dvdunauthor.c dvduncompile.c common.h dvduncompile.h compat.c compat.h
-dvdunauthor_LDADD = $(XML_LIBS) $(LIBICONV) -ldvdread
+dvdunauthor_LDADD = $(XML2_LIBS) $(LIBICONV) -ldvdread
spumux_SOURCES = subgen.c subgen.h rgb.h \
subgen-parse-xml.c readxml.c readxml.h \
subgen-encode.c subgen-image.c subglobals.h \
conffile.c conffile.h compat.c compat.h common.h \
subrender.c subrender.h subreader.c subreader.h subfont.c subfont.h
-spumux_LDADD = $(XML_LIBS) $(MAGICK_LIBS) $(FREETYPE_LIBS) \
+spumux_LDADD = $(XML2_LIBS) $(MAGICK_LIBS) $(FREETYPE_LIBS) \
$(FRIBIDI_LIBS) $(FONTCONFIG_LIBS) $(LIBICONV) -lm
spuunmux_SOURCES = spuunmux.c rgb.h compat.c compat.h common.h conffile.h conffile.c