Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libical] new port #20965

Merged
merged 8 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions ports/libical/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libical/libical
REF v3.0.11
SHA512 cdee86c50edc2373ab2024d7d4ae26dd4b9a728dbc13083472c4923c67f61ff3cef7d43edca762c6a11979d2040fc1576a033eaa23a19e58af8f14a7d67fc139
)

vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path(${PERL_PATH})

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
"rscale" CMAKE_DISABLE_FIND_PACKAGE_ICU
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(APPEND FEATURE_OPTIONS -DSTATIC_ONLY=ON)
else()
list(APPEND FEATURE_OPTIONS -DSHARED_ONLY=ON)
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCMAKE_DISABLE_FIND_PACKAGE_BDB=ON
-DUSE_BUILTIN_TZDATA=ON
wrobelda marked this conversation as resolved.
Show resolved Hide resolved
-DICAL_GLIB=OFF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be on, if glib is found

Copy link
Contributor Author

@wrobelda wrobelda Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require an additional dependency of Glib and LibXml2. I was thinking about making it a separate feature, but based on your readme1, it seems very experimental, so I gave up on it. I can try adding that feature, after all, but first need to fix the icu issue.

Footnotes

  1. The libical-glib API is currently unstable and can change with any release. Until it is considered stable, there should be defined LIBICAL_GLIB_UNSTABLE_API=1 before including <libical-glib/libical-glib.h>, to indicate that the library user is aware of it and is prepared to change the calls anytime. (https://github.com/libical/libical#introduction)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@winterz tried adding "glib" feature, but getting:

CMake Error:
  Running

   '/Users/cromo/Documents/Sourcecode/vcpkg/downloads/tools/ninja-1.10.2-osx/ninja' '-C' '/Users/cromo/Documents/Sourcecode/vcpkg/buildtrees/libical/arm64-osx-dbg' '-t' 'recompact'

  failed with:

   ninja: error: build.ninja:2151: multiple rules generate lib/libical-glib.a [-w dupbuild=err]

-DICAL_BUILD_DOCS=OFF
-DLIBICAL_BUILD_TESTING=OFF
${FEATURE_OPTIONS}
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME LibIcal CONFIG_PATH CONFIG_PATH lib/cmake/LibIcal)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
25 changes: 25 additions & 0 deletions ports/libical/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "libical",
"version": "3.0.11",
"description": "Reference implementation of the iCalendar data type and serialization format",
"homepage": "https://github.com/libical/libical",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"rscale": {
"description": "Support for RSCALE element",
"supports": "!static",
"dependencies": [
"icu"
]
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3508,6 +3508,10 @@
"baseline": "2019-08-11",
"port-version": 1
},
"libical": {
"baseline": "3.0.11",
"port-version": 0
},
"libiconv": {
"baseline": "1.16",
"port-version": 11
Expand Down
9 changes: 9 additions & 0 deletions versions/l-/libical.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "f4ab3492c90b3d683702cacb90aaea839cfc3d8f",
"version": "3.0.11",
"port-version": 0
}
]
}