Skip to content

Commit ab22726

Browse files
committed
Merge bitcoin/bitcoin#31276: guix: scope pkg-config to Linux only
bcd82b1 Remove pkgconfig from toolchain file (TheCharlatan) 319a4e8 depends: drop sqlite pkgconfig file (fanquake) a8fe1fd depends: better cleanup after fontconfig (fanquake) 17e79c9 depends: fully remove libtool archives from Qt build (fanquake) 8ca8565 guix: move pkg-config to Linux builds (fanquake) e3e648c depends: drop pkg-config option from Qt build (fanquake) 0d185bd doc: update depends doc to prefer .cmake outputs (fanquake) Pull request description: After #31181, `pkg-config` is no-longer needed for macOS or Windows Guix builds. It's still needed for Linux, as it's used by a Qt subdependency (fontconfig to find freetype). However we should also no-longer need it for Qt itself, when building using depends. ACKs for top commit: TheCharlatan: ACK bcd82b1 Tree-SHA512: 89ae68281030d43fcb6c5c96429cd038a21f13a8ca19ea828ada47e8f9f0aa7407854a67c9003652817e47ab9565573b7028342e3e11bb1cca1d823c483081cd
2 parents e122309 + bcd82b1 commit ab22726

File tree

7 files changed

+8
-29
lines changed

7 files changed

+8
-29
lines changed

contrib/guix/manifest.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ inspecting signatures in Mach-O binaries.")
511511
gcc-toolchain-12
512512
cmake-minimal
513513
gnu-make
514-
pkg-config
515514
;; Scripting
516515
python-minimal ;; (3.10)
517516
;; Git
@@ -527,6 +526,7 @@ inspecting signatures in Mach-O binaries.")
527526
osslsigncode))
528527
((string-contains target "-linux-")
529528
(list bison
529+
pkg-config
530530
(list gcc-toolchain-12 "static")
531531
(make-bitcoin-cross-toolchain target)))
532532
((string-contains target "darwin")

depends/packages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ Most autotools projects can be properly staged using:
153153
## Build outputs:
154154

155155
In general, the output of a depends package should not contain any libtool
156-
archives. Instead, the package should output `.pc` (`pkg-config`) files where
157-
possible.
156+
archives or `.pc` (`pkg-config`) files. Instead, the package should output
157+
`.cmake` (CMake) files where possible.
158158

159159
From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Handling_Libtool_Archives):
160160

depends/packages/fontconfig.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ define $(package)_stage_cmds
2929
endef
3030

3131
define $(package)_postprocess_cmds
32-
rm -rf var lib/*.la
32+
rm -rf bin etc share var lib/*.la
3333
endef

depends/packages/qt.mk

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ $(package)_linguist_tools = lrelease lupdate lconvert
1010
$(package)_patches = qt.pro
1111
$(package)_patches += qttools_src.pro
1212
$(package)_patches += mac-qmake.conf
13-
$(package)_patches += fix_qt_pkgconfig.patch
1413
$(package)_patches += no-xlib.patch
1514
$(package)_patches += dont_hardcode_pwd.patch
1615
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
@@ -64,6 +63,7 @@ $(package)_config_opts += -no-mimetype-database
6463
$(package)_config_opts += -no-mtdev
6564
$(package)_config_opts += -no-openssl
6665
$(package)_config_opts += -no-openvg
66+
$(package)_config_opts += -no-pkg-config
6767
$(package)_config_opts += -no-reduce-relocations
6868
$(package)_config_opts += -no-schannel
6969
$(package)_config_opts += -no-sctp
@@ -84,7 +84,6 @@ $(package)_config_opts += -nomake examples
8484
$(package)_config_opts += -nomake tests
8585
$(package)_config_opts += -nomake tools
8686
$(package)_config_opts += -opensource
87-
$(package)_config_opts += -pkg-config
8887
$(package)_config_opts += -prefix $(host_prefix)
8988
$(package)_config_opts += -qt-libpng
9089
$(package)_config_opts += -qt-pcre
@@ -226,7 +225,6 @@ define $(package)_preprocess_cmds
226225
cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \
227226
patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \
228227
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
229-
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
230228
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
231229
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
232230
patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \
@@ -273,6 +271,6 @@ define $(package)_stage_cmds
273271
endef
274272

275273
define $(package)_postprocess_cmds
276-
rm -rf doc/ native/lib/ && \
277-
rm -f lib/lib*.la
274+
rm -rf doc/ native/lib/ lib/pkgconfig/ && \
275+
rm -f lib/lib*.la lib/Qt5*.la
278276
endef

depends/packages/sqlite.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ define $(package)_stage_cmds
3131
endef
3232

3333
define $(package)_postprocess_cmds
34+
rm -rf lib/pkgconfig && \
3435
rm lib/*.la
3536
endef

depends/patches/qt/fix_qt_pkgconfig.patch

Lines changed: 0 additions & 11 deletions
This file was deleted.

depends/toolchain.cmake.in

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE)
8787
set(CMAKE_FRAMEWORK_PATH "@OSX_SDK@/System/Library/Frameworks")
8888
endif()
8989

90-
91-
# Customize pkg-config behaviour.
92-
cmake_path(APPEND CMAKE_FIND_ROOT_PATH "lib" "pkgconfig" OUTPUT_VARIABLE pkg_config_path)
93-
set(ENV{PKG_CONFIG_PATH} ${pkg_config_path})
94-
set(ENV{PKG_CONFIG_LIBDIR} ${pkg_config_path})
95-
unset(pkg_config_path)
96-
set(PKG_CONFIG_ARGN --static)
97-
98-
9990
# Set configuration options for the main build system.
10091
set(qt_packages @qt_packages@)
10192
if("${qt_packages}" STREQUAL "")

0 commit comments

Comments
 (0)