# $NetBSD: Makefile.common,v 1.30 2023/09/08 19:12:52 vins Exp $ # # used by sysutils/coreutils/Makefile # used by misc/gnuls/Makefile DISTNAME= coreutils-9.4 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_GNU:=coreutils/} EXTRACT_SUFX= .tar.xz MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= https://www.gnu.org/software/coreutils/ COMMENT= GNU basic file, shell and text manipulation utilities LICENSE= gnu-gpl-v3 NOT_FOR_PLATFORM= NetBSD-2.0[D-H]-* PATCHDIR= ${.CURDIR}/../../sysutils/coreutils/patches DISTINFO_FILE= ${.CURDIR}/../../sysutils/coreutils/distinfo USE_PKGLOCALEDIR= yes USE_TOOLS+= msgfmt msgmerge perl xgettext GNU_CONFIGURE= yes TEST_TARGET= check .include "../../mk/bsd.prefs.mk" # Otherwise configure aborts when ran by root CONFIGURE_ENV+= FORCE_UNSAFE_CONFIGURE=yes CONFIGURE_ENV.Interix+= ac_list_mounted_fs=found CONFIGURE_ENV.DragonFly+= gl_cv_search_pthread_join=-lpthread # Various tests rely on GCC's -O2 behaviour (e.g. -D__NO_INLINE__) and # without it we run into undefined symbol issues. .if ${OPSYS} == "Darwin" && ${PKGSRC_COMPILER:Mgcc} CFLAGS+= -O2 .endif # clang on SunOS parses -errwarn as an -e entry point argument to the linker, # which ignores it as it's a duplicate argument. Turn it off explicitly. .if ${PKGSRC_COMPILER:Mclang} CONFIGURE_ENV.SunOS+= gl_cv_warn_c__errwarn=no .endif # Explicitly disable inotify support whilst it is Linux-specific. CONFIGURE_ENV.SunOS+= ac_cv_func_inotify_init=no # Identify Solaris vs illumos where appropriate .if ${OPSYS} == "SunOS" && ${OS_VARIANT} != "Solaris" CONFIGURE_ENV+= gl_cv_host_operating_system=illumos .endif # Ignore required y2038 support .if ${MACHINE_PLATFORM:MSunOS-*-i386} CONFIGURE_ENV+= ac_cv_sys_year2038_opts="none needed" .endif .if ${MACHINE_PLATFORM:MDarwin-[9].*-*} CONFIGURE_ENV+= ac_cv_header_sys_acl_h=no jm_cv_func_svid_putenv=yes .endif # XXX - this hack is bound to cause fallout on some platform at some point. # How can we determine the API version of the builtin gettext? .if ${OPSYS} != "Linux" CONFIGURE_ENV+= gt_cv_func_gnugettext3_libintl=yes .endif CONFIGURE_ENV+= MKDIR_P=${MKDIR:Q} CONFIGURE_ARGS+= --program-prefix=g #CONFIGURE_ARGS+= --enable-install-program=su #.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || \ # ${OPSYS} == "OpenBSD" #MAKE_FLAGS+= setuid_root_mode=a=rx #MESSAGE_SRC= ${.CURDIR}/MESSAGE.gsu #MESSAGE_SUBST+= OPSYS=${OPSYS:Q} #.endif