shimmerproject / elementary-xfce

Elementary icons forked from upstream, extended and maintained for Xfce
GNU General Public License v2.0
274 stars 37 forks source link

Which are the (build?) dependencies? #491

Open kuraga opened 1 week ago

kuraga commented 1 week ago

https://github.com/shimmerproject/elementary-xfce/blob/v0.20/README.md?plain=1#L28-L30

Should be gdk-pixbuf in this list?

Skif-off commented 1 week ago

Why? GdkPixbuf is a GTK3 dependency.

kuraga commented 1 week ago

Well, there are two separate calls of pkgconfig;

https://github.com/shimmerproject/elementary-xfce/blob/1080fd5cd538102d369527b131d994c804b0d30e/svgtopng/Makefile#L10-L11

Skif-off commented 1 week ago

Hm. If I understood correctly, svgtopng uses functions from the GLib and GdkPixbuf libraries: in theory, both libraries do not require GTK3.

kuraga commented 1 week ago

@Skif-off , so, the question is wider?

Which are the (build?) dependencies?

newhoa commented 1 week ago

Thanks for the report!

So it looks like gdk-pixbuf is a dependency of gtk-3. So I think just having gtk-3 listed is okay. The gtk-3 dev package does seem to be required though, so maybe that detail should be added.

I tried building on Fedora Xfce Live and, in addition to gtk3-devel and optipng, it did need make and cc (gcc). So those probably need to be added to the dependency list.

Unfortunately these dependencies install a ton of other dependencies:

make
- gc
- guile30

gtk3-devel
- at-spi2-atk-devel
- at-spi2-core-devel
- atk-devel
- brotli
- brotli-devel
- bzip2-devel
- cairo-devel
- cairo-gobject-devel
- cmake-filesystem
- dbus-devel
- fontconfig-devel
- freetype-devel
- fribidi-devel
- gdk-pixbuf2-devel
- gettext
- glib2-devel
- graphite2-devel
- harfbuzz-devel
- libX11-devel
- libXau-devel
- libXcomposite-devel
- libXcursor-devel
- libXdamage-devel
- libXext-devel
- libXfixes-devel
- libXft-devel
- libXi-devel
- libXinerama-devel
- libXrandr-devel
- libXrender-devel
- libXtst-devel
- libblkid-devel
- libcloudproviders-devel
- libdatrie-devel
- libepoxy-devel
- libffi-devel
- libglvnd-core-devel
- libglvnd-devel
- libglvnd-opengl
- libicu-devel
- libjpeg-turbo-devel
- libmount-devel
- libpng-devel
- libselinux-devel
- libsepol-devel
- libthai-devel
- libtiff-devel
- libwebp-devel
- libxcb-devel
- libxkbcommon-devel
- libxml2-devel
- libzstd-devel
- pango-devel
- pcre2-devel
- pcre2-utf16
- pixman-devel
- sysprof-capture-devel
- wayland-devel
- xorg-x11-proto-devel
- xz-devel
- zlib-ng-compat-devel

gcc
- glibc-devel
- glibc-headers-x86
- kernel-headers
- libxcrypt-devel

optipng

This feels like a lot for just an icon theme. Personally I'd really like to move away from requiring all of these dependencies. Gtk is a big dependency. Especially for those on non-gtk systems, they would need way more packages to be installed.

Upstream elementary moved to using rsvg-convert (and meson). Trying to install upstream elementary icons on a fresh boot of Fedora Xfce Live, far fewer packages are needed:

meson
- ninja-build

librsvg2-tools
- librsvg2
- rsvg-pixbuf-loader

xcursorgen

gettext
- libtextstyle

This also seems a little more platform/desktop agnostic.

kuraga commented 1 week ago

Thanks!

Skif-off commented 6 days ago

The gtk-3 dev package does seem to be required though, so maybe that detail should be added.

But the reason is unclear (gtk-3 dev has too many dependencies).

Skif-off commented 6 days ago

Well, my test in Xubuntu 22.04. By default: libgtk-3-dev, librsvg2-dev. optipng.

Simple patch:

--- elementary-xfce.orig/svgtopng/Makefile
+++ elementary-xfce/svgtopng/Makefile
@@ -7,7 +7,6 @@ all: svgtopng
 svgtopng:
    ${CC} -Wall -Werror -O0 -pipe \
    svgtopng.c -o svgtopng \
-   `pkg-config --libs --cflags gtk+-3.0` \
    `pkg-config --libs --cflags gdk-pixbuf-2.0`

 convert: svgtopng | $(ICONDIR)
--- elementary-xfce.orig/svgtopng/svgtopng.c
+++ elementary-xfce/svgtopng/svgtopng.c
@@ -28,7 +28,7 @@
 #include <unistd.h>
 #include <errno.h>

-#include <gtk/gtk.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>

 static void

and now: libgdk-pixbuf-2.0-dev, librsvg2-common (because this package contains the SVG loader for the GdkPixbuf library), optipng.