Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] freetype: clean XBPS_CROSS_TRIPLET reference in freetype-config
@ 2021-01-01 14:43 sgn
  2021-01-02  2:37 ` [PR REVIEW] " ericonr
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sgn @ 2021-01-01 14:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages freetype-fix-config
https://github.com/void-linux/void-packages/pull/27599

freetype: clean XBPS_CROSS_TRIPLET reference in freetype-config
* $XBPS_CROSS_TRIPLET-pkg-config is our wrapper not a real executable
* In a build that have both freetype-config and pkg-config,
  $XBPS_CROSS_BASE will be prepended twice with current system,
  let's fix it.

A patch file from https://github.com/void-linux/void-packages/pull/27599.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-freetype-fix-config-27599.patch --]
[-- Type: text/x-diff, Size: 2583 bytes --]

From ad65e619c4cc51b350b71b260d031c3ad3d31de7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 1 Jan 2021 21:27:02 +0700
Subject: [PATCH] freetype: clean XBPS_CROSS_TRIPLET reference in
 freetype-config

* $XBPS_CROSS_TRIPLET-pkg-config is our wrapper not a real executable
* In a build that have both freetype-config and pkg-config,
  $XBPS_CROSS_BASE will be prepended twice with current system,
  let's fix it.
---
 common/hooks/pre-configure/02-script-wrapper.sh |  9 ++++++++-
 srcpkgs/freetype/template                       | 10 ++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh
index fe2000af11e..c3a0326027b 100644
--- a/common/hooks/pre-configure/02-script-wrapper.sh
+++ b/common/hooks/pre-configure/02-script-wrapper.sh
@@ -175,6 +175,13 @@ install_cross_wrappers() {
 	done
 }
 
+link_wrapper() {
+	local wrapper="$1"
+	[ ! -x "${XBPS_CROSS_BASE}/usr/bin/${wrapper}" ] && return 0
+	[ -L "${XBPS_WRAPPERDIR}/${wrapper}" ] && return 0
+	ln -sf "${XBPS_CROSS_BASE}/usr/bin/${wrapper}" "${XBPS_WRAPPERDIR}"
+}
+
 hook() {
 	export PATH="$XBPS_WRAPPERDIR:$PATH"
 
@@ -186,9 +193,9 @@ hook() {
 	pkgconfig_wrapper
 	vapigen_wrapper
 	valac_wrapper
+	link_wrapper freetype-config
 	generic_wrapper icu-config
 	generic_wrapper libgcrypt-config
-	generic_wrapper freetype-config
 	generic_wrapper sdl-config
 	generic_wrapper sdl2-config
 	generic_wrapper gpgme-config
diff --git a/srcpkgs/freetype/template b/srcpkgs/freetype/template
index 9727cbb153f..12a15e8ce69 100644
--- a/srcpkgs/freetype/template
+++ b/srcpkgs/freetype/template
@@ -1,7 +1,7 @@
 # Template file for 'freetype'
 pkgname=freetype
 version=2.10.4
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-freetype-config"
 hostmakedepends="pkg-config"
@@ -16,10 +16,16 @@ checksum=86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784
 post_install() {
 	vlicense docs/LICENSE.TXT
 	vlicense docs/FTL.TXT
+	if [ "$CROSS_BUILD" ]; then
+		sed -i -e "s/${XBPS_CROSS_TRIPLET}-pkg-config/pkg-config/" \
+			$DESTDIR/usr/bin/freetype-config
+	fi
 }
 
 freetype-devel_package() {
-	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
+	# depends on pkg-config unconditionally to simplify our wrappers
+	depends="${makedepends} pkg-config
+	 ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		for f in bin include share; do

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-04 23:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-01 14:43 [PR PATCH] freetype: clean XBPS_CROSS_TRIPLET reference in freetype-config sgn
2021-01-02  2:37 ` [PR REVIEW] " ericonr
2021-01-03  9:23 ` sgn
2021-01-03 13:06 ` [PR PATCH] [Updated] " sgn
2021-01-03 13:17 ` sgn
2021-01-03 13:18 ` sgn
2021-01-03 13:24 ` sgn
2021-01-03 23:28 ` [PR REVIEW] " sgn
2021-01-04 23:41 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).