Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] freetype: clean XBPS_CROSS_TRIPLET reference in freetype-config
Date: Sun, 03 Jan 2021 14:18:39 +0100	[thread overview]
Message-ID: <20210103131839.1WQEGsj1LoT0T6felv5WF1ZLBUawBwENJd2MV_gWdHU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27599@inbox.vuxu.org>

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

There is an updated 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: 9360 bytes --]

From e141f445f90c14d3ca258fd2c7ff17d71741daf6 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 1/7] 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 | 15 ++++++++++++++-
 srcpkgs/freetype/template                       |  6 +++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh
index fe2000af11e..9ca195d5a58 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,15 @@ hook() {
 	pkgconfig_wrapper
 	vapigen_wrapper
 	valac_wrapper
+
+	if [ -x /usr/bin/pkg-config ]; then
+		link_wrapper freetype-config
+	else
+		generic_wrapper freetype-config
+	fi
+
 	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..ba4c6ad900c 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"
@@ -13,6 +13,10 @@ homepage="https://www.freetype.org/"
 distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784
 
+post_patch() {
+	vsed -i -e "s/%PKG_CONFIG%/pkg-config/" builds/unix/freetype-config.in
+}
+
 post_install() {
 	vlicense docs/LICENSE.TXT
 	vlicense docs/FTL.TXT

From cc37ad7a3945ced1c5c341e76bd3cb6168303f55 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: Sun, 3 Jan 2021 19:25:37 +0700
Subject: [PATCH 2/7] SDL_ttf: remove unnecessary CFLAGS

---
 srcpkgs/SDL_ttf/template | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/SDL_ttf/template b/srcpkgs/SDL_ttf/template
index 72293431f32..cdb46016a72 100644
--- a/srcpkgs/SDL_ttf/template
+++ b/srcpkgs/SDL_ttf/template
@@ -8,12 +8,14 @@ hostmakedepends="pkg-config"
 makedepends="freetype-devel SDL-devel libSM-devel"
 short_desc="Use TrueType fonts in your SDL applications"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="LGPL-2.1"
-homepage="http://www.libsdl.org/projects/${pkgname}"
+license="Zlib"
+homepage="http://www.libsdl.org/projects/SDL_ttf"
 distfiles="${homepage}/release/${pkgname}-${version}.tar.gz"
 checksum=724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7
 
-CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/freetype2"
+post_install() {
+	vlicense COPYING
+}
 
 SDL_ttf-devel_package() {
 	depends="freetype-devel SDL-devel ${sourcepkg}>=${version}_${revision}"

From 57933e9e909dd8d6a8a044675d82f090c62005db 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: Sun, 3 Jan 2021 19:25:37 +0700
Subject: [PATCH 3/7] libopenshot-audio: remove unnecessary CXXFLAGS

---
 srcpkgs/libopenshot-audio/template | 2 --
 1 file changed, 2 deletions(-)

diff --git a/srcpkgs/libopenshot-audio/template b/srcpkgs/libopenshot-audio/template
index d9a6a719734..56c330eafcf 100644
--- a/srcpkgs/libopenshot-audio/template
+++ b/srcpkgs/libopenshot-audio/template
@@ -13,8 +13,6 @@ homepage="https://github.com/OpenShot/libopenshot-audio"
 distfiles="https://github.com/OpenShot/libopenshot-audio/archive/v${version}.tar.gz"
 checksum=937ff4f1c2dfb8ab5d56ad85beacaa29dfd5a79af0d9cf647386034fe9882309
 
-CXXFLAGS="-I${XBPS_CROSS_BASE}/usr/include/freetype2"
-
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"
 	CXXFLAGS+=" -latomic "

From 33313a8c7913769f04a8d9c840bd844c9d3c74cb 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: Sun, 3 Jan 2021 19:25:37 +0700
Subject: [PATCH 4/7] tumbler: remove unnecessary CFLAGS

---
 srcpkgs/tumbler/template | 2 --
 1 file changed, 2 deletions(-)

diff --git a/srcpkgs/tumbler/template b/srcpkgs/tumbler/template
index fe37a85871a..dcdd7cfd40e 100644
--- a/srcpkgs/tumbler/template
+++ b/srcpkgs/tumbler/template
@@ -14,8 +14,6 @@ homepage="https://xfce.org/"
 distfiles="https://archive.xfce.org/src/xfce/${pkgname}/${version%.*}/${pkgname}-${version}.tar.bz2"
 checksum=9b0b7fed0c64041733d490b1b307297984629d0dd85369749617a8766850af66
 
-CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/freetype2"
-
 tumbler-devel_package() {
 	depends="libglib-devel ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

From 2e7e1bc7159c81d119ae190c80d0a7a2dad91492 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: Sun, 3 Jan 2021 19:47:18 +0700
Subject: [PATCH 5/7] wmx: simply template

---
 srcpkgs/wmx/template | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/wmx/template b/srcpkgs/wmx/template
index 32cd09e57b9..6e24a5419bb 100644
--- a/srcpkgs/wmx/template
+++ b/srcpkgs/wmx/template
@@ -1,15 +1,14 @@
 # Template file for 'wmx'
 pkgname=wmx
 version=8
-revision=3
+revision=4
 build_style=gnu-configure
-make_build_args="LDFLAGS+=-lXft LDFLAGS+=-lfontconfig
- CXXFLAGS+=-I${XBPS_CROSS_BASE}/usr/include/freetype2"
-makedepends="libX11-devel libXext-devel libXmu-devel libXpm-devel freetype-devel
- libXft-devel fontconfig-devel libXcomposite-devel"
+hostmakedepends="pkg-config"
+makedepends="libX11-devel libXext-devel libXmu-devel libXpm-devel
+ freetype-devel libXft-devel fontconfig-devel libXcomposite-devel"
 short_desc="Simple window manager for X"
 maintainer="Enno Boland <gottox@voidlinux.org>"
-license="BSD"
+license="BSD-2-Clause"
 homepage="http://www.all-day-breakfast.com/wmx"
 distfiles="http://www.all-day-breakfast.com/wmx/wmx-${version}.tar.gz"
 checksum=7316090e59fa8988219d6819e426870c6d8c0739818d77e8770e8108ddf0aedd
@@ -17,4 +16,8 @@ checksum=7316090e59fa8988219d6819e426870c6d8c0739818d77e8770e8108ddf0aedd
 do_install() {
 	vbin wmx
 	vinstall ${FILESDIR}/wmx.desktop 644 usr/share/xsessions
+	vlicense README
+	vlicense README.contrib
+	sed -ne '4,13p' Rotated.C >LICENSE.xvertext
+	vlicense LICENSE.xvertext
 }

From 468c8c427f5d73b4872e67e3f0402e2bb60a1130 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: Sun, 3 Jan 2021 19:57:25 +0700
Subject: [PATCH 6/7] slim: simplify template

---
 srcpkgs/slim/template | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/slim/template b/srcpkgs/slim/template
index b86c951e188..b7382cac308 100644
--- a/srcpkgs/slim/template
+++ b/srcpkgs/slim/template
@@ -3,8 +3,7 @@ pkgname=slim
 version=1.3.6
 revision=13
 build_style=cmake
-configure_args="-DUSE_CONSOLEKIT=no -DUSE_PAM=yes
- -DFREETYPE_INCLUDE_DIR_freetype2=${XBPS_CROSS_BASE}/usr/include/freetype2"
+configure_args="-DUSE_CONSOLEKIT=no -DUSE_PAM=yes"
 conf_files="/etc/slim.conf /etc/pam.d/slim"
 hostmakedepends="pkg-config"
 makedepends="libpng-devel freetype-devel libjpeg-turbo-devel libXrandr-devel
@@ -21,11 +20,8 @@ case "$XBPS_TARGET_MACHINE" in
 	*-musl) CXXFLAGS="-DNEEDS_BASENAME";;
 esac
 
-pre_configure() {
-	sed -i 's|set(LIBDIR "/lib")|set(LIBDIR "/usr/lib")|' CMakeLists.txt
-}
 post_install() {
 	vsv slim
 	vinstall ${FILESDIR}/slim.pam 644 etc/pam.d slim
-	rm -rf ${DESTDIR}/usr/lib/systemd
+	rm -rf ${DESTDIR}/lib/systemd
 }

From 08435e1448653916cb50fa5c53207d9864ea933f 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: Sun, 3 Jan 2021 19:57:44 +0700
Subject: [PATCH 7/7] texlive: remove freetype2-config hacks

---
 srcpkgs/texlive/template | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index f416e853534..42d7bfcdf45 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -172,16 +172,6 @@ post_patch() {
 	popd
 }
 
-pre_configure() {
-	if [ "$CROSS_BUILD" ] ; then
-		# For some reason, when cross-building, the configure script has this path
-		# for freetype2 include:
-		# /usr/x86_64-linux-musl/usr/x86_64-linux-musl/usr/include/freetype2.
-		# It shouldn't have two /usr/x86_64-linux-musl's, add it to CPPFLAGS.
-		CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include/freetype2"
-	fi
-}
-
 pre_build() {
 	if [ -n "$build_option_luajit" ] ; then
 		export HOST_CC="${_luajit_host_cc}"

  parent reply	other threads:[~2021-01-03 13:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-01 14:43 [PR PATCH] " 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 [this message]
2021-01-03 13:24 ` sgn
2021-01-03 23:28 ` [PR REVIEW] " sgn
2021-01-04 23:41 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210103131839.1WQEGsj1LoT0T6felv5WF1ZLBUawBwENJd2MV_gWdHU@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).