summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan Coward2021-01-02 21:19:46 -0500
committerAidan Coward2021-01-02 21:19:46 -0500
commit5430a95677ed1d0f0a00ab8eec94c507f2384a8b (patch)
treef2987b3684a16cb14793b33a2d387cff3ec632e5
parentf5c532ff5017ba57455eddb6d186d8100a18284c (diff)
downloadaur-5430a95677ed1d0f0a00ab8eec94c507f2384a8b.tar.gz
Confirmed compatibility with repository version of OpenJDK 8
Added java8-openjfx as a dependency Removed bundled JRE from default PKGBUILD Created new, alternative PKGBUILD-jre-8u201-x86_64 that installs bundled JRE as provided by upstream developers
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD33
-rw-r--r--PKGBUILD-jre-8u201-x86_64 (renamed from PKGBUILD-only-openjdk)21
-rw-r--r--README.txt15
4 files changed, 34 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d97da72cac0a..6f7a5a135aee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,21 @@
pkgbase = xmage
pkgdesc = Java-based program for playing Magic:The Gathering, including client and server
pkgver = 1.4.47V1
- pkgrel = 1
+ pkgrel = 2
url = http://xmage.de
install = xmage.install
arch = any
license = MIT
makedepends = detox
+ depends = jre8-openjdk
+ depends = java8-openjfx
optdepends = wmname: change window manager name for compatibility with certain WMs
source = http://xmage.de/files/xmage_1.4.47V1.zip
source = https://raw.githubusercontent.com/magefree/mage/master/LICENSE.txt
source = https://raw.githubusercontent.com/magefree/Launcher/master/src/main/resources/icon-mage.png
- source = http://xmage.today/java/jre-8u201-linux-x64.tar.gz
sha256sums = eb87a9e8a632d3691f6c7401d99bffd44f52d572b1434e07546ddbb35991c7bb
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = 12c745fbb8735bf450b8c6ba6f649bebe19915f05742975e443bdc8566170352
pkgname = xmage
diff --git a/PKGBUILD b/PKGBUILD
index f85e21f83b93..b881b061f82d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,10 +3,15 @@
pkgname=xmage
pkgver=1.4.47V1
-pkgrel=1
+pkgrel=2
pkgdesc="Java-based program for playing Magic:The Gathering, including client and server"
+depends=(
+ 'jre8-openjdk'
+ 'java8-openjfx'
+)
+
arch=('any')
url="http://xmage.de"
license=('MIT')
@@ -20,24 +25,6 @@ sha256sums=("eb87a9e8a632d3691f6c7401d99bffd44f52d572b1434e07546ddbb35991c7bb"
"SKIP"
"SKIP")
-###########################
-# x86_64 ONLY
-# Due to compatibility issues with the current version of java in the repositories,
-# xmage now installs a dedicated version of java to /usr/share/xmage/java
-#
-# For all other architectures, the xmage package requires only jre8-openjdk
-###########################
-
-if [[ "$CARCH" == 'x86_64' ]]; then
- source+=('http://xmage.today/java/jre-8u201-linux-x64.tar.gz')
- sha256sums+=('12c745fbb8735bf450b8c6ba6f649bebe19915f05742975e443bdc8566170352')
- _java_version=8u201
- _java_dir=jre1.8.0_201
-
- else
- depends=('jre8-openjdk')
-fi
-
makedepends=('detox')
optdepends=('wmname: change window manager name for compatibility with certain WMs')
install="${pkgname}.install"
@@ -61,11 +48,9 @@ package() {
sed -i '2i cd /usr/share/xmage/mage-client' mage-client/startClient-unix.sh
sed -i '2i cd /usr/share/xmage/mage-server' mage-server/startServer-unix.sh
-if [[ "$CARCH" == 'x86_64' ]]; then
- msg2 "x86_64 architecture detected, changing location of java binary..."
- sed -i "s|java|/usr/share/xmage/${_java_dir}/bin/java|g" mage-client/startClient-unix.sh
- sed -i "s|java|/usr/share/xmage/${_java_dir}/bin/java|g" mage-server/startServer-unix.sh
-fi
+ msg2 "specifying location of OpenJDK 8"
+ sed -i "s|java|/usr/lib/jvm/java-8-openjdk/bin/java|g" mage-client/startClient-unix.sh
+ sed -i "s|java|/usr/lib/jvm/java-8-openjdk/bin/java|g" mage-server/startServer-unix.sh
msg2 "increasing default memory limit of client and server"
sed -i 's|-Xmx512m|-Xmx2048m|g' mage-client/startClient-unix.sh
diff --git a/PKGBUILD-only-openjdk b/PKGBUILD-jre-8u201-x86_64
index f70805f5a931..a99eb84c7036 100644
--- a/PKGBUILD-only-openjdk
+++ b/PKGBUILD-jre-8u201-x86_64
@@ -3,24 +3,28 @@
pkgname=xmage
pkgver=1.4.47V1
-pkgrel=1
+pkgrel=2
+_java_version=8u201
+_java_dir=jre1.8.0_201
pkgdesc="Java-based program for playing Magic:The Gathering, including client and server"
-arch=('any')
+arch=('x86_64')
url="http://xmage.de"
license=('MIT')
source=("http://xmage.de/files/xmage_${pkgver}.zip"
'https://raw.githubusercontent.com/magefree/mage/master/LICENSE.txt'
- 'https://raw.githubusercontent.com/magefree/Launcher/master/src/main/resources/icon-mage.png')
-
+ 'https://raw.githubusercontent.com/magefree/Launcher/master/src/main/resources/icon-mage.png'
+ 'http://xmage.today/java/jre-8u201-linux-x64.tar.gz'
+)
sha256sums=("eb87a9e8a632d3691f6c7401d99bffd44f52d572b1434e07546ddbb35991c7bb"
"SKIP"
- "SKIP")
+ "SKIP"
+ '12c745fbb8735bf450b8c6ba6f649bebe19915f05742975e443bdc8566170352'
+)
-depends=('jre8-openjdk')
makedepends=('detox')
optdepends=('wmname: change window manager name for compatibility with certain WMs')
install="${pkgname}.install"
@@ -44,6 +48,10 @@ package() {
sed -i '2i cd /usr/share/xmage/mage-client' mage-client/startClient-unix.sh
sed -i '2i cd /usr/share/xmage/mage-server' mage-server/startServer-unix.sh
+ msg2 "changing location of java binary for x86_64 architecture..."
+ sed -i "s|java|/usr/share/xmage/${_java_dir}/bin/java|g" mage-client/startClient-unix.sh
+ sed -i "s|java|/usr/share/xmage/${_java_dir}/bin/java|g" mage-server/startServer-unix.sh
+
msg2 "increasing default memory limit of client and server"
sed -i 's|-Xmx512m|-Xmx2048m|g' mage-client/startClient-unix.sh
sed -i 's|-Xmx512m|-Xmx2048m|g' mage-server/startServer-unix.sh
@@ -74,3 +82,4 @@ package() {
mkdir -p "${pkgdir}"/usr/share/applications
install -m755 ../xmage.desktop "${pkgdir}"/usr/share/applications/xmage.desktop
}
+
diff --git a/README.txt b/README.txt
index b54717ca0072..85fec3d0370e 100644
--- a/README.txt
+++ b/README.txt
@@ -1,11 +1,10 @@
-Due to compatibility issues with the current version of java in the repositories,
-xmage now installs a dedicated version of java to /usr/share/xmage/java.
-This is only applicable for x86_64 machines. For all other architectures, the package requires
-the jre8-openjdk package. The developers only guarantee compatibility with a single version of
-java.
-If you have a x86_64 machine and you wish to only use the repository java,
-replace the included PKGBUILD with PKGBUILD-only-openjdk and then build the
-package as usual
+The package uses the repository version of OpenJDK 8.
+
+If you have problems with java compatibility, you can try using the version of OpenJDK 8 that is specified by the developers.
+To do so, replace the default PKGBUILD with PKGBUILD-jre-8u201-x86_64 and then build the package as usual.
+This downloads the jre from the xmage servers as a standalone java installation and simulates the behaviour
+of the default xmage installer.
+This is only available for the x86_64 architecture.
The developers assign 512MB of memory to each of mage-client and mage-server.
This is changed to 2048MB in the PKGBUILD. If you wish to modify this, change the -Xmx2048m in