File: pkg-config.patch

package info (click to toggle)
freefilesync 12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,432 kB
  • sloc: cpp: 64,801; ansic: 431; makefile: 217
file content (97 lines) | stat: -rw-r--r-- 3,766 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Description: put pkg-config command into a variable
 When cross-compiling on debian, the build system dh set the name of the
 pkg-config command name to use into PKG_CONFIG variable.
 For armhf, it is PKG_CONFIG=arm-linux-gnueabihf-pkg-config
 .
 Since the pkg-config that is installed during cross-compiling is the one
 of the build-arch (amd64), and not the one of the host-arch (armhf),
 using `pkg-config` instead of `arm-linux-gnueabihf-pkg-config` would
 prevent detection of the libraries.
 .
 freefilesync (11.23-1) UNRELEASED; urgency=medium
 .
   * Initial release. (Closes: #925512)
Author: Fab Stz <fabstz-it@yahoo.fr>
Origin: self
Forwarded: by email to author on 2022-08-11
Last-Update: 2022-08-09

--- a/FreeFileSync/Source/Makefile
+++ b/FreeFileSync/Source/Makefile
@@ -1,6 +1,8 @@
 CXX ?= g++
 exeName = FreeFileSync
 
+PKG_CONFIG=pkg-config
+
 CXXFLAGS += -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
            -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \
            -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
@@ -9,32 +11,32 @@
 LDFLAGS += -lz
 
 
-CXXFLAGS  += `pkg-config --cflags openssl`
-LDFLAGS += `pkg-config --libs   openssl`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags openssl`
+LDFLAGS += `$(PKG_CONFIG) --libs   openssl`
 
-CXXFLAGS  += `pkg-config --cflags libcurl`
-LDFLAGS += `pkg-config --libs   libcurl`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags libcurl`
+LDFLAGS += `$(PKG_CONFIG) --libs   libcurl`
 
-CXXFLAGS  += `pkg-config --cflags libssh2`
-LDFLAGS += `pkg-config --libs   libssh2`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags libssh2`
+LDFLAGS += `$(PKG_CONFIG) --libs   libssh2`
 
-CXXFLAGS  += `pkg-config --cflags gtk+-3.0`
-LDFLAGS += `pkg-config --libs   gtk+-3.0`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags gtk+-3.0`
+LDFLAGS += `$(PKG_CONFIG) --libs   gtk+-3.0`
 #treat as system headers so that warnings are hidden:
 CXXFLAGS  += -isystem/usr/include/gtk-3.0
 
 with_notifications ?= NO
 ifeq ($(with_notifications),YES)
 # package libglibmm-2.4-dev or glibmm24-devel
-cxxFlags  += `pkg-config --cflags giomm-2.4` -Dwith_notifications
-linkFlags += `pkg-config --libs   giomm-2.4`
+cxxFlags  += `$(PKG_CONFIG) --cflags giomm-2.4` -Dwith_notifications
+linkFlags += `$(PKG_CONFIG) --libs   giomm-2.4`
 endif
 
 #support for SELinux (optional)
-SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES)
+SELINUX_EXISTING=$(shell $(PKG_CONFIG) --exists libselinux && echo YES)
 ifeq ($(SELINUX_EXISTING),YES)
-CXXFLAGS  += `pkg-config --cflags libselinux` -DHAVE_SELINUX
-LDFLAGS += `pkg-config --libs libselinux`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags libselinux` -DHAVE_SELINUX
+LDFLAGS += `$(PKG_CONFIG) --libs libselinux`
 endif
 
 cppFiles=
--- a/FreeFileSync/Source/RealTimeSync/Makefile
+++ b/FreeFileSync/Source/RealTimeSync/Makefile
@@ -1,6 +1,8 @@
 CXX ?= g++
 exeName = RealTimeSync
 
+PKG_CONFIG=pkg-config
+
 CXXFLAGS += -std=c++2b -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
            -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \
            -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
@@ -9,8 +11,8 @@
 LDFLAGS += -lz
 
 #Gtk - support "no button border"
-CXXFLAGS  += `pkg-config --cflags gtk+-3.0`
-LDFLAGS += `pkg-config --libs   gtk+-3.0`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags gtk+-3.0`
+LDFLAGS += `$(PKG_CONFIG) --libs   gtk+-3.0`
 #treat as system headers so that warnings are hidden:
 CXXFLAGS  += -isystem/usr/include/gtk-3.0