From owner-freebsd-ports-bugs@FreeBSD.ORG Sat May 24 20:10:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F238A1065679 for ; Sat, 24 May 2008 20:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E20E18FC1F for ; Sat, 24 May 2008 20:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4OKA1KA027243 for ; Sat, 24 May 2008 20:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4OKA1aX027242; Sat, 24 May 2008 20:10:01 GMT (envelope-from gnats) Resent-Date: Sat, 24 May 2008 20:10:01 GMT Resent-Message-Id: <200805242010.m4OKA1aX027242@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Denise H. G." Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E9851065671 for ; Sat, 24 May 2008 20:02:39 +0000 (UTC) (envelope-from darcsis@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id 49ADD8FC12 for ; Sat, 24 May 2008 20:02:39 +0000 (UTC) (envelope-from darcsis@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so999912wfg.7 for ; Sat, 24 May 2008 13:02:38 -0700 (PDT) Received: by 10.142.207.8 with SMTP id e8mr1236356wfg.243.1211659358898; Sat, 24 May 2008 13:02:38 -0700 (PDT) Received: from gmail.com ( [123.117.32.26]) by mx.google.com with ESMTPS id 30sm13440988wff.8.2008.05.24.13.02.34 (version=SSLv3 cipher=RC4-MD5); Sat, 24 May 2008 13:02:36 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Sun, 25 May 2008 04:02:32 +0800 Message-Id: <4838745c.1e068e0a.7798.3c08@mx.google.com> Date: Sun, 25 May 2008 04:02:32 +0800 From: "Denise H. G." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/123963: [New port] audio/wavegain X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Denise H. G." List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2008 20:10:02 -0000 >Number: 123963 >Category: ports >Synopsis: [New port] audio/wavegain >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat May 24 20:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Denise H. G. >Release: FreeBSD 7.0-STABLE amd64 >Organization: >Environment: System: FreeBSD pluton.xbsd.name 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue May 20 22:12:04 CST 2008 dhg@pluton.xbsd.name:/opt/obj/usr/src/sys/pluton-SMP-ULE amd64 >Description: to make gnormalize happy. >How-To-Repeat: >Fix: --- wavegain-1.2.6.shar begins here --- # 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: # # wavegain # wavegain/files # wavegain/files/patch-audio.c # wavegain/files/patch-wavegain.c # wavegain/files/patch-Makefile.linux # wavegain/Makefile # wavegain/distinfo # wavegain/pkg-descr # echo c - wavegain mkdir -p wavegain > /dev/null 2>&1 echo c - wavegain/files mkdir -p wavegain/files > /dev/null 2>&1 echo x - wavegain/files/patch-audio.c sed 's/^X//' >wavegain/files/patch-audio.c << 'END-of-wavegain/files/patch-audio.c' X--- audio.c 2005-11-27 16:55:24.000000000 +0800 X+++ audio.c 2008-05-24 22:12:15.000000000 +0800 X@@ -31,20 +31,8 @@ X #include X #include X X-#ifdef _WIN32 X-#include X-#else X-# ifndef __MACOSX__ X-# include X-# endif X-#endif X- X #include X X-#ifndef __MACOSX__ X-#include X-#endif X- X #include X #include "config.h" X #include "audio.h" END-of-wavegain/files/patch-audio.c echo x - wavegain/files/patch-wavegain.c sed 's/^X//' >wavegain/files/patch-wavegain.c << 'END-of-wavegain/files/patch-wavegain.c' X--- wavegain.c 2005-11-27 16:58:46.000000000 +0800 X+++ wavegain.c 2008-05-25 03:23:17.000000000 +0800 X@@ -19,20 +19,8 @@ X #include X #include X X-#ifdef _WIN32 X-#include X-#else X-# ifndef __MACOSX__ X-# include X-# endif X-#endif X- X #include X X-#ifndef __MACOSX__ X-#include X-#endif X- X #include "gain_analysis.h" X #include "i18n.h" X #include "config.h" X@@ -58,6 +46,14 @@ X #define ROUND64(x) ( doubletmp = (x) + Dither.Add + (Int64_t)0x001FFFFD80000000L, *(Int64_t*)(&doubletmp) - (Int64_t)0x433FFFFD80000000L ) X #endif X X+ X+ X+# include X+static int xrename(const char *oldpath, const char *newpath); X+ X+ X+ X+ X extern int write_log; X dither_t Dither; X double doubletmp; X@@ -584,16 +580,26 @@ X close_audio_file(infile, aufile, wg_opts); X fclose(infile); X X- if (!settings->std_out) { X+ if (!settings->std_out) { X+ X if (remove(filename) != 0) { X fprintf(stderr, " Error deleting old file '%s'\n", filename); X goto exit; X } X- X- if (rename(TEMP_NAME, filename) != 0) { X+ X+ /* X+ * int rename(const char *old, const char *new); X+ * In POSIX, rename will fail if the 'old' and 'new' names are on different mounted file systems. X+ * ( From http://en.wikipedia.org/wiki/Rename_%28C%29 ) X+ * Function 'xrename' from 'normalize-0.7.6' is one clever solution X+ */ X+ X+ /*if (rename(TEMP_NAME, filename) != 0) { */ X+ if (xrename(TEMP_NAME, filename) != 0) { X fprintf(stderr, " Error renaming '" TEMP_NAME "' to '%s' (uh-oh)\n", filename); X goto exit; X } X+ X } X X result = 1; X@@ -603,3 +609,65 @@ X } X X X+ X+ X+/* From normalize-0.7.6/nid3lib/write.c X+ * Move the file "oldpath" to "newpath", or copy and delete if they X+ * are on different filesystems. X+ */ X+static int X+xrename(const char *oldpath, const char *newpath) X+{ X+ FILE *in, *out; X+ char buf[4096]; X+ size_t sz; X+ X+ if (strcmp(oldpath, newpath) == 0) X+ return 0; X+ X+#ifdef __EMX__ X+ if (unlink(newpath) == -1 && errno != ENOENT) X+ return -1; X+#endif X+ X+ if (rename(oldpath, newpath) == -1) { X+ if (errno == EXDEV) { X+ /* files are on different filesystems, so we have to copy */ X+ if (unlink(newpath) == -1 && errno != ENOENT) X+ return -1; X+ X+ in = fopen(oldpath, "rb"); X+ if (in == NULL) X+ return -1; X+ out = fopen(newpath, "wb"); X+ if (out == NULL) { X+ fclose(in); X+ return -1; X+ } X+ X+ while ((sz = fread(buf, 1, 4096, in)) > 0) X+ fwrite(buf, 1, sz, out); X+ X+ if (ferror(in) || ferror(out)) { X+ fclose(in); X+ fclose(out); X+ return -1; X+ } X+ if (fclose(in) == EOF) { X+ fclose(out); X+ return -1; X+ } X+ if (fclose(out) == EOF) X+ return -1; X+ X+ if (unlink(oldpath) == -1) X+ return -1; X+ } else { X+ return -1; X+ } X+ } X+ X+ return 0; X+} X+ X+ END-of-wavegain/files/patch-wavegain.c echo x - wavegain/files/patch-Makefile.linux sed 's/^X//' >wavegain/files/patch-Makefile.linux << 'END-of-wavegain/files/patch-Makefile.linux' X--- Makefile.linux 2005-11-30 11:17:14.000000000 +0800 X+++ Makefile.linux 2008-05-24 22:14:34.000000000 +0800 X@@ -1,5 +1,5 @@ X all: X- gcc *.c -o wavegain -DHAVE_CONFIG_H -lm -lsndfile X+ gcc *.c -o wavegain -DHAVE_CONFIG_H -lm -lsndfile -L/usr/local/lib X X install: X install -d /usr/bin/ END-of-wavegain/files/patch-Makefile.linux echo x - wavegain/Makefile sed 's/^X//' >wavegain/Makefile << 'END-of-wavegain/Makefile' X# New ports collection makefile for: wavegain X# Date created: 24 May 2008 X# Whom: Denise H. G. X# X# $FreeBSD$ X# X XPORTNAME= wavegain XPORTVERSION= 1.2.6 XCATEGORIES= audio XMASTER_SITES= http://www.rarewares.org/files/others/ XDISTNAME= ${PORTNAME}-${PORTVERSION}srcs${EXTRACT_SUFFIX} X XMAINTAINER= darcsis@gmail.com XCOMMENT= A program that applies ReplayGain to wave files X XLIB_DEPENDS= sndfile.1:${PORTSDIR}/audio/libsndfile X XUSE_ZIP= yes XUSE_GMAKE= yes X XPLIST_FILES= bin/wavegain X XWRKSRC= ${WRKDIR}/WaveGain-${PORTVERSION} X X.include X Xdo-configure: X @cd ${WRKSRC} && ${CP} Makefile.linux Makefile X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin X X.include END-of-wavegain/Makefile echo x - wavegain/distinfo sed 's/^X//' >wavegain/distinfo << 'END-of-wavegain/distinfo' XMD5 (wavegain-1.2.6srcs.zip) = 37facb462a3ec4f9831cd00f597ee85e XSHA256 (wavegain-1.2.6srcs.zip) = 32f3ea5252094c8443a54440ed5e815b044b9feeb82e6494eabbe84f95e6fc08 XSIZE (wavegain-1.2.6srcs.zip) = 160859 END-of-wavegain/distinfo echo x - wavegain/pkg-descr sed 's/^X//' >wavegain/pkg-descr << 'END-of-wavegain/pkg-descr' XWaveGain is a program that applies ReplayGain to wave files. XThe FreeBSD port of WaveGain is with a patch from gnormalize Xwhose author is Claudio Fernandes de Souza Rodrigues. X XThe author of WaveGain is John Edwards. X XWWW: http://www.rarewares.org/others.html END-of-wavegain/pkg-descr exit --- wavegain-1.2.6.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: