From d6ccf1a01f049e53d29525eaf3d2f28f60db3de2 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 2 Nov 2023 18:30:05 +0200 Subject: [PATCH] firebird: bump to v5.0.0-rc v5 added a --enable-client-only, which makes the recipe much saner. --- recipes/firebird/all/conandata.yml | 6 +- recipes/firebird/all/conanfile.py | 91 +++++++++---------- recipes/firebird/all/licenses/LICENSE-SfIO | 14 --- recipes/firebird/all/licenses/LICENSE-abseil | 10 -- recipes/firebird/all/licenses/LICENSE-btyacc | 14 --- recipes/firebird/all/licenses/LICENSE-cloop | 18 ---- .../firebird/all/licenses/LICENSE-decNumber | 14 --- .../firebird/all/licenses/LICENSE-editline | 29 ------ .../firebird/all/licenses/LICENSE-libtomcrypt | 29 ------ .../firebird/all/licenses/LICENSE-libtommath | 4 - recipes/firebird/all/licenses/LICENSE-re2 | 27 ------ recipes/firebird/all/licenses/LICENSE-ttmath | 28 ------ recipes/firebird/config.yml | 2 +- 13 files changed, 47 insertions(+), 239 deletions(-) delete mode 100644 recipes/firebird/all/licenses/LICENSE-SfIO delete mode 100644 recipes/firebird/all/licenses/LICENSE-abseil delete mode 100644 recipes/firebird/all/licenses/LICENSE-btyacc delete mode 100644 recipes/firebird/all/licenses/LICENSE-cloop delete mode 100644 recipes/firebird/all/licenses/LICENSE-decNumber delete mode 100644 recipes/firebird/all/licenses/LICENSE-editline delete mode 100644 recipes/firebird/all/licenses/LICENSE-libtomcrypt delete mode 100644 recipes/firebird/all/licenses/LICENSE-libtommath delete mode 100644 recipes/firebird/all/licenses/LICENSE-re2 delete mode 100644 recipes/firebird/all/licenses/LICENSE-ttmath diff --git a/recipes/firebird/all/conandata.yml b/recipes/firebird/all/conandata.yml index 2febd73d3ff0b1..02af7ad6cc7ce8 100644 --- a/recipes/firebird/all/conandata.yml +++ b/recipes/firebird/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "4.0.3": - url: "https://github.com/FirebirdSQL/firebird/archive/refs/tags/v4.0.3.tar.gz" - sha256: "90b799043c83325479989b1f44116d1f0112f77c5def4bb452470bf7a0dcc138" + "5.0.0-rc1": + url: "https://github.com/FirebirdSQL/firebird/releases/download/v5.0.0-RC1/Firebird-5.0.0.1227-ReleaseCandidate1-source.tar.xz" + sha256: "647710a4ccba7dbbb2d0fb14bf6e8a967765b088c3d1c4b5925679a281792a38" diff --git a/recipes/firebird/all/conanfile.py b/recipes/firebird/all/conanfile.py index d73f58bacb9513..cb5a17da45408c 100644 --- a/recipes/firebird/all/conanfile.py +++ b/recipes/firebird/all/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import copy, get, chdir, replace_in_file +from conan.tools.files import copy, get, chdir from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.layout import basic_layout from conan.tools.microsoft import unix_path @@ -24,9 +24,6 @@ class FirebirdConan(ConanFile): package_type = "shared-library" settings = "os", "arch", "compiler", "build_type" - def export_sources(self): - copy(self, "LICENSE-*", self.recipe_folder, self.export_sources_folder) - def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") @@ -35,26 +32,33 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - # https://github.com/FirebirdSQL/firebird/tree/v4.0.2/extern - # TODO: should potentially replace these vendored libraries with Conan packages: - # - btyacc - # - editline - # - abseil (for int128) - # - libtommath - # - re2 - # Not currently available in ConanCenter: - # - cloop - # - decNumber - # - libtomcrypt - # - SfIO - # - ttmath - self.requires("zlib/[>=1.2.11 <2]") + # Based on the following, with CLIENT_ONLY_FLG=Y + # https://github.com/FirebirdSQL/firebird/blob/v5.0.0-RC1/configure.ac + # https://github.com/FirebirdSQL/firebird/blob/v5.0.0-RC1/builds/posix/Makefile.in#L185-L239 self.requires("icu/73.2") self.requires("termcap/1.3.1") + # TODO: should potentially unvendor these: + # https://github.com/FirebirdSQL/firebird/tree/v5.0.0-RC1/extern + # - SfIO + # - boost + # - btyacc + # - cloop + # - decNumber + # - editline + # - icu + # - absl (for int128) + # - libcds + # - libtomcrypt + # - libtommath + # - re2 + # - ttmath + # - zlib def validate(self): - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration(f"{self.ref} recipe is not yet supported on {self.settings.os}.") + if self.settings.os == "Windows": + raise ConanInvalidConfiguration( + f"{self.ref} recipe is not yet supported on Windows. Contributions are welcome." + ) def build_requirements(self): self.tool_requires("libtool/2.4.7") @@ -69,34 +73,25 @@ def generate(self): env = VirtualRunEnv(self) env.generate(scope="build") tc = AutotoolsToolchain(self) + tc.configure_args.append("--enable-client-only") + # Disabled because test_package fails with "double free or corruption (out), Aborted (core dumped)" + # if self.settings.build_type == "Debug": + # tc.configure_args.append("--enable-developer") tc.configure_args.append("--with-builtin-tommath") tc.configure_args.append("--with-builtin-tomcrypt") - # Reduce the amount of warnings - tc.extra_cxxflags.append("-Wno-unused-result") + tc.configure_args.append(f"--with-termlib={self.dependencies['termcap'].package_folder}") tc.extra_ldflags += [ "-L{}".format(unix_path(self, self.dependencies[dep].cpp_info.libdir)) - for dep in ["zlib", "icu", "termcap"] + for dep in ["icu", "termcap"] ] tc.generate() deps = AutotoolsDeps(self) deps.generate() - def _patch_sources(self): - # Disable building of examples, plugins and executables. - # Only executables required for the build are included. - # https://github.com/FirebirdSQL/firebird/blob/v4.0.2/builds/posix/Makefile.in#L281-L305 - posix_makefile = os.path.join(self.source_folder, "builds/posix/Makefile.in") - for target in ["examples", "plugins"]: - replace_in_file(self, posix_makefile, f"$(MAKE) {target}", "") - replace_in_file(self, posix_makefile, "$(MAKE) utilities", "$(MAKE) isql gbak gfix udfsupport") - def build(self): - self._patch_sources() with chdir(self, self.source_folder): autotools = Autotools(self) - # https://github.com/FirebirdSQL/firebird/blob/v4.0.3/autogen.sh#L45-L59 - autotools.autoreconf() - self.run("libtoolize --install --copy --force") + # self.run("NOCONFIGURE=1 ./autogen.sh") autotools.configure() autotools.make() @@ -105,22 +100,22 @@ def package(self): copy(self, license_file, src=os.path.join(self.source_folder, "builds", "install", "misc"), dst=os.path.join(self.package_folder, "licenses")) - copy(self, "LICENSE-*", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses"), - keep_path=False) - copy(self,"*", - src=os.path.join(self.source_folder, f"gen/{self.settings.build_type}/firebird/lib"), - dst=os.path.join(self.package_folder, "lib")) - copy(self, "*", - src=os.path.join(self.source_folder, "src/include"), - dst=os.path.join(self.package_folder, "include")) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="dist") + # build_type = "Debug" if self.settings.build_type == "Debug" else "Release" + build_type = "Release" + dist_root = os.path.join(self.source_folder, "gen", build_type, "firebird") + copy(self,"*", os.path.join(dist_root, "include"), os.path.join(self.package_folder, "include")) + copy(self,"*", os.path.join(dist_root, "lib"), os.path.join(self.package_folder, "lib")) + copy(self,"*", os.path.join(dist_root, "bin"), os.path.join(self.package_folder, "bin")) fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.set_property("pkg_config_name", "firebird") - - self.cpp_info.libs = ["fbclient", "ib_util", "decFloat", "edit", "re2", "tomcrypt", "tommath"] + self.cpp_info.libs = ["fbclient"] + # TODO: unvendor + self.cpp_info.libs += ["tomcrypt", "tommath"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "m", "pthread"]) diff --git a/recipes/firebird/all/licenses/LICENSE-SfIO b/recipes/firebird/all/licenses/LICENSE-SfIO deleted file mode 100644 index 3bad904aa79ca7..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-SfIO +++ /dev/null @@ -1,14 +0,0 @@ -This product contains certain software code or other information -("AT&T Software") proprietary to AT&T Corp. ("AT&T"). -The AT&T Software is provided to you "AS IS". YOU ASSUME TOTAL -RESPONSIBILITY AND RISK FOR USE OF THE AT&T SOFTWARE. -AT&T DOES NOT MAKE, AND EXPRESSLY DISCLAIMS, ANY EXPRESS OR -IMPLIED WARRANTIES OF ANY KIND WHATSOEVER, INCLUDING, -WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR -FITNESS FOR A PARTICULAR PURPOSE, WARRANTIES OF TITLE OR -NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS, -ANY WARRANTIES ARISING BY USAGE OF TRADE, COURSE OF DEALING OR -COURSE OF PERFORMANCE, OR ANY WARRANTY THAT THE AT&T SOFTWARE -IS "ERROR FREE" OR WILL MEET YOUR REQUIREMENTS. - -All rights reserved. AT&T is a registered trademark of AT&T Corp. diff --git a/recipes/firebird/all/licenses/LICENSE-abseil b/recipes/firebird/all/licenses/LICENSE-abseil deleted file mode 100644 index 31303c6c4c01d1..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-abseil +++ /dev/null @@ -1,10 +0,0 @@ -Copyright 2019 The Abseil Authors. -Licensed 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 - https://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. diff --git a/recipes/firebird/all/licenses/LICENSE-btyacc b/recipes/firebird/all/licenses/LICENSE-btyacc deleted file mode 100644 index 6bd31b06a49f7d..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-btyacc +++ /dev/null @@ -1,14 +0,0 @@ - by Chris Dodd and Vadim Maslov - -In English: BtYacc is freeware. BtYacc is distributed with -no warranty whatsoever. The author and any other contributors -take no responsibility for any and all consequences of its use. - -In Legalese: LIMITATION OF LIABILITY. NEITHER SIBER SYSTEMS -NOR ANY OF ITS LICENSORS NOR ANY BTYACC CONTRIBUTOR SHALL BE -LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL -DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR -DATA USE, CAUSED BY BTYACC AND INCURRED BY CUSTOMER OR ANY -THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN -IF SIBER SYSTEMS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. diff --git a/recipes/firebird/all/licenses/LICENSE-cloop b/recipes/firebird/all/licenses/LICENSE-cloop deleted file mode 100644 index d72bfdd8510205..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-cloop +++ /dev/null @@ -1,18 +0,0 @@ -The contents of this file are subject to the Initial -Developer's Public License Version 1.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.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. - -Software distributed under the License is distributed AS IS, -WITHOUT WARRANTY OF ANY KIND, either express or implied. -See the License for the specific language governing rights -and limitations under the License. - -The Original Code was created by Alexander Peshkov. - -Copyright (c) 2021 Alexander Peshkov -and all contributors signed below. - -All Rights Reserved. -Contributor(s): ______________________________________. diff --git a/recipes/firebird/all/licenses/LICENSE-decNumber b/recipes/firebird/all/licenses/LICENSE-decNumber deleted file mode 100644 index a2b947e5a6c80b..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-decNumber +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) IBM Corporation, 2000, 2010. All rights reserved. - -This software is made available under the terms of the -ICU License -- ICU 1.8.1 and later. - -The description and User's Guide ("The decNumber C Library") for -this software is called decNumber.pdf. This document is -available, together with arithmetic and format specifications, -testcases, and Web links, on the General Decimal Arithmetic page. - -Please send comments, suggestions, and corrections to the author: - mfc@uk.ibm.com - Mike Cowlishaw, IBM Fellow - IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK diff --git a/recipes/firebird/all/licenses/LICENSE-editline b/recipes/firebird/all/licenses/LICENSE-editline deleted file mode 100644 index 7f413da18b41e8..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-editline +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Christos Zoulas of Cornell University. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/recipes/firebird/all/licenses/LICENSE-libtomcrypt b/recipes/firebird/all/licenses/LICENSE-libtomcrypt deleted file mode 100644 index 07f8582bfdc43e..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-libtomcrypt +++ /dev/null @@ -1,29 +0,0 @@ -LibTomCrypt is licensed under DUAL licensing terms. - -Choose and use the license of your needs. - -[LICENSE #1] - -LibTomCrypt is public domain. As should all quality software be. - -Tom St Denis - -[/LICENSE #1] - -[LICENSE #2] - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - -[/LICENSE #2] diff --git a/recipes/firebird/all/licenses/LICENSE-libtommath b/recipes/firebird/all/licenses/LICENSE-libtommath deleted file mode 100644 index 2da58bf1e5876c..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-libtommath +++ /dev/null @@ -1,4 +0,0 @@ -LibTomMath is hereby released into the Public Domain. - --- Tom St Denis - diff --git a/recipes/firebird/all/licenses/LICENSE-re2 b/recipes/firebird/all/licenses/LICENSE-re2 deleted file mode 100644 index 2b47abe0a75dd2..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-re2 +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The RE2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/recipes/firebird/all/licenses/LICENSE-ttmath b/recipes/firebird/all/licenses/LICENSE-ttmath deleted file mode 100644 index 60cd376d5d9ef9..00000000000000 --- a/recipes/firebird/all/licenses/LICENSE-ttmath +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2006-2012, Tomasz Sowa -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name Tomasz Sowa nor the names of contributors to this - project may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. diff --git a/recipes/firebird/config.yml b/recipes/firebird/config.yml index 404a7ddf18bdf4..035f8f5a44566b 100644 --- a/recipes/firebird/config.yml +++ b/recipes/firebird/config.yml @@ -1,3 +1,3 @@ versions: - "4.0.3": + "5.0.0-rc1": folder: all