Package: libtolua++5.1-dev Version: 1.0.93-3.1 Tags: patch libtolua++5.1-dev cannot be used for cross compilation. If you install it for the host architecture, the tolua++5.1 tool cannot be run. If you install it for the build architecture, the static library cannot be linked. Quite fundamentally, for cross building one needs to combine a build architecture tolua++5.1 converter and a host architecture static library. Quite obviously, this requirement translates to using different binary packages for these components. I'm attaching a patch to implement exactly that. Please consider applying it.
A not so obvious requirement for doing this is that tolua++5.1 actually behaves in an architecture-independent way. Otherwise, a package containing it must not be marked Multi-Arch: foreign, which would render the exercise pointless. I've looked into it and it essentially deals with text files only, which is a good sign already. Moreover none of the inputs nor outputs look architecture-dependent in any way to me (which kinda is expected from source files). So it looks like we're good on this. Helmut
diff --minimal -Nru tolua++-1.0.93/debian/changelog tolua++-1.0.93/debian/changelog --- tolua++-1.0.93/debian/changelog 2020-05-20 11:39:04.000000000 +0200 +++ tolua++-1.0.93/debian/changelog 2022-04-28 06:52:16.000000000 +0200 @@ -1,3 +1,10 @@ +tolua++ (1.0.93-3.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Spit tolua++5.1 into a Multi-Arch: foreign package. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Thu, 28 Apr 2022 06:52:16 +0200 + tolua++ (1.0.93-3.1) unstable; urgency=medium * Non-maintainer upload. diff --minimal -Nru tolua++-1.0.93/debian/control tolua++-1.0.93/debian/control --- tolua++-1.0.93/debian/control 2020-05-20 11:36:23.000000000 +0200 +++ tolua++-1.0.93/debian/control 2022-04-27 19:59:32.000000000 +0200 @@ -11,7 +11,7 @@ Package: libtolua++5.1-dev Section: libdevel Architecture: any -Depends: liblua5.1-dev, ${misc:Depends}, ${shlibs:Depends} +Depends: liblua5.1-dev, libtolua++5.1-bin (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Description: extended tool to integrate C/C++ code with Lua (devel) tolua++5.1 is an extension of toLua, a tool to integrate C/C++ code with Lua. tolua++5.1 includes new features oriented to c++, such as class @@ -22,3 +22,24 @@ metamethod facilities, the current version automatically maps C/C++ constants, external variables, functions, namespace, classes, and methods to Lua. It also provides facilities to create Lua modules. + +Package: libtolua++5.1-bin +Section: libdevel +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends} +Breaks: libtolua++5.1-dev (<< 1.0.93-3.2~) +Replaces: libtolua++5.1-dev (<< 1.0.93-3.2~) +Description: extended tool to integrate C/C++ code with Lua (tolua++5.1 converter) + tolua++5.1 is an extension of toLua, a tool to integrate C/C++ code with + Lua. tolua++5.1 includes new features oriented to c++, such as class + templates and is compiled with the newest lua 5.1. + . + Based on a "cleaned" header file, tolua++ automatically generates + the binding code to access C/C++ features from Lua. Using Lua-5.1 API and + metamethod facilities, the current version automatically maps C/C++ + constants, external variables, functions, namespace, classes, and methods + to Lua. It also provides facilities to create Lua modules. + . + This package contains the tolua++5.1 conversion utility. Use + libtolua++5.1-dev instead. diff --minimal -Nru tolua++-1.0.93/debian/doc-base tolua++-1.0.93/debian/doc-base --- tolua++-1.0.93/debian/doc-base 2012-05-09 08:24:15.000000000 +0200 +++ tolua++-1.0.93/debian/doc-base 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -Document: tolua++-manual -Title: toLua++ Reference Manual -Abstract: This manual describes how to use toLua, a tool to integrate C/C++ - code with Lua. -Section: Programming - -Format: HTML -Index: /usr/share/doc/libtolua++5.1-dev/index.html -Files: /usr/share/doc/libtolua++5.1-dev/*.html diff --minimal -Nru tolua++-1.0.93/debian/docs tolua++-1.0.93/debian/docs --- tolua++-1.0.93/debian/docs 2010-03-02 23:27:15.000000000 +0100 +++ tolua++-1.0.93/debian/docs 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -doc/index.html -doc/tolua++.html -doc/toluapp.gif -README-5.1 diff --minimal -Nru tolua++-1.0.93/debian/libtolua++5.1-bin.install tolua++-1.0.93/debian/libtolua++5.1-bin.install --- tolua++-1.0.93/debian/libtolua++5.1-bin.install 1970-01-01 01:00:00.000000000 +0100 +++ tolua++-1.0.93/debian/libtolua++5.1-bin.install 2022-04-28 06:52:12.000000000 +0200 @@ -0,0 +1 @@ +usr/bin diff --minimal -Nru tolua++-1.0.93/debian/libtolua++5.1-bin.manpages tolua++-1.0.93/debian/libtolua++5.1-bin.manpages --- tolua++-1.0.93/debian/libtolua++5.1-bin.manpages 1970-01-01 01:00:00.000000000 +0100 +++ tolua++-1.0.93/debian/libtolua++5.1-bin.manpages 2012-05-09 08:06:48.000000000 +0200 @@ -0,0 +1 @@ +debian/tolua++5.1.1 diff --minimal -Nru tolua++-1.0.93/debian/libtolua++5.1-dev.doc-base tolua++-1.0.93/debian/libtolua++5.1-dev.doc-base --- tolua++-1.0.93/debian/libtolua++5.1-dev.doc-base 1970-01-01 01:00:00.000000000 +0100 +++ tolua++-1.0.93/debian/libtolua++5.1-dev.doc-base 2012-05-09 08:24:15.000000000 +0200 @@ -0,0 +1,9 @@ +Document: tolua++-manual +Title: toLua++ Reference Manual +Abstract: This manual describes how to use toLua, a tool to integrate C/C++ + code with Lua. +Section: Programming + +Format: HTML +Index: /usr/share/doc/libtolua++5.1-dev/index.html +Files: /usr/share/doc/libtolua++5.1-dev/*.html diff --minimal -Nru tolua++-1.0.93/debian/libtolua++5.1-dev.docs tolua++-1.0.93/debian/libtolua++5.1-dev.docs --- tolua++-1.0.93/debian/libtolua++5.1-dev.docs 1970-01-01 01:00:00.000000000 +0100 +++ tolua++-1.0.93/debian/libtolua++5.1-dev.docs 2010-03-02 23:27:15.000000000 +0100 @@ -0,0 +1,4 @@ +doc/index.html +doc/tolua++.html +doc/toluapp.gif +README-5.1 diff --minimal -Nru tolua++-1.0.93/debian/libtolua++5.1-dev.install tolua++-1.0.93/debian/libtolua++5.1-dev.install --- tolua++-1.0.93/debian/libtolua++5.1-dev.install 1970-01-01 01:00:00.000000000 +0100 +++ tolua++-1.0.93/debian/libtolua++5.1-dev.install 2022-04-28 06:52:03.000000000 +0200 @@ -0,0 +1,2 @@ +usr/include +usr/lib diff --minimal -Nru tolua++-1.0.93/debian/manpages tolua++-1.0.93/debian/manpages --- tolua++-1.0.93/debian/manpages 2012-05-09 08:06:48.000000000 +0200 +++ tolua++-1.0.93/debian/manpages 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -debian/tolua++5.1.1 diff --minimal -Nru tolua++-1.0.93/debian/rules tolua++-1.0.93/debian/rules --- tolua++-1.0.93/debian/rules 2012-05-09 08:06:56.000000000 +0200 +++ tolua++-1.0.93/debian/rules 2022-04-28 06:52:16.000000000 +0200 @@ -10,7 +10,7 @@ override_dh_auto_configure: cp $(CURDIR)/debian/custom.py $(CURDIR) - scons prefix=$(CURDIR)/debian/libtolua++5.1-dev/usr configure + scons prefix=$(CURDIR)/debian/tmp/usr configure override_dh_auto_build: scons all