summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Tyr2020-11-10 23:49:43 +0000
committerJiri Tyr2020-11-11 00:34:18 +0000
commit4ca02b66075c02a65771121c1c7aa9fa505a6a5e (patch)
tree9b98bbd606e0cd7b8fa47933019e327cfe50d4be
downloadaur-4ca02b66075c02a65771121c1c7aa9fa505a6a5e.tar.gz
Initial commit
-rw-r--r--.SRCINFO41
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD72
-rw-r--r--openmarias.desktop9
-rw-r--r--path.diff79
-rw-r--r--qt5_fix.diff50
6 files changed, 258 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..78064744054
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,41 @@
+pkgbase = openmarias
+ pkgdesc = A Qt-based card game.
+ pkgver = 1.1.0.svn.r222
+ pkgrel = 1
+ url = http://openmarias.sourceforge.net
+ arch = x86_64
+ license = GNU
+ depends = bzip2
+ depends = freetype2
+ depends = gcc-libs
+ depends = glib2
+ depends = glibc
+ depends = graphite
+ depends = harfbuzz
+ depends = icu
+ depends = libgcrypt
+ depends = libgpg-error
+ depends = libpng
+ depends = libx11
+ depends = libxau
+ depends = libxcb
+ depends = libxdmcp
+ depends = lz4
+ depends = pcre
+ depends = pcre2
+ depends = qt5-base
+ depends = systemd-libs
+ depends = xz
+ depends = zlib
+ depends = zstd
+ source = openmarias::svn+https://svn.code.sf.net/p/openmarias/code
+ source = qt5_fix.diff
+ source = path.diff
+ source = openmarias.desktop
+ sha256sums = SKIP
+ sha256sums = 80ce09a4f6f71969e96b7a4b4ad0c9887c68b51de3e85022931254dfd142ba3f
+ sha256sums = 0ea629f32bc12aaf16455b4a60a1b99f8e17d66183146151024fd1e80cb06d98
+ sha256sums = 415ac6985279db9ce3388ddf604e7c641c5c2b7e51290a83d05469be0e269fdf
+
+pkgname = openmarias
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..6641cc7df30
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!qt5_fix.diff
+!path.diff
+!openmarias.desktop
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5c7570e9197
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,72 @@
+# Maintainer: Jiri Tyr <jiri.tyr@gmail.com>
+
+pkgname=openmarias
+pkgver=1.1.0.svn.r222
+pkgrel=1
+pkgdesc="A Qt-based card game."
+arch=('x86_64')
+url='http://openmarias.sourceforge.net'
+license=('GNU')
+depends=('bzip2'
+ 'freetype2'
+ 'gcc-libs'
+ 'glib2'
+ 'glibc'
+ 'graphite'
+ 'harfbuzz'
+ 'icu'
+ 'libgcrypt'
+ 'libgpg-error'
+ 'libpng'
+ 'libx11'
+ 'libxau'
+ 'libxcb'
+ 'libxdmcp'
+ 'lz4'
+ 'pcre'
+ 'pcre2'
+ 'qt5-base'
+ 'systemd-libs'
+ 'xz'
+ 'zlib'
+ 'zstd'
+ )
+makedepends=()
+source=('openmarias::svn+https://svn.code.sf.net/p/openmarias/code'
+ 'qt5_fix.diff'
+ 'path.diff'
+ 'openmarias.desktop'
+ )
+sha256sums=('SKIP'
+ '80ce09a4f6f71969e96b7a4b4ad0c9887c68b51de3e85022931254dfd142ba3f'
+ '0ea629f32bc12aaf16455b4a60a1b99f8e17d66183146151024fd1e80cb06d98'
+ '415ac6985279db9ce3388ddf604e7c641c5c2b7e51290a83d05469be0e269fdf'
+ )
+
+pkgver() {
+ cd $pkgname
+ echo "$(cat default.ini | egrep '^(major|minor|revision)=' | sed -r -e 's/.*=//' -e 's/^([0-9]).*/\1/' | tr '\n' '.' | sed 's/.$//').svn.r$(svnversion | tr -d M)"
+}
+
+prepare() {
+ cd $pkgname
+ patch --forward --strip 0 --input "$srcdir/qt5_fix.diff"
+ patch --forward --strip 1 --input "$srcdir/path.diff"
+}
+
+build() {
+ cd $pkgname
+ qmake -makefile
+ make
+}
+
+package() {
+ install -Dm755 "$srcdir/$pkgname/$pkgname" -t "$pkgdir/usr/bin"
+ install -Dm644 "$srcdir/$pkgname/"{LICENCE,README_EN}.txt -t "$pkgdir/usr/share/doc/$pkgname"
+ mkdir -p "$pkgdir/usr/share/"{$pkgname/img,applications,pixmaps}
+ cp -r "$srcdir/$pkgname/img/"{classic7,rub.png} "$pkgdir/usr/share/$pkgname/img"
+ cp -r "$srcdir/$pkgname/i18n" "$pkgdir/usr/share/$pkgname/"
+ cp "$srcdir/$pkgname/default.ini" $pkgdir/usr/share/$pkgname/marias.ini
+ cp "$srcdir/$pkgname.desktop" $pkgdir/usr/share/applications/
+ cp "$srcdir/$pkgname/img/favicon.png" $pkgdir/usr/share/pixmaps/$pkgname.png
+}
diff --git a/openmarias.desktop b/openmarias.desktop
new file mode 100644
index 00000000000..a53b6bd4b0e
--- /dev/null
+++ b/openmarias.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=OpenMarias
+Comment=Marias card game
+Exec=openmarias
+Icon=openmarias
+Terminal=false
+Categories=Qt;Game;CardGame;
diff --git a/path.diff b/path.diff
new file mode 100644
index 00000000000..186b626f4ea
--- /dev/null
+++ b/path.diff
@@ -0,0 +1,79 @@
+--- openmarias.orig/default.ini 2020-11-10 23:55:09.448722821 +0000
++++ openmarias/default.ini 2020-11-10 23:55:27.708658171 +0000
+@@ -4,8 +4,8 @@
+ revision=0
+
+ [cards]
+-images=img/classic7/
+-rub=img/rub.png
++images=/usr/share/openmarias/img/classic7/
++rub=/usr/share/openmarias/img/rub.png
+
+ [players]
+ front=HumanPlayer
+@@ -20,7 +20,7 @@
+ light_type=simple
+
+ [i18n]
+-dir=i18n/
++dir=/usr/share/openmarias/i18n/
+ lang=sk
+
+ [intro]
+--- openmarias.orig/src/deskview.cpp 2020-11-10 23:28:23.883162932 +0000
++++ openmarias/src/deskview.cpp 2020-11-11 00:19:59.970049431 +0000
+@@ -10,7 +10,7 @@
+ graphicsView = ui->graphicsView;
+ graphicsScene = new QGraphicsScene(graphicsView->sceneRect());
+ graphicsView->setScene(graphicsScene);
+- settings = new QSettings("marias.ini", QSettings::IniFormat);
++ settings = new QSettings("/usr/share/openmarias/marias.ini", QSettings::IniFormat);
+
+ //INIT IMAGES
+
+--- openmarias.orig/src/game.cpp 2020-11-10 23:28:23.883162932 +0000
++++ openmarias/src/game.cpp 2020-11-11 00:19:53.980052101 +0000
+@@ -4,7 +4,7 @@
+ Game::Game(Marias* m)
+ {
+ marias = m;
+- settings = new QSettings("marias.ini", QSettings::IniFormat);
++ settings = new QSettings("/usr/share/openmarias/marias.ini", QSettings::IniFormat);
+ bd = new BiddingDialog(this);
+ profiler = new Profiler();
+ for(int i=0;i<3;i++)stats[i]=0;
+--- openmarias.orig/src/main.cpp 2020-11-10 23:28:24.186495552 +0000
++++ openmarias/src/main.cpp 2020-11-11 00:19:28.960063396 +0000
+@@ -10,9 +10,7 @@
+ QCoreApplication::setOrganizationName("Mišo Kováč");
+ QCoreApplication::setApplicationName("OpenMarias");
+
+- if(!QFile::exists("marias.ini"))
+- QFile::copy("default.ini","marias.ini");
+- QSettings* settings = new QSettings("marias.ini", QSettings::IniFormat);
++ QSettings* settings = new QSettings("/usr/share/openmarias/marias.ini", QSettings::IniFormat);
+ QTranslator translator(0);
+ translator.load(settings->value("i18n/lang","sk").toString(),settings->value("i18n/dir","i18n/").toString());
+ a.installTranslator(&translator);
+--- openmarias.orig/src/marias.cpp 2020-11-10 23:28:23.883162932 +0000
++++ openmarias/src/marias.cpp 2020-11-11 00:20:07.226712879 +0000
+@@ -46,7 +46,7 @@
+
+ void Marias::on_actionAbout_triggered()
+ {
+- QSettings* settings = new QSettings("marias.ini", QSettings::IniFormat);
++ QSettings* settings = new QSettings("/usr/share/openmarias/marias.ini", QSettings::IniFormat);
+ QMessageBox::about(this, "About...",
+ "<b>OpenMarias</b>, free OPENsource Marias<br/>"
+ "2009-2011 by Miso Kovac<br/>"
+--- openmarias.orig/src/settingsdialog.cpp 2020-11-10 23:28:24.183162226 +0000
++++ openmarias/src/settingsdialog.cpp 2020-11-11 00:18:58.536744117 +0000
+@@ -28,7 +28,7 @@
+ }
+
+ void SettingsDialog::show(){
+- settings = new QSettings("marias.ini", QSettings::IniFormat);
++ settings = new QSettings("/usr/share/openmarias/marias.ini", QSettings::IniFormat);
+ ui->spinBox->setValue(settings->value("graphics/delay",100).toInt());
+ ui->lineEdit_4->setText(settings->value("shuffling/seed",47).toString());
+ ui->checkBox->setChecked(settings->value("shuffling/random",1)==1);
diff --git a/qt5_fix.diff b/qt5_fix.diff
new file mode 100644
index 00000000000..3c34661eed2
--- /dev/null
+++ b/qt5_fix.diff
@@ -0,0 +1,50 @@
+Index: marias.pro
+===================================================================
+--- marias.pro (revision 222)
++++ marias.pro (working copy)
+@@ -1,7 +1,8 @@
+ # -------------------------------------------------
+ # Project created by QtCreator 2009-10-30T19:04:56
+ # -------------------------------------------------
+-QT += xml
++QT += xml core widgets gui
++DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
+ TARGET = openmarias
+ TEMPLATE = app
+ CONFIG += qt \
+Index: src/main.cpp
+===================================================================
+--- src/main.cpp (revision 222)
++++ src/main.cpp (working copy)
+@@ -1,4 +1,4 @@
+-#include <QtGui/QApplication>
++#include <QtWidgets/QApplication>
+ #include <QTranslator>
+ #include <QSettings>
+ #include <QFile>
+Index: src/marias.h
+===================================================================
+--- src/marias.h (revision 222)
++++ src/marias.h (working copy)
+@@ -7,7 +7,7 @@
+ */
+ class Marias;
+
+-#include <QtGui/QMainWindow>
++#include <QtWidgets/QMainWindow>
+ #include <QRect>
+ #include "game.h"
+ #include "settingsdialog.h"
+Index: src/players/minimax/rozdania.h
+===================================================================
+--- src/players/minimax/rozdania.h (revision 222)
++++ src/players/minimax/rozdania.h (working copy)
+@@ -2,7 +2,7 @@
+ #define ROZDANIA_H
+
+ #include <QList>
+-#include <QtConcurrentFilter>
++#include <QtConcurrent/QtConcurrentFilter>
+ #include "../../stav.h"
+ #include "../../profiler.h"
+