Paul Wise wrote:
I'm subscribed, no need to CC me.
On Tue, Jul 9, 2013 at 7:07 PM, Dmitrijs Ledkovs wrote:
One of the "library descriptors" that a-c-c supports is a list of
includes/directories.
Thus for $most packages just installing -dev package and pointing
a-c-c at the list of:
dpkg -L $pkg-dev | grep include lib
should do the right thing (more or less)
How would I feed that to a-c-c?
There is a simple Perl script to do that:
my $Package = $ARGV[0];
open(INFO, "dpkg -L $Package |");
my (@Libs, @Headers) = ();
while(<INFO>)
{
chomp($_);
if(/\/lib(|64)\// and /\.so(\Z|\W)/) {
push(@Libs, $_);
}
if(/\/include\// and $_ ne "/usr/include") {
push(@Headers, $_);
}
}
my $Version = `dpkg -s $Package|grep Version`;
chomp($Version);
$Version=~s/\AVersion:\s*//g;
print "
<version>
$Version
</version>
<headers>
".join("\n ", @Headers)."
</headers>
<libs>
".join("\n ", @Libs)."
</libs>
";
Run this script as:
perl script.pl package-dev
For example, it prints the following for libgrip-dev:
<version>
0.3.5-0ubuntu1~12.04.1
</version>
<headers>
/usr/include/libgrip
/usr/include/libgrip/grip.h
/usr/include/libgrip/gripinputdevice.h
/usr/include/libgrip/gripgesturemanager.h
</headers>
<libs>
/usr/lib/libgrip.so
</libs>
But I haven't gotten far enough to have this working automagically as
dep8 tests.
DEP-8 tests are per-package, I want something that would work for
every package that includes a library+headers.
--
Andrey Ponomarenko, ROSA Lab.
--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51dd1689.8070...@rosalab.ru