mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
qmc2: update to 0.187
This commit is contained in:
parent
fa46d43eeb
commit
e9b68bd757
@ -1,21 +1,29 @@
|
||||
pkgname=qmc2
|
||||
pkgver=0.70
|
||||
pkgver=0.187
|
||||
pkgrel=1
|
||||
pkgdesc="Qt based UNIX MAME frontend supporting SDLMAME."
|
||||
url="http://qmc2.batcom-it.net/"
|
||||
license=("GPL")
|
||||
arch=('x86_64')
|
||||
depends=('qt5-webkit' 'qt5-multimedia' 'qt5-svg' 'sdl2' 'libxslt' 'libarchive')
|
||||
depends=('qt5-webkit' 'qt5-multimedia' 'qt5-svg' 'sdl2' 'libxslt' 'minizip')
|
||||
makedepends=('rsync' 'mesa' 'qt5-tools')
|
||||
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
|
||||
'qmamecat.desktop')
|
||||
sha1sums=('811586a559e3fe1dbb62042d0cf4eb5e83e595c5'
|
||||
'b495666abfaca7f9d1241c14d010b6037f66f4d4')
|
||||
'qmamecat.desktop'
|
||||
'qmc2-qt5.9.patch')
|
||||
sha1sums=('f7880541006672a9c466744b85b398204782b7f8'
|
||||
'b495666abfaca7f9d1241c14d010b6037f66f4d4'
|
||||
'fd4dfb2b395a50d8dcd9eae5a5313402f44a6bd2')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgname"
|
||||
patch -p2 -i ../qmc2-qt5.9.patch # Fix build with Qt 5.9
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname"
|
||||
|
||||
make PREFIX=/usr DATADIR=/usr/share SYSCONFDIR=/etc QTDIR=/usr QMAKE=/usr/bin/qmake-qt5 LIBARCHIVE=1
|
||||
|
||||
export CTIME=0
|
||||
make PREFIX=/usr DATADIR=/usr/share SYSCONFDIR=/etc QTDIR=/usr QMAKE=/usr/bin/qmake-qt5 SYSTEM_MINIZIP=1 SYSTEM_ZLIB=1
|
||||
}
|
||||
|
||||
package(){
|
||||
|
69
qmc2/qmc2-qt5.9.patch
Normal file
69
qmc2/qmc2-qt5.9.patch
Normal file
@ -0,0 +1,69 @@
|
||||
--- a/trunk/emuopt.cpp
|
||||
+++ b/trunk/emuopt.cpp
|
||||
@@ -1196,12 +1196,13 @@
|
||||
QString choiceEntity("choice");
|
||||
QString ignoreOS(QString("ignore.%1").arg(QMC2_OS_NAME));
|
||||
validChoices.clear();
|
||||
+ QString trueStr("true");
|
||||
while ( !xmlReader->atEnd() && readNext ) {
|
||||
if ( !xmlReader->hasError() ) {
|
||||
if ( xmlReader->isStartElement() ) {
|
||||
QString elementType(xmlReader->name().toString());
|
||||
if ( choiceEntity.compare(elementType) == 0 ) {
|
||||
- if ( xmlReader->attributes().value("ignore").compare("true") != 0 && xmlReader->attributes().value(ignoreOS).compare("true") != 0 )
|
||||
+ if ( xmlReader->attributes().value("ignore").compare(trueStr) != 0 && xmlReader->attributes().value(ignoreOS).compare(QString("true")) != 0 )
|
||||
validChoices.append(xmlReader->attributes().value("name").toString());
|
||||
} else
|
||||
readNext = false;
|
||||
@@ -1240,6 +1241,8 @@
|
||||
QString templateEntity("template");
|
||||
QString ignoreOS(QString("ignore.%1").arg(QMC2_OS_NAME));
|
||||
QString defaultOS(QString("default.%1").arg(QMC2_OS_NAME));
|
||||
+ QString trueStr("true");
|
||||
+ QString choiceStr("choice");
|
||||
bool readNext = true;
|
||||
while ( !xmlReader.atEnd() ) {
|
||||
if ( readNext )
|
||||
@@ -1255,9 +1258,9 @@
|
||||
if ( sectionEntity.compare(elementType) == 0 ) {
|
||||
bool ignore = false;
|
||||
if ( xmlReader.attributes().hasAttribute("ignore") )
|
||||
- ignore = xmlReader.attributes().value("ignore").compare("true") == 0;
|
||||
+ ignore = xmlReader.attributes().value("ignore").compare(trueStr) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute(ignoreOS) )
|
||||
- ignore |= xmlReader.attributes().value(ignoreOS).compare("true") == 0;
|
||||
+ ignore |= xmlReader.attributes().value(ignoreOS).compare(trueStr) == 0;
|
||||
if ( !ignore ) {
|
||||
sectionTitle = readDescription(&xmlReader, lang, &readNext);
|
||||
templateMap[sectionTitle].clear();
|
||||
@@ -1267,17 +1270,17 @@
|
||||
if ( optionEntity.compare(elementType) == 0 ) {
|
||||
bool ignore = false;
|
||||
if ( xmlReader.attributes().hasAttribute("ignore") )
|
||||
- ignore = xmlReader.attributes().value("ignore").compare("true") == 0;
|
||||
+ ignore = xmlReader.attributes().value("ignore").compare(trueStr) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute(ignoreOS) )
|
||||
- ignore |= xmlReader.attributes().value(ignoreOS).compare("true") == 0;
|
||||
+ ignore |= xmlReader.attributes().value(ignoreOS).compare(trueStr) == 0;
|
||||
if ( !ignore ) {
|
||||
bool visible = true;
|
||||
bool wip = false;
|
||||
int decimals = QMC2_EMUOPT_DFLT_DECIMALS;
|
||||
if ( xmlReader.attributes().hasAttribute("wip") )
|
||||
- wip = xmlReader.attributes().value("wip").compare("true") == 0;
|
||||
+ wip = xmlReader.attributes().value("wip").compare(trueStr) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute("visible") )
|
||||
- visible = xmlReader.attributes().value("visible").compare("true") == 0;
|
||||
+ visible = xmlReader.attributes().value("visible").compare(trueStr) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute("decimals") )
|
||||
decimals = xmlReader.attributes().value("decimals").toString().toInt();
|
||||
QString type(xmlReader.attributes().value("type").toString());
|
||||
@@ -1288,7 +1291,7 @@
|
||||
defaultValue = xmlReader.attributes().value("default").toString();
|
||||
QString optionDescription(readDescription(&xmlReader, lang, &readNext));
|
||||
optionChoices.clear();
|
||||
- if ( type.compare("combo") == 0 && xmlReader.name().compare("choice") == 0 )
|
||||
+ if ( type.compare("combo") == 0 && xmlReader.name().compare(choiceStr) == 0 )
|
||||
optionChoices = readChoices(&xmlReader);
|
||||
optionPart.clear();
|
||||
optionRelativeTo.clear();
|
Loading…
Reference in New Issue
Block a user