Skip Menu |

This queue is for tickets about the Text-Bidi CPAN distribution.

Report information
The Basics
Id: 108738
Status: resolved
Priority: 0/
Queue: Text-Bidi

People
Owner: kamensky [...] cpan.org
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.11
Fixed in: (no value)



Subject: Install generated lib/Text/Bidi/private.pm
If I purge the two SWIG-generated files before building the sources, tests fails on missing Text::Bidi::private module. I clean all the generated files because building from real sources is vital for open source distributions. This is because the Makefile generates the lib/Text/Bidi/private.pm after copying lib files into blib directory and also because the file does not exist when Makefile.PL is executed. Attached patch fixes it.
Subject: 0001-Install-generated-lib-Text-Bidi-private.pm.patch
From c183b29ca92352849499b7d57d82cad6f31f03bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Wed, 11 Nov 2015 14:32:05 +0100 Subject: [PATCH] Install generated lib/Text/Bidi/private.pm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If swig-generated files are purged before running Makefile.PL, the lib/Text/Bidi/private.pm will not be installed. This change ensures the file is generated before copying modules from lib to blib. Signed-off-by: Petr Písař <ppisar@redhat.com> --- Makefile.PL | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 847652e..208f7be 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -32,6 +32,18 @@ EOF $cflags = '-I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include'; } +# lib/Text/Bidi/private.pm is generated, thus possibly not present when +# running Makefile.PL. +my %PM = map {'lib/' . $_ => '$(INST_LIB)/' . $_} qw( + Text/Bidi.pm + Text/Bidi/Array.pm + Text/Bidi/Array/Byte.pm + Text/Bidi/Array/Long.pm + Text/Bidi/Constants.pm + Text/Bidi/Paragraph.pm + Text/Bidi/private.pm +); + my %WriteMakefileArgs = ( 'MIN_PERL_VERSION' => '5.010000', 'LICENSE' => 'perl', @@ -47,6 +59,7 @@ my %WriteMakefileArgs = ( 'File::Spec' => '0', 'ExtUtils::MakeMaker' => '0' }, + 'PM' => \%PM, 'EXE_FILES' => [ 'bin/fribidi.pl', 'misc/bidi' @@ -118,8 +131,10 @@ WriteMakefile(%WriteMakefileArgs); sub MY::postamble { <<EOF; -private.c: swig/fribidi.i - -/usr/bin/swig -perl -Wall -I/usr/include $cflags -outdir lib/Text/Bidi/ -o \$@ \$< +pm_to_blib: lib/Text/Bidi/private.pm + +private.c lib/Text/Bidi/private.pm: swig/fribidi.i + -/usr/bin/swig -perl -Wall -I/usr/include $cflags -outdir lib/Text/Bidi/ -o private.c \$< swig-clean: clean -rm private.c lib/Text/Bidi/private.pm -- 2.4.3
On Wed Nov 11 08:56:03 2015, ppisar wrote: Show quoted text
> If I purge the two SWIG-generated files before building the sources, > tests fails on missing Text::Bidi::private module. I clean all the > generated files because building from real sources is vital for open > source distributions. > > This is because the Makefile generates the lib/Text/Bidi/private.pm > after copying lib files into blib directory and also because the file > does not exist when Makefile.PL is executed. > > Attached patch fixes it.
Applied, thanks!