Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doxygen] Add Version 1.9.5 and bump dependency versions #14490

Merged
merged 43 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
16a764d
add 1.9.5 entries and bump dependeny versions
Sneder89 Nov 29, 2022
74f0984
Update conanfile.py
Sneder89 Nov 29, 2022
f2d7423
remove unnecessary patch files
Sneder89 Nov 29, 2022
9ce70dc
Update conanfile.py
Sneder89 Nov 30, 2022
361ac26
add m4
Sneder89 Nov 30, 2022
129a5c0
add v1 test package
Sneder89 Nov 30, 2022
babd190
remove deps generator
Sneder89 Nov 30, 2022
8d4b103
return to old codebase
Sneder89 Nov 30, 2022
d9a35fd
apply patches
Sneder89 Nov 30, 2022
bef73a7
Update conanfile.py
Sneder89 Nov 30, 2022
ffc9625
Update conanfile.py
Sneder89 Dec 1, 2022
0a8ca45
Update conanfile.py
Sneder89 Dec 1, 2022
76c4954
remove weird cmake configure function
Sneder89 Dec 2, 2022
9606bb6
Update conandata.yml
Sneder89 Dec 2, 2022
21db1bf
remove CONAN_PKG
Sneder89 Dec 2, 2022
c0cbd72
remove unused patches
Sneder89 Dec 4, 2022
5d80860
Update conanfile.py
Sneder89 Dec 4, 2022
28f1bda
Update conanfile.py
Sneder89 Dec 4, 2022
ba2cf5f
Update conanfile.py
Sneder89 Dec 4, 2022
5981c95
Update conanfile.py
Sneder89 Dec 5, 2022
ad0376f
Merge branch 'feature/doxygen-195' of https://github.com/Sneder89/con…
Sneder89 Dec 5, 2022
a71ba95
use visualmstudio 16
Sneder89 Dec 6, 2022
c948cfd
Update conanfile.py
Sneder89 Dec 6, 2022
8f075a9
remove version 1.9.5
Sneder89 Dec 6, 2022
c0b9988
Update conanfile.py
Sneder89 Dec 16, 2022
e878777
use patch file
Sneder89 Dec 16, 2022
dbf4699
Update conanfile.py
Sneder89 Dec 20, 2022
f07db3e
remove unused imports
Sneder89 Dec 20, 2022
8f1ff37
make the package v2 compatible
Sneder89 Dec 20, 2022
ff1661c
Update conanfile.py
Sneder89 Dec 20, 2022
a6af64d
Update conanfile.py
Sneder89 Dec 20, 2022
d04ce7d
Update conanfile.py
Sneder89 Dec 23, 2022
fe4966c
Update conanfile.py
Sneder89 Dec 31, 2022
907f2b2
Update conanfile.py
Sneder89 Jan 4, 2023
a7f8260
Update conanfile.py
Sneder89 Jan 9, 2023
d8777fe
Update conanfile.py
Sneder89 Jan 9, 2023
5fb484c
Update conanfile.py
Sneder89 Jan 9, 2023
086137b
Update conanfile.py
Sneder89 Jan 9, 2023
032520b
Update conanfile.py
Sneder89 Jan 12, 2023
432995f
Update conanfile.py
Sneder89 Jan 13, 2023
ee17ada
Update conanfile.py
Sneder89 Jan 16, 2023
4814180
Update recipes/doxygen/all/conanfile.py
Sneder89 Jan 16, 2023
9f3e914
Update conanfile.py
Sneder89 Jan 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions recipes/doxygen/all/CMakeLists.txt

This file was deleted.

21 changes: 13 additions & 8 deletions recipes/doxygen/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ sources:
patches:
"1.9.2":
- patch_file: "patches/1.9.2-0001-imported-target.patch"
base_path: "source_subfolder"
patch_description: "Fix includes"
patch_type: "portability"
"1.9.1":
- patch_file: "patches/1.9.1-0001-imported-target.patch"
base_path: "source_subfolder"
patch_description: "Fix includes"
patch_type: "portability"
"1.8.20":
- patch_file: "patches/1.8.20-0001-relocatable-cmake.patch"
base_path: "source_subfolder"
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
"1.8.18":
- patch_file: "patches/1.8.18-0001-relocatable-cmake.patch"
base_path: "source_subfolder"
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
"1.8.17":
- patch_file: "patches/1.8.17-0001-relocatable-cmake.patch"
base_path: "source_subfolder"
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
80 changes: 33 additions & 47 deletions recipes/doxygen/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get
prince-chrismc marked this conversation as resolved.
Show resolved Hide resolved
from conan.tools.microsoft import is_msvc_static_runtime
from conan.tools.scm import Version
from conan import tools
from conans import CMake
from conan.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.50.2"
required_conan_version = ">=1.52.0"


class DoxygenConan(ConanFile):
Expand All @@ -25,24 +26,16 @@ class DoxygenConan(ConanFile):
"enable_search": True,
}

Sneder89 marked this conversation as resolved.
Show resolved Hide resolved
exports_sources = "CMakeLists.txt", "patches/*"
generators = "cmake", "cmake_find_package"
short_paths = True

_cmake = None

@property
def _source_subfolder(self):
return "source_subfolder"

@property
def _build_subfolder(self):
return "build_subfolder"

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

def layout(self):
cmake_layout(self, src_folder="src")

def export_sources(self):
export_conandata_patches(self)

def _minimum_compiler_version(self):
if Version(self.version) <= "1.9.1":
return {
Expand All @@ -55,17 +48,18 @@ def _minimum_compiler_version(self):

def configure(self):
del self.settings.compiler.cppstd

def requirements(self):
if self.options.enable_search:
self.requires("xapian-core/1.4.19")
self.requires("zlib/1.2.12")
self.requires("zlib/1.2.13")

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

def validate(self):
minimum_compiler_version = self._minimum_compiler_version()
Expand All @@ -79,42 +73,33 @@ def validate(self):

def package_id(self):
del self.info.settings.compiler

# Doxygen doesn't make code. Any package that will run is ok to use.
# It's ok in general to use a release version of the tool that matches the
# build os and architecture.
compatible_pkg = self.info.clone()
compatible_pkg.settings.build_type = "Release"
self.compatible_packages.append(compatible_pkg)

def source(self):
tools.files.get(self, **self.conan_data["sources"][self.version],
destination=self._source_subfolder, strip_root=True)

def _configure_cmake(self):
if self._cmake:
return self._cmake
self._cmake = CMake(self)
self._cmake.definitions["build_parse"] = self.options.enable_parse
self._cmake.definitions["build_search"] = self.options.enable_search
self._cmake.definitions["use_libc++"] = self.settings.compiler.get_safe("libcxx") == "libc++"
self._cmake.definitions["win_static"] = "MT" in self.settings.compiler.get_safe("runtime", "")
self._cmake.configure(build_folder=self._build_subfolder)
return self._cmake
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def generate(self):
tc = CMakeToolchain(self)
tc.variables["build_parse"] = self.options.enable_parse
tc.variables["build_search"] = self.options.enable_search
tc.variables["use_libc++"] = self.settings.compiler.get_safe("libcxx") == "libc++"
tc.variables["win_static"] = is_msvc_static_runtime(self)
tc.generate()

deps = CMakeDeps(self)
deps.generate()

def build(self):
if os.path.isfile("Findflex.cmake"):
os.unlink("Findflex.cmake")
if os.path.isfile("Findbison.cmake"):
os.unlink("Findbison.cmake")
for patch in self.conan_data.get("patches", {}).get(self.version, []):
tools.files.patch(self, **patch)
cmake = self._configure_cmake()
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()

def package(self):
self.copy("LICENSE", src=self._source_subfolder, dst="licenses")
cmake = self._configure_cmake()
self.copy("LICENSE", src=self.source_folder, dst="licenses")
cmake = CMake(self)
cmake.install()

def package_info(self):
Expand All @@ -123,3 +108,4 @@ def package_info(self):
bin_path = os.path.join(self.package_folder, "bin")
self.output.info(f"Appending PATH environment variable: {bin_path}")
self.env_info.PATH.append(bin_path)
self.cpp_info.set_property("cmake_find_mode", "none")
13 changes: 13 additions & 0 deletions recipes/doxygen/all/patches/1.8-0001-xapian.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- a/addon/doxysearch/CMakeLists.txt 2020-08-24 13:12:55.000000000 +0200
+++ b/addon/doxysearch/CMakeLists.txt 2022-12-16 20:41:07.040801300 +0100
@@ -1,8 +1,8 @@
-find_package(Xapian REQUIRED)
+find_package(xapian REQUIRED)
find_package(ZLIB REQUIRED)

if (WIN32)
- set(WIN_EXTRA_LIBS "uuid.lib rpcrt4.lib ws2_32.lib")
+ set(WIN_EXTRA_LIBS uuid.lib rpcrt4.lib ws2_32.lib)
endif()

include_directories(
Loading