Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/din/files/, media-sound/din/
Date: Mon, 14 Sep 2020 07:44:07
Message-Id: 1600069439.d8d904cad8a59070471356715387c328647f9e7d.fordfrog@gentoo
1 commit: d8d904cad8a59070471356715387c328647f9e7d
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 14 07:43:46 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 14 07:43:59 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8d904ca
7
8 media-sound/din: bump to 48
9
10 Package-Manager: Portage-3.0.6, Repoman-3.0.1
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 media-sound/din/Manifest | 1 +
14 media-sound/din/din-48.ebuild | 57 ++++++++++++++++++++++
15 .../din/files/din-48-fix-random-constants.patch | 15 ++++++
16 media-sound/din/files/din-48-makefile.patch | 14 ++++++
17 4 files changed, 87 insertions(+)
18
19 diff --git a/media-sound/din/Manifest b/media-sound/din/Manifest
20 index ca7e7fae441..b67fa2f8d7e 100644
21 --- a/media-sound/din/Manifest
22 +++ b/media-sound/din/Manifest
23 @@ -1 +1,2 @@
24 DIST din-47.1.tar.gz 3667502 BLAKE2B 21621e4e0909d9da534901811ae28ac5adf226387e2ea47476576fd1d4c45925c460babff04489a54e5e51d1f9ea916389168315108d80965df7b89868150786 SHA512 883008fa54751cd626ee60a5c5a4785a82680c229adefc2c8a86bfa28bf6be6549500c1bfe4661028ae8a2015383a2d9e6fe1d8992476d49576a999eea26ba17
25 +DIST din-48.tar.gz 3673917 BLAKE2B 90e29efcc159936e7dca5b1deba07d6ddf23fc6878053283c1723eaf73c9b06903d274e471c3043d57fb2cb923eb9516a06362590a6b555884dc1b7cb7b6e9c1 SHA512 3d54c3db23fe909a3664412f1bbba3898b83184d19c4b04f4432cd0bff0dede01d017cebe36980a3f8158ffbb663e09dd83a0de7206247b47fcc1a9f3b4cc940
26
27 diff --git a/media-sound/din/din-48.ebuild b/media-sound/din/din-48.ebuild
28 new file mode 100644
29 index 00000000000..14fecc8a11c
30 --- /dev/null
31 +++ b/media-sound/din/din-48.ebuild
32 @@ -0,0 +1,57 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit autotools eutils xdg
39 +
40 +DESCRIPTION="a software musical instrument and audio synthesizer"
41 +HOMEPAGE="https://dinisnoise.org/"
42 +SRC_URI="https://archive.org/download/dinisnoise_source_code/${P}.tar.gz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~x86"
47 +IUSE="+alsa jack"
48 +
49 +RDEPEND="
50 + dev-lang/tcl:0=
51 + media-libs/libsdl:=
52 + virtual/glu
53 + virtual/opengl
54 + alsa? ( media-libs/alsa-lib )
55 + jack? ( virtual/jack )
56 +"
57 +DEPEND="
58 + ${RDEPEND}
59 + dev-libs/boost
60 +"
61 +BDEPEND="
62 + virtual/pkgconfig
63 +"
64 +
65 +REQUIRED_USE="|| ( alsa jack )"
66 +
67 +PATCHES=(
68 + "${FILESDIR}/${P}-makefile.patch"
69 + "${FILESDIR}/${P}-fix-random-constants.patch"
70 +)
71 +
72 +src_prepare() {
73 + default
74 +
75 + edos2unix pixmaps/${PN}.desktop
76 +
77 + use jack && (sed -i "s/-lasound/-ljack/g" src/Makefile.am || die "Failed to fix jack linking")
78 +
79 + eautoreconf
80 +}
81 +
82 +src_configure() {
83 + # Jack takes over alsa.
84 + local sound_engine
85 +
86 + use jack && sound_engine="UNIX_JACK" || sound_engine="LINUX_ALSA"
87 +
88 + econf CXXFLAGS="${CXXFLAGS} -D__${sound_engine}__"
89 +}
90
91 diff --git a/media-sound/din/files/din-48-fix-random-constants.patch b/media-sound/din/files/din-48-fix-random-constants.patch
92 new file mode 100644
93 index 00000000000..8e60204ad42
94 --- /dev/null
95 +++ b/media-sound/din/files/din-48-fix-random-constants.patch
96 @@ -0,0 +1,15 @@
97 +diff --git a/src/random.h b/src/random.h
98 +index d5a2bc6..38f0d14 100644
99 +--- a/src/random.h
100 ++++ b/src/random.h
101 +@@ -16,8 +16,8 @@
102 + const int N = 624;
103 + const int M = 397;
104 + const unsigned int MATRIX_A = 0x9908b0df; /* constant vector a */
105 +-const int UPPER_MASK = 0x80000000; /* most significant w-r bits */
106 +-const int LOWER_MASK = 0x7fffffff; /* least significant r bits */
107 ++const unsigned int UPPER_MASK = 0x80000000; /* most significant w-r bits */
108 ++const unsigned int LOWER_MASK = 0x7fffffff; /* least significant r bits */
109 +
110 + static unsigned int mt[N]; /* the array for the state vector */
111 + static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */
112
113 diff --git a/media-sound/din/files/din-48-makefile.patch b/media-sound/din/files/din-48-makefile.patch
114 new file mode 100644
115 index 00000000000..5a37359106d
116 --- /dev/null
117 +++ b/media-sound/din/files/din-48-makefile.patch
118 @@ -0,0 +1,14 @@
119 +diff --git a/src/Makefile.am b/src/Makefile.am
120 +index df480f2..d665bbf 100644
121 +--- a/src/Makefile.am
122 ++++ b/src/Makefile.am
123 +@@ -1,7 +1,7 @@
124 + #dinincludedir = $(pkgsrcdir)
125 +
126 +-AM_CXXFLAGS = -I /usr/include/tcl8.6 -Wall -D_THREAD_SAFE -DHAVE_OPENGL -D__LICENSED__ -D __SVG__ -D__GPL20__ -D __BOOST_TIME__ -DPREFIX=\"@prefix@\"
127 +-LIBS += -ltcl8.6 -lSDL -lGL -lpthread -lasound
128 ++AM_CXXFLAGS = -Wall -D_THREAD_SAFE -DHAVE_OPENGL -D__LICENSED__ -D __SVG__ -D__GPL20__ -D __BOOST_TIME__ -DPREFIX=\"@prefix@\"
129 ++LIBS += -ltcl -lSDL -lGL -lpthread -lasound
130 +
131 + bin_PROGRAMS = din
132 + din_SOURCES = alarm.cc arrow_button.cc audio.cc authors_note.cc ball.cc ball_ops.cc basic_editor.cc beat2value.cc binaural_drone.cc binaural_drones.cc bit_display.cc box_selector.cc button.cc capturer.cc checkbutton.cc chrono.cc circler.cc command.cc compressor.cc console.cc console_iterator.cc countries.cc cross_button.cc curve.cc curve_display.cc curve_editor.cc curve_library.cc curve_mixer.cc curve_picker.cc curve_samples.cc custom_periodic.cc delay.cc din.cc din_info.cc drone.cc fader.cc fft.cc field.cc filled_button.cc font.cc font_editor.cc fractaliser.cc globals.cc glyph.cc gravity.cc hit.cc help.cc item_list.cc keyboard_keyboard.cc label.cc levels.cc line.cc lissajous.cc listeners.cc main.cc menu.cc mesh.cc midi_in.cc minus_button.cc mocap.cc modulator.cc mondrian.cc morpher.cc morse_code.cc mouse_slider.cc multi_curve.cc note.cc noiser.cc number.cc oscilloscope.cc phrasor.cc play.cc plugin.cc plugin_browser.cc plus_button.cc point_modulator.cc range.cc recorder.cc rect.cc
133 rose_milker.cc scale_info.cc scale_notes.cc scalelist.cc separator.cc settings.cc sine_mixer.cc slit.cc solver.cc spiraler.cc starrer.cc superformula.cc tap_bpm.cc tcl_interp.cc textboard.cc tokenizer.cc trail.cc triggered_note.cc ui.cc ui_sin_cos_radius.cc viewwin.cc warper.cc widget.cc kiss_fft.c RtAudio.cpp RtMidi.cpp