portage-overlay

personal portage ebuild repository
git clone anongit@rnpnr.xyz:portage-overlay.git
Log | Files | Refs | Feed | README

ncmpcpp-taglib-pc.patch (1582B)


      1 From 8796a4469795dfb067d02e19ddb3ae380d9b2fc3 Mon Sep 17 00:00:00 2001
      2 From: James Le Cuirot <chewi@gentoo.org>
      3 Date: Thu, 10 Nov 2022 23:58:33 +0000
      4 Subject: [PATCH] Check for taglib with pkg-config before trying taglib-config
      5 
      6 Programs like taglib-config are not good when cross-compiling.
      7 ---
      8  configure.ac | 27 +++++++++++++++++++--------
      9  1 file changed, 19 insertions(+), 8 deletions(-)
     10 
     11 diff --git a/configure.ac b/configure.ac
     12 index ef0c52b7..193840e6 100644
     13 --- a/configure.ac
     14 +++ b/configure.ac
     15 @@ -257,19 +257,30 @@ PKG_CHECK_MODULES([libcurl], [libcurl], [
     16  
     17  # taglib
     18  if test "$taglib" != "no" ; then
     19 -	AC_PATH_PROG(TAGLIB_CONFIG, taglib-config)
     20 -	if test "$TAGLIB_CONFIG" != "" ; then
     21 -		CPPFLAGS="$CPPFLAGS `$TAGLIB_CONFIG --cflags`"
     22 -		LIBS="$LIBS `$TAGLIB_CONFIG --libs`"
     23 +	PKG_CHECK_MODULES([taglib], [taglib], [
     24 +		AC_SUBST(taglib_CFLAGS)
     25 +		AC_SUBST(taglib_LIBS)
     26 +	], [
     27 +		AC_PATH_PROG([TAGLIB_CONFIG], [taglib-config])
     28 +		if test "$TAGLIB_CONFIG" != ""; then
     29 +			taglib_CFLAGS=`$TAGLIB_CONFIG --cflags`
     30 +			taglib_LIBS=`$TAGLIB_CONFIG --libs`
     31 +		else
     32 +			if test "$taglib" = "yes" ; then
     33 +				AC_MSG_ERROR([could not find taglib.pc or taglib-config executable])
     34 +			fi
     35 +		fi
     36 +	])
     37 +
     38 +	if test "$TAGLIB_CONFIG$taglib_LIBS" != "" ; then
     39 +		CPPFLAGS="$CPPFLAGS $taglib_CFLAGS"
     40 +		LIBS="$LIBS $taglib_LIBS"
     41 +
     42  		AC_CHECK_HEADERS([taglib.h], ,
     43  			if test "$taglib" = "yes" ; then
     44  				AC_MSG_ERROR([missing taglib.h header])
     45  			fi
     46  		)
     47 -	else
     48 -		if test "$taglib" = "yes" ; then
     49 -			AC_MSG_ERROR([taglib-config executable is missing])
     50 -		fi
     51  	fi
     52  fi
     53  
     54 -- 
     55 2.38.1
     56