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

[lv2] Add new port #13462

Merged
merged 1 commit into from
Sep 24, 2020
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
35 changes: 35 additions & 0 deletions ports/lv2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.17)
project(lv2 NONE)

add_library(lv2 INTERFACE)

install(
TARGETS lv2
EXPORT lv2-config
INCLUDES DESTINATION include
)

install(
DIRECTORY lv2
DESTINATION include
FILES_MATCHING PATTERN "*.h"
)
install(FILES lv2/core/lv2.h DESTINATION include)

# Install headers to old URI-style paths, using mapping from wscript
file(READ wscript WSCRIPT)
string(REGEX MATCHALL "'[^']+' *: 'lv2/[^']+'" SPEC_MAP "${WSCRIPT}")
foreach(PAIR ${SPEC_MAP})
string(REGEX MATCH "'([^']+)' *: '([^']+)'" _ "${PAIR}")
install(
DIRECTORY "lv2/${CMAKE_MATCH_1}/"
DESTINATION "include/${CMAKE_MATCH_2}"
FILES_MATCHING PATTERN "*.h"
)
endforeach()

install(
EXPORT lv2-config
NAMESPACE lv2::
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/lv2"
)
25 changes: 25 additions & 0 deletions ports/lv2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO lv2/lv2
REF v1.18.0
SHA512 f84c5f2b31f42ed5cab10976d1975743c62f06025a5b67bc99778ba5d0f354c06cb9fad8f5899a52b8c1131f4c9085f5867c83da4d8269c234fd2a22a2c6a689
HEAD_REF master
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

vcpkg_configure_cmake(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(
INSTALL "${SOURCE_PATH}/COPYING"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright
)
7 changes: 7 additions & 0 deletions ports/lv2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "lv2",
"version-string": "1.18.0",
"description": "LV2 is a plugin standard for audio systems. It defines a minimal yet extensible C API for plugin code and a format for plugin \"bundles\".",
"homepage": "https://lv2plug.in",
"license": "ISC"
}