polyphone: upgrade 1.9 -> 2.0.1
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
@@ -1,105 +1,102 @@
|
||||
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
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
|
||||
Date: Fri, 28 Dec 2018 23:12:22 +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
|
||||
various machines
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.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(-)
|
||||
polyphone.pro | 11 +----------
|
||||
4 files changed, 6 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/lib/sfarklib/sfklCoding.cpp b/lib/sfarklib/sfklCoding.cpp
|
||||
index 0749393..19b1e27 100644
|
||||
index d7f2ffd..eb522f9 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);
|
||||
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 {
|
||||
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
|
||||
}
|
||||
|
||||
// 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
|
||||
index 6b91da3..6a82c57 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
|
||||
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
|
||||
index 7330cb2..0cf5677 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"
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
// 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)
|
||||
#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 9aef72c..d10ccfa 100644
|
||||
index 40e1f52..7e00fb4 100644
|
||||
--- a/polyphone.pro
|
||||
+++ b/polyphone.pro
|
||||
@@ -385,7 +385,6 @@ RESOURCES += ressources.qrc \
|
||||
@@ -752,7 +752,6 @@ RESOURCES += resources.qrc
|
||||
|
||||
|
||||
# SfArk extraction (what a mess!)
|
||||
@@ -107,8 +104,8 @@ index 9aef72c..d10ccfa 100644
|
||||
INCLUDEPATH += lib/sfarklib
|
||||
HEADERS += lib/sfarklib/sfArkLib.h \
|
||||
lib/sfarklib/wcc.h \
|
||||
@@ -414,13 +413,6 @@ macx {
|
||||
ExtraCompiler.input = SPECIAL_SOURCE
|
||||
@@ -779,13 +778,5 @@ macx {
|
||||
ExtraCompiler.input = SPECIAL_SOURCES
|
||||
ExtraCompiler.variable_out = OBJECTS
|
||||
ExtraCompiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${QMAKE_EXT_OBJ}
|
||||
-win32 {
|
||||
@@ -117,12 +114,11 @@ index 9aef72c..d10ccfa 100644
|
||||
-equals(QMAKE_CXX, g++) {
|
||||
- ExtraCompiler.commands = $${QMAKE_CXX} -fPIC -D__LITTLE_ENDIAN__ -mfpmath=387 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
-}
|
||||
-equals(QMAKE_CXX, clang++) {
|
||||
-macx {
|
||||
- ExtraCompiler.commands = $${QMAKE_CXX} $(CXXFLAGS) -D__LITTLE_ENDIAN__ -mno-sse -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.14.3
|
||||
2.20.1
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
From 7d3e26b46cb5ce191cd1c91347c9ddfa15199f63 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
|
||||
Date: Sun, 3 Jun 2018 21:09:24 +0200
|
||||
Subject: [PATCH] config.ccp: include QAction explicitly to fix build with Qt
|
||||
5.11
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes many errors like:
|
||||
| ../git/trunk/configuration/config.cpp:363:55: error: invalid use of incomplete type 'class QAction'
|
||||
| ui->listActions->addItem(_actionList.at(i)->text().replace("&", ""));
|
||||
| ^~
|
||||
| In file included from ../recipe-sysroot/usr/include/qt5/QtWidgets/qdialog.h:44:0,
|
||||
| from ../recipe-sysroot/usr/include/qt5/QtWidgets/qcolordialog.h:45,
|
||||
| from ../recipe-sysroot/usr/include/qt5/QtWidgets/QColorDialog:1,
|
||||
| from ../git/trunk/configuration/config.cpp:27:
|
||||
|
||||
Upstream-Status: Submitted [1]
|
||||
|
||||
[1] https://github.com/davy7125/polyphone/pull/32
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
configuration/config.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configuration/config.cpp b/configuration/config.cpp
|
||||
index 93b30cb..90b304f 100644
|
||||
--- a/configuration/config.cpp
|
||||
+++ b/configuration/config.cpp
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QDir>
|
||||
#include <QColorDialog>
|
||||
#include <QDesktopServices>
|
||||
+#include <QAction>
|
||||
#include "config.h"
|
||||
#include "ui_config.h"
|
||||
#include "mainwindow.h"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SUMMARY = "Soundfont editor"
|
||||
HOMEPAGE = "http://polyphone-soundfonts.com/en/"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://main.cpp;beginline=6;endline=18;md5=092eabd5b12b1c1d876a94e06601bd81"
|
||||
LIC_FILES_CHKSUM = "file://main.cpp;beginline=6;endline=18;md5=11e8b245e7c8a15dafd52bc856ef3ff1"
|
||||
|
||||
inherit qmake5 gtk-icon-cache mime
|
||||
|
||||
@@ -23,10 +23,9 @@ SRC_URI = " \
|
||||
file://polyphone.desktop \
|
||||
file://polyphone.mime \
|
||||
file://0001-align-compiler-switches-constants-for-cross-compilin.patch \
|
||||
file://0002-config.ccp-include-QAction-explicitly-to-fix-build-w.patch \
|
||||
"
|
||||
SRCREV = "13beb7119bc573af3f5e595ae2989034c226e355"
|
||||
S = "${WORKDIR}/git/trunk"
|
||||
SRCREV = "9f9720f4fded286f253e85fc708ee9bbba507eb5"
|
||||
S = "${WORKDIR}/git/sources"
|
||||
|
||||
do_configure_prepend() {
|
||||
sed -i \
|
||||
@@ -37,10 +36,10 @@ do_configure_prepend() {
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/RELEASE/polyphone ${D}${bindir}/
|
||||
install -m 0755 ${B}/bin/polyphone ${D}${bindir}/
|
||||
|
||||
install -d ${D}${datadir}/pixmaps
|
||||
install -m 0644 ${S}/ressources/polyphone.png ${D}${datadir}/pixmaps/
|
||||
install -m 0644 ${S}/resources/polyphone.png ${D}${datadir}/pixmaps/
|
||||
|
||||
install -d ${D}${datadir}/applications
|
||||
install -m 0644 ${WORKDIR}/${BPN}.desktop ${D}${datadir}/applications/
|
||||
Reference in New Issue
Block a user