pkgsrc-WIP-changes archive

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

din: fix breakage on Darwin



Module Name:	pkgsrc-wip
Committed By:	Manuel Kuklinski <mk%asdfghasdfgh.de@localhost>
Pushed By:	mk
Date:		Mon Nov 6 18:38:20 2023 +0000
Changeset:	87ccb6d14238ccf2b4d570d79e9f00876e5c41b6

Modified Files:
	din/Makefile
	din/PLIST
	din/distinfo
	din/options.mk
	din/patches/patch-src_Makefile.am
	din/patches/patch-src_Makefile.in
	din/patches/patch-src_RtMidi.cpp

Log Message:
din: fix breakage on Darwin

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=87ccb6d14238ccf2b4d570d79e9f00876e5c41b6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 din/Makefile                      | 20 +++++++------
 din/PLIST                         |  2 +-
 din/distinfo                      |  6 ++--
 din/options.mk                    | 10 +------
 din/patches/patch-src_Makefile.am |  9 +++---
 din/patches/patch-src_Makefile.in | 59 ++-------------------------------------
 din/patches/patch-src_RtMidi.cpp  | 14 ++++++----
 7 files changed, 31 insertions(+), 89 deletions(-)

diffs:
diff --git a/din/Makefile b/din/Makefile
index faffed35e9..7175b79a3a 100644
--- a/din/Makefile
+++ b/din/Makefile
@@ -10,22 +10,24 @@ COMMENT=	Open source cross-platform sound synthesizer
 LICENSE=	gnu-gpl-v2
 
 USE_LANGUAGES=	c c++
-USE_TOOLS+=	autoconf autoreconf automake pkg-config gmake
+USE_TOOLS+=	automake autoconf autoreconf pkg-config gmake
 GNU_CONFIGURE=	yes
-CXXFLAGS+=	-std=c++11 -E
 
-LIBS+=		-ltcl -lSDL -lGL -lpthread
-LIBS.Darwin+=	-lSDLmain -lSDL -Wl,-framework,Cocoa
+CXXFLAGS+=	-std=c++20
 
-pre-configure:
-	${RUN} cd ${WRKSRC} && autoreconf -fvi || ${ECHO} Ignore the warnings from autoreconf
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+LIBS+=	-ltcl -lpthread -lSDLmain -lSDL -framework Cocoa -framework OpenGL
+.else
+LIBS+=	-ltcl -lSDL -lGl -lpthread
+.endif
 
 .include "options.mk"
 
-#.include "../../devel/boost-libs/buildlink3.mk"
-#.include "../../wip/rtaudio/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
 .include "../../lang/tcl/buildlink3.mk"
-.include "../../wip/sdl12-compat/buildlink3.mk"
+.include "../../devel/SDL/buildlink3.mk"
 .include "../../graphics/MesaLib/buildlink3.mk"
 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/din/PLIST b/din/PLIST
index 8ce842514d..571b65c6fa 100644
--- a/din/PLIST
+++ b/din/PLIST
@@ -1,4 +1,5 @@
 @comment $NetBSD$
+bin/din
 share/applications/din.desktop
 share/din/factory/2600
 share/din/factory/2600.help.tcl
@@ -501,4 +502,3 @@ share/din/factory/word_space.crv
 share/din/factory/write-svg.help.tcl
 share/icons/hicolor/scalable/apps/din.svg
 share/pixmaps/din.png
-@pkgdir bin
diff --git a/din/distinfo b/din/distinfo
index 103957f08c..bc70e726ae 100644
--- a/din/distinfo
+++ b/din/distinfo
@@ -3,6 +3,6 @@ $NetBSD: distinfo,v 1.32 2023/09/12 07:55:11 fox Exp $
 BLAKE2s (din-57.tar.gz) = 22e6611ca0c80ff57133997b4c9a77ce02c1bd31a878597192dcad8e895e124a
 SHA512 (din-57.tar.gz) = 03dfa45fb8c58f3f8dc739ec3c4c31029c544d9f0b1cf3dbae61643e5accd951ad65ebf19c078bfb1d30d3a8ccea7ffec2f1cb44f38bab1b07cfd2071361590c
 Size (din-57.tar.gz) = 3693381 bytes
-SHA1 (patch-src_Makefile.am) = 1668ae59af65ef5c2f7cc762981183fbf5d8a18f
-SHA1 (patch-src_Makefile.in) = 4dac169c38e4184a3046acd381cb4d1744ba6c64
-SHA1 (patch-src_RtMidi.cpp) = d1f0590d72d9775a16c620ffde48f2ad3eabe607
+SHA1 (patch-src_Makefile.am) = 5fd638028053e70b29874fd588b0d66d4417b40e
+SHA1 (patch-src_Makefile.in) = 3135bd8315cfdd65e7d885fc80f4baa89b7d94dc
+SHA1 (patch-src_RtMidi.cpp) = 6bc57729b79961fcd49cdca19fdefdfed3a8701a
diff --git a/din/options.mk b/din/options.mk
index f73c20897b..0c6be13fd7 100644
--- a/din/options.mk
+++ b/din/options.mk
@@ -2,7 +2,7 @@
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.din
 PKG_OPTIONS_OPTIONAL_GROUPS=	backend
-PKG_OPTIONS_GROUP.backend=	alsa jack coreaudio
+PKG_OPTIONS_GROUP.backend=	alsa jack
 PKG_SUGGESTED_OPTIONS=		jack
 
 .include "../../mk/bsd.options.mk"
@@ -24,11 +24,3 @@ CXXFLAGS+=	-D__UNIX_JACK__
 LIBS+=		-ljack
 .include "../../audio/jack/buildlink3.mk"
 .endif
-
-### Support MACOSX_CORE
-###
-.if !empty(PKG_OPTIONS:Mcoreaudio)
-CXXFLAGS+=	-D__MACOSX_CORE__
-LIBS+=		-framework CoreAudio -framework CoreFoundation -lpthread
-.include "../../audio/jack/buildlink3.mk"
-.endif
diff --git a/din/patches/patch-src_Makefile.am b/din/patches/patch-src_Makefile.am
index e529605057..cb6fbcb9e0 100644
--- a/din/patches/patch-src_Makefile.am
+++ b/din/patches/patch-src_Makefile.am
@@ -3,16 +3,15 @@ $NetBSD: patch-src_Makefile.am,v 1.14 2022/10/01 09:46:56 fox Exp $
 Removed tcl8.6, asound and jack flags, this is now handled in the pkgsrc
 script.
 
---- src/Makefile.am.orig	2023-07-17 16:36:26.000000000 +0000
+--- src/Makefile.am.orig	2022-09-22 14:07:29.000000000 +0000
 +++ src/Makefile.am
-@@ -1,7 +1,8 @@
+@@ -1,7 +1,7 @@
  #dinincludedir = $(pkgsrcdir)
  
 -AM_CXXFLAGS = -I /usr/include/tcl8.6 -Wall -D_THREAD_SAFE -DHAVE_OPENGL -D__LICENSED__ -D__SVG__ -D__GPL20__ -D__BOOST_TIME__ -DPREFIX=\"@prefix@\"
 -LIBS +=  -ltcl8.6 -lSDL -lGL -lpthread -lasound
-+
-+AM_CXXFLAGS = -Wall -D_THREAD_SAFE -DHAVE_OPENGL -D__LICENSED__ -D__SVG__ -D__GPL20__ -DPREFIX=\"@prefix@\"
-+LIBS +=  -lSDL -lGL -lpthread
++AM_CXXFLAGS = -Wall -D_THREAD_SAFE -DHAVE_OPENGL -D__LICENSED__ -D__SVG__ -D__GPL20__ -D__BOOST_TIME__ -DPREFIX=\"@prefix@\"
++LIBS += @LIBS@
  
  bin_PROGRAMS = din
  
diff --git a/din/patches/patch-src_Makefile.in b/din/patches/patch-src_Makefile.in
index 2850598716..f3aa229b8d 100644
--- a/din/patches/patch-src_Makefile.in
+++ b/din/patches/patch-src_Makefile.in
@@ -2,67 +2,14 @@ $NetBSD: patch-src_Makefile.in,v 1.3 2021/12/12 23:26:01 fox Exp $
 
 Removed linker flags, it is now handled by the pkgsrc script.
 
---- src/Makefile.in.orig	2023-07-19 20:44:05.000000000 +0000
+--- src/Makefile.in.orig	2021-12-12 12:44:12.475294365 +0000
 +++ src/Makefile.in
-@@ -1,7 +1,7 @@
--# Makefile.in generated by automake 1.16.3 from Makefile.am.
-+# Makefile.in generated by automake 1.16.5 from Makefile.am.
- # @configure_input@
- 
--# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
- 
- # This Makefile.in is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
-@@ -264,8 +264,6 @@ am__define_uniq_tagged_files = \
-   unique=`for i in $$list; do \
-     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-   done | $(am__uniquify_input)`
--ETAGS = etags
--CTAGS = ctags
- am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
- 	$(top_srcdir)/mkinstalldirs
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-@@ -280,6 +278,8 @@ CC = @CC@
- CCDEPMODE = @CCDEPMODE@
- CFLAGS = @CFLAGS@
- CPPFLAGS = @CPPFLAGS@
-+CSCOPE = @CSCOPE@
-+CTAGS = @CTAGS@
- CXX = @CXX@
- CXXDEPMODE = @CXXDEPMODE@
- CXXFLAGS = @CXXFLAGS@
-@@ -289,6 +289,7 @@ DEPDIR = @DEPDIR@
- ECHO_C = @ECHO_C@
- ECHO_N = @ECHO_N@
- ECHO_T = @ECHO_T@
-+ETAGS = @ETAGS@
- EXEEXT = @EXEEXT@
- INSTALL = @INSTALL@
- INSTALL_DATA = @INSTALL_DATA@
-@@ -297,7 +298,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -242,7 +242,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  LDFLAGS = @LDFLAGS@
  LIBOBJS = @LIBOBJS@
 -LIBS = @LIBS@ -ltcl8.6 -lSDL -lGL -lpthread -lasound
-+LIBS = @LIBS@ -lSDL -lGL -lpthread
++LIBS = @LIBS@
  LTLIBOBJS = @LTLIBOBJS@
  MAKEINFO = @MAKEINFO@
  MKDIR_P = @MKDIR_P@
-@@ -362,7 +363,7 @@ target_alias = @target_alias@
- top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
--AM_CXXFLAGS = -I /usr/include/tcl8.6 -Wall -D_THREAD_SAFE -DHAVE_OPENGL -D__LICENSED__ -D__SVG__ -D__GPL20__ -D__BOOST_TIME__ -DPREFIX=\"@prefix@\"
-+AM_CXXFLAGS = -Wall -D_THREAD_SAFE -DHAVE_OPENGL -D__LICENSED__ -D__SVG__ -D__GPL20__ -DPREFIX=\"@prefix@\"
- din_SOURCES = alarm.cc arrow_button.cc audio.cc authors_note.cc \
- 	autoflip.cc autopause.cc autorotator.cc ball.cc ball_ops.cc \
- 	basic_editor.cc beat2value.cc binaural_drone.cc \
-@@ -717,7 +718,6 @@ cscopelist-am: $(am__tagged_files)
- 
- distclean-tags:
- 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
--
- distdir: $(BUILT_SOURCES)
- 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
- 
diff --git a/din/patches/patch-src_RtMidi.cpp b/din/patches/patch-src_RtMidi.cpp
index 6b62a84b53..87b32dec22 100644
--- a/din/patches/patch-src_RtMidi.cpp
+++ b/din/patches/patch-src_RtMidi.cpp
@@ -2,16 +2,18 @@ $NetBSD: patch-src_RtMidi.cpp,v 1.1 2023/09/12 07:55:11 fox Exp $
 
 Use process scheduling from NetBSD instead of pthread.
 
---- src/RtMidi.cpp.orig	2023-06-26 10:02:16.000000000 +0000
+--- src/RtMidi.cpp.orig	2023-09-12 07:28:28.679052163 +0000
 +++ src/RtMidi.cpp
-@@ -3607,7 +3607,9 @@ void MidiOutJack :: sendMessage( const u
-   if ( size + sizeof(nBytes) > (size_t) data->buffMaxWrite )
+@@ -3608,8 +3608,11 @@ void MidiOutJack :: sendMessage( const u
        return;
  
--  while ( jack_ringbuffer_write_space(data->buff) < sizeof(nBytes) + size )
-+  while ( jack_ringbuffer_write_space(data->buff) < sizeof(nBytes) + size )#if defined(__NetBSD__)
+   while ( jack_ringbuffer_write_space(data->buff) < sizeof(nBytes) + size )
++#if defined(__NetBSD__) || defined(__APPLE__)
 +      sched_yield();
 +#else
        pthread_yield();
- 
+-
++#endif
    // Write full message to buffer
+   jack_ringbuffer_write( data->buff, ( char * ) &nBytes, sizeof( nBytes ) );
+   jack_ringbuffer_write( data->buff, ( const char * ) message, nBytes );


Home | Main Index | Thread Index | Old Index