OPEN-SOURCE NOTICES — PrivacyFirst Photo Organizer
=============================================

This application includes open-source libraries. Most are used under
permissive licences (MIT, Apache 2.0, BSD) that ask only for attribution,
and the complete inventory of every component, its licence and its required
attribution is shown inside the application, on the About page.

This file covers the components licensed under the GNU Lesser General Public
License version 3 (LGPL-3.0), and the parts of the GNU Compiler Collection
(GCC) that come with this application's numerical libraries, because those
licences ask us to tell you some specific things and to make an offer to you.
They are set out below.


1. THE LGPL-3.0 COMPONENTS INCLUDED IN THIS APPLICATION
-------------------------------------------------------

  Qt, PySide6 and shiboken6 — version 6.11.1
      The graphical user interface.
      Copyright (C) The Qt Company Ltd. and other Qt contributors.
      https://www.qt.io/  ·  https://doc.qt.io/qtforpython/

  libheif — version 1.19.7
      Reading HEIC/HEIF photographs (the format iPhones use). Reaches this
      application through the pi-heif package, whose own code is BSD-3-Clause
      but whose binary distribution is LGPL-3.0 because of this library.
      Copyright (c) 2017-2020 Struktur AG
      Copyright (c) 2017-2024 Dirk Farin
      https://github.com/strukturag/libheif

  libde265 — version 1.0.15
      The HEVC decoder used by libheif.
      Copyright (c) 2013-2014 Struktur AG
      Copyright (c) 2013-2023 Dirk Farin
      https://github.com/strukturag/libde265

  libquadmath — the GCC quad-precision maths library
      Part of GCC's Fortran runtime. This application's own code does not
      call it: NumPy, SciPy and faiss include it in their published
      packages, beside the linear-algebra library (OpenBLAS) that is built
      against it, and this application includes those packages unmodified.
      Section 4 lists which GCC build each copy comes from.
      Copyright (C) Free Software Foundation, Inc., and the other
      contributors named in its source
      https://gcc.gnu.org/
      Its authors license it under the GNU Lesser General Public License
      version 2.1 or (at your option) any later version. We distribute it
      under version 3, the same terms as the libraries above.

Each of these libraries is used in this application, and each library and its
use are covered by the GNU Lesser General Public License version 3.

Complete copies of that licence, and of the GNU General Public License version
3 which it builds upon, are supplied alongside this file:

    LGPL-3.0.txt
    GPL-3.0.txt


2. YOUR RIGHTS IN RESPECT OF THESE LIBRARIES
---------------------------------------------

Nothing in the End-User Licence Agreement for this application restricts the
rights the LGPL-3.0 gives you in these libraries. In particular, you may:

  * modify these libraries;

  * relink this application against your modified version of any of them,
    provided your version is interface-compatible with the one supplied; and

  * reverse engineer this application to the extent needed to debug those
    modifications.

These rights apply to the libraries listed above. They do not extend to the
rest of the application, which remains proprietary.


3. HOW TO RELINK
-----------------

This application loads these libraries dynamically. They are ordinary shared
library files inside the application folder:

  * Windows — the "lib" folder beside the executable
                (Qt6*.dll, libheif*.dll, libde265*.dll)

  * macOS   — inside the application bundle:
                Qt under Contents/Frameworks/PySide6/Qt/lib/
                  (<name>.framework/Versions/A/<name>, e.g. QtCore)
                libheif and libde265 under
                  Contents/Frameworks/pi_heif/__dot__dylibs/
                libquadmath.0.dylib under
                  Contents/Frameworks/numpy/__dot__dylibs/ and
                  Contents/Frameworks/scipy/__dot__dylibs/

  * Linux   — the "lib" folder beside the executable: libquadmath-*.so.0.0.0
                in its numpy.libs, scipy.libs and faiss_cpu.libs folders

To use your own build, replace the relevant file with an interface-compatible
one of the same name and start the application again.

  libquadmath on Windows: there it is not a separate file. It is compiled
  into the OpenBLAS libraries of NumPy and faiss, in the "lib" folder:

      numpy.libs\libopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-*.dll
      faiss_cpu.libs\libopenblas.dll

  To relink it, build OpenBLAS from its source with the same version of GCC
  (section 4 lists both), linking your modified libquadmath, and replace the
  file above with the result.

  Note for macOS (the edition downloaded from our website): if your copy of
  the application has been code-signed, replacing a library will invalidate
  that signature and macOS will refuse to launch it. You can re-sign your
  modified copy locally, for example with:

      codesign --force --deep --sign - "/path/to/PrivacyFirstPhotoOrganizer.app"

  Mac App Store edition: the copy installed from the Mac App Store runs in
  the App Sandbox, so it needs different steps. The command above would
  remove the sandbox, and the application would then no longer find your
  projects. For this edition:

    1. Copy the application out of /Applications into a folder of your own.
       An application installed by the App Store cannot be changed in place.

    2. In the copy, replace the library with your own build. Keep the file
       name, and check with "otool -L" that your build refers to the
       libraries it depends on by the same names as the original does.

    3. Re-sign the copy in two steps. The second uses the entitlements file
       supplied in this folder, relink-entitlements.plist, which keeps the
       application in its sandbox:

         codesign --force --deep --sign - "/path/to/PrivacyFirstPhotoOrganizer.app"
         codesign --force --sign - \
             --entitlements "/path/to/relink-entitlements.plist" \
             "/path/to/PrivacyFirstPhotoOrganizer.app"

       Do not add "--options runtime" (the hardened runtime): with a signature
       made on your own Mac, it refuses to load the application's libraries.

  If step 3 is skipped, macOS reports the application as damaged. Once
  re-signed, the copy stays sandboxed, opens the same projects as the copy
  from the App Store, and remains the full edition: the App Store receipt
  inside it is unaffected by the new signature.

  If you would rather work with a build that is not sandboxed, email
  support@itfanatic.com with your App Store purchase and we will send you
  one, free of charge.


4. HOW TO OBTAIN THE SOURCE CODE
---------------------------------

We supply these libraries unmodified, exactly as published by their authors.
The corresponding source code for the versions listed in section 1 is
therefore the authors' own published source. We mirror it ourselves, and that
mirror is the primary place to get it — a source offer that depends only on
someone else's server layout can lapse when that layout changes, which is a
risk we would rather absorb ourselves than pass on to you:

  Qt 6.11.1                 https://itfanatic.com/opensource#source
                            (four parts, with reassembly instructions and
                            SHA-256 hashes for every file)
  PySide6 / shiboken6 6.11.1
      https://downloads.itfanatic.com/opensource/1.0.0/pyside-setup-everywhere-src-6.11.1.tar.xz
  libheif 1.19.7
      https://downloads.itfanatic.com/opensource/1.0.0/libheif-1.19.7.tar.gz
  libde265 1.0.15
      https://downloads.itfanatic.com/opensource/1.0.0/libde265-1.0.15.tar.gz

The upstream releases remain available too, and are the secondary source if
ours is ever unreachable:

  Qt 6.11.1                 https://download.qt.io/archive/qt/6.11/6.11.1/single/
  PySide6 / shiboken6       https://download.qt.io/official_releases/QtForPython/
                            (also on PyPI: `pip download --no-binary :all: pyside6`)
  libheif 1.19.7            https://github.com/strukturag/libheif/tree/v1.19.7
  libde265 1.0.15           https://github.com/strukturag/libde265/tree/v1.0.15

If any of those addresses has moved, or you would simply prefer us to send it
to you, write to:

    support@itfanatic.com

and we will provide the complete corresponding source code for any LGPL-3.0
library in the version of this application you received, at no charge beyond
the cost of the delivery medium. This offer is open to anyone who has a copy
of this application, for as long as we distribute it.

libquadmath, and the GCC runtime libraries in section 6, are part of GCC. Each
copy was built by the project whose package carries it, as part of a
particular build of GCC, so its corresponding source is that build's source.
We mirror those sources too, as fetched from the upstream addresses below, and
here as well our mirror is the primary place to get them. The list of files,
with a SHA-256 hash for each, is at

    https://itfanatic.com/opensource#libquadmath

Which build depends on the platform and the package. Under each, the
addresses on downloads.itfanatic.com are our mirror; the others are the
upstream ones, the secondary source if ours is ever unreachable:

  macOS — NumPy 1.26.4 (Apple silicon and Intel), SciPy 1.17.1 (Intel):
    GCC 11.3.0 as built by conda-forge. The GNU release
      https://downloads.itfanatic.com/opensource/gcc/gcc-11.3.0.tar.gz
      https://ftp.gnu.org/gnu/gcc/gcc-11.3.0/gcc-11.3.0.tar.gz
    with conda-forge's patches, in the recipe at
      https://downloads.itfanatic.com/opensource/gcc/gfortran_impl_osx-64-feedstock-481738c977ef7b651105c9715ad2255c613500df.tar.gz
      https://github.com/conda-forge/gfortran_impl_osx-64-feedstock/tree/481738c977ef7b651105c9715ad2255c613500df/recipe
    (our copy is the whole feedstock at that commit; the recipe is its
    recipe/ folder)

  macOS — SciPy 1.17.1 (Apple silicon):
    GCC 12.1 for Apple silicon, from Iain Sandoe's branch,
    tag gcc-12.1-darwin-r0
      https://downloads.itfanatic.com/opensource/gcc/gcc-12-branch-gcc-12.1-darwin-r0.tar.gz
      https://github.com/iains/gcc-12-branch/archive/refs/tags/gcc-12.1-darwin-r0.tar.gz

  Linux — NumPy 1.26.4, and the OpenBLAS part of SciPy 1.17.1:
    Red Hat Developer Toolset 10, GCC 10.2.1-11
      https://downloads.itfanatic.com/opensource/gcc/devtoolset-10-gcc-10.2.1-11.1.el7.src.rpm
      https://downloads.itfanatic.com/opensource/gcc/devtoolset-10-gcc-10.2.1-11.2.el7.src.rpm
      https://vault.centos.org/7.9.2009/sclo/Source/rh/devtoolset-10-gcc-10.2.1-11.1.el7.src.rpm
      https://vault.centos.org/7.9.2009/sclo/Source/rh/devtoolset-10-gcc-10.2.1-11.2.el7.src.rpm
    (the binaries identify themselves as 10.2.1-11, which both packages build)

  Linux — SciPy 1.17.1:
    AlmaLinux 8, GCC 8.5.0-26
      https://downloads.itfanatic.com/opensource/gcc/gcc-8.5.0-26.el8_10.alma.1.src.rpm
      https://vault.almalinux.org/8.10/BaseOS/Source/Packages/gcc-8.5.0-26.el8_10.alma.1.src.rpm

  Linux — faiss-cpu 1.14.3, scikit-learn 1.9.0:
    AlmaLinux 8, GCC 8.5.0-28
      https://downloads.itfanatic.com/opensource/gcc/gcc-8.5.0-28.el8_10.alma.1.src.rpm
      https://vault.almalinux.org/8.10/BaseOS/Source/Packages/gcc-8.5.0-28.el8_10.alma.1.src.rpm

  Windows — compiled into NumPy 1.26.4's OpenBLAS library:
    GCC 10.3.0, the MinGW-w64 build distributed with Rtools
      https://downloads.itfanatic.com/opensource/gcc/gcc-10.3.0.tar.gz
      https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.gz
    and the OpenBLAS source you need to rebuild that library (BSD-3-Clause)
      https://downloads.itfanatic.com/opensource/gcc/OpenBLAS-c2f4bdbbb43a1d20a7342f40122e18e573ce436a.tar.gz
      https://github.com/OpenMathLib/OpenBLAS/tree/c2f4bdbbb43a1d20a7342f40122e18e573ce436a

  Windows — compiled into faiss-cpu 1.14.3's OpenBLAS library:
    GCC 9.3.0, as built by MXE (https://mxe.cc)
      https://downloads.itfanatic.com/opensource/gcc/gcc-9.3.0.tar.gz
      https://ftp.gnu.org/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz

Each GNU release on our mirror sits beside GNU's own signature for it (the
same name with .sig added), which you can check against the GNU keyring.

The two Windows builds add their distributors' own patches to the GNU release,
and those patches are not among the files above. If you need exactly those, or
any of these addresses has stopped working, the offer above covers libquadmath
too: write to support@itfanatic.com.


5. THE LINUX APPIMAGE'S RUNTIME
--------------------------------

The Linux .AppImage download is a single executable file whose first part is a
small self-mounting program called a runtime. That runtime is uruntime, by
VHSgunzo, used unmodified under the MIT licence:

    Copyright (c) VHSgunzo

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.

Its source code is at https://github.com/VHSgunzo/uruntime. This section does
not apply to the macOS or Windows downloads, or to the Linux .tar.gz, none of
which contain it.


6. THE GCC RUNTIME LIBRARIES
-----------------------------

The same packages also include parts of GCC's runtime: libgfortran and
libgcc_s, and on Linux libgomp. On Linux, scikit-learn's package includes
libgomp as well, and nothing else from GCC. On Windows these are compiled into
the OpenBLAS libraries of NumPy, SciPy and faiss rather than being separate
files.

They are licensed under the GNU General Public License version 3 with the
GCC Runtime Library Exception, version 3.1, which permits them to be
distributed with programs compiled by GCC under terms of the distributor's
choosing. Complete copies of both are supplied alongside this file:

    GPL-3.0.txt
    GCC-exception-3.1.txt

Their source is the GCC source listed for each platform in section 4.

    Copyright (C) Free Software Foundation, Inc.


7. EVERYTHING ELSE
-------------------

The full list of every third-party component in this application — including
the machine-learning models, the place-name data, and the attributions those
licences require — is on the About page inside the application.
