summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Charles Campbell <rossbridger.cc@gmail.com>2020-10-01 10:23:25 +0800
committerJoonas Niilola <juippis@gentoo.org>2020-10-17 16:19:16 +0300
commite8b5c73c9fe47dddd4359160b9ee6e7d4df46e9f (patch)
treecd5a955e0e7b21e555422071102eab91da172f6f /sci-electronics/fritzing
parentnet-libs/libwebsockets: drop 4.1.2 (diff)
downloadgentoo-e8b5c73c9fe47dddd4359160b9ee6e7d4df46e9f.tar.gz
gentoo-e8b5c73c9fe47dddd4359160b9ee6e7d4df46e9f.tar.bz2
gentoo-e8b5c73c9fe47dddd4359160b9ee6e7d4df46e9f.zip
sci-electronics/fritzing: version bump to 0.9.4
Bug: https://bugs.gentoo.org/633990 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/17724 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'sci-electronics/fritzing')
-rw-r--r--sci-electronics/fritzing/Manifest2
-rw-r--r--sci-electronics/fritzing/files/fritzing-0.9.4-fix-libgit2-version.patch19
-rw-r--r--sci-electronics/fritzing/files/fritzing-0.9.4-move-parts-db-path.patch55
-rw-r--r--sci-electronics/fritzing/fritzing-0.9.4.ebuild81
4 files changed, 157 insertions, 0 deletions
diff --git a/sci-electronics/fritzing/Manifest b/sci-electronics/fritzing/Manifest
index e69dae5eed9b..ad703c4dbb4d 100644
--- a/sci-electronics/fritzing/Manifest
+++ b/sci-electronics/fritzing/Manifest
@@ -1,2 +1,4 @@
DIST fritzing-0.9.2b.tar.gz 10913985 BLAKE2B d25eed63ec1448b158684c27edaac1aebce93b03c5f36b0a8939c2b0f256203ffcb727f809c4ca3facd186f39218055ad404886633a3cf11ba3126e5177cb286 SHA512 a8b6d99c4e08f86d7a7cc6574053e8b1af565a3919cb2fc406e67972052b3fa3ded002be43e4fd0345189e4e1f3cecb3851cd14711efd83ccbcbef4cbd135c58
+DIST fritzing-0.9.4.tar.gz 11430102 BLAKE2B 20232b3c33308edcab188c61597f87d8a21d9b786eeab4e398c1add6e263562d1b0df95634850d5271decfa380d7b2b0c18c7f19f8b8544f330687e4cffa3700 SHA512 b148d8b93d2e452c975ca3acfd2ad5de4259f99da69c5890ebeea30730674526d480ee3830f61f6057e83b7720f07fce80ef3a74d4b718be691a92d656b755e0
DIST fritzing-parts-0.9.2b.tar.gz 15924206 BLAKE2B 48ad614c363c77b309275f3f808f9e4e8f38587cbb00439716102e88267ad33536e06b531304abb26f40932d9fc72a4f2563596b0084c5b1ff082adb72132b07 SHA512 055c866532c4a09a7de3315fffc485c6be5a576e998fca7b001faae513da86d451ca8ed39583108ec54472ab0e1d8b953c192efcf93e5c19139f0fa83484a549
+DIST fritzing-parts-0.9.4.tar.gz 17662003 BLAKE2B a67f4f1297793131d25e6b9c853e987fc0c5ecebd5f57b3675b7f9c4539f867ad18fc6e854c7a2bef1669e05dbc13dcc93df9b9befb8991ca64b2bc3e2a71b84 SHA512 f6f6c396eaf0b61dd56ece22f6bb8fce4369503729fd8f5550643e74a60aaad75abce9e391d63d52f12e4f3420296791fdf9832f7c8507dad2cf623e1bd8340f
diff --git a/sci-electronics/fritzing/files/fritzing-0.9.4-fix-libgit2-version.patch b/sci-electronics/fritzing/files/fritzing-0.9.4-fix-libgit2-version.patch
new file mode 100644
index 000000000000..47aea61ae76e
--- /dev/null
+++ b/sci-electronics/fritzing/files/fritzing-0.9.4-fix-libgit2-version.patch
@@ -0,0 +1,19 @@
+commit 472951243d70eeb40a53b1f7e16e6eab0588d079
+Author: PsikoBlock <rramsch@googlemail.com>
+Date: Fri Apr 10 21:41:52 2020 +0200
+
+ Fix libgit2 version check to allow building with versions >= 1.0
+
+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);
diff --git a/sci-electronics/fritzing/files/fritzing-0.9.4-move-parts-db-path.patch b/sci-electronics/fritzing/files/fritzing-0.9.4-move-parts-db-path.patch
new file mode 100644
index 000000000000..97835d489cc6
--- /dev/null
+++ b/sci-electronics/fritzing/files/fritzing-0.9.4-move-parts-db-path.patch
@@ -0,0 +1,55 @@
+diff --git a/src/fapplication.cpp b/src/fapplication.cpp
+index 72159c99..d6ba26ef 100644
+--- a/src/fapplication.cpp
++++ b/src/fapplication.cpp
+@@ -785,7 +785,7 @@ bool FApplication::loadReferenceModel(const QString & databaseName, bool fullLoa
+ bool FApplication::loadReferenceModel(const QString & databaseName, bool fullLoad, ReferenceModel * referenceModel)
+ {
+ QDir dir = FolderUtils::getAppPartsSubFolder("");
+- QString dbPath = dir.absoluteFilePath("parts.db");
++ QString dbPath = FolderUtils::getTopLevelDocumentsPath() + "/parts.db";
+
+ QFileInfo info(dbPath);
+ bool dbExists = (info.size() > 0) && !fullLoad;
+@@ -798,7 +798,11 @@ bool FApplication::loadReferenceModel(const QString & databaseName, bool fullLo
+ sha = PartsChecker::getSha(dir.absolutePath());
+ if (sha.isEmpty()) {
+ DebugDialog::debug(QString("1.6 SHA empty"));
++#ifdef PARTS_COMMIT
++ sha = PARTS_COMMIT;
++#else
+ return false;
++#endif
+ }
+ referenceModel->setSha(sha);
+ }
+@@ -2042,7 +2046,7 @@ void FApplication::regeneratePartsDatabase() {
+ void FApplication::regeneratePartsDatabaseAux(QDialog * progressDialog) {
+ ReferenceModel * referenceModel = new CurrentReferenceModel();
+ QDir dir = FolderUtils::getAppPartsSubFolder("");
+- QString dbPath = dir.absoluteFilePath("parts.db");
++ QString dbPath = FolderUtils::getTopLevelDocumentsPath() + "/parts.db";
+ RegenerateDatabaseThread *thread = new RegenerateDatabaseThread(dbPath, progressDialog, referenceModel);
+ connect(thread, SIGNAL(finished()), this, SLOT(regenerateDatabaseFinished()));
+ FMessageBox::BlockMessages = true;
+diff --git a/src/version/updatedialog.cpp b/src/version/updatedialog.cpp
+index 58c71da8..c481cdec 100644
+--- a/src/version/updatedialog.cpp
++++ b/src/version/updatedialog.cpp
+@@ -28,6 +28,7 @@ along with Fritzing. If not, see <http://www.gnu.org/licenses/>.
+ #include "versionchecker.h"
+ #include "modfiledialog.h"
+ #include "../debugdialog.h"
++#include "../utils/folderutils.h"
+
+ #include <QVBoxLayout>
+ #include <QPushButton>
+@@ -183,7 +184,7 @@ void UpdateDialog::releasesAvailableSlot() {
+ permissionTest.close();
+ permissionTest.remove();
+ if (count > 0) {
+- QFile db(repoDir.absoluteFilePath("parts.db"));
++ QFile db(FolderUtils::getTopLevelDocumentsPath() + "/parts.db");
+ if (db.open(QFile::Append)) {
+ canWrite = true;
+ db.close();
diff --git a/sci-electronics/fritzing/fritzing-0.9.4.ebuild b/sci-electronics/fritzing/fritzing-0.9.4.ebuild
new file mode 100644
index 000000000000..4d76ed86245b
--- /dev/null
+++ b/sci-electronics/fritzing/fritzing-0.9.4.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit qmake-utils xdg
+
+MY_PV="CD-498"
+PARTS_P="${PN}-parts-${PV}"
+PARTS_COMMIT="e79a69765026f3fda8aab1b3e7a4952c28047a62"
+
+DESCRIPTION="Electronic Design Automation"
+HOMEPAGE="https://fritzing.org/
+ https://github.com/fritzing/fritzing-app/"
+SRC_URI="https://github.com/fritzing/fritzing-app/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/fritzing/fritzing-parts/archive/${PARTS_COMMIT}.tar.gz -> ${PARTS_P}.tar.gz"
+
+LICENSE="CC-BY-SA-3.0 GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtserialport:5
+ dev-qt/qtsql:5[sqlite]
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ dev-libs/quazip
+ dev-libs/libgit2:=
+"
+DEPEND="
+ ${RDEPEND}
+ dev-libs/boost
+"
+
+S="${WORKDIR}/${PN}-app-${MY_PV}"
+
+DOCS=( "README.md" )
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-libgit2-version.patch"
+ "${FILESDIR}/${P}-move-parts-db-path.patch"
+)
+
+src_prepare() {
+ # fix build with newer quazip - bug #597988
+ sed -i -e "s/#include <quazip/&5/" src/utils/folderutils.cpp || die
+ sed -i -e "s|/usr/include/quazip|&5|" -e "s/-lquazip/&5/" phoenix.pro || die
+
+ # Get a rid of the bundled libs
+ # Bug 412555 and
+ # https://code.google.com/p/fritzing/issues/detail?id=1898
+ rm -r src/lib/quazip/ pri/quazip.pri || die
+
+ # Fritzing doesn't need zlib
+ sed -i -e 's:LIBS += -lz::' -e 's:-lminizip::' phoenix.pro || die
+
+ # Use system libgit
+ sed -i -e 's:LIBGIT_STATIC.*:LIBGIT_STATIC = false:' phoenix.pro || die
+
+ # Add correct git version
+ sed -i -e "s:GIT_VERSION = \$\$system.*$:GIT_VERSION = ${MY_PV}:" pri/gitversion.pri || die
+
+ default
+}
+
+src_configure() {
+ eqmake5 'DEFINES=QUAZIP_INSTALLED PARTS_COMMIT=\\\"'"${PARTS_COMMIT}"'\\\"' phoenix.pro
+}
+
+src_install() {
+ PARTS_DIR="${WORKDIR}/fritzing-parts-${PARTS_COMMIT}"
+ INSTALL_ROOT="${D}" default
+ insinto /usr/share/fritzing/fritzing-parts
+ doins -r ${PARTS_DIR}/*
+}