Repository: conan-io/conan-center-index

Issue:
[spdlog] spdlog/1.4.2: header_only=True is broken.
This configuration was never tested for 1.4.2, neither here nor in the previous bincrafters edition.

1. (This is the error seen in the attached log.) Not an expert on how conandata.yml trick-shots work, but I think on conanfile.py:77 `tools.patch(tools.get(**self.conan_data["patches"][self.version]))` should be `tools.patch(**self.conan_data["patches"][self.version])`. Not sure how that one happened (controls Cee and Vee...). If I fix that, we get past this, but
2. The patch file it uses no longer works, and this is the case as well in the original `bincrafters/stable` edition, because everyone just bumps up version numbers without checking. 🙄👏

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **spdlog/1.4.2**
  * Operating System+version: **Mac OS Mojave**
  * Compiler+version: **n/a**
  * Docker image: **n/a**
  * Conan version: **conan 1.20.0**
  * Python version: **Python 3.7.5**


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=10.0
os=Macos
os_build=Macos
[options]
header_only=True
[build_requires]
[env]
```


### Steps to reproduce (Include if Applicable)

$ conan install spdlog/1.4.2@ -o header_only=True --build missing

### Logs (Include/Attach if Applicable)
<details><summary>Click to expand log</summary>

```
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=10.0
os=Macos
os_build=Macos
[options]
header_only=True
[build_requires]
[env]

Installing package: spdlog/1.4.2
Requirements
    fmt/6.0.0 from 'conan-center' - Cache
    spdlog/1.4.2 from 'conan-center' - Cache
Packages
    fmt/6.0.0:853c4b61e2571e98cd7b854c1cda6bc111b8b32c - Cache
    spdlog/1.4.2:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Build

fmt/6.0.0: Already installed!
Downloading conan_sources.tgz: 100%|##########| 1.34k/1.34k [00:00<00:00, 2.73MB/s]
Decompressing conan_sources.tgz: 100%|##########| 1.34k/1.34k [00:00<00:00, 641kB/s]
spdlog/1.4.2: Configuring sources in /Users/martin/.conan/data/spdlog/1.4.2/_/_/source
Downloading v1.4.2.tar.gz: 100%|##########| 254k/254k [00:00<00:00, 3.37MB/s]

spdlog/1.4.2: Copying sources to build folder
spdlog/1.4.2: Building your package in /Users/martin/.conan/data/spdlog/1.4.2/_/_/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
spdlog/1.4.2: Generator cmake created conanbuildinfo.cmake
spdlog/1.4.2: Generator cmake_find_package created Findfmt.cmake
spdlog/1.4.2: Calling build()
spdlog/1.4.2: 
spdlog/1.4.2: ERROR: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' build failed
spdlog/1.4.2: WARN: Build folder /Users/martin/.conan/data/spdlog/1.4.2/_/_/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
ERROR: spdlog/1.4.2: Error in build() method, line 77
	tools.patch(tools.get(**self.conan_data["patches"][self.version]))
	TypeError: get() got an unexpected keyword argument 'base_path'
```

</details>



Discussion:
Thanks for the report and suggestions.

Yes, this is a pending issue tracked here #120. The recipe should be fixed, but the generation of packages with header-only options is pending issue with mid-low priority right now.

Resolving patch:
diff --git a/recipes/spdlog/1.4.x/conanfile.py b/recipes/spdlog/1.4.x/conanfile.py
--- a/recipes/spdlog/1.4.x/conanfile.py
+++ b/recipes/spdlog/1.4.x/conanfile.py
@@ -74,7 +74,7 @@ def _disable_werror(self):
     def build(self):
         self._disable_werror()
         if self.options.header_only:
-            tools.patch(tools.get(**self.conan_data["patches"][self.version]))
+            tools.patch(**self.conan_data["patches"][self.version])
         cmake = self._configure_cmake()
         cmake.build()
 


Test patch: