build system: require cmark when building the GUIs

This commit is contained in:
Moritz Bunkus 2018-01-01 14:31:36 +01:00
parent 26f8fec50c
commit f700dfbd1e
9 changed files with 47 additions and 4 deletions

View File

@ -69,6 +69,11 @@
identifying MPLS files that refer to very short M2TS files caused mkvmerge
to segfault.
## Build system changes
* [cmark](https://github.com/commonmark/cmark), the CommonMark parsing and
rendering library in C, is now required when building the GUIs.
# Version 19.0.0 "Brave Captain" 2017-12-17

View File

@ -111,6 +111,10 @@ built. These include:
toolkit. You need this if you want to use the MKVToolNix GUI or
mkvinfo's GUI.
- [cmark](https://github.com/commonmark/cmark) — the CommonMark
parsing and rendering library in C is required when building the Qt
GUIs.
- [libFLAC](http://downloads.xiph.org/releases/flac/) for FLAC
support (Free Lossless Audio Codec)

View File

@ -125,7 +125,7 @@ def setup_globals
cflags_common += " -fsanitize=undefined" if c?(:UBSAN)
cflags_common += " -fsanitize=address -fno-omit-frame-pointer" if c?(:ADDRSAN)
cflags_common += " -Ilib/libebml -Ilib/libmatroska" if c?(:EBML_MATROSKA_INTERNAL)
cflags_common += " #{c(:MATROSKA_CFLAGS)} #{c(:EBML_CFLAGS)} #{c(:PUGIXML_CFLAGS)} #{c(:EXTRA_CFLAGS)} #{c(:DEBUG_CFLAGS)} #{c(:PROFILING_CFLAGS)} #{c(:USER_CPPFLAGS)}"
cflags_common += " #{c(:MATROSKA_CFLAGS)} #{c(:EBML_CFLAGS)} #{c(:PUGIXML_CFLAGS)} #{c(:CMARK_CFLAGS)} #{c(:EXTRA_CFLAGS)} #{c(:DEBUG_CFLAGS)} #{c(:PROFILING_CFLAGS)} #{c(:USER_CPPFLAGS)}"
cflags_common += " -mno-ms-bitfields -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 " if $building_for[:windows] # 0x0601 = Windows 7/Server 2008 R2
cflags_common += " -march=i686" if $building_for[:windows] && /i686/.match(c(:host))
cflags_common += " -fPIC " if c?(:USE_QT) && !$building_for[:windows]
@ -968,6 +968,12 @@ $common_libs = [
:boost_system,
]
if c?(:USE_QT)
$common_libs += [
:cmark,
]
end
# custom libraries
$custom_libs = [
:static,

25
ac/cmark.m4 Normal file
View File

@ -0,0 +1,25 @@
dnl
dnl Check for cmark
dnl
if test x"$have_qt" = "xyes" ; then
PKG_CHECK_EXISTS([libcmark],[cmark_found=yes],[cmark_found=no])
if test x"$cmark_found" = xyes; then
PKG_CHECK_MODULES([libcmark],[libcmark],[cmark_found=yes])
CMARK_CFLAGS="`pkg-config --cflags libcmark`"
CMARK_LIBS="`pkg-config --libs libcmark`"
fi
if test x"$cmark_found" != xyes; then
AC_MSG_ERROR([Could not find the cmark library])
fi
AC_DEFINE(HAVE_CMARK,,[define if building with cmark])
else
CMARK_CFLAGS=""
CMARK_LIBS=""
fi
AC_SUBST(CMARK_CFLAGS)
AC_SUBST(CMARK_LIBS)

View File

@ -76,6 +76,8 @@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@
BOOST_LDFLAGS = @BOOST_LDFLAGS@
BOOST_REGEX_LIB = @BOOST_REGEX_LIB@
BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@
CMARK_CFLAGS = @CMARK_CFLAGS@
CMARK_LIBS = @CMARK_LIBS@
COMPILER_TYPE = @COMPILER_TYPE@
COMPILER_VERSION = @COMPILER_VERSION@
DEBUG_CFLAGS = @DEBUG_CFLAGS@

View File

@ -33,6 +33,7 @@ m4_include(ac/nlohmann_jsoncpp.m4)
m4_include(ac/utf8cpp.m4)
m4_include(ac/zlib.m4)
m4_include(ac/qt5.m4)
m4_include(ac/cmark.m4)
m4_include(ac/gnurx.m4)
m4_include(ac/magic.m4)
m4_include(ac/ax_boost_base.m4)

View File

@ -13,7 +13,7 @@ Build-Depends:
libboost-regex-dev (>= 1.46), libboost-date-time-dev (>= 1.46),
libboost-system-dev (>= 1.46), qtbase5-dev, qtbase5-dev-tools,
qtmultimedia5-dev,
base-files (<< 9.6) | nlohmann-json-dev (>= 2),
base-files (<< 9.6) | nlohmann-json-dev (>= 2), cmark,
pkg-config, po4a, docbook-xsl, xsltproc,
libgtest-dev

View File

@ -10,7 +10,7 @@ Summary: Tools to create, alter and inspect Matroska files
Source: %{name}-%{version}.tar.xz
Requires: hicolor-icon-theme
BuildRequires: desktop-file-utils, fdupes, file-devel, flac, flac-devel, glibc-devel, libogg-devel, libstdc++-devel, libvorbis-devel, make, pkgconfig, zlib-devel, boost-devel >= 1.46.0, po4a
BuildRequires: desktop-file-utils, fdupes, file-devel, flac, flac-devel, glibc-devel, libogg-devel, libstdc++-devel, libvorbis-devel, make, pkgconfig, zlib-devel, boost-devel >= 1.46.0, cmark-devel, po4a
%if 0%{?centos}
BuildRequires: devtoolset-6-gcc-c++, rubygem-drake

View File

@ -50,7 +50,7 @@ MXE_TARGETS = ${HOST}
MXE_PLUGIN_DIRS += plugins/gcc6
JOBS = ${PARALLEL}
MKVTOOLNIX_DEPENDENCIES=gettext libiconv zlib boost file flac lzo ogg pthreads vorbis
MKVTOOLNIX_DEPENDENCIES=gettext libiconv zlib boost file flac lzo ogg pthreads vorbis cmark
MKVTOOLNIX_DEPENDENCIES+=qtbase qttranslations qtwinextras
mkvtoolnix-deps: \$(MKVTOOLNIX_DEPENDENCIES)