On 2023/11/10 11:43, Alexander Bluhm wrote:
> On Fri, Nov 10, 2023 at 08:28:16AM +0100, Renaud Allard wrote:
> > Hello,
> >
> > On 11/9/23 23:13, Alexander Bluhm wrote:
> > > On Mon, Nov 06, 2023 at 10:05:38AM +0100, Renaud Allard wrote:
> > >> Here is a new port for p5-File-FcntlLock which will be needed in order
> > >> to update mail/exim to the next version.
> > >
> > > COMMENT = file locking with fcntl(2)
> > > has to start with lower case letter
> > >
> > > WANTLIB = c perl
> > > as FcntlLock.xs calls fnctl(2) from libc
> > >
> > > pkg/DESCR should be more than the comment line. Probably text from
> > > the readme:
> > > File::FcntlLock is a module to do file locking in an object oriented
> > > fashion using the fcntl(2) system call. This allows locks on parts of
> > > a file as well as on the whole file and overcomes some known problems
> > > with flock(2), on which Perls flock() function is based per default.
> > >
> > > otherwise OK bluhm@
> >
> > Thank you for checking.
> > Here is a corrected version.
>
> OK bluhm@
The File::FcntlLock::Inline and File::FcntlLock::Pure modules are not
built on i386, so packaging is broken:
: ===> Configuring for p5-File-FcntlLock-0.22
: Checking if there's a C compiler
: Checking if there's a fcntl(2) system call
: builder.c(/tmp/builder-e79d8a.o:(main)): warning: sprintf() is often misused,
please use snprintf()
: builder.c(/tmp/builder-e79d8a.o:(main)): warning: strcat() is almost always
misused, please use strlcat()
: Warning: Support for modules `File::FcntlLock::Pure' and
`File::FcntlLock::Inline' had to be disabled
: Checking if your kit is complete...
: Looks good
: Generating a Unix-style Makefile
: Writing Makefile for File::FcntlLock
: Writing MYMETA.yml and MYMETA.json
...
: Error:
/pobj/p5-File-FcntlLock-0.22/fake-i386/usr/local/libdata/perl5/site_perl/i386-openbsd/File/FcntlLock/Inline.pm
does not exist
: Error:
/pobj/p5-File-FcntlLock-0.22/fake-i386/usr/local/libdata/perl5/site_perl/i386-openbsd/File/FcntlLock/Inline.pod
does not exist
: Error:
/pobj/p5-File-FcntlLock-0.22/fake-i386/usr/local/libdata/perl5/site_perl/i386-openbsd/File/FcntlLock/Pure.pm
does not exist
: Error:
/pobj/p5-File-FcntlLock-0.22/fake-i386/usr/local/libdata/perl5/site_perl/i386-openbsd/File/FcntlLock/Pure.pod
does not exist
: Error:
/pobj/p5-File-FcntlLock-0.22/fake-i386/usr/local/man/man3p/File::FcntlLock::Inline.3p
does not exist
: Error:
/pobj/p5-File-FcntlLock-0.22/fake-i386/usr/local/man/man3p/File::FcntlLock::Pure.3p
does not exist
: pkg_create: can't continue
>From Makefile.PL:
104 ###########################################################
105 # Function for assembling a "pure Perl" version of the module.
106 # For that we need to determine the layout of the C flock struct
107 # used by fcntl(2) and create some Perl code that can fill in such
108 # a structure via pack() and retrieve its values using unpack().
109 # This code then is combined with the template file 'Pure/Pure.tmpl'
110 # to make up the required module. (Failure is not a big issue,
111 # there are two other ways of attempting to use fcntl(2), one via
112 # an XS based module and one that attempts to obtain the same kind
113 # of information in its BEGIN block.)
114 # Note: there seem to be some 32-bit systems, where the flock struct
115 # contails 64-bit off_t members, but there's no 'q' format for
116 # Perl's pack() and unpack() function. For these systems I do
117 # not know of any proper way of setting up the flock structure
118 # using pure Perl...
...
172 ###########################################################
173 # Function for setting up the Inline package - this only happens
174 # when we can use pure Perl to setup the flock struct (i.e., if
175 # the assemble_pure() function was successful).
So I suspect it will probably do the same on other non-64-bit archs.
Here's a diff to conditionally package those files only on LP64 systems.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/p5-File-FcntlLock/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile 10 Nov 2023 10:57:37 -0000 1.1.1.1
+++ Makefile 16 Nov 2023 08:55:08 -0000
@@ -14,4 +14,13 @@ WANTLIB = c perl
MODULES = cpan
+.include <bsd.port.arch.mk>
+
+.if ${PROPERTIES:Mlp64}
+LP64_ONLY =
+.else
+LP64_ONLY = "@comment "
+.endif
+SUBST_VARS = LP64_ONLY
+
.include <bsd.port.mk>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/p5-File-FcntlLock/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST 10 Nov 2023 10:57:37 -0000 1.1.1.1
+++ pkg/PLIST 16 Nov 2023 08:55:08 -0000
@@ -5,10 +5,10 @@ ${P5ARCH}/File/FcntlLock.pm
${P5ARCH}/File/FcntlLock.pod
${P5ARCH}/File/FcntlLock/Core.pm
${P5ARCH}/File/FcntlLock/Errors.pm
-${P5ARCH}/File/FcntlLock/Inline.pm
-${P5ARCH}/File/FcntlLock/Inline.pod
-${P5ARCH}/File/FcntlLock/Pure.pm
-${P5ARCH}/File/FcntlLock/Pure.pod
+${LP64_ONLY}${P5ARCH}/File/FcntlLock/Inline.pm
+${LP64_ONLY}${P5ARCH}/File/FcntlLock/Inline.pod
+${LP64_ONLY}${P5ARCH}/File/FcntlLock/Pure.pm
+${LP64_ONLY}${P5ARCH}/File/FcntlLock/Pure.pod
${P5ARCH}/File/FcntlLock/XS.pm
${P5ARCH}/File/FcntlLock/XS.pod
${P5ARCH}/auto/
@@ -16,6 +16,6 @@ ${P5ARCH}/auto/File/
${P5ARCH}/auto/File/FcntlLock/
@so ${P5ARCH}/auto/File/FcntlLock/FcntlLock.so
@man man/man3p/File::FcntlLock.3p
-@man man/man3p/File::FcntlLock::Inline.3p
-@man man/man3p/File::FcntlLock::Pure.3p
+${LP64_ONLY}@man man/man3p/File::FcntlLock::Inline.3p
+${LP64_ONLY}@man man/man3p/File::FcntlLock::Pure.3p
@man man/man3p/File::FcntlLock::XS.3p