# $NetBSD: Makefile.common,v 1.14 2025/09/14 11:08:51 wiz Exp $
# used by devel/libblkid/Makefile
# used by devel/libuuid/Makefile
# used by x11/mcookie/Makefile

DISTNAME=	util-linux-2.40.2
MASTER_SITES=	https://www.kernel.org/pub/linux/utils/util-linux/v${PKGVERSION_NOREV:R}/
EXTRACT_SUFX=	.tar.xz
EXTRACT_USING=	bsdtar

MAINTAINER?=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://github.com/karelzak/util-linux

DISTINFO_FILE=	${.CURDIR}/../../devel/libuuid/distinfo
PATCHDIR=	${.CURDIR}/../../devel/libuuid/patches

USE_GCC_RUNTIME=	yes
USE_LIBTOOL=		yes
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--disable-all-programs
CONFIGURE_ARGS+=	--disable-bash-completion
CONFIGURE_ARGS+=	--without-ncurses
CONFIGURE_ARGS+=	--without-ncursesw
CONFIGURE_ARGS+=	--without-python

# netbsd libintl lacks _nl_expand_alias, resulting in NLS being
# disabled. for consistency, disable for all
CONFIGURE_ARGS+=	--disable-nls

CONFIGURE_ARGS.SunOS+=	--disable-symvers
CONFIGURE_ENV.SunOS+=	ac_cv_header_sys_vfs_h=no

.include "../../mk/bsd.prefs.mk"

.if ${MACHINE_PLATFORM:MSunOS-*-i386} || \
    ${MACHINE_PLATFORM:MLinux-*-i386} || \
    ${MACHINE_PLATFORM:MUnixWare-*-i386}
CONFIGURE_ARGS+=	--disable-year2038
.endif

TEST_TARGET=		check
