Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New package: fritzing #7376

Merged
merged 7 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fritzing: look in ../share/fritzing for data files
Seems to be the best option since the prefix isn't known at build time.
  • Loading branch information
jeremyd2019 committed Dec 3, 2020
commit 6b4b8f620599c54b4a222f87b8a1a5df8cb22c03
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 2903c1051f296ccde4a44f0beda076f8dbd4defa Mon Sep 17 00:00:00 2001
From: Jeremy Drake <github@jdrake.com>
Date: Wed, 2 Dec 2020 23:07:02 -0800
Subject: [PATCH 4/4] Look in ../share/fritzing from bin dir on mingw.

This seems to be the best option for finding the prefix.
---
src/utils/folderutils.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/utils/folderutils.cpp b/src/utils/folderutils.cpp
index c6761b3b..3ab40857 100644
--- a/src/utils/folderutils.cpp
+++ b/src/utils/folderutils.cpp
@@ -212,7 +212,7 @@ const QString FolderUtils::libraryPath()

const QString FolderUtils::applicationDirPath() {
if (m_appPath.isEmpty()) {
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) && !defined(__MINGW32__)
m_appPath = QCoreApplication::applicationDirPath();
#else
// look in standard Fritzing location (applicationDirPath and parent folders) then in standard linux locations
@@ -220,6 +220,9 @@ const QString FolderUtils::applicationDirPath() {
candidates.append(QCoreApplication::applicationDirPath());
QDir dir(QCoreApplication::applicationDirPath());
if (dir.cdUp()) {
+#ifdef __MINGW32__
+ candidates.append(QDir::cleanPath(dir.absolutePath() + "/share/fritzing"));
+#endif
candidates.append(dir.absolutePath());
if (dir.cdUp()) {
candidates.append(dir.absolutePath());
--
2.29.2.windows.2

4 changes: 4 additions & 0 deletions mingw-w64-fritzing/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ source=("${_realname}"::"git+https://github.com/fritzing/fritzing-app.git#tag=CD
0001-Fix-libgit2-version-check-to-allow-building-with-ver.patch
0002-Fix-casts-from-pointer-to-long-to-size_t-instead.patch
0003-qmake-fixes-for-mingw.patch
0004-Look-in-.-share-fritzing-from-bin-dir-on-mingw.patch
system-libgit2.patch)
sha256sums=('SKIP'
'SKIP'
'98042c42cc10847f76285e0a84d258d9818571e695dd87dd6d52ef3ac387c7a7'
'7a91295b4ab91edb4efba9d08a9f2a0cb2761da1b04e39eaca165eee53ac9e6b'
'2d9f550ce25ddb78ac683d23c55b5b794a06eef3b022f686bad89651793c8423'
'fa2c0eecea654ca2f5412acec31bd0c871ddcf271886886c78e2dd07ee70bf80'
'b9fcdd41207a5d8fd67d44c5d4b3348e25464815431a91b61111b1fd91f1495f')

prepare() {
cd "${srcdir}"/${_realname}

# upstream commit 472951243d70eeb40a53b1f7e16e6eab0588d079
git apply "${srcdir}"/0001-Fix-libgit2-version-check-to-allow-building-with-ver.patch
git apply "${srcdir}"/0002-Fix-casts-from-pointer-to-long-to-size_t-instead.patch
git apply "${srcdir}"/0003-qmake-fixes-for-mingw.patch
git apply "${srcdir}"/0004-Look-in-.-share-fritzing-from-bin-dir-on-mingw.patch
patch -Np1 -i "${srcdir}"/system-libgit2.patch
}

Expand Down