@@ -820,9 +820,6 @@ dist_patch_DATA = \
%D%/packages/patches/audiofile-function-signature.patch \
%D%/packages/patches/automake-skip-amhello-tests.patch \
%D%/packages/patches/avahi-localstatedir.patch \
- %D%/packages/patches/avogadro-boost148.patch \
- %D%/packages/patches/avogadro-eigen3-update.patch \
- %D%/packages/patches/avogadro-python-eigen-lib.patch \
%D%/packages/patches/avidemux-install-to-lib.patch \
%D%/packages/patches/awesome-reproducible-png.patch \
%D%/packages/patches/aws-c-event-stream-cmake-prefix.patch \
@@ -1663,8 +1660,6 @@ dist_patch_DATA = \
%D%/packages/patches/thefuck-test-environ.patch \
%D%/packages/patches/tidy-CVE-2015-5522+5523.patch \
%D%/packages/patches/tinyxml-use-stl.patch \
- %D%/packages/patches/tipp10-fix-compiling.patch \
- %D%/packages/patches/tipp10-remove-license-code.patch \
%D%/packages/patches/tk-find-library.patch \
%D%/packages/patches/transcode-ffmpeg.patch \
%D%/packages/patches/transmission-honor-localedir.patch \
@@ -49,91 +49,6 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system python))
-(define-public avogadro
- (package
- (name "avogadro")
- (version "1.2.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/cryos/avogadro")
- (commit version)))
- (sha256
- (base32 "0258py3lkba85qhs5ynancinyym61vlp0zaq9yrfs3hhnhpzv9n2"))
- (file-name (git-file-name name version))
- (patches
- (search-patches "avogadro-eigen3-update.patch"
- "avogadro-python-eigen-lib.patch"
- "avogadro-boost148.patch"))))
- (build-system cmake-build-system)
- (arguments
- `(#:tests? #f
- #:configure-flags
- (list "-DENABLE_GLSL=ON"
- (string-append "-DPYTHON_LIBRARIES="
- (assoc-ref %build-inputs "python")
- "/lib")
- (string-append "-DPYTHON_INCLUDE_DIRS="
- (assoc-ref %build-inputs "python")
- "/include/python"
- ,(version-major+minor
- (package-version python))))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-python-lib-path
- (lambda* (#:key outputs #:allow-other-keys)
- ;; This is necessary to install the Python module in the correct
- ;; directory.
- (substitute* "libavogadro/src/python/CMakeLists.txt"
- (("^EXECUTE_PROCESS.*$") "")
- (("^.*from sys import stdout.*$") "")
- (("^.*OUTPUT_VARIABLE.*")
- (string-append "set(PYTHON_LIB_PATH \""
- (assoc-ref outputs "out")
- "/lib/python"
- ,(version-major+minor
- (package-version python))
- "/site-packages\")")))
- #t))
- (add-after 'install 'wrap-program
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Make sure 'avogadro' runs with the correct PYTHONPATH.
- (let* ((out (assoc-ref outputs "out")))
- (setenv "PYTHONPATH"
- (string-append
- (assoc-ref outputs "out")
- "/lib/python"
- ,(version-major+minor
- (package-version python))
- "/site-packages:"
- (getenv "PYTHONPATH")))
- (wrap-program (string-append out "/bin/avogadro")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
- #t)))))
- (native-inputs
- `(("doxygen" ,doxygen)
- ("pkg-config" ,pkg-config)))
- (inputs
- `(("boost" ,boost)
- ("eigen" ,eigen)
- ("glew" ,glew)
- ("openbabel" ,openbabel)
- ("python" ,python-2)
- ("python-numpy" ,python2-numpy)
- ("python-pyqt" ,python2-pyqt-4)
- ("python-sip" ,python2-sip)
- ("qt" ,qt-4)
- ("zlib" ,zlib)))
- (home-page "https://avogadro.cc")
- (synopsis "Advanced molecule editor")
- (description
- "Avogadro is an advanced molecule editor and visualizer designed for use
-in computational chemistry, molecular modeling, bioinformatics, materials
-science, and related areas. It offers flexible high quality rendering and a
-powerful plugin architecture.")
- (license license:gpl2+)))
-
(define-public domainfinder
(package
(name "domainfinder")
@@ -217,59 +217,6 @@ Currently available boards include:
(license (list license:silofl1.1 ; bundled fonts
license:gpl3+))))
-(define-public tipp10
- (package
- (name "tipp10")
- (version "2.1.0")
- (source (origin
- (method url-fetch)
- ;; guix download is not able to handle the download links on the
- ;; home-page, which use '<meta http-equiv="refresh" …>'
- (uri (string-append "mirror://debian/pool/main/"
- "t/tipp10/tipp10_2.1.0.orig.tar.gz"))
- (sha256
- (base32
- "0d387b404j88gsv6kv0rb7wxr23v5g5vl6s5l7602x8pxf7slbbx"))
- (patches (search-patches "tipp10-fix-compiling.patch"
- "tipp10-remove-license-code.patch"))))
- (build-system cmake-build-system)
- (arguments
- `(#:tests? #f ; packages has no tests
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'disable-new-version-check
- (lambda _
- ;; Make new version check to default to false.
- ;; TODO: Remove the checkbox from the dialog and the check itself
- (substitute* '("widget/settingspages.cpp" "widget/mainwindow.cpp")
- (("settings.value(\"check_new_version\", true)")
- "settings.value(\"check_new_version\", false)"))
- #t))
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; Make program honor $PREFIX
- (substitute* "tipp10.pro"
- (("\\.path = /usr/") (string-append ".path = " out "/")))
- (substitute* "def/defines.h"
- (("\"/usr/") (string-append "\"" out "/")))
- ;; Recreate Makefile
- (invoke "qmake")))))))
- (inputs
- `(("qt4" ,qt-4)
- ("sqlite" ,sqlite)))
- (home-page "https://www.tipp10.com/")
- (synopsis "Touch typing tutor")
- (description "Tipp10 is a touch typing tutor. The ingenious thing about
-the software is its intelligence feature: characters that are mistyped are
-repeated more frequently. Beginners will find their way around right away so
-they can start practicing without a hitch.
-
-Useful support functions and an extensive progress tracker, topical lessons
-and the ability to create your own practice lessons make learning to type
-easy.")
- (license license:gpl2)))
-
(define-public snap
(package
(name "snap")
@@ -1986,256 +1986,6 @@ parallel computing platforms. It also supports serial execution.")
(license (list license:gpl2+
license:lgpl2.0+)))) ; freehdl's libraries
-(define-public qucs
- ;; Qucs 0.0.19 segfaults when using glibc-2.26. Temporarily build from git.
- ;; TODO: When qucs-0.0.20 is released, revert the commit that introduced this
- ;; comment and update the package.
- (let ((commit "b4f27d9222568066cd59e4c387c51a35056c99d8")
- (revision "0"))
- (package
- (name "qucs")
- (version (git-version "0.0.19" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/Qucs/qucs")
- (commit commit)))
- (sha256
- (base32 "10bclay9xhkffmsh4j4l28kj1qpxx0pnxja5vx6305cllnq4r3gb"))
- (file-name (string-append name "-" version "-checkout"))))
- (build-system gnu-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'patch-bootstrap
- (lambda _
- (for-each patch-shebang
- '("bootstrap"
- "qucs/bootstrap"
- "qucs-doc/bootstrap"
- "qucs-core/bootstrap"))
- #t))
- (add-before 'configure 'patch-configure
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "qucs/configure"
- (("\\$QTDIR") (assoc-ref inputs "qt4")))
- #t))
- (add-after 'patch-configure 'patch-scripts
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* '("qucs/qucs/qucsdigi"
- "qucs/qucs/qucsdigilib"
- "qucs/qucs/qucsveri")
- (("\\$BINDIR")
- (string-append (assoc-ref outputs "out") "/bin"))
- (("freehdl-config")
- (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
- (("freehdl-v2cc")
- (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
- (("cp ")
- (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
- (("glibtool")
- (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
- (("sed")
- (string-append (assoc-ref inputs "sed") "/bin/sed"))
- (("iverilog")
- (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
- (("vvp")
- (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
- #t))
- (add-before 'check 'pre-check
- (lambda _
- ;; The test suite requires a running X server.
- (system "Xvfb :1 &")
- (setenv "DISPLAY" ":1")
- #t))
- (add-after 'install 'make-wrapper
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; 'qucs' directly invokes gcc, hence this wrapping.
- (wrap-program (string-append out "/bin/qucs")
- `("CPLUS_INCLUDE_PATH" ":" prefix
- (,(string-append (assoc-ref inputs "gcc-toolchain")
- "/include")))
- `("PATH" ":" prefix
- (,(string-append (assoc-ref inputs "gcc-toolchain")
- "/bin")))
- `("LIBRARY_PATH" ":" prefix
- (,(string-append (assoc-ref inputs "gcc-toolchain")
- "/lib")))
- `("ADMSXMLBINDIR" ":" prefix
- (,(string-append (assoc-ref inputs "adms") "/bin")))
- `("ASCOBINDIR" ":" prefix
- (,(string-append (assoc-ref inputs "asco") "/bin")))
- `("QUCS_OCTAVE" ":" prefix
- (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
- #t)))
- #:parallel-build? #f ; race condition
- #:configure-flags '("--disable-doc"))) ; we need octave-epstk
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("bison" ,bison)
- ("flex" ,flex)
- ("gperf" ,gperf)
- ("libtool-native" ,libtool)
- ("pkg-config" ,pkg-config)
- ("python" ,python-2) ; for tests
- ("matplotlib" ,python2-matplotlib) ; for tests
- ("numpy" ,python2-numpy) ; for tests
- ("xorg-server" ,xorg-server-for-tests))) ; for tests
- (inputs
- `(("adms" ,adms)
- ("asco" ,asco)
- ("coreutils" ,coreutils)
- ("freehdl" ,freehdl)
- ("gcc-toolchain" ,gcc-toolchain)
- ("iverilog" ,iverilog)
- ("libtool" ,libtool)
- ("octave" ,octave-cli)
- ("qt4" ,qt-4)
- ("sed" ,sed)))
- (home-page "http://qucs.sourceforge.net/")
- (synopsis "Circuit simulator with graphical user interface")
- (description
- "Qucs is a circuit simulator with graphical user interface. The software
-aims to support all kinds of circuit simulation types---e.g. DC, AC,
-S-parameter, transient, noise and harmonic balance analysis. Pure digital
-simulations are also supported.")
- (license license:gpl2+))))
-
-(define-public qucs-s
- (package
- (name "qucs-s")
- (version "0.0.21")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/ra3xdh/qucs_s/archive/"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "12m1jwhb9qwvb141qzyskbxnw3wn1x22d02z4b4862p7xvccl5h7"))))
- (build-system cmake-build-system)
- (arguments
- `(#:tests? #f ; no tests
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'patch-scripts
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("qucs/qucsdigi"
- "qucs/qucsdigilib"
- "qucs/qucsveri")
- (("\\$BINDIR")
- (string-append (assoc-ref inputs "qucs") "/bin"))
- (("freehdl-config")
- (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
- (("freehdl-v2cc")
- (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
- (("cp ")
- (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
- (("glibtool")
- (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
- (("sed")
- (string-append (assoc-ref inputs "sed") "/bin/sed"))
- (("iverilog")
- (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
- (("vvp")
- (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
- #t))
- (add-after 'patch-scripts 'patch-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "qucs/main.cpp"
- (((string-append "QucsSettings\\.Qucsator = QucsSettings\\.BinDir "
- "\\+ \"qucsator\" \\+ executableSuffix"))
- (string-append "}{ QucsSettings.Qucsator = \""
- (assoc-ref inputs "qucs") "/bin/qucsator\""))
- (((string-append "QucsSettings\\.XyceExecutable = "
- "\"/usr/local/Xyce-Release-6.8.0-OPENSOURCE/bin/Xyce"))
- (string-append "}{ QucsSettings.XyceExecutable = \""
- (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
- (((string-append "else QucsSettings\\.XyceParExecutable = "
- "\"mpirun -np %p /usr/local"
- "/Xyce-Release-6.8.0-OPENMPI-OPENSOURCE/bin/Xyce"))
- (string-append "QucsSettings.XyceParExecutable = \""
- (assoc-ref inputs "mpi") "/bin/mpirun -np %p "
- (assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
- (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
- (string-append "QucsSettings.NgspiceExecutable = " "\""
- (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
- (substitute* "qucs/extsimkernels/ngspice.cpp"
- (("share/qucs/xspice_cmlib") "share/qucs-s/xspice_cmlib"))
- (substitute* "qucs/qucs_actions.cpp"
- (("qucstrans")
- (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
- (("qucsattenuator")
- (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
- (("qucsrescodes")
- (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
- #t))
- (add-after 'install 'install-scripts
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (for-each
- (lambda (script)
- (let ((file (string-append "../qucs_s-" ,version
- "/qucs/" script))
- (out (assoc-ref outputs "out")))
- (install-file file (string-append out "/bin"))
- (chmod (string-append out "/bin/" script) #o555)))
- '("qucsdigi" "qucsdigilib" "qucsveri"))
- #t))
- (add-after 'install-scripts 'make-wrapper
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (file (string-append out "/bin/qucs-s"))
- (qucs (assoc-ref inputs "qucs"))
- (qucsator (string-append qucs "/bin/qucsator")))
- (wrap-program file
- `("CPLUS_INCLUDE_PATH" ":" prefix
- (,(string-append (assoc-ref inputs "gcc-toolchain")
- "/include")))
- `("PATH" ":" prefix
- (,(string-append (assoc-ref inputs "gcc-toolchain")
- "/bin")))
- `("LIBRARY_PATH" ":" prefix
- (,(string-append (assoc-ref inputs "gcc-toolchain")
- "/lib")))
- `("QUCSATOR" ":" prefix (,qucsator))
- `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
- `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms")
- "/bin")))
- `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco")
- "/bin")))
- `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave")
- "/bin/octave"))))
- (symlink qucsator (string-append out "/bin/qucsator"))
- #t))))))
- (native-inputs
- `(("libtool-native" ,libtool)))
- (inputs
- `(("adms" ,adms)
- ("asco" ,asco)
- ("coreutils" ,coreutils)
- ("freehdl" ,freehdl)
- ("gcc-toolchain" ,gcc-toolchain)
- ("iverilog" ,iverilog)
- ("libtool" ,libtool)
- ("mpi" ,openmpi)
- ("ngspice" ,ngspice)
- ("octave" ,octave-cli)
- ("qt4" ,qt-4)
- ("qucs" ,qucs)
- ("sed" ,sed)
- ("xyce-serial" ,xyce-serial)
- ("xyce-parallel" ,xyce-parallel)))
- (home-page "https://ra3xdh.github.io/")
- (synopsis "Circuit simulator with graphical user interface")
- (description
- "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
-The S letter indicates SPICE. The purpose of the Qucs-S subproject is to use
-free SPICE circuit simulation kernels with the Qucs GUI. It provides the
-simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
- (license license:gpl2+)))
-
(define-public librepcb
(package
(name "librepcb")
@@ -1551,99 +1551,6 @@ guidelines. It provides an easy to use application that allows you to
connect with friends and family without anyone else listening in.")
(license license:gpl3+)))
-(define-public pybitmessage
- (package
- (name "pybitmessage")
- (version "0.6.3.2")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/Bitmessage/PyBitmessage")
- (commit version)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1lmhbpwsqh1v93krlqqhafw2pc3y0qp8zby186yllbph6s8kdp35"))))
- (propagated-inputs
- ;; TODO:
- ;; Package "pyopencl", required in addition to numpy for OpenCL support.
- ;; Package "gst123", required in addition to alsa-utils and
- ;; mpg123 for sound support.
- `(("python2-msgpack" ,python2-msgpack)
- ("python2-pythondialog" ,python2-pythondialog)
- ("python2-pyqt-4" ,python2-pyqt-4)
- ("python2-sip" ,python2-sip)
- ("python2-pysqlite" ,python2-pysqlite)
- ("python2-pyopenssl" ,python2-pyopenssl)))
- (native-inputs
- `(("openssl" ,openssl)))
- (build-system python-build-system)
- (arguments
- `(#:modules ((guix build python-build-system)
- (guix build utils))
- #:tests? #f ;no test target
- #:python ,python-2
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-unmatched-python-shebangs
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/bitmessagemain.py"
- (("#!/usr/bin/env python2.7")
- (string-append "#!" (which "python"))))
- (substitute* "src/bitmessagecli.py"
- (("#!/usr/bin/env python2.7.x")
- (string-append "#!" (which "python"))))
- #t))
- (add-after 'unpack 'fix-depends
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/depends.py"
- (("libcrypto.so")
- (string-append (assoc-ref inputs "openssl")
- "/lib/libcrypto.so")))
- #t))
- (add-after 'unpack 'fix-local-files-in-paths
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* "src/proofofwork.py"
- (("bitmsghash.so")
- (string-append (assoc-ref outputs "out")
- "/lib/bitmsghash.so")))
- #t))
- (add-after 'unpack 'fix-pyelliptic
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/pyelliptic/openssl.py"
- (("libcrypto.so")
- (string-append (assoc-ref inputs "openssl")
- "/lib/libcrypto.so"))
- (("libssl.so")
- (string-append (assoc-ref inputs "openssl")
- "/lib/libssl.so")))
- #t))
- (add-after 'unpack 'noninteractive-build
- ;; This applies upstream commit 4c597d3f7cf9f83a763472aa165a1a4292019f20
- (lambda _
- (substitute* "setup.py"
- (("except NameError")
- "except EOFError, NameError"))
- #t))
- ;; XXX: python setup.py does not build and install bitmsghash,
- ;; without it PyBitmessage tries to compile it at first run
- ;; in the store, which due to obvious reasons fails. Do it
- ;; and place it in /lib.
- (add-after 'unpack 'build-and-install-bitmsghash
- (lambda* (#:key outputs #:allow-other-keys)
- (with-directory-excursion "src/bitmsghash"
- (system* "make")
- (install-file "bitmsghash.so"
- (string-append (assoc-ref outputs "out") "/lib")))
- #t)))))
- (license license:expat)
- (description
- "Distributed and trustless peer-to-peer communications protocol
-for sending encrypted messages to one person or many subscribers.")
- (synopsis "Distributed peer-to-peer communication")
- (home-page "https://bitmessage.org/")))
-
(define-public ytalk
(package
(name "ytalk")
@@ -177,37 +177,6 @@ algorithms AES or Twofish.")
;; the combined work falls under the GPLv3.
(license license:gpl3)))
-(define-public keepassx
- (package
- (name "keepassx")
- (version "2.0.3")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://www.keepassx.org/releases/" version
- "/keepassx-" version ".tar.gz"))
- (sha256
- (base32
- "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
- (build-system cmake-build-system)
- (inputs
- `(("libgcrypt" ,libgcrypt)
- ("libxi" ,libxi)
- ("libxtst" ,libxtst)
- ("qt" ,qt-4)))
- (native-inputs
- `(("zlib" ,zlib)))
- (home-page "https://www.keepassx.org")
- (synopsis "Password manager")
- (description "KeePassX is a password manager or safe which helps you to
-manage your passwords in a secure way. You can put all your passwords in one
-database, which is locked with one master key or a key-file which can be stored
-on an external storage device. The databases are encrypted using the
-algorithms AES or Twofish.")
- ;; Non functional parts use various licences.
- (license license:gpl3)
- (properties `((superseded . ,keepassxc)))))
-
(define-public pwsafe
(package
(name "pwsafe")
deleted file mode 100644
@@ -1,69 +0,0 @@
-Index: avogadro-1.2.0/libavogadro/src/pythonengine_p.h
-===================================================================
---- avogadro-1.2.0.orig/libavogadro/src/pythonengine_p.h
-+++ avogadro-1.2.0/libavogadro/src/pythonengine_p.h
-@@ -31,7 +31,9 @@
-
- #include <avogadro/global.h>
- #include <avogadro/engine.h>
-+#ifndef Q_MOC_RUN
- #include <boost/python.hpp>
-+#endif
-
- namespace Avogadro {
-
-Index: avogadro-1.2.0/libavogadro/src/pythonextension_p.h
-===================================================================
---- avogadro-1.2.0.orig/libavogadro/src/pythonextension_p.h
-+++ avogadro-1.2.0/libavogadro/src/pythonextension_p.h
-@@ -33,7 +33,9 @@
- #include <avogadro/extension.h>
- #include <avogadro/primitive.h>
- #include <avogadro/glwidget.h>
-+#ifndef Q_MOC_RUN
- #include <boost/python.hpp>
-+#endif
-
- #include <QWidget>
- #include <QList>
-Index: avogadro-1.2.0/libavogadro/src/pythontool_p.h
-===================================================================
---- avogadro-1.2.0.orig/libavogadro/src/pythontool_p.h
-+++ avogadro-1.2.0/libavogadro/src/pythontool_p.h
-@@ -31,7 +31,9 @@
-
- #include <avogadro/global.h>
- #include <avogadro/tool.h>
-+#ifndef Q_MOC_RUN
- #include <boost/python.hpp>
-+#endif
-
- #include <QObject>
- #include <QAction>
-Index: avogadro-1.2.0/libavogadro/src/pythoninterpreter.h
-===================================================================
---- avogadro-1.2.0.orig/libavogadro/src/pythoninterpreter.h
-+++ avogadro-1.2.0/libavogadro/src/pythoninterpreter.h
-@@ -26,7 +26,9 @@
- #define PYTHONINTERPRETER_H
-
- #include <avogadro/global.h>
-+#ifndef Q_MOC_RUN
- #include <boost/python.hpp>
-+#endif
- #include <avogadro/primitive.h>
- #include <QString>
-
-Index: avogadro-1.2.0/libavogadro/src/pythonscript.h
-===================================================================
---- avogadro-1.2.0.orig/libavogadro/src/pythonscript.h
-+++ avogadro-1.2.0/libavogadro/src/pythonscript.h
-@@ -27,6 +27,8 @@
- #define PYTHONSCRIPT_H
-
- #include <avogadro/global.h>
-+#ifndef Q_MOC_RUN
- #include <boost/python.hpp>
-+#endif
-
- #include "pythonerror.h"
deleted file mode 100644
@@ -1,603 +0,0 @@
-From 43af3c117b0b3220b15c2fe2895b94bbd83d3a60 Mon Sep 17 00:00:00 2001
-From: Claudio Fernandes <claudiosf.claudio@gmail.com>
-Date: Sun, 15 Jan 2017 21:23:39 -0200
-Subject: [PATCH] Adapt Avogadro to Eigen 3.3
-
----
- CMakeLists.txt | 9 +------
- avogadro/src/mainwindow.cpp | 5 ++--
- libavogadro/src/camera.cpp | 10 ++++----
- libavogadro/src/camera.h | 14 +++++------
- libavogadro/src/engines/wireengine.cpp | 4 ++--
- .../crystallography/crystallographyextension.cpp | 2 +-
- .../crystallography/ui/ceviewoptionswidget.cpp | 2 +-
- .../src/extensions/orca/orcaanalysedialog.cpp | 1 -
- .../src/extensions/orca/orcainputdialog.cpp | 1 -
- .../src/extensions/qtaim/qtaimmathutilities.cpp | 1 +
- .../qtaim/qtaimwavefunctionevaluator.cpp | 28 +++++++++++-----------
- .../extensions/surfaces/openqube/gamessukout.cpp | 1 +
- .../src/extensions/surfaces/openqube/slaterset.cpp | 6 +++--
- libavogadro/src/glpainter_p.cpp | 14 +++++------
- libavogadro/src/glwidget.cpp | 4 ++--
- libavogadro/src/molecule.cpp | 26 ++++++++++++++++++--
- libavogadro/src/navigate.cpp | 2 +-
- libavogadro/src/tools/bondcentrictool.cpp | 28 +++++++++++-----------
- libavogadro/src/tools/manipulatetool.cpp | 17 +++++++------
- libavogadro/src/tools/navigatetool.cpp | 3 ++-
- libavogadro/src/tools/skeletontree.cpp | 7 +++---
- libavogadro/src/tools/skeletontree.h | 2 +-
- 22 files changed, 102 insertions(+), 85 deletions(-)
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -231,14 +231,7 @@ if(NOT Linguist_FOUND)
- message(WARNING " Qt4 Linguist not found, please install it if you want Avogadro translations")
- endif()
-
--find_package(Eigen3) # find and setup Eigen3 if available
--if(NOT EIGEN3_FOUND)
-- message(STATUS "Cannot find Eigen3, trying Eigen2")
-- find_package(Eigen2 REQUIRED) # Some version is required
--else()
--# Use Stage10 Eigen3 support
-- set (EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API TRUE)
--endif()
-+find_package(Eigen3 REQUIRED) # find and setup Eigen3 if available
-
- find_package(ZLIB REQUIRED)
- find_package(OpenBabel2 REQUIRED) # find and setup OpenBabel
---- a/avogadro/src/mainwindow.cpp
-+++ b/avogadro/src/mainwindow.cpp
-@@ -115,7 +115,6 @@
- #include <QDebug>
-
- #include <Eigen/Geometry>
--#include <Eigen/Array>
- #define USEQUAT
- // This is a "hidden" exported Qt function on the Mac for Qt-4.x.
- #ifdef Q_WS_MAC
-@@ -2775,7 +2774,7 @@ protected:
- linearGoal.row(1) = linearGoal.row(2).cross(linearGoal.row(0));
-
- // calculate the translation matrix
-- Transform3d goal(linearGoal);
-+ Projective3d goal(linearGoal);
-
- goal.pretranslate(- 3.0 * (d->glWidget->radius() + CAMERA_NEAR_DISTANCE) * Vector3d::UnitZ());
-
-@@ -2840,7 +2839,7 @@ protected:
- Matrix3d linearGoal = Matrix3d::Identity();
-
- // calculate the translation matrix
-- Transform3d goal(linearGoal);
-+ Projective3d goal(linearGoal);
-
- goal.pretranslate(- 3.0 * (d->glWidget->radius() + CAMERA_NEAR_DISTANCE) * Vector3d::UnitZ());
-
---- a/libavogadro/src/camera.cpp
-+++ b/libavogadro/src/camera.cpp
-@@ -47,7 +47,7 @@ namespace Avogadro
-
- CameraPrivate() {};
-
-- Eigen::Transform3d modelview, projection;
-+ Eigen::Projective3d modelview, projection;
- const GLWidget *parent;
- double angleOfViewY;
- double orthoScale;
-@@ -169,20 +169,20 @@ namespace Avogadro
-
- double Camera::distance(const Eigen::Vector3d & point) const
- {
-- return ( d->modelview * point ).norm();
-+ return ( d->modelview * point.homogeneous() ).head<3>().norm();
- }
-
-- void Camera::setModelview(const Eigen::Transform3d &matrix)
-+ void Camera::setModelview(const Eigen::Projective3d &matrix)
- {
- d->modelview = matrix;
- }
-
-- const Eigen::Transform3d & Camera::modelview() const
-+ const Eigen::Projective3d & Camera::modelview() const
- {
- return d->modelview;
- }
-
-- Eigen::Transform3d & Camera::modelview()
-+ Eigen::Projective3d & Camera::modelview()
- {
- return d->modelview;
- }
---- a/libavogadro/src/camera.h
-+++ b/libavogadro/src/camera.h
-@@ -101,16 +101,16 @@ namespace Avogadro {
- double angleOfViewY() const;
- /** Sets 4x4 "modelview" matrix representing the camera orientation and position.
- * @param matrix the matrix to copy from
-- * @sa Eigen::Transform3d & modelview(), applyModelview() */
-- void setModelview(const Eigen::Transform3d &matrix);
-+ * @sa Eigen::Projective3d & modelview(), applyModelview() */
-+ void setModelview(const Eigen::Projective3d &matrix);
- /** @return a constant reference to the 4x4 "modelview" matrix representing
- * the camera orientation and position
-- * @sa setModelview(), Eigen::Transform3d & modelview() */
-- const Eigen::Transform3d & modelview() const;
-+ * @sa setModelview(), Eigen::Projective3d & modelview() */
-+ const Eigen::Projective3d & modelview() const;
- /** @return a non-constant reference to the 4x4 "modelview" matrix representing
- * the camera orientation and position
-- * @sa setModelview(), const Eigen::Transform3d & modelview() const */
-- Eigen::Transform3d & modelview();
-+ * @sa setModelview(), const Eigen::Projective3d & modelview() const */
-+ Eigen::Projective3d & modelview();
- /** Calls gluPerspective() or glOrtho() with parameters automatically chosen
- * for rendering the GLWidget's molecule with this camera. Should be called
- * only in GL_PROJECTION matrix mode. Example code is given
-@@ -342,7 +342,7 @@ namespace Avogadro {
- * @return {x/w, y/w, z/w} vector
- */
- Eigen::Vector3d V4toV3DivW(const Eigen::Vector4d & v4) {
-- return v4.start<3>()/v4.w();
-+ return v4.head<3>()/v4.w();
- }
- };
-
---- a/libavogadro/src/engines/wireengine.cpp
-+++ b/libavogadro/src/engines/wireengine.cpp
-@@ -109,7 +109,7 @@ namespace Avogadro {
- const Camera *camera = pd->camera();
-
- // perform a rough form of frustum culling
-- Eigen::Vector3d transformedPos = pd->camera()->modelview() * v;
-+ Eigen::Vector3d transformedPos = (pd->camera()->modelview() * v.homogeneous()).head<3>();
- double dot = transformedPos.z() / transformedPos.norm();
- if(dot > -0.8)
- return true;
-@@ -167,7 +167,7 @@ namespace Avogadro {
- map = pd->colorMap(); // fall back to global color map
-
- // perform a rough form of frustum culling
-- Eigen::Vector3d transformedEnd1 = pd->camera()->modelview() * v1;
-+ Eigen::Vector3d transformedEnd1 = (pd->camera()->modelview() * v1.homogeneous()).head<3>();
- double dot = transformedEnd1.z() / transformedEnd1.norm();
- if(dot > -0.8)
- return true; // i.e., don't bother rendering
---- a/libavogadro/src/extensions/crystallography/crystallographyextension.cpp
-+++ b/libavogadro/src/extensions/crystallography/crystallographyextension.cpp
-@@ -1989,7 +1989,7 @@ namespace Avogadro
- // fix coordinates
- // Apply COB matrix:
- Eigen::Matrix3d invCob;
-- cob.computeInverse(&invCob);
-+ invCob = cob.inverse();
- for (QList<Eigen::Vector3d>::iterator
- it = fcoords.begin(),
- it_end = fcoords.end();
---- a/libavogadro/src/extensions/crystallography/ui/ceviewoptionswidget.cpp
-+++ b/libavogadro/src/extensions/crystallography/ui/ceviewoptionswidget.cpp
-@@ -139,7 +139,7 @@ namespace Avogadro
- {
- // View into a Miller plane
- Camera *camera = m_glWidget->camera();
-- Eigen::Transform3d modelView;
-+ Eigen::Projective3d modelView;
- modelView.setIdentity();
-
- // OK, so we want to rotate to look along the normal at the plane
---- a/libavogadro/src/extensions/orca/orcaanalysedialog.cpp
-+++ b/libavogadro/src/extensions/orca/orcaanalysedialog.cpp
-@@ -41,7 +41,6 @@
- #include <openbabel/mol.h>
-
- #include <Eigen/Geometry>
--#include <Eigen/LeastSquares>
-
- #include <vector>
-
---- a/libavogadro/src/extensions/orca/orcainputdialog.cpp
-+++ b/libavogadro/src/extensions/orca/orcainputdialog.cpp
-@@ -33,7 +33,6 @@
- #include <openbabel/mol.h>
-
- #include <Eigen/Geometry>
--#include <Eigen/LeastSquares>
-
- #include <vector>
-
---- a/libavogadro/src/extensions/qtaim/qtaimmathutilities.cpp
-+++ b/libavogadro/src/extensions/qtaim/qtaimmathutilities.cpp
-@@ -28,6 +28,7 @@
-
- #include <cmath>
- #include <Eigen/QR>
-+#include <Eigen/Eigenvalues>
-
- namespace Avogadro {
- namespace QTAIMMathUtilities {
---- a/libavogadro/src/extensions/qtaim/qtaimwavefunctionevaluator.cpp
-+++ b/libavogadro/src/extensions/qtaim/qtaimwavefunctionevaluator.cpp
-@@ -35,21 +35,21 @@ namespace Avogadro
- m_nprim=wfn.numberOfGaussianPrimitives();
- m_nnuc=wfn.numberOfNuclei();
-
-- m_nucxcoord=Map<Matrix<qreal,Dynamic,1> >(wfn.xNuclearCoordinates(),m_nnuc);
-- m_nucycoord=Map<Matrix<qreal,Dynamic,1> >(wfn.yNuclearCoordinates(),m_nnuc);
-- m_nuczcoord=Map<Matrix<qreal,Dynamic,1> >(wfn.zNuclearCoordinates(),m_nnuc);
-- m_nucz=Map<Matrix<qint64,Dynamic,1> >(wfn.nuclearCharges(),m_nnuc);
-- m_X0=Map<Matrix<qreal,Dynamic,1> >(wfn.xGaussianPrimitiveCenterCoordinates(),m_nprim,1);
-- m_Y0=Map<Matrix<qreal,Dynamic,1> >(wfn.yGaussianPrimitiveCenterCoordinates(),m_nprim,1);
-- m_Z0=Map<Matrix<qreal,Dynamic,1> >(wfn.zGaussianPrimitiveCenterCoordinates(),m_nprim,1);
-- m_xamom=Map<Matrix<qint64,Dynamic,1> >(wfn.xGaussianPrimitiveAngularMomenta(),m_nprim,1);
-- m_yamom=Map<Matrix<qint64,Dynamic,1> >(wfn.yGaussianPrimitiveAngularMomenta(),m_nprim,1);
-- m_zamom=Map<Matrix<qint64,Dynamic,1> >(wfn.zGaussianPrimitiveAngularMomenta(),m_nprim,1);
-- m_alpha=Map<Matrix<qreal,Dynamic,1> >(wfn.gaussianPrimitiveExponentCoefficients(),m_nprim,1);
-+ m_nucxcoord=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.xNuclearCoordinates()),m_nnuc);
-+ m_nucycoord=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.yNuclearCoordinates()),m_nnuc);
-+ m_nuczcoord=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.zNuclearCoordinates()),m_nnuc);
-+ m_nucz=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.nuclearCharges()),m_nnuc);
-+ m_X0=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.xGaussianPrimitiveCenterCoordinates()),m_nprim,1);
-+ m_Y0=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.yGaussianPrimitiveCenterCoordinates()),m_nprim,1);
-+ m_Z0=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.zGaussianPrimitiveCenterCoordinates()),m_nprim,1);
-+ m_xamom=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.xGaussianPrimitiveAngularMomenta()),m_nprim,1);
-+ m_yamom=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.yGaussianPrimitiveAngularMomenta()),m_nprim,1);
-+ m_zamom=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.zGaussianPrimitiveAngularMomenta()),m_nprim,1);
-+ m_alpha=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.gaussianPrimitiveExponentCoefficients()),m_nprim,1);
- // TODO Implement screening for unoccupied molecular orbitals.
-- m_occno=Map<Matrix<qreal,Dynamic,1> >(wfn.molecularOrbitalOccupationNumbers(),m_nmo,1);
-- m_orbe=Map<Matrix<qreal,Dynamic,1> >(wfn.molecularOrbitalEigenvalues(),m_nmo,1);
-- m_coef=Map<Matrix<qreal,Dynamic,Dynamic,RowMajor> >(wfn.molecularOrbitalCoefficients(),m_nmo,m_nprim);
-+ m_occno=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.molecularOrbitalOccupationNumbers()),m_nmo,1);
-+ m_orbe=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.molecularOrbitalEigenvalues()),m_nmo,1);
-+ m_coef=Map<Matrix<qreal,Dynamic,Dynamic,RowMajor> >(const_cast<qreal*>(wfn.molecularOrbitalCoefficients()),m_nmo,m_nprim);
- m_totalEnergy=wfn.totalEnergy();
- m_virialRatio=wfn.virialRatio();
-
---- a/libavogadro/src/extensions/surfaces/openqube/gamessukout.cpp
-+++ b/libavogadro/src/extensions/surfaces/openqube/gamessukout.cpp
-@@ -19,6 +19,7 @@
- using Eigen::Vector3d;
- using std::vector;
-
-+#include <iostream>
- #include <fstream>
-
- namespace OpenQube
---- a/libavogadro/src/extensions/surfaces/openqube/slaterset.cpp
-+++ b/libavogadro/src/extensions/surfaces/openqube/slaterset.cpp
-@@ -25,9 +25,9 @@
-
- #include "cube.h"
-
--#include <Eigen/Array>
- #include <Eigen/LU>
- #include <Eigen/QR>
-+#include <Eigen/Eigenvalues>
-
- #include <cmath>
-
-@@ -250,7 +250,9 @@ bool SlaterSet::initialize()
-
- SelfAdjointEigenSolver<MatrixXd> s(m_overlap);
- MatrixXd p = s.eigenvectors();
-- MatrixXd m = p * s.eigenvalues().cwise().inverse().cwise().sqrt().asDiagonal() * p.inverse();
-+ // TODO check if this is correct
-+ MatrixXd m1 = (s.eigenvalues().array().inverse().sqrt());
-+ MatrixXd m = p.array()*(m1.diagonal().array())*p.inverse().array();
- m_normalized = m * m_eigenVectors;
-
- if (!(m_overlap*m*m).isIdentity())
---- a/libavogadro/src/glpainter_p.cpp
-+++ b/libavogadro/src/glpainter_p.cpp
-@@ -789,13 +789,13 @@ namespace Avogadro
- } else {
- points[theta-1] = Eigen::AngleAxisd(theta * (M_PI / 180.0) / 2, n) * u;
- }
-- points[theta-1] = d->widget->camera()->modelview() * (origin + points[theta-1]);
-+ points[theta-1] = (d->widget->camera()->modelview() * (origin + points[theta-1]).homogeneous()).head<3>();
- }
-
- // Get vectors representing the points' positions in terms of the model view.
-- Eigen::Vector3d _origin = d->widget->camera()->modelview() * origin;
-- Eigen::Vector3d _direction1 = d->widget->camera()->modelview() * (origin+u);
-- Eigen::Vector3d _direction2 = d->widget->camera()->modelview() * (origin+v);
-+ Eigen::Vector3d _origin = (d->widget->camera()->modelview() * origin.homogeneous()).head<3>();
-+ Eigen::Vector3d _direction1 = (d->widget->camera()->modelview() * (origin+u).homogeneous()).head<3>();
-+ Eigen::Vector3d _direction2 = (d->widget->camera()->modelview() * (origin+v).homogeneous()).head<3>();
-
- glPushAttrib(GL_ALL_ATTRIB_BITS);
- glPushMatrix();
-@@ -880,12 +880,12 @@ namespace Avogadro
- } else {
- points[theta-1] = Eigen::AngleAxisd(theta * (M_PI / 180.0) / 2, n) * u;
- }
-- points[theta-1] = d->widget->camera()->modelview() * (origin + points[theta-1]);
-+ points[theta-1] = (d->widget->camera()->modelview() * (origin + points[theta-1]).homogeneous()).head<3>();
- }
-
- // Get vectors representing the points' positions in terms of the model view.
-- Eigen::Vector3d _direction1 = d->widget->camera()->modelview() * (origin + u);
-- Eigen::Vector3d _direction2 = d->widget->camera()->modelview() * (origin + v);
-+ Eigen::Vector3d _direction1 = (d->widget->camera()->modelview() * (origin + u).homogeneous()).head<3>();
-+ Eigen::Vector3d _direction2 = (d->widget->camera()->modelview() * (origin + v).homogeneous()).head<3>();
-
- glPushAttrib(GL_ALL_ATTRIB_BITS);
- glPushMatrix();
---- a/libavogadro/src/glwidget.cpp
-+++ b/libavogadro/src/glwidget.cpp
-@@ -765,7 +765,7 @@ namespace Avogadro {
- GLfloat fogColor[4]= {static_cast<GLfloat>(d->background.redF()), static_cast<GLfloat>(d->background.greenF()),
- static_cast<GLfloat>(d->background.blueF()), static_cast<GLfloat>(d->background.alphaF())};
- glFogfv(GL_FOG_COLOR, fogColor);
-- Vector3d distance = camera()->modelview() * d->center;
-+ Vector3d distance = (camera()->modelview() * d->center.homogeneous()).head<3>();
- double distanceToCenter = distance.norm();
- glFogf(GL_FOG_DENSITY, 1.0);
- glHint(GL_FOG_HINT, GL_NICEST);
-@@ -1711,7 +1711,7 @@ namespace Avogadro {
-
- if (d->renderModelViewDebug) {
- // Model view matrix:
-- const Eigen::Transform3d &modelview = d->camera->modelview();
-+ const Eigen::Projective3d &modelview = d->camera->modelview();
- y += d->pd->painter()->drawText
- (x, y, tr("ModelView row 1: %L1 %L2 %L3 %L4")
- .arg(modelview(0, 0), 6, 'f', 2, ' ')
---- a/libavogadro/src/molecule.cpp
-+++ b/libavogadro/src/molecule.cpp
-@@ -38,7 +38,7 @@
- #include "zmatrix.h"
-
- #include <Eigen/Geometry>
--#include <Eigen/LeastSquares>
-+#include <Eigen/Eigenvalues>
-
- #include <vector>
-
-@@ -1907,7 +1907,29 @@ namespace Avogadro{
- }
- d->center /= static_cast<double>(nAtoms);
- Eigen::Hyperplane<double, 3> planeCoeffs;
-- Eigen::fitHyperplane(numAtoms(), atomPositions, &planeCoeffs);
-+ //Eigen::fitHyperplane(numAtoms(), atomPositions, &planeCoeffs);
-+
-+ // TODO check if this is OK
-+ /************************/
-+ typedef Eigen::Matrix<double,3,3> CovMatrixType;
-+ typedef Eigen::Vector3d VectorType;
-+
-+ VectorType mean = d->center;
-+ int size=3;
-+ int numPoints=numAtoms();
-+ VectorType ** points=atomPositions;
-+ CovMatrixType covMat = CovMatrixType::Zero(size, size);
-+ VectorType remean = VectorType::Zero(size);
-+ for(int i = 0; i < numPoints; ++i)
-+ {
-+ VectorType diff = (*(points[i]) - mean).conjugate();
-+ covMat += diff * diff.adjoint();
-+ }
-+ Eigen::SelfAdjointEigenSolver<CovMatrixType> eig(covMat);
-+ planeCoeffs.normal() = eig.eigenvectors().col(0);
-+ /************************/
-+
-+
- delete[] atomPositions;
- d->normalVector = planeCoeffs.normal();
- }
---- a/libavogadro/src/navigate.cpp
-+++ b/libavogadro/src/navigate.cpp
-@@ -40,7 +40,7 @@ namespace Avogadro {
- void Navigate::zoom(GLWidget *widget, const Eigen::Vector3d &goal,
- double delta)
- {
-- Vector3d transformedGoal = widget->camera()->modelview() * goal;
-+ Vector3d transformedGoal = (widget->camera()->modelview() * goal.homogeneous()).head<3>();
- double distanceToGoal = transformedGoal.norm();
-
- double t = ZOOM_SPEED * delta;
---- a/libavogadro/src/tools/bondcentrictool.cpp
-+++ b/libavogadro/src/tools/bondcentrictool.cpp
-@@ -578,8 +578,8 @@ namespace Avogadro {
-
- Vector3d clicked = *m_clickedAtom->pos();
-
-- Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other).z() >=
-- (widget->camera()->modelview() * center).z() ? -1 : 1));
-+ Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other.homogeneous()).z() >=
-+ (widget->camera()->modelview() * center.homogeneous()).z() ? -1 : 1));
-
- Vector3d centerProj = widget->camera()->project(center);
- centerProj -= Vector3d(0,0,centerProj.z());
-@@ -673,8 +673,8 @@ namespace Avogadro {
-
- Vector3d clicked = *m_clickedAtom->pos();
-
-- Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other).z() >=
-- (widget->camera()->modelview() * center).z() ? -1 : 1));
-+ Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other.homogeneous()).z() >=
-+ (widget->camera()->modelview() * center.homogeneous()).z() ? -1 : 1));
-
- Vector3d centerProj = widget->camera()->project(center);
- centerProj -= Vector3d(0,0,centerProj.z());
-@@ -1362,10 +1362,10 @@ namespace Avogadro {
-
- planeVec = length * (planeVec / planeVec.norm());
-
-- Vector3d topLeft = widget->camera()->modelview() * (left + planeVec);
-- Vector3d topRight = widget->camera()->modelview() * (right + planeVec);
-- Vector3d botRight = widget->camera()->modelview() * (right - planeVec);
-- Vector3d botLeft = widget->camera()->modelview() * (left - planeVec);
-+ Vector3d topLeft = (widget->camera()->modelview() * (left + planeVec).homogeneous()).head<3>();
-+ Vector3d topRight = (widget->camera()->modelview() * (right + planeVec).homogeneous()).head<3>();
-+ Vector3d botRight = (widget->camera()->modelview() * (right - planeVec).homogeneous()).head<3>();
-+ Vector3d botLeft = (widget->camera()->modelview() * (left - planeVec).homogeneous()).head<3>();
-
- float alpha = 0.4;
- double lineWidth = 1.5;
-@@ -1444,10 +1444,10 @@ namespace Avogadro {
- C = D + ((C-D).normalized() * minWidth);
- }
-
-- Vector3d topLeft = widget->camera()->modelview() * D;
-- Vector3d topRight = widget->camera()->modelview() * C;
-- Vector3d botRight = widget->camera()->modelview() * B;
-- Vector3d botLeft = widget->camera()->modelview() * A;
-+ Vector3d topLeft = (widget->camera()->modelview() * D.homogeneous()).head<3>();
-+ Vector3d topRight = (widget->camera()->modelview() * C.homogeneous()).head<3>();
-+ Vector3d botRight = (widget->camera()->modelview() * B.homogeneous()).head<3>();
-+ Vector3d botLeft = (widget->camera()->modelview() * A.homogeneous()).head<3>();
-
- float alpha = 0.4;
- double lineWidth = 1.5;
-@@ -1506,12 +1506,12 @@ namespace Avogadro {
- Vector3d positionVector)
- {
- //Rotate skeleton around a particular axis and center point
-- Eigen::Transform3d rotation;
-+ Eigen::Projective3d rotation;
- rotation = Eigen::AngleAxisd(angle, rotationVector);
- rotation.pretranslate(centerVector);
- rotation.translate(-centerVector);
-
-- return rotation*positionVector;
-+ return (rotation*positionVector.homogeneous()).head<3>();
- }
-
- // ########## showAnglesChanged ##########
---- a/libavogadro/src/tools/manipulatetool.cpp
-+++ b/libavogadro/src/tools/manipulatetool.cpp
-@@ -40,7 +40,6 @@
- #include <QAbstractButton>
-
- using Eigen::Vector3d;
--using Eigen::Transform3d;
- using Eigen::AngleAxisd;
-
- namespace Avogadro {
-@@ -138,7 +137,7 @@ namespace Avogadro {
- double yRotate = m_settingsWidget->yRotateSpinBox->value() * DEG_TO_RAD;
- double zRotate = m_settingsWidget->zRotateSpinBox->value() * DEG_TO_RAD;
-
-- Eigen::Transform3d rotation;
-+ Eigen::Projective3d rotation;
- rotation.matrix().setIdentity();
- rotation.translation() = center;
- rotation.rotate(AngleAxisd(xRotate, Vector3d::UnitX())
-@@ -152,12 +151,12 @@ namespace Avogadro {
- if (p->type() == Primitive::AtomType) {
- Atom *atom = static_cast<Atom*>(p);
- tempPos = translate + *(atom->pos());
-- atom->setPos(rotation * tempPos);
-+ atom->setPos((rotation * tempPos.homogeneous()).head<3>());
- }
- } else {
- foreach(Atom *atom, widget->molecule()->atoms()) {
- tempPos = translate + *(atom->pos());
-- atom->setPos(rotation * tempPos);
-+ atom->setPos((rotation * tempPos.homogeneous()).head<3>());
- }
- }
-
-@@ -199,7 +198,7 @@ namespace Avogadro {
- widget->setCursor(Qt::SizeVerCursor);
-
- // Move the selected atom(s) in to or out of the screen
-- Vector3d transformedGoal = widget->camera()->modelview() * *goal;
-+ Vector3d transformedGoal = (widget->camera()->modelview() * goal->homogeneous()).head<3>();
- double distanceToGoal = transformedGoal.norm();
-
- double t = ZOOM_SPEED * delta;
-@@ -255,7 +254,7 @@ namespace Avogadro {
-
- // Rotate the selected atoms about the center
- // rotate only selected primitives
-- Transform3d fragmentRotation;
-+ Eigen::Projective3d fragmentRotation;
- fragmentRotation.matrix().setIdentity();
- fragmentRotation.translation() = *center;
- fragmentRotation.rotate(
-@@ -266,7 +265,7 @@ namespace Avogadro {
-
- foreach(Primitive *p, widget->selectedPrimitives())
- if (p->type() == Primitive::AtomType)
-- static_cast<Atom *>(p)->setPos(fragmentRotation * *static_cast<Atom *>(p)->pos());
-+ static_cast<Atom *>(p)->setPos((fragmentRotation * static_cast<Atom *>(p)->pos()->homogeneous()).head<3>());
- widget->molecule()->update();
- }
-
-@@ -274,7 +273,7 @@ namespace Avogadro {
- double delta) const
- {
- // Tilt the selected atoms about the center
-- Transform3d fragmentRotation;
-+ Eigen::Projective3d fragmentRotation;
- fragmentRotation.matrix().setIdentity();
- fragmentRotation.translation() = *center;
- fragmentRotation.rotate(AngleAxisd(delta * ROTATION_SPEED, widget->camera()->backTransformedZAxis()));
-@@ -282,7 +281,7 @@ namespace Avogadro {
-
- foreach(Primitive *p, widget->selectedPrimitives())
- if (p->type() == Primitive::AtomType)
-- static_cast<Atom *>(p)->setPos(fragmentRotation * *static_cast<Atom *>(p)->pos());
-+ static_cast<Atom *>(p)->setPos((fragmentRotation * static_cast<Atom *>(p)->pos()->homogeneous()).head<3>());
- widget->molecule()->update();
- }
-
---- a/libavogadro/src/tools/navigatetool.cpp
-+++ b/libavogadro/src/tools/navigatetool.cpp
-@@ -92,7 +92,8 @@ namespace Avogadro {
- double sumOfWeights = 0.;
- QList<Atom*> atoms = widget->molecule()->atoms();
- foreach (Atom *atom, atoms) {
-- Vector3d transformedAtomPos = widget->camera()->modelview() * *atom->pos();
-+ Vector3d transformedAtomPos = (widget->camera()->modelview() *
-+ atom->pos()->homogeneous()).head<3>();
- double atomDistance = transformedAtomPos.norm();
- double dot = transformedAtomPos.z() / atomDistance;
- double weight = exp(-30. * (1. + dot));
---- a/libavogadro/src/tools/skeletontree.cpp
-+++ b/libavogadro/src/tools/skeletontree.cpp
-@@ -29,6 +29,7 @@
- #include <avogadro/atom.h>
- #include <avogadro/bond.h>
- #include <avogadro/molecule.h>
-+#include <iostream>
-
- using namespace Eigen;
- using namespace std;
-@@ -221,7 +222,7 @@ namespace Avogadro {
- {
- if (m_rootNode) {
- //Rotate skeleton around a particular axis and center point
-- Eigen::Transform3d rotation;
-+ Eigen::Projective3d rotation;
- rotation = Eigen::AngleAxisd(angle, rotationAxis);
- rotation.pretranslate(centerVector);
- rotation.translate(-centerVector);
-@@ -248,11 +249,11 @@ namespace Avogadro {
- // ########## recursiveRotate ##########
-
- void SkeletonTree::recursiveRotate(Node* n,
-- const Eigen::Transform3d &rotationMatrix)
-+ const Eigen::Projective3d &rotationMatrix)
- {
- // Update the root node with the new position
- Atom* a = n->atom();
-- a->setPos(rotationMatrix * (*a->pos()));
-+ a->setPos((rotationMatrix * (*a->pos()).homogeneous()).head<3>());
- a->update();
-
- // Now update the children
---- a/libavogadro/src/tools/skeletontree.h
-+++ b/libavogadro/src/tools/skeletontree.h
-@@ -230,6 +230,6 @@ namespace Avogadro {
- * @param centerVector Center location to rotate around.
- */
- void recursiveRotate(Node* n,
-- const Eigen::Transform3d &rotationMatrix);
-+ const Eigen::Projective3d &rotationMatrix);
-
- };
- } // End namespace Avogadro
\ No newline at end of file
deleted file mode 100644
@@ -1,161 +0,0 @@
-From 2d4be7ede177a8df7340fe3b209698d591ee8a04 Mon Sep 17 00:00:00 2001
-From: Claudio Fernandes <claudiosf.claudio@gmail.com>
-Date: Mon, 16 Jan 2017 19:48:23 -0200
-Subject: [PATCH] Adapt libavogadro/python to Eigen 3.3
-
----
- libavogadro/src/python/camera.cpp | 2 +-
- libavogadro/src/python/eigen.cpp | 60 +++++++++++++++++++--------------------
- 2 files changed, 31 insertions(+), 31 deletions(-)
-
-diff --git a/libavogadro/src/python/camera.cpp b/libavogadro/src/python/camera.cpp
-index 69ca87bf8..30b32af7d 100644
---- a/libavogadro/src/python/camera.cpp
-+++ b/libavogadro/src/python/camera.cpp
-@@ -10,7 +10,7 @@ using namespace Avogadro;
- void export_Camera()
- {
-
-- const Eigen::Transform3d& (Camera::*modelview_ptr)() const = &Camera::modelview;
-+ const Eigen::Projective3d& (Camera::*modelview_ptr)() const = &Camera::modelview;
- Eigen::Vector3d (Camera::*unProject_ptr1)(const Eigen::Vector3d&) const = &Camera::unProject;
- Eigen::Vector3d (Camera::*unProject_ptr2)(const QPoint&, const Eigen::Vector3d&) const = &Camera::unProject;
- Eigen::Vector3d (Camera::*unProject_ptr3)(const QPoint&) const = &Camera::unProject;
-diff --git a/libavogadro/src/python/eigen.cpp b/libavogadro/src/python/eigen.cpp
-index c1faedbcc..20b4e719d 100644
---- a/libavogadro/src/python/eigen.cpp
-+++ b/libavogadro/src/python/eigen.cpp
-@@ -305,9 +305,9 @@ template <> struct ScalarTraits<double>
- struct innerclass
- {
- //
-- // Eigen::Transform3d --> python array (4x4)
-+ // Eigen::Projective3d --> python array (4x4)
- //
-- static PyObject* convert(Eigen::Transform3d const &trans)
-+ static PyObject* convert(Eigen::Projective3d const &trans)
- {
- npy_intp dims[2] = { 4, 4 };
- PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE);
-@@ -321,9 +321,9 @@ template <> struct ScalarTraits<double>
- return incref(result);
- }
- //
-- // Eigen::Transform3d* --> python array (4x4)
-+ // Eigen::Projective3d* --> python array (4x4)
- //
-- static PyObject* convert(Eigen::Transform3d *trans)
-+ static PyObject* convert(Eigen::Projective3d *trans)
- {
- npy_intp dims[2] = { 4, 4 };
- PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE);
-@@ -337,9 +337,9 @@ template <> struct ScalarTraits<double>
- return incref(result);
- }
- //
-- // const Eigen::Transform3d* --> python array (4x4)
-+ // const Eigen::Projective3d* --> python array (4x4)
- //
-- static PyObject* convert(const Eigen::Transform3d *trans)
-+ static PyObject* convert(const Eigen::Projective3d *trans)
- {
- npy_intp dims[2] = { 4, 4 };
- PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE);
-@@ -358,10 +358,10 @@ template <> struct ScalarTraits<double>
- Transform3d_to_python_array()
- {
- #ifndef WIN32
-- to_python_converter<Eigen::Transform3d, innerclass>();
-+ to_python_converter<Eigen::Projective3d, innerclass>();
- #endif
-- to_python_converter<Eigen::Transform3d*, innerclass>();
-- to_python_converter<const Eigen::Transform3d*, innerclass>();
-+ to_python_converter<Eigen::Projective3d*, innerclass>();
-+ to_python_converter<const Eigen::Projective3d*, innerclass>();
- }
-
- };
-@@ -373,17 +373,17 @@ template <> struct ScalarTraits<double>
- // Insert an rvalue from_python converter at the tail of the
- // chain. Used for implicit conversions
- //
-- // python array --> Eigen::Transform3d
-+ // python array --> Eigen::Projective3d
- //
- // used for:
- //
-- // void function(Eigen::Transform3d vec)
-- // void function(Eigen::Transform3d & vec)
-- // void function(const Eigen::Transform3d & vec)
-+ // void function(Eigen::Projective3d vec)
-+ // void function(Eigen::Projective3d & vec)
-+ // void function(const Eigen::Projective3d & vec)
- //
-- converter::registry::push_back( &convertible, &construct, type_id<Eigen::Transform3d>() );
-+ converter::registry::push_back( &convertible, &construct, type_id<Eigen::Projective3d>() );
-
-- converter::registry::insert( &convert, type_id<Eigen::Transform3d>() );
-+ converter::registry::insert( &convert, type_id<Eigen::Projective3d>() );
- }
-
- static void* convert(PyObject *obj_ptr)
-@@ -401,7 +401,7 @@ template <> struct ScalarTraits<double>
- throw_error_already_set(); // the 1D array does not have exactly 3 elements
-
- double *values = reinterpret_cast<double*>(array->data);
-- Eigen::Transform3d *c_obj = new Eigen::Transform3d();
-+ Eigen::Projective3d *c_obj = new Eigen::Projective3d();
- double *dataPtr = c_obj->data();
-
- for (int i = 0; i < 16; ++i)
-@@ -432,7 +432,7 @@ template <> struct ScalarTraits<double>
- // I think this is a better way to get at the double array, where is this
- // deleted though? Does Boost::Python do it?
- double *values = reinterpret_cast<double*>(array->data);
-- Eigen::Transform3d *storage = new Eigen::Transform3d();
-+ Eigen::Projective3d *storage = new Eigen::Projective3d();
- double *dataPtr = storage->data();
-
- for (int i = 0; i < 16; ++i)
-@@ -467,21 +467,21 @@ class EigenUnitTestHelper
- void set_vector3d_ptr(Eigen::Vector3d* vec) { m_vector3d = *vec; }
- void set_const_vector3d_ptr(const Eigen::Vector3d* const vec) { m_vector3d = *vec; }
-
-- //Eigen::Transform3d transform3d() { return m_transform3d; }
-- //Eigen::Transform3d& transform3d_ref() { return m_transform3d; }
-- const Eigen::Transform3d& const_transform3d_ref() { return m_transform3d; }
-- Eigen::Transform3d* transform3d_ptr() { return &m_transform3d; }
-- const Eigen::Transform3d* const_transform3d_ptr() { return &m_transform3d; }
--
-- //void set_transform3d(Eigen::Transform3d vec) { m_transform3d = vec; }
-- //void set_transform3d_ref(Eigen::Transform3d& vec) { m_transform3d = vec; }
-- void set_const_transform3d_ref(const Eigen::Transform3d& vec) { m_transform3d = vec; }
-- void set_transform3d_ptr(Eigen::Transform3d* vec) { m_transform3d = *vec; }
-- void set_const_transform3d_ptr(const Eigen::Transform3d* const vec) { m_transform3d = *vec; }
-+ //Eigen::Projective3d transform3d() { return m_transform3d; }
-+ //Eigen::Projective3d& transform3d_ref() { return m_transform3d; }
-+ const Eigen::Projective3d& const_transform3d_ref() { return m_transform3d; }
-+ Eigen::Projective3d* transform3d_ptr() { return &m_transform3d; }
-+ const Eigen::Projective3d* const_transform3d_ptr() { return &m_transform3d; }
-+
-+ //void set_transform3d(Eigen::Projective3d vec) { m_transform3d = vec; }
-+ //void set_transform3d_ref(Eigen::Projective3d& vec) { m_transform3d = vec; }
-+ void set_const_transform3d_ref(const Eigen::Projective3d& vec) { m_transform3d = vec; }
-+ void set_transform3d_ptr(Eigen::Projective3d* vec) { m_transform3d = *vec; }
-+ void set_const_transform3d_ptr(const Eigen::Projective3d* const vec) { m_transform3d = *vec; }
-
- private:
- Eigen::Vector3d m_vector3d;
-- Eigen::Transform3d m_transform3d;
-+ Eigen::Projective3d m_transform3d;
-
- };
- #endif
-@@ -529,6 +529,6 @@ void export_Eigen()
- Vector3x_to_python_array<Eigen::Vector3i>();
- Vector3x_from_python_array<Eigen::Vector3i>();
-
-- // Eigen::Transform3d
-+ // Eigen::Projective3d
- Transform3d_to_python_array();
- Transform3d_from_python_array();
deleted file mode 100644
@@ -1,212 +0,0 @@
-Description: Debian patches to make tipp10 compile
-Author: Christoph Martin <chrism@debian.org>
-Last-Update: 2016-07-20
-
-https://sources.debian.net/data/main/t/tipp10/2.1.0-2/debian/patches/0001-FixCompiling
-
---- a/widget/tickerboard.cpp
-+++ b/widget/tickerboard.cpp
-@@ -97,7 +97,8 @@ void TickerBoard::startTicker(bool wasPa
-
- if (tickerSpeed == 50) {
- scrollOffset = 290;
-- scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ const QRect qr = QRect(10, 15, 590, 35);
-+ scroll(-290, 0, qr); //contentsRect());
- }
-
- startFlag = true;
-@@ -153,7 +154,8 @@ void TickerBoard::changeChar() {
- scrollOffset = 0;
- } else {
- scrollOffset = 290;
-- scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ const QRect qr = QRect(10, 15, 590, 35);
-+ scroll(-290, 0, qr); //contentsRect());
- }
- splitLesson();
- }
-@@ -242,7 +244,8 @@ void TickerBoard::progress() {
-
- // Move ticker 1 pixel to left
- scrollOffset++;
-- scroll(-1, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ const QRect qr = QRect(10, 15, 590, 35);
-+ scroll(-1, 0, qr); //contentsRect());
-
- if ((lessonOffset - scrollOffset) <= 30) {
- setSpeed(tickerSpeed);
-@@ -265,14 +268,16 @@ void TickerBoard::progress() {
- // 160 pixels overage (because the user must see at least the next word)
- if ((lessonOffset - scrollOffset) > 200) {
- scrollOffset += (lessonOffset - scrollOffset) - 200;
-- scroll(-((lessonOffset - scrollOffset) - 200), 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ const QRect qr = QRect(10, 15, 590, 35);
-+ scroll(-((lessonOffset - scrollOffset) - 200), 0, qr); //contentsRect());
- }
- } else {
- // If the user types faster than the ticker, move ticker faster after
- // 160 pixels overage (because the user must see at least the next word)
- if ((lessonOffset - scrollOffset) > 280) {
- scrollOffset += 570;
-- scroll(-570, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ const QRect qr = QRect(10, 15, 590, 35);
-+ scroll(-570, 0, qr); //contentsRect());
- }
-
- }
---- a/widget/settingspages.cpp
-+++ b/widget/settingspages.cpp
-@@ -501,7 +501,7 @@ void DatabasePage::writeSettings() {
- QSettings settings;
- #endif
- settings.beginGroup("database");
-- settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString::QString(APP_USER_DB));
-+ settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString(APP_USER_DB));
- settings.endGroup();
- }
-
---- a/widget/lessondialog.cpp
-+++ b/widget/lessondialog.cpp
-@@ -89,7 +89,7 @@ void LessonDialog::updateContent() {
- *lessonData = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
- // Delete empty lines
- for (int i = 0; i < lessonData->size(); i++) {
-- if (QString::QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
-+ if (QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
- lessonData->removeAt(i);
- }
- }
-@@ -259,7 +259,7 @@ void LessonDialog::clickSave() {
- contentList = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
- // Delete empty lines
- for (i = 0; i < contentList.size(); i++) {
-- if (QString::QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
-+ if (QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
- contentList.removeAt(i);
- }
- }
---- a/sql/chartablesql.cpp
-+++ b/sql/chartablesql.cpp
-@@ -57,7 +57,7 @@ QVariant CharSqlModel::data(const QModel
- // Read the unicode value
- unicode = value.toInt();
- // Convert unicode to a char
-- unicodeToChar = QString::QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
-+ unicodeToChar = QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
- return unicodeToChar;
- } else {
- // Last column (error weight)
---- a/sql/startsql.cpp
-+++ b/sql/startsql.cpp
-@@ -344,7 +344,7 @@ bool StartSql::updateOwnLesson(QString l
- for (i = 0; i < content.size(); i++) {
- //simplifiedContent = QString::QString(
- // content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive).simplified();
-- simplifiedContent = trim(QString::QString(
-+ simplifiedContent = trim(QString(
- content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive));
-
- if (!query.exec("INSERT INTO own_content VALUES(NULL,'" +
---- a/def/defines.h
-+++ b/def/defines.h
-@@ -27,9 +27,9 @@ Foundation, Inc., 51 Franklin Street, Fi
- #define DEFINES_H
-
- // OS constants
--#define APP_WIN true
-+#define APP_WIN false
- #define APP_MAC false
--#define APP_X11 false
-+#define APP_X11 true
- #define APP_PORTABLE false //at least one of the 3 OS must be true too!
-
- // Languages
-@@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fi
- #define APP_URL "http://www.tipp10.com"
- #define APP_DB "tipp10v2.template"
- #define APP_USER_DB "tipp10v2.db"
-+#define APP_SHARE_DIR "/usr/share/tipp10"
-
- // Update constants
- #define UPDATE_URL "www.tipp10.com"
---- a/tipp10.pro
-+++ b/tipp10.pro
-@@ -88,3 +88,15 @@ SOURCES += main.cpp \
- sql/startsql.cpp \
- games/abcrainwidget.cpp \
- games/charball.cpp
-+
-+target.path = /usr/bin/
-+INSTALLS += target
-+share.path = /usr/share/tipp10/
-+share.files = release/* *wav
-+INSTALLS += share
-+desktop.path = /usr/share/applications/
-+desktop.files = tipp10.desktop
-+INSTALLS += desktop
-+pixmap.path = /usr/share/pixmaps/
-+pixmap.files = tipp10.png
-+INSTALLS += pixmap
---- a/sql/connection.h
-+++ b/sql/connection.h
-@@ -179,11 +179,13 @@ static bool createConnection() {
- CANCEL_NO, "Betroffener Pfad:\n" + dbPath);*/
- // Try to create new databae in user path
- // Exist a database in the program dir?
-- if (QFile::exists(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate)) {
-+ // if (QFile::exists(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate)) {
-+ if (QFile::exists(QString(APP_SHARE_DIR) + "/" + dbNameTemplate)) {
- //if (QFile::exists(":/" + dbNameTemplate)) {
- // A database exist in the program dir
- // -> copy database to user home dir
-- QFile file(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate);
-+ // QFile file(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate);
-+ QFile file(QString(APP_SHARE_DIR) + "/" + dbNameTemplate);
- //QFile file(":/" + dbNameTemplate);
- if (file.copy(dbPath)) {
- QFile::setPermissions(dbPath, QFile::permissions(dbPath) | QFile::WriteUser);
-@@ -229,7 +231,8 @@ static bool createConnection() {
- // Exist a database in user's home dir?
- if (!QFile::exists(dbPath)) {
- // Exist a database template in the program dir?
-- dbPath = QCoreApplication::applicationDirPath() + "/" + dbNameTemplate;
-+ // dbPath = QCoreApplication::applicationDirPath() + "/" + dbNameTemplate;
-+ dbPath = QString(APP_SHARE_DIR) + "/" + dbNameTemplate;
- //dbPath = ":/" + dbNameTemplate;
- if (QFile::exists(dbPath)) {
- // A database template exist in the program dir
---- a/widget/helpbrowser.cpp
-+++ b/widget/helpbrowser.cpp
-@@ -52,13 +52,15 @@ HelpBrowser::HelpBrowser(QString link, Q
- textBrowser->setOpenExternalLinks(true);
-
- textBrowser->setSource(QString("file:///") +
-- QCoreApplication::applicationDirPath() +
-+ // QCoreApplication::applicationDirPath() +
-+ APP_SHARE_DIR +
- QString("/help/") + language + QString("/index.html"));
-
- if (link != "") {
-
- textBrowser->setSource(QString("file:///") +
-- QCoreApplication::applicationDirPath() +
-+ // QCoreApplication::applicationDirPath() +
-+ APP_SHARE_DIR +
- QString("/help/") + language + QString("/content/") + link);
-
- }
---- a/tipp10.desktop
-+++ b/tipp10.desktop
-@@ -1,10 +1,10 @@
- [Desktop Entry]
--Encoding=UTF-8
- Name=TIPP10
- Comment=Touch Typing Tutor
- Comment[de]=10-Finger-Schreibtrainer
- Exec=tipp10
- Icon=tipp10.png
- Terminal=false
- Type=Application
- Categories=Education;
-+Keywords=learning;touchtyping
deleted file mode 100644
@@ -1,332 +0,0 @@
-Description: Remove license dialog and license key checking
-
-https://sources.debian.net/data/main/t/tipp10/2.1.0-2/debian/patches/0002-RemoveLicenseCode
-
---- a/main.cpp
-+++ b/main.cpp
-@@ -33,7 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fi
- #include "def/defines.h"
- #include "sql/connection.h"
- #include "widget/mainwindow.h"
--#include "widget/licensedialog.h"
- #include "widget/illustrationdialog.h"
-
- int main(int argc, char *argv[]) {
-@@ -59,7 +58,7 @@ int main(int argc, char *argv[]) {
- QSettings settings;
- #endif
-
-- // Read/write language, license key and show illustration flag
-+ // Read/write language and show illustration flag
- settings.beginGroup("general");
- QString languageGui = settings.value("language_gui",
- QLocale::system().name()).toString();
-@@ -101,7 +100,6 @@ int main(int argc, char *argv[]) {
- QString languageLesson = settings.value("language_lesson",
- "").toString();
-
-- QString licenseKey = settings.value("licensekey", "").toString();
- bool showIllustration = settings.value("check_illustration", true).toBool();
- bool useNativeStyle = settings.value("check_native_style", false).toBool();
- settings.endGroup();
---- a/tipp10.pro
-+++ b/tipp10.pro
-@@ -43,7 +43,6 @@ HEADERS += def/defines.h \
- widget/helpbrowser.h \
- widget/companylogo.h \
- widget/errormessage.h \
-- widget/licensedialog.h \
- widget/txtmessagedialog.h \
- widget/checkversion.h \
- sql/connection.h \
-@@ -78,7 +77,6 @@ SOURCES += main.cpp \
- widget/helpbrowser.cpp \
- widget/companylogo.cpp \
- widget/errormessage.cpp \
-- widget/licensedialog.cpp \
- widget/txtmessagedialog.cpp \
- widget/checkversion.cpp \
- sql/lessontablesql.cpp \
---- a/widget/licensedialog.cpp
-+++ /dev/null
-@@ -1,168 +0,0 @@
--/*
--Copyright (c) 2006-2009, Tom Thielicke IT Solutions
--
--This program 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 2
--of the License.
--
--This program 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 this program; if not, write to the Free Software
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
--02110-1301, USA.
--*/
--
--/****************************************************************
--**
--** Implementation of the LicenseDialog class
--** File name: licensedialog.cpp
--**
--****************************************************************/
--
--#include <QHBoxLayout>
--#include <QVBoxLayout>
--#include <QMessageBox>
--#include <QSettings>
--#include <QCoreApplication>
--
--#include "licensedialog.h"
--#include "def/defines.h"
--
--LicenseDialog::LicenseDialog(QWidget *parent) : QDialog(parent) {
--
-- setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
--
-- setWindowTitle(tr("Lizenznummer"));
-- setWindowIcon(QIcon(":/img/" + QString(ICON_FILENAME)));
--
-- // Create texbox
-- createLineEdit();
--
-- // Create buttons
-- createButtons();
--
-- // Set the layout of all widgets created above
-- createLayout();
--
-- lineLicensing->setFocus();
--}
--
--void LicenseDialog::createButtons() {
-- //Buttons
-- buttonOk = new QPushButton(this);
-- buttonDemo = new QPushButton(this);
--
-- buttonOk->setText(tr("&Ok"));
-- buttonDemo->setText(tr("&Demo starten"));
-- buttonDemo->setToolTip(tr("Im Demo-Modus koennen pro Lektion nur\n"
-- "10 Schriftzeichen eingegeben werden"));
--
-- buttonOk->setDefault(true);
-- // Widget connections
-- connect(buttonOk, SIGNAL(clicked()), this, SLOT(clickOk()));
-- connect(buttonDemo, SIGNAL(clicked()), this, SLOT(clickDemo()));
--}
--
--void LicenseDialog::createLineEdit() {
--
-- lineLicensing = new QLineEdit();
-- lineLicensing->setInputMask(">NNNNNNNNNNNNNN");
--
-- labelLicensing = new QLabel(tr("Bitte geben Sie Ihre Lizenznummer "
-- "(ohne Leerzeichen) ein, "
-- "die Sie im Arbeitsbuch (Schulbuch) auf Seite 3 finden:"));
--
-- labelLicensing->setWordWrap(true);
--}
--
--void LicenseDialog::createLayout() {
-- // Button layout horizontal
-- QHBoxLayout *buttonLayoutHorizontal = new QHBoxLayout;
-- buttonLayoutHorizontal->addStretch(1);
-- buttonLayoutHorizontal->addWidget(buttonDemo);
-- buttonLayoutHorizontal->addWidget(buttonOk);
-- // Full layout of all widgets vertical
-- QVBoxLayout *mainLayout = new QVBoxLayout;
-- mainLayout->addSpacing(1);
-- mainLayout->addWidget(labelLicensing);
-- mainLayout->addSpacing(1);
-- mainLayout->addWidget(lineLicensing);
-- mainLayout->addSpacing(1);
-- mainLayout->addLayout(buttonLayoutHorizontal);
-- mainLayout->setMargin(15);
-- mainLayout->setSpacing(15);
-- // Pass layout to parent widget (this)
-- this->setLayout(mainLayout);
--}
--
--void LicenseDialog::clickOk() {
--
-- // Check license key
-- if (!checkLicenseKey(lineLicensing->text())) {
--
-- // License key is wrong
--
-- // Message to the user
-- QMessageBox::information(0, APP_NAME,
-- tr("Die eingegebene Lizenznummer ist leider nicht "
-- "korrekt.\nBitte ueberpruefen Sie die Schreibweise."));
--
-- lineLicensing->setFocus();
--
-- } else {
--
-- // License key is ok
-- writeSettings();
-- accept();
-- }
--}
--
--void LicenseDialog::clickDemo() {
-- accept();
--}
--
--bool LicenseDialog::checkLicenseKey(QString licenseKey) {
-- if (licenseKey.size() == 14 &&
-- licenseKey[0].isLetter() &&
-- licenseKey[1].isLetter() &&
-- (licenseKey.mid(2, 2) == "39" ||
-- licenseKey.mid(2, 2) == "41" ||
-- licenseKey.mid(2, 2) == "43" ||
-- licenseKey.mid(2, 2) == "49" ||
-- licenseKey.mid(2, 2) == "99") &&
-- licenseKey[4].isDigit() &&
-- licenseKey[5].isDigit() &&
-- licenseKey[6].isDigit() &&
-- licenseKey[7].isLetter() &&
-- licenseKey[8].isDigit() &&
-- licenseKey[9].isDigit() &&
-- licenseKey[10].isDigit() &&
-- licenseKey[11].isDigit() &&
-- licenseKey[12].isLetter() &&
-- licenseKey[13].isLetter()) {
--
-- return true;
-- }
-- return false;
--}
--
--void LicenseDialog::writeSettings() {
-- // Saves settings of the startwiget
-- // (uses the default constructor of QSettings, passing
-- // the application and company name see main function)
-- #if APP_PORTABLE
-- QSettings settings(QCoreApplication::applicationDirPath() +
-- "/portable/settings.ini", QSettings::IniFormat);
-- #else
-- QSettings settings;
-- #endif
--
-- settings.beginGroup("general");
-- settings.setValue("licensekey", lineLicensing->text());
-- settings.endGroup();
--}
---- a/widget/licensedialog.h
-+++ /dev/null
-@@ -1,85 +0,0 @@
--/*
--Copyright (c) 2006-2009, Tom Thielicke IT Solutions
--
--This program 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 2
--of the License.
--
--This program 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 this program; if not, write to the Free Software
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
--02110-1301, USA.
--*/
--
--/****************************************************************
--**
--** Definition of the LicenseDialog class
--** File name: licensedialog.h
--**
--****************************************************************/
--
--#ifndef LICENSEDIALOG_H
--#define LICENSEDIALOG_H
--
--#include <QDialog>
--#include <QWidget>
--#include <QPushButton>
--#include <QLabel>
--#include <QLineEdit>
--#include <QString>
--
--//! The LicenseDialog class provides a license input widget.
--/*!
-- The LicenseDialog class shows a dialog to enter a license key.
--
-- @author Tom Thielicke, s712715
-- @version 0.0.1
-- @date 09.09.2008
--*/
--class LicenseDialog : public QDialog {
-- Q_OBJECT
--
-- public:
--
-- //! Constructor, creates two table objects and provide it in two tabs.
-- LicenseDialog(QWidget *parent = 0);
--
-- bool checkLicenseKey(QString licenseKey);
--
-- public slots:
--
-- private slots:
--
-- //! Start button pressed
-- void clickOk();
--
-- //! Demo button pressed
-- void clickDemo();
--
-- private:
--
-- //! Creates a cancel and a ok button.
-- void createButtons();
--
-- //! Creates a textbox.
-- void createLineEdit();
--
-- //! Creates the layout of the complete class.
-- void createLayout();
--
-- //! Writes user settings
-- void writeSettings();
--
-- QPushButton *buttonOk;
-- QPushButton *buttonDemo;
-- QLabel *labelLicensing;
-- QLineEdit *lineLicensing;
--};
--
--#endif //LICENSEDIALOG_H
---- a/widget/mainwindow.cpp
-+++ b/widget/mainwindow.cpp
-@@ -116,11 +116,6 @@ void MainWindow::closeEvent(QCloseEvent
- }
- }
-
--bool MainWindow::checkLicenseKey(QString licenseKey) {
--
-- return false;
--}
--
- void MainWindow::createMenu() {
- //Mac-Version:
- //-----------
---- a/widget/mainwindow.h
-+++ b/widget/mainwindow.h
-@@ -39,7 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fi
- #include "trainingwidget.h"
- #include "evaluationwidget.h"
- #include "illustrationdialog.h"
--#include "licensedialog.h"
- #include "games/abcrainwidget.h"
- #include "helpbrowser.h"
-
@@ -251,13 +251,6 @@ When present, Poppler is able to correctly render CJK and Cyrillic text.")
(license (list license:bsd-3
license:gpl2))))
-(define-public poppler-qt4
- (package/inherit poppler
- (name "poppler-qt4")
- (inputs `(("qt-4" ,qt-4)
- ,@(package-inputs poppler)))
- (synopsis "Qt4 frontend for the Poppler PDF rendering library")))
-
(define-public poppler-qt5
(package/inherit poppler
(name "poppler-qt5")
@@ -139,210 +139,6 @@ other text such as code. The syntax uses the syntax of the Django template
system, and the core design of Django is reused in Grantlee.")
(license license:lgpl2.1+)))
-(define-public qt-4
- (package
- (name "qt")
- (version "4.8.7")
- (source (origin
- (method url-fetch)
- (uri (string-append "http://download.qt-project.org/archive/qt/"
- (string-copy version 0 (string-rindex version #\.))
- "/" version
- "/qt-everywhere-opensource-src-"
- version ".tar.gz"))
- (sha256
- (base32
- "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
- (patches (search-patches "qt4-ldflags.patch"))
- (modules '((guix build utils)))
- (snippet
- ;; Remove webkit module, which is not built.
- '(begin (delete-file-recursively "src/3rdparty/webkit")
- #t))))
- (build-system gnu-build-system)
- (propagated-inputs
- `(("mesa" ,mesa)))
- (inputs
- `(("alsa-lib" ,alsa-lib)
- ("bluez" ,bluez)
- ("cups" ,cups)
- ("dbus" ,dbus)
- ("double-conversion" ,double-conversion)
- ("expat" ,expat)
- ("fontconfig" ,fontconfig)
- ("freetype" ,freetype)
- ("glib" ,glib)
- ("gstreamer" ,gstreamer)
- ("gst-plugins-base" ,gst-plugins-base)
- ("icu4c" ,icu4c)
- ("jasper" ,jasper)
- ("libinput" ,libinput-minimal)
- ("libmng" ,libmng)
- ("libpci" ,pciutils)
- ("libpng" ,libpng)
- ("libtiff" ,libtiff)
- ("libwebp" ,libwebp)
- ("libx11" ,libx11)
- ("libxcomposite" ,libxcomposite)
- ("libxcursor" ,libxcursor)
- ("libxext" ,libxext)
- ("libxfixes" ,libxfixes)
- ("libxi" ,libxi)
- ("libxinerama" ,libxinerama)
- ("libxkbcommon" ,libxkbcommon)
- ("libxml2" ,libxml2)
- ("libxrandr" ,libxrandr)
- ("libxrender" ,libxrender)
- ("libxslt" ,libxslt)
- ("libxtst" ,libxtst)
- ("mtdev" ,mtdev)
- ("mariadb-dev" ,mariadb "dev")
- ("nss" ,nss)
- ("postgresql" ,postgresql)
- ("pulseaudio" ,pulseaudio)
- ("pcre2" ,pcre2)
- ("sqlite" ,sqlite)
- ("udev" ,eudev)
- ("unixodbc" ,unixodbc)
- ("wayland" ,wayland)
- ("xcb-util" ,xcb-util)
- ("xcb-util-image" ,xcb-util-image)
- ("xcb-util-keysyms" ,xcb-util-keysyms)
- ("xcb-util-renderutil" ,xcb-util-renderutil)
- ("xcb-util-wm" ,xcb-util-wm)
- ("zlib" ,zlib)
- ("libjpeg" ,libjpeg-turbo)
- ("libsm" ,libsm)
- ("openssl" ,openssl-1.0)))
- (native-inputs
- `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
- ;; We could build it with -std=gnu++98, but then we'll get in trouble with
- ;; ICU later. Just keep using GCC 5 for now.
- ("gcc@5" ,gcc-5)
- ("bison" ,bison)
- ("flex" ,flex)
- ("gperf" ,gperf)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
- ("python" ,python-2)
- ("ruby" ,ruby)
- ("which" ,(@ (gnu packages base) which))))
- ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
- ;; but we can't make them a separate output because "out" and "examples"
- ;; would refer to each other.
- (outputs '("out" ;112MiB core + 37MiB examples
- "doc")) ;280MiB of HTML + code
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'set-paths 'hide-default-gcc
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((gcc (assoc-ref inputs "gcc")))
- ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
- ;; conflicts with the GCC 5 input.
- (setenv "CPLUS_INCLUDE_PATH"
- (string-join
- (delete (string-append gcc "/include/c++")
- (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
- ":"))
- #t)))
- (replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (substitute* '("configure")
- (("/bin/pwd") (which "pwd")))
- (substitute* "src/corelib/global/global.pri"
- (("/bin/ls") (which "ls")))
-
- (invoke
- "./configure"
- "-verbose"
- "-prefix" out
- "-nomake" "examples demos"
- ;; Note: Don't pass '-docdir' since 'qmake' and
- ;; libQtCore would record its value, thereby defeating
- ;; the whole point of having a separate output.
- "-datadir" (string-append out "/share/qt-" ,version
- "/data")
- "-importdir" (string-append out "/lib/qt-4"
- "/imports")
- "-plugindir" (string-append out "/lib/qt-4"
- "/plugins")
- "-translationdir" (string-append out "/share/qt-" ,version
- "/translations")
- "-demosdir" (string-append out "/share/qt-" ,version
- "/demos")
- "-examplesdir" (string-append out "/share/qt-" ,version
- "/examples")
- "-opensource"
- "-confirm-license"
- ;; explicitly link with dbus instead of dlopening it
- "-dbus-linked"
- ;; Skip the webkit module; it fails to build on armhf
- ;; and, apart from that, may pose security risks.
- "-no-webkit"
- ;; don't use the precompiled headers
- "-no-pch"
- ;; drop special machine instructions not supported
- ;; on all instances of the target
- ,@(if (string-prefix? "x86_64"
- (or (%current-target-system)
- (%current-system)))
- '()
- '("-no-mmx"
- "-no-3dnow"
- "-no-sse"
- "-no-sse2"))
- "-no-sse3"
- "-no-ssse3"
- "-no-sse4.1"
- "-no-sse4.2"
- "-no-avx"))))
- (add-after
- 'install 'move-doc
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Because of qt4-documentation-path.patch, documentation ends up
- ;; being installed in OUT. Move it to the right place.
- (let* ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc"))
- (olddoc (string-append out "/doc"))
- (docdir (string-append doc "/share/doc/qt-" ,version)))
- (mkdir-p (dirname docdir))
-
- ;; Note: We can't use 'rename-file' here because OUT and DOC are
- ;; different "devices" due to bind-mounts.
- (copy-recursively olddoc docdir)
- (delete-file-recursively olddoc)
- #t))))))
- (native-search-paths
- (list (search-path-specification
- (variable "QMAKEPATH")
- (files '("lib/qt5")))
- (search-path-specification
- (variable "QML2_IMPORT_PATH")
- (files '("lib/qt5/qml")))
- (search-path-specification
- (variable "QT_PLUGIN_PATH")
- (files '("lib/qt5/plugins")))
- (search-path-specification
- (variable "XDG_DATA_DIRS")
- (files '("share")))
- (search-path-specification
- (variable "XDG_CONFIG_DIRS")
- (files '("etc/xdg")))))
- (home-page "https://www.qt.io/")
- (synopsis "Cross-platform GUI library")
- (description "Qt is a cross-platform application and UI framework for
-developers using C++ or QML, a CSS & JavaScript like language.")
- (license (list license:lgpl2.1 license:lgpl3))
-
- ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
- ;; see <http://hydra.gnu.org/build/112828>.
- ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
- (supported-systems (delete "mips64el-linux" %supported-systems))))
-
(define-public qtbase
(package
(name "qtbase")
@@ -2223,53 +2019,6 @@ itself.")
("qtwebchannel" ,qtwebchannel)
("qtwebengine" ,qtwebengine)))))
-(define-public python2-pyqt-4
- (package (inherit python-pyqt)
- (name "python2-pyqt")
- (version "4.12.3")
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append "mirror://sourceforge/pyqt/PyQt4/"
- "PyQt-" version "/PyQt4_gpl_x11-"
- version ".tar.gz"))
- (sha256
- (base32
- "0wnlasg62rm5d39nq1yw4namcx2ivxgzl93r5f2vb9s0yaz5l3x0"))))
- (native-inputs
- `(("qt" ,qt-4)))
- (inputs `(("python" ,python-2)))
- (propagated-inputs
- `(("python-sip" ,python2-sip)))
- (arguments
- `(#:tests? #f ; no check target
- #:modules ((srfi srfi-1)
- ,@%gnu-build-system-modules)
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (sip (string-append out "/share/sip"))
- (python (assoc-ref inputs "python"))
- (python-version
- (last (string-split python #\-)))
- (python-major+minor
- (string-join
- (take (string-split python-version #\.) 2)
- "."))
- (lib (string-append out "/lib/python"
- python-major+minor
- "/site-packages")))
- (invoke "python" "configure.py"
- "--confirm-license"
- "--bindir" bin
- "--destdir" lib
- "--sipdir" sip)))))))
- (license (list license:gpl2 license:gpl3)))) ; choice of either license
-
(define-public python-qtpy
(package
(name "python-qtpy")