-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doxygen: fix doc compilation with Doxygen 1.10 or later (#8665)
- Introduce container images for Doxygen. - Ensure compatibility with Doxygen 1.10 and later. - Revert previous stylesheet changes to restore the correct stylesheet path (reverts #8331).
- Loading branch information
Showing
20 changed files
with
227 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Use an official Fedora as a parent image for the build stage | ||
FROM fedora:latest AS sources_deps | ||
|
||
# Set environment variables to non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install dependencies | ||
RUN dnf update -y && dnf install -y \ | ||
wget \ | ||
make \ | ||
gcc \ | ||
gcc-c++ \ | ||
patch \ | ||
cmake \ | ||
bison \ | ||
flex \ | ||
unzip \ | ||
python3 \ | ||
&& dnf clean all | ||
|
||
# Copy the patch file to the build context | ||
COPY cgal-NO_ADDITIONAL_DETAILS.patch . | ||
|
||
FROM sources_deps AS build | ||
|
||
# Build and install Doxygen from sources | ||
ARG DOXYGEN_VERSION=1.9.6 | ||
ARG MAKEFLAGS=-j$(nproc) | ||
RUN if [ -n "$DEBUG"];then set -x && make --version && ls -lZ /tmp && id; fi \ | ||
&& DOXYGEN_VERSION_UNDERSCORE=$(echo ${DOXYGEN_VERSION} | sed 's/\./_/g') \ | ||
&& wget https://github.com/doxygen/doxygen/archive/refs/tags/Release_${DOXYGEN_VERSION_UNDERSCORE}.zip \ | ||
&& unzip Release_${DOXYGEN_VERSION_UNDERSCORE}.zip \ | ||
&& cd doxygen-Release_${DOXYGEN_VERSION_UNDERSCORE} \ | ||
&& patch -p1 < ../cgal-NO_ADDITIONAL_DETAILS.patch \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. \ | ||
&& cmake --build . \ | ||
&& cmake --install . \ | ||
&& mkdir -p /usr/local/share/doc/doxygen && cp ../LICENSE /usr/local/share/doc/doxygen/LICENSE.TXT \ | ||
&& cd ../.. \ | ||
&& rm -rf doxygen-Release_${DOXYGEN_VERSION_UNDERSCORE} Release_${DOXYGEN_VERSION_UNDERSCORE}.zip | ||
|
||
# Use a smaller base image for the final stage | ||
FROM fedora:latest | ||
|
||
# Install necessary runtime dependencies | ||
RUN set -x \ | ||
&& dnf update -y && dnf install -y graphviz 'perl(Getopt::Std)' tex-bibtex cmake python3-lxml python3-pyquery \ | ||
&& dnf clean all | ||
|
||
# Copy Doxygen from the build stage | ||
COPY --from=build /usr/local/bin/doxygen /usr/local/bin | ||
COPY --from=build /usr/local/share/doc/doxygen/LICENSE.TXT /usr/local/share/doc/doxygen/LICENSE.TXT | ||
RUN doxygen --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
SHELL := /bin/bash | ||
DOXYGEN_VERSIONS := 1.12.0 1.11.0 1.10.0 1.9.8 1.9.7 1.9.6 | ||
|
||
.PHONY: all build-% push-% build push | ||
|
||
all: build | ||
@echo "Use `$(MAKE) push` to push the images to the registry." | ||
|
||
build-%: | ||
@echo "MAKEFLAGS: $(MAKEFLAGS)" | ||
@echo "Building Doxygen version $*..." | ||
if [ "$$(getenforce || true)" == "Enforcing" ]; then Z=:z; else Z=; fi; \ | ||
F="$(MAKEFLAGS)"; F=$${F##*fifo:}; F=$${F%% *}; \ | ||
if [ -p "$$F" ]; then echo "The GNU make FIFO file exists:"; ls -l $$F; VOLUME_ARGS="-v $$F:$$F$$Z"; echo -- $$VOLUME_ARGS; fi; \ | ||
podman build --build-arg DOXYGEN_VERSION=$* --build-arg "MAKEFLAGS=$(MAKEFLAGS)" $$VOLUME_ARGS -t cgal/doxygen:$* . | ||
|
||
push-%: build-% | ||
@echo "Pushing cgal/doxygen:$*..." | ||
podman push cgal/doxygen:$* | ||
|
||
build: $(foreach version,$(DOXYGEN_VERSIONS),build-$(version)) | ||
|
||
push: $(foreach version,$(DOXYGEN_VERSIONS),push-$(version)) |
44 changes: 44 additions & 0 deletions
44
.devcontainer/doxygen-cgal/cgal-NO_ADDITIONAL_DETAILS.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/src/config.xml b/src/config.xml | ||
index 13910958a6..31f1354e44 100644 | ||
--- a/src/config.xml | ||
+++ b/src/config.xml | ||
@@ -893,6 +893,18 @@ Go to the <a href="commands.html">next</a> section or return to the | ||
\note This will also disable the warnings about undocumented members | ||
that are normally produced when \ref cfg_warnings "WARNINGS" is | ||
set to \c YES. | ||
+]]> | ||
+ </docs> | ||
+ </option> | ||
+ </group> | ||
+ <group name='Build' docs='Build related configuration options'> | ||
+ <option type='bool' id='NO_ADDITIONAL_DETAILS' defval='0'> | ||
+ <docs> | ||
+<![CDATA[ | ||
+ When the \c EXTRACT_ALL tag is set to \c YES and a member or class | ||
+ as no documentation, no detailed section will be produced if | ||
+ the \c NO_ADDITIONAL_DETAILS tag is set to \c YES. | ||
+ This tag has no effect if the \c EXTRACT_ALL tag is set to \c NO. | ||
]]> | ||
</docs> | ||
</option> | ||
diff --git a/src/memberdef.cpp b/src/memberdef.cpp | ||
index 08d9bf24c5..ab04e994c5 100644 | ||
--- a/src/memberdef.cpp | ||
+++ b/src/memberdef.cpp | ||
@@ -2501,6 +2501,7 @@ bool MemberDefImpl::hasDetailedDescription() const | ||
if (!m_hasDetailedDescriptionCached) | ||
{ | ||
bool extractAll = Config_getBool(EXTRACT_ALL); | ||
+ bool xAllNoDetailedSec = Config_getBool(NO_ADDITIONAL_DETAILS); | ||
bool alwaysDetailedSec = Config_getBool(ALWAYS_DETAILED_SEC); | ||
bool repeatBrief = Config_getBool(REPEAT_BRIEF); | ||
bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC); | ||
@@ -2512,7 +2513,7 @@ bool MemberDefImpl::hasDetailedDescription() const | ||
// the member has detailed documentation because the user added some comments | ||
bool docFilter = | ||
// extract all is enabled | ||
- extractAll || | ||
+ (extractAll && !xAllNoDetailedSec) || | ||
// has detailed docs | ||
!documentation().isEmpty() || | ||
// has inbody docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "CGAL Doxygen Dev Container, version 1.12.0, with CGAL patch", | ||
"image": "docker.io/cgal/doxygen:1.12.0", | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1.3.2": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cmake-tools", | ||
"bbenoist.Doxygen", | ||
"ms-vscode.cpptools" | ||
] | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[distrobox-doxygen-1.12.0] | ||
image=cgal/doxygen:1.12.0 | ||
exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" | ||
exported_bins_path=$HOME/.local/bin-doxygen-1.12.0 | ||
|
||
[distrobox-doxygen-1.11.0] | ||
image=cgal/doxygen:1.11.0 | ||
exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" | ||
exported_bins_path=$HOME/.local/bin-doxygen-1.11.0 | ||
|
||
[distrobox-doxygen-1.10.0] | ||
image=cgal/doxygen:1.10.0 | ||
exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" | ||
exported_bins_path=$HOME/.local/bin-doxygen-1.10.0 | ||
|
||
[distrobox-doxygen-1.9.8] | ||
image=cgal/doxygen:1.9.8 | ||
exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" | ||
exported_bins_path=$HOME/.local/bin-doxygen-1.9.8 | ||
|
||
[distrobox-doxygen-1.9.7] | ||
image=cgal/doxygen:1.9.7 | ||
exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" | ||
exported_bins_path=$HOME/.local/bin-doxygen-1.9.7 | ||
|
||
[distrobox-doxygen-1.9.6] | ||
image=cgal/doxygen:1.9.6 | ||
exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" | ||
exported_bins_path=$HOME/.local/bin-doxygen-1.9.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.