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 adwaita-qt and other qt-gnome integration plugins #22072

Merged
merged 2 commits into from
Mar 13, 2023
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
12 changes: 12 additions & 0 deletions recipes/adwaita-qt/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set -ex

mkdir -p build
cd build

cmake ${CMAKE_ARGS} \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_PREFIX_PATH=${PREFIX} \
..

make -j${CPU_COUNT}
make install
8 changes: 8 additions & 0 deletions recipes/adwaita-qt/conda-forge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
os_version:
linux_64: cos7
provider:
linux_aarch64: azure
linux_ppc64le: azure
build_platform:
linux_aarch64: linux_aarch64
linux_ppc64le: linux_ppc64le
18 changes: 18 additions & 0 deletions recipes/adwaita-qt/do_not_add_qt_include_directories.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index 172282c..2e2f1cd 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -113,12 +113,6 @@ if(MINGW AND BUILD_SHARED_LIBS)
set_target_properties("adwaitaqt${ADWAITAQT_SUFFIX}" PROPERTIES SUFFIX "-${ADWAITA_QT_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()

-if (USE_QT6)
- target_include_directories("adwaitaqt${ADWAITAQT_SUFFIX}" PUBLIC ${Qt6Core_INCLUDE_DIRS} ${Qt6Gui_INCLUDE_DIRS} ${Qt6Widgets_INCLUDE_DIRS})
-else()
- target_include_directories("adwaitaqt${ADWAITAQT_SUFFIX}" PUBLIC ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
-endif()
-
install(TARGETS "adwaitaqt${ADWAITAQT_SUFFIX}priv" EXPORT "AdwaitaQt${ADWAITAQT_SUFFIX}Targets" RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS "adwaitaqt${ADWAITAQT_SUFFIX}" EXPORT "AdwaitaQt${ADWAITAQT_SUFFIX}Targets" RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})


58 changes: 58 additions & 0 deletions recipes/adwaita-qt/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{% set version = "1.4.2" %}

package:
name: adwaita-qt
version: {{ version }}

source:
url: https://github.com/FedoraQt/adwaita-qt/archive/{{ version }}.tar.gz
sha256: cd5fd71c46271d70c08ad44562e57c34e787d6a8650071db115910999a335ba8
patches:
# I think this patch is required because
# https://github.com/conda-forge/qt-main-feedstock/issues/121
- do_not_add_qt_include_directories.patch

build:
skip: true # [not linux]
number: 0
run_exports:
# Just a guess...
- {{ pin_subpackage('adwaita-qt', max_pin='x.x') }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- make
- qt-main # [build_platform != target_platform]
- sysroot_linux-64 2.17 # [linux]
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libdrm-devel') }} # [linux]
- {{ cdt('libglvnd-glx') }} # [linux]
- {{ cdt('libglvnd-egl') }} # [linux]
host:
- qt-main
- libxcb

test:
commands:
- test -f ${PREFIX}/plugins/styles/adwaita.so
- test -f ${PREFIX}/lib/libadwaitaqt.so

about:
home: https://github.com/FedoraQt/adwaita-qt
summary: 'A native style to bend Qt5/Qt6 applications to look like they belong into GNOME Shell.'
license: LGPL-2.1-only
license_family: LGPL
license_file:
- COPYING
- LICENSE.LGPL2
- LICENSE.GPL2

extra:
recipe-maintainers:
- hmaarrfk
8 changes: 8 additions & 0 deletions recipes/gsettings-desktop-schemas/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set -ex
meson setup builddir \
--prefix=${PREFIX} \
--libdir=${PREFIX}/lib

meson compile -C builddir

meson install -C builddir
6 changes: 6 additions & 0 deletions recipes/gsettings-desktop-schemas/conda-forge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
provider:
linux_aarch64: azure
linux_ppc64le: azure
build_platform:
linux_aarch64: linux_aarch64
linux_ppc64le: linux_ppc64le
48 changes: 48 additions & 0 deletions recipes/gsettings-desktop-schemas/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% set version = "43.0" %}

package:
name: gsettings-desktop-schemas
version: {{ version }}

source:
url: https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/archive/{{ version }}/gsettings-desktop-schemas-{{ version }}.tar.bz2
sha256: 321ac4209394acd8293e980b5a0b921285621bbbbee1fcfff9402bff19d66c13
patches:
- pkgconfig_install_libdir.patch

build:
skip: true # [not linux]
number: 0

requirements:
build:
- {{ compiler('c') }}
- meson
- make
- pkg-config
- cmake
- gobject-introspection
# glib is really a build tool?
# though I don't know if it supports "cross compilation" in the way we expect it to.
- glib
host:
- gobject-introspection
# - libgirepository
# - g-ir-host-tools

test:
commands:
- test -f ${PREFIX}/lib/pkgconfig/gsettings-desktop-schemas.pc
- test -f ${PREFIX}/share/glib-2.0/schemas/org.gnome.desktop.default-applications.gschema.xml

about:
home: https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas
summary: 'A native style to bend Qt5/Qt6 applications to look like they belong into GNOME Shell.'
summary: 'A collection of GSettings schemas for settings shared by various components of a desktop.'
license: LGPL-2.1-or-later
license_family: LGPL
license_file: COPYING

extra:
recipe-maintainers:
- hmaarrfk
13 changes: 13 additions & 0 deletions recipes/gsettings-desktop-schemas/pkgconfig_install_libdir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index efeac23..8ae3237 100644
--- a/meson.build
+++ b/meson.build
@@ -38,7 +38,7 @@ conf.set('includedir', includedir)
pkg = configure_file(configuration: conf,
input: 'gsettings-desktop-schemas.pc.in',
install: true,
- install_dir: join_paths(datadir, 'pkgconfig'),
+ install_dir: join_paths(libdir, 'pkgconfig'),
output: 'gsettings-desktop-schemas.pc')

glib_mkenums = find_program('glib-mkenums')
12 changes: 12 additions & 0 deletions recipes/qgnomeplatform/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set -ex

mkdir -p build
cd build

cmake ${CMAKE_ARGS} \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_PREFIX_PATH=${PREFIX} \
..

make -j${CPU_COUNT}
make install
8 changes: 8 additions & 0 deletions recipes/qgnomeplatform/conda-forge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
os_version:
linux_64: cos7
provider:
linux_aarch64: azure
linux_ppc64le: azure
build_platform:
linux_aarch64: linux_aarch64
linux_ppc64le: linux_ppc64le
62 changes: 62 additions & 0 deletions recipes/qgnomeplatform/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{% set version = "0.9.0" %}

package:
name: qgnomeplatform
version: {{ version }}

source:
url: https://github.com/FedoraQt/qgnomeplatform/archive/{{ version }}.tar.gz
sha256: 27c0e238a40b56814418a55ee553438e30e2ca5cce02cfb116703452c21dab17

build:
skip: true # [not linux]
number: 0

requirements:
build:
- pkg-config
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- make
- qt-main # [build_platform != target_platform]
- sysroot_linux-64 2.17 # [linux]
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libdrm-devel') }} # [linux]
- {{ cdt('libglvnd-glx') }} # [linux]
- {{ cdt('libglvnd-egl') }} # [linux]
host:
- qt-main
- qt-wayland
- adwaita-qt
- gsettings-desktop-schemas
- gtk3
- gdk-pixbuf
- pango
- glib
- xorg-libxrandr
- xorg-libxcursor
- xorg-libxcomposite
- xorg-libxdamage
- xorg-libxinerama
- xorg-xineramaproto

test:
commands:
- test -f "${PREFIX}/plugins/platformthemes/libqgnomeplatformtheme.so"
- test -f "${PREFIX}/lib/libqgnomeplatform.so"
- test -f "${PREFIX}/plugins/wayland-decoration-client/libqgnomeplatformdecoration.so"

about:
home: https://github.com/FedoraQt/QGnomePlatform
summary: 'QGnomePlatform is a Qt Platform Theme designed to use as many of the GNOME settings as possible in unmodified Qt applications.'
license: LGPL-2.1-or-later
license_family: LGPL
license_file: LICENSE

extra:
recipe-maintainers:
- hmaarrfk