org.polymc.PolyMC.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. app-id: org.polymc.PolyMC
  2. runtime: org.kde.Platform
  3. runtime-version: '5.15'
  4. sdk: org.kde.Sdk
  5. sdk-extensions:
  6. - org.freedesktop.Sdk.Extension.openjdk17
  7. - org.freedesktop.Sdk.Extension.openjdk8
  8. command: polymc
  9. finish-args:
  10. - --share=ipc
  11. - --socket=x11
  12. - --socket=wayland
  13. - --device=dri
  14. - --share=network
  15. - --socket=pulseaudio
  16. # for Discord RPC mods
  17. - --filesystem=xdg-run/app/com.discordapp.Discord:create
  18. modules:
  19. # Compile PolyMC
  20. - name: compile
  21. buildsystem: simple
  22. build-commands:
  23. - mkdir build
  24. - mkdir -p /app/bin
  25. - cd build && JAVA_HOME=/run/build/compile/jdk PATH=$JAVA_HOME:$PATH JAVA_COMPILER=../jdk/bin/javac
  26. cmake -DLauncher_LAYOUT=lin-system -DCMAKE_INSTALL_PREFIX=/app/ .. && make
  27. -j$(nproc) install
  28. sources:
  29. - type: git
  30. url: https://github.com/PolyMC/PolyMC.git
  31. tag: 1.0.6
  32. x-checker-data:
  33. type: git
  34. commit: 204e3dca22e5d4f14ded50e1dcd3f0af9ff3d88e
  35. - type: archive
  36. url: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_linux_hotspot_17_35.tar.gz
  37. sha256: 6f1335d9a7855159f982dac557420397be9aa85f3f7bc84e111d25871c02c0c7
  38. archive-type: tar-gzip
  39. dest: jdk
  40. - type: patch
  41. path: patches/0001-Fix-DesktopServices.cpp-to-not-crash-when-using-flat.patch
  42. cleanup: [/share/applications/polymc.desktop]
  43. # old MC versions depend on Xrandr
  44. - name: openjdk17
  45. buildsystem: simple
  46. build-commands:
  47. - mkdir -p /app/jdk/
  48. - /usr/lib/sdk/openjdk17/install.sh
  49. - cp -r /app/jre /app/jdk/17
  50. cleanup: [/jre]
  51. - name: openjdk8
  52. buildsystem: simple
  53. build-commands:
  54. - /usr/lib/sdk/openjdk8/install.sh
  55. - cp -r /app/jre /app/jdk/8
  56. cleanup: [/jre]
  57. - name: xrandr
  58. buildsystem: autotools
  59. sources:
  60. - type: archive
  61. url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.1.tar.xz
  62. sha256: 7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762
  63. cleanup: [/share/man, /bin/xkeystone]
  64. # Prime-Run is a wrapper program for running minecraft with NVIDIA Graphics on a hybrid-gpu device
  65. - name: prime-run
  66. buildsystem: simple
  67. build-commands:
  68. - install -Dm755 prime-run /app/bin/prime-run
  69. sources:
  70. - type: file
  71. path: prime-run
  72. - name: libdecor
  73. buildsystem: meson
  74. sources:
  75. - type: archive
  76. url: https://gitlab.gnome.org/jadahl/libdecor/-/archive/0.1.0/libdecor-0.1.0.tar.gz
  77. sha256: 1d5758cb49dcb9ceaa979ad14ceb6cdf39282af5ce12ebe6073dd193d6b2fb5e
  78. # Patched GLFW for Wayland and Minecraft
  79. - name: glfw
  80. buildsystem: cmake
  81. config_opts: [-DCMAKE_INSTALL_LIBDIR=lib, -DBUILD_SHARED_LIBS=ON, -DGLFW_USE_WAYLAND=ON]
  82. sources:
  83. - type: git
  84. url: https://github.com/glfw/glfw.git
  85. commit: 87d5646f5d2bad0562744501633bf8105f59c193
  86. - type: patch
  87. paths:
  88. - glfw-patches/0001-Wayland-Set-O_NONBLOCK-on-repeat-timerfd.patch
  89. - glfw-patches/0002-Wayland-Continue-poll-if-timerfd-can-t-be-read.patch
  90. - glfw-patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
  91. - glfw-patches/0004-wayland-fix-broken-opengl-screenshots-on-mutter.patch
  92. - glfw-patches/0005-Add-warning-about-being-an-unofficial-patch.patch
  93. - glfw-patches/0006-Don-t-crash-getting-scancode-name.patch
  94. - glfw-patches/0007-libdecor-proper-decorations-with-title-and-window-bu.patch
  95. - glfw-patches/0008-Add-libdecoration-marker-to-stderr-warning.patch
  96. - glfw-patches/0009-Wayland-Fix-cursor-offset-when-shape-changes.patch
  97. cleanup: [/share/doc]