polyphone: initial add 1.8
Desktop- and mime-file was taken from [1] [1] https://aur.archlinux.org/cgit/aur.git/tree/?h=polyphone Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
From 0c780e129ca63304eb5602496f070c5d66b2ef0a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Sun, 8 Jan 2017 04:00:00 +0100
|
||||
Subject: [PATCH] align compiler switches / constants for cross compiling on
|
||||
varous machines
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
---
|
||||
lib/sfarklib/sfklCoding.cpp | 10 +++-------
|
||||
lib/sfarklib/sfklCrunch.cpp | 2 +-
|
||||
lib/sfarklib/wcc.h | 8 +-------
|
||||
polyphone.pro | 3 +--
|
||||
4 files changed, 6 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/lib/sfarklib/sfklCoding.cpp b/lib/sfarklib/sfklCoding.cpp
|
||||
index 0749393..19b1e27 100644
|
||||
--- a/lib/sfarklib/sfklCoding.cpp
|
||||
+++ b/lib/sfarklib/sfklCoding.cpp
|
||||
@@ -230,7 +230,7 @@ int ReadHeader(V2_FILEHEADER *FileHeader, BYTE *fbuf, int bufsize)
|
||||
HeaderLen = V2_FILEHEADER_SIZE - sizeof(FileHeader->FileName) + strlen(FileHeader->FileName) + 1;
|
||||
|
||||
// If we get this far, there's a good chance we've got the header...
|
||||
- #ifdef __BIG_ENDIAN__
|
||||
+ #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
// FixEndians of all multi-byte integers (currently only relevent to Mac)
|
||||
#define FIXENDIAN(field) FixEndian(&(FileHeader->field), sizeof(FileHeader->field))
|
||||
FIXENDIAN(Flags); FIXENDIAN(OriginalSize); FIXENDIAN(CompressedSize);
|
||||
@@ -526,7 +526,7 @@ int ProcessNextBlock(BLOCK_DATA *Blk)
|
||||
DecompressFast(Blk, NumWords); // Decompress
|
||||
|
||||
//printf("B4 WriteOutputFile: %ld\n", adler32(0, (const BYTE *) Blk->SrcBuf, n) & 0xffff);
|
||||
- #ifdef __BIG_ENDIAN__
|
||||
+ #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define WFIX(I) s = bp[I+0]; bp[I+0] = bp[I+1]; bp[I+1] = s;
|
||||
BYTE *bp = (BYTE *) Blk->SrcBuf; BYTE *ep = bp + n;
|
||||
do {
|
||||
@@ -844,15 +844,11 @@ int Decode(const char *InFileName, const char *ReqOutFileName)
|
||||
// Adjust integer held at *num for this machine's endian system
|
||||
void FixEndian(void *num, int nsize)
|
||||
{
|
||||
-#ifdef __BIG_ENDIAN__
|
||||
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
int i;
|
||||
BYTE bb[4];
|
||||
for (i = 0; i < nsize; i++) bb[i] = ((BYTE *) num)[i];
|
||||
for (i = 0; i < nsize; i++) ((BYTE *) num)[i] = bb[nsize-1-i];
|
||||
-#else
|
||||
- #ifndef __LITTLE_ENDIAN__
|
||||
- #error ENDIAN system undefined
|
||||
- #endif
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/lib/sfarklib/sfklCrunch.cpp b/lib/sfarklib/sfklCrunch.cpp
|
||||
index 6eefe16..7c5c153 100644
|
||||
--- a/lib/sfarklib/sfklCrunch.cpp
|
||||
+++ b/lib/sfarklib/sfklCrunch.cpp
|
||||
@@ -72,7 +72,7 @@ static BYTE nb[1 << (AWORD_BITS-1)]; // Array to hold number of bits needed to r
|
||||
bioBits = LOWBITS(bioBits, bioRemBits)
|
||||
|
||||
// =========================================================================
|
||||
-#ifdef __BIG_ENDIAN__
|
||||
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
|
||||
#define WFIX(I) s = bp[I+0]; bp[I+0] = bp[I+1]; bp[I+1] = s;
|
||||
// Read from disk if needed, and fix endians
|
||||
diff --git a/lib/sfarklib/wcc.h b/lib/sfarklib/wcc.h
|
||||
index 0a6739f..d9b44fb 100644
|
||||
--- a/lib/sfarklib/wcc.h
|
||||
+++ b/lib/sfarklib/wcc.h
|
||||
@@ -17,12 +17,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with sfArkLib. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-#ifndef __BIG_ENDIAN__
|
||||
-#ifndef __LITTLE_ENDIAN__
|
||||
-#error ENDIAN system undefined
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
#include "sfArkLib.h"
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
@@ -126,7 +120,7 @@ typedef ULONG BIOWORD2;
|
||||
#define RETURN_ON_ERROR() if (GlobalErrorFlag != SFARKLIB_SUCCESS) return(GlobalErrorFlag)
|
||||
#define JUMP_ON_ERROR(label) if (GlobalErrorFlag != SFARKLIB_SUCCESS) goto label
|
||||
|
||||
-#ifdef __BIG_ENDIAN__
|
||||
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define FIX_ENDIAN16(w) ((((BYTE) w) << 8) | (((USHORT)w) >> 8))
|
||||
#else
|
||||
#define FIX_ENDIAN16(w) (w)
|
||||
diff --git a/polyphone.pro b/polyphone.pro
|
||||
index ffa65d9..9139209 100644
|
||||
--- a/polyphone.pro
|
||||
+++ b/polyphone.pro
|
||||
@@ -366,7 +366,6 @@ RESOURCES += ressources.qrc \
|
||||
|
||||
|
||||
# SfArk extraction (what a mess!)
|
||||
-DEFINES += __LITTLE_ENDIAN__
|
||||
INCLUDEPATH += lib/sfarklib
|
||||
HEADERS += lib/sfarklib/sfArkLib.h \
|
||||
lib/sfarklib/wcc.h \
|
||||
@@ -399,7 +398,7 @@ win32 {
|
||||
ExtraCompiler.commands = $${QMAKE_CXX} -D__LITTLE_ENDIAN__ -MD -arch:IA32 -D_CRT_SECURE_NO_WARNINGS $(INCPATH) -c ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
|
||||
}
|
||||
unix:!macx {
|
||||
- ExtraCompiler.commands = $${QMAKE_CXX} -fPIC -D__LITTLE_ENDIAN__ -mfpmath=387 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
+ ExtraCompiler.commands = $${QMAKE_CXX} -fPIC $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
}
|
||||
macx {
|
||||
ExtraCompiler.commands = $${QMAKE_CXX} $(CXXFLAGS) -D__LITTLE_ENDIAN__ -mno-sse -mfpmath=387 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 07213ce53a26032d5ac8b67c92dcc59fcfda537b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
||||
Date: Sun, 8 Jan 2017 02:45:16 +0100
|
||||
Subject: [PATCH] remove some cross unsafe compiler switches
|
||||
machines
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
---
|
||||
polyphone.pro | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/polyphone.pro b/polyphone.pro
|
||||
index ffa65d9..1d9a221 100644
|
||||
--- a/polyphone.pro
|
||||
+++ b/polyphone.pro
|
||||
@@ -399,7 +399,7 @@ win32 {
|
||||
ExtraCompiler.commands = $${QMAKE_CXX} -D__LITTLE_ENDIAN__ -MD -arch:IA32 -D_CRT_SECURE_NO_WARNINGS $(INCPATH) -c ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
|
||||
}
|
||||
unix:!macx {
|
||||
- ExtraCompiler.commands = $${QMAKE_CXX} -fPIC -D__LITTLE_ENDIAN__ -mfpmath=387 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
+ ExtraCompiler.commands = $${QMAKE_CXX} -fPIC $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
}
|
||||
macx {
|
||||
ExtraCompiler.commands = $${QMAKE_CXX} $(CXXFLAGS) -D__LITTLE_ENDIAN__ -mno-sse -mfpmath=387 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[Desktop Entry]
|
||||
Name=Polyphone
|
||||
Name[fr]=Polyphone
|
||||
Comment=soundfont editor
|
||||
Comment[fr]=éditeur de soundfonts
|
||||
TryExec=polyphone
|
||||
Exec=polyphone %F
|
||||
Icon=polyphone
|
||||
StartupNotify=true
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;AudioVideo;Audio;Midi;Music
|
||||
Keywords=sf2;sfz;sfArk;soundfonts;editor;instrument
|
||||
MimeType=audio/x-soundfont;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
||||
<mime-type type="audio/x-soundfont">
|
||||
<comment>SoundFont sf2</comment>
|
||||
<magic priority="50">
|
||||
<match type="string" offset="0" value="RIFF">
|
||||
<match type="string" offset="8" value="sfbk"/>
|
||||
</match>
|
||||
</magic>
|
||||
<glob pattern="*.sf2"/>
|
||||
</mime-type>
|
||||
<mime-type type="audio/x-soundfont">
|
||||
<comment>SoundFont sfz</comment>
|
||||
<glob pattern="*.sfz"/>
|
||||
</mime-type>
|
||||
<mime-type type="audio/x-soundfont">
|
||||
<comment>SoundFont archive sfArk</comment>
|
||||
<glob pattern="*.sfArk"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
|
||||
53
recipes-misc/recipes-multimedia/polyphone/polyphone_1.8.bb
Normal file
53
recipes-misc/recipes-multimedia/polyphone/polyphone_1.8.bb
Normal file
@@ -0,0 +1,53 @@
|
||||
SUMMARY = "Soundfont editor"
|
||||
HOMEPAGE = "http://polyphone-soundfonts.com/en/"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://main.cpp;beginline=6;endline=18;md5=092eabd5b12b1c1d876a94e06601bd81"
|
||||
|
||||
inherit qmake5 gtk-icon-cache mime
|
||||
|
||||
DEPENDS += " \
|
||||
qtbase \
|
||||
qtsvg \
|
||||
alsa-lib \
|
||||
jack \
|
||||
portaudio-v19 \
|
||||
rtmidi \
|
||||
qcustomplot \
|
||||
stk \
|
||||
libvorbis \
|
||||
libogg \
|
||||
"
|
||||
|
||||
SRC_URI = " \
|
||||
http://polyphone-soundfonts.com/en/download/file/76-polyphone-1-8-src-zip/latest/download;downloadfilename=polyphone-1-8-src.zip \
|
||||
file://polyphone.desktop \
|
||||
file://polyphone.mime \
|
||||
file://0001-align-compiler-switches-constants-for-cross-compilin.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "75ec14ab98bcf80f360debd80c553733"
|
||||
SRC_URI[sha256sum] = "2b0ba2887646208ae9953a336adfebe460133cd403e76f7fe795d3071827dfdd"
|
||||
|
||||
S = "${WORKDIR}/trunk"
|
||||
|
||||
do_configure_prepend() {
|
||||
sed -i 's:= /usr/include:= ${STAGING_INCDIR}:g' ${S}/polyphone.pro
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/RELEASE/polyphone ${D}${bindir}/
|
||||
|
||||
install -d ${D}${datadir}/pixmaps
|
||||
install -m 0644 ${S}/ressources/polyphone.png ${D}${datadir}/pixmaps/
|
||||
|
||||
install -d ${D}${datadir}/applications
|
||||
install -m 0644 ${WORKDIR}/${BPN}.desktop ${D}${datadir}/applications/
|
||||
|
||||
install -d ${D}${datadir}/mime/packages
|
||||
install -m 0644 ${WORKDIR}/${BPN}.mime ${D}${datadir}/mime/packages/${BPN}.xml
|
||||
}
|
||||
|
||||
FILES_${PN} += " \
|
||||
${datadir}/mime \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user