Skip to content

Commit

Permalink
[swig] New port
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 14, 2024
1 parent 1b75796 commit 061602f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: 🌋 Build
run: |
.\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build py-pyqt6 py-pyyaml
.\vcpkg\vcpkg.exe install --overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=C:/vcpkg-build py-pyqt6 py-pyyaml swig
- name: 📑 Upload logs
uses: actions/upload-artifact@v4
Expand Down
30 changes: 30 additions & 0 deletions ports/swig/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
set(VCPKG_BUILD_TYPE release)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO swig/swig
REF "v${VERSION}"
SHA512 5d653333f73356d4d5ba8b615882e49f33f188bc68d8204352116bc4aca7946ec01ce2e02524c5ce805b98c2219ed05e664120485bf18095c5c0785436487074
HEAD_REF master
)

vcpkg_find_acquire_program(BISON)

list(APPEND OPTIONS "-D BISON_EXECUTABLE=${BISON}")

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

vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

vcpkg_copy_tools(TOOL_NAMES swig)
file(COPY "${CURRENT_PACKAGES_DIR}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/swig")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
18 changes: 18 additions & 0 deletions ports/swig/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "swig",
"version": "4.2.1",
"description": "SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.",
"homepage": "http://www.swig.org/",
"dependencies":
[
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

0 comments on commit 061602f

Please sign in to comment.