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

[sese] add new port #38704

Merged
merged 15 commits into from
Jun 8, 2024
48 changes: 48 additions & 0 deletions ports/sese/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
function(remove_empty_directories_recursive dir)
file(GLOB before_subdirs "${dir}/*")
foreach (subdir ${before_subdirs})
if (IS_DIRECTORY ${subdir})
remove_empty_directories_recursive(${subdir})
endif ()
endforeach ()
file(GLOB after_subdirs "${dir}/*")
if ("${after_subdirs}" STREQUAL "")
file(REMOVE_RECURSE "${dir}")
endif ()
endfunction()

set(SOURCE_PATH ${CURRENT_BUILDTRESS_DIR}/sese)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libsese/sese
REF 2.1.1
jimwang118 marked this conversation as resolved.
Show resolved Hide resolved
SHA512 1fc1495e8518f3becfd32459e1cc8d3442fb8c97c80b36558b9cfff05b2def0277be71156ac39a961b5800454015264301464fa1b9449db5c5144db2ecc5cbfe
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tests SESE_BUILD_TEST
mysql SESE_DB_USE_MARIADB
sqlite3 SESE_DB_USE_SQLITE
psql SESE_DB_USE_POSTGRES
async-logger SESE_USE_ASYNC_LOGGER
archive SESE_USE_ARCHIVE
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
)

vcpkg_cmake_install()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sese-core)
jimwang118 marked this conversation as resolved.
Show resolved Hide resolved

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

remove_empty_directories_recursive("${CURRENT_PACKAGES_DIR}/include/sese")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE" "${SOURCE_PATH}/NOTICE")

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
jimwang118 marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 21 additions & 0 deletions ports/sese/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

##################################################################################
#
# ___ ___ ___ ___
# /\ \ /\ \ /\ \ /\ \
# /::\ \ /::\ \ /::\ \ /::\ \
# /:/\:\__\ /:/\:\__\ /::\:\__\ /::\:\__\
# \:\ \/__/ \:\/:/ / \;:::/ / \:\:\/ /
# \:\__\ \::/ / |:\/__/ \:\/ /
# \/__/ \/__/ \|__| \/__/
#
# Thank you for choosing the core library to use,
# just add the following build script:
# find_package(sese CONFIG REQUIRED)
# target_link_libraries(main PRIVATE Sese::Core)
#
# For assistance, please contact the address below:
# [email protected]
# https://t.me/shiinasama
#
##################################################################################
jimwang118 marked this conversation as resolved.
Show resolved Hide resolved
86 changes: 86 additions & 0 deletions ports/sese/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"name": "sese",
"version-string": "2.1.1",
jimwang118 marked this conversation as resolved.
Show resolved Hide resolved
"description": "a cross-platform framework",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"description": "a cross-platform framework",
"description": "A cross-platform framework",

Not very descriptive, and the homepage doesn't help at all due to language barriers.

"homepage": "https://libsese.github.io/sese/",
"license": "Apache-2.0",
"supports": "x64 & (windows | osx | linux) & !uwp & !static",
Copy link
Contributor

Choose a reason for hiding this comment

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

This line makes the port untested in all static triplets, including ALL of linux and osx.
What prevents building a static lib in linux?
A cross-platform framework which can be tested only on one platform doesn't look attractive.

"dependencies": [
{
"name": "asio",
"features": [
"openssl"
],
"version>=": "1.29.0"
Copy link
Member

Choose a reason for hiding this comment

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

Please remove all version>= constraints from the manifest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Related fields have been removed

},
{
"name": "openssl",
"version>=": "3.2.0#1"
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "zlib",
"version>=": "1.3"
}
],
"default-features": [
"sqlite3"
],
"features": {
"archive": {
"description": "add archive support",
"dependencies": [
{
"name": "libarchive",
"version>=": "3.7.2"
}
]
},
"async-logger": {
"description": "use the async logger"
},
"mysql": {
"description": "add mysql and mariadb support",
"dependencies": [
{
"name": "libmariadb",
"version>=": "3.3.1#3"
}
]
},
"psql": {
"description": "add postgresql support",
"dependencies": [
{
"name": "libpq",
"version>=": "16.0#1"
}
]
},
"sqlite3": {
"description": "add sqlite3 support",
"dependencies": [
{
"name": "sqlite3",
"version>=": "3.43.2"
}
]
},
"tests": {
"description": "build the unit test",
"dependencies": [
{
"name": "gtest",
"version>=": "1.14.0"
}
]
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8040,6 +8040,10 @@
"baseline": "0.1.4.1",
"port-version": 0
},
"sese": {
"baseline": "2.1.1",
"port-version": 0
},
"sf2cute": {
"baseline": "0.2.0",
"port-version": 4
Expand Down
9 changes: 9 additions & 0 deletions versions/s-/sese.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "851c0eed97e23fc477d1fdc26310ef69f2d7f54c",
"version-string": "2.1.1",
"port-version": 0
}
]
}