From 3772e95b01f1ca15e36094b5b58003570539ff68 Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:17:06 -0500 Subject: [PATCH 01/16] Fix shared + cxx in 2.5.1+ --- recipes/mpdecimal/2.5.x/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index ce8610550b172..c899cfd7cf051 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -57,7 +57,7 @@ def validate(self): if is_msvc(self) and self.settings.arch not in ("x86", "x86_64"): raise ConanInvalidConfiguration( f"{self.ref} currently does not supported {self.settings.arch}. Contributions are welcomed") - if self.options.cxx: + if self.options.cxx and Version(self.version) < "2.5.1": if self.options.shared and self.settings.os == "Windows": raise ConanInvalidConfiguration( "A shared libmpdec++ is not possible on Windows (due to non-exportable thread local storage)") @@ -240,4 +240,4 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libmpdecimal++"].system_libs = ["pthread"] if self.options.shared and Version(self.version) >= "2.5.1": - self.cpp_info.components["libmpdecimal"].defines = ["MPDECIMALXX_DLL"] + self.cpp_info.components["libmpdecimal++"].defines = ["MPDECIMALXX_DLL"] From 0c8f9eab0815a8e5d776cf04bf119bb023abfc13 Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:17:49 -0500 Subject: [PATCH 02/16] Remove automake dependency --- recipes/mpdecimal/2.5.x/conanfile.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index c899cfd7cf051..3f7e293557860 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -32,10 +32,6 @@ class MpdecimalConan(ConanFile): "cxx": True, } - @property - def _settings_build(self): - return getattr(self, "setings_build", self.settings) - def export_sources(self): export_conandata_patches(self) @@ -63,14 +59,10 @@ def validate(self): "A shared libmpdec++ is not possible on Windows (due to non-exportable thread local storage)") def build_requirements(self): - if is_msvc(self): - self.tool_requires("automake/1.16.5") - else: - # required to support windows as a build machine - if self._settings_build.os == "Windows": - self.win_bash = True - if not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.tool_requires("msys2/cci.latest") + if not is_msvc(self) and self.settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 6facdace18cd5761d2e428ca5c4dd34812a11183 Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:20:11 -0500 Subject: [PATCH 03/16] Simplify package() step --- recipes/mpdecimal/2.5.x/conanfile.py | 62 ++++++++-------------------- 1 file changed, 18 insertions(+), 44 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index 3f7e293557860..9678118bee896 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -102,12 +102,6 @@ def generate(self): deps.environment.append("LDXXFLAGS", ["-arch arm64"]) deps.generate() - @property - def _dist_folder(self): - vcbuild_folder = self.build_path / "vcbuild" - arch_ext = "32" if self.settings.arch == "x86" else "64" - return vcbuild_folder / f"dist{arch_ext}" - def _build_msvc(self): libmpdec_folder = self.source_path / "libmpdec" libmpdecpp_folder = self.source_path / "libmpdec++" @@ -132,19 +126,6 @@ def _build_msvc(self): dll="1" if self.options.shared else "0", )) - dist_folder = self._dist_folder - mkdir(self, dist_folder) - copy(self, "mpdecimal.h", libmpdec_folder, dist_folder) - if self.options.shared: - copy(self, f"libmpdec-{self.version}.dll", libmpdec_folder, dist_folder) - copy(self, f"libmpdec-{self.version}.dll.exp", libmpdec_folder, dist_folder) - copy(self, f"libmpdec-{self.version}.dll.lib", libmpdec_folder, dist_folder) - else: - copy(self, f"libmpdec-{self.version}.lib", libmpdec_folder, dist_folder) - if self.options.cxx: - copy(self, "decimal.hh", libmpdecpp_folder, dist_folder) - copy(self, f"libmpdec++-{self.version}.lib", libmpdecpp_folder, dist_folder) - @property def _shared_suffix(self): if is_apple_os(self): @@ -182,31 +163,24 @@ def build(self): autotools.make(target=libmpdecpp) def package(self): - pkg_dir = self.package_path - copy(self, "LICENSE.txt", src=self.source_folder, dst=pkg_dir / "licenses") - if is_msvc(self): - distfolder = self._dist_folder - copy(self, "vc*.h", src=self.source_path / "libmpdec", dst=pkg_dir / "include") - copy(self, "*.h", src=distfolder, dst=pkg_dir / "include") - if self.options.cxx: - copy(self, "*.hh", src=distfolder, dst=pkg_dir / "include") - copy(self, "*.lib", src=distfolder, dst=pkg_dir / "lib") - copy(self, "*.dll", src=distfolder, dst=pkg_dir / "bin") - else: - mpdecdir = self.build_path / "libmpdec" - mpdecppdir = self.build_path / "libmpdec++" - copy(self, "mpdecimal.h", src=mpdecdir, dst=pkg_dir / "include") - if self.options.cxx: - copy(self, "decimal.hh", src=mpdecppdir, dst=pkg_dir / "include") - builddirs = [mpdecdir] - if self.options.cxx: - builddirs.append(mpdecppdir) - for builddir in builddirs: - copy(self, "*.a", src=builddir, dst=pkg_dir / "lib") - copy(self, "*.so", src=builddir, dst=pkg_dir / "lib") - copy(self, "*.so.*", src=builddir, dst=pkg_dir / "lib") - copy(self, "*.dylib", src=builddir, dst=pkg_dir / "lib") - copy(self, "*.dll", src=builddir, dst=pkg_dir / "bin") + mpdecdir = os.path.join(self.source_folder, "libmpdec") + mpdecppdir = os.path.join(self.source_folder, "libmpdec++") + + copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "vccompat.h", src=mpdecdir, dst=os.path.join(self.package_folder, "include")) # 2.5.0/MSVC only + copy(self, "mpdecimal.h", src=mpdecdir, dst=os.path.join(self.package_folder, "include")) + if self.options.cxx: + copy(self, "decimal.hh", src=mpdecppdir, dst=os.path.join(self.package_folder, "include")) + builddirs = [mpdecdir] + if self.options.cxx: + builddirs.append(mpdecppdir) + for builddir in builddirs: + copy(self, "*.a", src=builddir, dst=os.path.join(self.package_folder, "lib")) + copy(self, "*.so", src=builddir, dst=os.path.join(self.package_folder, "lib")) + copy(self, "*.so.*", src=builddir, dst=os.path.join(self.package_folder, "lib")) + copy(self, "*.dylib", src=builddir, dst=os.path.join(self.package_folder, "lib")) + copy(self, "*.lib", src=builddir, dst=os.path.join(self.package_folder, "lib")) + copy(self, "*.dll", src=builddir, dst=os.path.join(self.package_folder, "bin")) def package_info(self): lib_pre_suf = ("", "") From 97acc819a3849823c81dc819f47e4341f842307c Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:21:22 -0500 Subject: [PATCH 04/16] Remove legacy patching --- recipes/mpdecimal/2.5.x/conanfile.py | 10 ++-- .../2.5.x/patches/0001-2.5.0-msvc-fixes.patch | 37 ++------------- .../2.5.x/patches/2.5.1-0001-msvc-fixes.patch | 47 ++----------------- 3 files changed, 12 insertions(+), 82 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index 9678118bee896..0a1a42d620cb3 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.gnu import AutotoolsToolchain, AutotoolsDeps, Autotools -from conan.tools.files import get, chdir, copy, export_conandata_patches, apply_conandata_patches, mkdir, rename +from conan.tools.files import get, chdir, copy, export_conandata_patches, apply_conandata_patches, rename from conan.tools.layout import basic_layout from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv @@ -9,6 +9,8 @@ from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration +import os + required_conan_version = ">=1.55.0" @@ -106,9 +108,6 @@ def _build_msvc(self): libmpdec_folder = self.source_path / "libmpdec" libmpdecpp_folder = self.source_path / "libmpdec++" - copy(self, "Makefile.vc", libmpdec_folder, self.build_path) - rename(self, self.build_path / "Makefile.vc", libmpdec_folder / "Makefile") - mpdec_target = "libmpdec-{}.{}".format(self.version, "dll" if self.options.shared else "lib") mpdecpp_target = "libmpdec++-{}.{}".format(self.version, "dll" if self.options.shared else "lib") @@ -117,6 +116,9 @@ def _build_msvc(self): builds.append([libmpdecpp_folder, mpdecpp_target]) for build_dir, target in builds: + copy(self, "Makefile.vc", build_dir, self.build_path) + rename(self, self.build_path / "Makefile.vc", build_dir / "Makefile") + with chdir(self, build_dir): self.run("""nmake -f Makefile.vc {target} MACHINE={machine} DEBUG={debug} DLL={dll}""".format( target=target, diff --git a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch index b7f440c6d6620..ea8a12666e1b1 100644 --- a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch @@ -1,6 +1,6 @@ --- libmpdec++/Makefile.vc +++ libmpdec++/Makefile.vc -@@ -16,15 +16,15 @@ +@@ -16,10 +16,10 @@ # LIBSHARED_CXX = libmpdec++-2.5.0.dll !if "$(DEBUG)" == "1" @@ -15,32 +15,9 @@ +OPT_SHARED = /Ox /GS /EHsc !endif - --MPD_CXXFLAGS = /W4 /nologo $(CONFIG) $(OPT) --MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) -+MPD_CXXFLAGS = /W4 /nologo $(CONFIG) $(OPT) $(CONAN_CXXFLAGS) $(CONAN_CFLAGS) -+MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) $(CONAN_LDFLAGS) - - -@@ -34,13 +34,13 @@ - OBJS = decimal.obj - - --$(LIBSTATIC_CXX): Makefile $(OBJS) -+$(LIBSTATIC_CXX): Makefile.vc $(OBJS) - -@if exist $@ del $(LIBSTATIC_CXX) - lib /out:$(LIBSTATIC_CXX) $(OBJS) - - - decimal.obj:\ --Makefile decimal.cc decimal.hh -+Makefile.vc decimal.cc decimal.hh - $(CXX) "-I." "-I$(SRCDIR)" $(MPD_CXXFLAGS) -c decimal.cc - - --- libmpdec/Makefile.vc +++ libmpdec/Makefile.vc -@@ -36,15 +36,15 @@ +@@ -36,10 +36,10 @@ !endif !if "$(DEBUG)" == "1" @@ -54,12 +31,4 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif - --MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) --MPD_CFLAGS_SHARED = /DBUILD_DLL /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) --MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) -+MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) $(CONAN_CFLAGS) -+MPD_CFLAGS_SHARED = /DBUILD_DLL /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) $(CONAN_CFLAGS) -+MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) $(CONAN_LDFLAGS) - - + \ No newline at end of file diff --git a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch index 96446677530c4..af3795f7641f7 100644 --- a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch @@ -1,6 +1,6 @@ --- libmpdec++/Makefile.vc +++ libmpdec++/Makefile.vc -@@ -16,15 +16,15 @@ +@@ -16,9 +16,9 @@ !if "$(DEBUG)" == "1" -OPT = /MTd /Od /Zi /EHsc @@ -14,40 +14,8 @@ +OPT_SHARED = /Ox /GS /EHsc !endif - --MPD_CXXFLAGS = /W4 /nologo $(OPT) --MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) --MPD_BIN_CXXFLAGS_SHARED = /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) -+MPD_CXXFLAGS = /W4 /nologo $(OPT) $(CONAN_CXXFLAGS) $(CONAN_CFLAGS) -+MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS) -+MPD_BIN_CXXFLAGS_SHARED = /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS) - - MPD_LDXXFLAGS= /DLL /MANIFEST $(LDXXFLAGS) -@@ -38,11 +38,11 @@ - SHARED_OBJS = .objs\decimal.obj - - --$(LIBSTATIC_CXX): Makefile $(OBJS) -+$(LIBSTATIC_CXX): Makefile.vc $(OBJS) - -@if exist $@ del $(LIBSTATIC_CXX) - lib /out:$(LIBSTATIC_CXX) $(OBJS) - --$(LIBSHARED_CXX): Makefile $(SHARED_OBJS) -+$(LIBSHARED_CXX): Makefile.vc $(SHARED_OBJS) - -@if exist $@ del $(LIBSHARED_CXX) - link $(MPD_LDXXFLAGS) /out:$(LIBSHARED_CXX) /implib:$(LIBIMPORT_CXX) /LIBPATH:$(SRCDIR) $(SHARED_OBJS) $(LIBIMPORT) - mt -manifest $(LIBSHARED_CXX).manifest -outputresource:$(LIBSHARED_CXX);2 -@@ -51,2 +51,2 @@ - decimal.obj:\ --Makefile decimal.cc decimal.hh -+Makefile.vc decimal.cc decimal.hh -@@ -55,2 +55,2 @@ - .objs\decimal.obj:\ --Makefile decimal.cc decimal.hh -+Makefile.vc decimal.cc decimal.hh ---- libmpdec/Makefile.vc +++ libmpdec/Makefile.vc -@@ -36,12 +36,12 @@ +@@ -36,9 +36,9 @@ !endif !if "$(DEBUG)" == "1" @@ -61,13 +29,4 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif - --MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) --MPD_CFLAGS_SHARED = /DBUILD_LIBMPDEC /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) -+MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) $(CONAN_CFLAGS) -+MPD_CFLAGS_SHARED = /DBUILD_LIBMPDEC /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) $(CONAN_CFLAGS) -@@ -52,1 +52,1 @@ --MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) -+MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) $(CONAN_LDFLAGS) - - + \ No newline at end of file From b35bf20bad8d861f8e8eef6b7d52ec9f5d661323 Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:22:20 -0500 Subject: [PATCH 05/16] Fix Mac shared build --- recipes/mpdecimal/2.5.x/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index 0a1a42d620cb3..073534125b850 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -99,9 +99,10 @@ def generate(self): tc.generate() deps = AutotoolsDeps(self) - if is_apple_os(self) and self.settings.arch == "armv8": - deps.environment.append("LDFLAGS", ["-arch arm64"]) - deps.environment.append("LDXXFLAGS", ["-arch arm64"]) + if is_apple_os(self): + arch = "arm64" if self.settings.arch == "armv8" else "x86_64" + deps.environment.append("LDFLAGS", [f"-arch {arch}"]) + deps.environment.append("LDXXFLAGS", [f"-arch {arch}"]) deps.generate() def _build_msvc(self): From 57dbd912a2515ffb84001a28510f8b6ee5066c5a Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:24:02 -0500 Subject: [PATCH 06/16] Fix end of file newline --- recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch | 1 - recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch | 1 - 2 files changed, 2 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch index ea8a12666e1b1..7d66fede9c26f 100644 --- a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch @@ -31,4 +31,3 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif - \ No newline at end of file diff --git a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch index af3795f7641f7..e2c6d2bbba130 100644 --- a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch @@ -29,4 +29,3 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif - \ No newline at end of file From 5fafa7c4a90ac3940e2097800aaa9a98a6d20338 Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:32:04 -0500 Subject: [PATCH 07/16] Conditionally pull from build or source folder --- recipes/mpdecimal/2.5.x/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index 073534125b850..cb272e4f2b9ff 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -166,8 +166,9 @@ def build(self): autotools.make(target=libmpdecpp) def package(self): - mpdecdir = os.path.join(self.source_folder, "libmpdec") - mpdecppdir = os.path.join(self.source_folder, "libmpdec++") + src_folder = self.source_folder if is_msvc(self) else self.build_folder + mpdecdir = os.path.join(src_folder, "libmpdec") + mpdecppdir = os.path.join(src_folder, "libmpdec++") copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "vccompat.h", src=mpdecdir, dst=os.path.join(self.package_folder, "include")) # 2.5.0/MSVC only From 2f28ef6ebe58ff2e6f3a922be90f42e88a7f1abc Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:40:22 -0500 Subject: [PATCH 08/16] Fix Windows lib name --- recipes/mpdecimal/2.5.x/conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index cb272e4f2b9ff..de9606b15b0d1 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -189,7 +189,10 @@ def package(self): def package_info(self): lib_pre_suf = ("", "") if is_msvc(self): - lib_pre_suf = ("lib", f"-{self.version}") + if self.options.shared: + lib_pre_suf = ("lib", f"-{self.version}.dll") + else: + lib_pre_suf = ("lib", f"-{self.version}") elif self.settings.os == "Windows": if self.options.shared: lib_pre_suf = ("", ".dll") From b378350be765d1c535ea5b75ad6469bc1dbec966 Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Sat, 9 Nov 2024 23:48:19 -0500 Subject: [PATCH 09/16] Fix patch --- recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch index 7d66fede9c26f..f984e47582f3f 100644 --- a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch @@ -31,3 +31,4 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif + From 8a4e46545858b3cd9acb8e96f5fcc4dc65aacaad Mon Sep 17 00:00:00 2001 From: Ahajha Date: Mon, 11 Nov 2024 10:03:57 -0500 Subject: [PATCH 10/16] Revert "Fix patch" This reverts commit b378350be765d1c535ea5b75ad6469bc1dbec966. --- recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch index f984e47582f3f..7d66fede9c26f 100644 --- a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch @@ -31,4 +31,3 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif - From 3f06a99c3f52783a016c959d76838a418d4a3450 Mon Sep 17 00:00:00 2001 From: Ahajha Date: Mon, 11 Nov 2024 10:04:14 -0500 Subject: [PATCH 11/16] Revert "Conditionally pull from build or source folder" This reverts commit 5fafa7c4a90ac3940e2097800aaa9a98a6d20338. --- recipes/mpdecimal/2.5.x/conanfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index de9606b15b0d1..7798673253439 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -166,9 +166,8 @@ def build(self): autotools.make(target=libmpdecpp) def package(self): - src_folder = self.source_folder if is_msvc(self) else self.build_folder - mpdecdir = os.path.join(src_folder, "libmpdec") - mpdecppdir = os.path.join(src_folder, "libmpdec++") + mpdecdir = os.path.join(self.source_folder, "libmpdec") + mpdecppdir = os.path.join(self.source_folder, "libmpdec++") copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "vccompat.h", src=mpdecdir, dst=os.path.join(self.package_folder, "include")) # 2.5.0/MSVC only From 1ef00532509b26fde7c5cc5b6a90642eb7966c01 Mon Sep 17 00:00:00 2001 From: Ahajha Date: Mon, 11 Nov 2024 10:04:27 -0500 Subject: [PATCH 12/16] Revert "Fix end of file newline" This reverts commit 57dbd912a2515ffb84001a28510f8b6ee5066c5a. --- recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch | 1 + recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch | 1 + 2 files changed, 2 insertions(+) diff --git a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch index 7d66fede9c26f..ea8a12666e1b1 100644 --- a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch @@ -31,3 +31,4 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif + \ No newline at end of file diff --git a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch index e2c6d2bbba130..af3795f7641f7 100644 --- a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch @@ -29,3 +29,4 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif + \ No newline at end of file From d0bc00730485f403491eb018fd649cc21f7be434 Mon Sep 17 00:00:00 2001 From: Ahajha Date: Mon, 11 Nov 2024 10:04:36 -0500 Subject: [PATCH 13/16] Revert "Remove legacy patching" This reverts commit 97acc819a3849823c81dc819f47e4341f842307c. --- recipes/mpdecimal/2.5.x/conanfile.py | 10 ++-- .../2.5.x/patches/0001-2.5.0-msvc-fixes.patch | 37 +++++++++++++-- .../2.5.x/patches/2.5.1-0001-msvc-fixes.patch | 47 +++++++++++++++++-- 3 files changed, 82 insertions(+), 12 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index 7798673253439..8edf70f4faa02 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.gnu import AutotoolsToolchain, AutotoolsDeps, Autotools -from conan.tools.files import get, chdir, copy, export_conandata_patches, apply_conandata_patches, rename +from conan.tools.files import get, chdir, copy, export_conandata_patches, apply_conandata_patches, mkdir, rename from conan.tools.layout import basic_layout from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv @@ -9,8 +9,6 @@ from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration -import os - required_conan_version = ">=1.55.0" @@ -109,6 +107,9 @@ def _build_msvc(self): libmpdec_folder = self.source_path / "libmpdec" libmpdecpp_folder = self.source_path / "libmpdec++" + copy(self, "Makefile.vc", libmpdec_folder, self.build_path) + rename(self, self.build_path / "Makefile.vc", libmpdec_folder / "Makefile") + mpdec_target = "libmpdec-{}.{}".format(self.version, "dll" if self.options.shared else "lib") mpdecpp_target = "libmpdec++-{}.{}".format(self.version, "dll" if self.options.shared else "lib") @@ -117,9 +118,6 @@ def _build_msvc(self): builds.append([libmpdecpp_folder, mpdecpp_target]) for build_dir, target in builds: - copy(self, "Makefile.vc", build_dir, self.build_path) - rename(self, self.build_path / "Makefile.vc", build_dir / "Makefile") - with chdir(self, build_dir): self.run("""nmake -f Makefile.vc {target} MACHINE={machine} DEBUG={debug} DLL={dll}""".format( target=target, diff --git a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch index ea8a12666e1b1..b7f440c6d6620 100644 --- a/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/0001-2.5.0-msvc-fixes.patch @@ -1,6 +1,6 @@ --- libmpdec++/Makefile.vc +++ libmpdec++/Makefile.vc -@@ -16,10 +16,10 @@ +@@ -16,15 +16,15 @@ # LIBSHARED_CXX = libmpdec++-2.5.0.dll !if "$(DEBUG)" == "1" @@ -15,9 +15,32 @@ +OPT_SHARED = /Ox /GS /EHsc !endif + +-MPD_CXXFLAGS = /W4 /nologo $(CONFIG) $(OPT) +-MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) ++MPD_CXXFLAGS = /W4 /nologo $(CONFIG) $(OPT) $(CONAN_CXXFLAGS) $(CONAN_CFLAGS) ++MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) $(CONAN_LDFLAGS) + + +@@ -34,13 +34,13 @@ + OBJS = decimal.obj + + +-$(LIBSTATIC_CXX): Makefile $(OBJS) ++$(LIBSTATIC_CXX): Makefile.vc $(OBJS) + -@if exist $@ del $(LIBSTATIC_CXX) + lib /out:$(LIBSTATIC_CXX) $(OBJS) + + + decimal.obj:\ +-Makefile decimal.cc decimal.hh ++Makefile.vc decimal.cc decimal.hh + $(CXX) "-I." "-I$(SRCDIR)" $(MPD_CXXFLAGS) -c decimal.cc + + --- libmpdec/Makefile.vc +++ libmpdec/Makefile.vc -@@ -36,10 +36,10 @@ +@@ -36,15 +36,15 @@ !endif !if "$(DEBUG)" == "1" @@ -31,4 +54,12 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif - \ No newline at end of file + +-MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) +-MPD_CFLAGS_SHARED = /DBUILD_DLL /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) +-MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) ++MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) $(CONAN_CFLAGS) ++MPD_CFLAGS_SHARED = /DBUILD_DLL /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) $(CONAN_CFLAGS) ++MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) $(CONAN_LDFLAGS) + + diff --git a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch index af3795f7641f7..96446677530c4 100644 --- a/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch +++ b/recipes/mpdecimal/2.5.x/patches/2.5.1-0001-msvc-fixes.patch @@ -1,6 +1,6 @@ --- libmpdec++/Makefile.vc +++ libmpdec++/Makefile.vc -@@ -16,9 +16,9 @@ +@@ -16,15 +16,15 @@ !if "$(DEBUG)" == "1" -OPT = /MTd /Od /Zi /EHsc @@ -14,8 +14,40 @@ +OPT_SHARED = /Ox /GS /EHsc !endif + +-MPD_CXXFLAGS = /W4 /nologo $(OPT) +-MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) +-MPD_BIN_CXXFLAGS_SHARED = /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) ++MPD_CXXFLAGS = /W4 /nologo $(OPT) $(CONAN_CXXFLAGS) $(CONAN_CFLAGS) ++MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS) ++MPD_BIN_CXXFLAGS_SHARED = /W4 /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS) + + MPD_LDXXFLAGS= /DLL /MANIFEST $(LDXXFLAGS) +@@ -38,11 +38,11 @@ + SHARED_OBJS = .objs\decimal.obj + + +-$(LIBSTATIC_CXX): Makefile $(OBJS) ++$(LIBSTATIC_CXX): Makefile.vc $(OBJS) + -@if exist $@ del $(LIBSTATIC_CXX) + lib /out:$(LIBSTATIC_CXX) $(OBJS) + +-$(LIBSHARED_CXX): Makefile $(SHARED_OBJS) ++$(LIBSHARED_CXX): Makefile.vc $(SHARED_OBJS) + -@if exist $@ del $(LIBSHARED_CXX) + link $(MPD_LDXXFLAGS) /out:$(LIBSHARED_CXX) /implib:$(LIBIMPORT_CXX) /LIBPATH:$(SRCDIR) $(SHARED_OBJS) $(LIBIMPORT) + mt -manifest $(LIBSHARED_CXX).manifest -outputresource:$(LIBSHARED_CXX);2 +@@ -51,2 +51,2 @@ + decimal.obj:\ +-Makefile decimal.cc decimal.hh ++Makefile.vc decimal.cc decimal.hh +@@ -55,2 +55,2 @@ + .objs\decimal.obj:\ +-Makefile decimal.cc decimal.hh ++Makefile.vc decimal.cc decimal.hh +--- libmpdec/Makefile.vc +++ libmpdec/Makefile.vc -@@ -36,9 +36,9 @@ +@@ -36,12 +36,12 @@ !endif !if "$(DEBUG)" == "1" @@ -29,4 +61,13 @@ +OPT = /Ox /GS /EHsc +OPT_SHARED = /Ox /GS /EHsc !endif - \ No newline at end of file + +-MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) +-MPD_CFLAGS_SHARED = /DBUILD_LIBMPDEC /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) ++MPD_CFLAGS = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT) $(CONAN_CFLAGS) ++MPD_CFLAGS_SHARED = /DBUILD_LIBMPDEC /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) $(CONAN_CFLAGS) +@@ -52,1 +52,1 @@ +-MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) ++MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) $(CONAN_LDFLAGS) + + From 52229ead93c9ba4126fb262dc36e8a8b503c8f26 Mon Sep 17 00:00:00 2001 From: Ahajha Date: Mon, 11 Nov 2024 10:04:44 -0500 Subject: [PATCH 14/16] Revert "Simplify package() step" This reverts commit 6facdace18cd5761d2e428ca5c4dd34812a11183. --- recipes/mpdecimal/2.5.x/conanfile.py | 62 ++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index 8edf70f4faa02..f446e130608d9 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -103,6 +103,12 @@ def generate(self): deps.environment.append("LDXXFLAGS", [f"-arch {arch}"]) deps.generate() + @property + def _dist_folder(self): + vcbuild_folder = self.build_path / "vcbuild" + arch_ext = "32" if self.settings.arch == "x86" else "64" + return vcbuild_folder / f"dist{arch_ext}" + def _build_msvc(self): libmpdec_folder = self.source_path / "libmpdec" libmpdecpp_folder = self.source_path / "libmpdec++" @@ -127,6 +133,19 @@ def _build_msvc(self): dll="1" if self.options.shared else "0", )) + dist_folder = self._dist_folder + mkdir(self, dist_folder) + copy(self, "mpdecimal.h", libmpdec_folder, dist_folder) + if self.options.shared: + copy(self, f"libmpdec-{self.version}.dll", libmpdec_folder, dist_folder) + copy(self, f"libmpdec-{self.version}.dll.exp", libmpdec_folder, dist_folder) + copy(self, f"libmpdec-{self.version}.dll.lib", libmpdec_folder, dist_folder) + else: + copy(self, f"libmpdec-{self.version}.lib", libmpdec_folder, dist_folder) + if self.options.cxx: + copy(self, "decimal.hh", libmpdecpp_folder, dist_folder) + copy(self, f"libmpdec++-{self.version}.lib", libmpdecpp_folder, dist_folder) + @property def _shared_suffix(self): if is_apple_os(self): @@ -164,24 +183,31 @@ def build(self): autotools.make(target=libmpdecpp) def package(self): - mpdecdir = os.path.join(self.source_folder, "libmpdec") - mpdecppdir = os.path.join(self.source_folder, "libmpdec++") - - copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - copy(self, "vccompat.h", src=mpdecdir, dst=os.path.join(self.package_folder, "include")) # 2.5.0/MSVC only - copy(self, "mpdecimal.h", src=mpdecdir, dst=os.path.join(self.package_folder, "include")) - if self.options.cxx: - copy(self, "decimal.hh", src=mpdecppdir, dst=os.path.join(self.package_folder, "include")) - builddirs = [mpdecdir] - if self.options.cxx: - builddirs.append(mpdecppdir) - for builddir in builddirs: - copy(self, "*.a", src=builddir, dst=os.path.join(self.package_folder, "lib")) - copy(self, "*.so", src=builddir, dst=os.path.join(self.package_folder, "lib")) - copy(self, "*.so.*", src=builddir, dst=os.path.join(self.package_folder, "lib")) - copy(self, "*.dylib", src=builddir, dst=os.path.join(self.package_folder, "lib")) - copy(self, "*.lib", src=builddir, dst=os.path.join(self.package_folder, "lib")) - copy(self, "*.dll", src=builddir, dst=os.path.join(self.package_folder, "bin")) + pkg_dir = self.package_path + copy(self, "LICENSE.txt", src=self.source_folder, dst=pkg_dir / "licenses") + if is_msvc(self): + distfolder = self._dist_folder + copy(self, "vc*.h", src=self.source_path / "libmpdec", dst=pkg_dir / "include") + copy(self, "*.h", src=distfolder, dst=pkg_dir / "include") + if self.options.cxx: + copy(self, "*.hh", src=distfolder, dst=pkg_dir / "include") + copy(self, "*.lib", src=distfolder, dst=pkg_dir / "lib") + copy(self, "*.dll", src=distfolder, dst=pkg_dir / "bin") + else: + mpdecdir = self.build_path / "libmpdec" + mpdecppdir = self.build_path / "libmpdec++" + copy(self, "mpdecimal.h", src=mpdecdir, dst=pkg_dir / "include") + if self.options.cxx: + copy(self, "decimal.hh", src=mpdecppdir, dst=pkg_dir / "include") + builddirs = [mpdecdir] + if self.options.cxx: + builddirs.append(mpdecppdir) + for builddir in builddirs: + copy(self, "*.a", src=builddir, dst=pkg_dir / "lib") + copy(self, "*.so", src=builddir, dst=pkg_dir / "lib") + copy(self, "*.so.*", src=builddir, dst=pkg_dir / "lib") + copy(self, "*.dylib", src=builddir, dst=pkg_dir / "lib") + copy(self, "*.dll", src=builddir, dst=pkg_dir / "bin") def package_info(self): lib_pre_suf = ("", "") From 32bb0c9d3371609f5b9428ae28532b40b4750e54 Mon Sep 17 00:00:00 2001 From: Ahajha Date: Mon, 11 Nov 2024 11:49:18 -0500 Subject: [PATCH 15/16] Just append LDFLAGS to LDXXFLAGS --- recipes/mpdecimal/2.5.x/conanfile.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index f446e130608d9..fe9116303cd1d 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.gnu import AutotoolsToolchain, AutotoolsDeps, Autotools +from conan.tools.gnu import AutotoolsToolchain, Autotools from conan.tools.files import get, chdir, copy, export_conandata_patches, apply_conandata_patches, mkdir, rename from conan.tools.layout import basic_layout from conan.tools.build import cross_building @@ -94,14 +94,9 @@ def generate(self): tc = AutotoolsToolchain(self) tc.configure_args.append("--enable-cxx" if self.options.cxx else "--disable-cxx") - tc.generate() - - deps = AutotoolsDeps(self) - if is_apple_os(self): - arch = "arm64" if self.settings.arch == "armv8" else "x86_64" - deps.environment.append("LDFLAGS", [f"-arch {arch}"]) - deps.environment.append("LDXXFLAGS", [f"-arch {arch}"]) - deps.generate() + tc_env = tc.environment() + tc_env.append("LDXXFLAGS", ["$LDFLAGS"]) + tc.generate(tc_env) @property def _dist_folder(self): From 2d754aa9b19683d56bf7424bd083b485d41fd71d Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Mon, 11 Nov 2024 12:54:56 -0500 Subject: [PATCH 16/16] Fix Windows packaging --- recipes/mpdecimal/2.5.x/conanfile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index fe9116303cd1d..24fdf3f3f3633 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -133,13 +133,16 @@ def _build_msvc(self): copy(self, "mpdecimal.h", libmpdec_folder, dist_folder) if self.options.shared: copy(self, f"libmpdec-{self.version}.dll", libmpdec_folder, dist_folder) - copy(self, f"libmpdec-{self.version}.dll.exp", libmpdec_folder, dist_folder) copy(self, f"libmpdec-{self.version}.dll.lib", libmpdec_folder, dist_folder) else: copy(self, f"libmpdec-{self.version}.lib", libmpdec_folder, dist_folder) if self.options.cxx: + if self.options.shared: + copy(self, f"libmpdec++-{self.version}.dll", libmpdecpp_folder, dist_folder) + copy(self, f"libmpdec++-{self.version}.dll.lib", libmpdecpp_folder, dist_folder) + else: + copy(self, f"libmpdec++-{self.version}.lib", libmpdecpp_folder, dist_folder) copy(self, "decimal.hh", libmpdecpp_folder, dist_folder) - copy(self, f"libmpdec++-{self.version}.lib", libmpdecpp_folder, dist_folder) @property def _shared_suffix(self):