Topic: ImageMagick2 dependencies

I was going to install php-pecl-imagick (It is an optional dependency of Horde 4 webmail) on my EL5 server without X  but decided not to because it was wanting to install 63 additional rpms as dependancies, eg ImageMagick2, which pulls in librsvg2, which pulls in gnome-vfs, etc, etc.  It's not just ImageMagick2, the standard ImageMagick rpm has the same issue, which has been reported many times - http://www.google.com/search?q=imagemag … redhat.com

I read there is a configure option to build ImageMagick "without X" - http://studio.imagemagick.org/pipermail … 03190.html and http://www.imagemagick.org/script/advan … lation.php - I haven't tried to build that myself, but just wondering if a "without-x" version would be more appropriate for your repository, which is probably used more by servers than desktops?

Greg

Re: ImageMagick2 dependencies

I will have a look to this.
Even if I don't see this as a bug. Installation some X related libraries is not really an issue.

But my main concern is to provide a full featured version if ImageMagick and php-pecl-imagick, and I prefer to have some big dependencies rather than missing feature.

And according to the bug report, it seems to be more a libsvg issue than an ImageMagick one.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick2 dependencies

Remi wrote:

I will have a look to this.
Even if I don't see this as a bug. Installation some X related libraries is not really an issue.

But my main concern is to provide a full featured version if ImageMagick and php-pecl-imagick, and I prefer to have some big dependencies rather than missing feature.

And according to the bug report, it seems to be more a libsvg issue than an ImageMagick one.

I looked at it a bit.  Building without requiring X you need to lose the rsvg, wmf and xml configure options.  Each of them require X libraries, but you are right librsvg2 brings in the majority of them.  This is what I was testing:

--- ImageMagick2.spec    2009-09-05 07:27:48.000000000 -0700
+++ ImageMagick2noX.spec    2011-09-12 00:18:54.000000000 -0700
@@ -7,9 +7,9 @@
 %endif
 
 
-Name:           ImageMagick2
+Name:           ImageMagick2noX
 Version:        %{VER}.%{Patchlevel}
-Release:        1%{?dist}
+Release:        1.gs%{?dist}
 Summary:        An X application for displaying and manipulating images
 Group:          Applications/Multimedia
 License:        ImageMagick
@@ -17,6 +17,10 @@
 Source0:        ftp://ftp.ImageMagick.org/pub/ImageMagick/ImageMagick-%{VER}-%{Patchlevel}.tar.bz2
 Patch1:         ImageMagick-6.4.0-multilib.patch
 
+#Added to be able to be used as an alternative to ImageMagick2
+Conflicts:      ImageMagick2
+Provides:       ImageMagick2-%{version}
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
 BuildRequires:  libtiff-devel, giflib-devel, zlib-devel
@@ -29,9 +33,14 @@
 %if %{withdjvu}
 BuildRequires:  djvulibre-devel
 %endif
-BuildRequires:  libwmf-devel, jasper-devel, libtool-ltdl-devel
-BuildRequires:  libX11-devel, libXext-devel, libXt-devel
-BuildRequires:  lcms-devel, libxml2-devel, librsvg2-devel
+#Commented out for with-x=no
+#BuildRequires:  libwmf-devel
+BuildRequires:  jasper-devel, libtool-ltdl-devel
+#Commented out for with-x=no
+#BuildRequires:  libX11-devel, libXext-devel, libXt-devel
+BuildRequires:  lcms-devel
+#Commented out for with-x=no
+#BuildRequires: libxml2-devel, librsvg2-devel
 
 %description
 ImageMagick is an image display and manipulation tool for the X
@@ -41,23 +50,24 @@
 either save the completed work in the original format or a different
 one. 
 
-ImageMagick2 can be installed with ImageMagick official RPM.
+ImageMagick2noX can be installed with ImageMagick official RPM.
 
 Command line programs for creating animated or transparent .gifs, 
 creating composite images, creating thumbnail images, and more are 
-included in ImageMagick2-tools package.
+included in ImageMagick2noX-tools package.
 
-ImageMagick2 is one of your choices if you need a program to manipulate
-and display images. If you want to develop your own applications
-which use ImageMagick code or APIs, you need to install
-ImageMagick2-devel as well.
+ImageMagick2noX is one of your choices if you need a program to 
+manipulate and display images. If you want to develop your own 
+applications which use ImageMagick code or APIs, you need to install
+ImageMagick2noX-devel as well.
 
 
 %package devel
 Summary: Library links and header files for ImageMagick app development
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
-Requires: libX11-devel, libXext-devel, libXt-devel
+#Commented out for with-x=no
+#Requires: libX11-devel, libXext-devel, libXt-devel
 Requires: ghostscript-devel
 Requires: bzip2-devel
 Requires: freetype-devel
@@ -172,14 +182,11 @@
            --disable-static \
            --with-modules \
            --with-perl \
-           --with-x \
+           --with-x=no \
            --with-threads \
            --with-magick_plus_plus \
            --with-gslib \
-           --with-wmf \
            --with-lcms \
-           --with-rsvg \
-           --with-xml \
            --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
            --without-dps \
            --without-included-ltdl --with-ltdl-include=%{_includedir} \
@@ -338,6 +345,11 @@
 
 
 %changelog
+* Sat Sep 11 2011 Greg Swallow <greg@runlevel7.ca> - 6.5.5.6-1
+- renamed to ImageMagick2noX
+- changed configure to configure without x and disabled xml, wmf
+  and rsvg as those required X
+
 * Sat Sep 05 2009 Remi Collet <RPMS@FamilleCollet.com> - 6.5.5.6-1
 - patch level 6
 

Re: ImageMagick2 dependencies

Definitively, I don't think removing feature (xml, svg, ...) is a good solution...

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick2 dependencies

Remi wrote:

Definitively, I don't think removing feature (xml, svg, ...) is a good solution...

You're right, I think svg is used by some web apps (mediawiki maybe), not sure if Horde uses it.

The proper solution might be to package the features of librsvg2 that require X into the main librsvg2 rpm and the features that don't require X into a librsvg2-libs subpackage, (and the same for the xml and wmf libraries).  And make the librsvg2 package require librsvg2-libs.  That way, the existing programs that require librsvg2 would still get all the files, but some new packages could require just the -libs rpm (like ImageMagicknoX).  In theory the noX version should still have svg, xml and wmf support, just not the viewers or whatever the portion is that requires X.  Do you think Fedora would accept patches to do that?  Or does that sound wrong...you know better than me.