From 36fcc6a848a8c84426c3815f9e090235272eecaa Mon Sep 17 00:00:00 2001 From: atom Date: Mon, 17 May 2021 18:30:42 +0300 Subject: [PATCH 01/32] LimeReport --- recipes/limereport/all/CMakeLists.txt | 15 +++ recipes/limereport/all/conandata.yml | 4 + recipes/limereport/all/conanfile.py | 101 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 ++ .../limereport/all/test_package/conanfile.py | 18 ++++ .../all/test_package/test_package.cpp | 84 +++++++++++++++ recipes/limereport/config.yml | 3 + 7 files changed, 234 insertions(+) create mode 100644 recipes/limereport/all/CMakeLists.txt create mode 100644 recipes/limereport/all/conandata.yml create mode 100644 recipes/limereport/all/conanfile.py create mode 100644 recipes/limereport/all/test_package/CMakeLists.txt create mode 100644 recipes/limereport/all/test_package/conanfile.py create mode 100644 recipes/limereport/all/test_package/test_package.cpp create mode 100644 recipes/limereport/config.yml diff --git a/recipes/limereport/all/CMakeLists.txt b/recipes/limereport/all/CMakeLists.txt new file mode 100644 index 0000000000000..ca4fe305f632c --- /dev/null +++ b/recipes/limereport/all/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.4) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +if(BUILD_SHARED_LIBS) + if(MSVC) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + endif() +else() + add_definitions(-DLIMEREPORT_STATIC) +endif() + +add_subdirectory(source_subfolder) diff --git a/recipes/limereport/all/conandata.yml b/recipes/limereport/all/conandata.yml new file mode 100644 index 0000000000000..6eec88c9c40bb --- /dev/null +++ b/recipes/limereport/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.5.87": + url: "https://github.com/Jihadist/LimeReport/archive/refs/tags/1.5.87.zip" + sha256: "9F0AC6B64B30F18BC89D77FAC1FCEFCF26C0C02AE32A75BB5EF176EAC5F408AA" diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py new file mode 100644 index 0000000000000..317a387b68194 --- /dev/null +++ b/recipes/limereport/all/conanfile.py @@ -0,0 +1,101 @@ +from conans import CMake, ConanFile, tools +from conans.errors import ConanInvalidConfiguration +import os + + +class LimereportConan(ConanFile): + name = "limereport" + description = "Report generator for Qt Framework" + homepage = "https://poppler.freedesktop.org/" + topics = ("conan", "limereport", "pdf", "report","qt") + license = "LGPL-3.0", "GPL-3.0" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_zint": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_zint": True, + "qt:qtscript": True, + "qt:qtquickcontrols": True, + "qt:qtquickcontrols2": True, + "qt:qtsvg": True, + "qt:qttools": True, + "qt:qtwinextras": True + } + _cmake = None + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + + @property + def _minimum_compilers_version(self): + return { + "Visual Studio": "15", + "gcc": "8", + "clang": "8", + "apple-clang": "8" + } + + def configure(self): + if self.options.shared: + del self.options.fPIC + + def build_requirements(self): + self.build_requires("libpng/1.6.37") + + + def requirements(self): + self.requires("qt/5.15.2") + + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("limereport-{}".format(self.version), self._source_subfolder) + + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + if self.options.shared == False: + self._cmake.definitions["LIMEREPORT_STATIC"] = True + if self.settings.os == "Windows": + self._cmake.definitions["WINDOWS_BUILD"] = True + + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy("COPYING*", src=self._source_subfolder, dst="licenses") + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + qt_major = tools.Version(self.deps_cpp_info["qt"].version).major + self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.names["cmake_find_package"] = ["Limereport-qt{}".format(qt_major)] + self.cpp_info.names["cmake_find_package_multi"] = ["Limereport-qt{}".format(qt_major)] + diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..33ae887aa6aea --- /dev/null +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/limereport/all/test_package/conanfile.py b/recipes/limereport/all/test_package/conanfile.py new file mode 100644 index 0000000000000..43b24250034c0 --- /dev/null +++ b/recipes/limereport/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run("{} {}".format(bin_path), run_environment=True) + diff --git a/recipes/limereport/all/test_package/test_package.cpp b/recipes/limereport/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..5d0b23e3436b0 --- /dev/null +++ b/recipes/limereport/all/test_package/test_package.cpp @@ -0,0 +1,84 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 + #include + #include +#endif + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR); + QStringList vars; + +#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0) + QCommandLineParser parser; + parser.addHelpOption(); + parser.addVersionOption(); + QCommandLineOption sourceOption(QStringList() << "s" << "source", + QCoreApplication::translate("main", "Limereport pattern file name"), + QCoreApplication::translate("main", "source")); + parser.addOption(sourceOption); + QCommandLineOption destinationOption(QStringList() << "d" << "destination", + QCoreApplication::translate("main", "Output file name"), + QCoreApplication::translate("main", "destination")); + parser.addOption(destinationOption); + QCommandLineOption variablesOption(QStringList() << "p" << "param", + QCoreApplication::translate("main", "Report parameter (can be more than one)"), + QCoreApplication::translate("main", "param_name=param_value")); + parser.addOption(variablesOption); + parser.process(a); + + LimeReport::ReportEngine report; + + if (parser.value(sourceOption).isEmpty()){ + std::cerr<<"Error! Report file is not specified !! \n"; + return 1; + } + + if (!report.loadFromFile(parser.value(sourceOption))){ + std::cerr<<"Error! Report file \""+parser.value(sourceOption).toStdString()+"\" not found \n"; + return 1; + } + + if (!parser.values(variablesOption).isEmpty()){ + foreach(QString var, parser.values(variablesOption)){ + QStringList varItem = var.split("="); + if (varItem.size() == 2) + report.dataManager()->setReportVariable(varItem.at(0),varItem.at(1)); + } + } + + if (parser.value(destinationOption).isEmpty()){ + report.printToPDF(QFileInfo(parser.value(sourceOption)).baseName()); + } else { + report.printToPDF(parser.value(destinationOption)); + } +#else + std::cerr<<"This demo intended for Qt 5.2 and higher\n"; +#endif +// QUuid uid = QUuid::createUuid(); +// QString uidStr = uid.toString()+".pdf"; +// report.printToPDF(uidStr); +// QFile in(uidStr); +// QFile out; +// out.open(stdout, QFile::WriteOnly); +// in.open(QIODevice::ReadOnly); +//#ifdef _WIN32 +// _setmode(fileno(stdout),O_BINARY); +//#endif +// QByteArray buffer = in.readAll(); +// fwrite(buffer,1,buffer.size(),stdout); +// in.close(); +// in.remove(); + + return 0; + //return a.exec(); +} diff --git a/recipes/limereport/config.yml b/recipes/limereport/config.yml new file mode 100644 index 0000000000000..9ee73d5a51717 --- /dev/null +++ b/recipes/limereport/config.yml @@ -0,0 +1,3 @@ +versions: + "1.5.87": + folder: "all" From 45da694a11de42466e9e63220c000e62ceb61efa Mon Sep 17 00:00:00 2001 From: atom Date: Tue, 22 Jun 2021 13:47:22 +0300 Subject: [PATCH 02/32] [^] --- recipes/limereport/all/conandata.yml | 6 +++--- recipes/limereport/all/test_package/CMakeLists.txt | 10 +++++++--- recipes/limereport/all/test_package/conanfile.py | 3 ++- recipes/limereport/all/test_package/test_package.cpp | 5 +++++ recipes/limereport/config.yml | 2 +- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/recipes/limereport/all/conandata.yml b/recipes/limereport/all/conandata.yml index 6eec88c9c40bb..9cc648d593be1 100644 --- a/recipes/limereport/all/conandata.yml +++ b/recipes/limereport/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "1.5.87": - url: "https://github.com/Jihadist/LimeReport/archive/refs/tags/1.5.87.zip" - sha256: "9F0AC6B64B30F18BC89D77FAC1FCEFCF26C0C02AE32A75BB5EF176EAC5F408AA" + "1.5.88": + url: "https://github.com/Jihadist/LimeReport/archive/refs/tags/1.5.88.tar.gz" + sha256: "E42BF878B9AAEE92355976F8A9BDAE98DF361DC3B85F580F8D7726233F920FA6" diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt index 33ae887aa6aea..e5e2847b2d6ce 100644 --- a/recipes/limereport/all/test_package/CMakeLists.txt +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -1,9 +1,13 @@ cmake_minimum_required(VERSION 3.1) project(test_package) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +conan_basic_setup(KEEP_RPATHS) + add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) + +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS} Iphlpapi UxTheme Dwmapi) diff --git a/recipes/limereport/all/test_package/conanfile.py b/recipes/limereport/all/test_package/conanfile.py index 43b24250034c0..fb314430324e9 100644 --- a/recipes/limereport/all/test_package/conanfile.py +++ b/recipes/limereport/all/test_package/conanfile.py @@ -13,6 +13,7 @@ def build(self): def test(self): if not tools.cross_building(self.settings): + os.environ['QT_DEBUG_PLUGINS'] = "1" bin_path = os.path.join("bin", "test_package") - self.run("{} {}".format(bin_path), run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/limereport/all/test_package/test_package.cpp b/recipes/limereport/all/test_package/test_package.cpp index 5d0b23e3436b0..8645a6070f173 100644 --- a/recipes/limereport/all/test_package/test_package.cpp +++ b/recipes/limereport/all/test_package/test_package.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -12,6 +13,10 @@ #include #endif +#include +#include +Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) + int main(int argc, char *argv[]) { QApplication a(argc, argv); diff --git a/recipes/limereport/config.yml b/recipes/limereport/config.yml index 9ee73d5a51717..e70dfab2782c3 100644 --- a/recipes/limereport/config.yml +++ b/recipes/limereport/config.yml @@ -1,3 +1,3 @@ versions: - "1.5.87": + "1.5.88": folder: "all" From dbb2ab86154a3f8e8561cd9193424d2deed0ba33 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Thu, 5 Jan 2023 16:36:44 +0300 Subject: [PATCH 03/32] update recipe --- recipes/limereport/all/conandata.yml | 6 +- recipes/limereport/all/conanfile.py | 85 +++++++++---------- .../all/test_package/CMakeLists.txt | 5 +- .../limereport/all/test_package/conanfile.py | 23 +++-- .../all/test_package/test_package.cpp | 76 +---------------- 5 files changed, 63 insertions(+), 132 deletions(-) diff --git a/recipes/limereport/all/conandata.yml b/recipes/limereport/all/conandata.yml index 9cc648d593be1..07bc556427c11 100644 --- a/recipes/limereport/all/conandata.yml +++ b/recipes/limereport/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "1.5.88": - url: "https://github.com/Jihadist/LimeReport/archive/refs/tags/1.5.88.tar.gz" - sha256: "E42BF878B9AAEE92355976F8A9BDAE98DF361DC3B85F580F8D7726233F920FA6" + "1.6.9": + url: "https://github.com/Jihadist/LimeReport/archive/bb72b6f3569b3f23ac58de344a2b6e7b45ce91e9.tar.gz" + sha256: 6d3baa1511e2c8b2059a02446d331b641fc374c98e3c21f82654310cc7897c08 diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 317a387b68194..08e2847c79068 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -1,5 +1,10 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +from conans import tools +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rm, rmdir +from conan import ConanFile +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path +from conan.tools.apple import fix_apple_shared_install_name import os @@ -10,8 +15,6 @@ class LimereportConan(ConanFile): topics = ("conan", "limereport", "pdf", "report","qt") license = "LGPL-3.0", "GPL-3.0" url = "https://github.com/conan-io/conan-center-index" - exports_sources = "CMakeLists.txt" - generators = "cmake", "cmake_find_package" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -19,30 +22,23 @@ class LimereportConan(ConanFile): "with_zint": [True, False] } default_options = { - "shared": False, + "shared": True, "fPIC": True, - "with_zint": True, - "qt:qtscript": True, + "with_zint": False, "qt:qtquickcontrols": True, "qt:qtquickcontrols2": True, "qt:qtsvg": True, - "qt:qttools": True, - "qt:qtwinextras": True + "qt:qttools": True } - _cmake = None - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + def export_sources(self): + export_conandata_patches(self) + @property def _minimum_compilers_version(self): return { @@ -56,46 +52,49 @@ def configure(self): if self.options.shared: del self.options.fPIC + def layout(self): + basic_layout(self, src_folder="src") + def build_requirements(self): - self.build_requires("libpng/1.6.37") + self.build_requires("libpng/1.6.38") def requirements(self): - self.requires("qt/5.15.2") + self.requires("qt/5.15.7") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("limereport-{}".format(self.version), self._source_subfolder) - - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - if self.options.shared == False: - self._cmake.definitions["LIMEREPORT_STATIC"] = True - if self.settings.os == "Windows": - self._cmake.definitions["WINDOWS_BUILD"] = True - - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIMEREPORT_STATIC"] = not self.options.shared + if is_msvc(self): + tc.variables["WINDOWS_BUILD"] = True + qt_major = tools.Version(self.deps_cpp_info["qt"].version).major + if qt_major == 6: + tc.variables["USE_QT6"] = True + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() - + def package(self): - self.copy("COPYING*", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "COPYING*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) def package_info(self): qt_major = tools.Version(self.deps_cpp_info["qt"].version).major - self.cpp_info.libs = tools.collect_libs(self) - self.cpp_info.names["cmake_find_package"] = ["Limereport-qt{}".format(qt_major)] - self.cpp_info.names["cmake_find_package_multi"] = ["Limereport-qt{}".format(qt_major)] + self.cpp_info.libs = ["limereport-qt{}".format(qt_major)] + # self.cpp_info.names["cmake_find_package"] = ["limereport-qt{}".format(qt_major)] + # self.cpp_info.names["cmake_find_package_multi"] = ["limereport-qt{}".format(qt_major)] diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt index e5e2847b2d6ce..138fd4583da92 100644 --- a/recipes/limereport/all/test_package/CMakeLists.txt +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -4,10 +4,9 @@ project(test_package) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) +find_package(limereport REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS} Iphlpapi UxTheme Dwmapi) +target_link_libraries(${PROJECT_NAME} limereport::limereport) diff --git a/recipes/limereport/all/test_package/conanfile.py b/recipes/limereport/all/test_package/conanfile.py index fb314430324e9..5357702ccd250 100644 --- a/recipes/limereport/all/test_package/conanfile.py +++ b/recipes/limereport/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -12,8 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - os.environ['QT_DEBUG_PLUGINS'] = "1" - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") \ No newline at end of file diff --git a/recipes/limereport/all/test_package/test_package.cpp b/recipes/limereport/all/test_package/test_package.cpp index 8645a6070f173..79a051de6dea5 100644 --- a/recipes/limereport/all/test_package/test_package.cpp +++ b/recipes/limereport/all/test_package/test_package.cpp @@ -1,89 +1,15 @@ #include -#include #include #include #include -#include -#include -#include -#include -#ifdef _WIN32 - #include - #include -#endif - -#include -#include -Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) int main(int argc, char *argv[]) { QApplication a(argc, argv); - QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR); - QStringList vars; - -#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0) - QCommandLineParser parser; - parser.addHelpOption(); - parser.addVersionOption(); - QCommandLineOption sourceOption(QStringList() << "s" << "source", - QCoreApplication::translate("main", "Limereport pattern file name"), - QCoreApplication::translate("main", "source")); - parser.addOption(sourceOption); - QCommandLineOption destinationOption(QStringList() << "d" << "destination", - QCoreApplication::translate("main", "Output file name"), - QCoreApplication::translate("main", "destination")); - parser.addOption(destinationOption); - QCommandLineOption variablesOption(QStringList() << "p" << "param", - QCoreApplication::translate("main", "Report parameter (can be more than one)"), - QCoreApplication::translate("main", "param_name=param_value")); - parser.addOption(variablesOption); - parser.process(a); LimeReport::ReportEngine report; - - if (parser.value(sourceOption).isEmpty()){ - std::cerr<<"Error! Report file is not specified !! \n"; - return 1; - } - - if (!report.loadFromFile(parser.value(sourceOption))){ - std::cerr<<"Error! Report file \""+parser.value(sourceOption).toStdString()+"\" not found \n"; - return 1; - } - - if (!parser.values(variablesOption).isEmpty()){ - foreach(QString var, parser.values(variablesOption)){ - QStringList varItem = var.split("="); - if (varItem.size() == 2) - report.dataManager()->setReportVariable(varItem.at(0),varItem.at(1)); - } - } - - if (parser.value(destinationOption).isEmpty()){ - report.printToPDF(QFileInfo(parser.value(sourceOption)).baseName()); - } else { - report.printToPDF(parser.value(destinationOption)); - } -#else - std::cerr<<"This demo intended for Qt 5.2 and higher\n"; -#endif -// QUuid uid = QUuid::createUuid(); -// QString uidStr = uid.toString()+".pdf"; -// report.printToPDF(uidStr); -// QFile in(uidStr); -// QFile out; -// out.open(stdout, QFile::WriteOnly); -// in.open(QIODevice::ReadOnly); -//#ifdef _WIN32 -// _setmode(fileno(stdout),O_BINARY); -//#endif -// QByteArray buffer = in.readAll(); -// fwrite(buffer,1,buffer.size(),stdout); -// in.close(); -// in.remove(); + std::cout<< LIMEREPORT_VERSION_STR << std::endl; return 0; - //return a.exec(); } From 934d0cd7e3d52df249af56d7c84206030903789b Mon Sep 17 00:00:00 2001 From: Jihadist Date: Wed, 11 Jan 2023 21:51:45 +0300 Subject: [PATCH 04/32] * try to fix test_package --- recipes/limereport/all/conandata.yml | 4 +-- recipes/limereport/all/conanfile.py | 8 +++--- .../all/test_package/backup/conanfile.py | 26 +++++++++++++++++++ .../limereport/all/test_package/conanfile.py | 7 ++++- .../all/test_package/test_package.cpp | 7 ++--- 5 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 recipes/limereport/all/test_package/backup/conanfile.py diff --git a/recipes/limereport/all/conandata.yml b/recipes/limereport/all/conandata.yml index 07bc556427c11..86cf7bb9dde00 100644 --- a/recipes/limereport/all/conandata.yml +++ b/recipes/limereport/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.6.9": - url: "https://github.com/Jihadist/LimeReport/archive/bb72b6f3569b3f23ac58de344a2b6e7b45ce91e9.tar.gz" - sha256: 6d3baa1511e2c8b2059a02446d331b641fc374c98e3c21f82654310cc7897c08 + url: "https://github.com/Jihadist/LimeReport/archive/997aa7be9fd4d30de5e580fc14d05e3cbd53f61c.tar.gz" + sha256: 59e3778fb6411dcd036d8c7241a9337983a1fc43f20578faea9ae14aa5ffd51c diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 08e2847c79068..cc1880a3b68b2 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -57,7 +57,8 @@ def layout(self): def build_requirements(self): self.build_requires("libpng/1.6.38") - + if self.options.with_zint: + self.build_requires("zint/2.10.0") def requirements(self): self.requires("qt/5.15.7") @@ -95,6 +96,7 @@ def package(self): def package_info(self): qt_major = tools.Version(self.deps_cpp_info["qt"].version).major self.cpp_info.libs = ["limereport-qt{}".format(qt_major)] - # self.cpp_info.names["cmake_find_package"] = ["limereport-qt{}".format(qt_major)] - # self.cpp_info.names["cmake_find_package_multi"] = ["limereport-qt{}".format(qt_major)] + # self.cpp_info.requires = ["qt::qtCore", "qt::qtGui", "qt::qtWidgets", "qt::qtPrintSupport", "qt::qtQml", "qt::qtSvg"] + # # self.cpp_info.names["cmake_find_package"] = ["limereport-qt{}".format(qt_major)] + # # self.cpp_info.names["cmake_find_package_multi"] = ["limereport-qt{}".format(qt_major)] diff --git a/recipes/limereport/all/test_package/backup/conanfile.py b/recipes/limereport/all/test_package/backup/conanfile.py new file mode 100644 index 0000000000000..5357702ccd250 --- /dev/null +++ b/recipes/limereport/all/test_package/backup/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") \ No newline at end of file diff --git a/recipes/limereport/all/test_package/conanfile.py b/recipes/limereport/all/test_package/conanfile.py index 5357702ccd250..af70101d36643 100644 --- a/recipes/limereport/all/test_package/conanfile.py +++ b/recipes/limereport/all/test_package/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain import os @@ -15,6 +15,11 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["QT_VERSION"] = self.dependencies["qt"].ref.version + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/limereport/all/test_package/test_package.cpp b/recipes/limereport/all/test_package/test_package.cpp index 79a051de6dea5..e431ae3278faa 100644 --- a/recipes/limereport/all/test_package/test_package.cpp +++ b/recipes/limereport/all/test_package/test_package.cpp @@ -1,15 +1,16 @@ -#include #include #include + +#include #include int main(int argc, char *argv[]) { - QApplication a(argc, argv); + QCoreApplication a(argc, argv); LimeReport::ReportEngine report; - std::cout<< LIMEREPORT_VERSION_STR << std::endl; + std::cout << LIMEREPORT_VERSION_STR << std::endl; return 0; } From 75ee4e14232cbba2bef471348db1d245c382196a Mon Sep 17 00:00:00 2001 From: Jihadist Date: Fri, 20 Jan 2023 12:09:26 +0300 Subject: [PATCH 05/32] use upstream --- recipes/limereport/all/conandata.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/limereport/all/conandata.yml b/recipes/limereport/all/conandata.yml index 86cf7bb9dde00..6fd89286472d4 100644 --- a/recipes/limereport/all/conandata.yml +++ b/recipes/limereport/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.6.9": - url: "https://github.com/Jihadist/LimeReport/archive/997aa7be9fd4d30de5e580fc14d05e3cbd53f61c.tar.gz" - sha256: 59e3778fb6411dcd036d8c7241a9337983a1fc43f20578faea9ae14aa5ffd51c + url: "https://github.com/fralx/LimeReport/archive/d354c8f4c9812704c68e8e107b892fa6ea25e742.tar.gz" + sha256: 559a144ceb47c3baf86049338009cb57a2539c3c48d3464c99890da46d54d35e From 122c5c89d3b7370a31793c7deda951c04188db3d Mon Sep 17 00:00:00 2001 From: Jihadist Date: Sat, 13 May 2023 14:35:56 +0300 Subject: [PATCH 06/32] * bump to actual upstream --- recipes/limereport/all/conandata.yml | 6 ++--- recipes/limereport/all/conanfile.py | 12 +++++----- .../limereport/all/test_package/conanfile.py | 3 +-- .../all/test_package/test_package.cpp | 22 +++++++++++++------ recipes/limereport/config.yml | 2 +- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/recipes/limereport/all/conandata.yml b/recipes/limereport/all/conandata.yml index 6fd89286472d4..a6aa17992b336 100644 --- a/recipes/limereport/all/conandata.yml +++ b/recipes/limereport/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "1.6.9": - url: "https://github.com/fralx/LimeReport/archive/d354c8f4c9812704c68e8e107b892fa6ea25e742.tar.gz" - sha256: 559a144ceb47c3baf86049338009cb57a2539c3c48d3464c99890da46d54d35e + "1.7.4": + url: "https://github.com/fralx/LimeReport/archive/refs/tags/1.7.4.tar.gz" + sha256: 5e16ffa4f1f6c9175ef00be95029d5dda57287236ef8529582e1df1366c8dc30 diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index cc1880a3b68b2..2309eabdd7977 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -28,7 +28,8 @@ class LimereportConan(ConanFile): "qt:qtquickcontrols": True, "qt:qtquickcontrols2": True, "qt:qtsvg": True, - "qt:qttools": True + "qt:qttools": True, + "qt:shared" : True } def config_options(self): @@ -56,12 +57,12 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - self.build_requires("libpng/1.6.38") + self.build_requires("libpng/1.6.39") if self.options.with_zint: self.build_requires("zint/2.10.0") def requirements(self): - self.requires("qt/5.15.7") + self.requires("qt/5.15.8") def source(self): @@ -70,12 +71,13 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["LIMEREPORT_STATIC"] = not self.options.shared + tc.cache_variables["LIMEREPORT_STATIC"] = not self.options.shared if is_msvc(self): tc.variables["WINDOWS_BUILD"] = True qt_major = tools.Version(self.deps_cpp_info["qt"].version).major if qt_major == 6: - tc.variables["USE_QT6"] = True + tc.cache_variables["USE_QT6"] = True + tc.cache_variables["ENABLE_ZINT"] = self.options.with_zint tc.generate() tc = CMakeDeps(self) tc.generate() diff --git a/recipes/limereport/all/test_package/conanfile.py b/recipes/limereport/all/test_package/conanfile.py index af70101d36643..3d7cdb8e58f68 100644 --- a/recipes/limereport/all/test_package/conanfile.py +++ b/recipes/limereport/all/test_package/conanfile.py @@ -6,7 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -17,7 +17,6 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["QT_VERSION"] = self.dependencies["qt"].ref.version tc.generate() def build(self): diff --git a/recipes/limereport/all/test_package/test_package.cpp b/recipes/limereport/all/test_package/test_package.cpp index e431ae3278faa..16c96e622e783 100644 --- a/recipes/limereport/all/test_package/test_package.cpp +++ b/recipes/limereport/all/test_package/test_package.cpp @@ -1,16 +1,24 @@ +#include +#include +#include #include #include -#include -#include +int main(int argc, char* argv[]) +{ + QGuiApplication a(argc, argv); + if ((!QCoreApplication::instance())) { + qFatal("QPrinter: Must construct a QCoreApplication before a QPrinter"); + } else { + qInfo("CoreApplication exists"); + } -int main(int argc, char *argv[]) -{ - QCoreApplication a(argc, argv); + auto report = new LimeReport::ReportEngine(); - LimeReport::ReportEngine report; + std::cout << report->reportName().toStdString() << std::endl; std::cout << LIMEREPORT_VERSION_STR << std::endl; - return 0; + delete report; + return a.exec(); } diff --git a/recipes/limereport/config.yml b/recipes/limereport/config.yml index e70dfab2782c3..41f47d462d189 100644 --- a/recipes/limereport/config.yml +++ b/recipes/limereport/config.yml @@ -1,3 +1,3 @@ versions: - "1.5.88": + "1.7.4": folder: "all" From 062476e6bcd34953c16bbed3c626b99df4f85aec Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 6 Jun 2023 11:12:08 +0300 Subject: [PATCH 07/32] small updates --- recipes/limereport/all/CMakeLists.txt | 15 ----------- .../all/test_package/CMakeLists.txt | 6 ++++- .../all/test_package/backup/conanfile.py | 26 ------------------- 3 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 recipes/limereport/all/CMakeLists.txt delete mode 100644 recipes/limereport/all/test_package/backup/conanfile.py diff --git a/recipes/limereport/all/CMakeLists.txt b/recipes/limereport/all/CMakeLists.txt deleted file mode 100644 index ca4fe305f632c..0000000000000 --- a/recipes/limereport/all/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -if(BUILD_SHARED_LIBS) - if(MSVC) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - endif() -else() - add_definitions(-DLIMEREPORT_STATIC) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt index 138fd4583da92..f0b68ed20d8c6 100644 --- a/recipes/limereport/all/test_package/CMakeLists.txt +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -9,4 +9,8 @@ find_package(limereport REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} limereport::limereport) +target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Widgets + Qt${QT_VERSION_MAJOR}::PrintSupport + Qt${QT_VERSION_MAJOR}::Qml + Qt${QT_VERSION_MAJOR}::Sql limereport::limereport) diff --git a/recipes/limereport/all/test_package/backup/conanfile.py b/recipes/limereport/all/test_package/backup/conanfile.py deleted file mode 100644 index 5357702ccd250..0000000000000 --- a/recipes/limereport/all/test_package/backup/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -from conan import ConanFile -from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" - test_type = "explicit" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") \ No newline at end of file From 444f229b80d71f27dfa9dd1e3ad9dda2b763112d Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 6 Jun 2023 12:06:00 +0300 Subject: [PATCH 08/32] fix --- recipes/limereport/all/conanfile.py | 14 +++++--------- recipes/limereport/all/test_package/conanfile.py | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 2309eabdd7977..488b2b5db048b 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -1,9 +1,9 @@ -from conans import tools from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rm, rmdir from conan import ConanFile from conan.tools.layout import basic_layout -from conan.tools.microsoft import is_msvc, unix_path +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version from conan.tools.apple import fix_apple_shared_install_name import os @@ -12,7 +12,7 @@ class LimereportConan(ConanFile): name = "limereport" description = "Report generator for Qt Framework" homepage = "https://poppler.freedesktop.org/" - topics = ("conan", "limereport", "pdf", "report","qt") + topics = ("limereport", "pdf", "report","qt") license = "LGPL-3.0", "GPL-3.0" url = "https://github.com/conan-io/conan-center-index" settings = "os", "arch", "compiler", "build_type" @@ -74,7 +74,7 @@ def generate(self): tc.cache_variables["LIMEREPORT_STATIC"] = not self.options.shared if is_msvc(self): tc.variables["WINDOWS_BUILD"] = True - qt_major = tools.Version(self.deps_cpp_info["qt"].version).major + qt_major = Version(self.deps_cpp_info["qt"].version).major if qt_major == 6: tc.cache_variables["USE_QT6"] = True tc.cache_variables["ENABLE_ZINT"] = self.options.with_zint @@ -96,9 +96,5 @@ def package(self): fix_apple_shared_install_name(self) def package_info(self): - qt_major = tools.Version(self.deps_cpp_info["qt"].version).major + qt_major = Version(self.deps_cpp_info["qt"].version).major self.cpp_info.libs = ["limereport-qt{}".format(qt_major)] - # self.cpp_info.requires = ["qt::qtCore", "qt::qtGui", "qt::qtWidgets", "qt::qtPrintSupport", "qt::qtQml", "qt::qtSvg"] - # # self.cpp_info.names["cmake_find_package"] = ["limereport-qt{}".format(qt_major)] - # # self.cpp_info.names["cmake_find_package_multi"] = ["limereport-qt{}".format(qt_major)] - diff --git a/recipes/limereport/all/test_package/conanfile.py b/recipes/limereport/all/test_package/conanfile.py index 3d7cdb8e58f68..76ff27872680a 100644 --- a/recipes/limereport/all/test_package/conanfile.py +++ b/recipes/limereport/all/test_package/conanfile.py @@ -27,4 +27,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") \ No newline at end of file + self.run(bin_path, env="conanrun") From 874cb5b743a73e4f65cd84c9e494f8f429d17f57 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 6 Jun 2023 12:24:21 +0300 Subject: [PATCH 09/32] remove patches --- recipes/limereport/all/conanfile.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 488b2b5db048b..cab42c7c9aa35 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -1,5 +1,5 @@ from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps -from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rm, rmdir +from conan.tools.files import copy, get from conan import ConanFile from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc @@ -36,10 +36,6 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - - def export_sources(self): - export_conandata_patches(self) - @property def _minimum_compilers_version(self): return { @@ -84,7 +80,6 @@ def generate(self): def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() From ea2075e9e87465249db37f876e498eb9d1fb58df Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 6 Jun 2023 12:31:40 +0300 Subject: [PATCH 10/32] fix shared --- recipes/limereport/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index cab42c7c9aa35..3478ff3e101e0 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -22,7 +22,7 @@ class LimereportConan(ConanFile): "with_zint": [True, False] } default_options = { - "shared": True, + "shared": False, "fPIC": True, "with_zint": False, "qt:qtquickcontrols": True, From 23c711661117a6df8caa37ffa4a8fae212e796f8 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Tue, 6 Jun 2023 12:48:04 +0300 Subject: [PATCH 11/32] fix qt options --- recipes/limereport/all/conanfile.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 3478ff3e101e0..db7df296746c2 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -25,11 +25,10 @@ class LimereportConan(ConanFile): "shared": False, "fPIC": True, "with_zint": False, - "qt:qtquickcontrols": True, - "qt:qtquickcontrols2": True, - "qt:qtsvg": True, - "qt:qttools": True, - "qt:shared" : True + "qt/*:qtquickcontrols" : True, + "qt/*:qtquickcontrols2": True, + "qt/*:qtsvg": True, + "qt/*:qttools": True } def config_options(self): From c46ece0c8c7d136655263d1e4a763bb0ff07501f Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 26 Aug 2023 20:00:33 +0000 Subject: [PATCH 12/32] Update conanfile.py --- recipes/limereport/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index db7df296746c2..6de54199b6f74 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -52,12 +52,12 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - self.build_requires("libpng/1.6.39") + self.requires("libpng/[>=1.6 <1.7]") if self.options.with_zint: self.build_requires("zint/2.10.0") def requirements(self): - self.requires("qt/5.15.8") + self.requires("qt/5.15.9") def source(self): From 11b6c61a8b2deb390c1118a0e5f85bb12f725003 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 9 Sep 2023 21:31:51 +0000 Subject: [PATCH 13/32] Update conanfile.py --- recipes/limereport/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 6de54199b6f74..5314f852f135c 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -57,7 +57,7 @@ def build_requirements(self): self.build_requires("zint/2.10.0") def requirements(self): - self.requires("qt/5.15.9") + self.requires("qt/6.4.2") def source(self): From ce53010045dc9c0a6c7eda98da68a66ec9dec782 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 9 Sep 2023 21:53:06 +0000 Subject: [PATCH 14/32] Update conanfile.py --- recipes/limereport/all/conanfile.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 5314f852f135c..c29f9c484221a 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -25,10 +25,6 @@ class LimereportConan(ConanFile): "shared": False, "fPIC": True, "with_zint": False, - "qt/*:qtquickcontrols" : True, - "qt/*:qtquickcontrols2": True, - "qt/*:qtsvg": True, - "qt/*:qttools": True } def config_options(self): @@ -59,6 +55,12 @@ def build_requirements(self): def requirements(self): self.requires("qt/6.4.2") + def validate(self): + if Version(self.dependencies["qt"].ref.version) < "6.0.0": + if not (self.dependencies["qt"].options.quickcontrols and self.dependencies["qt"].options.quickcontrols2): + raise ConanInvalidConfiguration(f"{self.ref} requires qt quickcontrols and quickcontrols2") + if not (self.dependencies["qt"].options.svg and self.dependencies["qt"].options.tools): + raise ConanInvalidConfiguration(f"{self.ref} requires qt svg and tools") def source(self): get(self, **self.conan_data["sources"][self.version], From 01b1d1cf76d1191d16e45aff9ebcbc3d6d9bfd36 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 9 Sep 2023 21:55:41 +0000 Subject: [PATCH 15/32] Update conanfile.py --- recipes/limereport/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index c29f9c484221a..efb9b3d2aecae 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.microsoft import is_msvc from conan.tools.scm import Version from conan.tools.apple import fix_apple_shared_install_name +from conan.errors import ConanInvalidConfiguration import os From ec749233de3f9723508950784ef8b9937baf4ad3 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 9 Sep 2023 21:59:01 +0000 Subject: [PATCH 16/32] Update conanfile.py --- recipes/limereport/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index efb9b3d2aecae..5b2c172c906f2 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -58,9 +58,9 @@ def requirements(self): def validate(self): if Version(self.dependencies["qt"].ref.version) < "6.0.0": - if not (self.dependencies["qt"].options.quickcontrols and self.dependencies["qt"].options.quickcontrols2): + if not (self.dependencies["qt"].options.qtquickcontrols and self.dependencies["qt"].options.qtquickcontrols2): raise ConanInvalidConfiguration(f"{self.ref} requires qt quickcontrols and quickcontrols2") - if not (self.dependencies["qt"].options.svg and self.dependencies["qt"].options.tools): + if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): raise ConanInvalidConfiguration(f"{self.ref} requires qt svg and tools") def source(self): From 2c42f97768d3a32eeb660142e43126033ec86d9f Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 12 Oct 2023 19:28:50 +0000 Subject: [PATCH 17/32] Update conanfile.py --- recipes/limereport/all/conanfile.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 5b2c172c906f2..71c5b4eb8af4b 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -41,10 +41,6 @@ def _minimum_compilers_version(self): "apple-clang": "8" } - def configure(self): - if self.options.shared: - del self.options.fPIC - def layout(self): basic_layout(self, src_folder="src") From 3cebd7791e97e730a4d20853485f27d762bb33f4 Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 12 Oct 2023 19:31:46 +0000 Subject: [PATCH 18/32] rm_safe("fPIC") --- recipes/limereport/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 71c5b4eb8af4b..cdac899374d96 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -76,6 +76,8 @@ def generate(self): tc = CMakeDeps(self) tc.generate() + def configure(self): + self.options.rm_safe("fPIC") def build(self): cmake = CMake(self) From 64bad351b3fd9522fc8106af352204709ba3bb64 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 2 Feb 2024 20:27:45 +0300 Subject: [PATCH 19/32] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rubén Rincón Blanco --- recipes/limereport/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index cdac899374d96..5494bf6e3f5e5 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -47,7 +47,7 @@ def layout(self): def build_requirements(self): self.requires("libpng/[>=1.6 <1.7]") if self.options.with_zint: - self.build_requires("zint/2.10.0") + self.tool_requires("zint/2.10.0") def requirements(self): self.requires("qt/6.4.2") @@ -68,7 +68,7 @@ def generate(self): tc.cache_variables["LIMEREPORT_STATIC"] = not self.options.shared if is_msvc(self): tc.variables["WINDOWS_BUILD"] = True - qt_major = Version(self.deps_cpp_info["qt"].version).major + qt_major = Version(self.dependencies["qt"].ref.version).major if qt_major == 6: tc.cache_variables["USE_QT6"] = True tc.cache_variables["ENABLE_ZINT"] = self.options.with_zint @@ -91,5 +91,5 @@ def package(self): fix_apple_shared_install_name(self) def package_info(self): - qt_major = Version(self.deps_cpp_info["qt"].version).major + qt_major = Version(self.dependencies["qt"].ref.version).major self.cpp_info.libs = ["limereport-qt{}".format(qt_major)] From 38e6086d8ed90e16484013423a21ab7f81c1db84 Mon Sep 17 00:00:00 2001 From: jihadist Date: Fri, 2 Feb 2024 21:45:51 +0300 Subject: [PATCH 20/32] multiple review fixes --- recipes/limereport/all/conanfile.py | 39 ++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 5494bf6e3f5e5..86a84fb8895c7 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -1,7 +1,7 @@ -from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.files import copy, get +from conan.tools.build import check_min_cppstd from conan import ConanFile -from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc from conan.tools.scm import Version from conan.tools.apple import fix_apple_shared_install_name @@ -16,6 +16,7 @@ class LimereportConan(ConanFile): topics = ("limereport", "pdf", "report","qt") license = "LGPL-3.0", "GPL-3.0" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -28,24 +29,29 @@ class LimereportConan(ConanFile): "with_zint": False, } - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + @property + def _min_cppstd(self): + return 17 @property - def _minimum_compilers_version(self): + def _compilers_minimum_version(self): return { - "Visual Studio": "15", + "Visual Studio": "16", + "msvc": "192", "gcc": "8", "clang": "8", - "apple-clang": "8" + "apple-clang": "9.1", } + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + def layout(self): - basic_layout(self, src_folder="src") + cmake_layout(self, src_folder="src") def build_requirements(self): - self.requires("libpng/[>=1.6 <1.7]") + self.requires("libpng/1.6.40") if self.options.with_zint: self.tool_requires("zint/2.10.0") @@ -53,11 +59,20 @@ def requirements(self): self.requires("qt/6.4.2") def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if Version(self.dependencies["qt"].ref.version) < "6.0.0": if not (self.dependencies["qt"].options.qtquickcontrols and self.dependencies["qt"].options.qtquickcontrols2): - raise ConanInvalidConfiguration(f"{self.ref} requires qt quickcontrols and quickcontrols2") + raise ConanInvalidConfiguration(f"{self.ref} requires qt:quickcontrols=True and qt:quickcontrols2=True") + elif not (self.dependencies["qt"].options.qtdeclarative): + raise ConanInvalidConfiguration(f"{self.ref} requires qt:qtdeclarative=True") if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): - raise ConanInvalidConfiguration(f"{self.ref} requires qt svg and tools") + raise ConanInvalidConfiguration(f"{self.ref} requires qt:qtsvg=True and qt:qttools=True") def source(self): get(self, **self.conan_data["sources"][self.version], From 02743f09a8a75a6a7b6a771a54625211c174e16f Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 3 Feb 2024 13:54:17 +0300 Subject: [PATCH 21/32] libpng bump --- recipes/limereport/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 86a84fb8895c7..f0fa81b048167 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -51,7 +51,7 @@ def layout(self): cmake_layout(self, src_folder="src") def build_requirements(self): - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_zint: self.tool_requires("zint/2.10.0") From 2fcbf85e96f690592917d71c1af11a12be7f52b4 Mon Sep 17 00:00:00 2001 From: atom Date: Tue, 20 Feb 2024 12:34:49 +0300 Subject: [PATCH 22/32] Minor fixes --- recipes/limereport/all/conanfile.py | 5 +++-- .../limereport/all/test_package/CMakeLists.txt | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index f0fa81b048167..d6dc7fd904177 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -12,7 +12,7 @@ class LimereportConan(ConanFile): name = "limereport" description = "Report generator for Qt Framework" - homepage = "https://poppler.freedesktop.org/" + homepage = "https://limereport.ru" topics = ("limereport", "pdf", "report","qt") license = "LGPL-3.0", "GPL-3.0" url = "https://github.com/conan-io/conan-center-index" @@ -92,7 +92,8 @@ def generate(self): tc.generate() def configure(self): - self.options.rm_safe("fPIC") + if self.options.shared: + self.options.rm_safe("fPIC") def build(self): cmake = CMake(self) diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt index f0b68ed20d8c6..0f06e1e67a466 100644 --- a/recipes/limereport/all/test_package/CMakeLists.txt +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -1,16 +1,24 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(limereport REQUIRED) +if(QT_VERSION VERSION_GREATER_EQUAL "6.0.0") + find_package(Qt6 COMPONENTS Core Widgets REQUIRED CONFIG) +elseif(QT_VERSION VERSION_GREATER_EQUAL "5.0.0") + find_package(Qt5 COMPONENTS Core Widgets REQUIRED CONFIG) +else() + message(FATAL_ERROR "Qt < 5 not yet supported in this recipe") +endif() add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Core +target_link_libraries(${PROJECT_NAME} + Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Qml - Qt${QT_VERSION_MAJOR}::Sql limereport::limereport) + Qt${QT_VERSION_MAJOR}::Sql limereport::limereport) \ No newline at end of file From 62c2f241e6d155355d7ce01c139e71ef265ab204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Mon, 3 Jun 2024 21:57:41 +0200 Subject: [PATCH 23/32] Newline at eof --- recipes/limereport/all/test_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt index 0f06e1e67a466..33721c2a45fb5 100644 --- a/recipes/limereport/all/test_package/CMakeLists.txt +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -21,4 +21,4 @@ target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Qml - Qt${QT_VERSION_MAJOR}::Sql limereport::limereport) \ No newline at end of file + Qt${QT_VERSION_MAJOR}::Sql limereport::limereport) From a47b710467b3e8bbd399ed458de539b4b4ba24e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Mon, 3 Jun 2024 22:59:56 +0200 Subject: [PATCH 24/32] Recipe cleanup --- recipes/limereport/all/conanfile.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index d6dc7fd904177..9762e5205ddaf 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -46,18 +46,22 @@ def _compilers_minimum_version(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") - def build_requirements(self): + def requirements(self): + self.requires("qt/6.4.2") self.requires("libpng/1.6.42") + + def build_requirements(self): if self.options.with_zint: self.tool_requires("zint/2.10.0") - def requirements(self): - self.requires("qt/6.4.2") - def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) @@ -68,11 +72,11 @@ def validate(self): ) if Version(self.dependencies["qt"].ref.version) < "6.0.0": if not (self.dependencies["qt"].options.qtquickcontrols and self.dependencies["qt"].options.qtquickcontrols2): - raise ConanInvalidConfiguration(f"{self.ref} requires qt:quickcontrols=True and qt:quickcontrols2=True") + raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:quickcontrols=True' and -o='qt/*:quickcontrols2=True'") elif not (self.dependencies["qt"].options.qtdeclarative): - raise ConanInvalidConfiguration(f"{self.ref} requires qt:qtdeclarative=True") + raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtdeclarative=True'") if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): - raise ConanInvalidConfiguration(f"{self.ref} requires qt:qtsvg=True and qt:qttools=True") + raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtsvg=True' and -o='qt/*:qttools=True'") def source(self): get(self, **self.conan_data["sources"][self.version], @@ -91,10 +95,6 @@ def generate(self): tc = CMakeDeps(self) tc.generate() - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - def build(self): cmake = CMake(self) cmake.configure() From 52cbf78b20e01ade70f4ae1a8eaf2ea12fa0f3df Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 6 Jun 2024 19:45:55 +0200 Subject: [PATCH 25/32] Simplify test package Signed-off-by: Uilian Ries --- recipes/limereport/all/conanfile.py | 33 +++++++++++-------- .../all/test_package/CMakeLists.txt | 24 +++----------- .../all/test_package/test_package.cpp | 17 +++------- 3 files changed, 28 insertions(+), 46 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 9762e5205ddaf..d49b519747c5e 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -4,7 +4,6 @@ from conan import ConanFile from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -from conan.tools.apple import fix_apple_shared_install_name from conan.errors import ConanInvalidConfiguration import os @@ -43,10 +42,14 @@ def _compilers_minimum_version(self): "apple-clang": "9.1", } + @property + def _qt_version_major(self): + return Version(self.dependencies["qt"].ref.version).major + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -55,8 +58,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("qt/6.4.2") - self.requires("libpng/1.6.42") + # QString included in Irglobal.h and Limereport expects be running Qt on customer side + self.requires("qt/6.7.1", transitive_headers=True, transitive_libs=True) def build_requirements(self): if self.options.with_zint: @@ -69,10 +72,10 @@ def validate(self): if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) - if Version(self.dependencies["qt"].ref.version) < "6.0.0": + ) + if self._qt_version_major == 5: if not (self.dependencies["qt"].options.qtquickcontrols and self.dependencies["qt"].options.qtquickcontrols2): - raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:quickcontrols=True' and -o='qt/*:quickcontrols2=True'") + raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtquickcontrols=True' and -o='qt/*:qtquickcontrols2=True'") elif not (self.dependencies["qt"].options.qtdeclarative): raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtdeclarative=True'") if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): @@ -87,9 +90,7 @@ def generate(self): tc.cache_variables["LIMEREPORT_STATIC"] = not self.options.shared if is_msvc(self): tc.variables["WINDOWS_BUILD"] = True - qt_major = Version(self.dependencies["qt"].ref.version).major - if qt_major == 6: - tc.cache_variables["USE_QT6"] = True + tc.cache_variables["USE_QT6"] = self._qt_version_major == 6 tc.cache_variables["ENABLE_ZINT"] = self.options.with_zint tc.generate() tc = CMakeDeps(self) @@ -99,13 +100,17 @@ def build(self): cmake = CMake(self) cmake.configure() cmake.build() - + def package(self): copy(self, "COPYING*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() - fix_apple_shared_install_name(self) def package_info(self): - qt_major = Version(self.dependencies["qt"].ref.version).major - self.cpp_info.libs = ["limereport-qt{}".format(qt_major)] + self.cpp_info.libs = [f"limereport-qt{self._qt_version_major}"] + self.cpp_info.requires = ["qt::qtCore", "qt::qtWidgets", "qt::qtQml", "qt::qtXml", "qt::qtSql", + "qt::qtPrintSupport", "qt::qtSvg", "qt::qtUiTools"] + if self.options.with_zint: + self.cpp_info.requires.append("zint::zint") + if self.options.shared: + self.cpp_info.defines.append("LIMEREPORT_IMPORTS") diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt index 33721c2a45fb5..6db4f51d9220e 100644 --- a/recipes/limereport/all/test_package/CMakeLists.txt +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -1,24 +1,10 @@ cmake_minimum_required(VERSION 3.15) -project(test_package) +project(test_package CXX) -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_VERBOSE_MAKEFILE TRUE) -find_package(limereport REQUIRED) - -if(QT_VERSION VERSION_GREATER_EQUAL "6.0.0") - find_package(Qt6 COMPONENTS Core Widgets REQUIRED CONFIG) -elseif(QT_VERSION VERSION_GREATER_EQUAL "5.0.0") - find_package(Qt5 COMPONENTS Core Widgets REQUIRED CONFIG) -else() - message(FATAL_ERROR "Qt < 5 not yet supported in this recipe") -endif() +find_package(limereport CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) - -target_link_libraries(${PROJECT_NAME} - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::PrintSupport - Qt${QT_VERSION_MAJOR}::Qml - Qt${QT_VERSION_MAJOR}::Sql limereport::limereport) +target_link_libraries(${PROJECT_NAME} limereport::limereport) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/limereport/all/test_package/test_package.cpp b/recipes/limereport/all/test_package/test_package.cpp index 16c96e622e783..a10ab64ab7245 100644 --- a/recipes/limereport/all/test_package/test_package.cpp +++ b/recipes/limereport/all/test_package/test_package.cpp @@ -1,24 +1,15 @@ -#include -#include +#include #include #include #include int main(int argc, char* argv[]) { - QGuiApplication a(argc, argv); - - if ((!QCoreApplication::instance())) { - qFatal("QPrinter: Must construct a QCoreApplication before a QPrinter"); - } else { - qInfo("CoreApplication exists"); - } - auto report = new LimeReport::ReportEngine(); - std::cout << report->reportName().toStdString() << std::endl; - std::cout << LIMEREPORT_VERSION_STR << std::endl; + std::cout << "limereport: " << report->reportName().toStdString() << std::endl; + std::cout << "LIMEREPORT_VERSION_STR: " << LIMEREPORT_VERSION_STR << std::endl; delete report; - return a.exec(); + return EXIT_SUCCESS; } From 2fb71f9f02a3e0a0aaed7b019a902eada9c71c71 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 7 Jun 2024 15:23:27 +0300 Subject: [PATCH 26/32] remove quickcontrols --- recipes/limereport/all/conanfile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index d49b519747c5e..336eda4eaf2ba 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -73,11 +73,8 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if self._qt_version_major == 5: - if not (self.dependencies["qt"].options.qtquickcontrols and self.dependencies["qt"].options.qtquickcontrols2): - raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtquickcontrols=True' and -o='qt/*:qtquickcontrols2=True'") - elif not (self.dependencies["qt"].options.qtdeclarative): - raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtdeclarative=True'") + if not (self.dependencies["qt"].options.qtdeclarative): + raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtdeclarative=True'") if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtsvg=True' and -o='qt/*:qttools=True'") From 74c1de09baef979aeed60ef8199e92cbd022f1ad Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 7 Jun 2024 14:38:02 +0200 Subject: [PATCH 27/32] Remove CMAKE_VERBOSE_MAKEFILE Signed-off-by: Uilian Ries --- recipes/limereport/all/test_package/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt index 6db4f51d9220e..08e6667600f91 100644 --- a/recipes/limereport/all/test_package/CMakeLists.txt +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 3.15) project(test_package CXX) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - find_package(limereport CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) From b35404911d4f54e4f0cc37753b94e8c195690ac0 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 11 Jun 2024 11:22:42 +0200 Subject: [PATCH 28/32] Use qt version ranges --- recipes/limereport/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 336eda4eaf2ba..6bd8c76da7c03 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -59,7 +59,7 @@ def layout(self): def requirements(self): # QString included in Irglobal.h and Limereport expects be running Qt on customer side - self.requires("qt/6.7.1", transitive_headers=True, transitive_libs=True) + self.requires("qt/[>=6.0 <7]", transitive_headers=True, transitive_libs=True) def build_requirements(self): if self.options.with_zint: From 01628c1031d233604cf0d3be7ce4217bdb09c53a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 11 Jun 2024 14:03:04 +0200 Subject: [PATCH 29/32] Accept Qt5 as minimal version due compatiblity --- recipes/limereport/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 6bd8c76da7c03..af56154440a06 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -59,7 +59,7 @@ def layout(self): def requirements(self): # QString included in Irglobal.h and Limereport expects be running Qt on customer side - self.requires("qt/[>=6.0 <7]", transitive_headers=True, transitive_libs=True) + self.requires("qt/[>=5.15 <7]", transitive_headers=True, transitive_libs=True) def build_requirements(self): if self.options.with_zint: From 2793e6f057a22875a2dbc49edabaa9e0c7a5f161 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 12 Jun 2024 12:32:02 +0200 Subject: [PATCH 30/32] fix zint as requirement Signed-off-by: Uilian Ries --- recipes/limereport/all/conanfile.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index af56154440a06..7025dc400f932 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -1,5 +1,5 @@ from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import copy, get +from conan.tools.files import copy, get, replace_in_file from conan.tools.build import check_min_cppstd from conan import ConanFile from conan.tools.microsoft import is_msvc @@ -60,10 +60,8 @@ def layout(self): def requirements(self): # QString included in Irglobal.h and Limereport expects be running Qt on customer side self.requires("qt/[>=5.15 <7]", transitive_headers=True, transitive_libs=True) - - def build_requirements(self): if self.options.with_zint: - self.tool_requires("zint/2.10.0") + self.requires("zint/2.10.0") def validate(self): if self.settings.compiler.cppstd: @@ -77,6 +75,8 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtdeclarative=True'") if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtsvg=True' and -o='qt/*:qttools=True'") + if self.options.with_zint and not self.dependencies["zint"].options.with_qt: + raise ConanInvalidConfiguration(f"{self.ref} option with_zint=True requires -o 'zint/*:with_qt=True'") def source(self): get(self, **self.conan_data["sources"][self.version], @@ -93,7 +93,12 @@ def generate(self): tc = CMakeDeps(self) tc.generate() + def _patch_sources(self): + # Avoid using vendozied zint + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(3rdparty)", "") + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() From b5cf1843fe3d76def794bb2af175d2a2c121f02b Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 12 Jun 2024 12:35:11 +0200 Subject: [PATCH 31/32] fix bad indentation Signed-off-by: Uilian Ries --- recipes/limereport/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 7025dc400f932..9c8e83eec845f 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -76,7 +76,7 @@ def validate(self): if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtsvg=True' and -o='qt/*:qttools=True'") if self.options.with_zint and not self.dependencies["zint"].options.with_qt: - raise ConanInvalidConfiguration(f"{self.ref} option with_zint=True requires -o 'zint/*:with_qt=True'") + raise ConanInvalidConfiguration(f"{self.ref} option with_zint=True requires -o 'zint/*:with_qt=True'") def source(self): get(self, **self.conan_data["sources"][self.version], From d34c4a8328edf273e55a34c9ee73bf85cc6b88d9 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 12 Jun 2024 12:41:02 +0200 Subject: [PATCH 32/32] copy all licenses files Signed-off-by: Uilian Ries --- recipes/limereport/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py index 9c8e83eec845f..60455f5993eb1 100644 --- a/recipes/limereport/all/conanfile.py +++ b/recipes/limereport/all/conanfile.py @@ -104,7 +104,8 @@ def build(self): cmake.build() def package(self): - copy(self, "COPYING*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install()