Skip to content

Commit e0a849f

Browse files
authored
Fixed github build on macos #2398 (#2436)
1 parent ae9a610 commit e0a849f

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

build-scripts/for-osx/prepare-osx.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ brew link --overwrite pkg-config
99
cmake --version || brew install cmake
1010

1111
brew install \
12+
docbook \
1213
docbook-xsl \
1314
fftw wavpack \
1415
gettext \

cmake/BuildHelp.cmake

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright 2006 Milan Digital Audio LLC
2-
# Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
2+
# Copyright 2009-2026 GrandOrgue contributors (see AUTHORS)
33
# License GPL-2.0 or later
44
# (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
55

@@ -26,9 +26,14 @@ function(BUILD_HELPFILE xmlfile VARIANT)
2626
SET(_ImgList ${_ImgList} ${BUILDDIR}/images/${IMG_NAME})
2727
ENDFOREACH()
2828

29-
ADD_CUSTOM_COMMAND(OUTPUT ${BUILDDIR}/GrandOrgue.hhp COMMAND ${XSLTPROC}
30-
ARGS --path ${DOCBOOK_PATH}/htmlhelp ${SRCDIR}/grandorgue.xsl ${xmlfile}
31-
WORKING_DIRECTORY ${BUILDDIR} DEPENDS ${SRCDIR}/grandorgue.xsl ${xmlfile})
29+
if(XML_CATALOG_FILE)
30+
set(_CatalogArgs "XML_CATALOG_FILES=${XML_CATALOG_FILE}")
31+
endif()
32+
ADD_CUSTOM_COMMAND(OUTPUT ${BUILDDIR}/GrandOrgue.hhp
33+
COMMAND ${CMAKE_COMMAND} -E env ${_CatalogArgs}
34+
${XSLTPROC} --path ${DOCBOOK_PATH}/htmlhelp ${SRCDIR}/grandorgue.xsl ${xmlfile}
35+
WORKING_DIRECTORY ${BUILDDIR}
36+
DEPENDS ${SRCDIR}/grandorgue.xsl ${xmlfile})
3237

3338
ADD_CUSTOM_COMMAND(OUTPUT ${HELPDIR}/GrandOrgue${VARIANT}.htb COMMAND ${ZIP}
3439
ARGS -r -X --filesync ${HELPDIR}/GrandOrgue${VARIANT}.htb * WORKING_DIRECTORY ${BUILDDIR}

cmake/FindTools.cmake

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright 2006 Milan Digital Audio LLC
2-
# Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
2+
# Copyright 2009-2026 GrandOrgue contributors (see AUTHORS)
33
# License GPL-2.0 or later
44
# (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
55

@@ -40,6 +40,17 @@ IF (NOT PO4A_TRANSLATE)
4040
MESSAGE(STATUS "po4a-translate not found (package po4a)")
4141
ENDIF()
4242

43+
FIND_FILE(XML_CATALOG_FILE catalog
44+
PATHS
45+
/opt/homebrew/etc/xml # macOS Homebrew arm64
46+
/usr/local/etc/xml # macOS Homebrew x86
47+
/etc/xml # Linux
48+
NO_DEFAULT_PATH
49+
)
50+
IF (NOT XML_CATALOG_FILE)
51+
MESSAGE(STATUS "XML catalog not found - xsltproc may fail to resolve DocBook entities")
52+
ENDIF()
53+
4354
IF(CMAKE_CROSSCOMPILING)
4455
SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Point it to the export file from a native build")
4556
INCLUDE(${IMPORT_EXECUTABLES})

help/grandorgue.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='UTF-8'?>
2-
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
2+
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
33
<book lang="en">
44
<!--
55
Copyright 2006 Milan Digital Audio LLC

0 commit comments

Comments
 (0)