Source: drumgizmo
Version: 0.9.14-3
Tags: patch upstream
Control: block 798955 by -1

drumgizmo partially hard codes the location of semaphore.h by using the
following construct:

    #include <../include/semaphore.h>

With a non-glibc libc or a glibc with #798955 fixed, this will fail to
work as semaphore.h will live in /usr/include/<triplet>/semaphore.h.

I can offer two solutions:

 1. Renaming the drumgizmo's semaphore.h (e.g. to semaphore.hh). The
    attached patch implements that.
 2. Using #include_next (pretty old gcc extension that also works with
    clang).

Please consider applying the attached patch or requesting a solution
based on #include_next.

Helmut
--- drumgizmo-0.9.14.orig/src/Makefile.am
+++ drumgizmo-0.9.14/src/Makefile.am
@@ -88,9 +88,9 @@
 	rangemap.h \
 	sample.h \
 	saxparser.h \
-	semaphore.h \
+	semaphore.hh \
 	settings.h \
 	staminafilter.h \
 	syncedsettings.h \
 	thread.h \
-	versionstr.h
\ No newline at end of file
+	versionstr.h
--- drumgizmo-0.9.14.orig/src/semaphore.cc
+++ drumgizmo-0.9.14/src/semaphore.cc
@@ -24,7 +24,7 @@
  *  along with DrumGizmo; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
-#include "semaphore.h"
+#include "semaphore.hh"
 
 #include <hugin.hpp>
 #include <limits>
@@ -36,8 +36,7 @@
 #include "platform.h"
 
 #if DG_PLATFORM != DG_PLATFORM_WINDOWS
-// Make sure we don't include /this/ file's header...
-#include <../include/semaphore.h>
+#include <semaphore.h>
 #include <errno.h>
 #include <stdio.h>
 #include <sys/time.h>
--- drumgizmo-0.9.14.orig/src/semaphore.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/***************************************************************************
- *            semaphore.h
- *
- *  Sat Oct  8 17:44:13 CEST 2005
- *  Copyright  2005 Bent Bisballe Nyeng
- *  d...@aasimon.org
- ****************************************************************************/
-
-/*
- *  This file is part of DrumGizmo.
- *
- *  DrumGizmo is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  DrumGizmo 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 Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public License
- *  along with DrumGizmo; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-#pragma once
-
-#include <chrono>
-
-struct semaphore_private_t;
-
-class Semaphore
-{
-public:
-	Semaphore(std::size_t initial_count = 0);
-	~Semaphore();
-
-	void post();
-
-	//! Lock semaphore with timeout.
-	//! \returns true if the semaphore was locked, false on timeout.
-	bool wait(const std::chrono::milliseconds& timeout);
-
-	void wait();
-
-private:
-	struct semaphore_private_t *prv{nullptr};
-};
--- /dev/null
+++ drumgizmo-0.9.14/src/semaphore.hh
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/***************************************************************************
+ *            semaphore.h
+ *
+ *  Sat Oct  8 17:44:13 CEST 2005
+ *  Copyright  2005 Bent Bisballe Nyeng
+ *  d...@aasimon.org
+ ****************************************************************************/
+
+/*
+ *  This file is part of DrumGizmo.
+ *
+ *  DrumGizmo is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  DrumGizmo 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 Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with DrumGizmo; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+ */
+#pragma once
+
+#include <chrono>
+
+struct semaphore_private_t;
+
+class Semaphore
+{
+public:
+	Semaphore(std::size_t initial_count = 0);
+	~Semaphore();
+
+	void post();
+
+	//! Lock semaphore with timeout.
+	//! \returns true if the semaphore was locked, false on timeout.
+	bool wait(const std::chrono::milliseconds& timeout);
+
+	void wait();
+
+private:
+	struct semaphore_private_t *prv{nullptr};
+};
--- drumgizmo-0.9.14.orig/test/semaphoretest.cc
+++ drumgizmo-0.9.14/test/semaphoretest.cc
@@ -31,7 +31,7 @@
 #include <chrono>
 #include <iostream>
 
-#include "../src/semaphore.h"
+#include "../src/semaphore.hh"
 
 std::chrono::nanoseconds dist(const std::chrono::duration<float>& a,
                               const std::chrono::duration<float>& b)
--- drumgizmo-0.9.14.orig/src/drumkitloader.h
+++ drumgizmo-0.9.14/src/drumkitloader.h
@@ -31,7 +31,7 @@
 #include <mutex>
 
 #include "thread.h"
-#include "semaphore.h"
+#include "semaphore.hh"
 
 #include "drumkit.h"
 #include "settings.h"
--- drumgizmo-0.9.14.orig/src/audiocacheeventhandler.h
+++ drumgizmo-0.9.14/src/audiocacheeventhandler.h
@@ -31,7 +31,7 @@
 #include <atomic>
 
 #include "thread.h"
-#include "semaphore.h"
+#include "semaphore.hh"
 
 #include "audiocachefile.h"
 #include "audiocacheidmanager.h"
--- drumgizmo-0.9.14.orig/drumgizmo/output/jackaudio.h
+++ drumgizmo-0.9.14/drumgizmo/output/jackaudio.h
@@ -26,9 +26,9 @@
  */
 #pragma once
 #include <vector>
-#include <semaphore.h>
 
 #include "audiooutputengine.h"
+#include "semaphore.hh"
 #include "../jackclient.h"
 
 class JackAudioOutputEngine
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to