Bug#803645: fixed in libclang-perl 0.09-3

gregor herrmann gregoa at debian.org
Tue Dec 1 21:40:32 UTC 2015


Control: tag -1 + patch

On Tue, 01 Dec 2015 10:47:51 +0100, Emilio Pozuelo Monfort wrote:

> >  libclang-perl (0.09-3) unstable; urgency=low
> >  .
> >    * Add patch to use clang-3.8 instead of clang-3.5
> >      Thanks Sylvestre Ledru for the bug report. (Closes: #803645)
> >    * Depends on libclang-3.8-dev
> 
> That's wrong. 3.8 comes from llvm-toolchain-snapshot, which
> 
> a) isn't built everywhere
> b) won't migrate to testing
> 
> You should really use 3.6 or (preferably) 3.7 as Sylvestre said.

Thanks Emilio, and sorry for not noticing this problem.

Fixing this would be simple with s/3\.8/3.7/g but hardcoding the
version number makes me a bit unhappy, just using the default
llvm/clang version would be nicer and would allow for simple binNMUs
when the default changes.

And it seems to be quite simple. What I did now was:
- drop the patch
- make the following changes only to the packaging:

#v+
diff --git a/debian/control b/debian/control
index ae0cc46..5e8eb97 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Uploaders: Lucas Kanashiro <kanashiro.duarte at gmail.com>
 Build-Depends: debhelper (>= 9.20120312~),
                libdevel-checklib-perl,
                perl,
-               libclang-3.8-dev,
+               libclang-dev,
+               llvm,
                chrpath
 Standards-Version: 3.9.6
 Homepage: https://metacpan.org/release/Clang
diff --git a/debian/rules b/debian/rules
index e1b8283..9936422 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,15 @@
 PACKAGE = $(shell dh_listpackages)
 TMP     = $(CURDIR)/debian/$(PACKAGE)
 ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
+LLVMLIB := $(shell llvm-config --libdir)
+LLVMINC := $(shell llvm-config --includedir)

 %:
        dh $@

+override_dh_auto_configure:
+       dh_auto_configure -- LIBS="-L$(LLVMLIB) -lclang" INC="-I$(LLVMINC)"
+
 override_dh_auto_build:
        dh_auto_build
        chrpath -d $(CURDIR)/blib/arch/auto/Clang/Clang.so
#v-

The package builds, passes the test suite and the autopkgtests, and
unsurprisingly catches a runtime dependency on 'libclang1-3.6 (>=
3.4)'.

Does this make sense? (Adding Alessandro as well as both upstream and
DD.)


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Dire Straits: Sultans Of Swing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20151201/a3b8757f/attachment-0001.sig>


More information about the pkg-perl-maintainers mailing list