View previous topic :: View next topic |
Author |
Message |
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6169 Location: Dallas area
|
Posted: Fri Jul 31, 2020 10:51 am Post subject: |
|
|
Fixed version - qt5 disable dbus patch
Code: | $ cat /etc/portage/patches/media-video/mkvtoolnix/qt-disable-dbus.patch
--- a/ac/qt5.m4 2020-07-31 04:58:01.060460654 -0500
+++ b/ac/qt5.m4 2020-07-31 05:06:20.549542864 -0500
@@ -14,6 +14,11 @@
AC_ARG_WITH([qt_pkg_config],
AC_HELP_STRING([--without-qt-pkg-config], [do not use pkg-config for detecting Qt; instead rely on QT_CFLAGS/QT_LIBS being set correctly already]),
[ with_qt_pkg_config=${withval} ], [ with_qt_pkg_config=yes ])
+AC_ARG_ENABLE([dbus],
+ AC_HELP_STRING([--enable-dbus],[enable/disable qtdbus/dbus from being included in build (yes)]),
+ [],[enable_dbus=yes])
+
+
if test x"$enable_qt" = "xyes" -a \
'(' x"$enable_gui" = x"yes" -o x"$enable_gui" = "x" ')'; then
@@ -169,9 +174,14 @@
AC_MSG_RESULT(no: not found by pkg-config)
fi
- if test x"$MINGW" != x1 && ! echo "$host" | grep -q -i apple ; then
- PKG_CHECK_EXISTS([Qt5DBus],[with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5DBus"])
- AC_DEFINE(HAVE_QTDBUS, 1, [Define if QtDBus is present])
+ if test x"$enable_dbus" = xyes; then
+ if test x"$MINGW" != x1 && ! echo "$host" | grep -q -i apple ; then
+ PKG_CHECK_EXISTS([Qt5DBus],[dbus_found=yes],[dbus_found=no])
+ if test x"$dbus_found" = xyes; then
+ with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5DBus"
+ AC_DEFINE(HAVE_QTDBUS, 1, [Define if QtDBus is present])
+ fi
+ fi
fi
with_qt_pkg_config_modules="`echo "$with_qt_pkg_config_modules" | sed -e 's/,/ /g'`" |
Fixed ebuild - had to invoke eautoconf and add autotools to inherit
Code: | --- /usr/portage/media-video/mkvtoolnix/mkvtoolnix-37.0.0.ebuild 2019-12-10 17:41:55.000000000 -0600
+++ /usr/local/portage/media-video/mkvtoolnix/mkvtoolnix-37.0.0.ebuild 2020-07-31 05:49:35.792693710 -0500
@@ -3,7 +3,7 @@
EAPI=7
-inherit flag-o-matic toolchain-funcs multiprocessing qmake-utils xdg
+inherit flag-o-matic toolchain-funcs multiprocessing qmake-utils xdg autotools
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://gitlab.com/mbunkus/mkvtoolnix.git"
@@ -19,7 +19,7 @@
LICENSE="GPL-2"
SLOT="0"
-IUSE="debug nls pch test qt5"
+IUSE="+dbus debug nls pch test qt5"
RESTRICT="!test? ( test )"
# check NEWS.md for build system changes entries for boost/libebml/libmatroska
@@ -37,7 +37,7 @@
sys-libs/zlib
qt5? (
dev-qt/qtcore:5
- dev-qt/qtdbus:5
+ dbus? ( dev-qt/qtdbus:5 )
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtwidgets:5
@@ -68,6 +68,8 @@
./autogen.sh || die
fi
+ eautoconf
+
# remove bundled libs
rm -r lib/{fmt,libebml,libmatroska,nlohmann-json,pugixml,utf8-cpp} || die
}
@@ -80,6 +82,7 @@
$(use_enable debug)
$(usex pch "" --disable-precompiled-headers)
$(use_enable qt5 qt)
+ $(use_enable dbus)
$(use_with nls gettext)
$(usex nls "" --with-po4a-translate=false)
--disable-update-check |
Edit to add: running ebuild <> configure, I could go to the build directory and see that configure now has the --enable-dbus option and looking at the build log, it shows --disable-dbus being passed to configure, and config.h doesn't show as having the HAVE_QTDBUS define set _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Last edited by Anon-E-moose on Fri Jul 31, 2020 4:38 pm; edited 1 time in total |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Fri Jul 31, 2020 3:14 pm Post subject: |
|
|
Tested in my custom repository and I confirm it works. I have the patch in the files directory and the ebuild has it in the PATCHES array Code: | )
"
PATCHES=( "${FILESDIR}"/mkvtoolnix-37.0.0-qt5dbus.patch )
src_prepare() {
xdg_src_prepare
|
@sdauth
Will you reopen your PR with updated patch and ebuild? |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6169 Location: Dallas area
|
Posted: Fri Jul 31, 2020 3:55 pm Post subject: |
|
|
He (upstream dev) has already accepted the last commit, so this one would have to be a little different, to factor in that one.
It's in the git repo for version 48, but I see it's not in the packaged source tarball for v48.
Plus not sure if he would be interested in the enable/disable dbus option as most binary distros already push dbus/qtdbus.
So having said the above, from a strictly gentoo angle
Up to v47 needs to use the patch and modified ebuild or go the package.provided route for qtdbus.
Not sure about v48, at the moment you would treat it as v47 above with same patches
and IF he recreates the tarball for v48 to include the original patch I sent then the patch to apply (in gentoo) would need to be modified.
After v48, changes should be picked up from original patch so the modified patch to add enable/disable dbus would need to be applied (if applied at the dev level, from the files directory) and a possible modification to the ebuild.
Edit to add: I'd love to see it work all the way around, but I'm not sure how hard it's going to be to get everyone on the same page (mkv dev, gentoo dev, users)
Eta2: If sdauth does inquire, keep this in mind. (quote it if you want)
With the patches, including the proposed one with enable-dbus with no arguments, configure will produce exactly the same results as without the dbus patch, as I've made enable-dbus be set to on. With disable-dbus, then configure will not even try to include qtdbus in the binary even if qtdbus is installed.
It's been working well, for me, for over a year without dbus being in the binary.
Edit to add code: This will work on top of the patch that was accepted.
Code: | --- a/ac/qt5.m4 2020-07-31 11:25:31.371508129 -0500
+++ b/ac/qt5.m4 2020-07-31 11:30:14.967322450 -0500
@@ -14,6 +14,11 @@
AC_ARG_WITH([qt_pkg_config],
AC_HELP_STRING([--without-qt-pkg-config], [do not use pkg-config for detecting Qt; instead rely on QT_CFLAGS/QT_LIBS being set correctly already]),
[ with_qt_pkg_config=${withval} ], [ with_qt_pkg_config=yes ])
+AC_ARG_ENABLE([dbus],
+ AC_HELP_STRING([--enable-dbus],[enable/disable qtdbus/dbus from being included in build (yes)]),
+ [],[enable_dbus=yes])
+
+
if test x"$enable_qt" = "xyes" -a \
'(' x"$enable_gui" = x"yes" -o x"$enable_gui" = "x" ')'; then
@@ -169,11 +174,13 @@
AC_MSG_RESULT(no: not found by pkg-config)
fi
- if test x"$MINGW" != x1 && ! echo "$host" | grep -q -i apple ; then
- PKG_CHECK_EXISTS([Qt5DBus],[dbus_found=yes],[dbus_found=no])
- if test x"$dbus_found" = xyes; then
- with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5DBus"
- AC_DEFINE(HAVE_QTDBUS, 1, [Define if QtDBus is present])
+ if test x"$enable_dbus" = xyes; then
+ if test x"$MINGW" != x1 && ! echo "$host" | grep -q -i apple ; then
+ PKG_CHECK_EXISTS([Qt5DBus],[dbus_found=yes],[dbus_found=no])
+ if test x"$dbus_found" = xyes; then
+ with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5DBus"
+ AC_DEFINE(HAVE_QTDBUS, 1, [Define if QtDBus is present])
+ fi
fi
fi |
_________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Fri Jul 31, 2020 6:39 pm Post subject: |
|
|
Anon-E-moose wrote: | ... Up to v47 needs to use the patch and modified ebuild or go the package.provided route for qtdbus.
Not sure about v48, at the moment you would treat it as v47 above with same patches
and IF he recreates the tarball for v48 to include the original patch I sent then the patch to apply (in gentoo) would need to be modified.
|
I really doubt the mkvtoolnix-48.0.0.tar.xz tarball would ever get the patch.
So for a Gentoo's media-video/mkvtoolnix-48.0.0-r1 the patch would need to be provided by the package.
And once upstream releases version 49, we need to check and see what patch is needed. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6169 Location: Dallas area
|
Posted: Fri Jul 31, 2020 7:44 pm Post subject: |
|
|
I think you're correct Charles, I just had to mention it.
I have a question for a dev (asturm or other)
With the ebuild modifications and configure modifications to completely shut off qtdbus by way of the flag would that be accepted by the gentoo mkvtoolkit devs?
And if they will accept it, do I need to do something like a bug report or enhancement request (it actually does fix one minor bug). _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6169 Location: Dallas area
|
Posted: Thu Aug 20, 2020 10:08 am Post subject: |
|
|
Just installed 48.0 yesterday, clean install w/o modifications to ebuild. One patch to configure, no changes to m4 as it doesn't recreate configure unless specifically told to do so.
Code: |
$ cat /etc/portage/patches/media-video/mkvtoolnix/configure.patch
--- a/configure 2019-08-24 03:04:21.000000000 -0500
+++ b/configure 2020-08-18 06:56:32.285066135 -0500
@@ -9189,9 +9189,9 @@
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5DBus"
+ $as_echo "#define HAVE_QTDBUS 1" >>confdefs.h
fi
-$as_echo "#define HAVE_QTDBUS 1" >>confdefs.h
fi
|
and putting qtdbus in package.provided
Code: | $ grep qtdbus /etc/portage/profile/package.provided
dev-qt/qtdbus-5.14.2 |
No other changes needed, no local copy of ebuild. Enjoy _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Thu Aug 20, 2020 7:57 pm Post subject: |
|
|
Anon-E-moose wrote: | No other changes needed, no local copy of ebuild. Enjoy |
Much easier: emerge mkvtoolnix-49.0[-dbus], no patching, no package.provided ... |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6169 Location: Dallas area
|
Posted: Thu Aug 20, 2020 8:13 pm Post subject: |
|
|
charles17 wrote: | Anon-E-moose wrote: | No other changes needed, no local copy of ebuild. Enjoy |
Much easier: emerge mkvtoolnix-49.0[-dbus], no patching, no package.provided ... |
I see that they put in the patch, yes, there won't need to be any patching or package.provided, well once 49 ebuild hits portage.
Thanks for the heads up.
Edit to add: I see they have a bump request for 49, so hopefully soon. https://bugs.gentoo.org/737252 _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Thu Aug 20, 2020 8:44 pm Post subject: |
|
|
Anon-E-moose wrote: | well once 49 ebuild hits portage. | bug 737252#c1 |
|
Back to top |
|
|
sdauth l33t
Joined: 19 Sep 2018 Posts: 659 Location: Ásgarðr
|
Posted: Fri Aug 21, 2020 3:48 am Post subject: |
|
|
This morning update :
Code: | [ebuild U ] media-video/mkvtoolnix-49.0.0 [48.0.0] USE="dbus%* dvd nls qt5 -debug (-pch) -test" |
Great
Thanks a lot guys ! Sorry if I didn't answer to messages, it was a bit rough these last weeks with my whole raid array going down (a huge mess..) but this is fixed also |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|