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

[eventbus] Add new port #41563

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
27 changes: 27 additions & 0 deletions ports/eventbus/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

# before this revision the build would fail on windows
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gelldur/EventBus
REF 4689564c4c775456bfa0dfd976b4f48aca5f4d2a
SHA512 0f1f3c21d1c5a18da87e331f252cb464143ba2038a26e6edb6b11c9544c02dd1919fe728e803b382e8f6b89550582d7905170437c184f784cfa3f28c784a7e59
Comment on lines +5 to +10
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
# before this revision the build would fail on windows
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gelldur/EventBus
REF 4689564c4c775456bfa0dfd976b4f48aca5f4d2a
SHA512 0f1f3c21d1c5a18da87e331f252cb464143ba2038a26e6edb6b11c9544c02dd1919fe728e803b382e8f6b89550582d7905170437c184f784cfa3f28c784a7e59
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gelldur/EventBus
REF v${VERSION}
SHA512 0 # please insert SHA512

Copy link
Author

Choose a reason for hiding this comment

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

@dg0yt the latest version would fail on windows there were some fixes added to address that in the commit referenced REF, and according to the maintainers guide, if a patch is in the upstream I should favor using it than patching the code myself, What should I do in this case?

To summarize, using v${VERSION} will fail

Copy link
Contributor

Choose a reason for hiding this comment

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

4689564c4c775456bfa0dfd976b4f48aca5f4d2a is older than, and included, in 3.1.2:
gelldur/EventBus@4689564

So this is just totally wrong. If the build fails with 3.1.2, check the actual error.

HEAD_REF master
)


vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DENABLE_TEST=OFF
-DCMAKE_CXX_STANDARD=17
motazmuhammad marked this conversation as resolved.
Show resolved Hide resolved
)

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

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/EventBus)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
17 changes: 17 additions & 0 deletions ports/eventbus/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "eventbus",
"version": "3.1.2",
"description": "Simple and very fast event bus.",
JonLiu1993 marked this conversation as resolved.
Show resolved Hide resolved
"homepage": "https://github.com/gelldur/EventBus",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2592,6 +2592,10 @@
"baseline": "2023.2.15",
"port-version": 0
},
"eventbus": {
"baseline": "3.1.2",
"port-version": 0
},
"eventpp": {
"baseline": "0.1.3",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/e-/eventbus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "99744eb5c1976adc3690dee995b516244b2a5eab",
"version": "3.1.2",
"port-version": 0
}
]
}