2020-06-30 05:43:51 +08:00
vcpkg_fail_port_install ( MESSAGE "${PORT} is only for Windows Universal Platform" ON_TARGET "Linux" "OSX" )
2016-11-08 13:54:23 +08:00
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 10:11:54 +08:00
if ( EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h" )
2020-08-19 07:49:57 +08:00
message ( FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it." )
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 10:11:54 +08:00
endif ( )
vcpkg_check_linkage ( ONLY_DYNAMIC_LIBRARY )
2017-08-02 08:12:59 +08:00
vcpkg_find_acquire_program ( PERL )
2017-06-08 17:15:58 +08:00
vcpkg_find_acquire_program ( JOM )
get_filename_component ( JOM_EXE_PATH ${ JOM } DIRECTORY )
2016-11-04 20:09:13 +08:00
get_filename_component ( PERL_EXE_PATH ${ PERL } DIRECTORY )
2020-06-30 05:43:51 +08:00
vcpkg_add_to_path ( "${PERL_EXE_PATH}" )
vcpkg_add_to_path ( "${JOM_EXE_PATH}" )
2016-11-04 20:09:13 +08:00
2020-10-14 04:44:22 +08:00
set ( OPENSSL_VERSION 1.1.1h )
2018-06-01 01:04:01 +08:00
2020-01-14 07:43:36 +08:00
vcpkg_download_distfile ( ARCHIVE
U R L S " h t t p s : / / w w w . o p e n s s l . o r g / s o u r c e / o p e n s s l - $ { O P E N S S L _ V E R S I O N } . t a r . g z " " h t t p s : / / w w w . o p e n s s l . o r g / s o u r c e / o l d / 1 . 1 . 1 / o p e n s s l - $ { O P E N S S L _ V E R S I O N } . t a r . g z "
F I L E N A M E " o p e n s s l - $ { O P E N S S L _ V E R S I O N } . t a r . g z "
2020-10-14 04:44:22 +08:00
S H A 5 1 2 d a 5 0 f d 9 9 3 2 5 8 4 1 e d 7 a 4 3 6 7 d 9 2 5 1 c 7 7 1 c e 5 0 5 a 4 4 3 a 7 3 b 3 2 7 d 8 a 4 6 b 2 c 6 a 7 d 2 e a 9 9 e 4 3 5 5 1 a 1 6 4 e f c 8 6 f 8 7 4 3 b 2 2 c 2 b d b 0 0 2 0 b f 2 4 a 9 c b d 4 4 5 e 9 d 6 8 8 6 8 b 2 d c 1 d 3 4 0 3 3 a
2020-01-14 07:43:36 +08:00
)
2016-11-04 20:09:13 +08:00
2020-01-14 07:43:36 +08:00
vcpkg_extract_source_archive_ex (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
A R C H I V E $ { A R C H I V E }
P A T C H E S
E n a b l e U W P S u p p o r t . p a t c h
2017-08-24 13:15:02 +08:00
)
2016-11-04 20:09:13 +08:00
2020-01-14 07:43:36 +08:00
vcpkg_find_acquire_program ( NASM )
get_filename_component ( NASM_EXE_PATH ${ NASM } DIRECTORY )
2020-06-30 05:43:51 +08:00
vcpkg_add_to_path ( PREPEND "${NASM_EXE_PATH}" )
2020-01-14 07:43:36 +08:00
vcpkg_find_acquire_program ( JOM )
set ( CONFIGURE_COMMAND ${ PERL } Configure
e n a b l e - s t a t i c - e n g i n e
e n a b l e - c a p i e n g
n o - u n i t - t e s t
n o - s s l 2
n o - a s m
n o - u p l i n k
2020-06-30 05:43:51 +08:00
n o - t e s t s
2020-01-14 07:43:36 +08:00
- u t f - 8
s h a r e d
2016-11-04 20:09:13 +08:00
)
2020-01-14 07:43:36 +08:00
if ( VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" )
set ( OPENSSL_ARCH VC-WIN32-UWP )
elseif ( VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" )
set ( OPENSSL_ARCH VC-WIN64A-UWP )
elseif ( VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" )
set ( OPENSSL_ARCH VC-WIN32-ARM-UWP )
elseif ( VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" )
set ( OPENSSL_ARCH VC-WIN64-ARM-UWP )
else ( )
message ( FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}" )
endif ( )
set ( OPENSSL_MAKEFILE "makefile" )
file ( REMOVE_RECURSE ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -rel ${ CURRENT_BUILDTREES_DIR } / ${ TARGET_TRIPLET } -dbg )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release" )
# Copy openssl sources.
message ( STATUS "Copying openssl release source files..." )
file ( GLOB OPENSSL_SOURCE_FILES ${ SOURCE_PATH } /* )
foreach ( SOURCE_FILE ${ OPENSSL_SOURCE_FILES } )
file ( COPY ${ SOURCE_FILE } DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" )
endforeach ( )
message ( STATUS "Copying openssl release source files... done" )
set ( SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" )
set ( OPENSSLDIR_RELEASE ${ CURRENT_PACKAGES_DIR } )
message ( STATUS "Configure ${TARGET_TRIPLET}-rel" )
vcpkg_execute_required_process (
C O M M A N D $ { C O N F I G U R E _ C O M M A N D } $ { O P E N S S L _ A R C H } " - - p r e f i x = $ { O P E N S S L D I R _ R E L E A S E } " " - - o p e n s s l d i r = $ { O P E N S S L D I R _ R E L E A S E } " - F S
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H _ R E L E A S E }
2020-01-23 04:15:26 +08:00
L O G N A M E c o n f i g u r e - p e r l - $ { T A R G E T _ T R I P L E T } - $ { V C P K G _ B U I L D _ T Y P E } - r e l
2020-01-14 07:43:36 +08:00
)
message ( STATUS "Configure ${TARGET_TRIPLET}-rel done" )
message ( STATUS "Build ${TARGET_TRIPLET}-rel" )
# Openssl's buildsystem has a race condition which will cause JOM to fail at some point.
# This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build.
make_directory ( ${ SOURCE_PATH_RELEASE } /inc32/openssl )
execute_process (
C O M M A N D $ { J O M } - k - j $ E N V { N U M B E R _ O F _ P R O C E S S O R S } - f $ { O P E N S S L _ M A K E F I L E } b u i l d _ l i b s
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H _ R E L E A S E }
O U T P U T _ F I L E $ { C U R R E N T _ B U I L D T R E E S _ D I R } / b u i l d - $ { T A R G E T _ T R I P L E T } - r e l - 0 - o u t . l o g
E R R O R _ F I L E $ { C U R R E N T _ B U I L D T R E E S _ D I R } / b u i l d - $ { T A R G E T _ T R I P L E T } - r e l - 0 - e r r . l o g
)
vcpkg_execute_required_process (
C O M M A N D n m a k e - f $ { O P E N S S L _ M A K E F I L E } i n s t a l l _ d e v
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H _ R E L E A S E }
L O G N A M E b u i l d - $ { T A R G E T _ T R I P L E T } - r e l - 1 )
message ( STATUS "Build ${TARGET_TRIPLET}-rel done" )
endif ( )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" )
# Copy openssl sources.
message ( STATUS "Copying openssl debug source files..." )
file ( GLOB OPENSSL_SOURCE_FILES ${ SOURCE_PATH } /* )
foreach ( SOURCE_FILE ${ OPENSSL_SOURCE_FILES } )
file ( COPY ${ SOURCE_FILE } DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" )
endforeach ( )
message ( STATUS "Copying openssl debug source files... done" )
set ( SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" )
set ( OPENSSLDIR_DEBUG ${ CURRENT_PACKAGES_DIR } /debug )
message ( STATUS "Configure ${TARGET_TRIPLET}-dbg" )
vcpkg_execute_required_process (
C O M M A N D $ { C O N F I G U R E _ C O M M A N D } d e b u g - $ { O P E N S S L _ A R C H } " - - p r e f i x = $ { O P E N S S L D I R _ D E B U G } " " - - o p e n s s l d i r = $ { O P E N S S L D I R _ D E B U G } " - F S
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H _ D E B U G }
2020-01-23 04:15:26 +08:00
L O G N A M E c o n f i g u r e - p e r l - $ { T A R G E T _ T R I P L E T } - $ { V C P K G _ B U I L D _ T Y P E } - d b g
2020-01-14 07:43:36 +08:00
)
message ( STATUS "Configure ${TARGET_TRIPLET}-dbg done" )
message ( STATUS "Build ${TARGET_TRIPLET}-dbg" )
make_directory ( ${ SOURCE_PATH_DEBUG } /inc32/openssl )
execute_process (
C O M M A N D $ { J O M } - k - j $ E N V { N U M B E R _ O F _ P R O C E S S O R S } - f $ { O P E N S S L _ M A K E F I L E } b u i l d _ l i b s
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H _ D E B U G }
O U T P U T _ F I L E $ { C U R R E N T _ B U I L D T R E E S _ D I R } / b u i l d - $ { T A R G E T _ T R I P L E T } - d b g - 0 - o u t . l o g
E R R O R _ F I L E $ { C U R R E N T _ B U I L D T R E E S _ D I R } / b u i l d - $ { T A R G E T _ T R I P L E T } - d b g - 0 - e r r . l o g
)
vcpkg_execute_required_process (
C O M M A N D n m a k e - f $ { O P E N S S L _ M A K E F I L E } i n s t a l l _ d e v
W O R K I N G _ D I R E C T O R Y $ { S O U R C E _ P A T H _ D E B U G }
L O G N A M E b u i l d - $ { T A R G E T _ T R I P L E T } - d b g - 1 )
message ( STATUS "Build ${TARGET_TRIPLET}-dbg done" )
endif ( )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /certs )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /private )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /lib/engines-1_1 )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/certs )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/lib/engines-1_1 )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/private )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
file ( REMOVE
$ { C U R R E N T _ P A C K A G E S _ D I R } / b i n / o p e n s s l . e x e
$ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / b i n / o p e n s s l . e x e
$ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / o p e n s s l . c n f
$ { C U R R E N T _ P A C K A G E S _ D I R } / o p e n s s l . c n f
$ { C U R R E N T _ P A C K A G E S _ D I R } / c t _ l o g _ l i s t . c n f
$ { C U R R E N T _ P A C K A G E S _ D I R } / c t _ l o g _ l i s t . c n f . d i s t
$ { C U R R E N T _ P A C K A G E S _ D I R } / o p e n s s l . c n f . d i s t
$ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / c t _ l o g _ l i s t . c n f
$ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / c t _ l o g _ l i s t . c n f . d i s t
$ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / o p e n s s l . c n f . d i s t
2016-11-04 20:09:13 +08:00
)
2020-01-14 07:43:36 +08:00
file ( READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents )
string ( REPLACE "<winsock.h>" "<winsock2.h>" _contents "${_contents}" )
file ( WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}" )
file ( READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents )
string ( REPLACE "# include <windows.h>" "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include <windows.h>" _contents "${_contents}" )
file ( WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}" )
vcpkg_copy_pdbs ( )
2017-11-17 15:54:55 +08:00
file ( COPY ${ CMAKE_CURRENT_LIST_DIR } /usage DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } )
2020-01-14 07:43:36 +08:00
file ( INSTALL ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )