Source: hannah Version: 2.0.1+ds1-0.2 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
hannah fails to cross build from source, because the upstream Makefile.am hard codes the build architecture pkg-config. Using pkg-config in Makefile.am usually is a bad idea. Rather, such aspects should be detected at configure time and indeed the configure.ac performs the necessary detection already. All that is missing is transferring the detected values from configure.ac to Makefile.am. I'm attaching a patch for your convenience. Helmut
--- hannah-2.0.1+ds1.orig/Makefile.am +++ hannah-2.0.1+ds1/Makefile.am @@ -11,7 +11,7 @@ # Additional CFLAGS AM_CPPFLAGS = $(SDL_CFLAGS) -DDATA_INSTALL_DIR=\"$(DATA_INSTALL_DIR)\" # LIBS comes after the G++ sources, so library files need to go here -LIBS = $(shell pkg-config --libs sdl2 SDL2_image SDL2_mixer SDL2_ttf) +LIBS = $(SDL2_image_LIBS) $(SDL2_mixer_LIBS) $(SDL2_ttf_LIBS) # the create_file_list.sh script generates the below include file listing all files and their output directories include hannah_files.mk # Additional files that need to be included in a release --- hannah-2.0.1+ds1.orig/configure.ac +++ hannah-2.0.1+ds1/configure.ac @@ -5,7 +5,10 @@ AC_PROG_CXX AM_PATH_SDL2([2.0.5]) PKG_CHECK_MODULES([SDL2_image], [SDL2_image]) +AC_SUBST([SDL2_image_LIBS]) PKG_CHECK_MODULES([SDL2_mixer], [SDL2_mixer]) +AC_SUBST([SDL2_mixer_LIBS]) PKG_CHECK_MODULES([SDL2_ttf], [SDL2_ttf]) +AC_SUBST([SDL2_ttf_LIBS]) AC_CONFIG_FILES(Makefile) AC_OUTPUT