File: zlib-dep.patch

package info (click to toggle)
freefilesync 13.7-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 8,912 kB
  • sloc: cpp: 66,707; ansic: 447; makefile: 216
file content (35 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Description: Add missing ldflags & cxxflags of zlib
 - zlib's deflate() is used in zen/zlib_wrap.*
 .
 - update compilation flags:
    - CXXFLAGS: add flags for zlib
    - LDFLAGS: add flags for zlib
 .
 Since ffs calls the deflate function of zlib in zen/zlib_wrap.*, we have to
 add -lz.
 .
 Otherwise build would fail this way:
  /usr/bin/ld: /tmp/FreeFileSync_Make/ffs/src/../../zen/zlib_wrap.cpp.o: undefined reference to symbol 'deflate'
  /usr/bin/ld: /lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
 .
 The RealTimeSunc binary doesn't use zen/zlib_wrap.*, so it is not required in
 that case.
 .
 Required since 10.0
 .
Author: Fab Stz <fabstz-it@yahoo.fr>
Last-Modified: 2024-02-07
Forwarded: https://freefilesync.org/forum/viewtopic.php?p=42392

--- a/FreeFileSync/Source/Makefile
+++ b/FreeFileSync/Source/Makefile
@@ -32,6 +32,9 @@
 LDFLAGS += `$(PKG_CONFIG) --libs libselinux`
 endif
 
+CXXFLAGS  += `$(PKG_CONFIG) --cflags zlib`
+LDFLAGS += `$(PKG_CONFIG) --libs zlib`
+
 cppFiles=
 cppFiles+=application.cpp
 cppFiles+=base_tools.cpp