Source: execline
Version: 2.5.0.1-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

execline fails to cross build from source for multiple reason. The
apparent failure is a failure to find skanet. This is due to
debian/rules confusing build and host. Refer to man dpkg-architecture
for what they mean. This confusion is fixed by the attached
build_host.patch. Then we get a failure to find -lskarnet from make.
This is due to package/deps.mak listing -lskarnet as a makefile
dependency.  This is one of the few areas where make is
architecture-dependent. It will look up the library on the (build
architecture) library search path. However, skalibs-dev is (correctly)
requested for the host architecture and thus make fails. The correct
solution is to move -lskarnet from a makefile dependency to EXTRA_LIBS.
The second cross.patch implements that by changing the generator for
package/deps.mak. Unfortunately, it isn't run during build, so just
patching the generator is insufficient. You either need to run it once
before uploading or run it during build. After applying both patches,
execline cross builds successfully.

Helmut
diff --minimal -Nru execline-2.5.0.1/debian/rules execline-2.5.0.1/debian/rules
--- execline-2.5.0.1/debian/rules	2018-09-05 05:15:01.000000000 +0200
+++ execline-2.5.0.1/debian/rules	2018-12-30 22:14:06.000000000 +0100
@@ -8,11 +8,11 @@
 	dh $@
 
 override_dh_auto_configure-arch:
-	dh_auto_configure -- --dynlibdir=\$${prefix}/lib/$(DEB_BUILD_MULTIARCH) \
-		--libdir=\$${prefix}/lib/$(DEB_BUILD_MULTIARCH) \
-		--includedir=\$${prefix}/include/$(DEB_BUILD_MULTIARCH) \
+	dh_auto_configure -- --dynlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+		--includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH) \
 		--bindir=\$${prefix}/lib/execline/bin \
-		--with-sysdeps=/usr/lib/$(DEB_BUILD_MULTIARCH)/skalibs/sysdeps \
+		--with-sysdeps=/usr/lib/$(DEB_HOST_MULTIARCH)/skalibs/sysdeps \
 		--enable-absolute-paths \
 		--enable-shared --disable-allstatic
 
--- execline-2.5.0.1.orig/tools/gen-deps.sh
+++ execline-2.5.0.1/tools/gen-deps.sh
@@ -81,7 +81,7 @@
       if echo $dep | grep -q -- \\.o$ ; then
         dep="src/$dir/$dep"
       fi
-      if echo $dep | grep -q -- '^\${.*_LIB}' ; then
+      if echo $dep | grep -q -- '^\${.*_LIB}\|^-l' ; then
         libs="$libs $dep"
       else
         deps="$deps $dep"

Reply via email to