ladybird/Ports/perl5/package.sh

41 lines
1.3 KiB
Bash
Raw Normal View History

2023-07-28 20:24:21 +03:00
#!/usr/bin/env -S bash ../.port_include.sh
port='perl5'
2024-01-03 23:12:14 +03:00
version='5.38.2'
cross_version='1.5.2'
2023-07-28 20:24:21 +03:00
useconfigure='true'
2023-07-10 14:10:29 +03:00
files=(
2024-01-03 23:12:14 +03:00
"https://www.cpan.org/src/5.0/perl-${version}.tar.xz#d91115e90b896520e83d4de6b52f8254ef2b70a8d545ffab33200ea9f1cf29e8"
"https://github.com/arsv/perl-cross/releases/download/${cross_version}/perl-cross-${cross_version}.tar.gz#584dc54c48dca25e032b676a15bef377c1fed9de318b4fc140292a5dbf326e90"
2023-07-10 14:10:29 +03:00
)
2023-07-28 20:24:21 +03:00
configopts=(
'-Dosname=serenity'
"--target=${SERENITY_ARCH}-pc-serenity"
"--targetarch=${SERENITY_ARCH}"
"--build=$(cc -dumpmachine)"
"--buildarch=$(uname -m)"
'--prefix=/usr/local'
"--sysroot="${SERENITY_INSTALL_ROOT}""
)
workdir="perl-${version}"
if [ "$(uname -s)" = 'Darwin' ]; then
makeopts+=('--ignore-errors')
# Make sure you have binutils and gnu-sed installed via homebrew
PATH="$(brew --prefix binutils)/bin:${PATH}"
PATH="$(brew --prefix gnu-sed)/libexec/gnubin:${PATH}"
export PATH="${SERENITY_BUILD_DIR}/Ports/${port}/${workdir}:${PATH}"
fi
post_fetch() {
run chmod -R +rw "${PWD}/perl-${version}"*
2024-01-03 23:12:14 +03:00
run cp -r "${PWD}/perl-cross-${cross_version}/"* "${PWD}/perl-${version}/"
2023-07-28 20:24:21 +03:00
if [ "$(uname -s)" = 'Darwin' ]; then
cat <<- 'EOH' > "${PWD}/perl-${version}/readelf"
#!/bin/bash
exec gobjdump "$@"
EOH
chmod +x "${PWD}/perl-${version}/readelf"
fi
}