Files
haikuports/sys-apps/gawk/gawk-5.1.0.recipe
Augustin Cavalier ba588c23b6 gawk: Bump to 5.1.0; remove gmp/mpfr.
We don't really need multi-precision-aware Gawk, and this
removes two packages from the base set that are otherwise
unneeded.
2020-05-25 15:06:25 -04:00

86 lines
2.1 KiB
Bash

SUMMARY="A pattern scanning and processing language"
DESCRIPTION="
If you are like many computer users, you would frequently like to make \
changes in various text files wherever certain patterns appear, or \
extract data from parts of certain lines while discarding the rest. To \
write a program to do this in a language such as C or Pascal is a \
time-consuming inconvenience that may take many lines of code. The job \
is easy with awk, especially the GNU implementation: gawk.
The awk utility interprets a special-purpose programming language that \
makes it possible to handle simple data-reformatting jobs with just a \
few lines of code.
"
HOMEPAGE="http://www.gnu.org/s/gawk"
COPYRIGHT="1983-2020 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://ftp.gnu.org/gnu/gawk/gawk-$portVersion.tar.gz"
CHECKSUM_SHA256="03a0360edcd84bec156fe211bbc4fc8c78790973ce4e8b990a11d778d40b1a26"
PATCHES="gawk-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64 ?arm"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
settings/profile.d/gawk.csh keep-old
settings/profile.d/gawk.sh keep-old
"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
gawk$secondaryArchSuffix = $portVersion compat >= 5
cmd:awk$commandSuffix = $portVersion compat >= 3
cmd:gawk$commandSuffix = $portVersion compat >= 3
cmd:igawk$commandSuffix = $portVersion compat >= 3
"
REQUIRES="
haiku$secondaryArchSuffix
"
if [ "$targetArchitecture" = x86_gcc2 ]; then
CONFLICTS="gawk"
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
TEST_REQUIRES="
cmd:cmp
"
defineDebugInfoPackage gawk$secondaryArchSuffix \
$commandBinDir/gawk
BUILD()
{
AUTOCONF=: AUTOMAKE=: \
runConfigure --omit-dirs binDir ./configure \
--disable-rpath --with-gnu-ld --bindir=$commandBinDir
make $jobArgs
}
INSTALL()
{
make install
}
TEST()
{
make check
}