File: pkg-config.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 (83 lines) | stat: -rw-r--r-- 3,321 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
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
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.
 .
 Patch forwared by email to author on 2022-08-11
 .
Author: Fab Stz <fabstz-it@yahoo.fr>
Origin: self
Forwarded: yes
Last-Update: 2022-08-09

--- a/FreeFileSync/Source/Makefile
+++ b/FreeFileSync/Source/Makefile
@@ -1,6 +1,8 @@
 CXX ?= g++
 exeName = FreeFileSync_$(shell arch)
 
+PKG_CONFIG=pkgconf
+
 CXXFLAGS += -std=c++23 -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
@@ -8,24 +10,24 @@
 LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread
 
 
-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+-2.0`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags gtk+-2.0`
 #treat as system headers so that warnings are hidden:
 CXXFLAGS  += -isystem/usr/include/gtk-2.0
 
 #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_$(shell arch)
 
+PKG_CONFIG=pkgconf
+
 CXXFLAGS += -std=c++23 -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
@@ -8,7 +10,7 @@
 LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread
 
 #Gtk - support "no button border"
-CXXFLAGS  += `pkg-config --cflags gtk+-2.0`
+CXXFLAGS  += `$(PKG_CONFIG) --cflags gtk+-2.0`
 #treat as system headers so that warnings are hidden:
 CXXFLAGS  += -isystem/usr/include/gtk-2.0