Bug 269383 - ftp/gstreamer1-plugins-curl: build fails if textproc/zxing-cpp is also installed [patch included]
Summary: ftp/gstreamer1-plugins-curl: build fails if textproc/zxing-cpp is also instal...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Gleb Popov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-07 09:21 UTC by Martin Birgmeier
Modified: 2023-02-10 19:33 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2023-02-07 09:21:41 UTC
Scenario:
- FreeBSD 12.4 latest
- ports latest
- upgrading ports using portmaster
- textproc/zxing-cpp is installed
- upgrade of sysutils/plasma5-systemsettings requires new port ftp/gstreamer1-plugins-curl

Result:
- build of ftp/gstreamer1-plugins-curl fails with lots of zxing type errors

Fix:
- Add zxing to BAD_GST_ALL_PLUGINS in multimedia/gstreamer1-plugins/Makefile.common:

diff --git a/multimedia/gstreamer1-plugins/Makefile.common b/multimedia/gstreamer1-plugins/Makefile.common
index 136da5652397..ee45e739cab3 100644
--- a/multimedia/gstreamer1-plugins/Makefile.common
+++ b/multimedia/gstreamer1-plugins/Makefile.common
@@ -209,7 +209,8 @@ BAD_GST_ALL_PLUGINS+= \
                winscreencap \
                x265 \
                y4m \
-               zbar
+               zbar \
+               zxing
 
 BAD_GST_ENABLED_PLUGINS?=

From looking at the ext/ subdirectory of gst-plugins-bad-1.20.5.tar.xz it seems that Makefile.common might need some more updates...

-- Martin
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2023-02-07 18:14:17 UTC
I wonder what's a more correct fix - adding zxing plugins to BAD or disabling meson feature auto-activation by passing -Dzking=disable to meson?
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2023-02-07 18:56:59 UTC
(In reply to Gleb Popov from comment #1)
How about neither and creating gsteramer1-plugins-zxing?
Comment 3 Martin Birgmeier 2023-02-08 07:40:45 UTC
If I understand Makefile.common correctly, it splits the gstreamer-bad distribution into separate sub-ports by disabling everything and only enabling the sub-port; the latter is done in the sub-port.

.if ${DIST}=="bad"
.for d in ${BAD_GST_ALL_PLUGINS}
CONFIGURE_ARGS+=        -D${d}=disabled
.endfor
.for d in ${BAD_GST_ENABLED_PLUGINS}
CONFIGURE_ARGS+=        -D${d}=enabled
.endfor
.endif

...

.if ${GST_PLUGIN}!="base" && ${GST_PLUGIN}!="bad" && \
        ${GST_PLUGIN}!="good" && ${GST_PLUGIN}!="ugly" && \
        ${GST_PLUGIN}!="x"
CONFIGURE_ARGS+=        -D${GST_PLUGIN}=enabled
.endif

So all sub-ports in the gst-plugins-bad-1.20.5.tar.xz distribution MUST be added to BAD_GST_ALL_PLUGINS, otherwise such a sub-port will also inadvertently build the other, not included sub-ports (even if they are then not installed due to pkg-plist).

Similar for good, base, etc.

-- Martin
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-02-10 16:51:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=96196935d8d716a55ccbc74a65cf72fa86d8fd16

commit 96196935d8d716a55ccbc74a65cf72fa86d8fd16
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-02-08 17:30:47 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-02-10 16:50:27 +0000

    multimedia/gstreamer1-plugins-zxing: Create a port.

    PR:             269383

    Reviewed by: tcberner

    Differential Revision: https://reviews.freebsd.org/D38442

 Mk/Uses/gstreamer.mk                               |  6 +++++-
 .../files/patch-ext_zxing_gstzxing.cpp (new)       | 25 ++++++++++++++++++++++
 .../files/patch-ext_zxing_meson.build (new)        | 22 +++++++++++++++++++
 multimedia/gstreamer1-plugins/Makefile.common      |  3 ++-
 textproc/Makefile                                  |  1 +
 textproc/gstreamer1-plugins-zxing/Makefile (new)   | 17 +++++++++++++++
 textproc/gstreamer1-plugins-zxing/distinfo (new)   |  5 +++++
 textproc/gstreamer1-plugins-zxing/pkg-plist (new)  |  1 +
 8 files changed, 78 insertions(+), 2 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-02-10 19:15:55 UTC
A commit in branch 2023Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dc3e6eb04eb022e746cab3c2763c2315b89191e6

commit dc3e6eb04eb022e746cab3c2763c2315b89191e6
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-02-08 17:30:47 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-02-10 19:14:47 +0000

    multimedia/gstreamer1-plugins-zxing: Create a port.

    PR:             269383

    Reviewed by: tcberner

    Differential Revision: https://reviews.freebsd.org/D38442

    (cherry picked from commit 96196935d8d716a55ccbc74a65cf72fa86d8fd16)

 Mk/Uses/gstreamer.mk                               |  6 +++++-
 .../files/patch-ext_zxing_gstzxing.cpp (new)       | 20 ++++++++++++++++++++
 .../files/patch-ext_zxing_meson.build (new)        | 22 ++++++++++++++++++++++
 multimedia/gstreamer1-plugins/Makefile.common      |  3 ++-
 textproc/Makefile                                  |  1 +
 textproc/gstreamer1-plugins-zxing/Makefile (new)   | 17 +++++++++++++++++
 textproc/gstreamer1-plugins-zxing/distinfo (new)   |  5 +++++
 textproc/gstreamer1-plugins-zxing/pkg-plist (new)  |  1 +
 8 files changed, 73 insertions(+), 2 deletions(-)
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2023-02-10 19:16:39 UTC
Fixed, sorry for the breakage.
Comment 7 Martin Birgmeier 2023-02-10 19:33:35 UTC
Thank you very much!

-- Martin