diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch new file mode 100644 index 0000000..4b52f8c --- /dev/null +++ b/debian/patches/cross.patch @@ -0,0 +1,41 @@ +Description: Fix cross build + ibutils fails to cross build from source, because it abuses + AC_CHECK_FILE to discover includes. AC_CHECK_FILE is meant for + discovering files on the host machine, but here it is being used for + discovering files on the build machine. A simple test -f is better and + makes ibutils cross buildable. +Bug-Debian: https://bugs.debian.org/900673 + +--- ibutils-1.5.7+0.2.gbd7e502.orig/ibis/config/osm.m4 ++++ ibutils-1.5.7+0.2.gbd7e502/ibis/config/osm.m4 +@@ -166,7 +166,7 @@ + + + dnl validate the defined path - so the build id header is there +- AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,, ++ AS_IF([test -f "$osm_include_dir/opensm/osm_config.h"],, + AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h])) + + dnl now figure out somehow if the build was for debug or not +--- ibutils-1.5.7+0.2.gbd7e502.orig/config/osm.m4 ++++ ibutils-1.5.7+0.2.gbd7e502/config/osm.m4 +@@ -166,7 +166,7 @@ + + + dnl validate the defined path - so the build id header is there +- AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,, ++ AS_IF([test -f "$osm_include_dir/opensm/osm_config.h"],, + AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h])) + + dnl now figure out somehow if the build was for debug or not +--- ibutils-1.5.7+0.2.gbd7e502.orig/ibmgtsim/config/osm.m4 ++++ ibutils-1.5.7+0.2.gbd7e502/ibmgtsim/config/osm.m4 +@@ -166,7 +166,7 @@ + + + dnl validate the defined path - so the build id header is there +- AC_CHECK_FILE($osm_include_dir/opensm/osm_config.h,, ++ AS_IF([test -f "$osm_include_dir/opensm/osm_config.h"],, + AC_MSG_ERROR([OSM: could not find $with_osm/include/opensm/osm_config.h])) + + dnl now figure out somehow if the build was for debug or not diff --git a/debian/patches/series b/debian/patches/series index cf8bca4..78935a6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 03-remove-rpath.patch do_not_use_tmp.patch makefile_dependencies.patch +cross.patch