[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#910299: marked as done (drumgizmo hard codes location of semaphore.h)



Your message dated Tue, 11 Feb 2020 17:09:01 +0100
with message-id <bf9e2486-8f08-bf63-08d3-306162f64114@kabelmail.de>
and subject line Re: drumgizmo hard codes location of semaphore.h
has caused the Debian Bug report #910299,
regarding drumgizmo hard codes location of semaphore.h
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
910299: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910299
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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
- *  deva@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
+ *  deva@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

--- End Message ---
--- Begin Message ---
Version: 0.9.18.1-1

fixed by upstream.

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply to: