Skip to content

Commit

Permalink
Merge branch 'develop' of octocat.dlogics.com:datalogics/conan-center…
Browse files Browse the repository at this point in the history
…-index

* 'develop' of octocat.dlogics.com:datalogics/conan-center-index: (259 commits)
  Allow empty keys in dlproject.yaml for merging tasks
  (conan-io#15093) [libjpeg] Update sha256 for 9e
  (conan-io#15123) faac: add Visual Studio support + drop 1.28
  (conan-io#14103) gmp: conan v2 support
  (conan-io#14982) rapidyaml: add version 0.5.0
  (conan-io#15122) m4: use positional arguments when calling self.run()
  (conan-io#15091) catch2.x.x: Fix test_package for v2
  (conan-io#12938) capnproto: conan v2 support
  (conan-io#15097) http_parser: modernize
  (conan-io#15096) perlinnoise: add recipe
  (conan-io#15088) Make openexr v2 compatible
  (conan-io#15056) qt5: Apple OSs don't require CROSS_COMPILE option
  (conan-io#14974) libxshmfence: generate gcc11 binaries
  (conan-io#14903) arrow: remove patch for CMake
  (conan-io#14874) faac: conan v2 support
  (conan-io#13896) [gcc] Migrate recipe to conan v2, add gfortran to compilation
  Revert "(conan-io#14221) [config] Use larger resources to build cppfront packages" (conan-io#14953)
  (conan-io#15086) openh264: fix tools legacy
  (conan-io#15085) Make xkeyboard-config v2 compatible
  (conan-io#15089) Raise required_conan_version for xorg/system
  ...
  • Loading branch information
datalogics-kam committed Jan 6, 2023
2 parents 652f00d + 51d1ec3 commit f9ea007
Show file tree
Hide file tree
Showing 946 changed files with 16,218 additions and 7,473 deletions.
19 changes: 19 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -995,3 +995,22 @@ authorized_users:
- agilemapper
- ZXfkSIE
- RubenRBS
- Alex-PLACET
- antekone
- ambroff
- tiolan
- MateuszMiekicki
- EricAtORS
- calebkiage
- bennyhuo
- ashuels
- jjcasmar
- kaipenglu
- ashley-b
- psmitsu
- Viatorus
- mkoviazin
- shtanko-sv
- larshg
- Wuqiqi123
- OzanCansel
11 changes: 7 additions & 4 deletions .c3i/config_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id: 'conan-io/conan-center-index'

conan:
version: 1.53.0
version: 1.54.0

artifactory:
url: "https://c3i.jfrog.io/c3i"
Expand Down Expand Up @@ -33,13 +33,17 @@ slack:

# Things related to Jenkins jobs
tasks:
conan_v2_run_export: true
conan_v2_run_export: false
write_comments: true
detailed_status_checks: true
update_labels: true
automatic_merge:
reviews_required_total: 2 # Reviews that a PR needs so it can be merged
reviews_required_team: 1 # Reviews from the Conan team that a PR needs so it can be merged
cci_wait_for_multibranch: # CCI jobs should wait for other multibranch job for that same PR
job_name: "prod-v2/cci" # e.g. "cci-v2/cci" -> this means waiting for cci-v2/cci/PR-<number>
timeout_seconds: 600 # Maximum time to wait for the multibranch job
merge_messages: true # Merge messages from the multibranch job waited for

# Profile configurations to build packages
configurations:
Expand Down Expand Up @@ -159,7 +163,7 @@ node_labels:
Windows:
x86_64:
"Visual Studio":
default: "windows20221024"
default: "windows20221212"
Macos:
x86_64:
"apple-clang":
Expand All @@ -184,7 +188,6 @@ pod_size:
large:
- "pcl"
- "duckdb"
- "cppfront"
xlarge:
- "llvm"
- "opengv"
3 changes: 2 additions & 1 deletion .c3i/config_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ github:

# Things related to Jenkins jobs:
tasks:
feedback_title: "Conan v2 pipeline (informative, not required for merge)"
write_comments: false
detailed_status_checks: false
update_labels: false
Expand Down Expand Up @@ -87,7 +88,7 @@ node_labels:
Windows:
x86_64:
"msvc":
default: "windows20221024"
default: "windows20221212"
Macos:
x86_64:
"apple-clang":
Expand Down
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/center_conan_io.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'ConanCenter: Web UI Bugs Or Requests'
description: Bugs or feature requests for the Web UI of ConanCenter at https://conan.io/center
title: '[conan.io/center] SHORT DESCRIPTION'
labels: 'conan.io/center'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to submit a report.
**Please don't forget to update the issue title.**
- type: textarea
id: contents
attributes:
label: What is your problem/feature request?
description: Please be as specific as possible!
placeholder: Hi! I would like for ConanCenter to ...
validations:
required: true
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/package_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Package: Completely New Recipe'
description: If you would like to see a completely new recipe
title: '[request] <LIBRARY-NAME>/<LIBRARY-VERSION>'
labels: 'library request'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to submit your request.
**Please don't forget to update the issue title.**
- type: input
id: package
attributes:
label: Package Name/Version
placeholder: cmake/3.25.1
validations:
required: true
- type: input
id: website
attributes:
label: Webpage
placeholder: https://cmake.org
validations:
required: true
- type: input
id: sources
attributes:
label: Source code
placeholder: https://github.com/Kitware/CMake
validations:
required: true
- type: textarea
id: description
attributes:
label: Description of the library/tool
description: |
Give us some context about this library/tool.
What is it about?
placeholder: |
CMake is an open-source, cross-platform family of tools designed to build, test and package software.
validations:
required: true
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/package_upstream_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Package: New Version'
description: If an existing package recipe needs an update for a new upstream version
title: '[request] <LIBRARY-NAME>/<LIBRARY-VERSION>'
labels: 'upstream update'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to submit your request.
**Please don't forget to update the issue title.**
- type: input
id: package
attributes:
label: Package Name/Version
placeholder: cmake/3.25.1
validations:
required: true
- type: input
id: changelog
attributes:
label: Changelog
placeholder: https://cmake.org/cmake/help/latest/release/3.25.html
validations:
required: true
- type: textarea
id: description
attributes:
label: Context about the new update
value: |
The above-mentioned version is newly released by the upstream project and not yet available as a recipe.
Please add this version.
validations:
required: true
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Question
description: If something needs clarification
title: '[question] SHORT DESCRIPTION'
labels: 'question'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill your question.
**Please don't forget to update the issue title.**
- type: textarea
id: question
attributes:
label: What is your question?
description: Please be as specific as possible!
placeholder: Hi! I have a question regarding ...
validations:
required: true
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Service: Infrastructure Bugs Or Requests'
description: Bug or feature requests for Conan Center Index itself
title: '[service] SHORT DESCRIPTION'
labels: 'service'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to submit a report.
**Please don't forget to update the issue title.**
- type: textarea
id: contents
attributes:
label: What is your problem/feature request?
description: Please be as specific as possible!
placeholder: Hi! I would like for Conan Center Index to ...
validations:
required: true
18 changes: 18 additions & 0 deletions .github/workflows/markdown-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "[linter] Markdown links"

on:
pull_request:
paths:
- '**.md'

jobs:
markdown-link-check-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: .github/workflows/mlc_config.json
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
13 changes: 13 additions & 0 deletions dlproject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ config:
# else the entry can be a dictionary of package name and options
prebuilt_tools:
- cmake/[>=3.23.0]
- cmake/3.24.3
- doxygen/1.9.1
- doxygen/1.9.2
- package: doxygen/1.9.1
Expand Down Expand Up @@ -253,6 +254,7 @@ config:
# If the entry is a string, it's taken to be the package name,
# else the entry can be a dictionary of package name and options
prebuilt_tools:
- cmake/3.24.3
- cmake/[>=3.23.0]
- doxygen/1.9.1
- doxygen/1.9.2
Expand Down Expand Up @@ -333,6 +335,7 @@ config:
- build_type=Debug
prebuilt_tools: &redhat6Tools
- package: cmake/[>=3.23.0]
- package: cmake/3.24.3
- package: doxygen/1.9.1
- package: doxygen/1.9.2
- package: doxygen/1.9.1
Expand Down Expand Up @@ -392,6 +395,7 @@ config:
- build_type=Debug
prebuilt_tools:
- cmake/[>=3.23.0]
- cmake/3.24.3
- doxygen/1.9.1
- doxygen/1.9.2
- package: doxygen/1.9.1
Expand Down Expand Up @@ -477,6 +481,7 @@ config:
default: *windowsDebug
prebuilt_tools:
- cmake/[>=3.23.0]
- cmake/3.24.3
- package: doxygen/1.9.1
configs:
# xapian-core doesn't work for cross-building x86_64 to x86
Expand Down Expand Up @@ -557,6 +562,11 @@ config:
include:
- Debug32
prebuilt_tools:
- package: cmake/3.24.3
options:
- cmake:with_openssl=False
configs:
- ReleaseTool
- package: cmake/[>=3.23.0]
options:
- cmake:with_openssl=False
Expand Down Expand Up @@ -646,6 +656,9 @@ config:
settings:
- build_type=Debug
prebuilt_tools:
- package: cmake/3.24.3
options:
- cmake:with_openssl=False
- package: cmake/[>=3.23.0]
options:
- cmake:with_openssl=False
Expand Down
74 changes: 1 addition & 73 deletions docs/adding_packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ You can follow the three steps (:one: :two: :three:) described below! :tada:
* [`conandata.yml`](#conandatayml)
* [The _recipe folder_: `conanfile.py`](#the-_recipe-folder_-conanfilepy)
* [Test Folders](#test-folders)
* [How to provide a good recipe](#how-to-provide-a-good-recipe)
* [Header Only](#header-only)
* [CMake](#cmake)
* [Components](#components)
* [Autotools](#autotools)
* [Components](#components-1)
* [No Upstream Build Scripts](#no-upstream-build-scripts)
* [System Packages](#system-packages)
* [Verifying Dependency Version](#verifying-dependency-version)
* [Verifying Dependency Options](#verifying-dependency-options)
* [Test the recipe locally](#test-the-recipe-locally)
* [Hooks](#hooks)
* [Linters](#linters)<!-- endToc -->
Expand Down Expand Up @@ -63,7 +53,7 @@ The specific steps to add new packages are:

* Fork the [conan-center-index](https://github.com/conan-io/conan-center-index) git repository, and then clone it locally.
* Copy a template from [package_templates](../package_templates) folder in the recipes/ folder and rename it to the project name (it should be lower-case). Read templates [documentation](../package_templates/README.md) to find more information.
* Make sure you are using the latest [Conan client](https://conan.io/downloads) version, as recipes might evolve introducing features of the newer Conan releases.
* Make sure you are using a recent [Conan client](https://conan.io/downloads) version, as recipes might evolve introducing features of the newer Conan releases.
* Commit and Push to GitHub then submit a pull request.
* Our automated build service will build 100+ different configurations, and provide messages that indicate if there were any issues found during the pull request on GitHub.

Expand Down Expand Up @@ -173,68 +163,6 @@ a minimal project to test the package is strictly required. You can read about i

Learn more about the ConanCenterIndex requirements in the [test packages](test_packages.md) document.

## How to provide a good recipe

The [recipes](https://github.com/conan-io/conan-center-index/tree/master/recipes) available in CCI can be used as good examples, you can use them as the base for your recipe. However it is important to note Conan features change over time and our best practices evolve so some minor details may be out of date due to the vast number of recipes.

### Header Only

If you are looking for header-only projects, you can take a look on [header-only template](../package_templates/header_only).
Also, Conan Docs has a section about [how to package header-only libraries](https://docs.conan.io/en/latest/howtos/header_only.html).

### CMake

For C/C++ projects which use CMake for building, you can take a look on [cmake package template](../package_templates/cmake_package).

#### Components

Another common use case for CMake based projects, both header only and compiled, is _modeling components_ to match the `find_package` and export the correct targets from Conan's generators. A basic examples of this is [cpu_features](https://github.com/conan-io/conan-center-index/blob/master/recipes/cpu_features/all/conanfile.py), a moderate/intermediate example is [cpprestsdk](https://github.com/conan-io/conan-center-index/blob/master/recipes/cpprestsdk/all/conanfile.py), and a very complex example is [OpenCV](https://github.com/conan-io/conan-center-index/blob/master/recipes/opencv/4.x/conanfile.py).

### Autotools

However, if you need to use autotools for building, you can take a look on [libalsa](https://github.com/conan-io/conan-center-index/blob/master/recipes/libalsa/all/conanfile.py), [kmod](https://github.com/conan-io/conan-center-index/blob/master/recipes/kmod/all/conanfile.py), [libcap](https://github.com/conan-io/conan-center-index/blob/master/recipes/libcap/all/conanfile.py).

#### Components

Many projects offer **pkg-config**'s `*.pc` files which need to be modeled using components. A prime example of this is [Wayland](https://github.com/conan-io/conan-center-index/blob/master/recipes/wayland/all/conanfile.py).

### No Upstream Build Scripts

For cases where a project only offers source files, but not a build script, you can add CMake support, but first, contact the upstream and open a PR offering building support. If it's rejected because the author doesn't want any kind of build script, or the project is abandoned, CCI can accept your build script. Take a look at [Bzip2](https://github.com/conan-io/conan-center-index/blob/master/recipes/bzip2/all/CMakeLists.txt) and [DirectShowBaseClasses](https://github.com/conan-io/conan-center-index/blob/master/recipes/directshowbaseclasses/all/CMakeLists.txt) as examples.

### System Packages

> :information_source: For exceptional cases where only system packages can be used and a regular Conan package may result in an incompatible and fragile package, a separated system package may be created. See the [FAQs](../faqs.md#can-i-install-packages-from-the-system-package-manager) for more.

The [SystemPackageTool](https://docs.conan.io/en/latest/reference/conanfile/methods.html#systempackagetool) can easily manage a system package manager (e.g. apt,
pacman, brew, choco) and install packages which are missing on Conan Center but available for most distributions. It is key to correctly fill in the `cpp_info` for the consumers of a system package to have access to whatever was installed.

As example there is [xorg](https://github.com/conan-io/conan-center-index/blob/master/recipes/xorg/all/conanfile.py). Also, it will require an exception rule for [conan-center hook](https://github.com/conan-io/hooks#conan-center), a [pull request](https://github.com/conan-io/hooks/pulls) should be open to allow it over the KB-H032.

### Verifying Dependency Version

Some project requirements need to respect a version constraint. This can be enforced in a recipe by accessing the [`dependencies`](https://docs.conan.io/en/latest/reference/conanfile/dependencies.html) attribute.
An example of this can be found in the [fcl recipe](https://github.com/conan-io/conan-center-index/blob/1b6b496fe9a9be4714f8a0db45274c29b0314fe3/recipes/fcl/all/conanfile.py#L80).

```py
def validate(self):
foobar = self.dependencies["foobar"]
if self.info.options.shared and Version(foobar.ref.version) < "1.2":
raise ConanInvalidConfiguration(f"{self.ref} requires 'foobar' >=1.2 to be built as shared.")
```

### Verifying Dependency Options

Certain projects are dependant on the configuration (a.k.a options) of a dependency. This can be enforced in a recipe by accessing the [`options`](https://docs.conan.io/en/latest/reference/conanfile/attributes.html#options) attribute.
An example of this can be found in the [sdl_image recipe](https://github.com/conan-io/conan-center-index/blob/1b6b496fe9a9be4714f8a0db45274c29b0314fe3/recipes/sdl_image/all/conanfile.py#L93).

```py
def validate(self):
foobar = self.dependencies["foobar"]
if not foobar.options.enable_feature:
raise ConanInvalidConfiguration(f"The project {self.ref} requires foobar:enable_feature=True.")
```

## Test the recipe locally

### Hooks
Expand Down
Loading

0 comments on commit f9ea007

Please sign in to comment.