fritzing: update to 0.9.6

This commit is contained in:
jeremyd2019
2021-04-09 16:54:21 -07:00
committed by Jeremy Drake
parent 6db29e0410
commit faaf18ff60
5 changed files with 48 additions and 92 deletions

View File

@@ -1,20 +1,19 @@
From 593e5084ab2fedcbc43917d1049a807c19be8841 Mon Sep 17 00:00:00 2001
From 9aef3ce9fcc050874d870d131a6bbcd635055c10 Mon Sep 17 00:00:00 2001
From: Jeremy Drake <github@jdrake.com>
Date: Wed, 2 Dec 2020 11:54:32 -0800
Subject: [PATCH 2/3] Fix casts from pointer to long to size_t instead.
Subject: [PATCH 1/3] Fix casts from pointer to long to size_t instead.
These caused an error on mingw64.
---
src/autoroute/cmrouter/cmrouter.cpp | 14 +++++++-------
src/connectors/connectoritem.cpp | 4 ++--
src/items/clipablewire.cpp | 2 +-
src/items/itembase.cpp | 2 +-
src/items/paletteitem.cpp | 2 +-
src/sketch/sketchwidget.cpp | 4 ++--
6 files changed, 14 insertions(+), 14 deletions(-)
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/autoroute/cmrouter/cmrouter.cpp b/src/autoroute/cmrouter/cmrouter.cpp
index ce5bee4a..6f261191 100644
index 68414a2b..5c828147 100644
--- a/src/autoroute/cmrouter/cmrouter.cpp
+++ b/src/autoroute/cmrouter/cmrouter.cpp
@@ -154,21 +154,21 @@ static inline void infoTile(const QString & message, Tile * tile)
@@ -47,10 +46,10 @@ index ce5bee4a..6f261191 100644
}
diff --git a/src/connectors/connectoritem.cpp b/src/connectors/connectoritem.cpp
index 4aaa5a83..5a60ca8c 100644
index 7494ebb5..51c98bf1 100644
--- a/src/connectors/connectoritem.cpp
+++ b/src/connectors/connectoritem.cpp
@@ -480,7 +480,7 @@ ConnectorItem * ConnectorItem::removeConnection(ItemBase * itemBase) {
@@ -475,7 +475,7 @@ ConnectorItem * ConnectorItem::removeConnection(ItemBase * itemBase) {
}
restoreColor(visited);
DebugDialog::debug(QString("remove from:%1 to:%2 count%3")
@@ -59,7 +58,7 @@ index 4aaa5a83..5a60ca8c 100644
.arg(itemBase->modelPartShared()->title())
.arg(m_connectedTo.count()) );
return removed;
@@ -1931,7 +1931,7 @@ void ConnectorItem::debugInfo(const QString & msg)
@@ -1944,7 +1944,7 @@ void ConnectorItem::debugInfo(const QString & msg)
.arg(this->attachedToViewLayerPlacement())
.arg(this->attachedTo()->wireFlags())
.arg(this->m_hybrid)
@@ -68,24 +67,11 @@ index 4aaa5a83..5a60ca8c 100644
.arg(this->m_radius)
.arg(this->m_strokeWidth)
.arg(p.x())
diff --git a/src/items/clipablewire.cpp b/src/items/clipablewire.cpp
index 2e4c080d..b7eb266a 100644
--- a/src/items/clipablewire.cpp
+++ b/src/items/clipablewire.cpp
@@ -297,7 +297,7 @@ bool ClipableWire::filterMousePressConnectorEvent(ConnectorItem * connectorItem,
void ClipableWire::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- if ((long) event == (long) m_justFilteredEvent) {
+ if ((size_t) event == (size_t) m_justFilteredEvent) {
event->ignore();
return;
}
diff --git a/src/items/itembase.cpp b/src/items/itembase.cpp
index b2b2519d..01434a86 100644
index 9d13ca9b..761b0aaa 100644
--- a/src/items/itembase.cpp
+++ b/src/items/itembase.cpp
@@ -1958,7 +1958,7 @@ void ItemBase::debugInfo2(const QString & msg) const
@@ -1859,7 +1859,7 @@ void ItemBase::debugInfo2(const QString & msg) const
.arg(this->viewLayerID())
.arg(this->viewLayerPlacement())
.arg(this->wireFlags())
@@ -95,7 +81,7 @@ index b2b2519d..01434a86 100644
.arg(this->zValue())
.arg(this->pos().x())
diff --git a/src/items/paletteitem.cpp b/src/items/paletteitem.cpp
index 6a3e2718..63f29107 100644
index 3c6c14ba..382326df 100644
--- a/src/items/paletteitem.cpp
+++ b/src/items/paletteitem.cpp
@@ -200,7 +200,7 @@ void PaletteItem::makeOneKin(qint64 & id, ViewLayer::ViewLayerID viewLayerID, Vi
@@ -108,19 +94,19 @@ index 6a3e2718..63f29107 100644
addLayerKin(lkpi);
id++;
diff --git a/src/sketch/sketchwidget.cpp b/src/sketch/sketchwidget.cpp
index 126f8e4a..dc0cb91e 100644
index a7486b8f..34137460 100644
--- a/src/sketch/sketchwidget.cpp
+++ b/src/sketch/sketchwidget.cpp
@@ -993,7 +993,7 @@ ItemBase * SketchWidget::findItem(long id) {
@@ -958,7 +958,7 @@ ItemBase * SketchWidget::findItem(long id) {
void SketchWidget::deleteItem(long id, bool deleteModelPart, bool doEmit, bool later) {
ItemBase * pitem = findItem(id);
- DebugDialog::debug(QString("delete item (1) %1 %2 %3 %4").arg(id).arg(doEmit).arg(m_viewID).arg((long) pitem, 0, 16) );
+ DebugDialog::debug(QString("delete item (1) %1 %2 %3 %4").arg(id).arg(doEmit).arg(m_viewID).arg((size_t) pitem, 0, 16) );
if (pitem != NULL) {
if (pitem) {
deleteItem(pitem, deleteModelPart, doEmit, later);
}
@@ -1007,7 +1007,7 @@ void SketchWidget::deleteItem(long id, bool deleteModelPart, bool doEmit, bool l
@@ -972,7 +972,7 @@ void SketchWidget::deleteItem(long id, bool deleteModelPart, bool doEmit, bool l
void SketchWidget::deleteItem(ItemBase * itemBase, bool deleteModelPart, bool doEmit, bool later)
{
long id = itemBase->id();
@@ -130,5 +116,5 @@ index 126f8e4a..dc0cb91e 100644
// this is a hack to try to workaround a Qt 4.7 crash in QGraphicsSceneFindItemBspTreeVisitor::visit
// when using a custom boundingRect, after deleting an item, it still appears on the visit list.
--
2.29.2.windows.2
2.31.1.windows.1

View File

@@ -1,26 +0,0 @@
From 0a2df4e229c9e0564f452943688c81c9a93f9a4a Mon Sep 17 00:00:00 2001
From: PsikoBlock <rramsch@googlemail.com>
Date: Fri, 10 Apr 2020 21:41:52 +0200
Subject: [PATCH 1/3] Fix libgit2 version check to allow building with versions
>= 1.0
---
src/version/partschecker.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/version/partschecker.cpp b/src/version/partschecker.cpp
index 65daf76e..36300fe0 100644
--- a/src/version/partschecker.cpp
+++ b/src/version/partschecker.cpp
@@ -115,7 +115,7 @@ bool PartsChecker::newPartsAvailable(const QString &repoPath, const QString & sh
/**
* Connect to the remote.
*/
-#if LIBGIT2_VER_MINOR > 24
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR > 24)
error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL);
#elif LIBGIT2_VER_MINOR == 24
error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL);
--
2.29.2.windows.2

View File

@@ -1,7 +1,7 @@
From 0277828e3b0ad06470209695baa97f4bf3fa12dd Mon Sep 17 00:00:00 2001
From 46060b16fd66e6db9306ea06514fa2f23b38c1f6 Mon Sep 17 00:00:00 2001
From: Jeremy Drake <github@jdrake.com>
Date: Wed, 2 Dec 2020 12:00:03 -0800
Subject: [PATCH 3/4] qmake fixes for mingw.
Subject: [PATCH 2/3] qmake fixes for mingw.
Mostly want it to act like unix.
---
@@ -10,19 +10,19 @@ Mostly want it to act like unix.
2 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/phoenix.pro b/phoenix.pro
index 8a7e828b..919fef23 100644
index 2abf6d0d..a4482772 100644
--- a/phoenix.pro
+++ b/phoenix.pro
@@ -24,7 +24,7 @@ lessThan(QT_MAJOR_VERSION, 5) {
CONFIG += debug_and_release
@@ -33,7 +33,7 @@ CONFIG += c++14
# TODO: Verify flags for clang and msvc builds
QMAKE_CXXFLAGS += -O3 -fno-omit-frame-pointer
-unix:!macx {
+if(unix:!macx)|mingw {
CONFIG += link_pkgconfig
}
@@ -38,6 +38,9 @@ win32 {
@@ -47,6 +47,9 @@ win32 {
DEFINES += _CRT_SECURE_NO_DEPRECATE
DEFINES += _WINDOWS
RELEASE_SCRIPT = $$(RELEASE_SCRIPT) # environment variable set from release script
@@ -32,7 +32,7 @@ index 8a7e828b..919fef23 100644
message("target arch: $${QMAKE_TARGET.arch}")
contains(QMAKE_TARGET.arch, x86_64) {
@@ -49,17 +52,19 @@ win32 {
@@ -58,17 +61,19 @@ win32 {
DEBDIR = ../debug32
}
@@ -63,7 +63,7 @@ index 8a7e828b..919fef23 100644
}
macx {
RELDIR = ../release64
@@ -87,13 +92,15 @@ macx {
@@ -96,13 +101,15 @@ macx {
LIBS += /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
LIBS += -liconv
}
@@ -86,7 +86,7 @@ index 8a7e828b..919fef23 100644
!contains(DEFINES, QUAZIP_INSTALLED) {
LIBS += -lz
diff --git a/pri/libgit2detect.pri b/pri/libgit2detect.pri
index f5de3c77..7ed878ae 100644
index f8dae314..5fbd177f 100644
--- a/pri/libgit2detect.pri
+++ b/pri/libgit2detect.pri
@@ -34,7 +34,7 @@ if ($$LIBGIT_STATIC) {
@@ -108,5 +108,5 @@ index f5de3c77..7ed878ae 100644
LIBGIT2LIB = $$_PRO_FILE_PWD_/../libgit2/build
exists($$LIBGIT2LIB/libgit2.a) {
--
2.29.2.windows.2
2.31.1.windows.1

View File

@@ -1,7 +1,7 @@
From 2903c1051f296ccde4a44f0beda076f8dbd4defa Mon Sep 17 00:00:00 2001
From ebbc071ed53eef7778f5b526763c128ab7b34c6b 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.
Subject: [PATCH 3/3] Look in ../share/fritzing from bin dir on mingw.
This seems to be the best option for finding the prefix.
---
@@ -9,7 +9,7 @@ This seems to be the best option for finding the prefix.
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/utils/folderutils.cpp b/src/utils/folderutils.cpp
index c6761b3b..3ab40857 100644
index 5914924b..a6d97603 100644
--- a/src/utils/folderutils.cpp
+++ b/src/utils/folderutils.cpp
@@ -212,7 +212,7 @@ const QString FolderUtils::libraryPath()
@@ -21,16 +21,16 @@ index c6761b3b..3ab40857 100644
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()) {
@@ -224,6 +224,9 @@ const QString FolderUtils::applicationDirPath() {
#ifdef Q_OS_MAC
candidates.append(dir.absolutePath() + "/Resources");
+#endif
+#ifdef __MINGW32__
+ candidates.append(QDir::cleanPath(dir.absolutePath() + "/share/fritzing"));
+#endif
#endif
candidates.append(dir.absolutePath());
if (dir.cdUp()) {
candidates.append(dir.absolutePath());
--
2.29.2.windows.2
2.31.1.windows.1

View File

@@ -3,8 +3,8 @@
_realname=fritzing
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.9.4
pkgrel=2
pkgver=0.9.6
pkgrel=1
pkgdesc="Electronic Design Automation software with a low entry barrier, suited for the needs of makers and hobbyists (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
@@ -19,29 +19,25 @@ depends=("${MINGW_PACKAGE_PREFIX}-qt5"
# Fritzing updates its parts repo online from the master branch, so the latest
# master commit should be fine here
_partscommit='e79a69765026f3fda8aab1b3e7a4952c28047a62'
source=("${_realname}"::"git+https://github.com/fritzing/fritzing-app.git#tag=CD-498"
source=("${_realname}"::"git+https://github.com/fritzing/fritzing-app.git#tag=${pkgver}"
"${_realname}-parts"::"git+https://github.com/fritzing/fritzing-parts.git#commit=$_partscommit"
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
0001-Fix-casts-from-pointer-to-long-to-size_t-instead.patch
0002-qmake-fixes-for-mingw.patch
0003-Look-in-.-share-fritzing-from-bin-dir-on-mingw.patch
system-libgit2.patch)
sha256sums=('SKIP'
'SKIP'
'98042c42cc10847f76285e0a84d258d9818571e695dd87dd6d52ef3ac387c7a7'
'7a91295b4ab91edb4efba9d08a9f2a0cb2761da1b04e39eaca165eee53ac9e6b'
'f095db7f3f1bc03304f98697cf7b1eba30e67e8a70734362d1d8cba689da6384'
'fa2c0eecea654ca2f5412acec31bd0c871ddcf271886886c78e2dd07ee70bf80'
'f06de3f2cd642df40a6239db3736a0fe4f1ed6bc87a4d99a1fc893ae7e71fd67'
'ccbb2b66b8cb7a7fd1a19117062b430753c265587d7dbf0d2289627fcedc3fa2'
'c7e9352acc9e12fcb056dda9d32c9d594aa096b83f61725007ebb2a2cc91b50b'
'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
git apply "${srcdir}"/0001-Fix-casts-from-pointer-to-long-to-size_t-instead.patch
git apply "${srcdir}"/0002-qmake-fixes-for-mingw.patch
git apply "${srcdir}"/0003-Look-in-.-share-fritzing-from-bin-dir-on-mingw.patch
patch -Np1 -i "${srcdir}"/system-libgit2.patch
}