*******************************************************************************
Runtime Depends
*******************************************************************************
--------
:common:
--------
bzip2
zlib
iconv (libc on GNU/Linux)
----------------
:libeiskaltdcpp:
----------------
gettext
libssl (>= 0.9.8)
liblua (optional, see cmake keys)
libpcre2 (optional, see cmake keys)
miniupnpc (optional, see cmake keys)
libidn2 (optional, see cmake keys)
libattr (optional, see cmake keys)
----------------
:eiskaltdcpp-qt:
----------------
libqtcore4, libqtgui4, libqt4-network, libqt4-xml (>= 4.6.0)
libqt4-script (>= 4.6.0) (optional, see cmake keys)
libqt4-dbus (>= 4.6.0) (optional, see cmake keys)
or
libqt5core5a, libqt5gui5, libqt5widgets5, libqt5network5, libqt5xml5 (>= 5.0.2)
libqt5script5 (>= 5.0.2) (optional, see cmake keys)
libqt5dbus5 (>= 5.0.2) (optional, see cmake keys)
.
libaspell (optional, see cmake keys)
-----------------
:eiskaltdcpp-gtk:
-----------------
gettext
libpango
libgtk2 (>= 2.24)
libglib2 (>= 2.24)
libnotify (>= 0.4.1) (optional, see cmake keys)
libgnome2 (optional, see cmake keys)
libcanberra-gtk3-0 (optional, see cmake keys)
--------------------
:eiskaltdcpp-daemon:
--------------------
libxmlrpc-c++4 (>= 1.19.0) (optional, see cmake keys)
libjsoncpp (optional, see cmake keys)
-----------------
:eiskaltdcpp-cli:
-----------------
perl (>= 5.10)
perl modules:
    Getopt::Long  (libgetopt-long-descriptive-perl)
    Data::Dump    (libdata-dump-perl)
    Term::ShellUI (libterm-shellui-perl)
    RPC::XML      (librpc-xml-perl)  (optional, see cmake keys)
    JSON::RPC     (libjson-rpc-perl) (optional, see cmake keys)


*******************************************************************************
Optional Depends
*******************************************************************************
----------------
:eiskaltdcpp-qt:
----------------
sh (bash, dash, etc...)
    see examples/ and eiskaltdcpp-qt/qtscripts/
php5-cli (or other version, check the compatibility by yourself)
    see eiskaltdcpp-qt/examples/ and eiskaltdcpp-qt/qtscripts/
libqtscript4-core, libqtscript4-gui, libqtscript4-network, libqtscript4-xml
    see eiskaltdcpp-qt/qtscripts/


*******************************************************************************
Build Depends
*******************************************************************************
--------
:common:
--------
gcc (>= 6.3.0) or clang (>= 3.8)
cmake (>= 3.2.0)
bzip2
zlib
----------------
:libeiskaltdcpp:
----------------
gettext
liblua*-dev (optional, see cmake keys)
libpcre2-dev (optional, see cmake keys)
miniupnpc (optional, see cmake keys)
libidn2 (optional, see cmake keys)
libattr-dev (optional, see cmake keys)
----------------
:eiskaltdcpp-qt:
----------------
Qt4 (>= 4.6.0) or Qt5 (>= 5.4.2)
libaspell-dev (optional, see cmake keys)
-----------------
:eiskaltdcpp-gtk:
-----------------
libgtk2.0-dev (optional, see cmake keys)
libgtk-3-dev  (optional, see cmake keys)
libnotify-dev (optional, see cmake keys)
libgnome2-dev (optional, see cmake keys)
libcanberra-gtk3-dev (optional, see cmake keys)
--------------------
:eiskaltdcpp-daemon:
--------------------
libxmlrpc-c++4-dev (>=1.19.0) (optional, see cmake keys)
libjsoncpp-dev (optional, see cmake keys)


*******************************************************************************
Installation in Linux and other UNIX-like systems
*******************************************************************************
mkdir -p builddir && cd builddir
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../
make -j2
sudo make install

---------
# Note: you can get the most recent sources of program from git repository:
git clone https://github.com/eiskaltdcpp/eiskaltdcpp.git


*******************************************************************************
Keys for cmake
*******************************************************************************
----------------
:libeiskaltdcpp:
----------------
-DLUA_SCRIPT=ON/OFF (default: ON)
    Support of Lua scripts
-DLUA_VERSION=(UNSET)/5.1/5.2... (default: (UNSET))
    Choose a specific version of the lua library. When not set (the default) CMake
    will try to find the right version itself.
-DPERL_REGEX=ON/OFF (default: ON)
    Use PCRE2 library for regexps in Perl style (now it is used only in ADL Search)
-DUSE_IDN2=ON/OFF (default: ON)
    Use libidn2 for rfc3490 (resolving Internationalized Domain Names)
-DUSE_XATTR=ON/OFF (default: OFF)
    Xattr library allows program to store file hash in file attributes in all
    file systems with extended attributes support.
    Currently this library is available only in GNU/Linux and *BSD systems.
-DWITH_DHT=ON/OFF (default: ON)
    DHT support (http://strongdc.sourceforge.net/download/StrongDC_DHT.pdf)
-DLINK=STATIC/SHARED (default: SHARED)
    Build libeiskaltdcpp as static or as shared library.
    This option is available only in GNU/Linux and *BSD systems.
    For MS Windows, macOS and Haiku it is forcibly set to STATIC.
----------------
:eiskaltdcpp-qt:
----------------
-DUSE_QT=ON/OFF (default: OFF)
    Build EiskaltDC++ with Qt interface using Qt 4.x libraries
-DUSE_QT5=ON/OFF (default: ON)
    Build EiskaltDC++ with Qt interface using Qt 5.x libraries
-DUSE_ASPELL=ON/OFF (default: ON)
    Use or not use aspell
-DUSE_PROGRESS_BARS=ON/OFF (default: ON)
    Use progress bars or widgets with plain text for indication of progress.
    This option is especially important for macOS where progress bars do not
    allow one to show text on them so a lot of information is hidden from user.
-DLOCAL_ASPELL_DATA=ON/OFF (default: OFF)
    Use local aspell data files
    Script downloads archive with aspell data files:
    https://sourceforge.net/projects/eiskaltdcpp/files/Other/aspell.tar.gz
    If aspell.tar.gz already available in source tree repeated download will
    not happen.
-DFREE_SPACE_BAR_C=ON/OFF (default: ON)
    Show free space indicator in status panel
-DDBUS_NOTIFY=ON/OFF (default: ON)
    Use or not use QtDBus module
-DUSE_JS=ON/OFF (default: OFF)
    Enable/disable QtScript basic support
-DUSE_QT_QML=ON/OFF (default: OFF)
    Enable/disable Qt Declarative UI support. Work only with Qt >= 4.7.0
-DUSE_QT_SQLITE=ON/OFF (default: ON)
    Build with SQLite support. (This is experimental option)
-----------------
:eiskaltdcpp-gtk:
-----------------
-DUSE_GTK=ON/OFF (default: OFF)
    Build EiskaltDC++ with Gtk interface using GTK+ 2.x library
    (This UI is based on FreeDC++ and LinuxDC++.)
-DUSE_GTK3=ON/OFF (default: OFF)
    Build EiskaltDC++ with GTK+ interface using GTK+ 3.x library
-DUSE_LIBGNOME2=ON/OFF (default: OFF)
    Enable/disable sound notifications support over libgnome2 in EiskaltDC++ Gtk
-DUSE_LIBCANBERRA=ON/OFF (default: OFF)
    Enable/disable sound notifications support over libcanberra in EiskaltDC++ Gtk
-DUSE_LIBNOTIFY=ON/OFF (default: ON)
    Enable/disable popup notifications support in EiskaltDC++ Gtk
-DFREE_SPACE_BAR_C=ON/OFF (default: ON)
    Show free space indicator in status panel
--------------------
:eiskaltdcpp-daemon:
--------------------
-DNO_UI_DAEMON=ON/OFF (default: OFF)
    Build daemon (without any UI)
-DXMLRPC_DAEMON=ON/OFF (default: OFF)
    Make this daemon as xmlrpc server.
-DJSONRPC_DAEMON=ON/OFF (default: ON)
    Make this daemon as json server.
-DLOCAL_JSONCPP=ON/OFF (default: ON)
    Use embedded copy of jsoncpp library or system library. Have in mind, if
    this library do not have our patch, it will causes segmentation faults in
    eiskaltdcpp-daemon.
-----------------
:eiskaltdcpp-cli:
----------------
-DUSE_CLI_XMLRPC=ON/OFF (default: OFF)
    Use command line interface to control daemon via XMLRPC
-DUSE_CLI_JSONRPC=ON/OFF (default: OFF)
    Use command line interface to control daemon via JSONRPC
--------
:common:
--------
-DWITH_EMOTICONS=ON/OFF (default: ON)
    If ON install emoticons/
-DWITH_EXAMPLES=ON/OFF (default: ON)
    If ON install examples/
-DWITH_LUASCRIPTS=ON/OFF (default: ON)
    If ON install luascripts/
-DUSE_MINIUPNP=ON/OFF (default: ON)
    use or not use miniupnpc lib
-DWITH_SOUNDS=ON/OFF (default: ON)
    If ON install sounds/
-Dlinguas:STRING="needed translations, separator is whitespace" (default: *)
    Examples:
    -Dlinguas="en ru" - install ru and en translations
    -Dlingaus="*"     - install all translations
    -Dlinguas=""      - don't install any translation
-DFORCE_XDG=ON/OFF (default: ON)
    Use or not use $XDG_CONFIG_HOME and $XDG_CONFIG_DOWNLOADS variables.
    See https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html
    This option is available only on Unix-like systems (GNU/Linux, macOS, *BSD).
-DCOMPRESS_MANPAGES=ON/OFF (default: ON)
    Compress installed man pages
    This option is available only on Unix-like systems (GNU/Linux, *BSD).
-DCMAKE_INSTALL_PREFIX=<common prefix> (default: /usr/local)
    common prefix.
    In case of using of `make install DESTDIR=<path>` all will bre installed to:
    <path>/<common prefix>
-DCMAKE_INSTALL_LIBDIR=<lib prefix> (default: lib)
    Installation path for libraries (subdirectory).
    Libraries will be installed to: <common prefix>/<lib prefix>
    Examples:
    -DCMAKE_INSTALL_LIBDIR=lib64 - install lib to <common prefix>/lib64
-DINSTALL_RUNTIME_PATH=ON/OFF (default: OFF)
    Set RPATH in library. About possible troubles see:
    https://fedoraproject.org/wiki/RPath_Packaging_Draft
    https://wiki.debian.org/RpathIssue
-DWITH_DEV_FILES=ON/OFF (default: OFF)
    If ON install development files (headers for libeiskaltdcpp)
    see also -DEISKALTDCPP_INCLUDE_DIR
-DEISKALTDCPP_INCLUDE_DIR=<dir> (default: <common prefix>/include/eiskaltdcpp)
    install development files (headers for libeiskaltdcpp) to <dir>
-DDESKTOP_ENTRY_PATH=<common prefix> (default: /usr/local/share/applications/)
    path to directory with system *.desktop files
-DPIXMAPS_ENTRY_PATH=<common prefix> (default: /usr/local/share/pixmaps/)
    path to directory with pixmaps of applications for system *.desktop files
-DHAIKU_PKG=ON/OFF (default: OFF)
    Make Haiku package
-DCMAKE_BUILD_TYPE={Release, RelWithDebInfo, Debug, MinRelSize}
    build type (please use RelWithDebInfo for debug mode, not Debug)
And other standard cmake keys...

---------
# Example of the full build:
mkdir -p builddir && cd builddir
cmake -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DUSE_QT=ON \
      -DUSE_GTK=ON \
      -DUSE_JS=ON \
      -DUSE_ASPELL=ON \
      -DUSE_QT_QML=ON \
      -DUSE_QT_SQLITE=ON \
      -DLUA_SCRIPT=ON \
      -DWITH_LUASCRIPTS=ON \
      -DWITH_SOUNDS=ON \
      -DNO_UI_DAEMON=ON \
      -DJSONRPC_DAEMON=ON \
      -DUSE_CLI_JSONRPC=ON \
      -DUSE_MINIUPNP=ON \
      ..
make
sudo make install


*******************************************************************************
Uninstall program
*******************************************************************************
sudo make uninstall


*******************************************************************************
FreeBSD specific notes
*******************************************************************************
# If you use GCC, specific configuration options are not required. But if you
# use clang, try something like this:
mkdir -p builddir
cd builddir
cmake .. \
      -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
      -DCMAKE_CXX_FLAGS='-I/opt/local/include -stdlib=libc++' \
      -DNO_UI_DAEMON=ON -DXMLRPC_DAEMON=ON -DJSONRPC_DAEMON=ON -DUSE_QT=ON
make -j4
sudo make install


*******************************************************************************
macOS specific notes
*******************************************************************************
Example of build script:
macosx/build-using-homebrew.sh


*******************************************************************************
MS Windows specific notes
*******************************************************************************
Examples of build script are available in windows/ subdirectory.
Do not forget to read notes in windows/READ_ME.txt file.


*******************************************************************************
Haiku specific notes
*******************************************************************************
Example of configuration options:
cmake .. \
    -DCMAKE_INSTALL_PREFIX=/boot/apps/Eiskaltdcpp \
    -DSHARE_DIR=/boot/apps/Eiskaltdcpp \
    -DHAIKU_PKG=ON

Full build rules for Haiku you may see in recipe of official package:
https://github.com/haikuports/haikuports/tree/master/net-p2p/eiskaltdcpp

