openbsd-ports/infrastructure/mk/imake.port.mk

37 lines
1.1 KiB
Makefile
Raw Normal View History

#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
2008-05-11 15:50:55 -04:00
# $OpenBSD: imake.port.mk,v 1.5 2008/05/11 19:50:55 espie Exp $
# Based on bsd.port.mk, originally by Jordan K. Hubbard.
# This file is in the public domain.
.if empty(CONFIGURE_STYLE:L:Mnoman)
2008-05-11 15:50:55 -04:00
INSTALL_TARGET += install.man
.endif
2008-05-11 15:50:55 -04:00
XMKMF ?= xmkmf -a
XMKMF += -DPorts
.if !exists(${X11BASE})
2008-05-11 15:50:55 -04:00
IGNORE = "uses imake, but ${X11BASE} not found"
.endif
2008-05-11 15:50:55 -04:00
MODIMAKE_configure = \
if [ -e ${X11BASE}/lib/X11/config/ports.cf ] || \
fgrep >/dev/null 2>/dev/null Ports \
${X11BASE}/lib/X11/config/OpenBSD.cf; then \
cd ${WRKSRC} && ${_SYSTRACE_CMD} ${SETENV} ${MAKE_ENV} ${XMKMF}; \
else \
echo >&2 "Error: your X installation is not recent enough"; \
echo >&2 "Update to a more recent version, or use a ports tree"; \
echo >&2 "that predates March 18, 2000"; \
exit 1; \
fi
# Kludge
2008-05-11 08:05:51 -04:00
.if ${CONFIGURE_STYLE:Mimake}
2008-05-11 15:50:55 -04:00
MODIMAKE_pre-install = \
2008-05-11 08:05:51 -04:00
${SUDO} mkdir -p ${LOCALBASE}/lib/X11; \
if [ ! -e ${LOCALBASE}/lib/X11/app-defaults ]; then \
${SUDO} ln -sf /etc/X11/app-defaults ${LOCALBASE}/lib/X11/app-defaults; \
fi
2008-05-11 08:05:51 -04:00
.endif