comparison mupdf-source/thirdparty/zint/README.linux @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 % README.linux 2024-10-04
2 % Tested on Ubuntu 20.04.4 LTS, Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and
3 % Fedora Linux 40 (Workstation Edition)
4
5 1. Prerequisites for building zint
6 ==================================
7
8 Prerequisites are git, cmake, make, gcc and gcc-c++, e.g. Ubuntu/Debian
9
10 sudo apt install git cmake build-essential
11
12 or Fedora (git, make and gcc should already be installed)
13
14 sudo dnf install cmake gcc-c++
15
16 libpng is optional but necessary for PNG support, e.g. Ubuntu/Debian
17
18 sudo apt install libpng-dev
19
20 or Fedora
21
22 sudo dnf install libpng-devel
23
24 Then either download the source code tarball
25
26 wget -O zint-2.13.0-src.tar.gz \
27 https://sourceforge.net/projects/zint/files/zint/2.13.0/zint-2.13.0-src.tar.gz/download
28 tar xf zint-2.13.0-src.tar.gz
29 cd zint-2.13.0-src
30
31 or clone the latest source
32
33 git clone https://git.code.sf.net/p/zint/code zint
34 cd zint
35
36
37 2. Prerequisites for building zint-qt
38 =====================================
39
40 zint-qt can be built with either Qt5 (preferred) or Qt6. First, install mesa (for OpenGL), e.g.
41 Ubuntu/Debian
42
43 sudo apt install mesa-common-dev libglu1-mesa-dev
44
45 or Fedora
46
47 sudo dnf install mesa-libGL mesa-libGL-devel
48
49 zint-qt has issues running on Wayland so sets X11 as the Qt platform (via the environment variable
50 "QT_QPA_PLATFORM=xcb") on startup unless already set.
51
52 2.1. Using Qt packages
53 ----------------------
54
55 If packages for Qt exist for your distro, it might be easiest to use them, although knowing
56 what their ever-changing names and contents are isn't. A complication is that zint-qt uses 2 Qt
57 components beyond the basic setup: Qt UI Tools (for dynamically loading the symbology-specific
58 tabs), and Qt SVG (for rendering icons).
59
60 E.g. on Ubuntu 22.04 or 24.04
61
62 sudo apt install qtbase5-dev qttools5-dev qttools5-dev-tools libqt5svg5-dev
63
64 or Ubuntu 20.04
65
66 sudo apt install qt5-default qt5-uitools
67
68 or Fedora (not recommended)
69
70 sudo dnf install qt5-qtbase-devel qt5-qttools-devel qt5-qttools-static qt5-qtsvg-devel
71
72 You may need to tell CMake where to find the ".cmake" modules:
73
74 export CMAKE_MODULE_PATH=<cmake-module-path>/Qt5
75
76 e.g. CMAKE_MODULE_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5
77
78 2.2. Using the Qt Maintenance Tool
79 ----------------------------------
80
81 Alternatively, for a more consistent experience, sign up and download the Qt Maintenance Tool
82 from
83
84 https://www.qt.io/download-qt-installer
85
86 On Ubuntu/Debian you may need to install xinerama to run the tool:
87
88 sudo apt install libxcb-xinerama0
89
90 Launch the tool and install the "Desktop gcc 64-bit" component for either Qt 5.15.2 (preferred)
91 or Qt 6 (>= 6.1).
92
93 Once Qt is installed you may need to tell CMake where it is:
94
95 export CMAKE_PREFIX_PATH=<qt-version-dir>/gcc_64
96
97 e.g. export CMAKE_PREFIX_PATH=/opt/Qt/5.15.2/gcc_64
98
99
100 3. Build
101 ========
102
103 The rest is standard CMake
104
105 cd zint
106 mkdir build
107 cd build
108 cmake ..
109 make
110 sudo make install
111
112
113 4. CMake options
114 ================
115
116 A number of options are available:
117
118 ZINT_COVERAGE:BOOL=OFF # Set code coverage flags
119 ZINT_DEBUG:BOOL=OFF # Set debug compile flags
120 ZINT_FRONTEND:BOOL=ON # Build frontend
121 ZINT_NOOPT:BOOL=OFF # Set no optimize compile flags
122 ZINT_SANITIZE:BOOL=OFF # Set sanitize compile/link flags
123 ZINT_SHARED:BOOL=ON # Build shared library
124 ZINT_STATIC:BOOL=OFF # Build static library
125 ZINT_TEST:BOOL=OFF # Set test compile flag
126 ZINT_UNINSTALL:BOOL=ON # Add uninstall target
127 ZINT_USE_PNG:BOOL=ON # Build with PNG support
128 ZINT_USE_QT:BOOL=ON # Build with Qt support
129 ZINT_QT6:BOOL=OFF # If ZINT_USE_QT, use Qt6
130
131 which can be set by doing e.g.
132
133 cmake -DZINT_SANITIZE=ON ..
134
135 For details on ZINT_TEST and building the zint test suite, see "backend/tests/README".