From the submitter:

- Don't default to '-O2' when compiling the cdparanoia-lib but respect CFLAGS,
  this should work around the generation of broken code with GCC and an
  optimazation-level greater than 1.
- Fix a bug in the cdparanoia-lib that can cause problems on some !386.
- Remove the unneeded usage of what seems to be an extension of G++, i.e.
  arguments to the constructor when allocating an array of objects with new,
  fixes compilation with compilers stricter obeying the standards.
- Always symlink ${MACHINE_ARCH}-freebsd-cc.rul to the i386-version on !i386 in   the RULES-directory of scglib to be consistent with sysutils/cdrtools, cdrdao
  also should compile and work on any platform with the fixes above.
- hier(7) the location of the global cdrdao.etc to LOCALBASE/etc/cdrdao.conf.
- Make the gcdmaster gnome-frontend compile with GCC3, use HAVE_GOME-magic to
  build it.
- Clean up some stuff.

NOTE: Gcdmaster has a very obvious bug, if one creates a new audio-CD by
      "New Audio CD project" -> "Edit" -> "Append Track" (select audio-file)
      it will get the length of the track wrong, display a garbage waveform
      and play nothing when hitting the play-button, same for further added
      tracks. This can be worked around by saving the project and re-opening
      it, now appending further tracks also works and the burnt CD is fine.
      This is _not_ a bug of this port but a bug in gcdmaster itself and
      is totally reproducable on Linux, therefore please don't mail the
      maintainer of this port about it expect you have a fix, thanks.

Submitted by:	maintainer
This commit is contained in:
Alexander Leidinger 2003-01-02 15:53:38 +00:00
parent d9c1c83acd
commit 21e18d8230
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72217
11 changed files with 208 additions and 19 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= cdrdao
PORTVERSION= 1.1.7
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -15,20 +15,37 @@ EXTRACT_SUFX= .src.tar.gz
MAINTAINER= marius@alchemy.franken.de
.if defined(WITH_TOC2MP3)
LIB_DEPENDS= mp3lame.0:${PORTSDIR}/audio/lame
.endif
USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_GNOMENG= yes
WANT_GNOME= yes
MAN1= cdrdao.1
MAKE_ENV= COPTX="-DBSD_SCSI_SENSE_BUG"
.include <bsd.port.pre.mk>
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
.if defined(WITH_TOC2MP3)
LIB_DEPENDS= mp3lame.0:${PORTSDIR}/audio/lame
.endif
.if ${HAVE_GNOME:Mgnomelibs} != ""
USE_GNOME= gnomelibs
LIB_DEPENDS+= gtkmm.2:${PORTSDIR}/x11-toolkits/gtk--
LIB_DEPENDS+= gnomemm.9:${PORTSDIR}/x11-toolkits/gnome--
CONFIGURE_ARGS= --with-gtkmm-prefix=${X11BASE}
PKGNAMESUFFIX?= -gnome
PLIST_SUB= GNOME=""
MAN1+= gcdmaster.1
.else
CONFIGURE_ARGS= --with-gtkmm-prefix=${NONEXISTENT}
PLIST_SUB= GNOME="@comment "
_WITHOUT_GNOME= yes
.endif
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
.if exists(${LOCALBASE}/bin/antlr) && exists(${LOCALBASE}/bin/dlg)
CONFIGURE_ARGS+= --with-pcctsbin=${LOCALBASE}/bin \
@ -39,18 +56,17 @@ CONFIGURE_ARGS+= --with-pcctsbin=${LOCALBASE}/bin \
CONFIGURE_ARGS+= --without-scglib
.endif
.if ${OSVERSION} <= 320000 || ${MACHINE_ARCH} == "sparc64" || \
!defined(WITH_PTHREADS)
.if ${OSVERSION} <= 320000 || !defined(WITH_PTHREADS)
CONFIGURE_ARGS+= --without-posix-threads
.endif
.if defined(WITH_TOC2MP3)
CONFIGURE_ARGS+= --with-lame-include=${LOCALBASE}/include \
--with-lame-lib=${LOCALBASE}/lib
PLIST_SUB= TOC2MP3=""
PLIST_SUB+= TOC2MP3=""
.else
CONFIGURE_ARGS+= --without-lame
PLIST_SUB= TOC2MP3="@comment "
PLIST_SUB+= TOC2MP3="@comment "
.endif
pre-everything:
@ -59,11 +75,15 @@ pre-everything:
@${ECHO_MSG} ""
@${ECHO_MSG} "WITHOUT_SCGLIB=yes builds without Joerg Schilling's SCSI library"
@${ECHO_MSG} "WITH_PTHREADS=yes enables usage of POSIX threads for the ring buffers"
@${ECHO_MSG} " (not recommended, increases risk of buffer-underruns)"
@${ECHO_MSG} "WITH_TOC2MP3=yes builds toc2mp3 (requires audio/lame)"
@${ECHO_MSG} ""
@${ECHO_MSG} "This port builds the gcdmaster frontend if x11/gnomelibs is installed (also"
@${ECHO_MSG} "requires x11-toolkits/gtk-- and x11-toolkits/gnome--)."
@${ECHO_MSG} ""
post-extract:
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
.if ${MACHINE_ARCH} != "i386"
@(cd ${WRKSRC}/scsilib/RULES; \
${LN} -sf i386-freebsd-cc.rul ${MACHINE_ARCH}-freebsd-cc.rul)
.endif
@ -71,17 +91,36 @@ post-extract:
post-patch:
@${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|g; \
s|-pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
.for i in cdrdao.man main.cc
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/dao/${i}
.endfor
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/dao/cdrdao ${PREFIX}/bin/cdrdao
@${INSTALL_PROGRAM} ${WRKSRC}/utils/toc2cue ${PREFIX}/bin/toc2cue
.if defined(WITH_TOC2MP3)
@${INSTALL_PROGRAM} ${WRKSRC}/utils/toc2mp3 ${PREFIX}/bin/toc2mp3
.endif
@${INSTALL_PROGRAM} ${WRKSRC}/dao/cdrdao ${PREFIX}/bin
@${INSTALL_MAN} ${WRKSRC}/dao/cdrdao.man ${PREFIX}/man/man1/cdrdao.1
@${INSTALL_PROGRAM} ${WRKSRC}/utils/toc2cue ${PREFIX}/bin
@${MKDIR} ${DATADIR}
@${INSTALL_DATA} ${WRKSRC}/dao/cdrdao.drivers ${DATADIR}/drivers
@${INSTALL_MAN} ${WRKSRC}/dao/cdrdao.man ${PREFIX}/man/man1/cdrdao.1
.if defined(WITH_TOC2MP3)
@${INSTALL_PROGRAM} ${WRKSRC}/utils/toc2mp3 ${PREFIX}/bin
.endif
.if !defined(_WITHOUT_GNOME)
@${INSTALL_PROGRAM} ${WRKSRC}/xdao/gcdmaster ${PREFIX}/bin
@${INSTALL_MAN} ${WRKSRC}/xdao/xcdrdao.man \
${PREFIX}/man/man1/gcdmaster.1
@${INSTALL_DATA} ${WRKSRC}/xdao/gcdmaster.desktop \
${X11BASE}/share/gnome/apps/Applications
@${MKDIR} ${X11BASE}/share/gnome/pixmaps/gcdmaster
.for i in gcdmaster.png pixmap_audiocd.png pixmap_copycd.png \
pixmap_cursor-tool.xpm pixmap_datacd.png pixmap_dumpcd.png \
pixmap_help.png pixmap_mixedcd.png pixmap_open.png \
pixmap_play-pause.xpm pixmap_play-start.xpm pixmap_play-stop.xpm \
pixmap_zoom-fit.xpm pixmap_zoom-in.xpm pixmap_zoom-out.xpm \
pixmap_zoom-selection.xpm pixmap_zoom-tool.xpm
@${INSTALL_DATA} ${WRKSRC}/xdao/${i} \
${X11BASE}/share/gnome/pixmaps/gcdmaster
.endfor
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for i in CREDITS INSTALL README README.PlexDAE \

View File

@ -1,5 +1,14 @@
--- configure.orig Mon Oct 7 03:53:55 2002
+++ configure Sat Oct 12 18:06:18 2002
@@ -5640,7 +5640,7 @@
echo "${ECHO_T}no" >&6
fi
- min_gtkmm_version=1.2.9
+ min_gtkmm_version=1.2.8
echo "$as_me:5645: checking for GTK-- - version >= $min_gtkmm_version" >&5
echo $ECHO_N "checking for GTK-- - version >= $min_gtkmm_version... $ECHO_C" >&6
@@ -6107,7 +6107,7 @@
scsi_if_src=ScsiIf-lib.cc

View File

@ -0,0 +1,16 @@
--- dao/cdrdao.man.orig Sat Dec 28 03:05:59 2002
+++ dao/cdrdao.man Sat Dec 28 03:08:17 2002
@@ -762,11 +762,9 @@
.I cdrdao
in that order:
-1. /etc/cdrdao.conf
+1. %%LOCALBASE%%/etc/cdrdao.conf
-2. /etc/defaults/cdrdao
-
-3. $HOME/.cdrdao
+2. $HOME/.cdrdao
Command line options will overwrite the loaded settings.

View File

@ -0,0 +1,15 @@
--- dao/main.cc.orig Sat Dec 28 03:01:20 2002
+++ dao/main.cc Sat Dec 28 03:04:38 2002
@@ -1890,11 +1890,7 @@
SETTINGS = new Settings;
- settingsPath = "/etc/cdrdao.conf";
- if (SETTINGS->read(settingsPath) == 0)
- message(3, "Read settings from \"%s\".", settingsPath);
-
- settingsPath = "/etc/defaults/cdrdao";
+ settingsPath = "%%LOCALBASE%%/etc/cdrdao.conf";
if (SETTINGS->read(settingsPath) == 0)
message(3, "Read settings from \"%s\".", settingsPath);

View File

@ -0,0 +1,32 @@
--- paranoia/configure.orig Fri Dec 27 17:09:38 2002
+++ paranoia/configure Fri Dec 27 17:11:47 2002
@@ -2052,16 +2052,16 @@
if test -z "$GCC"; then
DEBUG="-g"
- OPT="-O"
+ OPT="${CFLAGS}"
else
case $host in
- i?86-*-linux*)
+ i?86-*-*)
DEBUG="-g -Wall -fsigned-char"
- OPT="-O20 -ffast-math -fsigned-char -finline-functions"
+ OPT="${CFLAGS} -ffast-math -fsigned-char -finline-functions"
;;
*)
DEBUG="-g -Wall -fsigned-char"
- OPT="-O20 -fsigned-char"
+ OPT="${CFLAGS} -fsigned-char"
;;
esac
fi
@@ -2404,7 +2404,7 @@
fi
-CFLAGS=""
+#CFLAGS=""
TYPESIZES=""

View File

@ -0,0 +1,14 @@
--- paranoia/isort.c.orig Sun Oct 6 20:53:56 2002
+++ paranoia/isort.c Fri Dec 27 18:54:38 2002
@@ -22,9 +22,9 @@
ret->size=-1;
ret->maxsize=size;
- ret->head=calloc(65536,sizeof(sort_link **));
+ ret->head=calloc(65536,sizeof(sort_link *));
ret->bucketusage=malloc(65536*sizeof(long));
- ret->revindex=calloc(size,sizeof(sort_link *));
+ ret->revindex=calloc(size,sizeof(sort_link));
ret->lastbucket=0;
return(ret);

View File

@ -0,0 +1,20 @@
--- trackdb/Track.cc.orig Sun Nov 17 02:32:03 2002
+++ trackdb/Track.cc Sun Nov 17 02:32:26 2002
@@ -41,7 +41,7 @@
subTracks_ = lastSubTrack_ = NULL;
nofIndices_ = 0;
- index_ = new Msf[98](0);
+ index_ = new Msf[98];
isrcValid_ = 0;
@@ -75,7 +75,7 @@
}
nofIndices_ = obj.nofIndices_;
- index_ = new Msf[98](0);
+ index_ = new Msf[98];
for (i = 0; i < nofIndices_; i++) {
index_[i] = obj.index_[i];
}

View File

@ -0,0 +1,11 @@
--- xdao/AudioCDView.cc.orig Sat Nov 16 23:13:42 2002
+++ xdao/AudioCDView.cc Sat Nov 16 23:13:54 2002
@@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <iostream.h>
+#include <iostream>
#include "xcdrdao.h"
#include "guiUpdate.h"

View File

@ -0,0 +1,11 @@
--- xdao/CdDevice.cc.orig Sat Nov 16 23:14:19 2002
+++ xdao/CdDevice.cc Sat Nov 16 23:14:54 2002
@@ -22,7 +22,7 @@
#include <stddef.h>
#include <stdio.h>
#include <unistd.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <assert.h>

View File

@ -7,7 +7,7 @@
+# if defined(__FreeBSD__)
+#include <sys/soundcard.h>
+# if !defined(SNDCTL_DSP_CHANNELS)
+# define SNDCTL_DSP_CHANNELS SNDCTL_DSP_STEREO
+# define SNDCTL_DSP_CHANNELS SOUND_PCM_WRITE_CHANNELS
+# endif
+# else
#include <linux/soundcard.h>

View File

@ -1,6 +1,7 @@
bin/cdrdao
bin/toc2cue
%%TOC2MP3%%bin/toc2mp3
%%GNOME%%bin/gcdmaster
share/cdrdao/drivers
%%PORTDOCS%%share/doc/cdrdao/CREDITS
%%PORTDOCS%%share/doc/cdrdao/INSTALL
@ -13,5 +14,26 @@ share/cdrdao/drivers
%%PORTDOCS%%share/doc/cdrdao/Release-1.1.5
%%PORTDOCS%%share/doc/cdrdao/Release-1.1.6
%%PORTDOCS%%share/doc/cdrdao/Release-1.1.7
%%GNOME%%@cwd %%X11BASE%%
%%GNOME%%share/gnome/pixmaps/gcdmaster/gcdmaster.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_audiocd.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_copycd.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_cursor-tool.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_datacd.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_dumpcd.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_help.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_mixedcd.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_open.png
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_play-pause.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_play-start.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_play-stop.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_zoom-fit.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_zoom-in.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_zoom-out.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_zoom-selection.xpm
%%GNOME%%share/gnome/pixmaps/gcdmaster/pixmap_zoom-tool.xpm
%%GNOME%%share/gnome/apps/Applications/gcdmaster.desktop
%%GNOME%%@dirrm share/gnome/pixmaps/gcdmaster
%%GNOME%%@cwd %%LOCALBASE%%
%%PORTDOCS%%@dirrm share/doc/cdrdao
@dirrm share/cdrdao