From owner-svn-ports-head@freebsd.org Fri Sep 25 08:19:30 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F6953EF002; Fri, 25 Sep 2020 08:19:30 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByPw231SRz4p7x; Fri, 25 Sep 2020 08:19:30 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 465F610382; Fri, 25 Sep 2020 08:19:30 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08P8JULj021503; Fri, 25 Sep 2020 08:19:30 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08P8JT8n021498; Fri, 25 Sep 2020 08:19:29 GMT (envelope-from se@FreeBSD.org) Message-Id: <202009250819.08P8JT8n021498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Fri, 25 Sep 2020 08:19:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r549996 - in head/audio/wavegain: . files X-SVN-Group: ports-head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/audio/wavegain: . files X-SVN-Commit-Revision: 549996 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 08:19:30 -0000 Author: se Date: Fri Sep 25 08:19:28 2020 New Revision: 549996 URL: https://svnweb.freebsd.org/changeset/ports/549996 Log: Fix build with -fno-common While here fix compiler warnings Added: head/audio/wavegain/files/patch-audio.h (contents, props changed) head/audio/wavegain/files/patch-main.c (contents, props changed) head/audio/wavegain/files/patch-misc.c (contents, props changed) Modified: head/audio/wavegain/Makefile head/audio/wavegain/files/patch-audio.c head/audio/wavegain/files/patch-wavegain.c Modified: head/audio/wavegain/Makefile ============================================================================== --- head/audio/wavegain/Makefile Fri Sep 25 08:07:08 2020 (r549995) +++ head/audio/wavegain/Makefile Fri Sep 25 08:19:28 2020 (r549996) @@ -3,6 +3,7 @@ PORTNAME= wavegain PORTVERSION= 1.2.8 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://www.rarewares.org/files/others/ DISTNAME= ${PORTNAME}-${PORTVERSION}srcs${EXTRACT_SUFFIX} @@ -10,13 +11,14 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}srcs${EXTRACT_SUFF MAINTAINER= darcsis@gmail.com COMMENT= Program that applies ReplayGain to wave files +LICENSE= LGPL21 + LIB_DEPENDS= libsndfile.so:audio/libsndfile ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= uses x86 assembly USES= gmake dos2unix zip -DOS2UNIX_FILES= audio.c wavegain.c PLIST_FILES= bin/wavegain Modified: head/audio/wavegain/files/patch-audio.c ============================================================================== --- head/audio/wavegain/files/patch-audio.c Fri Sep 25 08:07:08 2020 (r549995) +++ head/audio/wavegain/files/patch-audio.c Fri Sep 25 08:19:28 2020 (r549996) @@ -1,4 +1,4 @@ ---- audio.c.orig 2016-07-26 16:16:05 UTC +--- audio.c.orig 2020-09-25 07:48:54 UTC +++ audio.c @@ -32,20 +32,8 @@ #include @@ -21,3 +21,12 @@ #include "config.h" #include "audio.h" #include "i18n.h" +@@ -642,7 +630,7 @@ int wav_open(FILE *in, wavegain_opt *opt, unsigned cha + if (!find_gain_chunk(in, &len)) + FSEEK64(in, current_pos, SEEK_SET); + else { +- char buf_double[8]; ++ unsigned char buf_double[8]; + opt->gain_chunk = 1; + fread(buf_double, 1, 8, in); + opt->gain_scale = READ_D64(buf_double); Added: head/audio/wavegain/files/patch-audio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/wavegain/files/patch-audio.h Fri Sep 25 08:19:28 2020 (r549996) @@ -0,0 +1,11 @@ +--- audio.h.orig 2008-11-11 11:29:08 UTC ++++ audio.h +@@ -118,7 +118,7 @@ void raw_close(void *); + long wav_read(void *, double **buffer, int samples, int fast, int chunk); + long wav_ieee_read(void *, double **buffer, int samples, int fast, int chunk); + +-enum { ++typedef enum { + WAV_NO_FMT = 0, + WAV_FMT_8BIT, + WAV_FMT_16BIT, Added: head/audio/wavegain/files/patch-main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/wavegain/files/patch-main.c Fri Sep 25 08:19:28 2020 (r549996) @@ -0,0 +1,44 @@ +--- main.c.orig 2008-08-08 08:48:38 UTC ++++ main.c +@@ -178,7 +178,7 @@ int process_files(FILE_LIST* file_list, SETTINGS* sett + /* Undo previously applied gain */ + if (settings->undo) { + for (file = file_list; file; file = file->next_file) { +- if (file->filename == '\0') ++ if (file->filename == NULL) + continue; + if (!write_gains(file->filename, 0, 0, 0, 0, 0, settings)) { + fprintf(stderr, " Error processing GAIN for file - %s\n", file->filename); +@@ -191,12 +191,12 @@ int process_files(FILE_LIST* file_list, SETTINGS* sett + for (file = file_list; file; file = file->next_file) { + int dc_l; + int dc_r; +- if (file->filename == '\0') ++ if (file->filename == NULL) + continue; + + if (!get_gain(file->filename, &file->track_peak, &file->track_gain, + file->dc_offset, file->offset, settings)) { +- file->filename = '\0'; ++ file->filename = NULL; + continue; + } + dc_l = (int)(file->dc_offset[0] * 32768 * -1); +@@ -262,7 +262,7 @@ int process_files(FILE_LIST* file_list, SETTINGS* sett + if(settings->apply_gain) { /* Write radio and audiophile gains. */ + total_files = 0.0; + for (file = file_list; file; file = file->next_file) { +- if (file->filename == '\0') ++ if (file->filename == NULL) + continue; + if (settings->audiophile && settings->set_album_gain == 1) + break; +@@ -297,7 +297,7 @@ int process_files(FILE_LIST* file_list, SETTINGS* sett + SetEnvironmentVariable("ALBUM_PEAK", ftos(settings->album_peak, "%.0lf")); + + for (file = file_list; file; file = file->next_file) { +- if (file->filename == '\0') ++ if (file->filename[0] == NULL) + continue; + + if (dir[0] == '.' && dir[1] == '\\') dir += 2; Added: head/audio/wavegain/files/patch-misc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/wavegain/files/patch-misc.c Fri Sep 25 08:19:28 2020 (r549996) @@ -0,0 +1,12 @@ +--- misc.c.orig 2006-06-04 21:47:38 UTC ++++ misc.c +@@ -39,8 +39,7 @@ void file_error(const char* message, ...) + vfprintf(stderr, message, args); + va_end(args); + +- fprintf(stderr, strerror(err_num)); +- fprintf(stderr, "\n"); ++ fprintf(stderr, "%s\n", strerror(err_num)); + } + + Modified: head/audio/wavegain/files/patch-wavegain.c ============================================================================== --- head/audio/wavegain/files/patch-wavegain.c Fri Sep 25 08:07:08 2020 (r549995) +++ head/audio/wavegain/files/patch-wavegain.c Fri Sep 25 08:19:28 2020 (r549996) @@ -1,4 +1,4 @@ ---- wavegain.c.orig 2016-07-26 16:16:05 UTC +--- wavegain.c.orig 2020-09-25 07:55:21 UTC +++ wavegain.c @@ -19,20 +19,8 @@ #include @@ -21,7 +21,16 @@ #include "gain_analysis.h" #include "i18n.h" #include "getopt.h" -@@ -57,6 +45,9 @@ +@@ -44,6 +32,8 @@ + + #ifdef _WIN32 + #include ++#else ++#include + #endif + + #ifdef ENABLE_RECURSIVE +@@ -57,6 +47,9 @@ #define ROUND64(x) ( doubletmp = (x) + Dither.Add + (Int64_t)0x001FFFFD80000000L, *(Int64_t*)(&doubletmp) - (Int64_t)0x433FFFFD80000000L ) #endif @@ -31,7 +40,7 @@ extern int write_to_log; dither_t Dither; double doubletmp; -@@ -639,7 +630,14 @@ int write_gains(const char *filename, do +@@ -639,7 +632,14 @@ int write_gains(const char *filename, double radio_gai goto exit; } @@ -47,7 +56,7 @@ fprintf(stderr, " Error renaming '" TEMP_NAME "' to '%s' (uh-oh)\n", filename); goto exit; } -@@ -650,4 +648,61 @@ exit: +@@ -650,4 +650,61 @@ exit: return result; } @@ -61,10 +70,10 @@ + FILE *in, *out; + char buf[4096]; + size_t sz; -+ + + if (strcmp(oldpath, newpath) == 0) + return 0; - ++ +#ifdef __EMX__ + if (unlink(newpath) == -1 && errno != ENOENT) + return -1;