lordgamez commented on code in PR #2218: URL: https://github.com/apache/nifi-minifi-cpp/pull/2218#discussion_r3673058857
########## thirdparty/iodbc/all/conanfile.py: ########## @@ -0,0 +1,95 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout + +required_conan_version = ">=2.0" + + +class IodbcConan(ConanFile): + name = "iodbc" + description = "iODBC is a platform-independent ODBC driver manager (LGPL, with linking exception)" + license = "LGPL-2.0-or-later" + url = "https://github.com/openlink/iODBC" + homepage = "https://www.iodbc.org/" + topics = ("odbc", "driver-manager", "database") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("iodbc does not support Windows; use the system ODBC driver manager instead") + + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.configure_args.append("--with-pic") + tc.configure_args.append("--enable-static") + tc.configure_args.append("--disable-shared") + # Matches the from-source build (see cmake/BundledIodbc.cmake) + tc.extra_cflags.append("-std=gnu17") + tc.generate() Review Comment: Fixed in https://github.com/apache/nifi-minifi-cpp/pull/2218/commits/7fd92d41a48b6cd5a20a8e37906ae3cbe31452f8 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
