File:  [cvs.NetBSD.org] / pkgsrc / sysutils / libgtop / Makefile
Revision 1.53: download - view: text, annotated - select for diffs
Sat Jul 9 06:39:01 2016 UTC (8 years, 5 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, HEAD
Bump PKGREVISION for perl-5.24.0 for everything mentioning perl.

# $NetBSD: Makefile,v 1.53 2016/07/09 06:39:01 wiz Exp $

DISTNAME=		libgtop-2.28.4
PKGREVISION=		10
CATEGORIES=		sysutils gnome
MASTER_SITES=		${MASTER_SITE_GNOME:=sources/libgtop/2.28/}
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://www.gnome.org/
COMMENT=		Library to retrieve system information, used in GNOME2
LICENSE=		gnu-gpl-v2

OSVERSION_SPECIFIC=	YES

GNU_CONFIGURE=		YES
CONFIG_SHELL=		bash
INFO_FILES=		YES
PKGCONFIG_OVERRIDE=	libgtop-2.0.pc.in
TEXINFO_REQD=		4.6
USE_LIBTOOL=		YES
USE_PKGLOCALEDIR=	YES
USE_TOOLS+=		gmake makeinfo msgfmt perl pkg-config intltool

CONFIGURE_ARGS+=	--enable-gtk-doc
CONFIGURE_ARGS+=	--without-x
CONFIGURE_ENV+=		LN_S="${LN} -s"

CONFLICTS+=		libgtop2-[0-9]*

post-patch:
	${CP} ${FILESDIR}/procaffinity.c ${WRKSRC}/sysdeps/bsd/

# The following flags are for debugging purposes.  They don't need to
# be used unless you are actively developing/debugging libgtop.
#CPPFLAGS+=		-DLIBGTOP_ENABLE_DEBUG -DLIBGTOP_FATAL_WARNINGS
#CFLAGS+=		-g
#LDFLAGS+=		-g

PRINT_PLIST_AWK+=	/^bin\/libgtop_server2$$/ \
				{ print "$${LIBGTOP_SERVER}" $$0; next }
PRINT_PLIST_AWK+=	/^include\/libgtop-2.0\/glibtop_suid.h$$/ \
				{ print "$${LIBGTOP_SUID_H}" $$0; next }

CONFIGURE_ENV.NetBSD+=	fu_cv_sys_mounted_getmntinfo=yes
# needed since about 6.99.16
CPPFLAGS.NetBSD+=	-D_KMEMUSER

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

INSTALL_MAKE_FLAGS+=	libgtop_postinstall=true
PLIST_VARS+=	server suid.h
.if ${OPSYS} == "AIX"
PLIST.server=	yes
PLIST.suid.h=	yes
SPECIAL_PERMS=	bin/libgtop_server2 ${REAL_ROOT_USER} system 2755
.elif ${OPSYS} == "DragonFly" || \
      ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || \
      ${OPSYS} == "OpenBSD"
PLIST.server=	yes
PLIST.suid.h=	yes
SPECIAL_PERMS=	bin/libgtop_server2 ${REAL_ROOT_USER} kmem 2755
.elif ${OPSYS} == "Linux"
#PLIST.server=	no
#PLIST.suid.h=	no
.elif ${OPSYS} == "SunOS"
PLIST.server=	yes
SPECIAL_PERMS=	bin/libgtop_server2 ${REAL_ROOT_USER} sys 2755
.elif ${OPSYS} == "Darwin"
PLIST.server=	yes
.else
PLIST.server=	yes
PLIST.suid.h=	yes
.endif

PLIST_VARS+=    glibtop_private.h
.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
PLIST.glibtop_private.h= yes
.endif

# XXX This needs a check in the configure script, which should be clean
# enough to be integrated in the mainstream sources.
statvfs_h=	/usr/include/sys/statvfs.h
.if exists(${statvfs_h})
reads_count!=	if ${GREP} f_syncreads ${statvfs_h} >/dev/null; then \
		${ECHO} yes; else ${ECHO} no; fi
.  if ${reads_count} == "yes"
CPPFLAGS+=	-DHAVE_STATVFS_READS_COUNT
.  endif
.  undef reads_count

writes_count!=	if ${GREP} f_syncwrites ${statvfs_h} >/dev/null; then \
		${ECHO} yes; else ${ECHO} no; fi
.  if ${writes_count} == "yes"
CPPFLAGS+=	-DHAVE_STATVFS_WRITES_COUNT
.  endif
.  undef writes_count
.endif
.undef statvfs_h

.include "../../devel/gettext-lib/buildlink3.mk"
BUILDLINK_API_DEPENDS.glib2+=	glib2>=2.6.0
.include "../../devel/glib2/buildlink3.mk"
BUILDLINK_API_DEPENDS.gtk-doc+=	gtk-doc>=1.20
.include "../../textproc/gtk-doc/buildlink3.mk"
.include "../../x11/libXau/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>