forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:conan-io/conan-center-index into …
…develop
- Loading branch information
Showing
93 changed files
with
1,515 additions
and
890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1128,3 +1128,4 @@ authorized_users: | |
- silvergasp | ||
- doocman | ||
- gouarin | ||
- gegles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"6.21.2": | ||
folder: all | ||
"6.21.0": | ||
folder: all | ||
"6.20.1": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package LANGUAGES C) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
find_package(aws-checksums REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} ../test_package/test_package.c) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-checksums) | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package | ||
${CMAKE_CURRENT_BINARY_DIR}/test_package) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(b64 LANGUAGES C CXX) | ||
|
||
file(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/include/b64/*.h") | ||
add_library(${PROJECT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/src/cdecode.c" "${CMAKE_CURRENT_SOURCE_DIR}/src/src/cencode.c" ${HEADER_FILES}) | ||
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/include") | ||
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${HEADER_FILES}" WINDOWS_EXPORT_ALL_SYMBOLS TRUE) | ||
install(TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/b64" | ||
) | ||
|
||
set(BASE64_APP base64) | ||
add_executable(${BASE64_APP} "${CMAKE_CURRENT_SOURCE_DIR}/src/base64/base64.cc" ${HEADER_FILES}) | ||
target_link_libraries(${BASE64_APP} PRIVATE ${PROJECT_NAME}) | ||
target_include_directories(${BASE64_APP} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/include") | ||
target_compile_definitions(${BASE64_APP} PRIVATE BUFFERSIZE=16777216) | ||
set_target_properties(${BASE64_APP} PROPERTIES LINKER_LANGUAGE CXX) | ||
install(TARGETS ${BASE64_APP} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sources: | ||
"2.0.0.1": | ||
url: "https://github.com/libb64/libb64/archive/refs/tags/v2.0.0.1.tar.gz" | ||
sha256: "ce8e578a953a591bd4a6f157eec310b9a4c2e6f10ade2fdda6ae6bafaf798b98" | ||
patches: | ||
"2.0.0.1": | ||
- patch_file: "patches/0001-windows-elseif.patch" | ||
patch_description: "Replace elseif definition by elif to make it work on Windows" | ||
patch_type: "portability" | ||
patch_source: "https://github.com/libb64/libb64/commit/b5edeafc89853c48fa41a4c16393a1fdc8638ab6" | ||
- patch_file: "patches/0002-extern-c.patch" | ||
patch_description: "Move extern C from C++ headers to C headers" | ||
patch_type: "portability" | ||
patch_source: "https://github.com/libb64/libb64/pull/6/commits/502573666a61317aa6bee2ff9ab74e65a7c25f63" | ||
- patch_file: "patches/0003-stdlib-exit.patch" | ||
patch_description: "Use cstdlib instead of stdlib.h for exit() - needed for GCC5" | ||
patch_type: "conan" | ||
- patch_file: "patches/0004-include-order.patch" | ||
patch_description: "Include C headers first, than C++ headers, and project headers" | ||
patch_type: "conan" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from conan import ConanFile | ||
from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches | ||
from conan.tools.cmake import cmake_layout, CMakeToolchain, CMake | ||
import os | ||
|
||
|
||
required_conan_version = ">=1.53.0" | ||
|
||
|
||
class B64Conan(ConanFile): | ||
name = "b64" | ||
description = "A library of ANSI C routines for fast encoding/decoding data into and from a base64-encoded format." | ||
license = "CC0-1.0" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
homepage = "https://libb64.sourceforge.net/" | ||
topics = ("base64", "codec", "encoder", "decoder") | ||
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): | ||
copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) | ||
export_conandata_patches(self) | ||
|
||
def config_options(self): | ||
if self.settings.os == "Windows": | ||
del self.options.fPIC | ||
|
||
def configure(self): | ||
if self.options.shared: | ||
self.options.rm_safe("fPIC") | ||
|
||
def layout(self): | ||
cmake_layout(self, src_folder="src") | ||
|
||
def source(self): | ||
get(self, **self.conan_data["sources"][self.version], strip_root=True) | ||
|
||
def generate(self): | ||
tc = CMakeToolchain(self) | ||
tc.generate() | ||
|
||
def build(self): | ||
apply_conandata_patches(self) | ||
cmake = CMake(self) | ||
cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) | ||
cmake.build() | ||
|
||
def package(self): | ||
copy(self, pattern="LICENSE.md", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) | ||
cmake = CMake(self) | ||
cmake.install() | ||
|
||
def package_info(self): | ||
self.cpp_info.libs = ["b64"] | ||
|
||
# TODO: Only for Conan 1.x legacy - Remove after running Conan 2.x only | ||
self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/include/b64/ccommon.h b/include/b64/ccommon.h | ||
index 2b614df..28a9936 100644 | ||
--- a/include/b64/ccommon.h | ||
+++ b/include/b64/ccommon.h | ||
@@ -14,7 +14,7 @@ For details, see http://sourceforge.net/projects/libb64 | ||
#ifndef HAVE_SIZE_T | ||
#ifdef _WIN32 | ||
#include <crtdefs.h> | ||
- #elseif defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) | ||
+ #elif defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) | ||
#include <stdlib.h> | ||
#else | ||
typedef unsigned long size_t; |
Oops, something went wrong.