Repository: conan-io/conan-center-index

Issue:
add tllist library
Specify library name and version:  **tllist/1.0.5**

Not the author of the library but a project I am working on needs it.
---

- [X] I've read the [guidelines](https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md) for contributing.
- [X] I've followed the [PEP8](https://www.python.org/dev/peps/pep-0008/) style guides for Python code in the recipes.
- [X] I've used the [latest](https://github.com/conan-io/conan/releases/latest) Conan client version.
- [X] I've tried at least one configuration locally with the
      [conan-center hook](https://github.com/conan-io/hooks.git) activated.



Discussion:

Resolving patch:
diff --git a/recipes/tllist/all/conanfile.py b/recipes/tllist/all/conanfile.py
new file mode 100644
--- /dev/null
+++ b/recipes/tllist/all/conanfile.py
@@ -0,0 +1,40 @@
+from conan import ConanFile
+from conans import tools
+from conans.errors import ConanInvalidConfiguration
+
+
+required_conan_version = ">=1.43.0"
+
+
+class TllistConan(ConanFile):
+    name = "tllist"
+    license = "MIT"
+    url = "https://github.com/conan-io/conan-center-index"
+    homepage = "https://codeberg.org/dnkl/tllist"
+    description = "A C header file only implementation of a typed linked list."
+    topics = ("list", "utils", "typed-linked-list")
+    settings = "os", "arch", "build_type", "compiler"
+    no_copy_source = True
+
+    @property
+    def _source_subfolder(self):
+        return "source_subfolder"
+
+    def validate(self):
+        # tllist relies on __typeof__, not implemented in Visual Studio
+        if self.settings.compiler == "Visual Studio":
+            raise ConanInvalidConfiguration("Visual Studio compiler is not supported")
+
+    def source(self):
+        tools.get(**self.conan_data["sources"][self.version],
+                  destination=self._source_subfolder, strip_root=True)
+
+    def package(self):
+        self.copy("LICENSE", src=self._source_subfolder, dst="licenses")
+        self.copy("*.h", src=self._source_subfolder, dst="include")
+
+    def package_id(self):
+        self.info.header_only()
+
+    def package_info(self):
+        self.cpp_info.set_property("pkg_config_name", "tllist")


Test patch:
diff --git a/recipes/tllist/all/test_package/CMakeLists.txt b/recipes/tllist/all/test_package/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/recipes/tllist/all/test_package/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.1)
+project(test_package C)
+
+include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+conan_basic_setup(TARGETS)
+
+find_package(tllist CONFIG REQUIRED)
+
+add_executable(${PROJECT_NAME} test_package.c)
+target_link_libraries(${PROJECT_NAME} tllist::tllist)
diff --git a/recipes/tllist/all/test_package/conanfile.py b/recipes/tllist/all/test_package/conanfile.py
new file mode 100644
--- /dev/null
+++ b/recipes/tllist/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", "cmake_find_package_multi"
+
+    def build(self):
+        cmake = CMake(self)
+        cmake.configure()
+        cmake.build()
+
+    def test(self):
+        if not tools.cross_building(self):
+            bin_path = os.path.join("bin", "test_package")
+            self.run(bin_path, run_environment=True)
diff --git a/recipes/tllist/all/test_package/test_package.c b/recipes/tllist/all/test_package/test_package.c
new file mode 100644
--- /dev/null
+++ b/recipes/tllist/all/test_package/test_package.c
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+#include <tllist.h>
+
+int main(int argc, const char *const *argv) {
+  tll(int) l = tll_init();
+
+  tll_push_back(l, 43);
+
+  return EXIT_SUCCESS;
+}