Bug 258720 - multimedia/avidemux: update to 2.7.8
Summary: multimedia/avidemux: update to 2.7.8
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-multimedia (Nobody)
URL: http://avidemux.sourceforge.net/news....
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-09-25 13:38 UTC by Lars Herschke
Modified: 2022-05-07 04:59 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)
koobs: maintainer-feedback? (tcberner)


Attachments
Avidemux 2.7.8 (12.18 KB, patch)
2021-09-25 13:38 UTC, Lars Herschke
no flags Details | Diff
Avidemux 2.7.8 v2 (12.88 KB, patch)
2021-10-20 22:23 UTC, Lars Herschke
no flags Details | Diff
Avidemux 2.7.8 v3 (13.66 KB, patch)
2021-12-05 14:26 UTC, Lars Herschke
koobs: maintainer-approval+
Details | Diff
avidemux-2.7.8 build log on i386 FreeBSD 13. (489.49 KB, text/plain)
2022-04-27 10:57 UTC, Robert Clausecker
no flags Details
Avidemux 2.7.8 v4 (13.76 KB, patch)
2022-04-27 22:28 UTC, Lars Herschke
no flags Details | Diff
multimedia/avidemux: fix build on armv7 (2.04 KB, patch)
2022-04-29 12:18 UTC, Robert Clausecker
no flags Details | Diff
Avidemux 2.7.8 v5 (16.12 KB, patch)
2022-05-04 21:47 UTC, Lars Herschke
no flags Details | Diff
Avidemux 2.7.8 v6 (15.61 KB, patch)
2022-05-06 23:12 UTC, Lars Herschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Herschke 2021-09-25 13:38:06 UTC
Created attachment 228173 [details]
Avidemux 2.7.8
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2021-09-25 13:53:50 UTC
Moin moin 

Thanks alot for working on this :)

A few notes:
BUILD_DEPENDS+=	${LOCALBASE}/include/avidemux/2.7/qt5/config.h:multimedia/avidemux-qt5
RUN_DEPENDS+=	${LOCALBASE}/include/avidemux/2.7/qt5/config.h:multimedia/avidemux-qt5
would be a bit more readable using the dependency line
BUILD_DEPENDS+= avidemux-qt5>0:multimedia/avidemux-qt5
RUN_DEPENDS+=   avidemux-qt5>0:multimedia/avidemux-qt5

Instead of using 
CMAKE_ARGS+=	-DGETTEXT:BOOL=OFF
you can write 
CMAKE_OFF+=GETTEXT


mfg Tobias
Comment 2 Lars Herschke 2021-10-20 22:23:14 UTC
Created attachment 228905 [details]
Avidemux 2.7.8 v2

new patch with the desired changes
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2021-11-29 15:32:25 UTC
While you are at it, devel/yasm should only be required as a dependency on i386 and amd64 as it's an x86 assembler.  Perhaps make the dependency conditional on architecture.
Comment 4 Lars Herschke 2021-12-05 14:26:53 UTC
Created attachment 229928 [details]
Avidemux 2.7.8 v3

Attached is a new patch with modified build depends for yasm. I also removed the build dependency for the binutils. This dependency is automatically given by USE_GCC.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2022-04-27 10:07:48 UTC
^Triage: Reset in progress without specific assignee. @Tobias If you'd like this, given the earlier comment/interest, please assign, thanks!
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2022-04-27 10:08:39 UTC
Comment on attachment 229928 [details]
Avidemux 2.7.8 v3

Pending QA:

Approved by: portmgr (blanket: maintainer timeout: 4 months)
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2022-04-27 10:57:49 UTC
Created attachment 233533 [details]
avidemux-2.7.8 build log on i386 FreeBSD 13.

QA failed on i386 FreeBSD 13.

src/libswscale/x86/rgb2rgb_template.c: In function 'rgb24toyv12_mmx':
src/libswscale/x86/rgb2rgb_template.c:1665:9: error: 'asm' operand has impossible constraints
 1665 |         __asm__ volatile(                                                                                      
      |         ^                                                                                                      
lto-wrapper: fatal error: /usr/local/bin/gcc10 returned 1 exit status

Note that a version 2.8.0 has been released meanwhile.  I'll continue to test with amd64, too.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2022-04-27 11:50:56 UTC
A build on amd64 FreeBSD 13 succeeds, but raises additional potential issues (stage-qa):

Warning: you may not need USES=desktop-file-utils                                                                      
Error: /usr/local/lib/libADM6avcodec.so.58 is linked to /usr/local/lib/libva.so.2 from multimedia/libva but it is not declared as a dependency                                                                                                
Warning: you need LIB_DEPENDS+=libva.so:multimedia/libva                                                               
Error: /usr/local/lib/libADM6avutil.so.56 is linked to /usr/local/lib/libva-drm.so.2 from multimedia/libva but it is not declared as a dependency                                 
Warning: you need LIB_DEPENDS+=libva-drm.so:multimedia/libva                                                           
Error: /usr/local/lib/libADM6avutil.so.56 is linked to /usr/local/lib/libva-x11.so.2 from multimedia/libva but it is not declared as a dependency                                                                                             
Warning: you need LIB_DEPENDS+=libva-x11.so:multimedia/libva                                                           

I apologise for not having done this test run earlier, but this looks like something that should be addressed.
Comment 9 Robert Clausecker freebsd_committer freebsd_triage 2022-04-27 18:44:34 UTC
An exploratory build on arm64 succeeded.  So you might want to remove the NOT_FOR_ARCHS line or at least remove arm64 from it.
Comment 10 Lars Herschke 2022-04-27 22:28:18 UTC
Created attachment 233552 [details]
Avidemux 2.7.8 v4

Attached is a new patch. This should make the build on i386 work. In addition, the build on arm is now no longer excluded.

I do not get the qa-stage errors on FreeBSD 12.3.
Here is the output of ldd when building without the VAAPI option.

/usr/local/lib/libADM6avcodec.so.58:
        libc++.so.1 => /usr/lib/libc++.so.1 (0x80067e000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80074b000)
        libADM6avutil.so.56 => /usr/local/lib/libADM6avutil.so.56 (0x801b6d000)
        libm.so.5 => /lib/libm.so.5 (0x80076e000)
        libz.so.6 => /lib/libz.so.6 (0x8007a4000)
        libthr.so.3 => /lib/libthr.so.3 (0x8007c0000)
        libc.so.7 => /lib/libc.so.7 (0x80024e000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801e6d000)

libva.so.2 does not exist as a dependency.
For the build with VAAPI option, multimedia/libva is specified as a dependency in the Makefile.
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2022-04-29 12:18:37 UTC
Created attachment 233583 [details]
multimedia/avidemux: fix build on armv7

(In reply to Lars Herschke from comment #10)

Hi Lars,

I'm currently testing your new patch but it might take a while as I have to rebuild a bunch of dependencies, some of which take long to build.

In the process of applying your patch, I noticed that I had written a patch for the same port a while ago, patching in compatibility with armv7.  Perhaps you can incorporate it.

I also invite you to take maintainership of this port in case you are interested.

I'll let you know when the battery of tests is done.
Comment 12 Robert Clausecker freebsd_committer freebsd_triage 2022-04-29 12:34:49 UTC
(for taking maintainership, this should be cleared with multimedia@ first)
Comment 13 Robert Clausecker freebsd_committer freebsd_triage 2022-04-30 01:19:51 UTC
You forgot to run make makesum after adding the patch.  Once I did this:

Build succeeds on i386 amd64 FreeBSD 13.  I still get the warnings though (same on both):

====> Running Q/A tests (stage-qa)                                                                                     
Warning: 'lib/libADM6avutil.so.56' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}  
Warning: 'lib/libADM6postproc.so.55' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/libADM6avcodec.so.58' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} 
Warning: 'lib/libADM6avformat.so.58' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/libADM6swscale.so.5' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: you may not need USES=desktop-file-utils                                                                      
Error: /usr/local/lib/libADM6avcodec.so.58 is linked to /usr/local/lib/libva.so.2 from multimedia/libva but it is not d
eclared as a dependency                                                                                                
Warning: you need LIB_DEPENDS+=libva.so:multimedia/libva                                                               
Error: /usr/local/lib/libADM6avutil.so.56 is linked to /usr/local/lib/libva-drm.so.2 from multimedia/libva but it is no
t declared as a dependency                                 
Warning: you need LIB_DEPENDS+=libva-drm.so:multimedia/libva                                             
Error: /usr/local/lib/libADM6avutil.so.56 is linked to /usr/local/lib/libva-x11.so.2 from multimedia/libva but it is no
t declared as a dependency                                                                                             
Warning: you need LIB_DEPENDS+=libva-x11.so:multimedia/libva                                              

I'm also testing on 12.3, results will be available tomorrow.
Comment 14 Robert Clausecker freebsd_committer freebsd_triage 2022-04-30 15:06:52 UTC
(In reply to Robert Clausecker from comment #8)

Same result on 12.3: build succeeds after regenerating distinfo with the same warnings as on 13.0.

Note that you have to run "make stage-qa" (which Poudriere does automatically) to get the warnings.
Comment 15 Lars Herschke 2022-05-02 08:00:29 UTC
Sorry for the distinfo error. I built on the last quarterly branch and then adapted the patch to head only. The change in distinfo got lost in the process.
But maybe that is the crucial difference why I don't get the errors. I build with Poudriere from the current quarterly branch in the same. I also get the warnings, but not the libva errors. But the warnings also came earlier and have nothing to do with the update. For example, I think the USES warning is wrong and is due to the split between Makefile and Makefile.common.

Apparently I will have to build against head. But that may take a few days with my old laptop.
Comment 16 Tobias C. Berner freebsd_committer freebsd_triage 2022-05-02 10:16:48 UTC
(In reply to Robert Clausecker from comment #12)
I think if you want to maintain it that is fine with (the shorthanded)  multimedia@  .

mfg Tobias
Comment 17 Robert Clausecker freebsd_committer freebsd_triage 2022-05-02 22:55:21 UTC
I can confirm that your patch (with my patch applied on top) builds avidemux succesfully for armv7.  I also tried arm64, but it crashed trying to build llvm13 so it'll take another few days to conclude.
Comment 18 Lars Herschke 2022-05-03 07:37:06 UTC
I also successfully completed the test along with your patch on amd64.

LLVM13 builds for me currently only with the FLANG option disabled. Maybe that helps you too.

In the meantime I was also able to reproduce the libva dependency errors. The errors did not come with me, because I set my own options for avidemux and did not think during the test that they are also active there. The libva dependency is caused by the VAPOURSYNTH option.

A new patch will probably follow tonight.
Comment 19 Lars Herschke 2022-05-04 21:47:58 UTC
Created attachment 233729 [details]
Avidemux 2.7.8 v5

Here is a new patch with which all stage-qa errors and warnings are eliminated. Furthermore, the armv7 patch is integrated.
Comment 20 Robert Clausecker freebsd_committer freebsd_triage 2022-05-05 10:22:59 UTC
(In reply to Lars Herschke from comment #19)

Patch looks good to me.  Tested and works fine on i386 amd64 armv7 FreeBSD 13.  I wasn't able to test arm64 yet.  FreeBSD 12.3 looks okay, too.

Thank you for all your work.  Consider taking maintainership to make the process more streamlined for future updates.
Comment 21 Lars Herschke 2022-05-05 19:12:02 UTC
I don't want to be the maintainer. I have never maintained a port and if I were to do so, I would prefer a simpler port for a start.
Comment 22 Tobias C. Berner freebsd_committer freebsd_triage 2022-05-06 13:01:20 UTC
Moin moin 

Could you explain why you chose to
.if ${PORT_OPTIONS:MVAPOURSYNTH}
.if ! ${USE_XORG:Mx11}
USE_XORG+=     x11
.endif
.endf
instead of simply 
VAPORSYNTH_USE=xorg=x11

Similar for example the VDPAU option:
.if ${PORT_OPTIONS:MVDPAU}
.if ! ${LIB_DEPENDS:Mlibvdpau.so}
LIB_DEPENDS+=├→→libvdpau.so:multimedia/libvdpau 
.endif
.endif
is overly complicated. Why not simply 
VDPAU_LIB_DEPENDS=libvdpau.so:multimedia/libvdpau 

Please see [1] for more information on the option handling.

mfg Tobias

[1] https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-options
Comment 23 Lars Herschke 2022-05-06 15:24:07 UTC
I did this to avoid having the dependency in the list more than once. For example, if you select VAPOURSYNTH and VDPAU as options, you would otherwise have the libvdpau entry twice in the list.
Comment 24 Robert Clausecker freebsd_committer freebsd_triage 2022-05-06 16:55:53 UTC
(In reply to Lars Herschke from comment #23)

Having a dependency in the dependency list twice is usually not a problem.  There's no need to add extra complexity to the port to avoid this.
Comment 25 Lars Herschke 2022-05-06 23:12:27 UTC
Created attachment 233780 [details]
Avidemux 2.7.8 v6

Ok, if it doesn't matter, here is a new simpler patch.
Comment 26 commit-hook freebsd_committer freebsd_triage 2022-05-07 04:58:14 UTC
A commit in branch main references this bug:

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

commit 4fded9331ce96f4ebae8106c1ab27844d92719d8
Author:     Lars Herschke <lhersch@dssgmbh.de>
AuthorDate: 2022-05-07 04:53:19 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-05-07 04:57:10 +0000

    multimedia/avidemux: update to 2.7.8

    Changelog:
            http://avidemux.sourceforge.net/news.html#2021-03-09

    - Cleanup of option handling is planned for the near future.

    PR:             258720

 multimedia/avidemux-cli/Makefile                   |  1 -
 multimedia/avidemux-plugins/Makefile               |  9 +++---
 multimedia/avidemux-plugins/pkg-plist              | 20 ++++++++++--
 multimedia/avidemux-qt5/Makefile                   |  3 +-
 multimedia/avidemux-qt5/pkg-plist                  |  2 ++
 multimedia/avidemux/Makefile                       |  6 +++-
 multimedia/avidemux/Makefile.common                | 36 +++++++++++-----------
 multimedia/avidemux/distinfo                       |  8 +++--
 ...emux__core_ADM__core_src_ADM__folder__linux.cpp |  4 +--
 .../files/patch-avidemux__plugins_CMakeLists.txt   |  6 ++--
 ...mux_core-ffmpeg_package-patches-configure.patch | 19 ++++++++++--
 .../patch-cmake_admCheckAudioDeviceLibs.cmake      |  6 ++--
 multimedia/avidemux/pkg-plist                      |  1 -
 13 files changed, 78 insertions(+), 43 deletions(-)
Comment 27 Tobias C. Berner freebsd_committer freebsd_triage 2022-05-07 04:59:41 UTC
Finally committed. Thanks alot for working on this update :) -- note, there is already a 2.8.0 available :D 

I'll look into cleaning up the option handling a bit.

mfg Tobias