Browse Source

Ontology install path fixes.

0.0.1 versioning stuff.
Removed GNU 'standard' files I don't maintain anyway and make automake shutup about it.


git-svn-id: http://svn.drobilla.net/lad/slv2@521 a436a847-0d15-0410-975c-d299462d15a1
add_opts_to_lv2apply
David Robillard 15 years ago
parent
commit
3433ad241b
  1. 2
      AUTHORS
  2. 0
      ChangeLog
  3. 18
      Makefile.am
  4. 0
      NEWS
  5. 2
      README
  6. 4
      TODO
  7. 2
      autogen.sh
  8. 44
      configure.ac
  9. 2
      data/Makefile.am
  10. 2
      doc/Makefile.am
  11. 28
      doc/reference.doxygen.in
  12. 4
      slv2/plugin.h
  13. 2
      src/Makefile.am
  14. 13
      src/plugin.c
  15. 17
      src/world.c
  16. 2
      utils/Makefile.am

2
AUTHORS

@ -1,4 +1,2 @@
Author:
Dave Robillard <dave@drobilla.net>

0
ChangeLog

18
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

0
NEWS

2
README

@ -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.

4
TODO

@ -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)

2
autogen.sh

@ -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

44
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([])

2
data/Makefile.am

@ -1,4 +1,4 @@
EXTRA_DIST = lv2.ttl
ontologydir = $(datadir)/lv2
ontologydir = $(datadir)/slv2
ontology_DATA = lv2.ttl

2
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

28
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

4
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.
*

2
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

13
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);
}

17
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 */

2
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

Loading…
Cancel
Save