[SCM] lv2core/master: Drop lv2config, it's not needed anymore.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Fri Dec 2 17:21:17 UTC 2011
The following commit has been merged in the master branch:
commit 8e6455f3d21f5e31be63e95a1a964befb54f4a1c
Author: Alessio Treglia <alessio at debian.org>
Date: Fri Dec 2 18:21:01 2011 +0100
Drop lv2config, it's not needed anymore.
diff --git a/debian/dh_lv2config b/debian/dh_lv2config
deleted file mode 100644
index 1b6acf3..0000000
--- a/debian/dh_lv2config
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/perl -w
-
-=head1 NAME
-
-dh_lv2config - run lv2config to build the LV2 #include directory tree
-
-=cut
-
-use strict;
-use Debian::Debhelper::Dh_Lib;
-
-=head1 SYNOPSIS
-
-B<dh_lv2config> [I<debhelper options>]
-
-=head1 DESCRIPTION
-
-B<dh_lv2config> is a debhelper program which will run lv2config to build
-an include directory tree for all shipped LV2 extensions.
-
-=head1 EXAMPLES
-
-B<dh_lv2config> is usually called indirectly via the dh command.
-
- %:
- dh $@ --with lv2config
-
-It could also be called after the B<dh_install> command explicitly,
-as in the following example:
-
- binary-indep: install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install
- dh_lv2config
-
-=cut
-
-init();
-
-foreach my $package (@{$dh{DOPACKAGES}}) {
- my $tmp=tmpdir($package);
- my @lv2config_cmd = ('lv2config', '-d', "$tmp", '-b', "$tmp", '/usr/include/lv2', "$tmp" . '/usr/lib/lv2');
- doit(@lv2config_cmd);
-}
-
-=head1 SEE ALSO
-
-L<debhelper(7)>, L<lv2config(1)>
-
-=head1 AUTHOR
-
-Alessio Treglia <alessio at debian.org>
-
-=cut
diff --git a/debian/lv2config.1 b/debian/lv2config.1
deleted file mode 100644
index 1dec85f..0000000
--- a/debian/lv2config.1
+++ /dev/null
@@ -1,64 +0,0 @@
-.TH LV2CONFIG 1 "March 20, 2011"
-.SH NAME
-\fBlv2config\fP \- build an LV2 #include directory tree
-.SH SYNOPSIS
-.B lv2config
-.br
-.B lv2config
-.RI INCLUDE_DIR
-.br
-.B lv2config
-.RI INCLUDE_DIR
-.RI BUNDLES_DIR
-.SH DESCRIPTION
-.B lv2config
-is a utility to build an LV2 #include directory tree for a set of LV2
-extensions (and the "core" specification), which must be run after
-installing extensions to allow compiling code that uses those extensions.
-This allows code to use a universal #include style based directly on
-the URI of the extension.
-.PP
-For example, the
-.IR #include
-statement for the LV2 core specification which has URI
-.I http://lv2plug.in/ns/ext/lv2core
-is:
-.PP
-.RS 5
-\fB#include "lv2/lv2plug.in/ns/ext/lv2core/lv2.h"\fR
-.RE
-.PP
-(lv2.h is simply a file that resides in the lv2core bundle, there may be
-several such files).
-.PP
-.B lv2config
-can be used to build an include directory tree for all installed LV2
-extensions, or used to build a local include directory tree for projects
-that wish to include extensions in their source trees rather than use
-the system installed versions.
-.PP
-.B lv2config
-must be run after an extension is installed to enable compiling against
-that extension. Its name is deliberately analogous to \fBldconfig\fP
-since the concept is similar: to use an installed extension/library,
-you must first run \fBlv2config/ldconfig\fP.
-.PP
-.SH OPTIONS
-When running without options, lv2config builds the default system
-LV2 include directories.
-.PP
-If only INCLUDE_DIR is set, it builds an LV2 include directory tree
-at INCLUDE_DIR for all extensions found in .
-.PP
-When both INCLUDE_DIR and BUNDLES_DIR parameters are set, it builds
-an LV2 include directory tree at INCLUDE_DIR for all extensions found
-in bundles under BUNDLES_DIR.
-.PP
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-show usage and exit
-.SH AUTHOR
-lv2config was written by David Robillard <d at drobilla.net>.
-.PP
-This manual page was written by Jaromír Mikeš <mira.mikes at seznam.cz>,
-Alessio Treglia <alessio at debian.org>, and David Robillard <d at drobilla.net>.
diff --git a/debian/lv2config.pm b/debian/lv2config.pm
deleted file mode 100644
index 7cb9a4f..0000000
--- a/debian/lv2config.pm
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/perl
-# debhelper sequence file for dh_lv2config
-
-use warnings;
-use strict;
-use Debian::Debhelper::Dh_Lib;
-
-insert_after("dh_install", "dh_lv2config");
-
-1;
diff --git a/debian/lv2core.install b/debian/lv2core.install
deleted file mode 100644
index 022ff03..0000000
--- a/debian/lv2core.install
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/lv2config.pm usr/share/perl5/Debian/Debhelper/Sequence/
-debian/dh_lv2config usr/bin
diff --git a/debian/lv2core.links b/debian/lv2core.links
deleted file mode 100644
index 71da47b..0000000
--- a/debian/lv2core.links
+++ /dev/null
@@ -1 +0,0 @@
-usr/include/lv2/lv2plug.in/ns/lv2core/lv2.h usr/include/lv2.h
diff --git a/debian/lv2core.manpages b/debian/lv2core.manpages
deleted file mode 100644
index 54b415b..0000000
--- a/debian/lv2core.manpages
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/lv2config.1
-debian/dh_lv2config.1
diff --git a/debian/patches/0001-lv2config_bundle_prefix.patch b/debian/patches/0001-lv2config_bundle_prefix.patch
deleted file mode 100644
index f61c1d9..0000000
--- a/debian/patches/0001-lv2config_bundle_prefix.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-Description: Several improvements to lv2config tool.
- In order to make lv2config symlink the bundles properly, we need to
- add a prefix to the bundle path. So, now lv2config accepts 2 options
- on the command line:
- .
- * -d DESTDIR
- Use this in more robust than relying on an ENVVAR.
- * -b BUNDLE_PREFIX
- Put BUNDLE_PREFIX as prefix of BUNDLES_DIR.
- .
- When running:
- .
- DESTDIR=debian/lv2core lv2config /usr/include debian/lv2core/usr/lib/lv2
- .
- without applying this patch, the program outputs a malformed structure like
- the following:
- drwxr-xr-x root/root 0 ./usr/include/lv2plug.in/
- drwxr-xr-x root/root 0 ./usr/include/lv2plug.in/ns/
- -rw-r--r-- root/root 12974 ./usr/lib/lv2/lv2core.lv2/lv2.h
- -rw-r--r-- root/root 356 ./usr/lib/lv2/lv2core.lv2/manifest.ttl
- -rw-r--r-- root/root 34544 ./usr/lib/lv2/lv2core.lv2/lv2.ttl
- lrwxrwxrwx root/root 0 ./usr/include/lv2plug.in/ns/lv2core -> \
- debian/lv2core/usr/lib/lv2/lv2core.lv2
- .
- I've also make lv2config accept the option '-d' to set destdir rather than
- relying on an environment variable since it seems more robust.
-Author: Alessio Treglia <alessio at debian.org>
-Forwarded: David Robillard <d at drobilla.net>
----
- lv2config.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 71 insertions(+), 15 deletions(-)
-
---- lv2core.orig/lv2config.c
-+++ lv2core/lv2config.c
-@@ -1,5 +1,6 @@
- /*
- Copyright 2011 David Robillard <http://drobilla.net>
-+ Copyright 2011 Alessio Treglia <alessio at debian.org>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-@@ -254,9 +255,8 @@ discover_path(World* world, const char*
-
- /** Return the output include dir based on path (prepend DESTDIR). */
- static char*
--output_dir(const char* path)
-+output_dir(const char* path, const char* destdir)
- {
-- char* destdir = getenv("DESTDIR");
- if (destdir) {
- size_t len = strlen(destdir) + strlen(path);
- char* ret = malloc(len + 1);
-@@ -304,7 +304,7 @@ spec_cmp(const void* a_ptr, const void*
-
- /** Build an LV2 include tree for all specifications. */
- static void
--output_includes(World* world)
-+output_includes(World* world, const char* destdir, char* bundle_prefix)
- {
- /* Sort specs array. */
- qsort(world->specs, world->n_specs, sizeof(Spec), spec_cmp);
-@@ -344,7 +344,7 @@ output_includes(World* world)
- *(last_sep + 1) = '\0';
- }
-
-- char* full_dest = output_dir(spec->inc_dir);
-+ char* full_dest = output_dir(spec->inc_dir, destdir);
- size_t len = strlen(full_dest) + 1 + strlen(path);
- char* rel_inc_path = malloc(len + 1);
- snprintf(rel_inc_path, len + 1, "%s/%s", full_dest, path);
-@@ -368,10 +368,42 @@ output_includes(World* world)
- continue;
- }
-
-- /* Create link to this bundle in include tree. */
-- if (symlink(bundle_path, inc_path)) {
-- fprintf(stderr, "lv2config: Failed to create link (%s)\n",
-+ /* Strip the '/' out of the path to make this more robust and
-+ avoid any unexpected behaviour. */
-+ if ((bundle_prefix) && (bundle_prefix[0] != '\0')) {
-+ int last_sep = strlen(bundle_prefix) - 1; /* point to last char */
-+ /* Check if last char is LV2CORE_DIR_SEP[0]. */
-+ if (bundle_prefix[last_sep] == LV2CORE_DIR_SEP[0]) {
-+ /* If so, look backward to strip the whole path coming after
-+ the first LV2CORE_DIR_SEP of the trailing-slash-series;
-+ without this, it'll work fine with a single-trailing-slash
-+ like the following:
-+
-+ debian/lv2core/
-+
-+ but not with multiple-trailing-slashes, e.g:
-+ debian/lv2core///// */
-+ for (int i = last_sep - 1; i >= 0; i--) {
-+ if (bundle_prefix[i] == LV2CORE_DIR_SEP[0]) {
-+ last_sep = i;
-+ } else {
-+ break;
-+ }
-+ }
-+ /* Set null-character to the proper position. */
-+ bundle_prefix[last_sep] = '\0';
-+ }
-+ /* Create link to this bundle in include tree. */
-+ if (symlink(strstr(bundle_path, bundle_prefix)+strlen(bundle_prefix),
-+ inc_path)) {
-+ fprintf(stderr, "lv2config: Failed to create link (%s)\n",
-+ strerror(errno));
-+ }
-+ } else { /* If -b option isn't set, no need to strip out the path. */
-+ if (symlink(bundle_path, inc_path)) {
-+ fprintf(stderr, "lv2config: Failed to create link (%s)\n",
- strerror(errno));
-+ }
- }
-
- free(inc_path);
-@@ -399,31 +431,55 @@ usage(const char* name, bool error)
- int
- main(int argc, char** argv)
- {
-+ int c;
-+ char* bundle_prefix = NULL;
-+ char* destdir = NULL;
-+
- World world = { NULL, NULL, NULL, NULL, NULL, 0 };
- world.reader = serd_reader_new(
- SERD_TURTLE, &world, on_base, on_prefix, on_statement, NULL);
-
-- if (argc == 1) {
-+ while ((c = getopt(argc, argv, "b:d:h")) != -1) {
-+ switch (c) {
-+ case 'b' :
-+ bundle_prefix = optarg;
-+ break;
-+ case 'd' :
-+ destdir = optarg;
-+ break;
-+ case 'h' :
-+ return usage(argv[0], false);
-+ case '?' :
-+ if ((optopt == 'b') || (optopt == 'd')) {
-+ fprintf (stderr, "Option -%c requires an argument.\n", optopt);
-+ return usage(argv[0], true);
-+ } else {
-+ fprintf (stderr, "Unknown option -%c.\n", optopt);
-+ return usage(argv[0], true);
-+ }
-+ default:
-+ abort();
-+ }
-+ }
-+ if ((argc - optind) == 0) {
- /* lv2_config */
- discover_dir(&world, "/usr/local/lib/lv2", "/usr/local/include/lv2");
- discover_dir(&world, "/usr/lib/lv2", "/usr/include/lv2");
-- } else if (argv[1][0] == '-') {
-- return usage(argv[0], false);
-- } else if (argc == 2) {
-+ } else if ((argc - optind) == 1) {
- /* lv2_config INCLUDE_DIR */
- const char* lv2_path = getenv("LV2_PATH");
- if (!lv2_path) {
- lv2_path = LV2CORE_DEFAULT_LV2_PATH;
- }
-- discover_path(&world, lv2_path, argv[1]);
-- } else if (argc == 3) {
-+ discover_path(&world, lv2_path, argv[optind]);
-+ } else if ((argc - optind) == 2) {
- /* lv2_config INCLUDE_DIR LV2_PATH */
-- discover_path(&world, argv[2], argv[1]);
-+ discover_path(&world, argv[optind+1], argv[optind]);
- } else {
- return usage(argv[0], true);
- }
-
-- output_includes(&world);
-+ output_includes(&world, destdir, bundle_prefix);
-
- specs_free(&world);
- serd_reader_free(world.reader);
diff --git a/debian/patches/series b/debian/patches/series
index 7e28055..8128f10 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-0001-lv2config_bundle_prefix.patch
0002-serd_write_text_escape_buf_overflow.patch
diff --git a/debian/rules b/debian/rules
index fbce924..6b30688 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,7 +11,6 @@ override_dh_auto_configure:
override_dh_auto_build:
$(WAF)
- pod2man debian/dh_lv2config debian/dh_lv2config.1
override_dh_auto_clean:
$(WAF) distclean
@@ -21,12 +20,5 @@ override_dh_auto_install:
$(WAF) install --destdir=$(CURDIR)/debian/lv2core
rm -f $(CURDIR)/debian/lv2core/usr/include/lv2.h
-override_dh_install:
- dh_install
- debian/lv2core/usr/bin/lv2config \
- -d debian/lv2core \
- -b debian/lv2core \
- /usr/include/lv2 debian/lv2core/usr/lib/lv2
-
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
--
LV2 core packaging
More information about the pkg-multimedia-commits
mailing list