Excuse the late reply (I only dip into c.s.r-pi) but have you looked at apt-offline ? I haven't used it myself but it's designed to allow installing and updating via APT on a non-connected host. Generally speaking it should save you lots of effort in building the libraries you need, as you can just install the existing libXXX-dev package to get the required headers and libs to link against.
Nick