mirror of https://github.com/microsoft/vcpkg.git
[dtc] Add new port (#51538)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
54df74e48e
commit
db0aad6b4f
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/libfdt/meson.build b/libfdt/meson.build
|
||||
index bf8343f..c2f4bd6 100644
|
||||
--- a/libfdt/meson.build
|
||||
+++ b/libfdt/meson.build
|
||||
@@ -26,7 +26,7 @@ else
|
||||
endif
|
||||
|
||||
link_args += version_script
|
||||
-libfdt = both_libraries(
|
||||
+libfdt = library(
|
||||
'fdt', sources,
|
||||
version: meson.project_version(),
|
||||
link_args: link_args,
|
||||
@@ -34,17 +34,11 @@ libfdt = both_libraries(
|
||||
install: true,
|
||||
)
|
||||
|
||||
-if static_build
|
||||
- link_with = libfdt.get_static_lib()
|
||||
-else
|
||||
- link_with = libfdt.get_shared_lib()
|
||||
-endif
|
||||
-
|
||||
libfdt_inc = include_directories('.')
|
||||
|
||||
libfdt_dep = declare_dependency(
|
||||
include_directories: libfdt_inc,
|
||||
- link_with: link_with,
|
||||
+ link_with: libfdt,
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # library does not explicitely export its symbols.
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO dgibson/dtc
|
||||
REF "v${VERSION}"
|
||||
SHA512 5cf48c8bd426919bb8aad6a8866e063305eca830547f8ceb5fe7746bc85a8d6a0a1e13fd29432cb389d3d51337368f217077aabf9436b526e77d425b33167694
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
0001-enable-static-or-shared.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(STATIC_BUILD true)
|
||||
else()
|
||||
set(STATIC_BUILD false)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_meson(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-Dtools=false
|
||||
-Dyaml=disabled
|
||||
-Dvalgrind=disabled
|
||||
-Dpython=disabled
|
||||
-Dtests=false
|
||||
"-Dstatic-build=${STATIC_BUILD}"
|
||||
)
|
||||
|
||||
vcpkg_install_meson()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST
|
||||
"${SOURCE_PATH}/README.license"
|
||||
"${SOURCE_PATH}/BSD-2-Clause"
|
||||
"${SOURCE_PATH}/GPL"
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "dtc",
|
||||
"version": "1.7.2",
|
||||
"description": "Device Tree Compiler (dtc) toolchain for working with device tree source and binary files and also libfdt, a utility library for reading and manipulating the binary format.",
|
||||
"homepage": "https://github.com/dgibson/dtc",
|
||||
"license": "GPL-2.0-or-later OR BSD-2-Clause",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -2620,6 +2620,10 @@
|
|||
"baseline": "1.3.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"dtc": {
|
||||
"baseline": "1.7.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"dtl": {
|
||||
"baseline": "1.21",
|
||||
"port-version": 0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "09cf1dc350d443ca61f4374a51069fc2b2b67522",
|
||||
"version": "1.7.2",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue