diff options
| author | Rich Logan <rich@richlogan.co.uk> | 2021-01-25 09:57:23 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-25 01:57:23 -0800 |
| commit | fc0d6b28006e0607a6b9871641ec48925274e079 (patch) | |
| tree | f8f897b8880123b16f6c0b53236d1ed56900020a | |
| parent | bb4de6fe3f215a722df05193b774c32ddceb3097 (diff) | |
| download | vcpkg-fc0d6b28006e0607a6b9871641ec48925274e079.tar.gz vcpkg-fc0d6b28006e0607a6b9871641ec48925274e079.zip | |
[dav1d] Add dav1d AV1 decoder port (#15009)
* [dav1d] Add dav1d AV1 decoder port
* Remove unnecessary port-version
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* Bump dav1d to 0.8.1
* Skip dav1d x86 due to infinite link
* Add dav1d port version
* Apply dav1d code review
* Reset dav1d version
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
| -rw-r--r-- | ports/dav1d/patch_underscore_prefix.patch | 13 | ||||
| -rw-r--r-- | ports/dav1d/portfile.cmake | 33 | ||||
| -rw-r--r-- | ports/dav1d/vcpkg.json | 10 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/d-/dav1d.json | 9 |
5 files changed, 69 insertions, 0 deletions
diff --git a/ports/dav1d/patch_underscore_prefix.patch b/ports/dav1d/patch_underscore_prefix.patch new file mode 100644 index 000000000..30506faf5 --- /dev/null +++ b/ports/dav1d/patch_underscore_prefix.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index 07b2586..02acd91 100644 +--- a/meson.build ++++ b/meson.build +@@ -370,7 +370,7 @@ endif + + cdata.set10('ARCH_PPC64LE', host_machine.cpu() == 'ppc64le') + +-if cc.symbols_have_underscore_prefix() ++if cc.symbols_have_underscore_prefix() or (host_machine.cpu_family() == 'x86' and host_machine.system() == 'windows') + cdata.set10('PREFIX', true) + cdata_asm.set10('PREFIX', true) + endif diff --git a/ports/dav1d/portfile.cmake b/ports/dav1d/portfile.cmake new file mode 100644 index 000000000..649d7e6c7 --- /dev/null +++ b/ports/dav1d/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "x86" ON_TARGET "uwp")
+
+vcpkg_from_gitlab(
+ GITLAB_URL https://code.videolan.org
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO videolan/dav1d
+ REF 0.8.1
+ SHA512 dd40b82b65e4be37a27ab11e7116f7a244b0da4469915ead3922ac31724fb6da3910a78629a32a669031fe08d4323ab135174afb7462f6ea4adf96c111841c1c
+ PATCHES
+ "patch_underscore_prefix.patch"
+)
+
+vcpkg_find_acquire_program(NASM)
+get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
+vcpkg_add_to_path(${NASM_EXE_PATH})
+
+set(LIBRARY_TYPE ${VCPKG_LIBRARY_LINKAGE})
+if (LIBRARY_TYPE STREQUAL "dynamic")
+ set(LIBRARY_TYPE "shared")
+endif(LIBRARY_TYPE STREQUAL "dynamic")
+
+vcpkg_configure_meson(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ --default-library=${LIBRARY_TYPE}
+ -Denable_tests=false
+ -Denable_tools=false
+)
+
+vcpkg_install_meson()
+vcpkg_copy_pdbs()
+
+configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
diff --git a/ports/dav1d/vcpkg.json b/ports/dav1d/vcpkg.json new file mode 100644 index 000000000..02d8d473a --- /dev/null +++ b/ports/dav1d/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "dav1d", + "version-string": "0.8.1", + "description": "dav1d is a new open-source AV1 decoder developed by the VideoLAN and FFmpeg communities and sponsored by the Alliance for Open Media.", + "homepage": "https://code.videolan.org/videolan/dav1d", + "supports": "!(uwp | arm | x86)", + "dependencies": [ + "tool-meson" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index bc4973d54..f898dce80 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1532,6 +1532,10 @@ "baseline": "3.0.0", "port-version": 1 }, + "dav1d": { + "baseline": "0.8.1", + "port-version": 0 + }, "dbg-macro": { "baseline": "2019-07-11", "port-version": 0 diff --git a/versions/d-/dav1d.json b/versions/d-/dav1d.json new file mode 100644 index 000000000..de707ec64 --- /dev/null +++ b/versions/d-/dav1d.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "1c30fb68cde7004f37eb289c95fb9823331fe571", + "version-string": "0.8.1", + "port-version": 0 + } + ] +} |
