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

Add qt6-multimedia package #25992

Merged
merged 33 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
279b8b2
Add qt6-multimedia package
mmcauliffe Apr 10, 2024
06ce38c
Fix linter error
mmcauliffe Apr 10, 2024
b996111
Add vulkan dependencies to host
mmcauliffe Apr 10, 2024
b9f26b2
Explicitly set ffmpeg backend
mmcauliffe Apr 10, 2024
cd95ecf
Fix CXXFLAGS
mmcauliffe Apr 10, 2024
b937fa6
Add image dependencies
mmcauliffe Apr 10, 2024
92c0d10
Add more linux dependencies
mmcauliffe Apr 10, 2024
71736e4
More linux packages
mmcauliffe Apr 10, 2024
e7d79f0
Clean up dependencies
mmcauliffe Apr 10, 2024
3ad2295
Update build scripts
mmcauliffe Apr 10, 2024
1ae616c
Update dependencies based on review
mmcauliffe Apr 10, 2024
f6ff4cc
Update from reviews
mmcauliffe Apr 10, 2024
7dcc3c5
Explicitly disable native backends
mmcauliffe Apr 10, 2024
2c3f2c3
Update build scripts to more reflect qt-main
mmcauliffe Apr 10, 2024
cac8b6f
Switch to MACOSX_DEPLOYMENT_TARGET
mmcauliffe Apr 11, 2024
132980f
Working OSX build with simplified dependencies
mmcauliffe Apr 11, 2024
36c8dbd
Adding back in OpenGL dependencies
mmcauliffe Apr 11, 2024
ce51aa5
Add win dlls to missing_dso_whitelist
mmcauliffe Apr 11, 2024
a05dbd2
Remove alsa flag and update test requirements
mmcauliffe Apr 11, 2024
d257627
Remove test requirements
mmcauliffe Apr 11, 2024
d68a0a7
Actually add system win dlls to missing_dso_whitelist
mmcauliffe Apr 11, 2024
7a2f007
Update for Qt 6.7.1
mmcauliffe May 21, 2024
373a80a
Update SHA
mmcauliffe May 21, 2024
d43904b
Add gstreamer backend availability and more tests
mmcauliffe May 22, 2024
de21406
Addressing review comments
mmcauliffe May 23, 2024
0ff1d5d
Fix meta.yaml lint
mmcauliffe May 23, 2024
bfc49db
Update for ffmpeg pinning
mmcauliffe May 23, 2024
1e12377
Update build scripts
mmcauliffe May 23, 2024
b0055bf
Addressing comments
mmcauliffe May 24, 2024
345b9eb
remove gstreamer support after qt 6.7.1
hmaarrfk May 24, 2024
fdeb8c5
Add conda-forge.yml
mmcauliffe May 24, 2024
ce37d31
be optimistic with cross compilation
hmaarrfk May 24, 2024
8a3dded
add qt-main as maintainers too
hmaarrfk May 28, 2024
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
20 changes: 20 additions & 0 deletions recipes/qt-multimedia/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@echo on

mkdir build
cd build

mmcauliffe marked this conversation as resolved.
Show resolved Hide resolved
cmake -LAH -G "Ninja" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS ^
-DQT_DEFAULT_MEDIA_BACKEND=ffmpeg ^
..
if %ERRORLEVEL% neq 0 exit 1

cmake --build . --target install --config Release
if %ERRORLEVEL% neq 0 exit 1

:: unversioned exes must avoid clobbering the qt5 packages, but versioned dlls still need to be in PATH
xcopy /y /s %LIBRARY_PREFIX%\lib\qt6\bin\*.dll %LIBRARY_PREFIX%\bin
if %ERRORLEVEL% neq 0 exit 1
27 changes: 27 additions & 0 deletions recipes/qt-multimedia/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
mmcauliffe marked this conversation as resolved.
Show resolved Hide resolved
set -ex

CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"

if test "$CONDA_BUILD_CROSS_COMPILATION" = "1"
then
CMAKE_ARGS="${CMAKE_ARGS} -DQT_HOST_PATH=${BUILD_PREFIX}"
fi

if [[ $(uname) == "Linux" ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DFEATURE_vulkan=ON"
fi

mkdir build
cd build

cmake -LAH -G "Ninja" ${CMAKE_ARGS} \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_FIND_FRAMEWORK=LAST \
Copy link
Contributor

@hmaarrfk hmaarrfk Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_FIND_FRAMEWORK=NEVER \
-DCMAKE_FIND_APPBUNDLE=NEVER \

try maybe this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for OSX that is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be taht their CMAKE file overrides this somehow...

-DCMAKE_INSTALL_RPATH:STRING=${PREFIX}/lib \
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS \
-DFEATURE_linux_v4l=OFF \
-DQT_DEFAULT_MEDIA_BACKEND=ffmpeg \
..

cmake --build . --target install
11 changes: 11 additions & 0 deletions recipes/qt-multimedia/conda-forge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
os_version:
linux_64: cos7
provider:
linux_aarch64: default
build_platform:
linux_aarch64: linux_64
osx_arm64: osx_64
conda_build:
pkg_format: '2'
conda_forge_output_validation: true
test: native_and_emulated
10 changes: 10 additions & 0 deletions recipes/qt-multimedia/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://doc.qt.io/qt-6/macos.html
c_stdlib_version: # [osx]
- '11.0' # [osx]
MACOSX_SDK_VERSION: # [osx]
- '12.3' # [osx]
mmcauliffe marked this conversation as resolved.
Show resolved Hide resolved

gstreamer: # [unix]
- '1.24' # [unix]
gst_plugins_base: # [unix]
- '1.24' # [unix]
123 changes: 123 additions & 0 deletions recipes/qt-multimedia/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{% set version = "6.7.1" %}

package:
name: qt6-multimedia
version: {{ version }}

source:
url: https://download.qt.io/official_releases/qt/{{ version.rpartition('.')[0] }}/{{ version }}/submodules/qtmultimedia-everywhere-src-{{ version }}.tar.xz
sha256: 656d1543727f5bf1bd39fe2548ac454860109dc8555df77d7940f21e3d65cd3e

build:
number: 0
detect_binary_files_with_prefix: true
run_exports:
- {{ pin_subpackage('qt6-multimedia', max_pin='x.x') }}
missing_dso_whitelist: # [win]
- '$RPATH/api-ms-win-core-libraryloader-l1-2-0.dll' # [win]
- '$RPATH/api-ms-win-ntuser-sysparams-l1-1-0.dll' # [win]
- '$RPATH/api-ms-win-core-heap-l2-1-0.dll' # [win]
- '$RPATH/api-ms-win-core-libraryloader-l1-2-1.dll' # [win]

requirements:
build:
- make # [unix]
- cmake
- ninja
- perl
- ruby >=2.5 # [linux]
- bison # [linux]
- flex # [linux]
- gperf # [linux]
- {{ compiler('cxx') }}
- {{ compiler('c') }}
- {{ stdlib("c") }}
- qt6-main {{ version }} # [build_platform != target_platform]
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libdrm-devel') }} # [linux]
- {{ cdt('libglvnd-glx') }} # [linux]
- {{ cdt('libglvnd-egl') }} # [linux]
- {{ cdt('libglvnd-devel') }} # [linux]

# native libs
- ffmpeg # [build_platform != target_platform]
- ffmpeg *=lgpl* # [build_platform != target_platform]
h-vetinari marked this conversation as resolved.
Show resolved Hide resolved
{% if version == "6.7.1" %}
# We will remove gstreamer support in favor of ffmpeg after 6.7.1
- gstreamer # [build_platform != target_platform and linux]
- gst-plugins-base {{ gstreamer }} # [build_platform != target_platform and linux]
{% endif %}
- pulseaudio-client # [build_platform != target_platform and linux]

- xorg-libx11 # [build_platform != target_platform and linux]
- xorg-libxext # [build_platform != target_platform and linux]
- xorg-libxdamage # [build_platform != target_platform and linux]
- xorg-libxrandr # [build_platform != target_platform and linux]
- xorg-libxcomposite # [build_platform != target_platform and linux]
- xorg-libxxf86vm # [build_platform != target_platform and linux]
- xorg-libxtst # [build_platform != target_platform and linux]
- xorg-xf86vidmodeproto # [build_platform != target_platform and linux]
host:
- alsa-lib # [linux]
- ffmpeg
- ffmpeg *=lgpl*
{% if version == "6.7.1" %}
# We will remove gstreamer support in favor of ffmpeg after 6.7.1
# gstreamer plugin not supported on win32: https://bugreports.qt.io/browse/QTBUG-107073
- gstreamer # [unix]
- gst-plugins-base {{ gstreamer }} # [unix]
{% endif %}
- libvulkan-headers # [not osx]
- libvulkan-loader # [not osx]
- pthread-stubs # [linux]
- pulseaudio-client # [linux]
- qt6-main {{ version }}
- xorg-libx11 # [linux]
- xorg-libxext # [linux]
- xorg-libxdamage # [linux]
- xorg-libxrandr # [linux]
- xorg-libxcomposite # [linux]
# https://github.com/conda-forge/staged-recipes/pull/22084
hmaarrfk marked this conversation as resolved.
Show resolved Hide resolved
- xorg-libxxf86vm # [linux]
- xorg-libxtst # [linux]
- xorg-xf86vidmodeproto # [linux]
run:
- xorg-libx11 # [linux]
hmaarrfk marked this conversation as resolved.
Show resolved Hide resolved
- xorg-libxrandr # [linux]

test:
commands:
{% set qt_libs = ["Multimedia", "SpatialAudio"] %}
{% for each_qt_lib in qt_libs %}
- test -d $PREFIX/include/qt6/Qt{{ each_qt_lib }} # [unix]
- test -f $PREFIX/lib/libQt6{{ each_qt_lib }}${SHLIB_EXT} # [unix]
- if not exist %PREFIX%\\Library\\include\\qt6\\Qt{{ each_qt_lib }} exit 1 # [win]
- if not exist %PREFIX%\\Library\\lib\\Qt6{{ each_qt_lib }}.lib exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\Qt6{{ each_qt_lib }}.dll exit 1 # [win]
{% endfor %}
{% if version == "6.7.1" %}
- test -f $PREFIX/lib/qt6/plugins/multimedia/libgstreamermediaplugin${SHLIB_EXT} # [unix]
{% else %}
- test ! -f $PREFIX/lib/qt6/plugins/multimedia/libgstreamermediaplugin${SHLIB_EXT} # [unix]
{% endif %}
- test -f $PREFIX/lib/qt6/plugins/multimedia/libffmpegmediaplugin${SHLIB_EXT} # [unix]
- if not exist %PREFIX%\\Library\\lib\\qt6\\plugins\\multimedia\\ffmpegmediaplugin.dll exit 1 # [win]

about:
home: http://qt-project.org
license: GPL-3.0-only
license_file: LICENSES/GPL-3.0-only.txt
summary: Qt is a cross-platform application and UI framework.
description: |
Qt helps you create connected devices, UIs & applications that run
anywhere on any device, on any operating system at any time.
doc_url: http://doc.qt.io/
dev_url: https://github.com/qt/qtmultimedia

extra:
recipe-maintainers:
- mmcauliffe
hmaarrfk marked this conversation as resolved.
Show resolved Hide resolved
- conda-forge/qt-main
feedstock-name: qt-multimedia
6 changes: 6 additions & 0 deletions recipes/qt-multimedia/yum_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mesa-libGL
mesa-libGL-devel
mesa-libEGL-devel
mesa-dri-drivers
libX11-devel
libglvnd-glx