Bug 28363

Summary: New port: audacity-0.95 - a graphical waveform editor
Product: Ports & Packages Reporter: GNATS administrator <gnats-admin>
Component: Individual Port(s)Assignee: Ade Lovett <ade>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description GNATS administrator freebsd_committer freebsd_triage 2001-06-23 12:00:09 UTC
     This is a port of audacity-0.95, a graphical waveform editor.

     It uses wxWindows/GTK for its GUI.

     MP3 import depends on libxaudio, which seems to be available for
     FreeBSD in the meantime, but where I am not sure about the
     license/distribution issues yet. It is not contained in the
     source distribution, like for instance the Linux version is.
     So I did not add it on my own, I need to sort this out with the 
     authors first.

Fix: 

Have fun,
Marc--leEUj3zd7osUHEKQhPdEvhn7B6COM4Wng8y4az0SmfQAmiOV
Content-Type: text/plain; name="file.shar"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.shar"

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	audacity
#	audacity/files
#	audacity/files/patch-Help
#	audacity/distinfo
#	audacity/pkg-comment
#	audacity/Makefile
#	audacity/pkg-plist
#	audacity/pkg-descr
#
echo c - audacity
mkdir -p audacity > /dev/null 2>&1
echo c - audacity/files
mkdir -p audacity/files > /dev/null 2>&1
echo x - audacity/files/patch-Help
sed 's/^X//' >audacity/files/patch-Help << 'END-of-audacity/files/patch-Help'
X--- Help.cpp.orig	Sat Jun 23 11:27:36 2001
X+++ Help.cpp	Sat Jun 23 11:28:46 2001
X@@ -49,7 +49,7 @@
X void InitHelp(wxWindow *parent)
X {
X   if (!gHelp) {
X-	wxString defaultLoc = wxGetCwd() + "/audacity-help.htb";
X+	wxString defaultLoc = wxGetCwd() + "../share/doc/audacity/audacity-help.htb";
X 
X 	wxString helpFilePath = gPrefs->Read("/Help/HelpFilePath", defaultLoc);
X 
END-of-audacity/files/patch-Help
echo x - audacity/distinfo
sed 's/^X//' >audacity/distinfo << 'END-of-audacity/distinfo'
XMD5 (audacity-src-0.95.tgz) = b5ebe5657d2c0cd14d465c8f5974f114
END-of-audacity/distinfo
echo x - audacity/pkg-comment
sed 's/^X//' >audacity/pkg-comment << 'END-of-audacity/pkg-comment'
XAudacity is a GUI editor for digital audio waveforms
END-of-audacity/pkg-comment
echo x - audacity/Makefile
sed 's/^X//' >audacity/Makefile << 'END-of-audacity/Makefile'
X# New ports collection makefile for:	audacity
X# Date created:				21 Jul 2001
X# Whom:					Marc van Woerkom <3d@freebsd.org>
X#
X# $FreeBSD: $
X#
X
XPORTNAME=	audacity
XPORTVERSION=	0.95
XCATEGORIES=	audio
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR= audacity
XDISTNAME= 	${PORTNAME}-src-${PORTVERSION}
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	3d@freebsd.org
X
XLIB_DEPENDS=	wx_gtk.2:${PORTSDIR}/x11-toolkits/wxgtk
X
XGNU_CONFIGURE=	yes
X
X# Xaudio MP3 support for FreeBSD is not present in source tarball
X# However there is a FreeBSD version available from
X# http://www.xaudio.com
X# I need to sort things out (addition? separate download?)
XCONFIGURE_ARGS=	--without-xaudio
X
XUSE_GMAKE=	yes
XUSE_NEWGCC=	yes
XUSE_GTK=	yes
X
XUSE_X_PREFIX=	yes
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/audacity ${PREFIX}/bin/audacity
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${PREFIX}/share/doc/audacity
X	${INSTALL_DATA} ${WRKSRC}/audacity-help.htb ${PREFIX}/share/doc/audacity/audacity-help.htb
X.endif
X
X.include <bsd.port.mk>
END-of-audacity/Makefile
echo x - audacity/pkg-plist
sed 's/^X//' >audacity/pkg-plist << 'END-of-audacity/pkg-plist'
Xbin/audacity
Xshare/doc/audacity/audacity-help.htb
X@dirrm share/doc/audacity
END-of-audacity/pkg-plist
echo x - audacity/pkg-descr
sed 's/^X//' >audacity/pkg-descr << 'END-of-audacity/pkg-descr'
XAudacity is a program that lets you manipulate digital audio
Xwaveforms. In addition to letting you record sounds directly from
Xwithin the program, it imports many sound file formats, including
XWAV, AIFF, AU, IRCAM, MP3, and Ogg Vorbis. It supports all
Xcommon editing operations such as Cut, Copy, and Paste, plus it will
Xmix tracks and let you apply plug-in effects to any part of a sound. It
Xalso has a built-in amplitude envelope editor, a customizable
Xspectrogram mode and a frequency analysis window for audio
Xanalysis applications. 
X
XWWW: http://www.cs.cmu.edu/~music/audacity
END-of-audacity/pkg-descr
exit
Comment 1 van.woerkom 2001-06-23 13:17:58 UTC
I made a mistake with the patch that sets the default helpfile path.
Rather change it into this hack:

--- Help.cpp.orig	Mon Apr 30 01:07:29 2001
+++ Help.cpp	Sat Jun 23 13:40:33 2001
@@ -49,7 +49,7 @@
 void InitHelp(wxWindow *parent)
 {
   if (!gHelp) {
-	wxString defaultLoc = wxGetCwd() + "/audacity-help.htb";
+	wxString defaultLoc = "/usr/X11R6/share/doc/audacity/audacity-help.htb";
 
 	wxString helpFilePath = gPrefs->Read("/Help/HelpFilePath", defaultLoc);
Comment 2 AnarCat 2001-09-18 07:28:12 UTC
Hi.

"This pr can be closed". :)

I don't know why this PR is still opened, but I worked on a port for
audacity on my own side only to be told by the Audacity people that
there was already a port made. :)

So I bring here my contribution. I made a merge of this port (0.95) with
the port I was doing (0.96) and I think the result is quite good. What I
changed:

1- version 0.95->0.96
2- libid3 dependency (included some CONFIG_ENV hacks)
3- removal of USE_GTK dependency (included by wxgtk dep)
4- removal of the --without-xaudio flag (detected automagically)
5- finer control over the location of the help file (PREFIX-independant)
6- added libvorbis support toggle

About 4-. --without-xaudio is not necessary. The configure script
detects the OS and tells it cannot compile on FBSD. I add a ifdef for
WITH_MP3, to toggle the compilation of the port with libmpeg3, the
alternate mp3 lib. For now, this is broken. Anyways, by 1.0, Audacity
will be using libmad.

About 6-... As noted in comments, I would like to put a message before
configure is called to tell the admin he can use WITHOUT_VORBIS to avoid
building in vorbis support... How do I do that?

This is the generic problem of "how do I talk to the user in a
makefile". :) I don't have any handy example.

Anyways, here are the diffs to the original port, followed by a complete
shar of the new port itself.

Note that the patch in the original files dir must be removed and
replace by the 2 new patches.

--- distinfo.orig	Mon Sep 17 20:44:25 2001
+++ distinfo	Mon Sep 17 20:45:37 2001
@@ -1 +1 @@
-MD5 (audacity-src-0.95.tgz) = b5ebe5657d2c0cd14d465c8f5974f114
+MD5 (audacity-src-0.96.tgz) = dc4bfaa6bf00108963485e1052a8452c


--- Makefile.orig	Mon Sep 17 20:44:35 2001
+++ Makefile	Tue Sep 18 02:23:28 2001
@@ -6,30 +6,43 @@
 #
 
 PORTNAME=	audacity
-PORTVERSION=	0.95
+PORTVERSION=	0.96
 CATEGORIES=	audio
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= audacity
-DISTNAME= 	${PORTNAME}-src-${PORTVERSION}
+MASTER_SITE_SUBDIR=	${PORTNAME}
+DISTNAME=	${PORTNAME}-src-${PORTVERSION}
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	3d@freebsd.org
 
-LIB_DEPENDS=	wx_gtk.2:${PORTSDIR}/x11-toolkits/wxgtk
+LIB_DEPENDS=	wx_gtk.2:${PORTSDIR}/x11-toolkits/wxgtk \
+		id3-3.7.13:${PORTSDIR}/audio/id3lib
 
-GNU_CONFIGURE=	yes
-
-# Xaudio MP3 support for FreeBSD is not present in source tarball
-# However there is a FreeBSD version available from
-# http://www.xaudio.com
-# I need to sort things out (addition? separate download?)
-CONFIGURE_ARGS=	--without-xaudio
+.if defined(WITH_MP3)
+BROKEN=		libmpeg3 doesn't compile, waiting 1.0 for libmad support
+CONFIGURE_ARGS+=        --with-libmpeg3
+.else
+# message to say MP3 support is not compiled in because xaudio does not
+# compile on FreeBSD either
+.endif
 
+GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_NEWGCC=	yes
-USE_GTK=	yes
 
 USE_X_PREFIX=	yes
+
+AUDACITY_HELP_DIR=	${PREFIX}/share/doc/audacity
+
+CONFIGURE_ENV+=	LDFLAGS="-L${LOCALBASE}/lib" \
+		CPPFLAGS="-I${LOCALBASE}/include" \
+		CFLAGS="-DAUDACITY_HELP_DIR=${AUDACITY_HELP_DIR}"
+
+.if !defined(WITHOUT_VORBIS)
+CONFIGURE_ARGS+=	--with-vorbis
+LIB_DEPENDS+=	vorbis.0:${PORTSDIR}/audio/libvorbis
+# this should also tell the user how to avoid compiling with vorbis
+.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/audacity ${PREFIX}/bin/audacity


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	audacity
#	audacity/files
#	audacity/files/patch::Help.h
#	audacity/files/patch::Help.cpp
#	audacity/distinfo
#	audacity/pkg-comment
#	audacity/Makefile
#	audacity/pkg-plist
#	audacity/pkg-descr
#
echo c - audacity
mkdir -p audacity > /dev/null 2>&1
echo c - audacity/files
mkdir -p audacity/files > /dev/null 2>&1
echo x - audacity/files/patch::Help.h
sed 's/^X//' >audacity/files/patch::Help.h << 'END-of-audacity/files/patch::Help.h'
X--- Help.h.orig	Mon Sep 17 16:52:09 2001
X+++ Help.h	Mon Sep 17 16:52:53 2001
X@@ -11,6 +11,10 @@
X #ifndef __AUDACITY_HELP__
X #define __AUDACITY_HELP__
X 
X+#ifndef AUDACITY_HELP_DIR
X+#define AUDACITY_HELP_DIR /usr/X11R6/share/audacity
X+#endif
X+
X void InitHelp(wxWindow * parent);
X void ShowHelp(wxWindow * parent);
X void ShowHelp(wxWindow * parent, wxString topic);
END-of-audacity/files/patch::Help.h
echo x - audacity/files/patch::Help.cpp
sed 's/^X//' >audacity/files/patch::Help.cpp << 'END-of-audacity/files/patch::Help.cpp'
X--- Help.cpp.orig	Mon Sep 17 16:50:58 2001
X+++ Help.cpp	Mon Sep 17 16:53:11 2001
X@@ -61,7 +61,7 @@
X void InitHelp(wxWindow * parent)
X {
X    if (!gHelp) {
X-      wxString defaultLoc = wxGetCwd() + wxFILE_SEP_PATH + "audacity-help.htb";
X+      wxString defaultLoc = AUDACITY_HELP_DIR + wxFILE_SEP_PATH + "audacity-help.htb";
X 
X       wxString helpFilePath =
X           gPrefs->Read("/Help/HelpFilePath", defaultLoc);
END-of-audacity/files/patch::Help.cpp
echo x - audacity/distinfo
sed 's/^X//' >audacity/distinfo << 'END-of-audacity/distinfo'
XMD5 (audacity-src-0.96.tgz) = dc4bfaa6bf00108963485e1052a8452c
END-of-audacity/distinfo
echo x - audacity/pkg-comment
sed 's/^X//' >audacity/pkg-comment << 'END-of-audacity/pkg-comment'
XAudacity is a GUI editor for digital audio waveforms
END-of-audacity/pkg-comment
echo x - audacity/Makefile
sed 's/^X//' >audacity/Makefile << 'END-of-audacity/Makefile'
X# New ports collection makefile for:	audacity
X# Date created:				21 Jul 2001
X# Whom:					Marc van Woerkom <3d@freebsd.org>
X#
X# $FreeBSD: $
X#
X
XPORTNAME=	audacity
XPORTVERSION=	0.96
XCATEGORIES=	audio
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
XDISTNAME=	${PORTNAME}-src-${PORTVERSION}
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	3d@freebsd.org
X
XLIB_DEPENDS=	wx_gtk.2:${PORTSDIR}/x11-toolkits/wxgtk \
X		id3-3.7.13:${PORTSDIR}/audio/id3lib
X
X.if defined(WITH_MP3)
XBROKEN=		libmpeg3 doesn't compile, waiting 1.0 for libmad support
XCONFIGURE_ARGS+=        --with-libmpeg3
X.else
X# message to say MP3 support is not compiled in because xaudio does not
X# compile on FreeBSD either
X.endif
X
XGNU_CONFIGURE=	yes
XUSE_GMAKE=	yes
XUSE_NEWGCC=	yes
X
XUSE_X_PREFIX=	yes
X
XAUDACITY_HELP_DIR=	${PREFIX}/share/doc/audacity
X
XCONFIGURE_ENV+=	LDFLAGS="-L${LOCALBASE}/lib" \
X		CPPFLAGS="-I${LOCALBASE}/include" \
X		CFLAGS="-DAUDACITY_HELP_DIR=${AUDACITY_HELP_DIR}"
X
X.if !defined(WITHOUT_VORBIS)
XCONFIGURE_ARGS+=	--with-vorbis
XLIB_DEPENDS+=	vorbis.0:${PORTSDIR}/audio/libvorbis
X# this should also tell the user how to avoid compiling with vorbis
X.endif
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/audacity ${PREFIX}/bin/audacity
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${PREFIX}/share/doc/audacity
X	${INSTALL_DATA} ${WRKSRC}/audacity-help.htb ${PREFIX}/share/doc/audacity/audacity-help.htb
X.endif
X
X.include <bsd.port.mk>
END-of-audacity/Makefile
echo x - audacity/pkg-plist
sed 's/^X//' >audacity/pkg-plist << 'END-of-audacity/pkg-plist'
Xbin/audacity
Xshare/doc/audacity/audacity-help.htb
X@dirrm share/doc/audacity
END-of-audacity/pkg-plist
echo x - audacity/pkg-descr
sed 's/^X//' >audacity/pkg-descr << 'END-of-audacity/pkg-descr'
XAudacity is a program that lets you manipulate digital audio
Xwaveforms. In addition to letting you record sounds directly from
Xwithin the program, it imports many sound file formats, including
XWAV, AIFF, AU, IRCAM, MP3, and Ogg Vorbis. It supports all
Xcommon editing operations such as Cut, Copy, and Paste, plus it will
Xmix tracks and let you apply plug-in effects to any part of a sound. It
Xalso has a built-in amplitude envelope editor, a customizable
Xspectrogram mode and a frequency analysis window for audio
Xanalysis applications. 
X
XWWW: http://www.cs.cmu.edu/~music/audacity
END-of-audacity/pkg-descr
exit
Comment 3 AnarCat 2001-09-18 18:56:22 UTC
I ommitted something:

--- Makefile    Tue Sep 18 02:23:28 2001
+++ Makefile.new        Tue Sep 18 13:41:42 2001
@@ -15,6 +15,7 @@
 
 MAINTAINER=    3d@freebsd.org
 
+BUILD_DEPENDS+=        zip:${PORTSDIR}/archivers/zip
 LIB_DEPENDS=   wx_gtk.2:${PORTSDIR}/x11-toolkits/wxgtk \
                id3-3.7.13:${PORTSDIR}/audio/id3lib
 

zip is needed to create the help files.

A.
Comment 4 Ying-Chieh Liao freebsd_committer freebsd_triage 2001-12-11 09:03:41 UTC
State Changed
From-To: open->analyzed

there's newer version 0.97, could you please send in latest version ?
Comment 5 Ade Lovett freebsd_committer freebsd_triage 2002-04-13 04:36:55 UTC
State Changed
From-To: analyzed->closed

Timeout (4 months) in analyzed. 


Comment 6 Ade Lovett freebsd_committer freebsd_triage 2002-04-13 04:36:55 UTC
Responsible Changed
From-To: freebsd-ports->ade

My fault[tm]