summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-05-22 17:06:11 +0000
committerCarlos Garnacho <carlosg@gnome.org>2021-05-22 17:06:11 +0000
commitfb0394b3070cc1689ed8795434a43d3f7d81f7b4 (patch)
tree2597fa64c4e18381f9b6736824f610e6f9ff0504
parent3ec351c10647626a9ef7190f67b4e3838c9867dc (diff)
parent120edbcdd18c383955beaa2df547863d59b3e3c5 (diff)
downloadlibmediaart-fb0394b3070cc1689ed8795434a43d3f7d81f7b4.tar.gz
Merge branch 'ebassi/no-more-autotools' into 'master'
Remove Autotools See merge request GNOME/libmediaart!12
-rw-r--r--.gitlab-ci.yml7
-rw-r--r--AUTHORS9
-rw-r--r--Makefile.am32
-rw-r--r--Makefile.decl133
-rw-r--r--README0
-rwxr-xr-xautogen.sh16
-rw-r--r--configure.ac370
-rw-r--r--docs/.gitignore (renamed from docs/reference/.gitignore)0
-rw-r--r--docs/Makefile.am13
-rw-r--r--docs/libmediaart-docs.xml70
-rw-r--r--docs/libmediaart-sections.txt (renamed from docs/reference/libmediaart/libmediaart-sections.txt)18
-rw-r--r--docs/meson.build30
-rw-r--r--docs/overview.xml (renamed from docs/reference/libmediaart/overview.sgml)0
-rw-r--r--docs/reference/Makefile.am1
-rw-r--r--docs/reference/libmediaart/Makefile.am58
-rw-r--r--docs/reference/libmediaart/libmediaart-docs.xml41
-rw-r--r--docs/reference/libmediaart/meson.build10
-rw-r--r--docs/version.xml.in (renamed from docs/reference/libmediaart/version.xml.in)0
-rw-r--r--libmediaart.pc.in13
-rw-r--r--libmediaart/Makefile.am118
-rw-r--r--libmediaart/extract.c2
-rw-r--r--libmediaart/extract.h4
-rw-r--r--m4/.gitignore1
-rw-r--r--m4/attributes.m4288
-rw-r--r--m4/local.m4258
-rw-r--r--meson.build3
-rw-r--r--meson_options.txt5
-rwxr-xr-xtap-driver.sh652
-rwxr-xr-xtap-test5
-rw-r--r--tests/Makefile.am21
30 files changed, 122 insertions, 2056 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 530b2ce..8c1b947 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,15 +15,14 @@ stages:
stage: test
script:
- - mkdir build; cd build
- - meson ..
- - ninja
+ - meson setup _build .
+ - meson compile -C _build
- |
# Remove the many "CI_" variables from the environment. Meson dumps the
# whole environment for every failed test, and that gives a whole
# screenful of junk each time unless we strip these.
unset $(env|grep -o '^CI_[^=]*')
- env meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}
+ env meson test -C _build --print-errorlogs ${MESON_TEST_EXTRA_ARGS}
after_script:
- |
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 1e83aa6..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,9 +0,0 @@
-Martyn Russell <martyn at lanedo com>
-Jürg Billeter <juerg.billeter at codethink co uk>
-Philip Van Hoof <philip at codeminded be>
-Carlos Garnacho <carlos at lanedo com>
-Mikael Ottela <mikael.ottela at ixonos com>
-Ivan Frade <ivan.frade at nokia com>
-Jamie McCracken <jamiemcc at gnome org>
-Adrien Bustany <abustany at gnome org>
-Aleksander Morgado <aleksander at lanedo com>
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 4038dc3..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-include $(top_srcdir)/Makefile.decl
-
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
-SUBDIRS = libmediaart docs
-
-if HAVE_UNIT_TESTS
-SUBDIRS += tests
-endif
-
-pkgconfig_DATA = libmediaart-@LIBMEDIAART_API_VERSION@.pc
-pkgconfigdir = $(libdir)/pkgconfig
-
-libmediaart-$(LIBMEDIAART_API_VERSION).pc: libmediaart.pc
- cp $< $@
-
-EXTRA_DIST += \
- meson.build \
- meson_options.txt \
- libmediaart.doap \
- libmediaart.pc.in \
- tap-driver.sh \
- tap-test
-
-CLEANFILES += \
- libmediaart-@LIBMEDIAART_API_VERSION@.pc
-
-DISTCHECK_CONFIGURE_FLAGS = \
- --enable-unit-tests \
- --enable-introspection \
- --enable-gtk-doc
-
diff --git a/Makefile.decl b/Makefile.decl
deleted file mode 100644
index 4fe3577..0000000
--- a/Makefile.decl
+++ /dev/null
@@ -1,133 +0,0 @@
-TESTS_ENVIRONMENT= \
- G_TEST_SRCDIR="$(abs_srcdir)" \
- G_TEST_BUILDDIR="$(abs_builddir)" \
- G_DEBUG=gc-friendly \
- MALLOC_CHECK_=2 \
- MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
-LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
-LOG_COMPILER = $(top_srcdir)/tap-test
-
-NULL =
-
-# initialize variables for unconditional += appending
-BUILT_SOURCES =
-BUILT_EXTRA_DIST =
-CLEANFILES = *.log *.trs
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-EXTRA_DIST =
-TESTS =
-
-installed_test_LTLIBRARIES =
-installed_test_PROGRAMS =
-installed_test_SCRIPTS =
-nobase_installed_test_DATA =
-
-noinst_LTLIBRARIES =
-noinst_PROGRAMS =
-noinst_SCRIPTS =
-noinst_DATA =
-
-check_LTLIBRARIES =
-check_PROGRAMS =
-check_SCRIPTS =
-check_DATA =
-
-# We support a fairly large range of possible variables. It is expected that all types of files in a test suite
-# will belong in exactly one of the following variables.
-#
-# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
-#
-# test_programs, test_scripts, test_data, test_ltlibraries
-#
-# The above are used to list files that are involved in both uninstalled and installed testing. The
-# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
-# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is
-# installed in the same way as it appears in the package layout.
-#
-# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
-# like so:
-#
-# installed_test_programs, uninstalled_test_programs
-# installed_test_scripts, uninstalled_test_scripts
-# installed_test_data, uninstalled_test_data
-# installed_test_ltlibraries, uninstalled_test_ltlibraries
-#
-# Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts
-# that should not themselves be run as testcases (but exist to be used from other testcases):
-#
-# test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
-# test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
-#
-# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data
-# file automatically end up in the tarball.
-#
-# dist_test_scripts, dist_test_data, dist_test_extra_scripts
-# dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
-# dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
-#
-# Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the
-# standard automake convention of not disting programs scripts or data by default.
-#
-# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted
-# variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under
-# gtester. That's a bit strange for scripts, but it's possible.
-
-TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
- $(dist_test_scripts) $(dist_uninstalled_test_scripts)
-
-# Note: build even the installed-only targets during 'make check' to ensure that they still work.
-# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
-# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
-# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
-all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
- $(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs)
-all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
- $(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts)
-all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \
- $(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts)
-all_test_scripts += $(all_dist_test_scripts)
-EXTRA_DIST += $(all_dist_test_scripts)
-all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data)
-all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
-all_test_data += $(all_dist_test_data)
-EXTRA_DIST += $(all_dist_test_data)
-all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
-
-if ENABLE_ALWAYS_BUILD_TESTS
-noinst_LTLIBRARIES += $(all_test_ltlibs)
-noinst_PROGRAMS += $(all_test_programs)
-noinst_SCRIPTS += $(all_test_scripts)
-noinst_DATA += $(all_test_data)
-else
-check_LTLIBRARIES += $(all_test_ltlibs)
-check_PROGRAMS += $(all_test_programs)
-check_SCRIPTS += $(all_test_scripts)
-check_DATA += $(all_test_data)
-endif
-
-if ENABLE_INSTALLED_TESTS
-installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
- $(test_extra_programs) $(installed_test_extra_programs)
-installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
- $(test_extra_scripts) $(test_installed_extra_scripts)
-installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
- $(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
-nobase_installed_test_DATA += $(test_data) $(installed_test_data)
-nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
-installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
-installed_testcases = $(test_programs) $(installed_test_programs) \
- $(test_scripts) $(installed_test_scripts) \
- $(dist_test_scripts) $(dist_installed_test_scripts)
-
-installed_test_meta_DATA = $(installed_testcases:=.test)
-
-%.test: %$(EXEEXT) Makefile
- $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
- echo 'Type=session' >> $@.tmp; \
- echo 'Exec=$(installed_testdir)/$(notdir $<) --tap' >> $@.tmp; \
- echo 'Output=TAP' >> $@.tmp; \
- mv $@.tmp $@)
-
-CLEANFILES += $(installed_test_meta_DATA)
-endif
diff --git a/README b/README
deleted file mode 100644
index e69de29..0000000
--- a/README
+++ /dev/null
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 3084729..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-# Generate required files
-test -n "$srcdir" || srcdir=`dirname "$0"`
-test -n "$srcdir" || srcdir=.
-(
- cd "$srcdir" &&
- touch ChangeLog && # Required by automake.
- (test -d m4 || mkdir m4) && # Required by gtkdocize
- gtkdocize &&
- autoreconf --verbose --force --install
-) || exit
-
-# Run configure
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 01dfbfb..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,370 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-# This file is part of Libmediaart.
-
-AC_PREREQ([2.64])
-
-# Making releases:
-# LIBMEDIAART_MICRO_VERSION += 1;
-# LIBMEDIAART_INTERFACE_AGE += 1;
-# LIBMEDIAART_BINARY_AGE += 1;
-# if any functions have been added, set LIBMEDIAART_INTERFACE_AGE to 0.
-# if backwards compatibility has been broken,
-# set LIBMEDIAART_BINARY_AGE and LIBMEDIAART_INTERFACE_AGE to 0.
-m4_define([libmediaart_major_version], [1])
-m4_define([libmediaart_minor_version], [9])
-m4_define([libmediaart_micro_version], [4])
-m4_define([libmediaart_interface_age], [0])
-m4_define([libmediaart_binary_age],
- [m4_eval(100 * libmediaart_minor_version + libmediaart_micro_version)])
-m4_define([libmediaart_version],
- [libmediaart_major_version.libmediaart_minor_version.libmediaart_micro_version])
-# This is the X.Y used in -lliblibmediaart-FOO-X.Y
-m4_define([libmediaart_api_version], [2.0])
-
-# libtool version related macros
-m4_define([libmediaart_lt_release], [libmediaart_major_version.libmediaart_minor_version])
-m4_define([libmediaart_lt_current],
- [m4_eval(100 * libmediaart_minor_version + libmediaart_micro_version - libmediaart_interface_age)])
-m4_define([libmediaart_lt_revision], [libmediaart_interface_age])
-m4_define([libmediaart_lt_age], [m4_eval(libmediaart_binary_age - libmediaart_interface_age)])
-m4_define([libmediaart_lt_current_minus_age],
- [m4_eval(libmediaart_lt_current - libmediaart_lt_age)])
-
-# Define a string for the earliest version that this release has
-# backwards binary compatibility with for all interfaces a module
-# might. Unless we add module-only API with lower stability
-# guarantees, this should be unchanged until we break binary compat
-# for Libmediaart.
-#
-# LIBMEDIAART_BINARY_VERSION=$LIBMEDIAART_MAJOR_VERSION.$LIBMEDIAART_MINOR_VERSION.$LT_CURRENT
-m4_define([libmediaart_binary_version], [2.0.0])
-
-AC_INIT([libmediaart],
- [libmediaart_version],
- [http://bugzilla.gnome.org/],
- [libmediaart],
- [https://wiki.gnome.org/MediaArtStorageSpec])
-
-AC_CONFIG_SRCDIR([libmediaart/mediaart.h])
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADERS([config.h])
-
-AM_INIT_AUTOMAKE([1.11 no-define tar-ustar -Wno-portability])
-
-AM_SILENT_RULES([yes])
-
-LIBMEDIAART_MAJOR_VERSION=libmediaart_major_version
-LIBMEDIAART_MINOR_VERSION=libmediaart_minor_version
-LIBMEDIAART_MICRO_VERSION=libmediaart_micro_version
-LIBMEDIAART_INTERFACE_AGE=libmediaart_interface_age
-LIBMEDIAART_BINARY_AGE=libmediaart_binary_age
-LIBMEDIAART_VERSION=libmediaart_version
-LIBMEDIAART_API_VERSION=libmediaart_api_version
-LIBMEDIAART_BINARY_VERSION=libmediaart_binary_version
-
-AC_SUBST(LIBMEDIAART_MAJOR_VERSION)
-AC_SUBST(LIBMEDIAART_MINOR_VERSION)
-AC_SUBST(LIBMEDIAART_MICRO_VERSION)
-AC_SUBST(LIBMEDIAART_INTERFACE_AGE)
-AC_SUBST(LIBMEDIAART_BINARY_AGE)
-AC_SUBST(LIBMEDIAART_API_VERSION)
-AC_SUBST(LIBMEDIAART_VERSION)
-AC_SUBST(LIBMEDIAART_BINARY_VERSION)
-AC_SUBST(LIBMEDIAART_API_VERSION_U,[AS_TR_SH([$LIBMEDIAART_API_VERSION])])
-
-AC_DEFINE(LIBMEDIAART_MAJOR_VERSION, [libmediaart_major_version],
- [Define to the Libmediaart major version])
-AC_DEFINE(LIBMEDIAART_MINOR_VERSION, [libmediaart_minor_version],
- [Define to the Libmediaart minor version])
-AC_DEFINE(LIBMEDIAART_MICRO_VERSION, [libmediaart_micro_version],
- [Define to the Libmediaart micro version])
-AC_DEFINE(LIBMEDIAART_INTERFACE_AGE, [libmediaart_interface_age],
- [Define to the Libmediaart interface age])
-AC_DEFINE(LIBMEDIAART_BINARY_AGE, [libmediaart_binary_age],
- [Define to the Libmediaart binary age])
-
-# libtool versioning
-LT_RELEASE=libmediaart_lt_release
-LT_CURRENT=libmediaart_lt_current
-LT_REVISION=libmediaart_lt_revision
-LT_AGE=libmediaart_lt_age
-LT_CURRENT_MINUS_AGE=libmediaart_lt_current_minus_age
-AC_SUBST(LT_RELEASE)
-AC_SUBST(LT_CURRENT)
-AC_SUBST(LT_REVISION)
-AC_SUBST(LT_AGE)
-AC_SUBST(LT_CURRENT_MINUS_AGE)
-
-IDT_COMPILE_WARNINGS
-
-# Initialize libtool
-LT_PREREQ([2.2])
-LT_INIT([disable-static])
-
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_AWK
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-AC_PROG_RANLIB
-AC_PROG_MKDIR_P
-AC_PROG_YACC
-
-# Checks for libraries.
-
-# Checks for header files.
-AC_CHECK_HEADERS([stdlib.h string.h utime.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_INLINE
-AC_TYPE_SIZE_T
-
-# Checks for library functions.
-AC_CHECK_FUNCS([setenv strstr utime])
-
-CFLAGS="$CFLAGS"
-
-GLIB_TESTS
-
-# Library required versions
-GLIB_REQUIRED=2.38.0
-GDKPIXBUF_REQUIRED=2.12.0
-QT5_REQUIRED=5.0.0
-
-# Check requirements for libmediaart
-LIBMEDIAART_REQUIRED="glib-2.0 >= $GLIB_REQUIRED
- gio-2.0 >= $GLIB_REQUIRED
- gio-unix-2.0 >= $GLIB_REQUIRED"
-PKG_CHECK_MODULES(LIBMEDIAART, [$LIBMEDIAART_REQUIRED])
-
-GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
-AC_SUBST(GLIB_GENMARSHAL)
-
-GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
-AC_SUBST(GLIB_PREFIX)
-
-####################################################################
-# General CFLAGS/LIBS
-####################################################################
-BUILD_CFLAGS="${WARN_CFLAGS} -DG_LOG_DOMAIN=\\\"libmediaart\\\" -DLIBMEDIAART_COMPILATION"
-BUILD_LIBS="${GCOV_LIBS}"
-
-AC_SUBST(BUILD_VALAFLAGS)
-AC_SUBST(BUILD_CFLAGS)
-AC_SUBST(BUILD_LIBS)
-
-####################################################################
-# Check for gtk-doc and docbook-tools
-####################################################################
-
-# Check for GTK_DOC_CHECK availability. The GTK_DOC_CHECK invocation
-# must be on its own line, gtkdocize relies on it
-m4_ifdef([GTK_DOC_CHECK], [
-GTK_DOC_CHECK([1.8])
-
-# NOTE: We need to use a separate automake conditional for this
-# to make this work with the tarballs.
-AM_CONDITIONAL([ENABLE_GTK_DOC], test "x$enable_gtk_doc" = xyes)
-],
-[
-AM_CONDITIONAL([ENABLE_GTK_DOC], false)
-])
-
-####################################################################
-# Build introspectable bindings
-####################################################################
-
-GOBJECT_INTROSPECTION_CHECK([1.30.0])
-
-m4_ifdef([VAPIGEN_CHECK], [
-# Vala bindings
-VAPIGEN_CHECK([0.16])
-],
-[
-AM_CONDITIONAL([ENABLE_VAPIGEN], false)
-])
-
-##################################################################
-# Check for GdkPixbuf for MP3 album art
-##################################################################
-
-AC_ARG_ENABLE(gdkpixbuf,
- AS_HELP_STRING([--enable-gdkpixbuf],
- [enable GdkPixbuf support, (MP3 album art) [[default=auto]]]),,
- [enable_gdkpixbuf=auto])
-
-##################################################################
-# Check for libmediaart-extract: Qt for MP3 album art
-##################################################################
-
-AC_ARG_ENABLE(qt,
- AS_HELP_STRING([--enable-qt],
- [enable Qt support, (MP3 album art) [[default=auto]]]),,
- [enable_qt=auto])
-
-AC_ARG_WITH(qt-version,
- AS_HELP_STRING([--with-qt-version=major],
- [Force specific Qt version [[default=auto]]]),,
- [with_qt_version=auto])
-
-selected_for_media_art="no (disabled)"
-
-##################################################################
-# Choose between backends (GdkPixbuf/Qt/etc)
-##################################################################
-
-if test "x$enable_qt" == "xyes" && test "x$enable_gdkpixbuf" == "xyes"; then
- AC_MSG_ERROR([Can not enable both Qt and GdkPixbuf backends, please pick one])
-fi
-
-if test "x$enable_qt" != "xno" && test "x$enable_gdkpixbuf" != "xyes"; then
- if test "x$with_qt_version" == "xauto" || test "x$with_qt_version" == "x5"; then
- PKG_CHECK_MODULES(QT5,
- [Qt5Gui >= $QT5_REQUIRED],
- [have_qt5=yes],
- [have_qt5=no])
- fi
-
- if test "x$have_qt5" = "xyes"; then
- BACKEND_CFLAGS="$QT5_CFLAGS -fPIC"
- BACKEND_LIBS="$QT5_LIBS"
-
- AC_DEFINE(HAVE_QT5, [], [Define if we have Qt5])
- LIBMEDIAART_BACKEND=Qt5Gui
-
- selected_for_media_art="yes (qt5)"
- fi
-else
- have_qt5="no (disabled)"
-fi
-
-if test "x$enable_qt" = "xyes"; then
- if test "x$have_qt5" != "xyes"; then
- AC_MSG_ERROR([Couldn't find Qt5 >= $QT5_REQUIRED.])
- fi
-fi
-
-AM_CONDITIONAL(HAVE_QT, test "x$have_qt5" = "xyes")
-
-if test "x$enable_gdkpixbuf" != "xno" && test "x$enable_qt" != "xyes"; then
- PKG_CHECK_MODULES(GDKPIXBUF,
- [gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED],
- [have_gdkpixbuf=yes],
- [have_gdkpixbuf=no])
-
- BACKEND_CFLAGS="$GDKPIXBUF_CFLAGS"
- BACKEND_LIBS="$GDKPIXBUF_LIBS"
-
- if test "x$have_gdkpixbuf" = "xyes"; then
- AC_DEFINE(HAVE_GDKPIXBUF, [], [Define if we have GdkPixbuf])
- LIBMEDIAART_BACKEND=gdk-pixbuf-2.0
- selected_for_media_art="yes (GdkPixbuf)"
- fi
-else
- have_gdkpixbuf="no (disabled)"
-fi
-
-if test "x$enable_gdkpixbuf" = "xyes"; then
- if test "x$have_gdkpixbuf" != "xyes"; then
- AC_MSG_ERROR([Couldn't find GdkPixbuf >= $GDKPIXBUF_REQUIRED.])
- fi
-fi
-
-AM_CONDITIONAL(HAVE_GDKPIXBUF, test "x$have_gdkpixbuf" = "xyes")
-
-LIBMEDIAART_CFLAGS="$LIBMEDIAART_CFLAGS $BACKEND_CFLAGS"
-LIBMEDIAART_LIBS="$LIBMEDIAART_LIBS $BACKEND_LIBS"
-AC_SUBST(LIBMEDIAART_BACKEND)
-
-####################################################################
-# Should we build GLib based unit tests
-####################################################################
-
-AC_ARG_ENABLE(unit_tests,
- AS_HELP_STRING([--enable-unit-tests],
- [enable unit tests [[default=yes]]]), ,
- [enable_unit_tests=yes])
-
-if test "x$enable_unit_tests" != "xno" ; then
- have_unit_tests=yes
-
- AC_DEFINE(HAVE_UNIT_TEST, 1, [Define if we have GLib unit test framework])
-
- AC_PATH_PROG(gtester, gtester)
- if test -z $gtester; then
- AC_MSG_ERROR([Could not find 'gtester'])
- fi
-else
- have_unit_tests=no
-fi
-
-AM_CONDITIONAL(HAVE_UNIT_TESTS, test "x$have_unit_tests" = "xyes")
-
-dnl *********************************************************************
-dnl * Check for -fvisibility=hidden to determine if we can do GNU-style *
-dnl * visibility attributes for symbol export control *
-dnl *********************************************************************
-
-LIBMEDIAART_HIDDEN_VISIBILITY_CFLAGS=""
-case "$host" in
- *-*-mingw*)
- dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport)
- AC_DEFINE([_LIBMEDIAART_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern],
- [defines how to decorate public symbols while building])
- CFLAGS="${CFLAGS} -fvisibility=hidden"
- ;;
- *)
- dnl on other compilers, check if we can do -fvisibility=hidden
- SAVED_CFLAGS="${CFLAGS}"
- CFLAGS="-fvisibility=hidden"
- AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
- AC_TRY_COMPILE([], [return 0],
- AC_MSG_RESULT(yes)
- enable_fvisibility_hidden=yes,
- AC_MSG_RESULT(no)
- enable_fvisibility_hidden=no)
- CFLAGS="${SAVED_CFLAGS}"
-
- AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [
- AC_DEFINE([_LIBMEDIAART_EXTERN], [__attribute__((visibility("default"))) extern],
- [defines how to decorate public symbols while building])
- LIBMEDIAART_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
- ])
- ;;
-esac
-AC_SUBST(LIBMEDIAART_HIDDEN_VISIBILITY_CFLAGS)
-
-##################################################################
-# Write generated files
-##################################################################
-
-AC_CONFIG_FILES([
- Makefile
- libmediaart.pc
- libmediaart/Makefile
- tests/Makefile
- docs/Makefile
- docs/reference/Makefile
- docs/reference/libmediaart/Makefile
- docs/reference/libmediaart/version.xml
-])
-
-AC_OUTPUT
-
-echo "
-Build Configuration:
-
- Prefix: ${prefix}
- Source code location: ${srcdir}
- Compiler: ${CC}
- Compiler Warnings: $enable_compile_warnings
-
- Enable unit tests: $have_unit_tests
- Enable documentation: $enable_gtk_doc
-
- Support media art processing: $selected_for_media_art
-"
diff --git a/docs/reference/.gitignore b/docs/.gitignore
index 74a1b09..74a1b09 100644
--- a/docs/reference/.gitignore
+++ b/docs/.gitignore
diff --git a/docs/Makefile.am b/docs/Makefile.am
deleted file mode 100644
index b407dcb..0000000
--- a/docs/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-SUBDIRS = reference
-
-# require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtk-doc:
-else
-dist-check-gtk-doc:
- @echo "*** gtk-doc must be enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtk-doc
diff --git a/docs/libmediaart-docs.xml b/docs/libmediaart-docs.xml
new file mode 100644
index 0000000..4e3c17b
--- /dev/null
+++ b/docs/libmediaart-docs.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+<!ENTITY version SYSTEM "version.xml">
+]>
+<book id="index">
+ <bookinfo>
+ <title>libmediaart Library Reference Manual</title>
+ <releaseinfo>
+ for libmediaart &version;.
+ The latest version of this documentation can be found on-line at
+ <ulink role="online-location" url="http://library.gnome.org/devel/libmediaart/unstable/">
+ http://library.gnome.org/devel/libmediaart/unstable
+ </ulink>.
+ </releaseinfo>
+ </bookinfo>
+
+ <!-- The Library Overview -->
+ <xi:include href="overview.xml"/>
+
+ <!-- The API Reference -->
+ <part id="libmediaart-reference">
+ <title>Reference</title>
+ <partintro>
+ <para>
+ This section provides the detailed API of the libmediaart library.
+ </para>
+ </partintro>
+
+ <chapter>
+ <title>Reference</title>
+ <xi:include href="xml/extract.xml"/>
+ <xi:include href="xml/cache.xml"/>
+ <xi:include href="xml/plugins.xml"/>
+ </chapter>
+
+ </part>
+
+ <index id="api-index-full">
+ <title>Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="api-index-deprecated" role="deprecated">
+ <title>Index of deprecated symbols</title>
+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="api-index-0-1" role="0.1">
+ <title>Index of new symbols in 0.1</title>
+ <xi:include href="xml/api-index-0.1.0.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="api-index-0-2" role="0.2">
+ <title>Index of new symbols in 0.2</title>
+ <xi:include href="xml/api-index-0.2.0.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="api-index-0-3" role="0.3">
+ <title>Index of new symbols in 0.3</title>
+ <xi:include href="xml/api-index-0.3.0.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="api-index-0-5" role="0.5">
+ <title>Index of new symbols in 0.5</title>
+ <xi:include href="xml/api-index-0.5.0.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="api-index-0-7" role="0.7">
+ <title>Index of new symbols in 0.7</title>
+ <xi:include href="xml/api-index-0.7.0.xml"><xi:fallback /></xi:include>
+ </index>
+
+ <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/docs/reference/libmediaart/libmediaart-sections.txt b/docs/libmediaart-sections.txt
index 1de8fe7..db9d7cc 100644
--- a/docs/reference/libmediaart/libmediaart-sections.txt
+++ b/docs/libmediaart-sections.txt
@@ -16,12 +16,17 @@ MediaArtError
MediaArtProcessFlags
MediaArtProcess
MediaArtProcessClass
-media_art_error_quark
-media_art_process_get_type
media_art_process_new
media_art_process_uri
+media_art_process_uri_async
+media_art_process_uri_finish
media_art_process_file
+media_art_process_file_async
+media_art_process_file_finish
media_art_process_buffer
+media_art_process_buffer_async
+media_art_process_buffer_finish
+media_art_error_quark
<SUBSECTION Standard>
MEDIA_ART_IS_PROCESS
MEDIA_ART_IS_PROCESS_CLASS
@@ -29,6 +34,8 @@ MEDIA_ART_PROCESS
MEDIA_ART_PROCESS_CLASS
MEDIA_ART_PROCESS_GET_CLASS
MEDIA_ART_TYPE_PROCESS
+<SUBSECTION Private>
+media_art_process_get_type
</SECTION>
<SECTION>
@@ -38,10 +45,3 @@ media_art_plugin_shutdown
media_art_file_to_jpeg
media_art_buffer_to_jpeg
</SECTION>
-
-<SECTION>
-<FILE>marshal</FILE>
-media_art_marshal_VOID__STRING_STRING
-media_art_marshal_VOID__STRING_STRING_STRING_BOOLEAN_BOOLEAN
-</SECTION>
-
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..2b6cf36
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,30 @@
+if get_option('gtk_doc')
+ version_xml = configure_file(input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: conf)
+
+ ignored_headers = [
+ 'marshal.h',
+ ]
+
+ ignored_decorators = [
+ '_LIBMEDIAART_EXTERN',
+ ]
+
+ gnome.gtkdoc('libmediaart',
+ namespace: 'media_art',
+ src_dir: include_directories('../libmediaart'),
+ main_xml: 'libmediaart-docs.xml',
+ ignore_headers: ignored_headers,
+ scan_args: [
+ '--rebuild-types',
+ '--ignore-decorators=' + '|'.join(ignored_decorators),
+ ],
+ mkdb_args: [
+ '--default-include=libmediaart/mediaart.h',
+ ],
+ content_files: ['overview.xml'],
+ dependencies: libmediaart_dep,
+ install: true,
+ check: true)
+endif
diff --git a/docs/reference/libmediaart/overview.sgml b/docs/overview.xml
index 80dad6e..80dad6e 100644
--- a/docs/reference/libmediaart/overview.sgml
+++ b/docs/overview.xml
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
deleted file mode 100644
index a2fe813..0000000
--- a/docs/reference/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = libmediaart
diff --git a/docs/reference/libmediaart/Makefile.am b/docs/reference/libmediaart/Makefile.am
deleted file mode 100644
index 0b8db7b..0000000
--- a/docs/reference/libmediaart/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-AUTOMAKE_OPTIONS = 1.6
-
-# The name of the module.
-DOC_MODULE=libmediaart
-
-# The top-level SGML file.
-DOC_MAIN_SGML_FILE=libmediaart-docs.xml
-
-# Extra options to supply to gtkdoc-scan
-SCAN_OPTIONS=
-
-# Extra options to pass to gtkdoc-scangobj
-# SCANGOBJ_OPTIONS=--type-init-func="gtk_type_init(0)"
-
-# The directory containing the source code. Relative to $(srcdir)
-DOC_SOURCE_DIR=$(top_srcdir)/libmediaart
-
-# Used for dependencies
-HFILE_GLOB=$(top_srcdir)/libmediaart/*.h
-CFILE_GLOB=$(top_srcdir)/libmediaart/*.c
-
-# Header files to ignore when scanning
-IGNORE_HFILES=$(top_srcdir)/libmediaart/storage.h
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed
-# if $(DOC_MODULE).types is non-empty.
-AM_CPPFLAGS = \
- -DMEDIAART_COMPILATION \
- $(LIBMEDIAART_CFLAGS)
-
-GTKDOC_LIBS = \
- $(top_builddir)/src/libmediaart/libmediaart-@MEDIAART_API_VERSION@.la \
- $(LIBMEDIAART_LIBS)
-
-# Extra options to supply to gtkdoc-mkdb
-MKDB_OPTIONS=--sgml-mode --output-format=xml
-
-# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS=--path="$(abs_builddir)"
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
-content_files = version.xml overview.sgml
-
-expand_content_files =
-
-# Images to copy into HTML directory
-HTML_IMAGES =
-
-# Extra options to supply to gtkdoc-fixref
-FIXXREF_OPTIONS=\
- --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \
- --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib \
- --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gio
-
-include $(top_srcdir)/gtk-doc.make
-
-# Other files to distribute
-EXTRA_DIST += version.xml.in meson.build
diff --git a/docs/reference/libmediaart/libmediaart-docs.xml b/docs/reference/libmediaart/libmediaart-docs.xml
deleted file mode 100644
index 38a5021..0000000
--- a/docs/reference/libmediaart/libmediaart-docs.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "version.xml">
-]>
-<book id="index">
- <bookinfo>
- <title>libmediaart Library Reference Manual</title>
- <releaseinfo>
- for libmediaart &version;.
- The latest version of this documentation can be found on-line at
- <ulink role="online-location" url="http://library.gnome.org/devel/libmediaart/unstable/">
- http://library.gnome.org/devel/libmediaart/unstable
- </ulink>.
- </releaseinfo>
- </bookinfo>
-
- <!-- The Library Overview -->
- <xi:include href="overview.sgml"/>
-
- <!-- The API Reference -->
- <part id="libmediaart-reference">
- <title>Reference</title>
- <partintro>
- <para>
- This section provides the detailed API of the libmediaart library.
- </para>
- </partintro>
-
- <chapter>
- <title>Reference</title>
- <xi:include href="xml/extract.xml"/>
- <xi:include href="xml/cache.xml"/>
- <xi:include href="xml/plugins.xml"/>
- </chapter>
-
- </part>
-
- <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
-</book>
diff --git a/docs/reference/libmediaart/meson.build b/docs/reference/libmediaart/meson.build
deleted file mode 100644
index 601ea43..0000000
--- a/docs/reference/libmediaart/meson.build
+++ /dev/null
@@ -1,10 +0,0 @@
-if get_option('with-docs') != 'no'
- version_xml = configure_file(input: 'version.xml.in',
- output: 'version.xml',
- configuration: conf)
-
- gnome.gtkdoc('libmediaart',
- src_dir: 'libmediaart',
- main_xml: 'libmediaart-docs.xml',
- install: true)
-endif
diff --git a/docs/reference/libmediaart/version.xml.in b/docs/version.xml.in
index 34b3385..34b3385 100644
--- a/docs/reference/libmediaart/version.xml.in
+++ b/docs/version.xml.in
diff --git a/libmediaart.pc.in b/libmediaart.pc.in
deleted file mode 100644
index bd111e9..0000000
--- a/libmediaart.pc.in
+++ /dev/null
@@ -1,13 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libmediaart-@LIBMEDIAART_API_VERSION@
-Description: libmediaart - Media art extraction and cache management library
-Version: @VERSION@
-Libs: -L${libdir} -lmediaart-@LIBMEDIAART_API_VERSION@
-Libs.Private: -lz -lm
-Cflags: -I${includedir}/libmediaart-@LIBMEDIAART_API_VERSION@
-Requires: glib-2.0
-Requires.Private: @LIBMEDIAART_BACKEND@
diff --git a/libmediaart/Makefile.am b/libmediaart/Makefile.am
deleted file mode 100644
index 42a270b..0000000
--- a/libmediaart/Makefile.am
+++ /dev/null
@@ -1,118 +0,0 @@
-AM_CPPFLAGS = \
- $(BUILD_CFLAGS) \
- $(LIBMEDIAART_CFLAGS) \
- $(LIBMEDIAART_HIDDEN_VISIBILITY_CFLAGS)
-
-
-#
-# Binaries
-#
-lib_LTLIBRARIES = libmediaart-@LIBMEDIAART_API_VERSION@.la
-
-libmediaartdir = $(libdir)/libmediaart-$(LIBMEDIAART_API_VERSION)/
-libmediaartincludedir=$(includedir)/libmediaart-$(LIBMEDIAART_API_VERSION)/libmediaart/
-
-libmediaart_marshal_sources = \
- marshal.c \
- marshal.h
-
-libmediaart_sources = \
- cache.c \
- cache.h \
- extract.c \
- extract.h \
- extractgeneric.h
-
-libmediaartinclude_HEADERS = \
- mediaart.h \
- mediaart-macros.h \
- cache.h \
- extract.h \
- extractgeneric.h
-
-libmediaart_@LIBMEDIAART_API_VERSION@_la_DEPENDENCIES = $(libmediaart_marshal_sources)
-
-libmediaart_@LIBMEDIAART_API_VERSION@_la_SOURCES = \
- $(libmediaart_marshal_sources) \
- $(libmediaart_sources)
-
-if HAVE_GDKPIXBUF
-libmediaart_@LIBMEDIAART_API_VERSION@_la_SOURCES += extractpixbuf.c
-libmediaart_@LIBMEDIAART_API_VERSION@_la_LINK = $(LINK) $(libmediaart_@LIBMEDIAART_API_VERSION@_la_LDFLAGS)
-else
-if HAVE_QT
-libmediaart_@LIBMEDIAART_API_VERSION@_la_SOURCES += extractqt.cpp
-libmediaart_@LIBMEDIAART_API_VERSION@_la_LINK = $(CXXLINK) $(libmediaart_@LIBMEDIAART_API_VERSION@_la_LDFLAGS)
-else
-libmediaart_@LIBMEDIAART_API_VERSION@_la_SOURCES += extractdummy.c
-libmediaart_@LIBMEDIAART_API_VERSION@_la_LINK = $(LINK) $(libmediaart_@LIBMEDIAART_API_VERSION@_la_LDFLAGS)
-endif
-endif
-
-libmediaart_@LIBMEDIAART_API_VERSION@_la_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-
-libmediaart_@LIBMEDIAART_API_VERSION@_la_LIBADD = \
- $(BUILD_LIBS) \
- $(LIBMEDIAART_LIBS)
-
-
-marshal.h: marshal.list
- $(AM_V_GEN)$(GLIB_GENMARSHAL) $< --prefix=media_art_marshal --header > $@
-
-marshal.c: marshal.list marshal.h
- $(AM_V_GEN)(echo "#include \"marshal.h\""; \
- $(GLIB_GENMARSHAL) $< --prefix=media_art_marshal --body) > $@
-
-
-BUILT_SOURCES = \
- $(libmediaart_marshal_sources)
-
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- meson.build \
- marshal.list
-
-
--include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=media_art
-INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-
-if HAVE_INTROSPECTION
-introspection_sources = $(libmediaart_sources) extractdummy.c
-
-MediaArt-@LIBMEDIAART_API_VERSION@.gir: libmediaart-@LIBMEDIAART_API_VERSION@.la
-MediaArt_@LIBMEDIAART_API_VERSION_U@_gir_INCLUDES = GObject-2.0 Gio-2.0
-MediaArt_@LIBMEDIAART_API_VERSION_U@_gir_CFLAGS = $(INCLUDES) -DLIBMEDIAART_COMPILATION
-MediaArt_@LIBMEDIAART_API_VERSION_U@_gir_LIBS = libmediaart-@LIBMEDIAART_API_VERSION@.la
-MediaArt_@LIBMEDIAART_API_VERSION_U@_gir_SCANNERFLAGS = --c-include=libmediaart/mediaart.h
-MediaArt_@LIBMEDIAART_API_VERSION_U@_gir_FILES = $(introspection_sources)
-INTROSPECTION_GIRS += MediaArt-@LIBMEDIAART_API_VERSION@.gir
-
-girdir = $(datadir)/gir-1.0
-gir_DATA = $(INTROSPECTION_GIRS)
-
-typelibdir = $(libdir)/girepository-1.0
-typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-
-BUILT_SOURCES += $(gir_DATA) $(typelib_DATA)
-endif
-
-if ENABLE_VAPIGEN
--include $(VAPIGEN_MAKEFILE)
-
-libmediaart-@LIBMEDIAART_API_VERSION@.vapi: MediaArt-@LIBMEDIAART_API_VERSION@.gir
-
-VAPIGEN_VAPIS = libmediaart-@LIBMEDIAART_API_VERSION@.vapi
-
-libmediaart_@LIBMEDIAART_API_VERSION_U@_vapi_METADATADIRS = $(srcdir)
-libmediaart_@LIBMEDIAART_API_VERSION_U@_vapi_DEPS = gio-2.0
-libmediaart_@LIBMEDIAART_API_VERSION_U@_vapi_FILES = MediaArt-@LIBMEDIAART_API_VERSION@.gir
-
-vapidir = $(datadir)/vala/vapi
-vapi_DATA = $(VAPIGEN_VAPIS)
-
-BUILT_SOURCES += $(vapi_DATA)
-endif
diff --git a/libmediaart/extract.c b/libmediaart/extract.c
index e188931..4694f63 100644
--- a/libmediaart/extract.c
+++ b/libmediaart/extract.c
@@ -1258,6 +1258,8 @@ media_art_set (const unsigned char *buffer,
/**
* media_art_error_quark:
*
+ * The error domain for #MediaArtError.
+ *
* Returns: the #GQuark used to identify media art errors in
* GError structures.
*
diff --git a/libmediaart/extract.h b/libmediaart/extract.h
index 460015d..6216276 100644
--- a/libmediaart/extract.h
+++ b/libmediaart/extract.h
@@ -106,21 +106,21 @@ typedef struct _MediaArtProcessClass MediaArtProcessClass;
/**
* MediaArtProcess:
- * @parent: parent object
*
* A class implementation for processing and extracting media art.
**/
struct _MediaArtProcess {
+ /*< private >*/
GObject parent;
};
/**
* MediaArtProcessClass:
- * @parent: parent object class
*
* Prototype for the class.
**/
struct _MediaArtProcessClass {
+ /*< private >*/
GObjectClass parent;
};
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index 0f4126c..0000000
--- a/m4/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.m4
diff --git a/m4/attributes.m4 b/m4/attributes.m4
deleted file mode 100644
index aa53ef2..0000000
--- a/m4/attributes.m4
+++ /dev/null
@@ -1,288 +0,0 @@
-dnl Macros to check the presence of generic (non-typed) symbols.
-dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes@gmail.com>
-dnl Copyright (c) 2006-2008 xine project
-dnl Copyright (c) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2, or (at your option)
-dnl any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-dnl 02110-1301, USA.
-dnl
-dnl As a special exception, the copyright owners of the
-dnl macro gives unlimited permission to copy, distribute and modify the
-dnl configure scripts that are the output of Autoconf when processing the
-dnl Macro. You need not follow the terms of the GNU General Public
-dnl License when using or distributing such scripts, even though portions
-dnl of the text of the Macro appear in them. The GNU General Public
-dnl License (GPL) does govern all other use of the material that
-dnl constitutes the Autoconf Macro.
-dnl
-dnl This special exception to the GPL applies to versions of the
-dnl Autoconf Macro released by this project. When you make and
-dnl distribute a modified version of the Autoconf Macro, you may extend
-dnl this special exception to the GPL to apply to your modified version as
-dnl well.
-
-dnl Check if FLAG in ENV-VAR is supported by compiler and append it
-dnl to WHERE-TO-APPEND variable
-dnl CC_CHECK_FLAG_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG])
-
-AC_DEFUN([CC_CHECK_FLAG_APPEND], [
- AC_CACHE_CHECK([if $CC supports flag $3 in envvar $2],
- AS_TR_SH([cc_cv_$2_$3]),
- [eval "AS_TR_SH([cc_save_$2])='${$2}'"
- eval "AS_TR_SH([$2])='-Werror $3'"
- AC_LINK_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
- [eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
- [eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
- eval "AS_TR_SH([$2])='$cc_save_$2'"])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_$2_$3])[ = xyes],
- [eval "$1='${$1} $3'"])
-])
-
-dnl CC_CHECK_FLAGS_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG1 FLAG2])
-AC_DEFUN([CC_CHECK_FLAGS_APPEND], [
- for flag in $3; do
- CC_CHECK_FLAG_APPEND($1, $2, $flag)
- done
-])
-
-dnl Check if the flag is supported by linker (cacheable)
-dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
-
-AC_DEFUN([CC_CHECK_LDFLAGS], [
- AC_CACHE_CHECK([if $CC supports $1 flag],
- AS_TR_SH([cc_cv_ldflags_$1]),
- [ac_save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $1"
- AC_LINK_IFELSE([int main() { return 1; }],
- [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
- LDFLAGS="$ac_save_LDFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
- [$2], [$3])
-])
-
-dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
-dnl the current linker to avoid undefined references in a shared object.
-AC_DEFUN([CC_NOUNDEFINED], [
- dnl We check $host for which systems to enable this for.
- AC_REQUIRE([AC_CANONICAL_HOST])
-
- case $host in
- dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
- dnl are requested, as different implementations are present; to avoid problems
- dnl use -Wl,-z,defs only for those platform not behaving this way.
- *-freebsd* | *-openbsd*) ;;
- *)
- dnl First of all check for the --no-undefined variant of GNU ld. This allows
- dnl for a much more readable commandline, so that people can understand what
- dnl it does without going to look for what the heck -z defs does.
- for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
- CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
- break
- done
- ;;
- esac
-
- AC_SUBST([LDFLAGS_NOUNDEFINED])
-])
-
-dnl Check for a -Werror flag or equivalent. -Werror is the GCC
-dnl and ICC flag that tells the compiler to treat all the warnings
-dnl as fatal. We usually need this option to make sure that some
-dnl constructs (like attributes) are not simply ignored.
-dnl
-dnl Other compilers don't support -Werror per se, but they support
-dnl an equivalent flag:
-dnl - Sun Studio compiler supports -errwarn=%all
-AC_DEFUN([CC_CHECK_WERROR], [
- AC_CACHE_CHECK(
- [for $CC way to treat warnings as errors],
- [cc_cv_werror],
- [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror],
- [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])])
- ])
-])
-
-AC_DEFUN([CC_CHECK_ATTRIBUTE], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
- AS_TR_SH([cc_cv_attribute_$1]),
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])],
- [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
- [AC_DEFINE(
- AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
- [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
- )
- $4],
- [$5])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
- CC_CHECK_ATTRIBUTE(
- [constructor],,
- [void __attribute__((constructor)) ctor() { int a; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
- CC_CHECK_ATTRIBUTE(
- [format], [format(printf, n, n)],
- [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
- CC_CHECK_ATTRIBUTE(
- [format_arg], [format_arg(printf)],
- [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
- CC_CHECK_ATTRIBUTE(
- [visibility_$1], [visibility("$1")],
- [void __attribute__((visibility("$1"))) $1_function() { }],
- [$2], [$3])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
- CC_CHECK_ATTRIBUTE(
- [nonnull], [nonnull()],
- [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
- CC_CHECK_ATTRIBUTE(
- [unused], ,
- [void some_function(void *foo, __attribute__((unused)) void *bar);],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
- CC_CHECK_ATTRIBUTE(
- [sentinel], ,
- [void some_function(void *foo, ...) __attribute__((sentinel));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
- CC_CHECK_ATTRIBUTE(
- [deprecated], ,
- [void some_function(void *foo, ...) __attribute__((deprecated));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
- CC_CHECK_ATTRIBUTE(
- [alias], [weak, alias],
- [void other_function(void *foo) { }
- void some_function(void *foo) __attribute__((weak, alias("other_function")));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
- CC_CHECK_ATTRIBUTE(
- [malloc], ,
- [void * __attribute__((malloc)) my_alloc(int n);],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_PACKED], [
- CC_CHECK_ATTRIBUTE(
- [packed], ,
- [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_CONST], [
- CC_CHECK_ATTRIBUTE(
- [const], ,
- [int __attribute__((const)) twopow(int n) { return 1 << n; } ],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_FLAG_VISIBILITY], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
- [cc_cv_flag_visibility],
- [cc_flag_visibility_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden],
- cc_cv_flag_visibility='yes',
- cc_cv_flag_visibility='no')
- CFLAGS="$cc_flag_visibility_save_CFLAGS"])
-
- AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
- [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
- [Define this if the compiler supports the -fvisibility flag])
- $1],
- [$2])
-])
-
-AC_DEFUN([CC_FUNC_EXPECT], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if compiler has __builtin_expect function],
- [cc_cv_func_expect],
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [int some_function() {
- int a = 3;
- return (int)__builtin_expect(a, 3);
- }])],
- [cc_cv_func_expect=yes],
- [cc_cv_func_expect=no])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([test "x$cc_cv_func_expect" = "xyes"],
- [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
- [Define this if the compiler supports __builtin_expect() function])
- $1],
- [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
- [cc_cv_attribute_aligned],
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- for cc_attribute_align_try in 64 32 16 8 4 2; do
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- int main() {
- static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
- return c;
- }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
- done
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- if test "x$cc_cv_attribute_aligned" != "x"; then
- AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
- [Define the highest alignment supported])
- fi
-])
diff --git a/m4/local.m4 b/m4/local.m4
deleted file mode 100644
index bca646d..0000000
--- a/m4/local.m4
+++ /dev/null
@@ -1,258 +0,0 @@
-dnl #########################################################################
-AC_DEFUN([AX_DOTS_TO_UNDERSCORES], [
- $1[]_UNDERSCORES=`echo "$$1" | sed -e 's/\./_/g'`
- AC_SUBST($1[]_UNDERSCORES)
-]) dnl AX_DOTS_TO_UNDERSCORES
-
-dnl #########################################################################
-AC_DEFUN([AX_COMPARE_VERSION], [
- # Used to indicate true or false condition
- ax_compare_version=false
-
- # Convert the two version strings to be compared into a format that
- # allows a simple string comparison. The end result is that a version
- # string of the form 1.12.5-r617 will be converted to the form
- # 0001001200050617. In other words, each number is zero padded to four
- # digits, and non digits are removed.
- AS_VAR_PUSHDEF([A],[ax_compare_version_A])
- A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
- -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
- -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
- -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
- -e 's/[[^0-9]]//g'`
-
- AS_VAR_PUSHDEF([B],[ax_compare_version_B])
- B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
- -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
- -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
- -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
- -e 's/[[^0-9]]//g'`
-
- dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
- dnl # then the first line is used to determine if the condition is true.
- dnl # The sed right after the echo is to remove any indented white space.
- m4_case(m4_tolower($2),
- [lt],[
- ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
- ],
- [gt],[
- ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
- ],
- [le],[
- ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
- ],
- [ge],[
- ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
- ],[
- dnl Split the operator from the subversion count if present.
- m4_bmatch(m4_substr($2,2),
- [0],[
- # A count of zero means use the length of the shorter version.
- # Determine the number of characters in A and B.
- ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
- ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
-
- # Set A to no more than B's length and B to no more than A's length.
- A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
- B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
- ],
- [[0-9]+],[
- # A count greater than zero means use only that many subversions
- A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
- B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
- ],
- [.+],[
- AC_WARNING(
- [illegal OP numeric parameter: $2])
- ],[])
-
- # Pad zeros at end of numbers to make same length.
- ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
- B="$B`echo $A | sed 's/./0/g'`"
- A="$ax_compare_version_tmp_A"
-
- # Check for equality or inequality as necessary.
- m4_case(m4_tolower(m4_substr($2,0,2)),
- [eq],[
- test "x$A" = "x$B" && ax_compare_version=true
- ],
- [ne],[
- test "x$A" != "x$B" && ax_compare_version=true
- ],[
- AC_WARNING([illegal OP parameter: $2])
- ])
- ])
-
- AS_VAR_POPDEF([A])dnl
- AS_VAR_POPDEF([B])dnl
-
- dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
- if test "$ax_compare_version" = "true" ; then
- m4_ifvaln([$4],[$4],[:])dnl
- m4_ifvaln([$5],[else $5])dnl
- fi
-]) dnl AX_COMPARE_VERSION
-
-dnl #########################################################################
-dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
-AC_DEFUN([IDT_COMPILE_WARNINGS],[
- if test -f $srcdir/autogen.sh; then
- default_compile_warnings="maximum"
- else
- default_compile_warnings="no"
- fi
-
- AC_ARG_WITH(compile-warnings,
- AS_HELP_STRING([--with-compile-warnings=@<:@no/yes/maximum/error@:>@],
- [Compiler warnings]),
- [enable_compile_warnings="$withval"],
- [enable_compile_warnings="$default_compile_warnings"])
-
- warnCFLAGS=
- if test "x$GCC" != xyes; then
- enable_compile_warnings=no
- fi
-
- warning_cflags=
- warning_valaflags=
- realsave_CFLAGS="$CFLAGS"
-
- # Everything from -Wall except:
- # 1. the -Wunused-* stuff
- # 2. the non C warnings: -Wreorder -Wc++11-compat
- # 3. unfixable issues: -Wmissing-braces
- #
- # We don't want to see warnings about generated code.
- CC_CHECK_FLAGS_APPEND([common_cflags], [CFLAGS], [\
- -Waddress \
- -Warray-bounds \
- -Wchar-subscripts \
- -Wenum-compare \
- -Wimplicit-int \
- -Wimplicit-function-declaration \
- -Wcomment \
- -Wformat \
- -Wmain \
- -Wmaybe-uninitialized \
- -Wnonnull \
- -Wparentheses \
- -Wpointer-sign \
- -Wreturn-type \
- -Wsequence-point \
- -Wsign-compare \
- -Wstrict-aliasing \
- -Wstrict-overflow=1 \
- -Wswitch \
- -Wtrigraphs \
- -Wuninitialized \
- -Wunknown-pragmas \
- -Wvolatile-register-var \
- ])
-
- case "$enable_compile_warnings" in
- no)
- warning_cflags=
- warning_valaflags=
- ;;
- yes)
- CC_CHECK_FLAGS_APPEND([additional_cflags], [CFLAGS], [\
- -Wall \
- -Wunused \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- ])
-
- CC_CHECK_FLAGS_APPEND([additional_valaflags], [CFLAGS], [\
- -Wmissing-prototypes \
- -Wmissing-declarations \
- ])
-
- dnl -Wall includes the $common_cflags already.
- warning_cflags="$additional_cflags"
- warning_valaflags="$common_cflags $additional_valaflags"
- ;;
- maximum|error)
- CC_CHECK_FLAGS_APPEND([additional_cflags], [CFLAGS], [\
- -Wall \
- -Wunused \
- -Wchar-subscripts \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wnested-externs \
- -Wpointer-arit \
- -Wno-sign-compare \
- -Wno-pointer-sign \
- ])
-
- CC_CHECK_FLAGS_APPEND([additional_valaflags], [CFLAGS], [\
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wnested-externs \
- -Wpointer-arith \
- -Wno-sign-compare \
- -Wno-pointer-sign \
- ])
-
- dnl -Wall includes the $common_cflags already.
- warning_cflags="$additional_cflags"
- warning_valaflags="$common_cflags $additional_valaflags"
-
- if test "$enable_compile_warnings" = "error" ; then
- warning_cflags="$warning_cflags -Werror"
- warning_valaflags="$warning_valaflags -Werror"
- fi
- ;;
- *)
- AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --with-compile-warnings)
- ;;
- esac
- CFLAGS="$realsave_CFLAGS"
- AC_MSG_CHECKING(what warning flags to pass to the C compiler)
- AC_MSG_RESULT($warning_cflags)
-
- AC_MSG_CHECKING(what warning flags to pass to the C compiler for Vala built sources)
- AC_MSG_RESULT($warning_valaflags)
-
- WARN_CFLAGS="$warning_cflags"
- AC_SUBST(WARN_CFLAGS)
-
- WARN_VALACFLAGS="$warning_valaflags"
- AC_SUBST(WARN_VALACFLAGS)
-]) dnl IDT_COMPILE_WARNINGS
-
-
-
-dnl Stolen from https://git.gnome.org/browse/glib/tree/m4macros/glibtests.m4
-
-dnl GLIB_TESTS
-dnl
-
-AC_DEFUN([GLIB_TESTS],
-[
- AC_ARG_ENABLE(installed-tests,
- AS_HELP_STRING([--enable-installed-tests],
- [Enable installation of some test cases]),
- [case ${enableval} in
- yes) ENABLE_INSTALLED_TESTS="1" ;;
- no) ENABLE_INSTALLED_TESTS="" ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
- esac])
- AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
- AC_ARG_ENABLE(always-build-tests,
- AS_HELP_STRING([--enable-always-build-tests],
- [Enable always building tests during 'make all']),
- [case ${enableval} in
- yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;;
- no) ENABLE_ALWAYS_BUILD_TESTS="" ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
- esac])
- AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
- if test "$ENABLE_INSTALLED_TESTS" = "1"; then
- AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
- AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
- fi
-])
diff --git a/meson.build b/meson.build
index 3b2dd09..d8d33c0 100644
--- a/meson.build
+++ b/meson.build
@@ -93,7 +93,7 @@ configure_file(output: 'config.h',
root_inc = include_directories('.')
subdir('libmediaart')
-subdir('docs/reference/libmediaart')
+subdir('docs')
subdir('tests')
pkgconfig.generate(
@@ -112,3 +112,4 @@ summary('includedir', get_option('includedir'), section: 'Directories')
summary('libdir', get_option('libdir'), section: 'Directories')
summary('Image processing library', image_library_name, section: 'Build')
+summary('Documentation', get_option('gtk_doc'), section: 'Build', bool_yn: true)
diff --git a/meson_options.txt b/meson_options.txt
index 6169e46..3ef49ba 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,6 @@
option('image_library', type: 'combo', choices: ['auto', 'gdk-pixbuf', 'qt4', 'qt5'],
description: 'Which image processing backend to use')
-option('with-docs', type : 'combo', choices : ['auto', 'yes', 'no'], value : 'auto')
+option('gtk_doc',
+ type: 'boolean',
+ value: 'false',
+ description: 'Build the API reference (requires gtk-doc)')
diff --git a/tap-driver.sh b/tap-driver.sh
deleted file mode 100755
index 19aa531..0000000
--- a/tap-driver.sh
+++ /dev/null
@@ -1,652 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-scriptversion=2011-12-27.17; # UTC
-
-# Make unconditional expansion of undefined variables an error. This
-# helps a lot in preventing typo-related bugs.
-set -u
-
-me=tap-driver.sh
-
-fatal ()
-{
- echo "$me: fatal: $*" >&2
- exit 1
-}
-
-usage_error ()
-{
- echo "$me: $*" >&2
- print_usage >&2
- exit 2
-}
-
-print_usage ()
-{
- cat <<END
-Usage:
- tap-driver.sh --test-name=NAME --log-file=PATH --trs-file=PATH
- [--expect-failure={yes|no}] [--color-tests={yes|no}]
- [--enable-hard-errors={yes|no}] [--ignore-exit]
- [--diagnostic-string=STRING] [--merge|--no-merge]
- [--comments|--no-comments] [--] TEST-COMMAND
-The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
-END
-}
-
-# TODO: better error handling in option parsing (in particular, ensure
-# TODO: $log_file, $trs_file and $test_name are defined).
-test_name= # Used for reporting.
-log_file= # Where to save the result and output of the test script.
-trs_file= # Where to save the metadata of the test run.
-expect_failure=0
-color_tests=0
-merge=0
-ignore_exit=0
-comments=0
-diag_string='#'
-while test $# -gt 0; do
- case $1 in
- --help) print_usage; exit $?;;
- --version) echo "$me $scriptversion"; exit $?;;
- --test-name) test_name=$2; shift;;
- --log-file) log_file=$2; shift;;
- --trs-file) trs_file=$2; shift;;
- --color-tests) color_tests=$2; shift;;
- --expect-failure) expect_failure=$2; shift;;
- --enable-hard-errors) shift;; # No-op.
- --merge) merge=1;;
- --no-merge) merge=0;;
- --ignore-exit) ignore_exit=1;;
- --comments) comments=1;;
- --no-comments) comments=0;;
- --diagnostic-string) diag_string=$2; shift;;
- --) shift; break;;
- -*) usage_error "invalid option: '$1'";;
- esac
- shift
-done
-
-test $# -gt 0 || usage_error "missing test command"
-
-case $expect_failure in
- yes) expect_failure=1;;
- *) expect_failure=0;;
-esac
-
-if test $color_tests = yes; then
- init_colors='
- color_map["red"]="" # Red.
- color_map["grn"]="" # Green.
- color_map["lgn"]="" # Light green.
- color_map["blu"]="" # Blue.
- color_map["mgn"]="" # Magenta.
- color_map["std"]="" # No color.
- color_for_result["ERROR"] = "mgn"
- color_for_result["PASS"] = "grn"
- color_for_result["XPASS"] = "red"
- color_for_result["FAIL"] = "red"
- color_for_result["XFAIL"] = "lgn"
- color_for_result["SKIP"] = "blu"'
-else
- init_colors=''
-fi
-
-# :; is there to work around a bug in bash 3.2 (and earlier) which
-# does not always set '$?' properly on redirection failure.
-# See the Autoconf manual for more details.
-:;{
- (
- # Ignore common signals (in this subshell only!), to avoid potential
- # problems with Korn shells. Some Korn shells are known to propagate
- # to themselves signals that have killed a child process they were
- # waiting for; this is done at least for SIGINT (and usually only for
- # it, in truth). Without the `trap' below, such a behaviour could
- # cause a premature exit in the current subshell, e.g., in case the
- # test command it runs gets terminated by a SIGINT. Thus, the awk
- # script we are piping into would never seen the exit status it
- # expects on its last input line (which is displayed below by the
- # last `echo $?' statement), and would thus die reporting an internal
- # error.
- # For more information, see the Autoconf manual and the threads:
- # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
- # <http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
- trap : 1 3 2 13 15
- if test $merge -gt 0; then
- exec 2>&1
- else
- exec 2>&3
- fi
- "$@"
- echo $?
- ) | LC_ALL=C ${AM_TAP_AWK-awk} \
- -v me="$me" \
- -v test_script_name="$test_name" \
- -v log_file="$log_file" \
- -v trs_file="$trs_file" \
- -v expect_failure="$expect_failure" \
- -v merge="$merge" \
- -v ignore_exit="$ignore_exit" \
- -v comments="$comments" \
- -v diag_string="$diag_string" \
-'
-# FIXME: the usages of "cat >&3" below could be optimized when using
-# FIXME: GNU awk, and/on on systems that supports /dev/fd/.
-
-# Implementation note: in what follows, `result_obj` will be an
-# associative array that (partly) simulates a TAP result object
-# from the `TAP::Parser` perl module.
-
-## ----------- ##
-## FUNCTIONS ##
-## ----------- ##
-
-function fatal(msg)
-{
- print me ": " msg | "cat >&2"
- exit 1
-}
-
-function abort(where)
-{
- fatal("internal error " where)
-}
-
-# Convert a boolean to a "yes"/"no" string.
-function yn(bool)
-{
- return bool ? "yes" : "no";
-}
-
-function add_test_result(result)
-{
- if (!test_results_index)
- test_results_index = 0
- test_results_list[test_results_index] = result
- test_results_index += 1
- test_results_seen[result] = 1;
-}
-
-# Whether the test script should be re-run by "make recheck".
-function must_recheck()
-{
- for (k in test_results_seen)
- if (k != "XFAIL" && k != "PASS" && k != "SKIP")
- return 1
- return 0
-}
-
-# Whether the content of the log file associated to this test should
-# be copied into the "global" test-suite.log.
-function copy_in_global_log()
-{
- for (k in test_results_seen)
- if (k != "PASS")
- return 1
- return 0
-}
-
-# FIXME: this can certainly be improved ...
-function get_global_test_result()
-{
- if ("ERROR" in test_results_seen)
- return "ERROR"
- if ("FAIL" in test_results_seen || "XPASS" in test_results_seen)
- return "FAIL"
- all_skipped = 1
- for (k in test_results_seen)
- if (k != "SKIP")
- all_skipped = 0
- if (all_skipped)
- return "SKIP"
- return "PASS";
-}
-
-function stringify_result_obj(result_obj)
-{
- if (result_obj["is_unplanned"] || result_obj["number"] != testno)
- return "ERROR"
-
- if (plan_seen == LATE_PLAN)
- return "ERROR"
-
- if (result_obj["directive"] == "TODO")
- return result_obj["is_ok"] ? "XPASS" : "XFAIL"
-
- if (result_obj["directive"] == "SKIP")
- return result_obj["is_ok"] ? "SKIP" : COOKED_FAIL;
-
- if (length(result_obj["directive"]))
- abort("in function stringify_result_obj()")
-
- return result_obj["is_ok"] ? COOKED_PASS : COOKED_FAIL
-}
-
-function decorate_result(result)
-{
- color_name = color_for_result[result]
- if (color_name)
- return color_map[color_name] "" result "" color_map["std"]
- # If we are not using colorized output, or if we do not know how
- # to colorize the given result, we should return it unchanged.
- return result
-}
-
-function report(result, details)
-{
- if (result ~ /^(X?(PASS|FAIL)|SKIP|ERROR)/)
- {
- msg = ": " test_script_name
- add_test_result(result)
- }
- else if (result == "#")
- {
- msg = " " test_script_name ":"
- }
- else
- {
- abort("in function report()")
- }
- if (length(details))
- msg = msg " " details
- # Output on console might be colorized.
- print decorate_result(result) msg
- # Log the result in the log file too, to help debugging (this is
- # especially true when said result is a TAP error or "Bail out!").
- print result msg | "cat >&3";
-}
-
-function testsuite_error(error_message)
-{
- report("ERROR", "- " error_message)
-}
-
-function handle_tap_result()
-{
- details = result_obj["number"];
- if (length(result_obj["description"]))
- details = details " " result_obj["description"]
-
- if (plan_seen == LATE_PLAN)
- {
- details = details " # AFTER LATE PLAN";
- }
- else if (result_obj["is_unplanned"])
- {
- details = details " # UNPLANNED";
- }
- else if (result_obj["number"] != testno)
- {
- details = sprintf("%s # OUT-OF-ORDER (expecting %d)",
- details, testno);
- }
- else if (result_obj["directive"])
- {
- details = details " # " result_obj["directive"];
- if (length(result_obj["explanation"]))
- details = details " " result_obj["explanation"]
- }
-
- report(stringify_result_obj(result_obj), details)
-}
-
-# `skip_reason` should be empty whenever planned > 0.
-function handle_tap_plan(planned, skip_reason)
-{
- planned += 0 # Avoid getting confused if, say, `planned` is "00"
- if (length(skip_reason) && planned > 0)
- abort("in function handle_tap_plan()")
- if (plan_seen)
- {
- # Error, only one plan per stream is acceptable.
- testsuite_error("multiple test plans")
- return;
- }
- planned_tests = planned
- # The TAP plan can come before or after *all* the TAP results; we speak
- # respectively of an "early" or a "late" plan. If we see the plan line
- # after at least one TAP result has been seen, assume we have a late
- # plan; in this case, any further test result seen after the plan will
- # be flagged as an error.
- plan_seen = (testno >= 1 ? LATE_PLAN : EARLY_PLAN)
- # If testno > 0, we have an error ("too many tests run") that will be
- # automatically dealt with later, so do not worry about it here. If
- # $plan_seen is true, we have an error due to a repeated plan, and that
- # has already been dealt with above. Otherwise, we have a valid "plan
- # with SKIP" specification, and should report it as a particular kind
- # of SKIP result.
- if (planned == 0 && testno == 0)
- {
- if (length(skip_reason))
- skip_reason = "- " skip_reason;
- report("SKIP", skip_reason);
- }
-}
-
-function extract_tap_comment(line)
-{
- if (index(line, diag_string) == 1)
- {
- # Strip leading `diag_string` from `line`.
- line = substr(line, length(diag_string) + 1)
- # And strip any leading and trailing whitespace left.
- sub("^[ \t]*", "", line)
- sub("[ \t]*$", "", line)
- # Return what is left (if any).
- return line;
- }
- return "";
-}
-
-# When this function is called, we know that line is a TAP result line,
-# so that it matches the (perl) RE "^(not )?ok\b".
-function setup_result_obj(line)
-{
- # Get the result, and remove it from the line.
- result_obj["is_ok"] = (substr(line, 1, 2) == "ok" ? 1 : 0)
- sub("^(not )?ok[ \t]*", "", line)
-
- # If the result has an explicit number, get it and strip it; otherwise,
- # automatically assing the next progresive number to it.
- if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/)
- {
- match(line, "^[0-9]+")
- # The final `+ 0` is to normalize numbers with leading zeros.
- result_obj["number"] = substr(line, 1, RLENGTH) + 0
- line = substr(line, RLENGTH + 1)
- }
- else
- {
- result_obj["number"] = testno
- }
-
- if (plan_seen == LATE_PLAN)
- # No further test results are acceptable after a "late" TAP plan
- # has been seen.
- result_obj["is_unplanned"] = 1
- else if (plan_seen && testno > planned_tests)
- result_obj["is_unplanned"] = 1
- else
- result_obj["is_unplanned"] = 0
-
- # Strip trailing and leading whitespace.
- sub("^[ \t]*", "", line)
- sub("[ \t]*$", "", line)
-
- # This will have to be corrected if we have a "TODO"/"SKIP" directive.
- result_obj["description"] = line
- result_obj["directive"] = ""
- result_obj["explanation"] = ""
-
- if (index(line, "#") == 0)
- return # No possible directive, nothing more to do.
-
- # Directives are case-insensitive.
- rx = "[ \t]*#[ \t]*([tT][oO][dD][oO]|[sS][kK][iI][pP])[ \t]*"
-
- # See whether we have the directive, and if yes, where.
- pos = match(line, rx "$")
- if (!pos)
- pos = match(line, rx "[^a-zA-Z0-9_]")
-
- # If there was no TAP directive, we have nothing more to do.
- if (!pos)
- return
-
- # Let`s now see if the TAP directive has been escaped. For example:
- # escaped: ok \# SKIP
- # not escaped: ok \\# SKIP
- # escaped: ok \\\\\# SKIP
- # not escaped: ok \ # SKIP
- if (substr(line, pos, 1) == "#")
- {
- bslash_count = 0
- for (i = pos; i > 1 && substr(line, i - 1, 1) == "\\"; i--)
- bslash_count += 1
- if (bslash_count % 2)
- return # Directive was escaped.
- }
-
- # Strip the directive and its explanation (if any) from the test
- # description.
- result_obj["description"] = substr(line, 1, pos - 1)
- # Now remove the test description from the line, that has been dealt
- # with already.
- line = substr(line, pos)
- # Strip the directive, and save its value (normalized to upper case).
- sub("^[ \t]*#[ \t]*", "", line)
- result_obj["directive"] = toupper(substr(line, 1, 4))
- line = substr(line, 5)
- # Now get the explanation for the directive (if any), with leading
- # and trailing whitespace removed.
- sub("^[ \t]*", "", line)
- sub("[ \t]*$", "", line)
- result_obj["explanation"] = line
-}
-
-function get_test_exit_message(status)
-{
- if (status == 0)
- return ""
- if (status !~ /^[1-9][0-9]*$/)
- abort("getting exit status")
- if (status < 127)
- exit_details = ""
- else if (status == 127)
- exit_details = " (command not found?)"
- else if (status >= 128 && status <= 255)
- exit_details = sprintf(" (terminated by signal %d?)", status - 128)
- else if (status > 256 && status <= 384)
- # We used to report an "abnormal termination" here, but some Korn
- # shells, when a child process die due to signal number n, can leave
- # in $? an exit status of 256+n instead of the more standard 128+n.
- # Apparently, both behaviours are allowed by POSIX (2008), so be
- # prepared to handle them both. See also Austing Group report ID
- # 0000051 <http://www.austingroupbugs.net/view.php?id=51>
- exit_details = sprintf(" (terminated by signal %d?)", status - 256)
- else
- # Never seen in practice.
- exit_details = " (abnormal termination)"
- return sprintf("exited with status %d%s", status, exit_details)
-}
-
-function write_test_results()
-{
- print ":global-test-result: " get_global_test_result() > trs_file
- print ":recheck: " yn(must_recheck()) > trs_file
- print ":copy-in-global-log: " yn(copy_in_global_log()) > trs_file
- for (i = 0; i < test_results_index; i += 1)
- print ":test-result: " test_results_list[i] > trs_file
- close(trs_file);
-}
-
-BEGIN {
-
-## ------- ##
-## SETUP ##
-## ------- ##
-
-'"$init_colors"'
-
-# Properly initialized once the TAP plan is seen.
-planned_tests = 0
-
-COOKED_PASS = expect_failure ? "XPASS": "PASS";
-COOKED_FAIL = expect_failure ? "XFAIL": "FAIL";
-
-# Enumeration-like constants to remember which kind of plan (if any)
-# has been seen. It is important that NO_PLAN evaluates "false" as
-# a boolean.
-NO_PLAN = 0
-EARLY_PLAN = 1
-LATE_PLAN = 2
-
-testno = 0 # Number of test results seen so far.
-bailed_out = 0 # Whether a "Bail out!" directive has been seen.
-
-# Whether the TAP plan has been seen or not, and if yes, which kind
-# it is ("early" is seen before any test result, "late" otherwise).
-plan_seen = NO_PLAN
-
-## --------- ##
-## PARSING ##
-## --------- ##
-
-is_first_read = 1
-
-while (1)
- {
- # Involutions required so that we are able to read the exit status
- # from the last input line.
- st = getline
- if (st < 0) # I/O error.
- fatal("I/O error while reading from input stream")
- else if (st == 0) # End-of-input
- {
- if (is_first_read)
- abort("in input loop: only one input line")
- break
- }
- if (is_first_read)
- {
- is_first_read = 0
- nextline = $0
- continue
- }
- else
- {
- curline = nextline
- nextline = $0
- $0 = curline
- }
- # Copy any input line verbatim into the log file.
- print | "cat >&3"
- # Parsing of TAP input should stop after a "Bail out!" directive.
- if (bailed_out)
- continue
-
- # TAP test result.
- if ($0 ~ /^(not )?ok$/ || $0 ~ /^(not )?ok[^a-zA-Z0-9_]/)
- {
- testno += 1
- setup_result_obj($0)
- handle_tap_result()
- }
- # TAP plan (normal or "SKIP" without explanation).
- else if ($0 ~ /^1\.\.[0-9]+[ \t]*$/)
- {
- # The next two lines will put the number of planned tests in $0.
- sub("^1\\.\\.", "")
- sub("[^0-9]*$", "")
- handle_tap_plan($0, "")
- continue
- }
- # TAP "SKIP" plan, with an explanation.
- else if ($0 ~ /^1\.\.0+[ \t]*#/)
- {
- # The next lines will put the skip explanation in $0, stripping
- # any leading and trailing whitespace. This is a little more
- # tricky in truth, since we want to also strip a potential leading
- # "SKIP" string from the message.
- sub("^[^#]*#[ \t]*(SKIP[: \t][ \t]*)?", "")
- sub("[ \t]*$", "");
- handle_tap_plan(0, $0)
- }
- # "Bail out!" magic.
- # Older versions of prove and TAP::Harness (e.g., 3.17) did not
- # recognize a "Bail out!" directive when preceded by leading
- # whitespace, but more modern versions (e.g., 3.23) do. So we
- # emulate the latter, "more modern" behaviour.
- else if ($0 ~ /^[ \t]*Bail out!/)
- {
- bailed_out = 1
- # Get the bailout message (if any), with leading and trailing
- # whitespace stripped. The message remains stored in `$0`.
- sub("^[ \t]*Bail out![ \t]*", "");
- sub("[ \t]*$", "");
- # Format the error message for the
- bailout_message = "Bail out!"
- if (length($0))
- bailout_message = bailout_message " " $0
- testsuite_error(bailout_message)
- }
- # Maybe we have too look for dianogtic comments too.
- else if (comments != 0)
- {
- comment = extract_tap_comment($0);
- if (length(comment))
- report("#", comment);
- }
- }
-
-## -------- ##
-## FINISH ##
-## -------- ##
-
-# A "Bail out!" directive should cause us to ignore any following TAP
-# error, as well as a non-zero exit status from the TAP producer.
-if (!bailed_out)
- {
- if (!plan_seen)
- {
- testsuite_error("missing test plan")
- }
- else if (planned_tests != testno)
- {
- bad_amount = testno > planned_tests ? "many" : "few"
- testsuite_error(sprintf("too %s tests run (expected %d, got %d)",
- bad_amount, planned_tests, testno))
- }
- if (!ignore_exit)
- {
- # Fetch exit status from the last line.
- exit_message = get_test_exit_message(nextline)
- if (exit_message)
- testsuite_error(exit_message)
- }
- }
-
-write_test_results()
-
-exit 0
-
-} # End of "BEGIN" block.
-'
-
-# TODO: document that we consume the file descriptor 3 :-(
-} 3>"$log_file"
-
-test $? -eq 0 || fatal "I/O or internal error"
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/tap-test b/tap-test
deleted file mode 100755
index 481e333..0000000
--- a/tap-test
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-
-# run a GTest in tap mode. The test binary is passed as $1
-
-$1 -k --tap
diff --git a/tests/Makefile.am b/tests/Makefile.am
deleted file mode 100644
index fefc7af..0000000
--- a/tests/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-include $(top_srcdir)/Makefile.decl
-
-test_programs = mediaarttest
-dist_test_data = \
- 543249_King-Kilo---Radium.mp3 \
- cover.png
-
-AM_CPPFLAGS = \
- $(BUILD_CFLAGS) \
- -I$(top_srcdir) \
- $(LIBMEDIAART_CFLAGS)
-
-LDADD = \
- $(top_builddir)/libmediaart/libmediaart-@LIBMEDIAART_API_VERSION@.la \
- $(BUILD_LIBS) \
- $(LIBMEDIAART_LIBS)
-
-mediaarttest_SOURCES = mediaarttest.c
-
-EXTRA_DIST = meson.build \
- $(dist_test_data)