Skip to content

Commit

Permalink
Doxygen: stop maintaining old versions, align around version 1.12.0 (#…
Browse files Browse the repository at this point in the history
…25928)

- Stop publishing revisions for older versions
- Use version range elswhere when requiring doxygen
- Use cmake_additional_variables_prefixes to handle iconv instead of patching
- Add version 1.12.0
- Minor maintenance fixes
  • Loading branch information
jcar87 authored Nov 13, 2024
1 parent 3e19194 commit 1be3711
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 598 deletions.
1 change: 1 addition & 0 deletions docs/adding_packages/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Version ranges for the following dependencies will be accepted in pull requests:
* OpenSSL: `[>=1.1 <4]` for libraries known to be compatible with OpenSSL 1.x and 3.x
* CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts. Note that CCI recipes assume 3.15 is installed in the system, so add this
version range only when a requirement for a newer version is needed.
* doxygen: `[>=1.8 <2]`
* Libcurl: `[>=7.78 <9]`
* Zlib: `[>=1.2.11 <2]`
* Libpng: `[>=1.6 <2]`
Expand Down
56 changes: 3 additions & 53 deletions recipes/doxygen/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,13 @@
sources:
"1.12.0":
url: "https://github.com/doxygen/doxygen/releases/download/Release_1_12_0/doxygen-1.12.0.src.tar.gz"
sha256: "a3a3dba2018ef409d83d81a2fc42a0d19bdbe087252ef342bf214b51b8b01634"
"1.9.4":
url: "https://sourceforge.net/projects/doxygen/files/doxygen-1.9.4.src.tar.gz"
sha256: "a15e9cd8c0d02b7888bc8356eac200222ecff1defd32f3fe05257d81227b1f37"
"1.9.2":
url: "https://sourceforge.net/projects/doxygen/files/doxygen-1.9.2.src.tar.gz"
sha256: "060f254bcef48673cc7ccf542736b7455b67c110b30fdaa33512a5b09bbecee5"
"1.9.1":
url: "https://sourceforge.net/projects/doxygen/files/doxygen-1.9.1.src.tar.gz"
sha256: "67aeae1be4e1565519898f46f1f7092f1973cce8a767e93101ee0111717091d1"
"1.8.20":
url: "https://sourceforge.net/projects/doxygen/files/doxygen-1.8.20.src.tar.gz"
sha256: "e0db6979286fd7ccd3a99af9f97397f2bae50532e4ecb312aa18862f8401ddec"
"1.8.18":
url: "https://sourceforge.net/projects/doxygen/files/doxygen-1.8.18.src.tar.gz"
sha256: "18173d9edc46d2d116c1f92a95d683ec76b6b4b45b817ac4f245bb1073d00656"
"1.8.17":
url: "https://sourceforge.net/projects/doxygen/files/doxygen-1.8.17.src.tar.gz"
sha256: "2cba988af2d495541cbbe5541b3bee0ee11144dcb23a81eada19f5501fd8b599"
patches:
"1.9.4":
- patch_file: "patches/1.9.4-0001-enable-modern-compilers.patch"
patch_description: "Enable modern compilers"
patch_type: "portability"
patch_source: "https://github.com/doxygen/doxygen/commit/5198966c8d5fec89116d025c74934ac03ea511fa"
- patch_file: "patches/1.9.4-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.9.2":
- patch_file: "patches/1.9.2-0001-imported-target.patch"
patch_description: "Fix includes"
patch_type: "portability"
- patch_file: "patches/1.9.2-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.9.1":
- patch_file: "patches/1.9.1-0001-imported-target.patch"
patch_description: "Fix includes"
patch_type: "portability"
- patch_file: "patches/1.9.1-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.8.20":
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
- patch_file: "patches/1.8.20-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.8.18":
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
- patch_file: "patches/1.8.18-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.8.17":
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
- patch_file: "patches/1.8.17-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
58 changes: 22 additions & 36 deletions recipes/doxygen/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get
from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file
from conan.tools.microsoft import is_msvc_static_runtime
from conan.tools.scm import Version
import os

required_conan_version = ">=1.52.0"
required_conan_version = ">=2.4"


class DoxygenConan(ConanFile):
Expand All @@ -26,25 +27,9 @@ class DoxygenConan(ConanFile):
default_options = {
"enable_parse": True,
"enable_search": True,
"enable_app": False,
"enable_app": False
}

@property
def _settings_build(self):
return getattr(self, "settings_build", self.settings)

@property
def _minimum_compiler_version(self):
if Version(self.version) <= "1.9.1":
return {
"gcc": "5",
}
return {
"gcc": "7", # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297
"Visual Studio": "15",
"msvc": "191",
}

def export_sources(self):
export_conandata_patches(self)

Expand All @@ -56,28 +41,34 @@ def requirements(self):
self.requires("xapian-core/1.4.19")
self.requires("zlib/[>=1.2.11 <2]")
if self.options.enable_app or self.options.enable_parse:
# INFO: Doxygen uses upper case CMake variables to link/include IConv, so we are using patches for targets.
self.requires("libiconv/1.17")

def compatibility(self):
return [{"settings": [("build_type", "Release")]}]

def validate(self):
minimum_compiler_version = self._minimum_compiler_version.get(str(self.settings.compiler))
if minimum_compiler_version and Version(self.settings.compiler.version) < minimum_compiler_version:
raise ConanInvalidConfiguration(f"Compiler version too old. At least {minimum_compiler_version} is required.")
if Version(self.version) == "1.8.18":
check_min_vs(self, "191")
if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5":
raise ConanInvalidConfiguration("Doxygen requires GCC >=5")

if self.settings.compiler == "msvc" and Version(self.settings.compiler.version) < "191":
raise ConanInvalidConfiguration("Doxygen requires Visual Studio 2017 or newer")

check_min_cppstd(self, "17")

def build_requirements(self):
if self._settings_build.os == "Windows":
if self.settings_build.os == "Windows":
self.tool_requires("winflexbison/2.5.24")
else:
self.tool_requires("flex/2.6.4")
self.tool_requires("bison/3.8.2")

self.tool_requires("cmake/[>=3.19 <4]")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
apply_conandata_patches(self)

#Do not build manpages
cmakelists = os.path.join(self.source_folder, "CMakeLists.txt")
replace_in_file(self, cmakelists, "add_subdirectory(doc)", "")
replace_in_file(self, cmakelists, "set(CMAKE_CXX_STANDARD", "##set(CMAKE_CXX_STANDARD")

def generate(self):
tc = CMakeToolchain(self)
Expand All @@ -89,10 +80,10 @@ def generate(self):
tc.generate()

deps = CMakeDeps(self)
deps.set_property("libiconv", "cmake_additional_variables_prefixes", ["ICONV"])
deps.generate()

def build(self):
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand All @@ -106,8 +97,3 @@ def package_info(self):
self.cpp_info.set_property("cmake_find_mode", "none")
self.cpp_info.libdirs = []
self.cpp_info.includedirs = []
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.system_libs = ["pthread", "m"]

# TODO: to remove in conan v2
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
13 changes: 0 additions & 13 deletions recipes/doxygen/all/patches/1.8-0001-xapian.patch

This file was deleted.

65 changes: 0 additions & 65 deletions recipes/doxygen/all/patches/1.8.17-0002-fix-iconv-linkage.patch

This file was deleted.

65 changes: 0 additions & 65 deletions recipes/doxygen/all/patches/1.8.18-0002-fix-iconv-linkage.patch

This file was deleted.

65 changes: 0 additions & 65 deletions recipes/doxygen/all/patches/1.8.20-0002-fix-iconv-linkage.patch

This file was deleted.

Loading

0 comments on commit 1be3711

Please sign in to comment.