vcpkg/ports/calceph/portfile.cmake
Stefano Sinigardi eff88baadc
[x64-windows-release] add a single config community triplet based on x64-windows and make it work on some ports (#15983)
* add a single config community triplet based on x64-windows

* add a failed port, otherwise mechanism does not support empty list

* add failures to baseline

* remove duplicate entry

* second round of failures added to baseline

* third round of regressions added to CI

* [ade] fix single-config builds

* [ade] update refs

* remove duplicate entries

* [unix2dos] restore eol in script file

* add even more ports now failing in singleConfig...

* [libjpeg-turbo] remove unnecessary check

* [libjpeg-turbo] fix references

* [baseline] restore check for ports that were added recently

* [libmodplug] enable single config triplets

* [tensorflow-common] enable single config triplets

* update baseline

* fix references

* remove wrong check for single config triplets

* fix references

* [ogre] fix single config builds

* [ogre] fix references

* [untested] force x64-windows-release as host triplet when testing x64-windows-release in CI

* fix

* [x264] fix for single config

* [x264] update refs

* [libffi] enable single config builds

* [libffi] update refs

* remove cli broken arguments

* [calceph] enable single-config builds

* [calceph] fix references

* [kf5config] enable single-config builds

* [kf5config] fix references

* [detours] enable single-config builds

* [detours] fix references

* [kf5*] enable single-config builds

* [kf5*] fix references

* fix

* kf5config fix reference

* trying again to force host triplet in CI

* [boost] fix for single-config builds

* [boost] update references

* fix

* [boost] update refs

* disable host triplet in ci because it's not necessary

* retrigger a build for ports previously failing

* remove host triplet in ci, not necessary anymore?

* make PR dry

* [tensorflow-common] bump version

* [tensorflow-common] fix references

* Fix version database for boost-modular-build-helper.

* fix references

* restore CRLF on some ports

* bump versions

* fix references

* bump port versions

* fix references

* boost-modular-build-helper: Reverted due to no changes.

detours, kf5config, kf5holidays, libbacktrace: Reverted due to only whitespace changes.
libffi: bumped port-version
libmodplug: reverted due to no functional changes
ogre, ogre-next: reverted due to incorrect case of "Debug" vs. "Release" already fixed in master.

And rebuilt version database.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-12-20 10:50:45 -05:00

54 lines
2.1 KiB
CMake
Executable File

vcpkg_fail_port_install(ON_TARGET "uwp")
set(CALCEPH_VERSION "3.5.0")
set(CALCEPH_HASH 12bb269d846aab93799656919cd9ca5a995248fb806727ea95667374b9380ca8f52c57dc6a5930c6995c13749bff1459c430eb2908b1533a8804fcb6b95c3de9)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-${CALCEPH_VERSION}.tar.gz"
FILENAME "calceph-${CALCEPH_VERSION}.tar.gz"
SHA512 ${CALCEPH_HASH}
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES makefilevc.patch
)
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_install_nmake(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
OPTIONS_DEBUG
DESTDIR="${CURRENT_INSTALLED_DIR}/calceph/debug"
CFLAGS="${VCPKG_C_FLAGS_DEBUG} "
OPTIONS_RELEASE
DESTDIR="${CURRENT_INSTALLED_DIR}/calceph"
CFLAGS="${VCPKG_C_FLAGS_RELEASE} "
)
file(INSTALL "${CURRENT_INSTALLED_DIR}/calceph/include/calceph.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(INSTALL "${CURRENT_INSTALLED_DIR}/calceph/lib/libcalceph.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(INSTALL "${CURRENT_INSTALLED_DIR}/calceph/debug/lib/libcalceph.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()
file(REMOVE_RECURSE "${CURRENT_INSTALLED_DIR}/calceph")
else() # Build in UNIX
vcpkg_configure_make(
AUTOCONFIG
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${OPTIONS}
--enable-fortran=no
--enable-thread=yes
)
vcpkg_install_make()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
endif()
file(INSTALL "${SOURCE_PATH}/README.rst" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME readme.rst)
file(INSTALL "${SOURCE_PATH}/COPYING_CECILL_B.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/doc/calceph_c.pdf" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME calceph_c.pdf)