[ gpsdrive ] improvement to debian build rules
Hamish
hamish_b at yahoo.com
Mon Jan 26 12:39:24 AKST 2009
Hi,
for rev 2289 ("Only use GDA3 if available on the system") I think the
test is broken?
for one thing apt-cache tells you if the package is available in the
distribution, not if it is installed on the system. for another thing I
am not sure the if/then statement acts as expected- it always tests as
true AFAICT.
+ if apt-cache search libgda3-dev | grep -q libgda3-dev ; echo $? ; then \
+ cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
...
+ -D WITH_GDA3:BOOL=OFF \
I am not totally convinced that this sort of helpful automation is
actually worth it, but.....
perhaps better:
if dpkg -l libgda3-dev > /dev/null ; then
echo "have GDA3-dev"
else
echo "do not have GDA3-dev"
fi
also better would be to somehow follow the setting in
DefineOptions.cmake instead of deciding based on what is
installed (for users with the libgda3-dev package installed
who do not want it in the build).
In the past I have used -DWITH_GDA3=OFF there, is
"-D WITH_GDA3:BOOL=OFF" better?
Hamish
More information about the GPSdrive
mailing list