mirror of
https://github.com/schnitzeltony/meta-musicians.git
synced 2026-09-19 15:49:33 +02:00
polyphone: upgrade 2.0.1 -> 2.2.0+
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
@@ -8,14 +8,14 @@ Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
lib/sfarklib/sfklCoding.cpp | 10 +++-------
|
||||
lib/sfarklib/sfklCoding.cpp | 4 ++--
|
||||
lib/sfarklib/sfklCrunch.cpp | 2 +-
|
||||
lib/sfarklib/wcc.h | 8 +-------
|
||||
polyphone.pro | 11 +----------
|
||||
4 files changed, 6 insertions(+), 25 deletions(-)
|
||||
lib/sfarklib/wcc.h | 6 ------
|
||||
polyphone.pro | 10 +---------
|
||||
4 files changed, 4 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/lib/sfarklib/sfklCoding.cpp b/lib/sfarklib/sfklCoding.cpp
|
||||
index d7f2ffd..eb522f9 100644
|
||||
index ff69a54a..727ed3cd 100644
|
||||
--- a/lib/sfarklib/sfklCoding.cpp
|
||||
+++ b/lib/sfarklib/sfklCoding.cpp
|
||||
@@ -230,7 +230,7 @@ int ReadHeader(V2_FILEHEADER *FileHeader, BYTE *fbuf, int bufsize)
|
||||
@@ -27,16 +27,7 @@ index d7f2ffd..eb522f9 100644
|
||||
// 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)
|
||||
@@ -844,7 +844,7 @@ 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)
|
||||
{
|
||||
@@ -45,16 +36,8 @@ index d7f2ffd..eb522f9 100644
|
||||
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 6b91da3..6a82c57 100644
|
||||
index 6b91da36..6a82c579 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
|
||||
@@ -67,7 +50,7 @@ index 6b91da3..6a82c57 100644
|
||||
#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 7330cb2..0cf5677 100644
|
||||
index 7330cb2a..2d80ae38 100644
|
||||
--- a/lib/sfarklib/wcc.h
|
||||
+++ b/lib/sfarklib/wcc.h
|
||||
@@ -17,12 +17,6 @@
|
||||
@@ -83,42 +66,25 @@ index 7330cb2..0cf5677 100644
|
||||
#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 40e1f52..7e00fb4 100644
|
||||
index 2dc4d52e..3ac0f861 100644
|
||||
--- a/polyphone.pro
|
||||
+++ b/polyphone.pro
|
||||
@@ -752,7 +752,6 @@ RESOURCES += resources.qrc
|
||||
|
||||
|
||||
# SfArk extraction (what a mess!)
|
||||
-DEFINES += __LITTLE_ENDIAN__
|
||||
INCLUDEPATH += lib/sfarklib
|
||||
HEADERS += lib/sfarklib/sfArkLib.h \
|
||||
lib/sfarklib/wcc.h \
|
||||
@@ -779,13 +778,5 @@ macx {
|
||||
@@ -968,13 +968,5 @@ macx {
|
||||
ExtraCompiler.input = SPECIAL_SOURCES
|
||||
ExtraCompiler.variable_out = OBJECTS
|
||||
ExtraCompiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${QMAKE_EXT_OBJ}
|
||||
-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}
|
||||
-}
|
||||
-equals(QMAKE_CXX, g++) {
|
||||
- ExtraCompiler.commands = $${QMAKE_CXX} -fPIC -D__LITTLE_ENDIAN__ -mfpmath=387 $(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}
|
||||
-}
|
||||
-unix:!macx {
|
||||
- ExtraCompiler.commands = $${QMAKE_CXX} $(CXXFLAGS) -fPIC -D__LITTLE_ENDIAN__ -mfpmath=387 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
-}
|
||||
+ExtraCompiler.commands = $${QMAKE_CXX} $(CXXFLAGS) -fPIC $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
QMAKE_EXTRA_COMPILERS += ExtraCompiler
|
||||
--
|
||||
2.20.1
|
||||
2.21.3
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From aebd295b630dd997e9ee3c0e90b385d45de0bc17 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= <hub@figuiere.net>
|
||||
Date: Sat, 21 Mar 2020 11:05:50 -0400
|
||||
Subject: [PATCH] Sanitize includes
|
||||
|
||||
Upstream-Status: Submitted[https://github.com/davy7125/polyphone/pull/100/commits]
|
||||
|
||||
---
|
||||
context/audiodevice.cpp | 2 +-
|
||||
polyphone.pro | 4 +---
|
||||
sound_engine/voice.h | 4 ++--
|
||||
3 files changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/context/audiodevice.cpp b/context/audiodevice.cpp
|
||||
index 80a56aa6..71c9f80a 100644
|
||||
--- a/context/audiodevice.cpp
|
||||
+++ b/context/audiodevice.cpp
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "contextmanager.h"
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
-#include "jack.h"
|
||||
+#include "jack/jack.h"
|
||||
|
||||
// Jack callbacks
|
||||
int jackProcess(jack_nframes_t nframes, void * arg)
|
||||
diff --git a/polyphone.pro b/polyphone.pro
|
||||
index caa3910e..713bf312 100644
|
||||
--- a/polyphone.pro
|
||||
+++ b/polyphone.pro
|
||||
@@ -68,8 +68,7 @@ unix:!macx {
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr/local
|
||||
}
|
||||
- INCLUDEPATH += $$PREFIX/include/jack \
|
||||
- lib/flac
|
||||
+ INCLUDEPATH += lib/flac
|
||||
DESTDIR=bin
|
||||
|
||||
# Install target
|
||||
@@ -145,7 +144,6 @@ contains(DEFINES, USE_LOCAL_STK) {
|
||||
INCLUDEPATH += lib/stk
|
||||
} else {
|
||||
LIBS += -lstk
|
||||
- INCLUDEPATH += $$PREFIX/include/stk
|
||||
}
|
||||
|
||||
# Location of QCustomplot
|
||||
diff --git a/sound_engine/voice.h b/sound_engine/voice.h
|
||||
index 57b9f54a..5f9142aa 100644
|
||||
--- a/sound_engine/voice.h
|
||||
+++ b/sound_engine/voice.h
|
||||
@@ -29,8 +29,8 @@
|
||||
#include "sound.h"
|
||||
#include "enveloppevol.h"
|
||||
#include "oscsinus.h"
|
||||
-#include "Chorus.h"
|
||||
-#include "FreeVerb.h"
|
||||
+#include "stk/Chorus.h"
|
||||
+#include "stk/FreeVerb.h"
|
||||
|
||||
class Voice : public QObject
|
||||
{
|
||||
--
|
||||
2.21.3
|
||||
|
||||
@@ -3,9 +3,10 @@ HOMEPAGE = "http://polyphone-soundfonts.com/en/"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://main.cpp;beginline=6;endline=18;md5=11e8b245e7c8a15dafd52bc856ef3ff1"
|
||||
|
||||
inherit qmake5 gtk-icon-cache mime mime-xdg
|
||||
inherit qmake5 gtk-icon-cache mime mime-xdg dos2unix
|
||||
|
||||
DEPENDS += " \
|
||||
qttools-native \
|
||||
qtbase \
|
||||
qtsvg \
|
||||
alsa-lib \
|
||||
@@ -23,17 +24,20 @@ SRC_URI = " \
|
||||
file://polyphone.desktop \
|
||||
file://polyphone.mime \
|
||||
file://0001-align-compiler-switches-constants-for-cross-compilin.patch \
|
||||
file://0002-Sanitize-includes.patch \
|
||||
"
|
||||
SRCREV = "e5863e3147599e51563cd93d5f1e4f96384eba9b"
|
||||
SRCREV = "f579c57045e443b8f4b22375e3bbaf09a3e45c24"
|
||||
PV = "2.2.0+git${SRCPV}"
|
||||
S = "${WORKDIR}/git/sources"
|
||||
|
||||
do_configure_prepend() {
|
||||
sed -i \
|
||||
-e 's:= /usr/include:= ${STAGING_INCDIR}:g' \
|
||||
-e 's:^DEFINES += USE_LOCAL_:#DEFINES += USE_LOCAL_:g' \
|
||||
${S}/polyphone.pro
|
||||
}
|
||||
|
||||
CXXFLAGS += "-I${STAGING_INCDIR}/qcustomplot"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/bin/polyphone ${D}${bindir}/
|
||||
Reference in New Issue
Block a user