Package: afterstep Version: 2.2.12-12 Severity: serious Tags: patch ftbfs Justification: fails to build from source (but built successfully in the past)
Dear Maintainer, Bug is actually against the latest Debian maintainer patch (patch#57) by Robert Luberda <rob...@debian.org>, 30-Aug, 2018; which causes a FTBFS: Issue 1: (FTBFS) due to an extraneous, "@TTF_CFLAGS@" variable appended to line 107 ("NCS_EXTRA=...") of libAfterImage/Makefile.in, which is unreplaced in the generated Makefile, causing compile failure. Issue 2: The purpose of patch#57 was to remove the now-depreciated (and now non-existing) "freetype-config" function once used to configure truetype fonts, and instead use pkg-config. Problem is that the patch properly removes it from configure.in, but NOT from configure itself causing "--with-ttf" to no longer work (effectively always "no"). I simply untacked the latest source package v2.2.12-12 from Debian Testing (http://ftp.gr.debian.org/debian/) on March 25, 2019, ran: ./configure make and it fails to compile; ... gcc -O3 -DNO_DEBUG_OUTPUT -fPIC -c xwrap.c /bin/rm -f libAfterBase.a ar clq libAfterBase.a ashash.o aslist.o asvector.o audit.o fs.o layout.o mystri$ ranlib libAfterBase.a make[1]: Leaving directory '/tmp/pristine/afterstep-2.2.12/libAfterBase' make[1]: Entering directory '/tmp/pristine/afterstep-2.2.12/libAfterImage' asimage.c gcc -O3 -DNO_DEBUG_OUTPUT -fPIC -mmmx -Winline --param inline-unit- growth=100$ gcc: error: TTF_CFLAGS@: No such file or directory make[1]: *** [Makefile:381: asimage.o] Error 1 make[1]: Leaving directory '/tmp/pristine/afterstep-2.2.12/libAfterImage' make: *** [Makefile:177: all] Error 1 I was successful in building afterstep after applying the following patch I created to correct both these issues, please consider, and edit as necessary for a new "patch#58" to resolve these two issues. Thanks, Jim Turner -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.0.0-3.1-liquorix-amd64 (SMP w/4 CPU cores; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_US.iso88591, LC_CTYPE=en_US.iso88591 (charmap=ISO-8859-1), LANGUAGE=en_US.iso88591 (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages afterstep depends on: ii afterstep-data 2.2.12-12 ii aterm 9.22-6 ii imagemagick 8:6.9.10.23+dfsg-2 ii imagemagick-6.q16 [imagemagick] 8:6.9.10.23+dfsg-2 ii libafterimage0 2.2.12-12 ii libafterstep1 2.2.12-12 ii libc6 2.28-8 ii libdbus-1-3 1.12.12-1.0nosystemd1 ii libglib2.0-0 2.58.3-1 ii libgtk2.0-0 2.24.32-3 ii libreadline7 7.0-5 ii libx11-6 2:1.6.7-1 ii libxext6 2:1.3.3-1+b2 ii lxterminal [x-terminal-emulator] 0.3.2-1 ii menu 2.1.47 ii menu-xdg 0.6 ii perl 5.28.1-4 ii roxterm-gtk3 [x-terminal-emulator] 2.9.5-1 ii rxvt-unicode [x-terminal-emulator] 9.22-6 ii sensible-utils 0.0.12 ii ucf 3.0038+nmu1 Versions of packages afterstep recommends: ii gnome-themes-extra 3.28-1 Versions of packages afterstep suggests: pn asmail <none> ii asmon 0.71-5.1+b1 ii mc 3:4.8.22-1 pn wmcpuload <none> ii wmitime 0.5-2+b1 ii xscreensaver 5.42+dfsg1-1 -- no debconf information
diff libAfterImage/configure libAfterImage/configure.NEW index bc74bfe..9995dda 100755 --- libAfterImage/configure +++ libAfterImage/configure.NEW @@ -6443,210 +6443,257 @@ AFTERIMAGE_LIBS="$AFTERIMAGE_LIBS -lm" TTF_INCLUDES= +have_ttf= +if test "$with_ttf" = no; then + have_ttf=disabled +else + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -if test "x$with_ttf" = "xno"; then - have_ttf=disabled -else - if test "x$ttf_includes" = "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking headers required by TTF support" >&5 -$as_echo_n "checking headers required by TTF support... " >&6; } - if freetype-config --cflags >/dev/null ;then - present_incs="$CCFLAGS $x_includes"; - for l in `freetype-config --cflags` ; do - inc_found=no - for p in `echo "$present_incs"` ; do - if test "x$l" = "x$p" ; then - inc_found=yes; - fi; - if test "x$l" = "x-I$p" ; then - inc_found=yes; - fi; - done; - if test "x$inc_found" != "xyes" ; then - TTF_INCLUDES="$TTF_INCLUDES $l" ; - fi; - done; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TTF_INCLUDES" >&5 -$as_echo "$TTF_INCLUDES" >&6; } - saved_CPPFLAGS=$CPPFLAGS - saved_CFLAGS=$CFLAGS - CPPFLAGS="$TTF_INCLUDES $CPPFLAGS" - CFLAGS="$CFLAGS $TTF_INCLUDES $XPM_CFLAGS $JPEG_CFLAGS $PNG_CFLAGS $GIF_CFLAGS $TIFF_CFLAGS $SVG_CFLAGS $X_CFLAGS" - have_ft2build=no - for ac_header in ft2build.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default" -if test "x$ac_cv_header_ft2build_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FT2BUILD_H 1 -_ACEOF - have_ft2build=yes + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking freetype/freetype.h " >&5 -$as_echo_n "checking freetype/freetype.h ... " >&6; } - have_ttf=no - have_freetype_freetype=no - have_freetype=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <freetype/freetype.h> + fi + if test "$PKG_CONFIG" = "no" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freetype2 is available" >&5 +$as_echo_n "checking if freetype2 is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pkg-config is not found. Cannot check for freetype2." >&5 +$as_echo "pkg-config is not found. Cannot check for freetype2." >&6; } + have_ttf=no + else + have_ttf=yes + pkg_modules="freetype2" -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "FT_Face" >/dev/null 2>&1; then : - have_freetype_freetype=yes + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; };{ $as_echo "$as_me:${as_lineno-$LINENO}: checking freetype.h" >&5 -$as_echo_n "checking freetype.h... " >&6; }; \ - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <freetype.h> + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "FT_Face" >/dev/null 2>&1; then : - have_freetype=yes + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -f conftest* fi -rm -f conftest* - - if test "x$have_ft2build" = "xno" ; then - if test "x$have_freetype_freetype" = "xyes" ; then - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <freetype/freetype.h> - int main(){FT_Face f; return 0;} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - have_ttf=yes + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi - elif test "x$have_freetype" = "xyes" ; then - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <freetype.h> - int main(){FT_Face f; return 0;} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - have_ttf=yes + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi - fi; - elif test "x$have_freetype_freetype" = "xyes" ; then - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ft2build.h> - #include <freetype/freetype.h> - int main(){FT_Face f; return 0;} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - have_ttf=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + fi - elif test "x$have_freetype" = "xyes" ; then - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTF" >&5 +$as_echo_n "checking for TTF... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$TTF_CFLAGS"; then + pkg_cv_TTF_CFLAGS="$TTF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_TTF_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ft2build.h> - #include <freetype.h> - int main(){FT_Face f; return 0;} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - have_ttf=yes + pkg_failed=yes +fi + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + pkg_failed=untried fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if test -n "$PKG_CONFIG"; then + if test -n "$TTF_LIBS"; then + pkg_cv_TTF_LIBS="$TTF_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_TTF_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi; - if test "x$have_ttf" = "xyes" ; then -$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h - if test "x$have_freetype_freetype" = "xyes" ; then +if test $pkg_failed = yes; then -$as_echo "#define HAVE_FREETYPE_FREETYPE 1" >>confdefs.h +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + TTF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$pkg_modules"` + else + TTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` + fi + # Put the nasty error message in config.log where it belongs + echo "$TTF_PKG_ERRORS" >&5 - fi; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + have_ttf=no +elif test $pkg_failed = untried; then + have_ttf=no +else + TTF_CFLAGS=$pkg_cv_TTF_CFLAGS + TTF_LIBS=$pkg_cv_TTF_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - fi; - CPPFLAGS=$saved_CPPFLAGS - CFLAGS=$saved_CFLAGS - else - enable_ttf=no ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5 -$as_echo "none found" >&6; } - echo "You have to install FreeType libary in order to be able to use TTF fonts." - have_ttf=no - fi; - else - TTF_INCLUDES=$ttf_includes - -$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h + : +fi - have_ttf=yes - fi - if test "$have_ttf" = yes; then - AFTERIMAGE_LIBS="`freetype-config --libs` $AFTERIMAGE_LIBS" - fi -fi; + if test "x$have_ttf" = "xyes"; then +$as_echo "#define HAVE_TTF 1" >>confdefs.h + AFTERIMAGE_LIBS="$TTF_LIBS $AFTERIMAGE_LIBS" + fi + fi +fi diff libAfterImage/Makefile.in libAfterImage/Makefile.in.NEW index 2dc209f..87ec524 100644 --- libAfterImage/Makefile.in +++ libAfterImage/Makefile.in.NEW @@ -104,7 +104,7 @@ INSTALL_HEADER = @INSTALL@ -m 644 INSTALL_LIB = @INSTALL@ -m 755 INSTALL_SCRIPT = @INSTALL@ -m 755 -INCS_EXTRA = @XPM_CFLAGS@ @JPEG_CFLAGS@ @PNG_CFLAGS@ @GIF_CFLAGS@ @TIFF_CFLAGS@ @SVG_CFLAGS@ @TTF_CFLAGS@ +INCS_EXTRA = @XPM_CFLAGS@ @JPEG_CFLAGS@ @PNG_CFLAGS@ @GIF_CFLAGS@ @TIFF_CFLAGS@ @SVG_CFLAGS@ INCS_X = @X_CFLAGS@ INCS_PRIVATE = INCLUDES = $(INCS_EXTRA) $(INCS_PRIVATE) $(INCS_X)