freebsd-ports/sysutils/lsof/Makefile
Craig Leres 6e97963b05 sysutils/lsof: Unbreak for 12.2-RELEASE and newer 13.0-CURRENT
The the order of fields in the namecache struct changed in stable/12
(r363891) and head (r367338); this definition is not public so lsof
has it's own copy that needs to be conditionally adjusted accordingly.

PR:		250916
Approved by:	ler (maintainer)
2020-11-11 22:11:45 +00:00

66 lines
1.7 KiB
Makefile

# Created by: David O'Brien <obrien@FreeBSD.org>
# $FreeBSD$
# note: If someone has a fix for a particular ARCH please feel free
# to commit it. I (ler) don't have access to all the ARCH's
PORTNAME= lsof
DISTVERSION= 4.93.2
PORTREVISION= 14
PORTEPOCH= 8
CATEGORIES= sysutils
MAINTAINER= ler@FreeBSD.org
COMMENT= Lists information about open files (similar to fstat(1))
LICENSE= lsof
LICENSE_NAME= lsof
LICENSE_FILE= ${FILESDIR}/LICENSE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
USES= compiler shebangfix tar:bzip2
HAS_CONFIGURE= yes
USE_GITHUB= yes
GH_ACCOUNT= lsof-org
OPTIONS_DEFINE_powerpc64= AIM BOOKE
OPTIONS_DEFAULT_powerpc64= AIM
AIM_DESC= Set for AIM hardware
AIM_CFLAGS= -DAIM
BOOKE_DESC= Set for BOOKE hardware
BOOKE_CFLAGS= -DBOOKE
CFLAGS+= -fcommon
CFLAGS_powerpc= -DAIM
CFLAGS_powerpcspe= -DBOOKE
SHEBANG_FILES= scripts/sort_res.perl5
.include <bsd.port.pre.mk>
CONFIGURE_SCRIPT= Configure
CONFIGURE_ARGS= -n freebsd
CONFIGURE_ENV= LSOF_CC="${CC}" FREEBSD_SYS="${SRC_BASE}/sys"
# GCC needs -lzfs -lzpool for reasons unknown. If someone can
# figure out why, I (ler) am all ears.
.if ${CHOSEN_COMPILER_TYPE} == gcc
CONFIGURE_ENV+= LSOF_CFGL="-lzfs -lzpool"
. endif
.if !exists(${SRC_BASE}/sys/kern/kern_lockf.c)
IGNORE+= requires kernel sources
.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/lsof ${STAGEDIR}${PREFIX}/sbin
(cd ${WRKSRC} && /usr/bin/soelim Lsof.8 > ${WRKSRC}/lsof.8)
${INSTALL_MAN} ${WRKSRC}/lsof.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/lsof.8
@${MKDIR} ${STAGEDIR}${PREFIX}/share/lsof
${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${STAGEDIR}${PREFIX}/share/lsof
@${CHMOD} 0444 ${STAGEDIR}${PREFIX}/share/lsof/00*
.include <bsd.port.post.mk>