summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Bruguera2020-04-13 15:28:23 +0200
committerJoan Bruguera2020-04-13 15:34:07 +0200
commitc2d40d72bf5d0ae6114b77efb0ac2ab02d3f1233 (patch)
treeafb5566f06a9495c5379e9794f431f645c57c90e
downloadaur-c2d40d72bf5d0ae6114b77efb0ac2ab02d3f1233.tar.gz
PKGBUILD for doom2masterlevelspatch v1.2.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD37
-rw-r--r--qt5_support.patch86
3 files changed, 139 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e2bf05f7ece9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = doom2masterlevelspatch
+ pkgdesc = Unofficial Master Levels For Doom 2 Patcher For ZDoom (Join all Master Levels WADs)
+ pkgver = 1.2
+ pkgrel = 1
+ url = http://maniacsvault.net/projects
+ arch = x86_64
+ license = custom
+ makedepends = cmake
+ depends = qt5-base
+ source = http://maniacsvault.net/files/masterlevelspatch.7z
+ source = qt5_support.patch
+ sha256sums = bd2e1a432084af72db2c860959392132db45ddc43abec61c101249c613b672c2
+ sha256sums = b1ef893f549bd742333ae906eb71d630260b7b7e5317043d34cf6276641db83a
+
+pkgname = doom2masterlevelspatch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..936bcad900ca
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Joan Bruguera Micó <joanbrugueram@gmail.com>
+pkgname=doom2masterlevelspatch
+pkgver=1.2
+pkgrel=1
+pkgdesc="Unofficial Master Levels For Doom 2 Patcher For ZDoom (Join all Master Levels WADs)"
+url=http://maniacsvault.net/projects
+arch=('x86_64')
+license=('custom')
+depends=('qt5-base')
+makedepends=('cmake')
+source=("http://maniacsvault.net/files/masterlevelspatch.7z"
+ qt5_support.patch)
+
+sha256sums=(bd2e1a432084af72db2c860959392132db45ddc43abec61c101249c613b672c2
+ b1ef893f549bd742333ae906eb71d630260b7b7e5317043d34cf6276641db83a)
+
+prepare() {
+ # Extract relevant license excerpt from readme.txt
+ tail -6 "readme.txt" > "license.txt"
+
+ # Qt4 -> Qt5 port to make build without AUR dependencies possible
+ tar xf "patch_src.tar"
+ cd "patch_src"
+ patch -Np1 -i "${srcdir}/qt5_support.patch"
+}
+
+build() {
+ mkdir -p build
+ cd build
+ cmake "../patch_src" -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ install -Dm755 "build/patch" "$pkgdir/usr/bin/doom2masterlevelspatch"
+ install -Dm755 "license.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/qt5_support.patch b/qt5_support.patch
new file mode 100644
index 000000000000..ff9e1555e843
--- /dev/null
+++ b/qt5_support.patch
@@ -0,0 +1,86 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7f4730e..ea0f03c 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,12 +1,10 @@
+ cmake_minimum_required(VERSION 2.4)
+ project(MasterPatch)
+
+-find_package(Qt4 REQUIRED)
+-include(${QT_USE_FILE})
+-include_directories(${QT_INCLUDES})
++find_package(Qt5 COMPONENTS Widgets REQUIRED)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+-qt4_wrap_ui(UI_FILES
++qt5_wrap_ui(UI_FILES
+ main.ui
+ )
+
+@@ -21,4 +19,4 @@ add_executable(patch WIN32
+ patcher.cpp
+ )
+
+-target_link_libraries(patch ${QT_LIBRARIES})
++target_link_libraries(patch Qt5::Widgets)
+diff --git a/main.cpp b/main.cpp
+index 438037d..d76801b 100755
+--- a/main.cpp
++++ b/main.cpp
+@@ -72,7 +72,7 @@ void MainWindow::done(QAbstractButton *button)
+ if(out.isEmpty())
+ return;
+
+- QString ret = Patcher::patch(path.toAscii().constData(), out.toAscii().constData(), (Patcher::MapProgression)mapBox->currentIndex(), (Patcher::MusicSelections)musicBox->currentIndex(), doomWad, doom2Wad);
++ QString ret = Patcher::patch(path.toUtf8().constData(), out.toUtf8().constData(), (Patcher::MapProgression)mapBox->currentIndex(), (Patcher::MusicSelections)musicBox->currentIndex(), doomWad, doom2Wad);
+ if(ret.isEmpty())
+ {
+ QMessageBox::information(this, tr("Done"), tr("The patching process has been completed!"));
+diff --git a/patcher.cpp b/patcher.cpp
+index 2c218b7..9ffa23f 100755
+--- a/patcher.cpp
++++ b/patcher.cpp
+@@ -622,7 +622,7 @@ QString Patcher::patch(const char* in, const char* out, Patcher::MapProgression
+ for(unsigned int i = 0;i < NUM_FILES;i++)
+ {
+ QString path = QString(in) + "/" + files[i];
+- WadFile *file = WadFile::FromFile(path.toAscii());
++ WadFile *file = WadFile::FromFile(path.toUtf8());
+ if(file == NULL)
+ return QString("Could not read \"") + files[i] + "\"";
+
+@@ -660,8 +660,8 @@ QString Patcher::patch(const char* in, const char* out, Patcher::MapProgression
+ oldName = "MAP01";
+ break;
+ }
+- file->RenameLump(oldName, mapName.toAscii());
+- output << file->GetLump(mapName.toAscii());
++ file->RenameLump(oldName, mapName.toUtf8());
++ output << file->GetLump(mapName.toUtf8());
+ output << file->GetLump("THINGS");
+ output << file->GetLump("LINEDEFS");
+ output << file->GetLump("SIDEDEFS");
+@@ -725,12 +725,12 @@ QString Patcher::patch(const char* in, const char* out, Patcher::MapProgression
+ else
+ mapinfoData = mapinfoData.arg(11).arg(11).arg(11).arg(clusterinfo).arg("SKY1");
+
+- output.AddLump("MAPINFO", mapinfoData.length(), (const unsigned char*)mapinfoData.toAscii().constData());
++ output.AddLump("MAPINFO", mapinfoData.length(), (const unsigned char*)mapinfoData.toUtf8().constData());
+ output.AddLump("LANGUAGE", sizeof(language), language);
+
+ if(musicSelections == Patcher::MS_XASERPICKS || musicSelections == Patcher::MS_BLZUT3PICKS)
+ {
+- WadFile *extraFile = WadFile::FromFile(doom2Wad.toAscii());
++ WadFile *extraFile = WadFile::FromFile(doom2Wad.toUtf8());
+ extraFile->RenameLump("D_DM2INT", "D_INTDM2");
+ output << extraFile->GetLump("D_INTDM2");
+ if(musicSelections == Patcher::MS_XASERPICKS)
+@@ -743,7 +743,7 @@ QString Patcher::patch(const char* in, const char* out, Patcher::MapProgression
+
+ if(musicSelections == Patcher::MS_XASERPICKS)
+ {
+- WadFile *extraFile = WadFile::FromFile(doomWad.toAscii());
++ WadFile *extraFile = WadFile::FromFile(doomWad.toUtf8());
+ output << extraFile->GetLump("D_E1M5");
+ output << extraFile->GetLump("D_E1M7");
+ output << extraFile->GetLump("D_E1M8");