Bug 257479 - graphics/pecl-imagick and -im7 why?
Summary: graphics/pecl-imagick and -im7 why?
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-28 21:36 UTC by CTS - FreeBSD Team
Modified: 2023-07-19 11:34 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (000.fbsd)


Attachments
merge graphics/pecl-imagick and graphics/pecl-imagick-im7 (993 bytes, patch)
2022-01-04 17:09 UTC, Vladimir Druzenko
no flags Details | Diff
merge graphics/pecl-imagick and graphics/pecl-imagick-im7 (v2) (997 bytes, patch)
2022-01-04 17:12 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description CTS - FreeBSD Team 2021-07-28 21:36:46 UTC
Is there a strong reason why there are 2 ports instead of jsut one with a knob to select the desired ImageMagick version (or better it just uses the default ImageMagick port)?

Following situation:

I need to install ImageMagick-7 AND www/nextcloud on the same host. The nextcloud port depends on graphics/pecl-imagick which depends on ImageMagick-6 (hardcoded).

This is kind of a chicken-egg problem.

Can't we have only graphics/pecl-imagick that just uses the default ImageMagick version, like most other ports using ImageMagick do?
Comment 1 Miroslav Lachman 2021-07-28 23:39:04 UTC
I do not think it is possible with current FreeBSd ports and packages. Dependencies are hardcoded in the package meta data created at the build time.
It is the same reason why nextcloud has hardcode dependency on pecl-magick even if pecl-imagick-im7 will work too but nextcloud cannot know it.

If current default ImageMagick version is 7 then I think nextcloud should depends on pecl-imagick-im7.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2021-10-31 10:28:04 UTC
See also: bug 259566
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2022-01-04 17:09:34 UTC
Created attachment 230698 [details]
merge graphics/pecl-imagick and graphics/pecl-imagick-im7

It's possible - check my patch.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2022-01-04 17:12:41 UTC
Created attachment 230699 [details]
merge graphics/pecl-imagick and graphics/pecl-imagick-im7 (v2)

Fast fix.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2022-01-04 17:24:03 UTC
One more, but "offtopic": if graphics/pecl-imagick-im7 installed and ImageMagick7 build with OPENMP ON, then apache24 SIGBUS or SIGSEGV after "kill -30 `cat /var/run/httpd.pid`".
Comment 6 Miroslav Lachman 2022-01-04 20:10:43 UTC
(In reply to VVD from comment #4)
The current state with graphics/pecl-imagick and graphics/pecl-imagick-im7 produces 2 binary packages, each with dependency on different ImageMagick version. The end user can choose what version he/she needs to install with "pkg install". 
Am I right that your "merged" version of graphics/pecl-imagick/Makefile produces only one binary package with dependency on default ImageMagick version?
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2022-01-05 12:04:48 UTC
(In reply to Miroslav Lachman from comment #6)
> Am I right that your "merged" version of graphics/pecl-imagick/Makefile produces only one binary package with dependency on default ImageMagick version?
Yes.
If somebody need non-default version/options - he/she must build it self (same as with other ports).
Comment 8 Miroslav Lachman 2022-01-05 13:55:56 UTC
(In reply to VVD from comment #7)
But this is exactly the reason why there are two ports / packages. Anybody can choose the pefered prebuilt version and install it by "pkg install".
Merging the two in to one graphics/pecl-imagick leaves some users without package which they have installed now.

I don't see any benefit of your proposed merge.
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2022-01-05 15:57:11 UTC
(In reply to Miroslav Lachman from comment #8)
Next step is to create separate ports for all combinations of all options of all ports. It's very bad idea.
P.S. Sorry for my english.
Comment 10 Miroslav Lachman 2022-01-05 19:24:22 UTC
(In reply to VVD from comment #9)
It is not only about options but about dependencies and multiple versions (flavours).
Many SW have multiple versions supported at the same time and packages built for them too. With your point of view there will be packages for default versions only, but there are packages for multiple versions of Python (and flavours for py- packages), multiple versions of PHP, MySQL, MariaDB, Postgres... and they all have their packages. PECL Imagick is PHP binding for ImageMagick and there are two of them. Both have packages. Some ports need modern ImageMagick 7, some legacy 6. That's why graphics/pecl-imagick-im7 exists as a separate port and package.
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2022-01-05 21:22:44 UTC
(In reply to Miroslav Lachman from comment #10)
You misunderstand me. My english is very poor - sorry.

If you make it as flavour - then it's ok. But it isn't flavour. It's just hack - 2 different ports.
IMHO, make it flavour or with default IM. Current 2 ports is bad idea.
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2022-01-10 11:41:01 UTC
But 2 different flavors for one port isn't possible now. :-(