Thursday, August 02, 2018

UPDATE: multimedia/mkvtoolnix

Hi ports@, Hi Brad,

please find below an overdue mkvtoolnix update to the latest stable
version. All tests passed on amd64. mkvtoolnix-gui also works for my
jobs.

As a hint, you need cmark (separate email) as LIB_DEPENDS.

Brad, are you still interested in that maintenance?

Feedback? Ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/mkvtoolnix/Makefile,v
retrieving revision 1.75
diff -u -p -u -p -r1.75 Makefile
--- Makefile 1 Jul 2018 18:33:37 -0000 1.75
+++ Makefile 2 Aug 2018 09:04:06 -0000
@@ -1,9 +1,8 @@
-# $OpenBSD: Makefile,v 1.75 2018/07/01 18:33:37 espie Exp $
+

COMMENT= create, alter and inspect Matroska files

-DISTNAME= mkvtoolnix-9.7.1
-REVISION= 5
+DISTNAME= mkvtoolnix-25.0.0
CATEGORIES= multimedia x11
MASTER_SITES= ${HOMEPAGE}sources/
EXTRACT_SUFX= .tar.xz
@@ -15,22 +14,28 @@ MAINTAINER= Brad Smith <brad@comstyle.co
# GPLv2
PERMIT_PACKAGE_CDROM= Yes

-WANTLIB= FLAC boost_filesystem-mt boost_regex-mt boost_system-mt \
- c ebml iconv intl m magic matroska ogg pthread vorbis z \
- ${COMPILER_LIBCXX}
+WANTLIB += ${COMPILER_LIBCXX} FLAC boost_filesystem-mt
+WANTLIB += boost_regex-mt boost_system-mt c cmark ebml iconv intl
+WANTLIB += m magic matroska ogg vorbis z

MODULES= lang/ruby

MODRUBY_RUNDEP= No

+# C++11 / C++14
COMPILER = base-clang ports-gcc

-BUILD_DEPENDS= devel/gettext-tools
+BUILD_DEPENDS= devel/gettext-tools \
+ devel/gtest \
+ textproc/docbook \
+ textproc/docbook-xsl \
+ x11/qt5/qttools

LIB_DEPENDS= audio/flac \
audio/libogg \
audio/libvorbis \
devel/boost \
+ devel/cmark \
devel/gettext \
devel/libmagic \
multimedia/libmatroska>=1.4.5 \
@@ -41,12 +46,14 @@ MAKE_ENV+= V=1
CONFIGURE_STYLE= autoconf
AUTOCONF_VERSION= 2.69
CONFIGURE_ARGS= --disable-optimization \
+ --disable-update-check \
--with-boost-date-time=boost_date_time-mt \
--with-boost-filesystem=boost_filesystem-mt \
--with-boost-libdir=${LOCALBASE}/lib \
--with-boost-regex=boost_regex-mt \
--with-boost-system=boost_system-mt \
- --without-curl
+ --with-docbook-xsl-root=${LOCALBASE}/share/xsl/docbook
+
CPPFLAGS= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib

@@ -57,33 +64,34 @@ FLAVOR?=
CONFIGURE_ARGS+= --disable-gui
.else
MODULES+= x11/qt5
-WANTLIB+= Qt5Concurrent Qt5Core Qt5Gui Qt5Network Qt5Widgets
+WANTLIB+= Qt5Concurrent Qt5Core Qt5Gui Qt5Network Qt5Widgets Qt5Multimedia
+LIB_DEPENDS += x11/qt5/qtmultimedia
RUN_DEPENDS+= devel/desktop-file-utils \
misc/shared-mime-info \
x11/gtk+3,-guic
CPPFLAGS+= -I${X11BASE}/include
LDFLAGS+= -L${X11BASE}/lib -L${MODQT5_LIBDIR}
+CONFIGURE_ENV+= LCONVERT="${LOCALBASE}/lib/qt5/bin/lconvert"
.endif

-CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}"

-# XXX does not build with our pugixml (it's too new)
-CONFIGURE_ENV +=ac_cv_header_pugixml_hpp=no
-
-# avoid hidden build dep on gtest
-CONFIGURE_ENV +=ac_cv_lib_gtest_main_main=no
-
-NO_TEST= Yes
+pre-patch:
+ @cd ${WRKSRC}/src/mkvtoolnix-gui/jobs/program_runner/ && \
+ cp linux_program_runner.cpp unix_program_runner.cpp && \
+ cp linux_program_runner.h unix_program_runner.h

do-build:
@cd ${WRKSRC} && \
- env -i ${MAKE_ENV} ${RUBY} ./drake -j${MAKE_JOBS} \
- ${MAKE_FLAGS}
+ env -i ${MAKE_ENV} ${RAKE} -j${MAKE_JOBS} ${MAKE_FLAGS}

do-install:
@cd ${WRKSRC} && \
- env -i ${MAKE_ENV} ${RUBY} ./drake \
- DESTDIR=${WRKINST} install
+ env -i ${MAKE_ENV} ${RAKE} DESTDIR=${WRKINST} install
+
+do-test:
+ @cd ${WRKSRC} && \
+ env -i ${MAKE_ENV} ${RAKE} tests:run_unit

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/multimedia/mkvtoolnix/distinfo,v
retrieving revision 1.37
diff -u -p -u -p -r1.37 distinfo
--- distinfo 31 Dec 2016 08:11:59 -0000 1.37
+++ distinfo 2 Aug 2018 09:04:06 -0000
@@ -1,2 +1,2 @@
-SHA256 (mkvtoolnix-9.7.1.tar.xz) = sriCHi103w92XJf5Pd0dv7Bi88Irlpz6BNG7XLY4qI4=
-SIZE (mkvtoolnix-9.7.1.tar.xz) = 3824684
+SHA256 (mkvtoolnix-25.0.0.tar.xz) = g0y3q92ISdo6aGQFXIIHzqRNFHaBR4MJGM0acjxAvDM=
+SIZE (mkvtoolnix-25.0.0.tar.xz) = 4797476
Index: patches/patch-ac_qt5_m4
===================================================================
RCS file: /cvs/ports/multimedia/mkvtoolnix/patches/patch-ac_qt5_m4,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 patch-ac_qt5_m4
--- patches/patch-ac_qt5_m4 31 Dec 2016 08:11:59 -0000 1.5
+++ patches/patch-ac_qt5_m4 2 Aug 2018 09:04:06 -0000
@@ -2,9 +2,10 @@ $OpenBSD: patch-ac_qt5_m4,v 1.5 2016/12/

Workaround for OpenBSD's pkg-config.

---- ac/qt5.m4.orig Tue Dec 27 17:01:56 2016
-+++ ac/qt5.m4 Fri Dec 30 02:34:26 2016
-@@ -127,25 +127,23 @@ if test x"$enable_qt" = "xyes" -a \
+Index: ac/qt5.m4
+--- ac/qt5.m4.orig
++++ ac/qt5.m4
+@@ -151,20 +151,18 @@ if test x"$enable_qt" = "xyes" -a \
fi

if test $ok = 1 -a "x$with_qt_pkg_config" = xyes; then
@@ -14,8 +15,8 @@ Workaround for OpenBSD's pkg-config.
+ with_qt_pkg_config_modules="$with_qt_pkg_config_modules"
fi

-- with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5Core,Qt5Gui,Qt5Widgets,Qt5Network,Qt5Concurrent"
-+ with_qt_pkg_config_modules="$with_qt_pkg_config_modules Qt5Core Qt5Gui Qt5Widgets Qt5Network Qt5Concurrent"
+- with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5Core,Qt5Gui,Qt5Widgets,Qt5Multimedia,Qt5Network,Qt5Concurrent"
++ with_qt_pkg_config_modules="$with_qt_pkg_config_modules Qt5Core,Qt5Gui,Qt5Widgets,Qt5Multimedia,Qt5Network,Qt5Concurrent"

if test x"$MINGW" = x1; then
- with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5WinExtras"
@@ -24,13 +25,17 @@ Workaround for OpenBSD's pkg-config.

PKG_CHECK_EXISTS([$with_qt_pkg_config_modules],,[ok=0])
- PKG_CHECK_EXISTS([Qt5PlatformSupport],[with_qt_pkg_config_modules="$with_qt_pkg_config_modules,Qt5PlatformSupport"])
+-
+ PKG_CHECK_EXISTS([Qt5PlatformSupport],[with_qt_pkg_config_modules="$with_qt_pkg_config_modules Qt5PlatformSupport"])
-
if test $ok = 0; then
AC_MSG_RESULT(no: not found by pkg-config)
fi
-
-- with_qt_pkg_config_modules="`echo "$with_qt_pkg_config_modules" | sed -e 's/,/ /g'`"
- QT_CFLAGS="`$PKG_CONFIG --cflags $with_qt_pkg_config_modules $QT_PKG_CONFIG_STATIC`"
- QT_LIBS="`$PKG_CONFIG --libs $with_qt_pkg_config_modules $QT_PKG_CONFIG_STATIC`"
+@@ -297,7 +295,7 @@ EOF
+ unset problem
fi
+
+- AC_PATH_PROG(LCONVERT, lconvert)
++ AC_PATH_PROG(LCONVERT, lconvert,, $PATH)
+
+ else
+ echo '*** Not checking for Qt: disabled by user request'
Index: patches/patch-src_common_os_h
===================================================================
RCS file: patches/patch-src_common_os_h
diff -N patches/patch-src_common_os_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_common_os_h 2 Aug 2018 09:04:06 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/common/os.h
+--- src/common/os.h.orig
++++ src/common/os.h
+@@ -26,7 +26,7 @@
+ #else
+ # define COMP_GCC
+ # define SYS_UNIX
+-# if defined(__bsdi__) || defined(__FreeBSD__)
++# if defined(__bsdi__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ # define SYS_BSD
+ # elif defined(__sun) && defined(__SUNPRO_CC)
+ # undef COMP_GCC
Index: patches/patch-src_mkvtoolnix-gui_jobs_program_runner_cpp
===================================================================
RCS file: patches/patch-src_mkvtoolnix-gui_jobs_program_runner_cpp
diff -N patches/patch-src_mkvtoolnix-gui_jobs_program_runner_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_mkvtoolnix-gui_jobs_program_runner_cpp 2 Aug 2018 09:04:06 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: src/mkvtoolnix-gui/jobs/program_runner.cpp
+--- src/mkvtoolnix-gui/jobs/program_runner.cpp.orig
++++ src/mkvtoolnix-gui/jobs/program_runner.cpp
+@@ -15,6 +15,8 @@
+ #include "mkvtoolnix-gui/jobs/program_runner/linux_program_runner.h"
+ #elif defined(SYS_APPLE)
+ #include "mkvtoolnix-gui/jobs/program_runner/macos_program_runner.h"
++#elif defined(SYS_BSD)
++#include "mkvtoolnix-gui/jobs/program_runner/unix_program_runner.h"
+ #elif defined(SYS_WINDOWS)
+ #include "mkvtoolnix-gui/jobs/program_runner/windows_program_runner.h"
+

No comments:

Post a Comment