Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP2
fritzing
fritzing-cleanup-build-files.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fritzing-cleanup-build-files.patch of Package fritzing
diff --git a/config.tests/boost/boost.pro b/config.tests/boost/boost.pro new file mode 100644 index 0000000..bba41b9 --- /dev/null +++ b/config.tests/boost/boost.pro @@ -0,0 +1 @@ +SOURCES = main.cpp diff --git a/config.tests/boost/main.cpp b/config.tests/boost/main.cpp new file mode 100644 index 0000000..a245b7c --- /dev/null +++ b/config.tests/boost/main.cpp @@ -0,0 +1,8 @@ +#include <boost/version.hpp> +#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 == 54 +#error "Boost 1.54 found" +#endif + +int main() +{ +} diff --git a/phoenix.pro b/phoenix.pro index 301ce0c..26e25b5 100644 --- a/phoenix.pro +++ b/phoenix.pro @@ -1,7 +1,7 @@ # /******************************************************************* # # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing +# Copyright (c) 2007-16 Fritzing # # Fritzing is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,116 +30,125 @@ # # QTPLUGIN += qjpeg qsqlite - CONFIG += debug_and_release +unix:!macx { + CONFIG += link_pkgconfig +} + +load(configure) + win32 { # release build using msvc 2010 needs to use Multi-threaded (/MT) for the code generation/runtime library option # release build using msvc 2010 needs to add msvcrt.lib;%(IgnoreSpecificDefaultLibraries) to the linker/no default libraries option - CONFIG -= embed_manifest_exe - INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib - DEFINES += _CRT_SECURE_NO_DEPRECATE - DEFINES += _WINDOWS - RELEASE_SCRIPT = $$(RELEASE_SCRIPT) # environment variable set from release script - - message("target arch: $${QMAKE_TARGET.arch}") - contains(QMAKE_TARGET.arch, x86_64) { - RELDIR = ../release64 - DEBDIR = ../debug64 - DEFINES += WIN64 - } - !contains(QMAKE_TARGET.arch, x86_64) { - RELDIR = ../release32 - DEBDIR = ../debug32 - } + CONFIG -= embed_manifest_exe + INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib + DEFINES += _CRT_SECURE_NO_DEPRECATE + DEFINES += _WINDOWS + RELEASE_SCRIPT = $$(RELEASE_SCRIPT) # environment variable set from release script - Release:DESTDIR = $${RELDIR} - Release:OBJECTS_DIR = $${RELDIR} - Release:MOC_DIR = $${RELDIR} - Release:RCC_DIR = $${RELDIR} - Release:UI_DIR = $${RELDIR} - - Debug:DESTDIR = $${DEBDIR} - Debug:OBJECTS_DIR = $${DEBDIR} - Debug:MOC_DIR = $${DEBDIR} - Debug:RCC_DIR = $${DEBDIR} - Debug:UI_DIR = $${DEBDIR} -} -macx { + message("target arch: $${QMAKE_TARGET.arch}") + contains(QMAKE_TARGET.arch, x86_64) { RELDIR = ../release64 DEBDIR = ../debug64 - Release:DESTDIR = $${RELDIR} - Release:OBJECTS_DIR = $${RELDIR} - Release:MOC_DIR = $${RELDIR} - Release:RCC_DIR = $${RELDIR} - Release:UI_DIR = $${RELDIR} - - Debug:DESTDIR = $${DEBDIR} - Debug:OBJECTS_DIR = $${DEBDIR} - Debug:MOC_DIR = $${DEBDIR} - Debug:RCC_DIR = $${DEBDIR} - Debug:UI_DIR = $${DEBDIR} - - QMAKE_MAC_SDK = macosx10.11 # uncomment/adapt for your version of OSX - CONFIG += x86_64 # x86 ppc - QMAKE_INFO_PLIST = FritzingInfo.plist - #DEFINES += QT_NO_DEBUG # uncomment this for xcode - LIBS += -lz - LIBS += /usr/lib/libz.dylib - LIBS += /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation - LIBS += /System/Library/Frameworks/Carbon.framework/Carbon - LIBS += /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit + DEFINES += WIN64 + } else { + RELDIR = ../release32 + DEBDIR = ../debug32 + } + + Release:DESTDIR = $${RELDIR} + Release:OBJECTS_DIR = $${RELDIR} + Release:MOC_DIR = $${RELDIR} + Release:RCC_DIR = $${RELDIR} + Release:UI_DIR = $${RELDIR} + + Debug:DESTDIR = $${DEBDIR} + Debug:OBJECTS_DIR = $${DEBDIR} + Debug:MOC_DIR = $${DEBDIR} + Debug:RCC_DIR = $${DEBDIR} + Debug:UI_DIR = $${DEBDIR} +} +macx { + RELDIR = ../release64 + DEBDIR = ../debug64 + Release:DESTDIR = $${RELDIR} + Release:OBJECTS_DIR = $${RELDIR} + Release:MOC_DIR = $${RELDIR} + Release:RCC_DIR = $${RELDIR} + Release:UI_DIR = $${RELDIR} + + Debug:DESTDIR = $${DEBDIR} + Debug:OBJECTS_DIR = $${DEBDIR} + Debug:MOC_DIR = $${DEBDIR} + Debug:RCC_DIR = $${DEBDIR} + Debug:UI_DIR = $${DEBDIR} + + QMAKE_MAC_SDK = macosx10.11 # uncomment/adapt for your version of OSX + CONFIG += x86_64 # x86 ppc + QMAKE_INFO_PLIST = FritzingInfo.plist + #DEFINES += QT_NO_DEBUG # uncomment this for xcode + LIBS += -lz + LIBS += /usr/lib/libz.dylib + LIBS += /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation + LIBS += /System/Library/Frameworks/Carbon.framework/Carbon + LIBS += /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit } unix { !macx { # unix is defined on mac HARDWARE_PLATFORM = $$system(uname -m) - contains( HARDWARE_PLATFORM, x86_64 ) { + contains(HARDWARE_PLATFORM, x86_64) { DEFINES += LINUX_64 } else { DEFINES += LINUX_32 } - LIBS += -lz + !contains(DEFINES, QUAZIP_INSTALLED) { + LIBS += -lz + } } - isEmpty(PREFIX) { - PREFIX = /usr - } - BINDIR = $$PREFIX/bin - DATADIR = $$PREFIX/share - PKGDATADIR = $$DATADIR/fritzing + isEmpty(PREFIX) { + PREFIX = /usr + } + BINDIR = $$PREFIX/bin + DATADIR = $$PREFIX/share + PKGDATADIR = $$DATADIR/fritzing + + DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" - DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" + target.path = $$BINDIR - target.path =$$BINDIR + desktop.path = $$DATADIR/applications + desktop.files += fritzing.desktop - desktop.path = $$DATADIR/applications - desktop.files += fritzing.desktop + mimedb.path = $$DATADIR/mime/packages + mimedb.files += resources/system_icons/linux/fritzing.xml - manpage.path = $$DATADIR/man/man1 - manpage.files += Fritzing.1 + manpage.path = $$DATADIR/man/man1 + manpage.files += Fritzing.1 - icon.path = $$DATADIR/icons - icon.extra = install -D -m 0644 $$PWD/resources/images/fritzing_icon.png $(INSTALL_ROOT)$$DATADIR/icons/fritzing.png + icon.path = $$DATADIR/icons + icon.extra = install -D -m 0644 $$PWD/resources/images/fritzing_icon.png $(INSTALL_ROOT)$$DATADIR/icons/fritzing.png - parts.path = $$PKGDATADIR - parts.files += parts + parts.path = $$PKGDATADIR + parts.files += parts - help.path = $$PKGDATADIR - help.files += help + help.path = $$PKGDATADIR + help.files += help - sketches.path = $$PKGDATADIR - sketches.files += sketches + sketches.path = $$PKGDATADIR + sketches.files += sketches - bins.path = $$PKGDATADIR - bins.files += bins + bins.path = $$PKGDATADIR + bins.files += bins - translations.path = $$PKGDATADIR/translations - translations.extra = find $$PWD/translations -name "*.qm" -size +128c -exec cp -pr {} $(INSTALL_ROOT)$$PKGDATADIR/translations \\; + translations.path = $$PKGDATADIR/translations + translations.extra = find $$PWD/translations -name "*.qm" -size +128c -exec cp -pr {} $(INSTALL_ROOT)$$PKGDATADIR/translations \\; - syntax.path = $$PKGDATADIR/translations/syntax - syntax.files += translations/syntax/*.xml + syntax.path = $$PKGDATADIR/translations/syntax + syntax.files += translations/syntax/*.xml - INSTALLS += target desktop manpage icon parts sketches bins translations syntax help + INSTALLS += target desktop mimedb manpage icon parts sketches bins translations syntax help } ICON = resources/system_icons/macosx/fritzing_icon.icns @@ -160,61 +169,13 @@ greaterThan(QT_MAJOR_VERSION, 4) { RC_FILE = fritzing.rc RESOURCES += phoenixresources.qrc - # Fritzing is using libgit2 since version 0.9.3 - -LIBGIT2INCLUDE = ../libgit2/include -exists($$LIBGIT2INCLUDE/git2.h) { - message("found libgit2 include path at $$LIBGIT2INCLUDE") -} -else { - message("Fritzing requires libgit2") - message("Build it from the repo at https://github.com/libgit2") - message("See https://github.com/fritzing/fritzing-app/wiki for details.") - - error("libgit2 include path not found in $$LIBGIT2INCLUDE") -} - -INCLUDEPATH += $$LIBGIT2INCLUDE - -win32 { - contains(QMAKE_TARGET.arch, x86_64) { - LIBGIT2LIB = ../libgit2/build64 - } - else { - LIBGIT2LIB = ../libgit2/build32 - } - - exists($$LIBGIT2LIB/git2.lib) { - message("found libgit2 library in $$LIBGIT2LIB") - } - else { - error("libgit2 library not found in $$LIBGIT2LIB") - } -} - -unix { - LIBGIT2LIB = ../libgit2/build - macx { - exists($$LIBGIT2LIB/libgit2.dylib) { - message("found libgit2 library in $$LIBGIT2LIB") - } - else { - error("libgit2 library not found in $$LIBGIT2LIB") - } - } - !macx { - exists($$LIBGIT2LIB/libgit2.so) { - message("found libgit2 library in $$LIBGIT2LIB") - } - else { - error("libgit2 library not found in $$LIBGIT2LIB") - } - } +packagesExist(libgit2) { + PKGCONFIG += libgit2 +} else { + include(pri/libgit2detect.pri) } -LIBS += -L$$LIBGIT2LIB -lgit2 - include(pri/kitchensink.pri) include(pri/mainwindow.pri) include(pri/partsbinpalette.pri) @@ -237,16 +198,14 @@ include(pri/translations.pri) include(pri/program.pri) include(pri/qtsysteminfo.pri) -!contains(DEFINES, QUAZIP_INSTALLED) { - include(pri/quazip.pri) -} contains(DEFINES, QUAZIP_INSTALLED) { - INCLUDEPATH += /usr/include/quazip /usr/include/minizip - LIBS += -lquazip -lminizip + INCLUDEPATH += /usr/include/quazip + LIBS += -lquazip +} else { + include(pri/quazip.pri) } TARGET = Fritzing TEMPLATE = app - message("libs $$LIBS") diff --git a/pri/libgit2detect.pri b/pri/libgit2detect.pri new file mode 100644 index 0000000..1b64b5a --- /dev/null +++ b/pri/libgit2detect.pri @@ -0,0 +1,60 @@ +# /******************************************************************* +# Part of the Fritzing project - http://fritzing.org +# Copyright (c) 2016 Fritzing +# Fritzing is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# Fritzing is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with Fritzing. If not, see <http://www.gnu.org/licenses/>. +# ******************************************************************** + +LIBGIT2INCLUDE = ../libgit2/include +exists($$LIBGIT2INCLUDE/git2.h) { + message("found libgit2 include path at $$LIBGIT2INCLUDE") +} else { + message("Fritzing requires libgit2") + message("Build it from the repo at https://github.com/libgit2") + message("See https://github.com/fritzing/fritzing-app/wiki for details.") + + error("libgit2 include path not found in $$LIBGIT2INCLUDE") +} + +INCLUDEPATH += $$LIBGIT2INCLUDE + +win32 { + contains(QMAKE_TARGET.arch, x86_64) { + LIBGIT2LIB = ../libgit2/build64 + } else { + LIBGIT2LIB = ../libgit2/build32 + } + + exists($$LIBGIT2LIB/git2.lib) { + message("found libgit2 library in $$LIBGIT2LIB") + } else { + error("libgit2 library not found in $$LIBGIT2LIB") + } +} + +unix { + LIBGIT2LIB = ../libgit2/build + macx { + exists($$LIBGIT2LIB/libgit2.dylib) { + message("found libgit2 library in $$LIBGIT2LIB") + } else { + error("libgit2 library not found in $$LIBGIT2LIB") + } + } else { + exists($$LIBGIT2LIB/libgit2.so) { + message("found libgit2 library in $$LIBGIT2LIB") + } else { + error("libgit2 library not found in $$LIBGIT2LIB") + } + } +} + +LIBS += -L$$LIBGIT2LIB -lgit2 diff --git a/pri/utils.pri b/pri/utils.pri index ae14ea8..210570f 100644 --- a/pri/utils.pri +++ b/pri/utils.pri @@ -1,6 +1,6 @@ # /******************************************************************* # Part of the Fritzing project - http://fritzing.org -# Copyright (c) 2007-08 Fritzing +# Copyright (c) 2007-16 Fritzing # Fritzing is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or @@ -21,39 +21,24 @@ BOOSTS = 43 44 45 46 47 48 49 50 51 52 53 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 LATESTBOOST = 0 for(boost, BOOSTS) { - exists(../src/lib/boost_1_$${boost}_0) { - LATESTBOOST = $$boost - } -} - -contains(LATESTBOOST, 0) { - unix { - !macx { - BOOSTINFO = $$system(dpkg -s libboost-dev | grep 'Version') - BADVERSION = $$find(BOOSTINFO, 1\.54) - !isEmpty(BADVERSION) { - message("Boost 1.54 has a bug in a function that Fritzing uses, so download or install some other version") - error("Easiest to copy the boost library to .../src/lib/, so that you have .../src/lib/boost_1_xx_0") - } - isEmpty(BADVERSION) { - BOOSTVERSION = $$find(BOOSTINFO, 1\...\.0) - !isEmpty(BOOSTVERSION) { - LATESTBOOST = installed - message("using installed BOOST library") - } - } - } + exists(../src/lib/boost_1_$${boost}_0) { + LATESTBOOST = $$boost } } contains(LATESTBOOST, 0) { - message("Please download the boost library--you can find it at http://www.boost.org/") - message("Note that boost 1.54 has a bug in a function that Fritzing uses, so download some other version") - error("Copy the boost library to .../src/lib/, so that you have .../src/lib/boost_1_xx_0") + qtCompileTest(boost) + config_boost { + LATESTBOOST = installed + message("using installed Boost library") + } else { + message("Boost 1.54 has a bug in a function that Fritzing uses, so download or install some other version") + error("Easiest to copy the Boost library to .../src/lib/, so that you have .../src/lib/boost_1_xx_0") + } } !contains(LATESTBOOST, installed) { - message("using boost from src/lib/boost_1_$${LATESTBOOST}_0") + message("using Boost from src/lib/boost_1_$${LATESTBOOST}_0") INCLUDEPATH += src/lib/boost_1_$${LATESTBOOST}_0 } @@ -110,6 +95,3 @@ src/utils/schematicrectconstants.cpp \ src/utils/s2s.cpp \ src/utils/textutils.cpp \ src/utils/zoomslider.cpp - - - diff --git a/resources/system_icons/linux/fritzing.xml b/resources/system_icons/linux/fritzing.xml new file mode 100644 index 0000000..21c2d8f --- /dev/null +++ b/resources/system_icons/linux/fritzing.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> +<mime-type type="application/x-fritzing-fzb"> +<comment>Fritzing Parts Bin</comment> +<glob pattern="*.fzb"/> +</mime-type> +<mime-type type="application/x-fritzing-fzbz"> +<comment>Fritzing Parts Bin Bundle</comment> +<glob pattern="*.fzbz"/> +</mime-type> +<mime-type type="application/x-fritzing-fzm"> +<comment>Fritzing Module</comment> +<glob pattern="*.fzm"/> +</mime-type> +<mime-type type="application/x-fritzing-fzp"> +<comment>Fritzing Part Definition</comment> +<glob pattern="*.fzp"/> +</mime-type> +<mime-type type="application/x-fritzing-fzpz"> +<comment>Fritzing Part Bundle</comment> +<glob pattern="*.fzpz"/> +</mime-type> +<mime-type type="application/x-fritzing-fz"> +<comment>Fritzing Sketch</comment> +<glob pattern="*.fz"/> +</mime-type> +<mime-type type="application/x-fritzing-fzz"> +<comment>Fritzing Sketch Bundle</comment> +<glob pattern="*.fzz"/> +</mime-type> +</mime-info> diff --git a/resources/system_icons/linux/x-fritzing-fz.xml b/resources/system_icons/linux/x-fritzing-fz.xml deleted file mode 100644 index 95c664b..0000000 --- a/resources/system_icons/linux/x-fritzing-fz.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> -<mime-type type="application/x-fritzing-fz"> -<comment>Fritzing Sketch</comment> -<generic-icon name="application-x-fritzing-fz"/> -<glob pattern="*.fz"/> -</mime-type> -</mime-info> diff --git a/resources/system_icons/linux/x-fritzing-fzb.xml b/resources/system_icons/linux/x-fritzing-fzb.xml deleted file mode 100644 index 855f1fa..0000000 --- a/resources/system_icons/linux/x-fritzing-fzb.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> -<mime-type type="application/x-fritzing-fzb"> -<comment>Fritzing Parts Bin</comment> -<generic-icon name="application-x-fritzing-fzb"/> -<glob pattern="*.fzb"/> -</mime-type> -</mime-info> diff --git a/resources/system_icons/linux/x-fritzing-fzbz.xml b/resources/system_icons/linux/x-fritzing-fzbz.xml deleted file mode 100644 index 6259c91..0000000 --- a/resources/system_icons/linux/x-fritzing-fzbz.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> -<mime-type type="application/x-fritzing-fzbz"> -<comment>Fritzing Parts Bin Bundle</comment> -<generic-icon name="application-x-fritzing-fzbz"/> -<glob pattern="*.fzbz"/> -</mime-type> -</mime-info> diff --git a/resources/system_icons/linux/x-fritzing-fzm.xml b/resources/system_icons/linux/x-fritzing-fzm.xml deleted file mode 100644 index d7bd74c..0000000 --- a/resources/system_icons/linux/x-fritzing-fzm.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> -<mime-type type="application/x-fritzing-fzm"> -<comment>Fritzing Module</comment> -<generic-icon name="application-x-fritzing-fzm"/> -<glob pattern="*.fzm"/> -</mime-type> -</mime-info> diff --git a/resources/system_icons/linux/x-fritzing-fzp.xml b/resources/system_icons/linux/x-fritzing-fzp.xml deleted file mode 100644 index d7eeb8d..0000000 --- a/resources/system_icons/linux/x-fritzing-fzp.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> -<mime-type type="application/x-fritzing-fzp"> -<comment>Fritzing Part Definition</comment> -<generic-icon name="application-x-fritzing-fzp"/> -<glob pattern="*.fzp"/> -</mime-type> -</mime-info> diff --git a/resources/system_icons/linux/x-fritzing-fzpz.xml b/resources/system_icons/linux/x-fritzing-fzpz.xml deleted file mode 100644 index d6e7ea6..0000000 --- a/resources/system_icons/linux/x-fritzing-fzpz.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> -<mime-type type="application/x-fritzing-fzpz"> -<comment>Fritzing Part Bundle</comment> -<generic-icon name="application-x-fritzing-fzpz"/> -<glob pattern="*.fzpz"/> -</mime-type> -</mime-info> diff --git a/resources/system_icons/linux/x-fritzing-fzz.xml b/resources/system_icons/linux/x-fritzing-fzz.xml deleted file mode 100644 index 865b0f1..0000000 --- a/resources/system_icons/linux/x-fritzing-fzz.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> -<mime-type type="application/x-fritzing-fzz"> -<comment>Fritzing Sketch Bundle</comment> -<generic-icon name="application-x-fritzing-fzz"/> -<glob pattern="*.fzz"/> -</mime-type> -</mime-info>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor