Skip to content

Commit 1e842a3

Browse files
committed
Add quickjs-ng port overlay
1 parent e94e88c commit 1e842a3

File tree

5 files changed

+54
-1
lines changed

5 files changed

+54
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: CI
22
on: [push, pull_request]
33
env:
44
VCPKG_COMMIT_HASH: dd3097e305afa53f7b4312371f62058d2e665320
5+
VCPKG_OVERLAY_PORTS: .
56
jobs:
67
get_version:
78
name: Get version

quickjs-ng/portfile.cmake

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
if(VCPKG_TARGET_IS_WINDOWS)
2+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
3+
endif()
4+
5+
vcpkg_from_github(
6+
OUT_SOURCE_PATH SOURCE_PATH
7+
REPO quickjs-ng/quickjs
8+
REF v${VERSION}
9+
SHA512 e099502b50b2483b29fcad16c21e03164cba86181a90b2957774117138a0c7af32a0649f1468d18c20b33725fb30418314b49be54d3a7ad2b838e5578018c61d
10+
HEAD_REF master
11+
)
12+
13+
vcpkg_cmake_configure(
14+
SOURCE_PATH "${SOURCE_PATH}"
15+
)
16+
17+
vcpkg_cmake_install()
18+
19+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/quickjs PACKAGE_NAME qjs)
20+
21+
vcpkg_copy_tools(
22+
TOOL_NAMES qjs qjsc
23+
AUTO_CLEAN
24+
)
25+
26+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
27+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
28+
29+
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
30+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

quickjs-ng/usage

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
quickjs-ng provides CMake targets:
2+
3+
find_package(qjs CONFIG REQUIRED)
4+
target_link_libraries(main PRIVATE qjs)

quickjs-ng/vcpkg.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "quickjs-ng",
3+
"version": "0.10.1",
4+
"description": "QuickJS, the Next Generation: a mighty JavaScript engine. A small and embeddable JavaScript engine supporting the latest ECMAScript specification.",
5+
"homepage": "https://github.com/quickjs-ng/quickjs",
6+
"license": "MIT",
7+
"dependencies": [
8+
{
9+
"name": "vcpkg-cmake",
10+
"host": true
11+
},
12+
{
13+
"name": "vcpkg-cmake-config",
14+
"host": true
15+
}
16+
]
17+
}

vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"sdl2",
3939
"speexdsp",
4040
"zlib",
41-
"zstd"
41+
"zstd",
42+
"quickjs-ng"
4243
],
4344
"overrides": [
4445
{

0 commit comments

Comments
 (0)