Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: mindustry-7.0_b146
@ 2024-10-23 11:46 MIvanchev
  2024-10-23 12:17 ` MIvanchev
                   ` (25 more replies)
  0 siblings, 26 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 11:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

There is a new pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 9676 bytes --]

From 3c3ce155c1f46ab560503c86b50f001c5a628538 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                      |   1 +
 srcpkgs/mindustry/files/mindustry             |   2 +
 srcpkgs/mindustry/files/mindustry-server      |   2 +
 .../mindustry/files/mindustry-server.desktop  |   9 ++
 srcpkgs/mindustry/files/mindustry.desktop     |   9 ++
 srcpkgs/mindustry/patches/local-arc.patch     | 114 ++++++++++++++++++
 srcpkgs/mindustry/template                    |  61 ++++++++++
 7 files changed, 198 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry-server.desktop
 create mode 100644 srcpkgs/mindustry/files/mindustry.desktop
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server.desktop b/srcpkgs/mindustry/files/mindustry-server.desktop
new file mode 100644
index 00000000000000..f5bda888494a20
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Mindustry Server
+Comment=Automation tower defense RTS (server)
+Exec=mindustry-server
+Icon=mindustry-server
+Categories=Game;
+Terminal=true
diff --git a/srcpkgs/mindustry/files/mindustry.desktop b/srcpkgs/mindustry/files/mindustry.desktop
new file mode 100644
index 00000000000000..e9f2c8377e01ca
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Mindustry
+Comment=Automation tower defense RTS
+Exec=mindustry
+Icon=mindustry
+Categories=Game;
+Terminal=false
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..2bd4eb64581d00
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,61 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, we have no wait to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall ${FILESDIR}/mindustry.desktop 644 usr/share/applications
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vinstall ${FILESDIR}/mindustry-server.desktop 644 usr/share/applications
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
@ 2024-10-23 12:17 ` MIvanchev
  2024-10-23 12:17 ` MIvanchev
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 12:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2431935153

Comment:
@classabbyamp Yes I know but this would be quite unusable without them.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
  2024-10-23 12:17 ` MIvanchev
@ 2024-10-23 12:17 ` MIvanchev
  2024-10-23 12:18 ` [PR PATCH] [Updated] " MIvanchev
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 12:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2431935153

Comment:
@classabbyamp Yes I know but this would be quite unusable without them.

P.S.
I mean no, you're right, the scripts are enough to launch, I'll remove em.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
  2024-10-23 12:17 ` MIvanchev
  2024-10-23 12:17 ` MIvanchev
@ 2024-10-23 12:18 ` MIvanchev
  2024-10-23 12:19 ` MIvanchev
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 12:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 9676 bytes --]

From 30cbebeb81895372958bf2d5fbe83e22c9a7c148 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                      |   1 +
 srcpkgs/mindustry/files/mindustry             |   2 +
 srcpkgs/mindustry/files/mindustry-server      |   2 +
 .../mindustry/files/mindustry-server.desktop  |   9 ++
 srcpkgs/mindustry/files/mindustry.desktop     |   9 ++
 srcpkgs/mindustry/patches/local-arc.patch     | 114 ++++++++++++++++++
 srcpkgs/mindustry/template                    |  61 ++++++++++
 7 files changed, 198 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry-server.desktop
 create mode 100644 srcpkgs/mindustry/files/mindustry.desktop
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server.desktop b/srcpkgs/mindustry/files/mindustry-server.desktop
new file mode 100644
index 00000000000000..f5bda888494a20
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Mindustry Server
+Comment=Automation tower defense RTS (server)
+Exec=mindustry-server
+Icon=mindustry-server
+Categories=Game;
+Terminal=true
diff --git a/srcpkgs/mindustry/files/mindustry.desktop b/srcpkgs/mindustry/files/mindustry.desktop
new file mode 100644
index 00000000000000..e9f2c8377e01ca
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Mindustry
+Comment=Automation tower defense RTS
+Exec=mindustry
+Icon=mindustry
+Categories=Game;
+Terminal=false
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..2bd4eb64581d00
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,61 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, we have no wait to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall ${FILESDIR}/mindustry.desktop 644 usr/share/applications
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vinstall ${FILESDIR}/mindustry-server.desktop 644 usr/share/applications
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (2 preceding siblings ...)
  2024-10-23 12:18 ` [PR PATCH] [Updated] " MIvanchev
@ 2024-10-23 12:19 ` MIvanchev
  2024-10-23 12:23 ` MIvanchev
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 12:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8563 bytes --]

From bc79db28f8fc4a90788ab2844f5cd35da546d011 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  61 ++++++++++++
 5 files changed, 180 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..2bd4eb64581d00
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,61 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, we have no wait to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall ${FILESDIR}/mindustry.desktop 644 usr/share/applications
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vinstall ${FILESDIR}/mindustry-server.desktop 644 usr/share/applications
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (3 preceding siblings ...)
  2024-10-23 12:19 ` MIvanchev
@ 2024-10-23 12:23 ` MIvanchev
  2024-10-23 12:28 ` MIvanchev
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 12:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8566 bytes --]

From a5642742e02d400f8a69c814535b4c7e0f6b4244 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  61 ++++++++++++
 5 files changed, 180 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..cc2ce91fb1290d
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,61 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall ${FILESDIR}/mindustry.desktop 644 usr/share/applications
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vinstall ${FILESDIR}/mindustry-server.desktop 644 usr/share/applications
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (4 preceding siblings ...)
  2024-10-23 12:23 ` MIvanchev
@ 2024-10-23 12:28 ` MIvanchev
  2024-10-23 14:56 ` Johnnynator
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 12:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8421 bytes --]

From 4777bf02faf643c39f913b29c30cdbbde4d7ef1e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  59 +++++++++++
 5 files changed, 178 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..10387335c55e6a
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,59 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (5 preceding siblings ...)
  2024-10-23 12:28 ` MIvanchev
@ 2024-10-23 14:56 ` Johnnynator
  2024-10-23 15:03 ` Johnnynator
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: Johnnynator @ 2024-10-23 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432514532

Comment:
Mindustries Readme specifies exactly openjdk17, not 17+. Maybe we should to reflect that in dependeency (and launch script).

The i668*|*-musl broke sounds like gradle fetches a prebuilt libarc.so? So it will most likely also be broken on some cross builts?!

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (6 preceding siblings ...)
  2024-10-23 14:56 ` Johnnynator
@ 2024-10-23 15:03 ` Johnnynator
  2024-10-23 15:03 ` Johnnynator
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: Johnnynator @ 2024-10-23 15:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432539576

Comment:
https://github.com/Anuken/Arc/tree/master/natives/natives-desktop/libs

The Arc repo has precompiled libs directly in their git repo. Arc's native libraries should be build from source.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (7 preceding siblings ...)
  2024-10-23 15:03 ` Johnnynator
@ 2024-10-23 15:03 ` Johnnynator
  2024-10-23 15:14 ` MIvanchev
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: Johnnynator @ 2024-10-23 15:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432539576

Comment:
https://github.com/Anuken/Arc/tree/master/natives/natives-desktop/libs

The Arc repo has precompiled libs directly in their git repo. Arc's native libraries should be built from source.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (8 preceding siblings ...)
  2024-10-23 15:03 ` Johnnynator
@ 2024-10-23 15:14 ` MIvanchev
  2024-10-23 15:15 ` MIvanchev
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 15:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432582044

Comment:
@Johnnynator do you know how the native libs should be built?

>The i668*|*-musl broke sounds like gradle fetches a prebuilt libarc.so? So it will most likely also be broken on some cross builts?!

Yes, the build uses the libs that are in the repo.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (9 preceding siblings ...)
  2024-10-23 15:14 ` MIvanchev
@ 2024-10-23 15:15 ` MIvanchev
  2024-10-23 15:21 ` Johnnynator
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 15:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432582044

Comment:
@Johnnynator do you know how the native libs should be built?

>The i668*|*-musl broke sounds like gradle fetches a prebuilt libarc.so? So it will most likely also be broken on some cross builts?!

Yes, the build uses the libs that are in the repo.

>Mindustries Readme specifies exactly openjdk17, not 17+. Maybe we should to reflect that in dependeency (and launch script).

Fixed Java dependency is HIGHLY unusual and works quite well here with openjdk21.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (10 preceding siblings ...)
  2024-10-23 15:15 ` MIvanchev
@ 2024-10-23 15:21 ` Johnnynator
  2024-10-23 15:46 ` Johnnynator
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: Johnnynator @ 2024-10-23 15:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432606110

Comment:
> @Johnnynator do you know how the native libs should be built?

gradle... jni... no, not really, I just know how stuff is broken, not how to fix :(.
And that gradle scripts of arc look like pain, using curl to fetch sources and other things.
These gradle build scripts assume a developer that wants to ship a `.jar` that works on x systems, not a Distro, that wants to build the `.jar` for a single arch and have a package manager that selects the correct jar to download (or bundle it into a package)

> > The i668*|*-musl broke sounds like gradle fetches a prebuilt libarc.so? So it will most likely also be broken on some cross builts?!
> 
> Yes, the build uses the libs that are in the repo.

They only provide a glibc x64 precompiled right no, so everything not `x86_64` is 100% broken.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (11 preceding siblings ...)
  2024-10-23 15:21 ` Johnnynator
@ 2024-10-23 15:46 ` Johnnynator
  2024-10-23 15:55 ` MIvanchev
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: Johnnynator @ 2024-10-23 15:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432689080

Comment:
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/games/mindustry/default.nix#L165-L181

Nix does things

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (12 preceding siblings ...)
  2024-10-23 15:46 ` Johnnynator
@ 2024-10-23 15:55 ` MIvanchev
  2024-10-23 17:38 ` [PR PATCH] [Updated] " MIvanchev
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 15:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2432711210

Comment:
@Johnnynator I'll see if I can build the native libs myself to support more :) Thanks!

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (13 preceding siblings ...)
  2024-10-23 15:55 ` MIvanchev
@ 2024-10-23 17:38 ` MIvanchev
  2024-10-23 17:42 ` MIvanchev
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 17:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8650 bytes --]

From dd09313bd5d47ae457258fd5666101856db55273 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  66 +++++++++++++
 5 files changed, 185 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..4c51676a9b7e0a
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,66 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	pushd ../Arc
+	./gradlew arc-core:jnigenBuild
+	./gradlew extensions:freetype:jnigenBuild
+	cp arc-core/libs/*/* natives/natives-desktop/libs/
+	cp extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
+	popd
+
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (14 preceding siblings ...)
  2024-10-23 17:38 ` [PR PATCH] [Updated] " MIvanchev
@ 2024-10-23 17:42 ` MIvanchev
  2024-10-24  6:51 ` [PR PATCH] [Updated] [WIP] " MIvanchev
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-23 17:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8708 bytes --]

From 3ba876fff36bf73f02831773771cbfd6f367a62e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  67 +++++++++++++
 5 files changed, 186 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..d423c990beb67f
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,67 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17 curl wget"
+makedepends="pkg-config glew-devel SDL2-devel"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	pushd ../Arc
+	./gradlew arc-core:jnigenBuild
+	./gradlew extensions:freetype:jnigenBuild
+	cp arc-core/libs/*/* natives/natives-desktop/libs/
+	cp extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
+	popd
+
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (15 preceding siblings ...)
  2024-10-23 17:42 ` MIvanchev
@ 2024-10-24  6:51 ` MIvanchev
  2024-10-24  7:12 ` MIvanchev
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  6:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

[WIP] New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8696 bytes --]

From e2f9eb81a74030e71b2568ec6ad15c7053d6a6fa Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  67 +++++++++++++
 5 files changed, 186 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..7ef8681cb86f2b
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,67 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17 curl wget git unzip"
+makedepends="SDL2-devel"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	pushd ../Arc
+	./gradlew arc-core:jnigenBuild
+	./gradlew extensions:freetype:jnigenBuild
+	cp arc-core/libs/*/* natives/natives-desktop/libs/
+	cp extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
+	popd
+
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (16 preceding siblings ...)
  2024-10-24  6:51 ` [PR PATCH] [Updated] [WIP] " MIvanchev
@ 2024-10-24  7:12 ` MIvanchev
  2024-10-24  7:13 ` MIvanchev
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  7:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

[WIP] New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8718 bytes --]

From 5263389621b94de2458c3b2f9b649e6e93bfc0bc Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  67 +++++++++++++
 5 files changed, 186 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..15b642ba360d5e
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,67 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+makedepends="alsa-lib-devel libdrm2-devel SDL2-devel libgbm-devel"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	pushd ../Arc
+	./gradlew arc-core:jnigenBuild
+	./gradlew extensions:freetype:jnigenBuild
+	cp arc-core/libs/*/* natives/natives-desktop/libs/
+	cp extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
+	popd
+
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (17 preceding siblings ...)
  2024-10-24  7:12 ` MIvanchev
@ 2024-10-24  7:13 ` MIvanchev
  2024-10-24  7:16 ` MIvanchev
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  7:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

[WIP] New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8766 bytes --]

From 16f7d904413f349448d4c557fd32dd4d8b513153 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  67 +++++++++++++
 5 files changed, 186 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..486c37d57b295d
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,67 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+makedepends="cross-i686-w64-mingw32 cross-x86_64-w64-mingw32 alsa-lib-devel libdrm2-devel SDL2-devel libgbm-devel"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	pushd ../Arc
+	./gradlew arc-core:jnigenBuild
+	./gradlew extensions:freetype:jnigenBuild
+	cp arc-core/libs/*/* natives/natives-desktop/libs/
+	cp extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
+	popd
+
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (18 preceding siblings ...)
  2024-10-24  7:13 ` MIvanchev
@ 2024-10-24  7:16 ` MIvanchev
  2024-10-24  7:19 ` MIvanchev
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  7:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

[WIP] New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8765 bytes --]

From e1654674ec9ebddbd388736d8c45dc0480e90c48 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  67 +++++++++++++
 5 files changed, 186 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..57afbcc81e6792
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,67 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+makedepends="cross-i686-w64-mingw32 cross-x86_64-w64-mingw32 alsa-lib-devel libdrm-devel SDL2-devel libgbm-devel"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	pushd ../Arc
+	./gradlew arc-core:jnigenBuild
+	./gradlew extensions:freetype:jnigenBuild
+	cp arc-core/libs/*/* natives/natives-desktop/libs/
+	cp extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
+	popd
+
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (19 preceding siblings ...)
  2024-10-24  7:16 ` MIvanchev
@ 2024-10-24  7:19 ` MIvanchev
  2024-10-24  7:29 ` MIvanchev
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  7:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

[WIP] New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8785 bytes --]

From 1b762f99bf58edd93f6f6d128293e9ca7c9976ae Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  67 +++++++++++++
 5 files changed, 186 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..40d4a3ebe86ef3
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,67 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17 curl git unzip wget"
+makedepends="cross-i686-w64-mingw32 cross-x86_64-w64-mingw32 alsa-lib-devel libdrm-devel SDL2-devel libgbm-devel"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library 'libarc64.so' for target: Linux, 64-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	pushd ../Arc
+	./gradlew arc-core:jnigenBuild
+	./gradlew extensions:freetype:jnigenBuild
+	cp arc-core/libs/*/* natives/natives-desktop/libs/
+	cp extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
+	popd
+
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (20 preceding siblings ...)
  2024-10-24  7:19 ` MIvanchev
@ 2024-10-24  7:29 ` MIvanchev
  2024-10-24  7:31 ` MIvanchev
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  7:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

[WIP] New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8407 bytes --]

From 9269b9053849c50f279d8f60a048e9e775d86123 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  59 +++++++++++
 5 files changed, 178 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..bc05e760fc6a6d
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,59 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+nocross="Build involves JNI steps which are incompatible with cross builds"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (21 preceding siblings ...)
  2024-10-24  7:29 ` MIvanchev
@ 2024-10-24  7:31 ` MIvanchev
  2024-10-24  7:35 ` [PR PATCH] [Updated] " MIvanchev
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  7:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2434510869

Comment:
@Johnnynator I'm giving up on building Arc as it's not trivial and likely won't improve the situation much. Maybe one day they'll improve their setup.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (22 preceding siblings ...)
  2024-10-24  7:31 ` MIvanchev
@ 2024-10-24  7:35 ` MIvanchev
  2025-01-23  1:57 ` github-actions
  2025-01-23  8:03 ` MIvanchev
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-10-24  7:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

There is an updated pull request by MIvanchev against master on the void-packages repository

https://github.com/MIvanchev/void-packages ci-mindustry
https://github.com/void-linux/void-packages/pull/52749

[WIP] New package: mindustry-7.0_b146
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)

Solves #38019, #45582.

A patch file from https://github.com/void-linux/void-packages/pull/52749.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-mindustry-52749.patch --]
[-- Type: text/x-diff, Size: 8459 bytes --]

From d85684f73326f93332a9e7f2c2d5a53e8113faeb Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Wed, 3 Apr 2024 17:05:39 +0200
Subject: [PATCH] New package: mindustry-7.0_b146

---
 srcpkgs/mindustry-server                  |   1 +
 srcpkgs/mindustry/files/mindustry         |   2 +
 srcpkgs/mindustry/files/mindustry-server  |   2 +
 srcpkgs/mindustry/patches/local-arc.patch | 114 ++++++++++++++++++++++
 srcpkgs/mindustry/template                |  60 ++++++++++++
 5 files changed, 179 insertions(+)
 create mode 120000 srcpkgs/mindustry-server
 create mode 100644 srcpkgs/mindustry/files/mindustry
 create mode 100644 srcpkgs/mindustry/files/mindustry-server
 create mode 100644 srcpkgs/mindustry/patches/local-arc.patch
 create mode 100644 srcpkgs/mindustry/template

diff --git a/srcpkgs/mindustry-server b/srcpkgs/mindustry-server
new file mode 120000
index 00000000000000..9eaea683d630ea
--- /dev/null
+++ b/srcpkgs/mindustry-server
@@ -0,0 +1 @@
+mindustry
\ No newline at end of file
diff --git a/srcpkgs/mindustry/files/mindustry b/srcpkgs/mindustry/files/mindustry
new file mode 100644
index 00000000000000..392ab236e52782
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/Mindustry.jar "$@"
diff --git a/srcpkgs/mindustry/files/mindustry-server b/srcpkgs/mindustry/files/mindustry-server
new file mode 100644
index 00000000000000..abbde29b1db716
--- /dev/null
+++ b/srcpkgs/mindustry/files/mindustry-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/java -jar /usr/share/mindustry/server-release.jar "$@"
diff --git a/srcpkgs/mindustry/patches/local-arc.patch b/srcpkgs/mindustry/patches/local-arc.patch
new file mode 100644
index 00000000000000..fe0f3569d48d53
--- /dev/null
+++ b/srcpkgs/mindustry/patches/local-arc.patch
@@ -0,0 +1,114 @@
+diff '--color=auto' -Naur a/build.gradle b/build.gradle
+--- a/build.gradle	2024-10-22 17:02:02.872062571 +0200
++++ b/build.gradle	2024-10-21 16:04:59.582642809 +0200
+@@ -1,10 +1,14 @@
+ buildscript{
+     ext{
+-        getArcHash = {
+-            return new Properties().with{ p -> p.load(file('gradle.properties').newReader()); return p }["archash"]
+-        }
++        arcHash = property("archash")
++
++        localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
+ 
+-        arcHash = getArcHash()
++        arcModule = { String name ->
++            //skip to last submodule
++            name = name.substring(name.lastIndexOf(':') + 1)
++            return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
++        }
+     }
+     
+     repositories{
+@@ -16,8 +20,8 @@
+     }
+ 
+     dependencies{
+-        classpath "com.github.Anuken.Arc:packer:$arcHash"
+-        classpath "com.github.Anuken.Arc:arc-core:$arcHash"
++        classpath arcModule(":extensions:packer")
++        classpath arcModule(":arc-core")
+     }
+ }
+ 
+@@ -48,20 +52,6 @@
+             return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
+         }
+ 
+-        localArc = {
+-            return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
+-        }
+-
+-        arcModule = { String name ->
+-            if(localArc()){
+-                return project(":Arc:$name")
+-            }else{
+-                //skip to last submodule
+-                if(name.contains(':')) name = name.split(':').last()
+-                return "com.github.Anuken.Arc:$name:${getArcHash()}"
+-            }
+-        }
+-
+         generateDeployName = { String platform ->
+             if(platform == "windows"){
+                 platform += "64"
+@@ -331,8 +321,8 @@
+         api arcModule("extensions:fx")
+         api arcModule("extensions:arcnet")
+         api "com.github.Anuken:rhino:$rhinoVersion"
+-        if(localArc() && debugged()) api arcModule("extensions:recorder")
+-        if(localArc()) api arcModule(":extensions:packer")
++        if(localArc && debugged()) api arcModule("extensions:recorder")
++        if(localArc) api arcModule(":extensions:packer")
+ 
+         annotationProcessor 'com.github.Anuken:jabel:0.9.0'
+         compileOnly project(":annotations")
+@@ -423,7 +413,7 @@
+ 
+     dependencies{
+         implementation 'com.squareup:javapoet:1.12.1'
+-        implementation "com.github.Anuken.Arc:arc-core:$arcHash"
++        implementation arcModule("arc-core")
+     }
+ }
+ 
+diff '--color=auto' -Naur a/settings.gradle b/settings.gradle
+--- a/settings.gradle	2024-10-22 17:02:31.778129695 +0200
++++ b/settings.gradle	2024-10-22 17:04:44.499440184 +0200
+@@ -34,33 +34,9 @@
+ }
+ 
+ if(!hasProperty("release")){
+-    if(new File(settingsDir, '../Arc').exists()){
+-        use(
+-        ':Arc',
+-        ':Arc:arc-core',
+-        ':Arc:extensions',
+-        ':Arc:extensions:freetype',
+-        ':Arc:extensions:recorder',
+-        ':Arc:extensions:arcnet',
+-        ':Arc:extensions:packer',
+-        ':Arc:extensions:g3d',
+-        ':Arc:extensions:fx',
+-        ':Arc:extensions:flabel',
+-        ':Arc:extensions:discord',
+-        ':Arc:extensions:profiling',
+-        ':Arc:natives',
+-        ':Arc:natives:natives-desktop',
+-        ':Arc:natives:natives-android',
+-        ':Arc:natives:natives-ios',
+-        ':Arc:natives:natives-freetype-desktop',
+-        ':Arc:natives:natives-freetype-android',
+-        ':Arc:natives:natives-freetype-ios',
+-        ':Arc:backends',
+-        ':Arc:backends:backend-sdl',
+-        ':Arc:backends:backend-android',
+-        ':Arc:backends:backend-robovm',
+-        ':Arc:backends:backend-headless'
+-        )
++    if(new File(rootDir.parent, 'Arc').exists()){
++        println("Compiling with localArc")
++        includeBuild("../Arc")
+     }
+ 
+     if(new File(settingsDir, '../Mindustry-Debug').exists()){
diff --git a/srcpkgs/mindustry/template b/srcpkgs/mindustry/template
new file mode 100644
index 00000000000000..7da182cab64a45
--- /dev/null
+++ b/srcpkgs/mindustry/template
@@ -0,0 +1,60 @@
+# Template file for 'mindustry'
+pkgname=mindustry
+version=7.0.b146
+revision=1
+_build=${version##*.b}
+hostmakedepends="openjdk17"
+depends="virtual?java-runtime desktop-file-utils hicolor-icon-theme"
+short_desc="Automation tower defense RTS"
+maintainer="Mihail Ivanchev <contact@ivanchev.net>"
+license="GPL-3.0-or-later"
+homepage="https://mindustrygame.github.io/"
+distfiles="https://github.com/Anuken/Arc/archive/refs/tags/v${_build}.tar.gz>Arc.tar.gz
+	https://github.com/Anuken/Mindustry/archive/refs/tags/v${_build}.tar.gz>Mindustry.tar.gz"
+checksum="30cc1b00968aaec8dbb76a2dad6439c7d7418970fafe24c350b2be4e68c3e5d6
+ aa1684d87d9f3e1d1a2da415b5e055ea6493fe31398748447927bd903019adbd"
+skip_extraction="Arc.tar.gz Mindustry.tar.gz"
+nocross="Build involves JNI steps which are incompatible with cross builds"
+build_wrksrc=Mindustry-${_build}
+patch_args="-Np1 --directory=${build_wrksrc}"
+
+# TODO: Make sure this template doesn't download anything. Currently not possible
+# because Void's Gradle version is incompatible.
+
+# TODO: Mindustry will not run on JRE<17, but we have no way to check this because
+# virtual?java-runtime>=17 doesn't seem to work.
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) broken="Couldn't load shared library 'libarc.so' for target: Linux, 32-bit" ;;
+	*-musl) broken="Couldn't load shared library" ;;
+esac
+
+# JAVA_HOME needs to be set because otherwise gradle fails to find Java.
+
+export JAVA_HOME=/usr/lib/jvm/openjdk17
+
+post_extract() {
+	vsrcextract -C Arc Arc.tar.gz
+	vsrcextract -C ${build_wrksrc} Mindustry.tar.gz
+}
+
+do_build() {
+	./gradlew --no-daemon dist -Pbuildversion="${_build}" desktop:dist server:dist
+}
+
+do_install() {
+	vmkdir usr/share/mindustry
+	vinstall desktop/build/libs/Mindustry.jar 644 usr/share/mindustry
+	vbin ${FILESDIR}/mindustry
+	vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry.png
+}
+
+mindustry-server_package() {
+	short_desc+=" (server)"
+	pkg_install() {
+		vmkdir usr/share/mindustry
+		vinstall server/build/libs/server-release.jar 644 usr/share/mindustry
+		vbin ${FILESDIR}/mindustry-server
+	        vinstall core/assets/icons/icon_64.png 644 usr/share/icons/hicolor/64x64/apps mindustry-server.png
+	}
+}

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (23 preceding siblings ...)
  2024-10-24  7:35 ` [PR PATCH] [Updated] " MIvanchev
@ 2025-01-23  1:57 ` github-actions
  2025-01-23  8:03 ` MIvanchev
  25 siblings, 0 replies; 30+ messages in thread
From: github-actions @ 2025-01-23  1:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2608681084

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: New package: mindustry-7.0_b146
  2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
                   ` (24 preceding siblings ...)
  2025-01-23  1:57 ` github-actions
@ 2025-01-23  8:03 ` MIvanchev
  25 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2025-01-23  8:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/52749#issuecomment-2609102014

Comment:
Bump.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [WIP] New package: mindustry-7.0_b146
  2024-04-03 15:09 [PR PATCH] [WIP] " MIvanchev
  2024-07-15  1:53 ` github-actions
  2024-07-15  7:46 ` MIvanchev
@ 2024-07-15 10:38 ` ahesford
  2 siblings, 0 replies; 30+ messages in thread
From: ahesford @ 2024-07-15 10:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/49693#issuecomment-2228195804

Comment:
Please defer new-package PRs until you have locally built and tested them.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [WIP] New package: mindustry-7.0_b146
  2024-04-03 15:09 [PR PATCH] [WIP] " MIvanchev
  2024-07-15  1:53 ` github-actions
@ 2024-07-15  7:46 ` MIvanchev
  2024-07-15 10:38 ` ahesford
  2 siblings, 0 replies; 30+ messages in thread
From: MIvanchev @ 2024-07-15  7:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/49693#issuecomment-2227884903

Comment:
Bump.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [WIP] New package: mindustry-7.0_b146
  2024-04-03 15:09 [PR PATCH] [WIP] " MIvanchev
@ 2024-07-15  1:53 ` github-actions
  2024-07-15  7:46 ` MIvanchev
  2024-07-15 10:38 ` ahesford
  2 siblings, 0 replies; 30+ messages in thread
From: github-actions @ 2024-07-15  1:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/49693#issuecomment-2227586089

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2025-01-23  8:03 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-23 11:46 [PR PATCH] New package: mindustry-7.0_b146 MIvanchev
2024-10-23 12:17 ` MIvanchev
2024-10-23 12:17 ` MIvanchev
2024-10-23 12:18 ` [PR PATCH] [Updated] " MIvanchev
2024-10-23 12:19 ` MIvanchev
2024-10-23 12:23 ` MIvanchev
2024-10-23 12:28 ` MIvanchev
2024-10-23 14:56 ` Johnnynator
2024-10-23 15:03 ` Johnnynator
2024-10-23 15:03 ` Johnnynator
2024-10-23 15:14 ` MIvanchev
2024-10-23 15:15 ` MIvanchev
2024-10-23 15:21 ` Johnnynator
2024-10-23 15:46 ` Johnnynator
2024-10-23 15:55 ` MIvanchev
2024-10-23 17:38 ` [PR PATCH] [Updated] " MIvanchev
2024-10-23 17:42 ` MIvanchev
2024-10-24  6:51 ` [PR PATCH] [Updated] [WIP] " MIvanchev
2024-10-24  7:12 ` MIvanchev
2024-10-24  7:13 ` MIvanchev
2024-10-24  7:16 ` MIvanchev
2024-10-24  7:19 ` MIvanchev
2024-10-24  7:29 ` MIvanchev
2024-10-24  7:31 ` MIvanchev
2024-10-24  7:35 ` [PR PATCH] [Updated] " MIvanchev
2025-01-23  1:57 ` github-actions
2025-01-23  8:03 ` MIvanchev
  -- strict thread matches above, loose matches on Subject: below --
2024-04-03 15:09 [PR PATCH] [WIP] " MIvanchev
2024-07-15  1:53 ` github-actions
2024-07-15  7:46 ` MIvanchev
2024-07-15 10:38 ` ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).