Skip to content

Commit

Permalink
Merge branch 'master' into migrate/libid3tag
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS authored Oct 27, 2023
2 parents ca89866 + 25d469a commit f8c2c7c
Show file tree
Hide file tree
Showing 129 changed files with 2,657 additions and 788 deletions.
4 changes: 4 additions & 0 deletions .c3i/config_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ tasks:
timeout_seconds: 600 # Maximum time to wait for the multibranch job
merge_messages: true # Merge messages from the multibranch job waited for
merge_labels: true # Merge labels from the multibranch job waited for
job_relauncher:
job_names:
- prod-v1/cci
- prod-v2/cci
scheduled_export_check:
report_issue_url: https://github.com/conan-io/conan-center-index/issues/20516
report_issue_append: false
Expand Down
13 changes: 13 additions & 0 deletions docs/adding_packages/conanfile_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ The license attribute is a mandatory field which provides the legal information
* `LicenseRef-` as a prefix, followed by the name of the library. For example:`LicenseRef-libfoo-public-domain`
* If the library makes no mention of a license and the terms of use - it **shall not be accepted in ConanCenter** , even if the code is publicly available in GitHub or any other platforms.

In case the license changes in a new release, the recipe should update the license attribute accordingly:

```python
class LibfooConan(ConanFile):
license = ("MIT", "BSD-3-Clause") # keep both old and new licenses, so conan inspect can find it

def configure (self):
# change the license according to the version, so conan graph info can show the correct one

# INFO: Version < 2.0 the license was MIT, but changed to BSD-3-Clause now.
self.license = "BSD-3-Clause" if Version(self.version) >= "2.0.0" else "MIT"
```

## Order of methods and attributes

Prefer the following order of documented methods in python code (`conanfile.py`, `test_package/conanfile.py`):
Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 26-Oct-2023 - 12:13 CEST

- [feature] Allow X.Y semver for version bumps
- [feature] Add assert message for parent commit checks on PR checkout
- [feature] JobRelauncher restarts both Conan v1 and v2 pipelines.
- [fix] Do not close the report issue of the recipe export check

### 11-Oct-2023 - 12:17 CEST

- [feature] Update Conan 2.x to the version 2.0.12 in the CI
Expand Down
6 changes: 6 additions & 0 deletions recipes/cfitsio/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"4.3.0":
url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.3.0.tar.gz"
sha256: "734ab0198714fe43eab94a67d6987085bde5573e6babde4d05799a8d04ebb04c"
"4.2.0":
url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.2.0.tar.gz"
sha256: "ef9881973ecb9fe55732a4c1bb5ca96e63b624728f6319556939e0fe25f495e8"
Expand All @@ -18,6 +21,9 @@ sources:
url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.47.tar.gz"
sha256: "985606e058403c073a68d95be74e9696f0ded9414520784457a1d4cba8cca7e2"
patches:
"4.3.0":
- patch_file: "patches/windows-use-strtok_s.patch"
- patch_file: "patches/fix-cmake-4.2.0.patch"
"4.2.0":
- patch_file: "patches/windows-use-strtok_s.patch"
- patch_file: "patches/fix-cmake-4.2.0.patch"
Expand Down
3 changes: 2 additions & 1 deletion recipes/cfitsio/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def requirements(self):
if self.options.with_bzip2:
self.requires("bzip2/1.0.8")
if self.options.get_safe("with_curl"):
self.requires("libcurl/8.2.1")
self.requires("libcurl/[>=7.78.0 <9]")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down Expand Up @@ -109,6 +109,7 @@ def package(self):
cmake.install()
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
rmdir(self, os.path.join(self.package_folder, "lib", f"cfitsio-{self.version}"))
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "cfitsio")
Expand Down
2 changes: 2 additions & 0 deletions recipes/cfitsio/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"4.3.0":
folder: all
"4.2.0":
folder: all
"4.1.0":
Expand Down
16 changes: 16 additions & 0 deletions recipes/clhep/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
sources:
"2.4.6.4":
url: "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-2.4.6.4.tgz"
sha256: "49c89330f1903ef707d3c5d79c16a7c5a6f2c90fc290e2034ee3834809489e57"
"2.4.1.3":
url: "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-2.4.1.3.tgz"
sha256: "27c257934929f4cb1643aa60aeaad6519025d8f0a1c199bc3137ad7368245913"
patches:
"2.4.6.4":
- patch_file: "patches/fix-cmake-2_4_6_4.patch"
patch_description: The CLHEP build system builds BOTH shared and static by default, change that behaviour
patch_type: conan
- patch_file: "patches/msvc-2015-no-SFINAE.patch"
patch_description: work around a compiler bug in MSVC 2015
patch_type: portability
"2.4.1.3":
- patch_file: "patches/fix-cmake.patch"
patch_description: The CLHEP build system builds BOTH shared and static by default, change that behaviour
patch_type: conan
- patch_file: "patches/mingw-support.patch"
patch_description: allow CLHEP to build and link properly under mingw environments
patch_type: portability
- patch_file: "patches/msvc-2015-no-SFINAE.patch"
patch_description: work around a compiler bug in MSVC 2015
patch_type: portability
72 changes: 72 additions & 0 deletions recipes/clhep/all/patches/fix-cmake-2_4_6_4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
--- a/CLHEP/CMakeLists.txt
+++ b/CLHEP/CMakeLists.txt
@@ -121,10 +121,8 @@ add_subdirectory(RefCount)
add_subdirectory(Exceptions)

# libCLHEP.a and libCLHEP.so
-clhep_build_libclhep( ${CLHEP_libraries} )

# provide tools for other packages to include CLHEP easily
-clhep_toolchain()

# - Build docucumentation if required
if(CLHEP_BUILD_DOCS)
@@ -151,4 +149,3 @@ if(CLHEP_BUILD_DOCS)
endif()

# Custom Packaging
-include(ClhepPackaging)
--- a/CLHEP/cmake/Modules/ClhepBuildTest.cmake
+++ b/CLHEP/cmake/Modules/ClhepBuildTest.cmake
@@ -17,6 +17,8 @@ include(ClhepParseArgs)


macro( clhep_test testname )
+# disable tests
+if(FALSE)
clhep_parse_args( CTST "LIBS;DEPENDS" "SIMPLE;FAIL;NOLIB" ${ARGN})

# automake/autoconf variables for ${testname}.sh.in
@@ -68,4 +70,5 @@ macro( clhep_test testname )
endif()
endif()

+endif()
endmacro( clhep_test )
--- a/CLHEP/cmake/Modules/ClhepBuildLibrary.cmake
+++ b/CLHEP/cmake/Modules/ClhepBuildLibrary.cmake
@@ -30,29 +30,24 @@ macro(clhep_build_library package)
endif()

# Add the libraries and set properties
- ADD_LIBRARY(${package} SHARED ${CLHEP_${package}_SOURCES})
- ADD_LIBRARY(${package}S STATIC ${CLHEP_${package}_SOURCES})
+ # Build shared or static, not both, because:
+ # - slower build
+ # - lot of issues because output names are the same + msvc shared is broken
+ ADD_LIBRARY(${package} ${CLHEP_${package}_SOURCES})
SET_TARGET_PROPERTIES (${package}
PROPERTIES
OUTPUT_NAME CLHEP-${package}-${VERSION}
)
- SET_TARGET_PROPERTIES(${package}S
- PROPERTIES
- OUTPUT_NAME CLHEP-${package}-${VERSION}
- )

# Do not add -Dname_EXPORTS to the command-line when building files in this
# target. Doing so is actively harmful for the modules build because it
# creates extra module variants, and not useful because we don't use these
# macros.
SET_TARGET_PROPERTIES(${package} PROPERTIES DEFINE_SYMBOL "")
- SET_TARGET_PROPERTIES(${package}S PROPERTIES DEFINE_SYMBOL "")
-
target_link_libraries(${package} ${package_library_list} )
- target_link_libraries(${package}S ${package_library_list_static} )

# Install the libraries
- INSTALL (TARGETS ${package} ${package}S
+ INSTALL (TARGETS ${package}
EXPORT CLHEPLibraryDepends
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
2 changes: 2 additions & 0 deletions recipes/clhep/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"2.4.6.4":
folder: all
"2.4.1.3":
folder: all
5 changes: 5 additions & 0 deletions recipes/coin-cgl/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
sources:
"0.60.7":
url: "https://github.com/coin-or/Cgl/archive/releases/0.60.7.tar.gz"
sha256: "93b30a80b5d2880c2e72d5877c64bdeaf4d7c1928b3194ea2f88b1aa4517fb1b"
"0.60.6":
url: "https://github.com/coin-or/Cgl/archive/refs/tags/releases/0.60.6.tar.gz"
sha256: "9e2c51ffad816ab408763d6b931e2a3060482ee4bf1983148969de96d4b2c9ce"
"0.60.3":
url: "https://github.com/coin-or/Cgl/archive/refs/tags/releases/0.60.3.tar.gz"
sha256: "cfeeedd68feab7c0ce377eb9c7b61715120478f12c4dd0064b05ad640e20f3fb"
patches:
"0.60.7":
- patch_file: "patches/0.60.6-0001-no-pkg-config-check.patch"
"0.60.6":
- patch_file: "patches/0.60.6-0001-no-pkg-config-check.patch"
"0.60.3":
Expand Down
2 changes: 2 additions & 0 deletions recipes/coin-cgl/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.60.7":
folder: "all"
"0.60.6":
folder: "all"
"0.60.3":
Expand Down
3 changes: 3 additions & 0 deletions recipes/cppfront/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"cci.20231017":
url: "https://github.com/hsutter/cppfront/archive/789cd382ed4c2fb1a9e306e73b6876228d22207d.tar.gz"
sha256: "a004c27bbc732f7a60735cee45aa89f066b79266ccc2c881f4723afee2ad1d8d"
"cci.20230103":
url: "https://github.com/hsutter/cppfront/archive/808db2bd6ae92f869166827dfda66cfa42dde0ab.zip"
sha256: "479252c99d66db477c4cd98a6e1707a8929a70afdf000c75589841d944c539f4"
Expand Down
2 changes: 2 additions & 0 deletions recipes/cppfront/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"cci.20231017":
folder: all
"cci.20230103":
folder: all
"cci.20221024":
Expand Down
4 changes: 4 additions & 0 deletions recipes/cthash/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"cci.20231025":
url: "https://github.com/hanickadot/cthash/archive/21d581e0a6bd7040c282af1e43faab9d44f47744.tar.gz"
sha256: "03bf073f0c8a362d26186dab39482418aaf59a1bc17d92ec6b49053147c0fba0"
71 changes: 71 additions & 0 deletions recipes/cthash/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.files import get, copy
from conan.tools.layout import basic_layout
from conan.tools.scm import Version
from conan.tools.microsoft import is_msvc
import os


required_conan_version = ">=1.53.0"


class CtHashConan(ConanFile):
name = "cthash"
description = "constexpr implementation of SHA-2 and SHA-3 family of hashes"
license = "Apache-2.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/hanickadot/cthash/"
topics = ("constexpr", "xxhash", "sha", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

@property
def _min_cppstd(self):
return 20

@property
def _compilers_minimum_version(self):
return {
"Visual Studio": "16",
"msvc": "193",
"gcc": "12.2",
"clang": "15.0.7",
"apple-clang": "14",
}

def layout(self):
basic_layout(self, src_folder="src")

def package_id(self):
self.info.clear()

def validate(self):
if is_msvc(self):
raise ConanInvalidConfiguration(f"{self.ref} doesn't support MSVC.")

if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, self._min_cppstd)
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(
self,
pattern="*.hpp",
dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "include"),
)

def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
8 changes: 8 additions & 0 deletions recipes/cthash/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)

find_package(cthash REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE cthash::cthash)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
26 changes: 26 additions & 0 deletions recipes/cthash/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os


class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
test_type = "explicit"

def layout(self):
cmake_layout(self)

def requirements(self):
self.requires(self.tested_reference_str)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")
12 changes: 12 additions & 0 deletions recipes/cthash/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>
#include "cthash/cthash.hpp"

using namespace cthash::literals;

int main(void) {
constexpr auto my_hash = cthash::sha3_256{}.update("hello there!").final();

std::cout << my_hash << std::endl;

return 0;
}
3 changes: 3 additions & 0 deletions recipes/cthash/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"cci.20231025":
folder: all
16 changes: 6 additions & 10 deletions recipes/detours/all/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.12)
project(conan_detours CXX)

include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
conan_basic_setup(TARGETS)
set(SOURCES_DIR ${CMAKE_CURRENT_LIST_DIR}/src)

file(GLOB DETOURS_SOURCES source_subfolder/src/*.cpp)
file(GLOB DETOURS_SOURCES ${SOURCES_DIR}/src/*.cpp)
list(REMOVE_ITEM DETOURS_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/src/uimports.cpp"
"${SOURCES_DIR}/src/uimports.cpp"
)
file(GLOB DETOURS_HEADERS source_subfolder/src/*.h)
file(GLOB DETOURS_HEADERS ${SOURCES_DIR}/src/*.h)
add_library(detours STATIC ${DETOURS_SOURCES} ${DETOURS_HEADERS})

include(GNUInstallDirs)
install(TARGETS detours
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
install(TARGETS detours)
install(FILES ${DETOURS_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
Loading

0 comments on commit f8c2c7c

Please sign in to comment.