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

Package will not build w/o atk #110

Closed
cassafrass387 opened this issue May 6, 2024 · 3 comments
Closed

Package will not build w/o atk #110

cassafrass387 opened this issue May 6, 2024 · 3 comments
Labels
packaging | AUR Related to the AUR package

Comments

@cassafrass387
Copy link

After removing atk (and at-spi2-core) from the PKGBUILD, and adding -D atk_bridge=false, the package will not build and continues checking for an atk dependency:
makepkg -sir ... Run-time dependency atk found: NO
I haven't tried with any other system so unsure if the problem is specifically Arch-related, is universal, or is just something I've done wrong.
My meson build command:
arch-meson gtk+$_gtkver build ... -D atk_bridge=false ...
Apologies for not simply uploading my PKGBUILD and the poor formating, I'm not home currently and I don't have a GUI on my laptop yet.
Thanks!

@cassafrass387 cassafrass387 added the packaging | AUR Related to the AUR package label May 6, 2024
@cassafrass387
Copy link
Author

Nevermind, found patches from Kiss Linux to fully remove ATK. Doesn't matter too much anyways as I realized I'd have to patch almost every application which uses gtk to exclude atk.

@lah7
Copy link
Owner

lah7 commented May 7, 2024

No worries. Supposedly we should support building with ATK but it looks like some additional steps are needed first.

I see that those Kiss Linux patches are removing some stuff from meson.build since it seems the build system is forced to check for that dependency even though it's not needed.

I didn't spend long on this, but here's a diff of the PKGBUILD for any one who wants to pick it up:

--- PKGBUILD.a  2024-05-07 16:33:54.060628344 +0000
+++ PKGBUILD    2024-05-07 17:01:21.190896188 +0000
@@ -22,8 +22,6 @@
 arch=(x86_64)
 license=(LGPL-2.0-only)
 depends=(
-       at-spi2-atk
-       atk
        cairo
        desktop-file-utils
        fribidi
@@ -52,8 +50,6 @@
 
 makedepends=(
        adwaita-icon-theme
-       at-spi2-atk
-       atk
        cairo
        cantarell-fonts
        desktop-file-utils
@@ -109,12 +105,21 @@
 {
        CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
 
+        # Remove references ATK from meson.build  - INCOMPLETE
+        sed -i 's/^  atkbridge_dep/#  atkbridge_dep/' gtk+-$_gtkver/meson.build
+        sed -i 's/^atk_pkgs =/atk_pkgs = [] # /' gtk+-$_gtkver/meson.build
+        sed -i "s/atkbridge_dep  = dependency('atk-bridge-2.0', version: at_spi2_atk_req)/#atkbridge_dep  = dependency('atk-bridge-2.0', version: at_spi2_atk_req)/g" gtk+-$_gtkver/meson.build
+        sed -i "/^\s*atk_pkgs += \['atk-bridge-2.0'\]/d" gtk+-$_gtkver/meson.build
+        sed -i "/^\s*atk_dep/d" gtk+-$_gtkver/meson.build
+        sed -i "/^\s*fallback \: \['atk'/d" gtk+-$_gtkver/meson.build
+
        # 64-bit
        arch-meson gtk+-$_gtkver build \
                -D broadway_backend=true \
                -D colord=auto \
                -D demos=false \
                -D examples=false \
+                -D atk_bridge=false \
                -D introspection=true \
                -D tests=false \
                -D installed_tests=false

This alone isn't enough, I imagine it can be improved with better use of sed commands:

gtk+-3.24.41/gtk/meson.build:848:2: ERROR: Unknown variable "atk_dep".

I'll update the README for any others passing by.

Suppose the build might succeed if atk related packages are installed at build time, then uninstalled afterwards.

@lah7
Copy link
Owner

lah7 commented May 7, 2024

This works, if the ATK packages are used as a build dependency only:

--- PKGBUILD.a  2024-05-07 17:22:19.530151126 +0000
+++ PKGBUILD.b  2024-05-07 17:22:09.333285484 +0000
@@ -22,8 +22,6 @@
 arch=(x86_64)
 license=(LGPL-2.0-only)
 depends=(
-       at-spi2-atk
-       atk
        cairo
        desktop-file-utils
        fribidi
@@ -116,6 +114,7 @@
                -D demos=false \
                -D examples=false \
                -D introspection=true \
+                -D atk_bridge=false \
                -D tests=false \
                -D installed_tests=false
        ninja -C build

lah7 added a commit that referenced this issue May 7, 2024
It is assumed that ATK packages are present during build time only.

If this is not desired, "atk_bridge=false" and removing dependencies
isn't enough. It seems meson.build is checking for ATK even though it's
not actually needed.

See also: #110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging | AUR Related to the AUR package
Projects
None yet
Development

No branches or pull requests

2 participants