early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.8)
project(secp256k1 C)
option(INSTALL_HEADERS "Install header files" ON)
add_definitions(
-DENABLE_MODULE_ECDH
-DENABLE_MODULE_RECOVERY
-DHAVE_CONFIG_H
)
file(GLOB SOURCES src/secp256k1.c)
add_library(secp256k1 ${SOURCES})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
target_include_directories(secp256k1 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
if(INSTALL_HEADERS)
file(GLOB HEADERS include/*.h)
install(FILES ${HEADERS} DESTINATION include)
endif()
install(TARGETS secp256k1 EXPORT unofficial-secp256k1-targets
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(
EXPORT unofficial-secp256k1-targets
FILE unofficial-secp256k1-targets.cmake
NAMESPACE unofficial::
DESTINATION share/unofficial-secp256k1
)

View File

@@ -0,0 +1,29 @@
/**********************************************************************
* Copyright (c) 2013, 2014 Pieter Wuille *
* Distributed under the MIT software license, see the accompanying *
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
**********************************************************************/
#ifndef SECP256K1_BASIC_CONFIG_H
#define SECP256K1_BASIC_CONFIG_H
#undef USE_ASM_X86_64
#undef USE_ENDOMORPHISM
#undef USE_FIELD_10X26
#undef USE_FIELD_5X52
#undef USE_FIELD_INV_BUILTIN
#undef USE_FIELD_INV_NUM
#undef USE_NUM_GMP
#undef USE_NUM_NONE
#undef USE_SCALAR_4X64
#undef USE_SCALAR_8X32
#undef USE_SCALAR_INV_BUILTIN
#undef USE_SCALAR_INV_NUM
#define USE_NUM_NONE 1
#define USE_FIELD_INV_BUILTIN 1
#define USE_SCALAR_INV_BUILTIN 1
#define USE_FIELD_10X26 1
#define USE_SCALAR_8X32 1
#endif /* SECP256K1_BASIC_CONFIG_H */

View File

@@ -0,0 +1,25 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO "bitcoin-core/secp256k1"
REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4"
SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc
)
file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
configure_file(${CMAKE_CURRENT_LIST_DIR}/secp256k1-config.cmake ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-secp256k1-config.cmake @ONLY)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@@ -0,0 +1 @@
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-secp256k1-targets.cmake")

7
externals/vcpkg/ports/secp256k1/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,7 @@
{
"name": "secp256k1",
"version-string": "2017-19-10",
"port-version": 4,
"description": "Optimized C library for EC operations on curve",
"homepage": "https://github.com/bitcoin-core/secp256k1"
}