Bug#803645: fixed in libclang-perl 0.09-3
Emilio Pozuelo Monfort
pochu at debian.org
Tue Dec 1 23:38:38 UTC 2015
On 01/12/15 22:40, gregor herrmann wrote:
> 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.)
That's even better, indeed! Sylvestre can better comment on the approach, it
looks sensible to me but I don't know if there is a better way.
Cheers,
Emilio
More information about the pkg-perl-maintainers
mailing list