diff --git a/recipes/hiredis/0.x.x/conandata.yml b/recipes/hiredis/0.x.x/conandata.yml deleted file mode 100644 index 3f9e56b040e5b3..00000000000000 --- a/recipes/hiredis/0.x.x/conandata.yml +++ /dev/null @@ -1,7 +0,0 @@ -sources: - "0.14.1": - url: "https://github.com/redis/hiredis/archive/v0.14.1.tar.gz" - sha256: "2663b2aed9fd430507e30fc5e63274ee40cdd1a296026e22eafd7d99b01c8913" -patches: - "0.14.1": - - patch_file: "patches/0001-fix-makefile.patch" diff --git a/recipes/hiredis/0.x.x/conanfile.py b/recipes/hiredis/0.x.x/conanfile.py deleted file mode 100644 index 5a9c7e6d2f1f3d..00000000000000 --- a/recipes/hiredis/0.x.x/conanfile.py +++ /dev/null @@ -1,88 +0,0 @@ -import os - -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file, rm, rmdir -from conan.tools.gnu import Autotools, AutotoolsToolchain -from conan.tools.layout import basic_layout -from conan.tools.microsoft import unix_path - -required_conan_version = ">=1.53.0" - - -class HiredisConan(ConanFile): - name = "hiredis" - description = "Hiredis is a minimalistic C client library for the Redis database." - license = "BSD-3-Clause" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/redis/hiredis" - topics = ("redis", "client", "database") - - package_type = "library" - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } - - def export_sources(self): - export_conandata_patches(self) - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.cppstd") - self.settings.rm_safe("compiler.libcxx") - - def layout(self): - basic_layout(self, src_folder="src") - - def validate(self): - if self.settings.os == "Windows": - raise ConanInvalidConfiguration(f"hiredis {self.version} is not supported on Windows.") - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - tc = AutotoolsToolchain(self) - tc.make_args = [ - "PREFIX=/", - f"DESTDIR={unix_path(self, self.package_folder)}", - ] - tc.generate() - - def _patch_sources(self): - apply_conandata_patches(self) - # Do not force PIC if static - if not self.options.shared: - makefile = os.path.join(self.source_folder, "Makefile") - replace_in_file(self, makefile, "-fPIC ", "") - - def build(self): - self._patch_sources() - with chdir(self, self.source_folder): - autotools = Autotools(self) - autotools.make() - - def package(self): - copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - with chdir(self, self.source_folder): - autotools = Autotools(self) - autotools.install() - if not self.options.shared: - rm(self, "*.so*", os.path.join(self.package_folder, "lib"), recursive=True) - rm(self, "*.dylib*", os.path.join(self.package_folder, "lib"), recursive=True) - else: - rm(self, "*.a", os.path.join(self.package_folder, "lib"), recursive=True) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - fix_apple_shared_install_name(self) - - def package_info(self): - self.cpp_info.set_property("pkg_config_name", "hiredis") - self.cpp_info.libs = ["hiredis"] diff --git a/recipes/hiredis/0.x.x/patches/0001-fix-makefile.patch b/recipes/hiredis/0.x.x/patches/0001-fix-makefile.patch deleted file mode 100644 index 52271f0ac99471..00000000000000 --- a/recipes/hiredis/0.x.x/patches/0001-fix-makefile.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/Makefile_old -+++ b/Makefile -@@ -38,10 +38,8 @@ export REDIS_TEST_CONFIG - # Fallback to gcc when $CC is not in $PATH. - CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') - CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') --OPTIMIZATION?=-O3 - WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings --DEBUG_FLAGS?= -g -ggdb --REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) -+REAL_CFLAGS=-fPIC $(CFLAGS) $(WARNINGS) - REAL_LDFLAGS=$(LDFLAGS) - - DYLIBSUFFIX=so -@@ -49,7 +47,7 @@ STLIBSUFFIX=a - DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_SONAME) - DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR) - DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX) --DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS) -+DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(CFLAGS) $(LDFLAGS) - STLIBNAME=$(LIBNAME).$(STLIBSUFFIX) - STLIB_MAKE_CMD=ar rcs $(STLIBNAME) - -@@ -57,15 +55,15 @@ STLIB_MAKE_CMD=ar rcs $(STLIBNAME) - uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') - ifeq ($(uname_S),SunOS) - REAL_LDFLAGS+= -ldl -lnsl -lsocket -- DYLIB_MAKE_CMD=$(CC) -G -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS) -+ DYLIB_MAKE_CMD=$(CC) -G -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(CFLAGS) $(LDFLAGS) - endif - ifeq ($(uname_S),Darwin) - DYLIBSUFFIX=dylib - DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX) -- DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS) -+ DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(CFLAGS) $(LDFLAGS) - endif - --all: $(DYLIBNAME) $(STLIBNAME) hiredis-test $(PKGCONFNAME) -+all: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) - - # Deps (use make dep to generate this) - alloc.o: alloc.c fmacros.h alloc.h diff --git a/recipes/hiredis/0.x.x/test_package/CMakeLists.txt b/recipes/hiredis/0.x.x/test_package/CMakeLists.txt deleted file mode 100644 index dd4e0d0e82f0ef..00000000000000 --- a/recipes/hiredis/0.x.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(test_package C) - -find_package(hiredis REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) diff --git a/recipes/hiredis/0.x.x/test_package/conanfile.py b/recipes/hiredis/0.x.x/test_package/conanfile.py deleted file mode 100644 index ef5d7042163ecc..00000000000000 --- a/recipes/hiredis/0.x.x/test_package/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -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 requirements(self): - self.requires(self.tested_reference_str) - - def layout(self): - cmake_layout(self) - - 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.bindir, "test_package") - self.run(bin_path, env="conanrun") diff --git a/recipes/hiredis/0.x.x/test_package/test_package.c b/recipes/hiredis/0.x.x/test_package/test_package.c deleted file mode 100644 index 6df475bd4539a7..00000000000000 --- a/recipes/hiredis/0.x.x/test_package/test_package.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -#include -#include - -int main() -{ - printf("hiredis version: %i.%i.%i\n", HIREDIS_MAJOR, HIREDIS_MINOR, HIREDIS_PATCH); - - const char *hostname = "127.0.0.1"; - int port = 6379; - - redisContext *c = redisConnect(hostname, port); - if (c == NULL) - { - printf("Error: Can't allocate redis context\n"); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} diff --git a/recipes/hiredis/0.x.x/test_v1_package/CMakeLists.txt b/recipes/hiredis/0.x.x/test_v1_package/CMakeLists.txt deleted file mode 100644 index 91630d79f4abb3..00000000000000 --- a/recipes/hiredis/0.x.x/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/hiredis/0.x.x/test_v1_package/conanfile.py b/recipes/hiredis/0.x.x/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47f..00000000000000 --- a/recipes/hiredis/0.x.x/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - 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/hiredis/config.yml b/recipes/hiredis/config.yml index 44921f335f1c86..0c6ef43d085e21 100644 --- a/recipes/hiredis/config.yml +++ b/recipes/hiredis/config.yml @@ -7,5 +7,4 @@ versions: folder: all "1.0.0": folder: all - "0.14.1": - folder: "0.x.x" +