pkgsrc/editors/xemacs/Makefile.common
hauke 5613c7b36a For the sake of MKPIE, we need to .include Makefile.common before
options.mk.

Since Makefile.common now does not see the x11 option, we have to move
all x11 related commands into options.mk. Within options, move
.includes to the end for consistency.
2021-10-03 17:53:11 +00:00

115 lines
3.6 KiB
Text

# $NetBSD: Makefile.common,v 1.38 2021/10/03 17:53:11 hauke Exp $
#
# used by editors/xemacs-nox11/Makefile
# used by editors/xemacs/Makefile
DISTNAME= xemacs-21.4.24
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_XEMACS:=${DISTNAME:C/[.][^.]*$//}/}
MAINTAINER= hauke@NetBSD.org
HOMEPAGE= https://www.xemacs.org/
LICENSE= gnu-gpl-v2
MKPIE_SUPPORTED= no
.include "../../mk/bsd.prefs.mk"
FILESDIR= ${.CURDIR}/../../editors/xemacs/files
PATCHDIR= ${.CURDIR}/../../editors/xemacs/patches
DISTINFO_FILE= ${.CURDIR}/../../editors/xemacs/distinfo
PLIST_SRC= ${.CURDIR}/../../editors/xemacs/PLIST
USE_TOOLS+= patch gtar makeinfo perl
HAS_CONFIGURE= yes
DIST_SUBDIR= xemacs
PLIST_SUBST+= DISTNAME=${DISTNAME}
FILES_SUBST+= DISTNAME=${DISTNAME}
MESSAGE_SUBST+= DISTNAME=${DISTNAME}
INFO_FILES= yes
.if defined(MANZ)
PLIST_SUBST+= ELSUFX='.gz'
.else
PLIST_SUBST+= ELSUFX=''
.endif
CONFIGURE_ARGS+= ${MACHINE_GNU_PLATFORM}
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}/man1
CONFIGURE_ARGS+= --infopath=${PREFIX}/${PKGINFODIR}
CONFIGURE_ARGS+= --with-clash-detection
CONFIGURE_ARGS+= --with-mule=yes
CONFIGURE_ARGS+= --with-msw=no
CONFIGURE_ARGS+= --with-postgresql=no
CONFIGURE_ARGS+= --pdump
CONFIGURE_ARGS+= --with-system-malloc
CFLAGS+= -Dunix
# Use terminfo on NetBSD-6 and newer.
# We cannot use terminfo.*.mk as XEmacs enforces a link to termcap,
# but this is fine for us.
.if (${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD") && exists(/usr/include/term.h)
CPPFLAGS+= -DTERMINFO
.endif
.if ${OPSYS} == "SunOS"
. if !exists(/usr/demo/SOUND/libaudio.a) && \
!exists(/usr/demo/SOUND/lib/libaudio.a)
CONFIGURE_ARGS+= --with_sound=none
. endif
.endif
.if (${OPSYS} == "DragonFly") && exists(/usr/lib/crtn.o)
CPPFLAGS+= -DDFLY_CRT_USRLIB
.endif
CHECK_WRKREF_SKIP= bin/xemacs*
REPLACE_SH= etc/check_cygwin_setup.sh
LIBDIR= ${PREFIX}/lib/${DISTNAME}
ARCHLIBDIR= ${LIBDIR}/${MACHINE_GNU_PLATFORM}
# The portable dumper creates a dump file with a build ID in its name
GENERATE_PLIST+= ${ECHO} bin/${DISTNAME}-`${WRKSRC}/src/xemacs -sd`.dmp ;
# This list overrides variables used in the source Makefiles at install
# time to allow for ${DESTDIR}-style installation. This variables list
# is pulled from the ``mkdir'' target of Makefile.in.in.
#
INSTALL_MAKE_FLAGS+= archlibdir=${DESTDIR}${ARCHLIBDIR}
INSTALL_MAKE_FLAGS+= bindir=${DESTDIR}${PREFIX}/bin
INSTALL_MAKE_FLAGS+= datadir=${DESTDIR}${PREFIX}/lib
INSTALL_MAKE_FLAGS+= docdir=${DESTDIR}${ARCHLIBDIR}
INSTALL_MAKE_FLAGS+= etcdir=${DESTDIR}${LIBDIR}/etc
INSTALL_MAKE_FLAGS+= exec_prefix=${DESTDIR}${PREFIX}
INSTALL_MAKE_FLAGS+= infodir=${DESTDIR}${LIBDIR}/info
INSTALL_MAKE_FLAGS+= libdir=${DESTDIR}/lib
INSTALL_MAKE_FLAGS+= lispdir=${DESTDIR}${LIBDIR}/lisp
INSTALL_MAKE_FLAGS+= mandir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
INSTALL_MAKE_FLAGS+= moduledir=${DESTDIR}${ARCHLIBDIR}/modules
INSTALL_MAKE_FLAGS+= pkgdir=${DESTDIR}${LIBDIR}/lisp
INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX}
INSTALL_MAKE_FLAGS+= sitelispdir=${DESTDIR}${PREFIX}/lib/xemacs/site-lisp
INSTALL_MAKE_FLAGS+= sitemoduledir=${DESTDIR}${PREFIX}/lib/xemacs/site-modules
INSTALL_MAKE_FLAGS+= TAR=${TOOLS_PATH.gtar}
post-extract: post-extract-x11
cp ${FILESDIR}/dragonfly.h ${WRKSRC}/src/s/
pre-build:
rm -f ${WRKSRC}/etc/ctags.1.orig
rm -f ${WRKSRC}/lisp/gui.el.orig
post-install: post-install-x11
${INSTALL_DATA} ${WRKSRC}/Installation ${DESTDIR}${LIBDIR}/etc/
.if defined(MANZ)
find ${DESTDIR}${LIBDIR} -name "*.el" -type f -print | xargs ${GZIP_CMD}
.endif
.include "../../databases/gdbm/buildlink3.mk"
.include "../../mk/oss.buildlink3.mk"
.include "../../mk/termcap.buildlink3.mk"