Created attachment 233378 [details]
Fix build with upcoming autoconf 2.71.
Why is this not only required for the DOCS option?
Created attachment 233381 [details]
Updated patch file
Add textproc/gtk-doc to BUILD_DEPENDS only if DOCS option is enabled.
(In reply to Tobias C. Berner from comment #1)
Oops, I overlooked it. Thanks for pointing out.
I think you'll have to patch out GTK_DOC_CHECK from configure.ac in a post-patch-DOCS-off target or something if you want to make the dependency optional. I see that several post-patch commands touch configure and Makefile.in which doesn't make sense when using autoreconf because the changes are lost when these files are regenerated.
Created attachment 233384 [details]
Updated patch file
(In reply to Tijl Coosemans from comment #5)
Remove post-patch-DOCS-off target and most of oparations in post-patch target.
Though I don't know why these oparations are (or were?) necessary, I understand the results are overwrote when autoreconf is invoked at configure phase. So if this port works fine now, we can safely remove them. Right?
Created attachment 233744 [details]
I believe this addresses all the issues with patching. The post-patch commands that are still useful have been converted to real patches.
Old patches have been removed:
- patch-perf_cairo-perf-micro.c and patch-test_Makefile.am
These were added to fix build after the addition of USES=autoreconf broke post-patch commands that disabled the perf and test directories.
No idea why this exists. make test (if you enable it) checks that there's no #if defined in the headers so I think it's best to remove it.
Old patch from Arch Linux that they have removed in 2012.
The code defines MAP_NORESERVE to zero now if it's undefined.
This has been build tested with autoconf 2.69 and 2.71, but I think it would be best to do an exp-run before committing this, so I'll include it in the autoconf exp-run.
A commit in branch main references this bug:
Author: Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2022-05-04 14:29:21 +0000
Commit: Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2022-05-27 09:11:04 +0000
graphics/cairo: prepare for autoconf 2.71
- configure.ac contains GTK_DOC_CHECK and the new autoreconf runs
gtkdocize in that case so add a build dependency.
- fix post-patch commands that patch files which are regenerated by
- remove old patches while here.
graphics/cairo/Makefile | 28 +++++++--------------
graphics/cairo/files/patch-Makefile.am (new) | 10 ++++++++
.../files/patch-build_configure.ac.system (new) | 17 +++++++++++++
graphics/cairo/files/patch-configure.ac (new) | 11 ++++++++
.../files/patch-perf_cairo-perf-micro.c (gone) | 10 --------
graphics/cairo/files/patch-src_cairo-gl.h (gone) | 29 ----------------------
.../files/patch-src_cairo-xlib-display.c (gone) | 14 -----------
graphics/cairo/files/patch-test_Makefile.am (gone) | 14 -----------
.../files/patch-util_cairo-sphinx_sphinx.c (gone) | 11 --------
9 files changed, 47 insertions(+), 97 deletions(-)