summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/easymp3gain/easymp3gain.SlackBuild29
-rw-r--r--audio/easymp3gain/environmentoptions.xml8
-rw-r--r--audio/easymp3gain/patches/02_fix-new-fpc-compile.patch16
3 files changed, 51 insertions, 2 deletions
diff --git a/audio/easymp3gain/easymp3gain.SlackBuild b/audio/easymp3gain/easymp3gain.SlackBuild
index 33e81c6914..4697bab5b2 100644
--- a/audio/easymp3gain/easymp3gain.SlackBuild
+++ b/audio/easymp3gain/easymp3gain.SlackBuild
@@ -2,11 +2,29 @@
# Slackware build script for easymp3gain
-# Written by Chernov V. V. manbornofwoman@gmail.com
+# Copyright 2014 Chernov V. V. manbornofwoman@gmail.com
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=easymp3gain
VERSION=${VERSION:-0.5.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
LCL=${LCL:-gtk2} # otherwise "qt"
@@ -49,6 +67,13 @@ patch -p1 < $CWD/patches/02_filechooser.patch
# Don't force compiler architecture in LPI
patch -p1 < $CWD/patches/03_fix_compiler_arch.patch
+# Fix compilation with FPC
+patch -p1 < $CWD/patches/02_fix-new-fpc-compile.patch
+
+# Fix compilation with Lazarus
+cat $CWD/environmentoptions.xml > ./environmentoptions.xml
+sed -i 's,lazbuild,lazbuild --primary-config-path=".",g' make.sh
+
if [ "$LCL" = "qt" ]; then
OPT="-dUSE_QT_45"
fi
diff --git a/audio/easymp3gain/environmentoptions.xml b/audio/easymp3gain/environmentoptions.xml
new file mode 100644
index 0000000000..20e19abc14
--- /dev/null
+++ b/audio/easymp3gain/environmentoptions.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<CONFIG>
+ <EnvironmentOptions>
+ <LazarusDirectory Value="/usr/share/lazarus"/>
+ <CompilerFilename Value="/usr/bin/fpc"/>
+ </EnvironmentOptions>
+</CONFIG>
+
diff --git a/audio/easymp3gain/patches/02_fix-new-fpc-compile.patch b/audio/easymp3gain/patches/02_fix-new-fpc-compile.patch
new file mode 100644
index 0000000000..3d2994f4dc
--- /dev/null
+++ b/audio/easymp3gain/patches/02_fix-new-fpc-compile.patch
@@ -0,0 +1,16 @@
+Description: Fix compilation with more recent versions of FPC
+ This also improves code-quality and fixes warnings.
+Forwarded: yes
+Author: Matthias Klumpp <mak@debian.org>
+
+--- a/unitmain.pas
++++ b/unitmain.pas
+@@ -169,7 +169,7 @@
+ procedure AddFileAndDirectoryList(SL: TStringList; sublevels: Integer);
+ procedure UpdateFileCount;
+ procedure SortListView(Lv:TListView; Index:integer; Reverse: Boolean);
+- function AddTask(ASongItem: TSongItem; AMediaGainAction: TMediaGainAction; AVolume: Double): Integer;
++ function AddTask(ASongItem: TSongItem; AMediaGainAction: TMediaGainAction; AVolume: Double): Integer; overload;
+ function FitsTaskType(ATask: TMediaGainTask; AMediaGainAction: TMediaGainAction; ASongItem: TSongItem): Boolean;
+ { private declarations }
+ public