diff options
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | ChangeLog | 0 | ||||
-rw-r--r-- | Makefile.am | 18 | ||||
-rw-r--r-- | NEWS | 0 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | TODO | 4 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.ac | 44 | ||||
-rw-r--r-- | data/Makefile.am | 2 | ||||
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/reference.doxygen.in | 28 | ||||
-rw-r--r-- | slv2/plugin.h | 4 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/plugin.c | 13 | ||||
-rw-r--r-- | src/world.c | 17 | ||||
-rw-r--r-- | utils/Makefile.am | 2 |
16 files changed, 82 insertions, 60 deletions
@@ -1,4 +1,2 @@ -Author: - Dave Robillard <dave@drobilla.net> diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index e69de29..0000000 --- a/ChangeLog +++ /dev/null diff --git a/Makefile.am b/Makefile.am index 66af074..8497095 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,21 @@ -SUBDIRS = src slv2 utils hosts data doc +AUTOMAKE_OPTIONS = foreign + +if HAVE_DOXYGEN +DOC_DIR = doc +dist-check-doxygen: +else +DOC_DIR = +dist-check-doxygen: + @echo + @echo ' ******' You need doxygen installed to make dist.' ******' + @echo + @false +endif + +SUBDIRS = src slv2 utils hosts data $(DOC_DIR) +DIST_SUBDIRS = src slv2 utils hosts data doc pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libslv2.pc +dist-hook: dist-check-doxygen @@ -1,3 +1,5 @@ SLV2 is a library for LV2 hosts intended to make using LV2 Plugins as simple as possible (without sacrificing capabilities). +More information about LV2 plugins can be found at http://lv2plug.in. + @@ -1,4 +0,0 @@ -- Rewrite all the realloc nightmare stuff - -<remon> drobilla: slv2_port_get_default_value checks if a property is returned,and creates the result. But it calls slv2_property_free() even if the property == 0 !! -<remon> drobilla: (which causes a segfault) @@ -4,6 +4,6 @@ echo 'Generating necessary files...' libtoolize --copy --force aclocal autoheader -Wall -automake --gnu --add-missing -Wall +automake --foreign --add-missing -Wall autoconf diff --git a/configure.ac b/configure.ac index 7ac3e97..f83b762 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,27 @@ AC_PREREQ(2.59) -AC_INIT([libslv2],[0.0.1],[dave@drobilla.net]) + +# SLV2 interface version (libtool shared library versioning) +# +# current = incremented whenever the public slv2 API is changed +# revision = incremented when the slv2 implementation is changed +# age = current libjack is both source and binary compatible with +# libjack interfaces current,current-1,...,current-age +# +# See libtool documentation for detailed documentation +SLV2_API_CURRENT=0 +SLV2_API_REVISION=0 +SLV2_API_AGE=0 + +AC_INIT([slv2],[0.0.1],[dave@drobilla.net]) AC_CONFIG_SRCDIR([src/plugin.c]) AC_CONFIG_SRCDIR([slv2/plugin.h]) AC_CONFIG_SRCDIR([utils/lv2_list.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE +SLV2_SO_VERSION=${SLV2_API_CURRENT}:${SLV2_API_REVISION}:${SLV2_API_AGE} +AC_SUBST(SLV2_SO_VERSION) + # Checks for compiler AC_PROG_CC AM_PROG_CC_C_O @@ -79,25 +95,12 @@ else fi AM_CONDITIONAL(WITH_JACK, [test "$build_jack" = "yes"]) -# Check plugin install directory -#AC_MSG_CHECKING([where to install LV2 plugins]) -#AC_ARG_WITH(lv2-dir, -# AS_HELP_STRING([--with-lv2-dir=DIR], -# [directory that LV2 plugins should be installed in ($libdir/lv2)]), -# [lv2dir=$withval], [lv2dir=$libdir/lv2]) -#AC_MSG_RESULT($lv2dir) -#AC_SUBST(lv2dir) - - -# Check ontology install directory -AC_MSG_CHECKING([where to install lv2.ttl]) -AC_ARG_WITH(lv2-ttl-dir, - AS_HELP_STRING([--with-lv2-ttl-dir=DIR], - [directory where lv2.ttl should be installed ($datadir/lv2)]), - [lv2ttldir=$withval], [lv2ttldir=$datadir/lv2]) -AC_MSG_RESULT($lv2ttldir) -lv2ttlpath="$lv2ttldir/lv2.ttl" -AC_SUBST(lv2ttlpath) +# Doxygen is required to make dist +AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false) +if test $HAVE_DOXYGEN = "false"; then + AC_MSG_WARN([Doxygen not found, documentation will not be built]) +fi +AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN) # Write output files AC_CONFIG_FILES([Makefile]) @@ -117,7 +120,6 @@ AC_MSG_RESULT([***************************************************************** AC_MSG_RESULT([SLV2 build configuration:]) AC_MSG_RESULT([]) AC_MSG_RESULT([Building JACK clients: $build_jack]) -AC_MSG_RESULT([Ontology install location: $lv2ttlpath]) AC_MSG_RESULT([**********************************************************************]) AC_MSG_RESULT([]) diff --git a/data/Makefile.am b/data/Makefile.am index 13008b6..2b7dd69 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,4 +1,4 @@ EXTRA_DIST = lv2.ttl -ontologydir = $(datadir)/lv2 +ontologydir = $(datadir)/slv2 ontology_DATA = lv2.ttl diff --git a/doc/Makefile.am b/doc/Makefile.am index ecbbcde..afe8776 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,6 @@ EXTRA_DIST = mainpage.dox reference.doxygen +all-local: doc + doc: $(top_srcdir)/doc/reference.doxygen $(top_srcdir)/slv2/*.h doxygen $(top_srcdir)/doc/reference.doxygen diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in index bfcd911..c3202af 100644 --- a/doc/reference.doxygen.in +++ b/doc/reference.doxygen.in @@ -32,7 +32,7 @@ PROJECT_NUMBER = @PACKAGE_VERSION@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @top_srcdir@/doc +OUTPUT_DIRECTORY = @abs_top_srcdir@/doc # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -419,19 +419,19 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @top_srcdir@/doc/mainpage.dox \ - @top_srcdir@/slv2/lv2.h \ - @top_srcdir@/slv2/types.h \ - @top_srcdir@/slv2/util.h \ - @top_srcdir@/slv2/value.h \ - @top_srcdir@/slv2/values.h \ - @top_srcdir@/slv2/world.h \ - @top_srcdir@/slv2/plugin.h \ - @top_srcdir@/slv2/pluginclass.h \ - @top_srcdir@/slv2/pluginclasses.h \ - @top_srcdir@/slv2/plugininstance.h \ - @top_srcdir@/slv2/plugins.h \ - @top_srcdir@/slv2/port.h +INPUT = @abs_top_srcdir@/doc/mainpage.dox \ + @abs_top_srcdir@/slv2/lv2.h \ + @abs_top_srcdir@/slv2/types.h \ + @abs_top_srcdir@/slv2/util.h \ + @abs_top_srcdir@/slv2/value.h \ + @abs_top_srcdir@/slv2/values.h \ + @abs_top_srcdir@/slv2/world.h \ + @abs_top_srcdir@/slv2/plugin.h \ + @abs_top_srcdir@/slv2/pluginclass.h \ + @abs_top_srcdir@/slv2/pluginclasses.h \ + @abs_top_srcdir@/slv2/plugininstance.h \ + @abs_top_srcdir@/slv2/plugins.h \ + @abs_top_srcdir@/slv2/port.h # If the value of the INPUT tag contains directories, you can use the diff --git a/slv2/plugin.h b/slv2/plugin.h index ace6e3b..4d53bb3 100644 --- a/slv2/plugin.h +++ b/slv2/plugin.h @@ -138,7 +138,7 @@ slv2_plugin_get_class(SLV2Plugin plugin); * Return value must be freed by caller with slv2_values_free. * * \a predicate must be either a URI or a QName. - * See \ref SLV2URIType documentation for examples. + * See SLV2URIType documentation for examples. * * Time = Query */ @@ -161,7 +161,7 @@ slv2_plugin_get_value(SLV2Plugin p, * sensibly represented as an SLV2Values (e.g. blank nodes). * * \a predicate must be either a URI or a QName. - * See \ref SLV2URIType documentation for examples. + * See SLV2URIType documentation for examples. * * Return value must be freed by caller with slv2_values_free. * diff --git a/src/Makefile.am b/src/Makefile.am index f7b9f76..c7c70f6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -std=c99 -I$(top_srcdir)/include -I$(top_srcdir) @REDLAND_CFLAGS@ -DLIBSLV2_SOURCE -DLV2_TTL_PATH=\"@lv2ttlpath@\" +AM_CFLAGS = -std=c99 -I$(top_srcdir)/include -I$(top_srcdir) @REDLAND_CFLAGS@ -DLIBSLV2_SOURCE AM_LDFLAGS = `pkg-config --libs rasqal` lib_LTLIBRARIES = libslv2.la diff --git a/src/plugin.c b/src/plugin.c index 391ed11..1552c55 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -433,20 +433,15 @@ bool slv2_plugin_has_latency(SLV2Plugin p) { const char* const query = - "ASK WHERE {\n" - " <> lv2:port ?port .\n" + "SELECT DISTINCT ?index WHERE {\n" + " <> lv2:port ?port .\n" " ?port lv2:portHint lv2:reportsLatency ;\n" " lv2:index ?index .\n" "}\n"; - librdf_query_results* results = slv2_plugin_query(p, query); - assert(librdf_query_results_is_boolean(results)); - - bool ret = (librdf_query_results_get_boolean(results) > 0); + SLV2Values result = slv2_plugin_simple_query(p, query, 0); - librdf_free_query_results(results); - - return ret; + return (slv2_values_size(result) > 0); } diff --git a/src/world.c b/src/world.c index ff91ead..913a3ff 100644 --- a/src/world.c +++ b/src/world.c @@ -294,11 +294,20 @@ slv2_world_load_all(SLV2World world) char* lv2_path = getenv("LV2_PATH"); /* 1. Read LV2 ontology into model */ - librdf_uri* ontology_uri = librdf_new_uri(world->world, - (const unsigned char*)"file://" LV2_TTL_PATH); - librdf_parser_parse_into_model(world->parser, ontology_uri, NULL, world->model); - librdf_free_uri(ontology_uri); + const char* ontology_path = "/usr/local/share/slv2/lv2.ttl"; + FILE* ontology = fopen(ontology_path, "r"); + if (ontology == NULL) { + ontology_path = "/usr/share/slv2/lv2.ttl"; + ontology = fopen(ontology_path, "r"); + } + if (ontology) { + fclose(ontology); + librdf_uri* ontology_uri = librdf_new_uri_from_filename(world->world, + ontology_path); + librdf_parser_parse_into_model(world->parser, ontology_uri, NULL, world->model); + librdf_free_uri(ontology_uri); + } /* 2. Read all manifest files into model */ diff --git a/utils/Makefile.am b/utils/Makefile.am index b600b23..5aab5f5 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,3 +1,5 @@ +EXTRA_DIST = ladspa.h + AM_CFLAGS = -std=c99 -I$(top_srcdir) @REDLAND_CFLAGS@ bin_PROGRAMS = lv2_list lv2_inspect ladspa2lv2 |