diff options
author | Jan Cholasta | 2020-02-06 08:56:28 +0100 |
---|---|---|
committer | Jan Cholasta | 2020-02-06 08:56:28 +0100 |
commit | 6f31ce8ec83ce32f22ec251c8078e865ec7f1c81 (patch) | |
tree | f0c8db6338454cc71206de34f3a2c007d4aece1b | |
download | aur-6f31ce8ec83ce32f22ec251c8078e865ec7f1c81.tar.gz |
raze-git-0.4.0+9+g67a2952ea-1
-rw-r--r-- | .SRCINFO | 39 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | 0001-Fix-file-paths.patch | 128 | ||||
-rw-r--r-- | PKGBUILD | 71 | ||||
-rw-r--r-- | raze.desktop | 9 |
5 files changed, 251 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..49cbdcfcc838 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,39 @@ +pkgbase = raze-git + pkgdesc = Build engine port backed by GZDoom tech (git version) + pkgver = 0.4.0+9+g67a2952ea + pkgrel = 1 + url = https://github.com/coelckers/Raze + arch = i686 + arch = x86_64 + license = custom:BUILD + license = custom:dumb + license = GPL2 + makedepends = cmake + makedepends = desktop-file-utils + makedepends = git + depends = alsa-lib + depends = fluidsynth>=2 + depends = gtk3 + depends = hicolor-icon-theme + depends = libgl + depends = libjpeg + depends = libsndfile + depends = libvpx + depends = mpg123 + depends = openal + depends = sdl2 + optdepends = gxmessage: crash dialog (GNOME) + optdepends = kdialog: crash dialog (KDE) + optdepends = soundfont-fluid: FluidR3 soundfont for FluidSynth + optdepends = xorg-xmessage: crash dialog (other) + provides = raze + conflicts = raze + source = Raze-master::git+https://github.com/coelckers/Raze + source = 0001-Fix-file-paths.patch + source = raze.desktop + sha256sums = SKIP + sha256sums = cebea1d7bb84a60c4a3b0961ee5f827f5acf18a015ebc42c2bada31cab273221 + sha256sums = ffc02d8f6f0d4464a74e025d41063f2441d9423d4ed605a0290eb266ae9531c8 + +pkgname = raze-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..489478149b22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/Raze-* +/pkg/ +/src/ +/*.pkg.tar.* diff --git a/0001-Fix-file-paths.patch b/0001-Fix-file-paths.patch new file mode 100644 index 000000000000..3fd84c7ba08e --- /dev/null +++ b/0001-Fix-file-paths.patch @@ -0,0 +1,128 @@ +From 3f0271a0bdfc81c92c255aca95d4fa4241f3cbe4 Mon Sep 17 00:00:00 2001 +From: Jan Cholasta <jan@cholasta.net> +Date: Thu, 6 Feb 2020 07:59:18 +0100 +Subject: [PATCH] Fix file paths + +--- + .../mididevices/music_fluidsynth_mididevice.cpp | 2 +- + source/common/gameconfigfile.cpp | 14 +------------- + source/common/gamecontrol.cpp | 2 +- + source/common/music/i_soundfont.cpp | 4 +--- + source/platform/posix/sdl/i_main.cpp | 14 +------------- + 5 files changed, 5 insertions(+), 31 deletions(-) + +diff --git a/libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp b/libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp +index 16ffa3ab0..fa16c3057 100644 +--- a/libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp ++++ b/libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp +@@ -646,7 +646,7 @@ void Fluid_SetupConfig(const char* patches, std::vector<std::string> &patch_path + // The following will only be used if no soundfont at all is provided, i.e. even the standard one coming with GZDoom is missing. + #ifdef __unix__ + // This is the standard location on Ubuntu. +- Fluid_SetupConfig("/usr/share/sounds/sf2/FluidR3_GS.sf2:/usr/share/sounds/sf2/FluidR3_GM.sf2", patch_paths, false); ++ Fluid_SetupConfig("/usr/share/soundfonts/FluidR3_GS.sf2:/usr/share/soundfonts/FluidR3_GM.sf2", patch_paths, false); + #endif + #ifdef _WIN32 + // On Windows, look for the 4 megabyte patch set installed by Creative's drivers as a default. +diff --git a/source/common/gameconfigfile.cpp b/source/common/gameconfigfile.cpp +index dd4c0889e..949e6be16 100644 +--- a/source/common/gameconfigfile.cpp ++++ b/source/common/gameconfigfile.cpp +@@ -100,15 +100,10 @@ FGameConfigFile::FGameConfigFile () + // Debian likes them in /usr/share/games/doom + // I assume other distributions don't do anything radically different + SetValueForKey ("Path", "/usr/share/games/jfduke3d", true); +- SetValueForKey ("Path", "/usr/local/share/games/jfduke3d", true); + SetValueForKey ("Path", "/usr/share/games/eduke32", true); +- SetValueForKey ("Path", "/usr/local/share/games/eduke32", true); + SetValueForKey ("Path", "/usr/share/games/nblood", true); +- SetValueForKey ("Path", "/usr/local/share/games/nblood", true); + SetValueForKey("Path", "/usr/share/games/jfsw", true); +- SetValueForKey("Path", "/usr/local/share/games/jfsw", true); + SetValueForKey("Path", "/usr/share/games/voidsw", true); +- SetValueForKey("Path", "/usr/local/share/games/voidsw", true); + + #endif + SetValueForKey ("Path", "$STEAM", true); // also covers GOG. +@@ -128,13 +123,9 @@ FGameConfigFile::FGameConfigFile () + SetValueForKey ("Path", "$GAMEDIR", true); + #else + SetValueForKey ("Path", "$HOME/" GAME_DIR, true); +- SetValueForKey ("Path", SHARE_DIR, true); + SetValueForKey ("Path", "/usr/share/games/jfduke3d", true); +- SetValueForKey ("Path", "/usr/local/share/games/jfduke3d", true); + SetValueForKey ("Path", "/usr/share/games/eduke32", true); +- SetValueForKey ("Path", "/usr/local/share/games/eduke32", true); + SetValueForKey ("Path", "/usr/share/games/nblood", true); +- SetValueForKey ("Path", "/usr/local/share/games/nblood", true); + #endif + } + +@@ -151,10 +142,7 @@ FGameConfigFile::FGameConfigFile () + SetValueForKey("Path", "$PROGDIR/soundfonts", true); + #else + SetValueForKey("Path", "$HOME/" GAME_DIR "/soundfonts", true); +- SetValueForKey("Path", "/usr/local/share/" GAME_DIR "/soundfonts", true); +- SetValueForKey("Path", "/usr/local/share/games/" GAME_DIR "/soundfonts", true); +- SetValueForKey("Path", "/usr/share/" GAME_DIR "/soundfonts", true); +- SetValueForKey("Path", "/usr/share/games/" GAME_DIR "/soundfonts", true); ++ SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/soundfonts", true); + #endif + } + +diff --git a/source/common/gamecontrol.cpp b/source/common/gamecontrol.cpp +index fd38c2fdf..c424ba57e 100644 +--- a/source/common/gamecontrol.cpp ++++ b/source/common/gamecontrol.cpp +@@ -584,7 +584,7 @@ int RunGame() + FString logfile = Args->TakeValue("+logfile"); + + // As long as this engine is still in prerelease mode let's always write a log file. +- if (logfile.IsEmpty()) logfile.Format("%s" GAMENAMELOWERCASE ".log", M_GetDocumentsPath().GetChars()); ++ if (logfile.IsEmpty()) logfile.Format("%s/" GAMENAMELOWERCASE ".log", M_GetDocumentsPath().GetChars()); + + if (logfile.IsNotEmpty()) + { +diff --git a/source/common/music/i_soundfont.cpp b/source/common/music/i_soundfont.cpp +index 5d911a200..ce05a5463 100644 +--- a/source/common/music/i_soundfont.cpp ++++ b/source/common/music/i_soundfont.cpp +@@ -243,9 +243,7 @@ FPatchSetReader::FPatchSetReader(const char *filename) + #ifndef _WIN32 + mCaseSensitivePaths = true; + const char *paths[] = { +- "/usr/local/lib/timidity", +- "/etc/timidity", +- "/etc" ++ "/etc/timidity++" + }; + #else + const char *paths[] = { +diff --git a/source/platform/posix/sdl/i_main.cpp b/source/platform/posix/sdl/i_main.cpp +index b0e2ce978..0c2a2a96e 100644 +--- a/source/platform/posix/sdl/i_main.cpp ++++ b/source/platform/posix/sdl/i_main.cpp +@@ -121,19 +121,7 @@ int main (int argc, char **argv) + Args = new FArgs(argc, argv); + + // Should we even be doing anything with progdir on Unix systems? +- char program[PATH_MAX]; +- if (realpath (argv[0], program) == NULL) +- strcpy (program, argv[0]); +- char *slash = strrchr (program, '/'); +- if (slash != NULL) +- { +- *(slash + 1) = '\0'; +- progdir = program; +- } +- else +- { +- progdir = "./"; +- } ++ progdir = "/usr/lib/raze/"; + + I_StartupJoysticks(); + +-- +2.25.0 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..03643dca4480 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Jan Cholasta <grubber at grubber cz> + +pkgname=raze-git +pkgver=0.4.0+9+g67a2952ea +pkgrel=1 +pkgdesc='Build engine port backed by GZDoom tech (git version)' +arch=('i686' 'x86_64') +url='https://github.com/coelckers/Raze' +license=('custom:BUILD' 'custom:dumb' 'GPL2') +depends=('alsa-lib' + 'fluidsynth>=2' + 'gtk3' + 'hicolor-icon-theme' + 'libgl' + 'libjpeg' + 'libsndfile' + 'libvpx' + 'mpg123' + 'openal' + 'sdl2') +makedepends=('cmake' + 'desktop-file-utils' + 'git') +optdepends=('gxmessage: crash dialog (GNOME)' + 'kdialog: crash dialog (KDE)' + 'soundfont-fluid: FluidR3 soundfont for FluidSynth' + 'xorg-xmessage: crash dialog (other)') +provides=('raze') +conflicts=('raze') +source=('Raze-master::git+https://github.com/coelckers/Raze' + '0001-Fix-file-paths.patch' + 'raze.desktop') +sha256sums=('SKIP' + 'cebea1d7bb84a60c4a3b0961ee5f827f5acf18a015ebc42c2bada31cab273221' + 'ffc02d8f6f0d4464a74e025d41063f2441d9423d4ed605a0290eb266ae9531c8') + +pkgver() { + cd Raze-master + + git describe --long --tags | tr - + +} + +prepare() { + cd Raze-master + + patch -p1 -i"$srcdir"/0001-Fix-file-paths.patch +} + +build() { + cd Raze-master + + local _cflags="-ffile-prefix-map=\"$PWD\"=." + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS="${CFLAGS} ${_cflags}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${_cflags}" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_PK3_PATH=lib/raze \ + . + make +} + +package() { + cd Raze-master + + make install DESTDIR="$pkgdir" + + desktop-file-install --dir="$pkgdir"/usr/share/applications "$srcdir"/raze.desktop + install -D -m644 source/platform/posix/game.xpm "$pkgdir"/usr/share/icons/hicolor/256x256/apps/raze.xpm + install -D -m644 package/common/buildlic.txt "$pkgdir"/usr/share/licenses/$pkgname/buildlic.txt + install -D -m644 libraries/dumb/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/dumb.txt +} diff --git a/raze.desktop b/raze.desktop new file mode 100644 index 000000000000..ea0b67e14c57 --- /dev/null +++ b/raze.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Raze +GenericName=Build engine port backed by GZDoom tech +Icon=raze +Exec=raze %F +Terminal=false +Categories=Game;ActionGame; |