├── .gitignore ├── PKGBUILD ├── README.md └── customization.cfg /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.gitignore 3 | *~ 4 | *.orig 5 | *.log 6 | *.run 7 | *.tgz 8 | *.xz 9 | *.pkg 10 | *.bak 11 | *.tar.gz 12 | *.tar.zst 13 | *.old 14 | *.db 15 | *.files 16 | src/ 17 | pkg/ 18 | gamescope/ 19 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Tk-Glitch 2 | 3 | _pkgbase=gamescope 4 | pkgname=${_pkgbase}-git 5 | pkgver=3.14.22.r5.gb44ea3c 6 | pkgrel=1 7 | _where="$PWD" # track basedir as different Arch based distros are moving srcdir around 8 | if [ -e "$_where"/customization.cfg ]; then 9 | source "$_where"/customization.cfg 10 | fi 11 | 12 | # Load external configuration file if present. Available variable values will overwrite customization.cfg ones. 13 | if [ -e "$_EXT_CONFIG_PATH" ]; then 14 | source "$_EXT_CONFIG_PATH" && msg2 "External configuration file $_EXT_CONFIG_PATH will be used to override customization.cfg values.\n" 15 | fi 16 | 17 | arch=('x86_64') 18 | url="https://github.com/Plagman/gamescope" 19 | license=('BSD 2-Clause "Simplified" License') 20 | pkgdesc="gamescope: the micro-compositor formerly known as steamcompmgr" 21 | 22 | exit_cleanup() { 23 | # Prevent subproject conflicts 24 | rm -rf "$_where/src/$_pkgbase" 25 | #rm -rf "$_where"/*.mygamescopepatch 26 | 27 | remove_deps 28 | 29 | msg2 "Cleanup done" 30 | } 31 | 32 | makedepends=('git' 'meson' 'ninja' 'cmake' 'pixman' 'pkgconf' 'vulkan-headers' 'wayland-protocols>=1.17') 33 | depends=(wayland opengl-driver xorg-server-xwayland pipewire libdrm libinput libavif libxkbcommon libxcomposite libxmu libcap libxcb libpng glslang libxrender libxtst libxres vulkan-icd-loader sdl2 xcb-util-renderutil xcb-util-wm seatd benchmark) 34 | conflicts=('gamescope') 35 | 36 | # custom commit to pass to git 37 | if [ -n "$_gamescope_commit" ]; then 38 | _gamescope_commit="#commit=${_gamescope_commit}" 39 | fi 40 | 41 | source=("git+https://github.com/ValveSoftware/gamescope.git${_gamescope_commit}" 42 | 'git+https://github.com/Joshua-Ashton/wlroots.git' 43 | 'git+https://gitlab.freedesktop.org/emersion/libliftoff.git' 44 | 'git+https://github.com/Joshua-Ashton/vkroots.git' 45 | 'git+https://gitlab.freedesktop.org/emersion/libdisplay-info.git' 46 | 'git+https://github.com/ValveSoftware/openvr.git' 47 | 'git+https://github.com/Joshua-Ashton/reshade.git' 48 | 'git+https://github.com/KhronosGroup/SPIRV-Headers.git') 49 | md5sums=('SKIP' 50 | 'SKIP' 51 | 'SKIP' 52 | 'SKIP' 53 | 'SKIP' 54 | 'SKIP' 55 | 'SKIP' 56 | 'SKIP') 57 | options=('staticlibs') 58 | 59 | user_patcher() { 60 | # To patch the user because all your base are belong to us 61 | local _patches=("$_where"/*."${_userpatch_ext}revert") 62 | if [ ${#_patches[@]} -ge 2 ] || [ -e "${_patches}" ]; then 63 | if [ "$_user_patches_no_confirm" != "true" ]; then 64 | msg2 "Found ${#_patches[@]} 'to revert' userpatches for ${_userpatch_target}:" 65 | printf '%s\n' "${_patches[@]}" 66 | read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; 67 | fi 68 | if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then 69 | for _f in "${_patches[@]}"; do 70 | if [ -e "${_f}" ]; then 71 | msg2 "######################################################" 72 | msg2 "" 73 | msg2 "Reverting your own ${_userpatch_target} patch ${_f}" 74 | msg2 "" 75 | msg2 "######################################################" 76 | patch -Np1 -R < "${_f}" 77 | echo "Reverted your own patch ${_f}" >> "$_where"/last_build_config.log 78 | fi 79 | done 80 | fi 81 | fi 82 | 83 | _patches=("$_where"/*."${_userpatch_ext}patch") 84 | if [ ${#_patches[@]} -ge 2 ] || [ -e "${_patches}" ]; then 85 | if [ "$_user_patches_no_confirm" != "true" ]; then 86 | msg2 "Found ${#_patches[@]} userpatches for ${_userpatch_target}:" 87 | printf '%s\n' "${_patches[@]}" 88 | read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; 89 | fi 90 | if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then 91 | for _f in "${_patches[@]}"; do 92 | if [ -e "${_f}" ]; then 93 | msg2 "######################################################" 94 | msg2 "" 95 | msg2 "Applying your own ${_userpatch_target} patch ${_f}" 96 | msg2 "" 97 | msg2 "######################################################" 98 | patch -Np1 < "${_f}" 99 | echo "Applied your own patch ${_f}" >> "$_where"/last_build_config.log 100 | fi 101 | done 102 | fi 103 | fi 104 | } 105 | 106 | pkgver() { 107 | cd ${_pkgbase} 108 | git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' 109 | } 110 | 111 | prepare() { 112 | if [ -d _build ]; then 113 | rm -rf _build 114 | fi 115 | mkdir _build 116 | 117 | ( cd "${_pkgbase}" && git reset --hard HEAD && git clean -xdf ) 118 | } 119 | 120 | build() { 121 | cd ${_pkgbase} 122 | 123 | meson subprojects download 124 | 125 | git submodule init subprojects/wlroots 126 | git config submodule.subprojects/wlroots.url ../wlroots 127 | 128 | git submodule init subprojects/libliftoff 129 | git config submodule.subprojects/libliftoff.url ../libliftoff 130 | 131 | git submodule init subprojects/vkroots 132 | git config submodule.subprojects/vkroots.url ../vkroots 133 | 134 | git submodule init subprojects/libdisplay-info 135 | git config submodule.subprojects/libdisplay-info.url ../libdisplay-info 136 | 137 | git submodule init subprojects/openvr 138 | git config submodule.subprojects/openvr.url ../openvr 139 | 140 | git submodule init src/reshade 141 | git config submodule.src/reshade.url ../reshade 142 | 143 | git submodule init thirdparty/SPIRV-Headers 144 | git config submodule.thirdparty/SPIRV-Headers.url ../SPIRV-Headers 145 | 146 | git -c protocol.file.allow=always submodule update 147 | 148 | # Workaround for erroneous libdisplay-info submodule in the tree 149 | #( cd subprojects/libdisplay-info && git checkout 92b031749c0fe84ef5cdf895067b84a829920e25 ) 150 | 151 | # Use Arch's libdisplay-info 152 | #rm -rf subprojects/libdisplay-info 153 | 154 | # user patches 155 | #cd ${_pkgbase} 156 | _userpatch_target="gamescope" 157 | _userpatch_ext="mygamescope" 158 | user_patcher 159 | #cd "$_where" 160 | 161 | meson \ 162 | --buildtype release \ 163 | -Dforce_fallback_for=stb,wlroots,vkroots,libliftoff,glm,libdisplay-info \ 164 | -Dpipewire=enabled \ 165 | ${srcdir}/_build 166 | } 167 | 168 | package() { 169 | DESTDIR="$pkgdir" ninja -C _build install 170 | 171 | provides=(gamescope=$pkgver) 172 | 173 | msg2 "Removing unnecessary wlroots files" 174 | rm -rfv "${pkgdir}"/usr/include 175 | rm -rfv "${pkgdir}"/usr/lib/libwlroots* 176 | rm -fv "${pkgdir}"/usr/lib/pkgconfig/wlroots.pc 177 | 178 | rm -rfv "${pkgdir}"/usr/lib/libliftoff* 179 | rm -fv "${pkgdir}"/usr/lib/pkgconfig/libliftoff.pc 180 | 181 | install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkgbase}/LICENSE" 182 | } 183 | 184 | trap exit_cleanup EXIT 185 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## gamescope-git 2 | 3 | Plagman's micro-compositor formerly known as steamcompmgr 4 | 5 | https://github.com/Plagman/gamescope 6 | 7 | 8 | ``` 9 | git clone https://github.com/Frogging-Family/gamescope-git.git 10 | cd gamescope-git 11 | makepkg -si 12 | ``` 13 | -------------------------------------------------------------------------------- /customization.cfg: -------------------------------------------------------------------------------- 1 | # gamescope-git config file 2 | 3 | 4 | #### OPTIONS #### 5 | 6 | # External config file to use - If the given file exists in path, it will override default config (customization.cfg) - Default is ~/.config/frogminer/gamescope-git.cfg 7 | _EXT_CONFIG_PATH=~/.config/frogminer/gamescope-git.cfg 8 | 9 | # custom gamescope commit to pass to git 10 | _gamescope_commit="" 11 | 12 | --------------------------------------------------------------------------------