summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--0001-Shape.h-add-missing-header.patch27
-rw-r--r--0001-resolve-system-wide-Tutorials-path.patch52
-rw-r--r--PKGBUILD16
4 files changed, 67 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d6eaa3710cb7..bbbc642822fc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = veroroute
pkgdesc = Qt based Veroboard/Perfboard/PCB layout and routing application
- pkgver = 1.51
+ pkgver = 1.52
pkgrel = 1
url = https://sourceforge.net/projects/veroroute
arch = i686
@@ -8,14 +8,14 @@ pkgbase = veroroute
license = GPLv3+
depends = qt5-base
depends = geda-gaf
- source = https://downloads.sourceforge.net/project/veroroute/VeroRoute_V151_Src.zip
+ source = https://downloads.sourceforge.net/project/veroroute/VeroRoute_V152_Src.zip
source = veroroute.desktop.in
source = veroroute-clib.scm
- source = 0001-Shape.h-add-missing-header.patch
- sha256sums = 773611e8fe7bb7ea2fc4bbd83a83b1308fdb19ef1ac8cbe752c286cb91bf6edb
+ source = 0001-resolve-system-wide-Tutorials-path.patch
+ sha256sums = 8c3b7b24a89ca43721418df004751fe9e30506ce30fc232fae8407147dda61d0
sha256sums = bbf5a01f8f05909f52cee36ac0184c039aca313d078bcced47dcdcfcaa26bba9
sha256sums = a722805c46998bff7709357babc2e609fbc4b0021b33c59aefa4f7fa0567aeeb
- sha256sums = b9b397b0fd2ac437d84b410e380b8337a1c2432aef61721b93be3062bdb70cda
+ sha256sums = 04ac245c78425c08966558456630215d29db5b5e83a172f5a2e6c5a31dd4a9a1
pkgname = veroroute
diff --git a/0001-Shape.h-add-missing-header.patch b/0001-Shape.h-add-missing-header.patch
deleted file mode 100644
index f6746b72312b..000000000000
--- a/0001-Shape.h-add-missing-header.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 2c28cbf6c02bb38c7235ee1a613a37427daaff7d Mon Sep 17 00:00:00 2001
-From: Roman Sommer <roman.sommer@fau.de>
-Date: Sun, 7 Jul 2019 22:16:39 +0200
-Subject: [VeroRoute] [PATCH] Shape.h: add missing header
-
-This patch adds a missing header to fix compilation with qmake under
-Arch Linux.
-
----
- Src/Shape.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Src/Shape.h b/Src/Shape.h
-index 94852ee..df76b79 100644
---- a/Src/Shape.h
-+++ b/Src/Shape.h
-@@ -19,6 +19,7 @@
-
- #pragma once
-
-+#include <cmath>
- #include "Persist.h"
- #include "Rect.h"
-
---
-2.22.0
-
diff --git a/0001-resolve-system-wide-Tutorials-path.patch b/0001-resolve-system-wide-Tutorials-path.patch
new file mode 100644
index 000000000000..386d3eb7753a
--- /dev/null
+++ b/0001-resolve-system-wide-Tutorials-path.patch
@@ -0,0 +1,52 @@
+From 8b7fbeb2e8d94b14d45171dedd7ae41c613bab21 Mon Sep 17 00:00:00 2001
+From: Roman Sommer <roman.sommer@fau.de>
+Date: Thu, 11 Jul 2019 21:47:42 +0200
+Subject: [PATCH] resolve system wide Tutorials path
+
+---
+ Src/main.cpp | 22 +++++++++++++++++++---
+ 1 file changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/Src/main.cpp b/Src/main.cpp
+index 01140cd..90494be 100644
+--- a/Src/main.cpp
++++ b/Src/main.cpp
+@@ -41,8 +41,8 @@ int main(int argc, char *argv[])
+ QApplication a(argc, argv);
+
+ QString appDataPathStr = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
+- // appDataStr on Linux = "~/.local/share/VeroRoute"
+- // appDataStr on Windows = "C:/Users/<USER>/AppData/Roaming/VeroRoute"
++ // appDataPathStr on Linux = "~/.local/share/VeroRoute"
++ // appDataPathStr on Windows = "C:/Users/<USER>/AppData/Roaming/VeroRoute"
+
+ // If the folder doesn't exist then create it
+ QDir dir(appDataPathStr);
+@@ -56,7 +56,23 @@ int main(int argc, char *argv[])
+ QDir templatesDir(appDataPathStr + QString("/Templates"));
+ if ( !templatesDir.exists() ) templatesDir.mkpath(".");
+
+- QString tutorialsPathStr = pathStr; // Tutorials should be in same folder as the exe
++ // Fallback tutorials path
++ QString tutorialsPathStr = appDataPathStr;
++ // Search for system wide tutorials path
++ for (auto dataLocationPath : QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)) {
++ QDir tutorialsDir(dataLocationPath + QString("/Tutorials"));
++ // Take first hit
++ if ( tutorialsDir.exists() ) {
++ tutorialsPathStr = dataLocationPath;
++ break;
++ }
++ }
++ // Create fallback tutorials path if needed
++ // Actually don't do this, because we skip system folders when there is a user local path
++ // QDir tutorialsDir(tutorialsPathStr + QString("/Tutorials"));
++ // if ( !tutorialsDir.exists() ) tutorialsDir.mkpath(".");
++
++ // Spawn main window
+ MainWindow w( appDataPathStr, tutorialsPathStr );
+
+ for (int i = 1; i < argc; i++)
+--
+2.22.0
+
diff --git a/PKGBUILD b/PKGBUILD
index f1e6b33d68f4..8f5b0e03b1e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Roman Sommer <roman.sommer@fau.de>
pkgname=veroroute
_pkgvermajor=1
-_pkgverminor=51
+_pkgverminor=52
pkgver=$_pkgvermajor.$_pkgverminor
pkgrel=1
epoch=
@@ -25,18 +25,19 @@ _sourcearchive="VeroRoute_V${_pkgvermajor}${_pkgverminor}_Src.zip"
source=("https://downloads.sourceforge.net/project/$pkgname/$_sourcearchive"
"veroroute.desktop.in"
"veroroute-clib.scm"
- "0001-Shape.h-add-missing-header.patch")
-sha256sums=('773611e8fe7bb7ea2fc4bbd83a83b1308fdb19ef1ac8cbe752c286cb91bf6edb'
+ "0001-resolve-system-wide-Tutorials-path.patch")
+sha256sums=('8c3b7b24a89ca43721418df004751fe9e30506ce30fc232fae8407147dda61d0'
'bbf5a01f8f05909f52cee36ac0184c039aca313d078bcced47dcdcfcaa26bba9'
'a722805c46998bff7709357babc2e609fbc4b0021b33c59aefa4f7fa0567aeeb'
- 'b9b397b0fd2ac437d84b410e380b8337a1c2432aef61721b93be3062bdb70cda')
+ '04ac245c78425c08966558456630215d29db5b5e83a172f5a2e6c5a31dd4a9a1')
+
noextract=()
prepare() {
echo "$srcdir"
cd "$srcdir/VeroRoute"
- patch -p1 -i "../0001-Shape.h-add-missing-header.patch"
+ patch -p1 -i "../0001-resolve-system-wide-Tutorials-path.patch"
sed -e "s|__VERSION__|${pkgver}|g" -e "s|__COMMENT__|${pkgdesc}|g" $srcdir/veroroute.desktop.in > $srcdir/veroroute.desktop
}
@@ -61,9 +62,12 @@ package() {
mkdir -p "$pkgdir/usr/share/applications/"
install -Dm644 "$srcdir/veroroute.desktop" "$pkgdir/usr/share/applications/"
mkdir -p "$pkgdir/usr/share/veroroute/Tutorials"
+ install -Dm644 VeroRoute.png "$pkgdir/usr/share/veroroute/" # install veroroute.png twice
find Tutorials -maxdepth 1 -type f -exec install -Dm644 "{}" "$pkgdir/usr/share/veroroute/Tutorials" \;
mkdir -p "$pkgdir/usr/share/veroroute/Templates"
- find Templates -maxdepth 1 -type f -exec install -Dm644 "{}" "$pkgdir/usr/share/veroroute/Templates" \;
+ if [ -d Templates ] ; then
+ find Templates -maxdepth 1 -type f -exec install -Dm644 "{}" "$pkgdir/usr/share/veroroute/Templates" \;
+ fi
mkdir -p "$pkgdir/usr/share/gEDA/sym"
(cd Libraries/gEDA; find . -mindepth 2 -type f -exec install -Dm644 "{}" "$pkgdir/usr/share/gEDA/sym/{}" \;)
mkdir -p "$pkgdir/usr/share/gEDA/gafrc.d/"