aboutsummaryrefslogtreecommitdiff
From b4e1ffcdbfe8dc98036a16022cbcc422385c1834 Mon Sep 17 00:00:00 2001
From: DRC <information@virtualgl.org>
Date: Tue, 23 Aug 2022 10:07:10 -0500
Subject: [PATCH] Build: Find Xfont2/fontenc/Pixman using pkg-config

... when TVNC_SYSTEMX11=1.  Referring to #339, we can't assume that
these libraries will share include/library paths with libX11.  This
commit reverts e9cb8665dc3822b33dc0ffc5571fce5a759e7cb9.

Rebased on 3.0.1 by Maxim Cournoyer <maxim.cournoyer@gmail.com>

diff --git a/unix/Xvnc/CMakeLists.txt b/unix/Xvnc/CMakeLists.txt
index 064feda..293f794 100644
--- a/unix/Xvnc/CMakeLists.txt
+++ b/unix/Xvnc/CMakeLists.txt
@@ -94,11 +94,13 @@ if(NOT TVNC_SYSTEMX11)
 endif()
 
 if(TVNC_SYSTEMX11)
+	include(FindPkgConfig)
+	pkg_check_modules(X11_Xfont2 REQUIRED xfont2)
+	pkg_check_modules(X11_Fontenc REQUIRED fontenc)
+	pkg_check_modules(X11_Pixman REQUIRED pixman-1)
 	include_directories(${X11_X11_INCLUDE_PATH} ${X11_Xau_INCLUDE_PATH}
-		${X11_Xdmcp_INCLUDE_PATH} ${X11_Xkbfile_INCLUDE_PATH})
-	string(REGEX REPLACE "X11" "Xfont2" X11_Xfont2_LIB ${X11_X11_LIB})
-	string(REGEX REPLACE "X11" "fontenc" X11_Fontenc_LIB ${X11_X11_LIB})
-	string(REGEX REPLACE "X11" "pixman-1" X11_Pixman_LIB ${X11_X11_LIB})
+		${X11_Xdmcp_INCLUDE_PATH} ${X11_Xkbfile_INCLUDE_PATH}
+		${X11_Xfont2_INCLUDEDIR} ${X11_Pixman_INCLUDEDIR}/pixman-1)
 else()
 	include_directories(${CMAKE_CURRENT_BINARY_DIR}/X_include)
 	set(X11_Xau_LIB Xau)
diff --git a/unix/Xvnc/programs/Xserver/CMakeLists.txt b/unix/Xvnc/programs/Xserver/CMakeLists.txt
index 8c05d43..f8d8f76 100644
--- a/unix/Xvnc/programs/Xserver/CMakeLists.txt
+++ b/unix/Xvnc/programs/Xserver/CMakeLists.txt
@@ -182,9 +182,10 @@ if(HAVE_MONOTONIC_CLOCK)
 endif()
 target_link_libraries(Xvnc dix mi vnc fb Xi composite mi damage damageext randr
 	record render os present Xext-server sync xfixes xkb ${X11_Xau_LIB}
-	${X11_Xdmcp_LIB} ${X11_Xfont2_LIB} ${X11_Fontenc_LIB} ${FREETYPE_LIBRARIES}
-	${X11_Pixman_LIB} sha1 ${TJPEG_LIBRARY} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES}
-	vncauth m pthread ${PAM_LIB} ${EXTRA_LIB})
+	${X11_Xdmcp_LIB} ${X11_Xfont2_LDFLAGS} ${X11_Fontenc_LDFLAGS}
+	${FREETYPE_LIBRARIES} ${X11_Pixman_LDFLAGS} sha1 ${TJPEG_LIBRARY}
+	${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} vncauth m pthread ${PAM_LIB}
+	${EXTRA_LIB})
 if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "(OpenBSD|FreeBSD|NetBSD|DragonFly)")
 	find_library(ICONV_LIBRARIES NAMES iconv)
 	target_link_libraries(Xvnc ${ICONV_LIBRARIES})
ooltip'>Fixes <https://bugs.gnu.org/36207>. Reported by Jack Hill <jackhill@jackhill.us>. * gnu/services/admin.scm: Remove unneeded import of (gnu services base). * gnu/services/mcron.scm: Likewise. Ludovic Courtès 2019-05-12services: mcron: Log to a file....This makes it easier to read the output, as it's recorded in a file. * gnu/services/mcron.scm (mcron-shepherd-services): Add #:log-file to make-forkexec-constructor. Christopher Baines 2019-01-28gnu: Move most packages from guile.scm to new module....* gnu/packages/guile.scm (artanis, guildhall, guile-aspell, guile-bash, guile-8sync, guile-daemon, guile-dsv, guile-fibers, guile-syntax-highlight, guile-sjson, guile-colorized, guile-pfds, guile-aa-tree, guile-simple-zmq, jupyter-guile-kernel, guile-sparql, guile-debbugs, guile-email, guile-debbugs-next, guile-newt, guile-mastodon, guile-parted, guile-xosd, guile-dbi, guile-dbd-sqlite3, guile-config, guile-hall, guile-ics, guile-wisp, guile-sly, g-wrap, guile-miniadapton, guile-reader, guile2.2-reader, guile-ncurses, guile-ncurses/gpm, guile-lib, guile2.0-lib, guile2.2-lib, guile-minikanren, guile2.0-minikanren, guile2.2-minikanren, guile-irregex, guile2.0-irregex, guile2.2-irregex, haunt, guile2.0-haunt, guile2.2-haunt, guile-redis, guile2.0-redis, guile2.2-redis, guile-commonmark, guile2.0-commonmark, guile2.2-commonmark, mcron, mcron2): Move these variables from here... * gnu/packages/guile-xyz.scm: ...to this new file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/installer.scm, gnu/packages/bioinformatics.scm, gnu/packages/ci.scm, gnu/packages/gtk.scm, gnu/packages/guile.scm, gnu/packages/mail.scm, gnu/packages/package-management.scm, gnu/packages/skribilo.scm, gnu/packages/web.scm, gnu/services/mcron.scm: Update module references. Ricardo Wurmus 2019-01-11services: Deprecate a few more service procedures....These procedures were already either undocumented (and de facto deprecated) or documented as deprecated or redundant. * gnu/services/base.scm (guix-service, guix-publish-service): Mark as deprecated. * gnu/services/mcron.scm (mcron-service): Likewise. * gnu/services/networking.scm (tor-service): Likewise. * doc/guix.texi (Scheduled Job Execution): Remove 'mcron-service' and adjust example. (Networking Services): Remove 'tor-service'. * gnu/tests/base.scm (%mcron-os): Use 'mcron-service-type' instead of 'mcron-service'. * gnu/tests/networking.scm (%tor-os): Use 'tor-service-type' instead of 'tor-service'. * tests/guix-system.sh: Likewise. Ludovic Courtès 2018-11-13services: mcron: Fix typo in comment....* gnu/services/mcron.scm (shepherd-schedule-action): Fix typo in comment. Ludovic Courtès 2018-07-13services: mcron: Add 'schedule' action....Inspired by <https://lists.gnu.org/archive/html/help-guix/2018-07/msg00035.html>. * gnu/services/mcron.scm (shepherd-schedule-action): New procedure. (mcron-shepherd-services): Add 'actions' field. * gnu/tests/base.scm (run-mcron-test)["schedule action"]: New test. * doc/guix.texi (Scheduled Job Execution): Mention 'herd schedule'. Ludovic Courtès 2018-03-19gnu: mcron: Update to 1.1 and deprecate "mcron2"....* gnu/packages/guile.scm (mcron): Update to 1.1. [native-inputs]: Add TZDATA-FOR-TESTS. [arguments]: New field. (mcron2): Define using 'deprecated-package'. * gnu/services/mcron.scm: Replace 'mcron2' with 'mcron'. * doc/guix.texi (Scheduled Job Execution): Likewise. * gnu/tests/base.scm (%mcron-os): Remove comment about mcron2. Ludovic Courtès 2017-04-16services: Add a default value to various service types....* gnu/services/admin.scm (rottlog-service-type)[default-value]: New field. * gnu/services/base.scm (guix-service-type)[default-value]: New field. (guix-publish-service-type)[default-value]: New field. * gnu/services/cups.scm (cups-service-type)[default-value]: New field. * gnu/services/dict.scm (dicod-service-type)[default-value]: New field. * gnu/services/mcron.scm (mcron-service-type)[default-value]: New field. * gnu/services/networking.scm (<tor-configuration>)[config-file]: Add default value. (tor-service-type)[default-value]: New field. (<bitlbee-configuration>)[interface, port, extra-settings]: Add default values. (bitlbee-service-type)[default-value]: New field. (wpa-supplicant-service-type)[default-value]: New field. (tlp-service-type)[default-value]: New field. (openssh-service-type)[default-value]: New field. * doc/guix.texi (Base Services, Log Rotation) (Networking Services, Printing Services): (Power management Services): Adjust examples accordingly. Ludovic Courtès 2016-06-22services: Add 'mcron-service'....* gnu/services/mcron.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/tests/base.scm (%mcron-os, %test-mcron): New variables. (run-mcron-test): New procedure. * doc/guix.texi (Scheduled Job Execution): New node. Ludovic Courtès