On Fri, Mar 14, 2025 at 2:07 PM Andrew Randrianasulu
<[email protected]> wrote:
>
> On Fri, Mar 14, 2025 at 1:58 PM Georgy Salnikov <[email protected]> wrote:
> >
> > On Fri, 14 Mar 2025, Andrew Randrianasulu wrote:
> >
> > > > Tried to compile on NetBSD and found that here perl located at
> > > > /usr/pkg/bin/perl
> > > > so default chebang in perl file does not work ....
> >
> > Andrew, try to read `perldoc perlrun`
> >
> > Near the 60-th line several shamanic tricks are suggested to execute a Perl
> > script if it is not known a priori where the executable is located:
> >
> >            #!/bin/sh
> >            #! -*-perl-*-
> >            eval 'exec perl -x -wS $0 ${1+"$@"}'
> >                if 0;
> >
> > or
> >
> >            #!/usr/bin/env perl

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

used this and tested on Termux (where it was working previously, and
still works) and on netBSD



> >
> > Of course, the second will not work if NetBSD has no /usr/bin/env, and the
> > first if `sh' under NetBSD is not in /bin.
> >
> > Although I personally would prefer a recommendation to either manually
> > symlink /usr/pkg/bin/perl to /usr/bin on such systems, or manually edit
> > shebang in all the *.pl scripts (ContextManual.pl as well) when building
> > CinGG under exotic OS. I am afraid of too shamanic techniques.
>
> I hope pkgsrc can deal with this (there is plenty automatic wrappers
> for all those python/perlcc stuff)
>
> For now I can keep small patch for those two pl files
>
> PS:
>
> netbsd10# /usr/bin/env perl
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>     LC_ALL = (unset),
>     LC_CTYPE = (unset),
>     LC_NUMERIC = (unset),
>     LC_COLLATE = (unset),
>     LC_TIME = (unset),
>     LC_MESSAGES = (unset),
>     LC_MONETARY = (unset),
>     LANG = "en_EN.utf8"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
> ^C
> netbsd10# /usr/bin/env
> ENV=/root/.shrc
> BLOCKSIZE=1k
> PWD=/root/src/cinelerra/cinelerra-5.1
> LOCALE=en_EN.utf8
> LANG=en_EN.utf8
> HOME=/root
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/games:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin
> HOST=netbsd10
> TERM=xterm-256color
> OLDPWD=/root/src/cinelerra
> USER=root
> EDITOR=mcedit
> LOGNAME=root
> SU_FROM=guest
> SHELL=/bin/sh
> netbsd10#
>
> so i think it works ....
>
> MAMEs build system also can't cope with raw NetBSD
>
> >
> > > to fix -ldl LDFLAGS on netBSD
> > > Does it still work on Linux ? :)
> >
> > I inserted -ldl just because `man dlopen` instructs to do it. May be, it can
> > work without it (for example, if some other shared library linked to plugins
> > by default requires it already), I just did not test.
> >
> > _______________________________________________________________________________
> >
> > Georgy Salnikov
> > NMR Group
> > Novosibirsk Institute of Organic Chemistry
> > Lavrentjeva, 9, 630090 Novosibirsk, Russia
> > Phone   +7-383-3307864
> > Email   [email protected]
> > _______________________________________________________________________________
> >
From 39edd22077cdecb0a8d8f5a8dc3e404262f1f6ff Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <[email protected]>
Date: Fri, 14 Mar 2025 14:28:01 +0300
Subject: [PATCH 3/3] BlendAlgebra/BlendProgram pl shebang fix?

---
 cinelerra-5.1/plugins/blendalgebra/BlendAlgebraCompile.pl | 2 +-
 cinelerra-5.1/plugins/blendprogram/BlendProgramCompile.pl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/plugins/blendalgebra/BlendAlgebraCompile.pl b/cinelerra-5.1/plugins/blendalgebra/BlendAlgebraCompile.pl
index ecc68df1..97f7cfc7 100755
--- a/cinelerra-5.1/plugins/blendalgebra/BlendAlgebraCompile.pl
+++ b/cinelerra-5.1/plugins/blendalgebra/BlendAlgebraCompile.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Helper script to compile Cinelerra blend algebra functions
 # Calling: BlendAlgebraCompile.pl [options] <function filename>
diff --git a/cinelerra-5.1/plugins/blendprogram/BlendProgramCompile.pl b/cinelerra-5.1/plugins/blendprogram/BlendProgramCompile.pl
index 5e3646d9..2c0e4997 100755
--- a/cinelerra-5.1/plugins/blendprogram/BlendProgramCompile.pl
+++ b/cinelerra-5.1/plugins/blendprogram/BlendProgramCompile.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Helper script to compile Cinelerra blend programs
 # Calling: BlendProgramCompile.pl [options] <program filename>
-- 
2.47.1

-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to