public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [ITA} timidity++
@ 2023-09-20 11:10 Takashi Yano
  2023-09-22 14:54 ` Jon Turney
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Yano @ 2023-09-20 11:10 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

I'd like to adopt the timidity++ package.
Thanks in advance.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

[-- Attachment #2: 2.13.2-sysconfdir.patch --]
[-- Type: text/plain, Size: 525 bytes --]

--- origsrc/TiMidity++-2.13.2/timidity/timidity.h	2004-05-01 22:28:05.000000000 -0500
+++ src/TiMidity++-2.13.2/timidity/timidity.h	2011-12-25 01:17:11.334129600 -0600
@@ -41,7 +41,7 @@
 
 /* You could specify a complete path, e.g. "/etc/timidity.cfg", and
    then specify the library directory in the configuration file. */
-/* #define CONFIG_FILE "/etc/timidity.cfg" */
+#define CONFIG_FILE "/etc/timidity++.cfg"
 #ifndef CONFIG_FILE
 #  ifdef DEFAULT_PATH
 #    define CONFIG_FILE DEFAULT_PATH "/timidity.cfg"

[-- Attachment #3: 2.14.0-cygwin.patch --]
[-- Type: text/plain, Size: 2020 bytes --]

--- origsrc/TiMidity++-2.14.0/Makefile.am	2011-12-29 17:20:29.000000000 -0600
+++ src/TiMidity++-2.14.0/Makefile.am	2013-07-26 02:28:49.699627700 -0500
@@ -25,8 +25,8 @@ SUBDIRS = \
 	utils \
 	libarc \
 	libunimod \
-	interface \
 	timidity \
+	interface \
 	windrv \
 	doc \
 	script \
--- origsrc/TiMidity++-2.14.0/configure.in	2012-06-28 09:14:25.000000000 -0500
+++ src/TiMidity++-2.14.0/configure.in	2013-07-26 02:29:49.175029500 -0500
@@ -229,7 +229,12 @@ case "$target" in
 #    so="so"
 #  ;;
 
-  *-*-cygwin*|*-*-mingw*)
+  *-*-cygwin*)
+    SHLD="echo ../timidity/libtimidity.exe.a | xargs $CC -shared"
+    so="dll"
+    CYGWIN=yes
+    ;;
+  *-*-mingw*)
     EXTRADEFS="-D__W32__"
     # ??
     case "x${CC} " in
@@ -577,7 +582,7 @@ if test "x$MSYS" = xyes ; then
 	esac
 fi
 dnl Cygnus Mingw32 mmsystem check
-if test "x$MSYS" = xyes ; then
+if test "x$MSYS" = xyes || test "x$CYGWIN" = xyes ; then
   AC_CACHE_CHECK(Cygwin new mmsystem,timidity_cv_header_new_mmsystem,
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <windows.h>
@@ -1620,7 +1625,9 @@ if test "$NEEDDLOPEN" = "yes"; then
   dnl needless?
   dnl EXTRADEFS="$EXTRADEFS \$(DEF_SHLIB_DIR)"
   if test "x$GCC" = xyes; then
-    if test "x$timidity_cv_ccoption_rdynamic" = xyes; then
+    if test "x$CYGWIN" = xyes; then
+      timidity_LDFLAGS="-Wl,--export-all,--out-implib,libtimidity.exe.a"
+    elif test "x$timidity_cv_ccoption_rdynamic" = xyes; then
       timidity_LDFLAGS="-rdynamic"
     else
       timidity_LDFLAGS="-Wl,--export-dynamic"
--- origsrc/TiMidity++-2.14.0/timidity/Makefile.am	2008-03-29 21:31:07.000000000 -0500
+++ src/TiMidity++-2.14.0/timidity/Makefile.am	2013-07-26 02:30:17.167630600 -0500
@@ -467,7 +469,7 @@ endif
 endif
 
 $(top_builddir)/interface/libinterface.a $(W32GUI_RES):
-	cd $(top_builddir)/interface; $(MAKE)
+	cd $(top_builddir)/interface; $(MAKE) libinterface.a
 
 $(top_builddir)/libarc/libarc.a:
 	cd $(top_builddir)/libarc; $(MAKE)

[-- Attachment #4: timidity++.cygport --]
[-- Type: text/plain, Size: 2260 bytes --]

inherit tcl

NAME="timidity++"
VERSION=2.15.0
RELEASE=1
LICENSE="GPL-2.0-only"
CATEGORY="Audio"
SUMMARY="MIDI to WAV converter"
DESCRIPTION="TiMidity++ is a software synthesizer.  It can play MIDI files by
converting them into PCM waveform data; give it a MIDI data along with digital
instrument data files, then it synthesizes them in real-time, and plays.  It
can not only play sounds, but also can save the generated waveforms into hard
disks as various audio file formats."
HOMEPAGE="http://timidity.sourceforge.net/"
SRC_URI="mirror://sourceforge/timidity/TiMidity++-${VERSION}.tar.xz"
SRC_DIR="TiMidity++-${VERSION}"

PATCH_URI="
	2.14.0-cygwin.patch
	2.13.2-sysconfdir.patch
"

PKG_NAMES="${NAME} ${NAME}-gtk ${NAME}-tcltk emacs-timidity"
timidity___REQUIRES="soundfont-fluid-gm"
timidity___CONTENTS="usr/bin/ usr/share/doc/ usr/share/man/ usr/share/pixmaps/"
timidity___gtk_SUMMARY="${SUMMARY} (GTK+ GUI)"
timidity___gtk_CONTENTS="usr/lib/timidity/if_gtk.* usr/share/applications/*-ig.*"
timidity___tcltk_SUMMARY="${SUMMARY} (Tk GUI)"
timidity___tcltk_CONTENTS="usr/lib/timidity/bitmaps/ usr/lib/timidity/*tcl* usr/share/applications/*-ik.*"
emacs_timidity_CONTENTS="usr/lib/timidity/if_emacs.* usr/share/emacs/"

CPPFLAGS+=" -DFIONREAD=TIOCINQ -DUSE_INTERP_RESULT"
CYGCONF_ARGS="
	--build=${ARCH}-pc-cygwin
	--localstatedir=/var/lib/timidity++
	--enable-audio=ao,oss,flac,speex,vorbis
	--enable-interface=ncurses,network,server,vt100
	--enable-dynamic=emacs,gtk,tcltk
	--enable-network
	--enable-spectrogram
	--enable-spline=cubic
	--with-tcl-includes=/usr/include
	--with-tk-includes=/usr/include
	wapi_cv_func_LoadLibrary=no
"

src_compile() {
	cd ${S}
	autoreconf
	lndirs
	cd ${B}
	cygconf
	cygmake
}

src_install() {
	cd ${B}
	cyginstall

	cd ${B}/interface
	DESTDIR=${D} make install.bitmaps
	cd ${B}
	doicon ${S}/interface/pixmaps/timidity.xpm
	make_desktop_entry "timidity -ik" TkMidity timidity "AudioVideo;Audio;Midi"
	make_desktop_entry "timidity -ig" TiMidity timidity "AudioVideo;Audio;Midi"
}
DOCS="doc/C/README.tk"
DIFF_EXCLUDES="configure Makefile.in aclocal.m4 config.h.in tclIndex"

BUILD_REQUIRES="tcl-tk-devel libao-devel flac-devel speex-devel libvorbis-devel"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ITA} timidity++
  2023-09-20 11:10 [ITA} timidity++ Takashi Yano
@ 2023-09-22 14:54 ` Jon Turney
  2023-09-22 20:44   ` Takashi Yano
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Turney @ 2023-09-22 14:54 UTC (permalink / raw)
  To: Takashi Yano, cygwin-apps

On 20/09/2023 12:10, Takashi Yano via Cygwin-apps wrote:

It seems like all the attachments have dos-style (crlf) line endings.

Is this just an artefact of sending them over email?

> timidity++.cygport
> 
> CYGCONF_ARGS="
> 	--build=${ARCH}-pc-cygwin

Hmmm... I'm not sure doing this and then only autoreconf is the correct 
way to solve this.

It should be that just using "WANT_AUTOCONF=2.1" is enough, but that 
gives me some other errors.

Does upstream have a recommendation on what versions of autotools to use 
to build this?

Otherwise, looks good.

I added this to your packages.

Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ITA} timidity++
  2023-09-22 14:54 ` Jon Turney
@ 2023-09-22 20:44   ` Takashi Yano
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Yano @ 2023-09-22 20:44 UTC (permalink / raw)
  To: cygwin-apps

On Fri, 22 Sep 2023 15:54:07 +0100
Jon Turney wrote:
> On 20/09/2023 12:10, Takashi Yano via Cygwin-apps wrote:
> 
> It seems like all the attachments have dos-style (crlf) line endings.
> 
> Is this just an artefact of sending them over email?
> 
> > timidity++.cygport
> > 
> > CYGCONF_ARGS="
> > 	--build=${ARCH}-pc-cygwin
> 
> Hmmm... I'm not sure doing this and then only autoreconf is the correct 
> way to solve this.
> 
> It should be that just using "WANT_AUTOCONF=2.1" is enough, but that 
> gives me some other errors.
> 
> Does upstream have a recommendation on what versions of autotools to use 
> to build this?

Thanks for the advice.
WAIT_AUTOCONF=2.5 works for me.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-22 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20 11:10 [ITA} timidity++ Takashi Yano
2023-09-22 14:54 ` Jon Turney
2023-09-22 20:44   ` Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).