diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-18 20:50:08 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-18 20:54:03 -0700 |
| commit | ccca198c1b1730b0241911cb56dc8e3504958b2a (patch) | |
| tree | a2dd9b8b087a09afdcecc5cbb3377bed15127eb2 /ports/openssl | |
| download | vcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.tar.gz vcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.zip | |
Initial commit
Diffstat (limited to 'ports/openssl')
| -rw-r--r-- | ports/openssl/CMakeLists.txt | 68 | ||||
| -rw-r--r-- | ports/openssl/CONTROL | 4 | ||||
| -rw-r--r-- | ports/openssl/LICENSE | 127 | ||||
| -rw-r--r-- | ports/openssl/portfile.cmake | 46 |
4 files changed, 245 insertions, 0 deletions
diff --git a/ports/openssl/CMakeLists.txt b/ports/openssl/CMakeLists.txt new file mode 100644 index 000000000..ff034bb9a --- /dev/null +++ b/ports/openssl/CMakeLists.txt @@ -0,0 +1,68 @@ +cmake_minimum_required(VERSION 3.0) +project(openssl NONE) + +include(vcpkg_execute_required_process) + +find_package(ZLIB REQUIRED) +find_program(PERL perl) +find_program(NMAKE nmake) + +message(STATUS "Extracting source ${OPENSSL_SOURCE_ARCHIVE}") +vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} -E tar xjf ${OPENSSL_SOURCE_ARCHIVE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + LOGNAME extract-${TARGET_TRIPLET}-rel +) + +set(CONFIGURE_COMMAND ${PERL} Configure + no-idea + no-mdc2 + no-rc5 + no-asm + zlib-dynamic + --with-zlib-include=${ZLIB_INCLUDE_DIRS} +) + +if(TARGET_TRIPLET MATCHES "x86-windows") + set(OPENSSL_ARCH VC-WIN32) + set(OPENSSL_DO "ms\\do_ms.bat") +elseif(TARGET_TRIPLET MATCHES "x64") + set(OPENSSL_ARCH VC-WIN64A) + set(OPENSSL_DO "ms\\do_win64a.bat") +else() + message(FATAL_ERROR "Unsupported target triplet: ${TARGET_TRIPLET}") +endif() + +if(CMAKE_BUILD_TYPE MATCHES "Debug") + set(OPENSSLDIR ${CURRENT_PACKAGES_DIR}/debug) + list(GET ZLIB_LIBRARIES -1 ZLIB_DEBUG_LIBRARY) + list(APPEND CONFIGURE_COMMAND + debug-${OPENSSL_ARCH} + --openssldir=${OPENSSLDIR} + --with-zlib-lib=${ZLIB_DEBUG_LIBRARY} + ) +else() + set(OPENSSLDIR ${CURRENT_PACKAGES_DIR}) + list(APPEND CONFIGURE_COMMAND + ${OPENSSL_ARCH} + --openssldir=${OPENSSLDIR} + --with-zlib-lib=${ZLIB_LIBRARIES} + ) +endif() + +vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openssl-${VERSION} + LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE} +) +vcpkg_execute_required_process( + COMMAND ${OPENSSL_DO} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openssl-${VERSION} + LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE} +) + +add_custom_command(OUTPUT ${OPENSSLDIR}/bin/ssleay32.dll ${OPENSSLDIR}/bin/libeay32.dll + COMMAND ${NMAKE} -f ms\\ntdll.mak install + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openssl-${VERSION} +) +add_custom_target(openssl ALL DEPENDS ${OPENSSLDIR}/bin/ssleay32.dll ${OPENSSLDIR}/bin/libeay32.dll)
\ No newline at end of file diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL new file mode 100644 index 000000000..cc539a03e --- /dev/null +++ b/ports/openssl/CONTROL @@ -0,0 +1,4 @@ +Source: openssl +Version: 1.0.2h +Build-Depends: zlib +Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
\ No newline at end of file diff --git a/ports/openssl/LICENSE b/ports/openssl/LICENSE new file mode 100644 index 000000000..e47d101f1 --- /dev/null +++ b/ports/openssl/LICENSE @@ -0,0 +1,127 @@ + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake new file mode 100644 index 000000000..1133bf471 --- /dev/null +++ b/ports/openssl/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) +vcpkg_find_acquire_program(PERL) +find_program(NMAKE nmake) + +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") + +vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE + URL "https://www.openssl.org/source/openssl-1.0.2h.tar.gz" + FILENAME "openssl-1.0.2h.tar.gz" + MD5 9392e65072ce4b614c1392eefc1f23d0 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${CURRENT_BUILDTREES_DIR}/src/openssl-1.0.2h) + +vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-1.0.2h + GENERATOR "NMake Makefiles" + OPTIONS + -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + -DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR} + -DCURRENT_BUILDTREES_DIR=${CURRENT_BUILDTREES_DIR} + -DOPENSSL_SOURCE_ARCHIVE=${OPENSSL_SOURCE_ARCHIVE} + -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} + -DTRIPLET_SYSTEM_ARCH=${TRIPLET_SYSTEM_ARCH} + -DVERSION=1.0.2h + -DTARGET_TRIPLET=${TARGET_TRIPLET} +) + +vcpkg_build_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf + ${CURRENT_PACKAGES_DIR}/openssl.cnf +) +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/engines) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/engines ${CURRENT_PACKAGES_DIR}/bin/engines) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/engines) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/engines ${CURRENT_PACKAGES_DIR}/debug/bin/engines) +endif() +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) +vcpkg_copy_pdbs() |
