Skip to content

Commit

Permalink
Debug FindBin.pm missing
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP committed Dec 30, 2023
1 parent a3dae4a commit 7ff751d
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ parts:
plugin: nil
source: .
override-pull: |
env
apt update
apt install -y curl perl build-essential
curl -o cpanminus.pl http://cpanmin.us
perl -- cpanminus.pl App::cpanminus
override-build: |
env
apt update
apt install -y libxml2-dev libxslt1-dev libicu-dev zlib1g-dev
Expand All @@ -29,27 +33,36 @@ parts:
done
# Modify perl5lib.sh
perl_inc=$(perl -e 'print "@INC"')
perl_snap_inc=()
perl_incs=$(perl -e 'print "@INC"')
perl5lib_sh="/usr/bin/perl5lib.sh"
for incpath in $(perl -e 'print "@INC"'); do
if [ "$incpath" != "." ]; then
perl_snap_inc+=("$SNAP$incpath")
cat <<EOF > $perl5lib_sh
#!/bin/bash
snap_prefix="\$1"
shift
echo "rest=\$@ ; snap_prefix=\$snap_prefix"
perl_snap_inc=()
for inc_path in $perl_incs; do
if [ "\$inc_path" != "." ]; then
echo "inc_path=\$snap_prefix\$inc_path"
perl_snap_inc+=("\$snap_prefix\$inc_path")
fi
done
perl5lib_sh="/usr/bin/perl5lib.sh"
echo "env PERL5LIB=$(IFS=:; echo "${perl_snap_inc[*]}") env PATH=$SNAP/usr/local/bin:$PATH \$@" > "$perl5lib_sh"
chmod +x "$perl5lib_sh"
echo "perl_snap_inc\${perl_snap_inc[*]}"
env PERL5LIB=\$(IFS=:; echo "\${perl_snap_inc[*]}") env PATH=\$snap_prefix/usr/local/bin:$PATH \$@
EOF
chmod +x $perl5lib_sh
cat $perl5lib_sh
organize:
/usr/bin/perl5lib.sh: /usr/bin/perl5lib.sh
/usr/lib/x86_64-linux-gnu/perl: /usr/lib/x86_64-linux-gnu/perl
/usr/share/perl: /usr/share/perl
/usr/local: /usr/local

stage-packages:
- perl
- perl-base
- libfindbin-libs-perl
- libicu66
- libxml2
- libxslt1.1
Expand All @@ -59,35 +72,35 @@ apps:
latexml:
environment:
LC_ALL: "C.UTF-8"
command: usr/bin/perl5lib.sh $SNAP/usr/local/bin/latexml
command: usr/bin/perl5lib.sh $SNAP $SNAP/usr/local/bin/latexml
plugs:
- home
- network
c:
environment:
LC_ALL: "C.UTF-8"
command: usr/bin/perl5lib.sh $SNAP/usr/local/bin/latexmlc
command: usr/bin/perl5lib.sh $SNAP $SNAP/usr/local/bin/latexmlc
plugs:
- home
- network
find:
environment:
LC_ALL: "C.UTF-8"
command: usr/bin/perl5lib.sh $SNAP/usr/local/bin/latexmlfind
command: usr/bin/perl5lib.sh $SNAP $SNAP/usr/local/bin/latexmlfind
plugs:
- home
- network
math:
environment:
LC_ALL: "C.UTF-8"
command: usr/bin/perl5lib.sh $SNAP/usr/local/bin/latexmlmath
command: usr/bin/perl5lib.sh $SNAP $SNAP/usr/local/bin/latexmlmath
plugs:
- home
- network
post:
environment:
LC_ALL: "C.UTF-8"
command: usr/bin/perl5lib.sh $SNAP/usr/local/bin/latexmlpost
command: usr/bin/perl5lib.sh $SNAP $SNAP/usr/local/bin/latexmlpost
plugs:
- home
- network

0 comments on commit 7ff751d

Please sign in to comment.