mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 23:30:04 +02:00
* Use the commandBinDir "trick" to fix the policy error. * Mark x86_gcc2 as broken because a gcc2 patch would be required. * On x86, pass "have_scanf_alloc_modifier=no" to configure to skip a conftest which crashes and makes configure hang. * Switch to tar.xz.
114 lines
2.6 KiB
Bash
114 lines
2.6 KiB
Bash
SUMMARY="A random collection of Linux utilities"
|
|
DESCRIPTION="Various useful Linux utilities."
|
|
HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
|
|
COPYRIGHT="Various Authors"
|
|
LICENSE="GNU GPL v2
|
|
GNU LGPL v2
|
|
BSD (4-clause)
|
|
Public Domain"
|
|
REVISION="1"
|
|
SOURCE_URI="https://www.kernel.org/pub/linux/utils/util-linux/v2.31/util-linux-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="1a51b16fa9cd51d26ef9ab52d2f1de12403b810fc8252bf7d478df91b3cddf11"
|
|
SOURCE_DIR="util-linux-$portVersion"
|
|
PATCHES="util_linux-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
# 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="
|
|
util_linux$secondaryArchSuffix = $portVersion compat >= 2
|
|
cmd:cal$commandSuffix = $portVersion
|
|
cmd:nologin$commandSuffix = $portVersion
|
|
cmd:rename$commandSuffix = $portVersion
|
|
cmd:ul$commandSuffix = $portVersion
|
|
lib:libsmartcols$secondaryArchSuffix = 1.1.0 compat >= 1
|
|
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
lib:libncurses$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
util_linux${secondaryArchSuffix}_devel = $portVersion compat >= 2
|
|
devel:libsmartcols$secondaryArchSuffix = 1.1.0 compat >= 1
|
|
"
|
|
REQUIRES_devel="
|
|
util_linux$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libintl$secondaryArchSuffix
|
|
devel:libncurses$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:aclocal
|
|
cmd:autoconf
|
|
cmd:autom4te
|
|
cmd:automake
|
|
cmd:bison
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:gettext$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
export CFLAGS="-D_BSD_SOURCE -DB_USE_POSITIVE_POSIX_ERRORS"
|
|
export LDFLAGS="-lnetwork -lbsd -lposix_error_mapper"
|
|
|
|
./autogen.sh
|
|
if [ "$effectiveTargetArchitecture" = x86 ]; then
|
|
maybe_x86="scanf_cv_alloc_modifier=no"
|
|
else
|
|
maybe_x86=
|
|
fi
|
|
runConfigure --omit-dirs "binDir sbinDir" ./configure $maybe_x86 \
|
|
--bindir="$commandBinDir" --sbindir="$commandBinDir" \
|
|
--disable-all-programs \
|
|
--enable-cal \
|
|
--enable-libsmartcols \
|
|
--enable-rename \
|
|
--enable-nologin \
|
|
--enable-ul
|
|
make
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
# Cleanup
|
|
rm -rf $prefix/sbin
|
|
|
|
# Remove libtool file
|
|
rm -f $libDir/libsmartcols.la
|
|
|
|
prepareInstalledDevelLib libsmartcols
|
|
fixPkgconfig
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
|
|
rmdir $manDir/man3
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make check
|
|
}
|