diff options
Diffstat (limited to 'vcpkg/ports/libcamera')
| -rw-r--r-- | vcpkg/ports/libcamera/fix-absolute-paths.patch | 32 | ||||
| -rw-r--r-- | vcpkg/ports/libcamera/portfile.cmake | 49 | ||||
| -rw-r--r-- | vcpkg/ports/libcamera/vcpkg.json | 41 |
3 files changed, 122 insertions, 0 deletions
diff --git a/vcpkg/ports/libcamera/fix-absolute-paths.patch b/vcpkg/ports/libcamera/fix-absolute-paths.patch new file mode 100644 index 0000000..42a2431 --- /dev/null +++ b/vcpkg/ports/libcamera/fix-absolute-paths.patch @@ -0,0 +1,32 @@ +diff --git a/src/v4l2/libcamerify.in b/src/v4l2/libcamerify.in +index c4ea273f..d4e39c1b 100755 +--- a/src/v4l2/libcamerify.in ++++ b/src/v4l2/libcamerify.in +@@ -32,14 +32,25 @@ while [ $# -gt 0 ]; do + shift + done + ++SCRIPT=$(realpath "$0") ++SCRIPTPATH=$(dirname "$SCRIPT") ++ + [ $debug -gt 0 ] && loglevel=V4L2Compat:0 + [ $debug -gt 1 ] && loglevel=0 + [ "$loglevel" != "" ] && export LIBCAMERA_LOG_LEVELS=$loglevel + + if [ "$LD_PRELOAD" = "" ] ; then +- LD_PRELOAD='@LIBCAMERA_V4L2_SO@' ++ if [ $debug = 0 ] ; then ++ LD_PRELOAD="$SCRIPTPATH/../v412-compat.so" ++ else ++ LD_PRELOAD="$SCRIPTPATH/../../v412-compat.so" ++ fi + else +- LD_PRELOAD="$LD_PRELOAD "'@LIBCAMERA_V4L2_SO@' ++ if [ $debug = 0 ] ; then ++ LD_PRELOAD="$LD_PRELOAD " "$SCRIPTPATH/../v412-compat.so" ++ else ++ LD_PRELOAD="$LD_PRELOAD " "$SCRIPTPATH/../../v412-compat.so" ++ fi + fi + + export LD_PRELOAD diff --git a/vcpkg/ports/libcamera/portfile.cmake b/vcpkg/ports/libcamera/portfile.cmake new file mode 100644 index 0000000..64368f2 --- /dev/null +++ b/vcpkg/ports/libcamera/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_from_git(
+ OUT_SOURCE_PATH SOURCE_PATH
+ URL https://git.libcamera.org/libcamera/libcamera.git
+ REF 058f589ae36170935e537910f2c303b1c3ea03b3
+ FETCH_REF "v${VERSION}"
+ HEAD_REF master
+ PATCHES
+ fix-absolute-paths.patch
+)
+
+vcpkg_find_acquire_program(PYTHON3)
+x_vcpkg_get_python_packages(
+ PYTHON_VERSION 3
+ PYTHON_EXECUTABLE "${PYTHON3}"
+ PACKAGES "jinja2" "PyYaml" "ply"
+)
+
+# Scripts are invoking 'openssl' by name
+vcpkg_host_path_list(APPEND ENV{PATH} "${CURRENT_HOST_INSTALLED_DIR}/tools/openssl")
+
+vcpkg_list(SET options)
+if("tracing" IN_LIST FEATURES)
+ list(APPEND options "-Dtracing=enabled")
+else()
+ list(APPEND options "-Dtracing=disabled")
+endif()
+
+vcpkg_configure_meson(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${options}
+ -Dcam=disabled # This is a test application
+ -Ddocumentation=disabled
+ -Dgstreamer=enabled
+ -Dlc-compliance=disabled # Test appplication
+ -Dpycamera=disabled # experimental feature, going to leave for later
+ -Dqcam=disabled # Test application
+ -Dtest=false # Unit tests
+ -Dv4l2=enabled
+ -Dudev=enabled
+)
+
+vcpkg_install_meson()
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.rst")
+
diff --git a/vcpkg/ports/libcamera/vcpkg.json b/vcpkg/ports/libcamera/vcpkg.json new file mode 100644 index 0000000..44d1b13 --- /dev/null +++ b/vcpkg/ports/libcamera/vcpkg.json @@ -0,0 +1,41 @@ +{ + "name": "libcamera", + "version": "0.5.0", + "port-version": 1, + "description": "A complex camera support library for Linux, Android, and ChromeOS", + "homepage": "https://git.libcamera.org/libcamera/libcamera.git/", + "license": "LGPL-2.1-or-later", + "supports": "linux", + "dependencies": [ + "elfutils", + "glib", + "gstreamer", + "libgnutls", + "libunwind", + "libyaml", + "libyuv", + { + "name": "openssl", + "host": true, + "features": [ + "tools" + ] + }, + { + "name": "vcpkg-get-python-packages", + "host": true + }, + { + "name": "vcpkg-tool-meson", + "host": true + } + ], + "features": { + "tracing": { + "description": "Enable tracing", + "dependencies": [ + "liblttng-ust" + ] + } + } +} |