From bb829973deea2087ef96ee2a4ff01babee5a0a2b Mon Sep 17 00:00:00 2001 From: Angus Comrie Date: Fri, 23 Jul 2021 07:47:28 +0200 Subject: [starlink-ast] create new port (#17105) * initial test of AST (broken) * slight improvement to build * almost working... * added minpack cflags * use static linking * yaml and pthreads features added * debug and release cflags * versioning * formated vcpkg.json * updated version string * adjusted based on PR feedback * updated to 9.2.4 release to avoid source patching * removed comments * updated baseline version * Apply suggestions from code review Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: autoantwort <41973254+autoantwort@users.noreply.github.com> * adds supports field to json * Update ports/starlink-ast/portfile.cmake adjust configure options Co-authored-by: autoantwort <41973254+autoantwort@users.noreply.github.com> * removed --disabled-shared and MINPACK_NO_DLL * use DETERMINE_BUILD_TRIPLET to determine host * updates git-tree hash * quotemarks fix * git tree hash update Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: autoantwort <41973254+autoantwort@users.noreply.github.com> --- ports/starlink-ast/portfile.cmake | 44 +++++++++++++++++++++++++++++++++++++++ ports/starlink-ast/vcpkg.json | 21 +++++++++++++++++++ versions/baseline.json | 4 ++++ versions/s-/starlink-ast.json | 9 ++++++++ 4 files changed, 78 insertions(+) create mode 100644 ports/starlink-ast/portfile.cmake create mode 100644 ports/starlink-ast/vcpkg.json create mode 100644 versions/s-/starlink-ast.json diff --git a/ports/starlink-ast/portfile.cmake b/ports/starlink-ast/portfile.cmake new file mode 100644 index 000000000..b49c13320 --- /dev/null +++ b/ports/starlink-ast/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX") + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Starlink/ast/releases/download/v9.2.4/ast-9.2.4.tar.gz" + FILENAME "ast-9.2.4.tar.gz" + SHA512 84e6f243e6d9d77328b73b97355feb3990307fb9c8f9b2f30344d71e2f5e63a849cdce0090ff5b7cc16028e12d68516c885b13d76db841072c9d1d06a7742a9e +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +set(CONFIGURE_OPTIONS "--without-fortran star_cv_cnf_trail_type=long star_cv_cnf_f2c_compatible=no") + +if ("yaml" IN_LIST FEATURES) + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-yaml") +else() + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-yaml") +endif() + +if ("pthreads" IN_LIST FEATURES) + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-pthreads") +else() + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-pthreads") +endif() + +vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16 perl) +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + USE_WRAPPERS + DETERMINE_BUILD_TRIPLET + OPTIONS ${CONFIGURE_OPTIONS} + OPTIONS_RELEASE ${CONFIGURE_OPTIONS_RELEASE} + OPTIONS_DEBUG ${CONFIGURE_OPTIONS_DEBUG} +) + +vcpkg_install_make() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share") + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/starlink-ast/vcpkg.json b/ports/starlink-ast/vcpkg.json new file mode 100644 index 000000000..8bbc2238c --- /dev/null +++ b/ports/starlink-ast/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "starlink-ast", + "version-semver": "9.2.4", + "description": "The AST library provides a comprehensive range of facilities for attaching world coordinate systems to astronomical data, for retrieving and interpreting that information and for generating graphical output based on it", + "homepage": "https://starlink.eao.hawaii.edu/starlink/AST", + "supports": "windows", + "features": { + "pthreads": { + "description": "build with POSIX threads support", + "dependencies": [ + "pthreads" + ] + }, + "yaml": { + "description": "build with YAML support", + "dependencies": [ + "libyaml" + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index a74e70abc..4e7866e20 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6056,6 +6056,10 @@ "baseline": "0.6.4", "port-version": 0 }, + "starlink-ast": { + "baseline": "9.2.4", + "port-version": 0 + }, "status-code": { "baseline": "1.0.0-ab3cd821", "port-version": 0 diff --git a/versions/s-/starlink-ast.json b/versions/s-/starlink-ast.json new file mode 100644 index 000000000..f357f55c5 --- /dev/null +++ b/versions/s-/starlink-ast.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "50f0b71ca66bd9e4ce6cb5a153e25878dd7a0600", + "version-semver": "9.2.4", + "port-version": 0 + } + ] +} -- cgit v1.2.3