Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#31276: guix: scope pkg-config to Linux only
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fanquake committed Nov 20, 2024
2 parents e122309 + bcd82b1 commit ab22726
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ inspecting signatures in Mach-O binaries.")
gcc-toolchain-12
cmake-minimal
gnu-make
pkg-config
;; Scripting
python-minimal ;; (3.10)
;; Git
Expand All @@ -527,6 +526,7 @@ inspecting signatures in Mach-O binaries.")
osslsigncode))
((string-contains target "-linux-")
(list bison
pkg-config
(list gcc-toolchain-12 "static")
(make-bitcoin-cross-toolchain target)))
((string-contains target "darwin")
Expand Down
4 changes: 2 additions & 2 deletions depends/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ Most autotools projects can be properly staged using:
## Build outputs:

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

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

Expand Down
2 changes: 1 addition & 1 deletion depends/packages/fontconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ define $(package)_stage_cmds
endef

define $(package)_postprocess_cmds
rm -rf var lib/*.la
rm -rf bin etc share var lib/*.la
endef
8 changes: 3 additions & 5 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ $(package)_linguist_tools = lrelease lupdate lconvert
$(package)_patches = qt.pro
$(package)_patches += qttools_src.pro
$(package)_patches += mac-qmake.conf
$(package)_patches += fix_qt_pkgconfig.patch
$(package)_patches += no-xlib.patch
$(package)_patches += dont_hardcode_pwd.patch
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
Expand Down Expand Up @@ -64,6 +63,7 @@ $(package)_config_opts += -no-mimetype-database
$(package)_config_opts += -no-mtdev
$(package)_config_opts += -no-openssl
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-pkg-config
$(package)_config_opts += -no-reduce-relocations
$(package)_config_opts += -no-schannel
$(package)_config_opts += -no-sctp
Expand All @@ -84,7 +84,6 @@ $(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests
$(package)_config_opts += -nomake tools
$(package)_config_opts += -opensource
$(package)_config_opts += -pkg-config
$(package)_config_opts += -prefix $(host_prefix)
$(package)_config_opts += -qt-libpng
$(package)_config_opts += -qt-pcre
Expand Down Expand Up @@ -226,7 +225,6 @@ define $(package)_preprocess_cmds
cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \
patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \
Expand Down Expand Up @@ -273,6 +271,6 @@ define $(package)_stage_cmds
endef

define $(package)_postprocess_cmds
rm -rf doc/ native/lib/ && \
rm -f lib/lib*.la
rm -rf doc/ native/lib/ lib/pkgconfig/ && \
rm -f lib/lib*.la lib/Qt5*.la
endef
1 change: 1 addition & 0 deletions depends/packages/sqlite.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ define $(package)_stage_cmds
endef

define $(package)_postprocess_cmds
rm -rf lib/pkgconfig && \
rm lib/*.la
endef
11 changes: 0 additions & 11 deletions depends/patches/qt/fix_qt_pkgconfig.patch

This file was deleted.

9 changes: 0 additions & 9 deletions depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE)
set(CMAKE_FRAMEWORK_PATH "@OSX_SDK@/System/Library/Frameworks")
endif()


# Customize pkg-config behaviour.
cmake_path(APPEND CMAKE_FIND_ROOT_PATH "lib" "pkgconfig" OUTPUT_VARIABLE pkg_config_path)
set(ENV{PKG_CONFIG_PATH} ${pkg_config_path})
set(ENV{PKG_CONFIG_LIBDIR} ${pkg_config_path})
unset(pkg_config_path)
set(PKG_CONFIG_ARGN --static)


# Set configuration options for the main build system.
set(qt_packages @qt_packages@)
if("${qt_packages}" STREQUAL "")
Expand Down

0 comments on commit ab22726

Please sign in to comment.