Package Details: mindustry-server 1:7.0_146-2

Git Clone URL: https://aur.archlinux.org/mindustry.git (read-only, click to copy)
Package Base: mindustry
Description: Server of a sandbox tower defense game written in Java
Upstream URL: https://github.com/Anuken/Mindustry
Licenses: GPL3
Submitter: dmitmel
Maintainer: dmitmel
Last Packager: dmitmel
Votes: 30
Popularity: 0.003360
First Submitted: 2019-10-10 21:43 (UTC)
Last Updated: 2024-01-03 19:04 (UTC)

Dependencies (7)

Required by (0)

Sources (5)

Latest Comments

1 2 3 4 5 Next › Last »

xiota commented on 2024-03-19 17:09 (UTC) (edited on 2024-03-19 20:55 (UTC) by xiota)

To build, add following to end of PKGBUILD:

# update license
license=('GPL-3.0-only')

# update makedepends
makedepends=(${makedepends[@]/java-environment*})
makedepends+=('java-environment=17')

# update depends
depends=(${depends[@]/java-runtime*})
eval _orig_"$(declare -f _package_common)"
_package_common() {
  depends+=('java-runtime')
  _orig__package_common
}

# update pkgver
pkgver=$(sed 's@_@.@g' <<< "$pkgver")
_tag=$(sed 's@^.*\.@@' <<< "$pkgver")

# add arc to source
_pkgsrc_arc="Arc-${_tag:?}"
_pkgext="tar.gz"
source+=("$_pkgsrc_arc.$_pkgext"::"https://github.com/Anuken/Arc/archive/refs/tags/v${_tag:?}.$_pkgext")
sha256sums+=('SKIP')

# prepare arc
prepare() {
  cp -rl "$_pkgsrc_arc" Arc
  cd "${_repo_name}-${_build}"
  sed -E -e '/archash/s&archash=.*$&archash=8d5651a6adebd8c04be146d9a4a95f237ecf57b2&' -i gradle.properties
}

Can also set archash=152e49944a1de4653c6aa8c822b03915fcdf25ba. Doesn't seem to make any difference (but does need to be changed, and cannot be a bogus string).

dmitmel commented on 2024-02-28 10:17 (UTC)

Uh, I suppose Java versions that are too new are not supported by the Gradle version Mindustry is using, try compiling with an older JDK

hrehfeld commented on 2024-02-28 09:48 (UTC) (edited on 2024-02-28 09:52 (UTC) by hrehfeld)

:shrug:

$ which gradle
gradle not found
$ rm -rf /home/hrehfeld/.cache/pikaur/build/mindustry/src
hrehfeld@heinrich ~
$ archlinux-java status                             
Available Java environments:
  java-11-openjdk
  java-21-openjdk (default)
hrehfeld@heinrich ~
$ pikaur -S --aur mindustry --noconfirm                  
Reading local package database...
Resolving AUR dependencies...
Reading repository package databases...
looking for conflicting AUR packages...
Not showing diff for mindustry package (--noconfirm)
:: Skipping review of PKGBUILD for mindustry package (--noconfirm)
Reading local package database...
:: Installing repository dependencies for mindustry:
resolving dependencies...
looking for conflicting packages...

Packages (1) libicns-0.8.1-10

Total Installed Size:  0.12 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                          [########################################] 100%
(1/1) checking package integrity                                        [########################################] 100%
(1/1) loading package files                                             [########################################] 100%
(1/1) checking for file conflicts                                       [########################################] 100%
(1/1) checking available disk space                                     [########################################] 100%
:: Processing package changes...
(1/1) installing libicns                                                [########################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Commit /etc/.git
++ cat -
++ xargs
+ packages=libicns
+ sh -c 'date --iso-8601=seconds >> /root/pacman-hook.log'
+ echo libicns
+ G='/usr/bin/git --git-dir=/etc/.git --work-tree=/etc'
+ /usr/bin/git --git-dir=/etc/.git --work-tree=/etc add --all /etc/
++ date --iso-8601=seconds
+ /usr/bin/git --git-dir=/etc/.git --work-tree=/etc commit -m '2024-02-28T10:47:29+01:00: libicns'
[master 5df5239] 2024-02-28T10:47:29+01:00: libicns
 1 file changed, 0 insertions(+), 0 deletions(-)
+ true
Reading local package database...

:: Starting the build:
==> Making package: mindustry 1:7.0_146-2 (2024-02-28T10:47:31 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found mindustry-146.tar.gz
  -> Found mindustry.desktop
  -> Found mindustry.sh
  -> Found mindustry-server.desktop
  -> Found mindustry-server.sh
==> Validating source files with sha256sums...
    mindustry-146.tar.gz ... Passed
    mindustry.desktop ... Passed
    mindustry.sh ... Passed
    mindustry-server.desktop ... Passed
    mindustry-server.sh ... Passed
==> Extracting sources...
  -> Extracting mindustry-146.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 
No Android SDK found. Skipping Android module.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Mindustry-146'.
> Could not open cp_proj generic class cache for build file '/home/hrehfeld/.cache/pikaur/build/mindustry/src/Mindustry-146/build.gradle' (/home/hrehfeld/.gradle/caches/7.5.1/scripts/ac4nskr41bfrj85568wxvt9pj).
   > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
==> ERROR: A failure occurred in build().
    Aborting...

Installing gradle doesn't help.

Misaka13514 commented on 2024-01-04 11:15 (UTC)

https://wiki.archlinux.org/title/Java#Launching_an_application_with_the_non-default_java_version You can restrict java version in dependencies and use environment variables to select the java version which package needs.

tiziodcaio commented on 2024-01-02 10:30 (UTC)

Why don't you use the bundled archlinux gradle?

hrehfeld commented on 2023-06-23 11:20 (UTC)

FAILURE: Build failed with an exception.

* Where:
Settings file '/home/hrehfeld/.cache/pikaur/build/mindustry/src/Mindustry-145.1/settings.gradle' line: 2

* What went wrong:
A problem occurred evaluating settings 'Mindustry-145.1'.
> !!! YOU MUST USE JAVA 16 OR ABOVE TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: 11.0.19

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

Not sure how broken the java landscape is, but shouldn't deps take care of version conflicts like this?

xiota commented on 2023-05-17 01:40 (UTC)

To build in clean chroot when cannot run archlinux-java:

  • set java-environment=17 in makedepends
  • remove java-runtime from depends
  • put java-runtime in depends+=(...) inside package() function.

airgap97 commented on 2023-04-15 11:23 (UTC) (edited on 2023-04-15 11:24 (UTC) by airgap97)

If you'd rather compile on your own, follow these instructions. First, make sure you have JDK 16-17 installed. Other JDK versions will not work. Open a terminal in the Mindustry directory and run the following commands:

sudo archlinux-java set java-17-openjdk

yohann commented on 2023-03-09 17:13 (UTC)

it may not be the right place, but it took me a lot of time to figure out i needed to do this: hopefully it we be usefull for some lurker

sudo archlinux-java set java-19-openjdk

ahmubashshir commented on 2022-12-09 15:10 (UTC) (edited on 2022-12-09 15:12 (UTC) by ahmubashshir)

It also builds with 'java-environment=17' or this patch

diff --git a/PKGBUILD b/PKGBUILD
index 4fb5089..a15ec83 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -61,6 +61,7 @@ build() {
   # Android app here.
   # <https://github.com/Anuken/Mindustry/blob/00e3a59463f41bdce5b12cf5b4715a253f7af306/settings.gradle#L14>
   unset ANDROID_HOME
+  sed -i '/distributionUrl/s/7\.5\.1/7.6-milestone-1/' gradle/wrapper/gradle-wrapper.properties

   ./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist