how to create a patch for configure?
macports at parvis.nl
macports at parvis.nl
Sun Apr 15 01:11:58 UTC 2018
Working on my missing dejavusansmono in rrdtool pango cairo fontconfig problem:
pango calls 'FcWeightFromOpenTypeDouble' an that function exists only in fontconfig >= 2.92
That implies changes to pango or fontconfig and I can't oversee the consequences.
But I verified pango source and it doesn't really use that function but still the older 'FcWeightFromOpenType'.
That means that if I bypass the configure check everything should work fine.
pango configure:18606
---------------------
if $have_fontconfig ; then
pango_save_libs=$LIBS
LIBS="$LIBS $FONTCONFIG_LIBS"
for ac_func in FcWeightFromOpenTypeDouble
do :
ac_fn_c_check_func "$LINENO" "FcWeightFromOpenTypeDouble" "ac_cv_func_FcWeightFromOpenTypeDouble"
if test "x$ac_cv_func_FcWeightFromOpenTypeDouble" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FCWEIGHTFROMOPENTYPEDOUBLE 1
_ACEOF
this check fails so HAVE_FCWEIGHTFROMOPENTYPEDOUBLE is still undefined. The result is that pango doesn't use fontconfig.
pango configure.ac:221
----------------------
if $have_fontconfig ; then
pango_save_libs=$LIBS
LIBS="$LIBS $FONTCONFIG_LIBS"
AC_CHECK_FUNCS(FcWeightFromOpenTypeDouble)
LIBS=$pango_save_libs
fi
here I want to disable AC_CHECK_FUNCS() and also add #define HAVE_FCWEIGHTFROMOPENTYPEDOUBLE 1 to confdefs.h
I made a patch resulting in
pango configure.ac:221
----------------------
if $have_fontconfig ; then
pango_save_libs=$LIBS
LIBS="$LIBS $FONTCONFIG_LIBS"
-> # AC_CHECK_FUNCS(FcWeightFromOpenTypeDouble)
-> cat >>confdefs.h <<_ACEOF
-> #define HAVE_FCWEIGHTFROMOPENTYPEDOUBLE 1
-> _ACEOF
LIBS=$pango_save_libs
fi
but Autoconf didn't run so configure was not updated so nothing changes.
Q1: if the patch result correct?
Q2: How should I do this in Portfile ?
More information about the macports-dev
mailing list