Bug 221391 - graphics/zbar can work with ImageMagick-7 just as well
Summary: graphics/zbar can work with ImageMagick-7 just as well
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-10 15:00 UTC by Mikhail T.
Modified: 2019-08-27 15:03 UTC (History)
5 users (show)

See Also:
dev2: maintainer-feedback+


Attachments
Do not care for ImageMagick's version (2.10 KB, patch)
2017-08-10 15:00 UTC, Mikhail T.
no flags Details | Diff
patch-selectable-imagick-version (2.14 KB, patch)
2019-01-09 18:50 UTC, Kurt Jaeger
no flags Details | Diff
patch-selectable-imagick-version (5.35 KB, patch)
2019-01-09 19:09 UTC, Kurt Jaeger
pi: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2017-08-10 15:00:13 UTC
Created attachment 185235 [details]
Do not care for ImageMagick's version

graphics/zbar can build against ImageMagick-7 just as well and our friends on NetBSD have made the switch some time ago:

https://mail-index.netbsd.org/pkgsrc-wip-changes/2016/05/20/msg002941.html

The attached patch will make our port work with either 6 or 7 (and, hopefully, later) versions of IM.
Comment 1 Oliver Heesakkers 2017-08-28 10:36:13 UTC
I'm updating my Poudriere VM to test this patch.

As a matter of principle I have no objection, but I'd like to have some testing done (both technical and functional) before it gets committed.
Comment 2 Oliver Heesakkers 2017-09-15 14:08:26 UTC
I've stumbled upon a problem with this.

Using the samen command on a couple of example pics, I get

######################################
# with ImageMagick6 and current zbar #
######################################

EAN-8.jpg: EAN-8:50184385
UPC-A.png: EAN-13:0036000291452
barcode.png: EAN-13:9876543210128
code128.png: CODE-128:010123456789012815051231
code39.png: CODE-39:123ABC
ean-13.jpg: EAN-13:7612345000121
interleaved2of5.png: I2/5:12345678
upc-e.gif: EAN-13:0012345000065

########################################
# with ImageMagick6 and proposed patch #
########################################
EAN-8.jpg: ERROR: unable to open image `EAN-8.jpg': No such file or directory @ error/blob.c/OpenBlob/2701
UPC-A.png: ERROR: unable to open image `UPC-A.png': No such file or directory @ error/blob.c/OpenBlob/2701
barcode.png: ERROR: unable to open image `barcode.png': No such file or directory @ error/blob.c/OpenBlob/2701
code128.png: ERROR: unable to open image `code128.png': No such file or directory @ error/blob.c/OpenBlob/2701
code39.png: ERROR: unable to open image `code39.png': No such file or directory @ error/blob.c/OpenBlob/2701
ean-13.jpg: ERROR: unable to open image `ean-13.jpg': No such file or directory @ error/blob.c/OpenBlob/2701
interleaved2of5.png: ERROR: unable to open image `interleaved2of5.png': No such file or directory @ error/blob.c/OpenBlob/2701
upc-e.gif: ERROR: unable to open image `upc-e.gif': No such file or directory @ error/blob.c/OpenBlob/2701

I have yet to try ImageMagick7 and the proposed patch, but at present I would advise against committing these changes.
Comment 3 Mikhail T. 2017-09-15 15:09:04 UTC
(In reply to Oliver Heesakkers from comment #2)
> Using the samen command on a couple of example pics

Could you post the actual command-line you've used, please? Thank you!
Comment 4 Oliver Heesakkers 2017-09-19 11:51:30 UTC
fsck found some issues with the root partition of my Poudriere VM.

All tests successful. Feel free to commit. Thanks for the patch!
Comment 5 Kurt Jaeger freebsd_committer 2019-01-07 19:39:44 UTC
Committed, thanks!
Comment 6 commit-hook freebsd_committer 2019-01-07 19:40:33 UTC
A commit references this bug:

Author: pi
Date: Mon Jan  7 19:39:37 UTC 2019
New revision: 489610
URL: https://svnweb.freebsd.org/changeset/ports/489610

Log:
  graphics/zbar: work with ImageMagick-7 instead of -6

  PR:		221391
  Submitted by:	Mikhail T. <mi@ALDAN.algebra.com>
  Approved by:	Oliver Heesakkers <dev2@heesakkers.info> (maintainer)

Changes:
  head/graphics/zbar/Makefile
  head/graphics/zbar/files/patch-configure
  head/graphics/zbar/files/patch-zbarimg.c
Comment 7 VVD 2019-01-08 09:20:12 UTC
(In reply to commit-hook from comment #6)
> graphics/zbar: work with ImageMagick-7 instead of -6
Why?!
ImageMagick-7 can't be installed together with ImageMagick-6, but most other ports can work with ImageMagick-6 only.
And now you can't install zbar on most real systems.
1) Option ImageMagick-6 or 7 for zbar;
2) But better to do possible to install ImageMagick-6 and 7 together.
Comment 8 Kurt Jaeger freebsd_committer 2019-01-08 09:25:13 UTC
So we need an option to allow to select the version, and 6 should be the default?
Comment 9 Oliver Heesakkers 2019-01-09 07:19:23 UTC
The patch enables you to use 7, it does not force it upon you (unless there's a bug in the patch)
Comment 10 VVD 2019-01-09 17:58:04 UTC
Can you, please, show how to build zbar with ImageMagick 6 after this patch?
Comment 11 Kurt Jaeger freebsd_committer 2019-01-09 18:50:23 UTC
Created attachment 200964 [details]
patch-selectable-imagick-version

This patch adds a radio option to select either version 6 or 7 of ImageMagick. Default will be 7.

The problem with the previous patch was that the LIB_DEPEND only works
if the build is not via poudriere and the user built IM6 before.
Comment 12 Kurt Jaeger freebsd_committer 2019-01-09 18:51:24 UTC
Hmm, test with V6 selected fails in pkg-plist 8-(
Comment 13 Kurt Jaeger freebsd_committer 2019-01-09 19:09:20 UTC
Created attachment 200965 [details]
patch-selectable-imagick-version

This should work in all cases: either v6 or v7, or none. And even if one of the imagemagick versions is installed and none is selected and it is build outside poudriere, then no im-version is used.
Comment 14 commit-hook freebsd_committer 2019-01-27 10:42:41 UTC
A commit references this bug:

Author: pi
Date: Sun Jan 27 10:42:25 UTC 2019
New revision: 491340
URL: https://svnweb.freebsd.org/changeset/ports/491340

Log:
  graphics/zbar: make the ImageMagick an option, 7 the default

  PR:		221391
  Reported by:	vvd@unislabs.com
  Approved by:	dev2@heesakkers.info (maintainer timeout)

Changes:
  head/graphics/zbar/Makefile
  head/graphics/zbar/files/patch-Makefile.in
  head/graphics/zbar/files/patch-configure
  head/graphics/zbar/files/patch-zbarimg.c
  head/graphics/zbar/files/patch-zbarimg_zbarimg.c
  head/graphics/zbar/pkg-plist
Comment 15 VVD 2019-01-27 14:51:29 UTC
6 have to be default yet.
For example graphics/inkscape mandatory depends on libMagick++-6.so:graphics/ImageMagick6.
Comment 16 Walter Schwarzenfeld freebsd_triage 2019-08-27 00:37:14 UTC
Is there anything to do here, or could it be closed?
Comment 17 Oliver Heesakkers 2019-08-27 09:17:43 UTC
As far as the ImageMagick discussion was concerned, yeah this could be closed. 

Looking at the Makefile, the QT4 option should likely be removed now, I know I'm not going to port it to QT5.
But it's cleaner to do this in different PR, so yeah, just close it. I'll make another PR to remove the QT4 bits.
Comment 18 VVD 2019-08-27 09:57:33 UTC
(In reply to Walter Schwarzenfeld from comment #16)
As I said before: 6 have to be default for all ports yet.
Comment 19 Walter Schwarzenfeld freebsd_triage 2019-08-27 10:02:14 UTC
Close here, see comment17.
Comment 20 VVD 2019-08-27 10:08:58 UTC
(In reply to Walter Schwarzenfeld from comment #19)
Not important for me - I'm build all software from ports self with custom options, but who use packages can't install graphics/inkscape and graphics/zbar on same host: graphics/ImageMagick6 conflicts with graphics/ImageMagick7.
Comment 21 Walter Schwarzenfeld freebsd_triage 2019-08-27 15:03:25 UTC
But the conflict will be another new PR.