pkgsrc/editors/xemacs/options.mk
jlam 9cde120028 Restructure the following packages:
editors/xemacs
	editors/xemacs-nox11

The latter is now just editors/xemacs built with a specific set of
options.  Changes include:

+ Add support for the following new options in options.mk:

	x11		Support X11 displays
	lucid		Use Lucid widget set

  Also add commented out support for the following options for
  alternative widget sets:

	gtk		GTK widgets
	motif		Motif widgets
	xaw		Athena widgets

  Note that USE_ATHENA, USE_GTK, and USE_MOTIF are legacy variables for
  the corresponding options.

+ Remove Makefile.common and move all logic into xemacs/Makefile and
  xemacs/options.mk.

+ Rename the "mule" PLIST variable to "canna", which more accurately
  reflects what is conditionally installed.

+ Include termcap.buildlink3.mk to properly deal with termcap/curses
  issues (xemacs needs termcap).  Drop the --with-ncurses=no setting
  as the issue is handled by termcap.buildlink3.mk.

+ In xemacs/Makefile, we don't need separate EXTRACT_ONLY and EXTRA_FILES
  if we're actually going to extract all of those files all of the time.
  Just list them all in DISTFILES.

+ Be slightly more aware of ${X11_TYPE} == "modular" by not referring to
  ${X11BASE} in that case.

+ In patch-ak, directly substitute the local value of etcdir (``../etc/'')
  into src/Makefile.in.in.  This allows for overriding etcdir via
  INSTALL_MAKE_FLAGS at install-time so that destdir-style installation
  will work.

+ Support DESTDIR installation by adding INSTALL_MAKE_FLAGS to override
  where files are installed during the install phase.

+ Honor PKGMANDIR.

+ Bump the PKGREVISION for xemacs and xemacs-nox11 to 4.  Both packages
  now track and use the same PKGREVISION number.
2008-04-24 15:32:15 +00:00

153 lines
4.3 KiB
Makefile

# $NetBSD: options.mk,v 1.8 2008/04/24 15:32:15 jlam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.xemacs
PKG_SUPPORTED_OPTIONS= ldap xface canna x11
PKG_OPTIONS_OPTIONAL_GROUPS= toolkit
PKG_OPTIONS_GROUP.toolkit= lucid
# GUI configuration is a mess... only support "lucid" for now.
#PKG_OPTIONS_GROUP.toolkit+= gtk motif xaw
#PKG_OPTIONS_LEGACY_VARS+= USE_ATHENA:xaw
#PKG_OPTIONS_LEGACY_VARS+= USE_GTK:gtk
#PKG_OPTIONS_LEGACY_VARS+= USE_MOTIF:motif
PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.options.mk"
###
### Any of the "toolkit" options implies "x11".
###
.if !empty(PKG_OPTIONS:Mgtk) || !empty(PKG_OPTIONS:Mlucid) || \
!empty(PKG_OPTIONS:Mmotif) || !empty(PKG_OPTIONS:Mxaw)
. if empty(PKG_OPTIONS:Mx11)
PKG_OPTIONS+= x11
. endif
.endif
###
### Default to using the Lucid X11 toolkit if none is specified.
###
.if !empty(PKG_OPTIONS:Mx11)
. if empty(PKG_OPTIONS:Mgtk) && empty(PKG_OPTIONS:Mlucid) && \
empty(PKG_OPTIONS:Mmotif) && empty(PKG_OPTIONS:Mxaw)
PKG_OPTIONS+= lucid
. endif
.endif
.if !empty(PKG_OPTIONS:Mldap)
CONFIGURE_ARGS+= --with-ldap
. include "../../databases/openldap-client/buildlink3.mk"
.else
CONFIGURE_ARGS+= --without-ldap
.endif
.if !empty(PKG_OPTIONS:Mxface)
CONFIGURE_ARGS+= --with-xface
. include "../../mail/faces/buildlink3.mk"
.else
CONFIGURE_ARGS+= --without-xface
.endif
PLIST_VARS+= canna
.if !empty(PKG_OPTIONS:Mcanna)
. include "../../inputmethod/canna-lib/buildlink3.mk"
CONFIGURE_ARGS+= --with-canna
PLIST.canna= yes
.else
CONFIGURE_ARGS+= --without-canna
.endif
###
### Support drawing pretty X11 widgets.
###
PLIST_VARS+= x11
.if !empty(PKG_OPTIONS:Mx11)
. include "../../graphics/jpeg/buildlink3.mk"
. include "../../graphics/png/buildlink3.mk"
. include "../../graphics/tiff/buildlink3.mk"
. include "../../x11/libXpm/buildlink3.mk"
. include "../../x11/xbitmaps/buildlink3.mk"
PLIST.x11= yes
CONFIGURE_ARGS+= --with-x
CONFIGURE_ARGS+= --with-jpeg
CONFIGURE_ARGS+= --with-png
CONFIGURE_ARGS+= --with-tiff
CONFIGURE_ARGS+= --with-xpm
CONFIGURE_ARGS+= --site-includes=${SITE_INCLUDES:Q}
CONFIGURE_ARGS+= --site-libraries=${SITE_LIBRARIES:Q}
CONFIGURE_ARGS+= --site-runtime-libraries=${SITE_RUNTIME_LIBRARIES:Q}
. if ${X11_TYPE} != "modular"
SITE_INCLUDES= ${BUILDLINK_DIR}/include:${BUILDLINK_X11_DIR}/include
SITE_LIBRARIES= ${BUILDLINK_DIR}/lib:${BUILDLINK_X11_DIR}/lib
SITE_RUNTIME_LIBRARIES= ${PREFIX}/lib:${X11BASE}/lib
. else
SITE_INCLUDES= ${BUILDLINK_DIR}/include
SITE_LIBRARIES= ${BUILDLINK_DIR}/lib
SITE_RUNTIME_LIBRARIES= ${PREFIX}/lib
. endif
.else
CONFIGURE_ARGS+= --without-x
CONFIGURE_ARGS+= --without-jpeg
CONFIGURE_ARGS+= --without-png
CONFIGURE_ARGS+= --without-tiff
CONFIGURE_ARGS+= --without-xpm
CONFIGURE_ARGS+= --site-includes=${SITE_INCLUDES:Q}
CONFIGURE_ARGS+= --site-libraries=${SITE_LIBRARIES:Q}
CONFIGURE_ARGS+= --site-runtime-libraries=${SITE_RUNTIME_LIBRARIES:Q}
SITE_INCLUDES= ${BUILDLINK_DIR}/include
SITE_LIBRARIES= ${BUILDLINK_DIR}/lib
SITE_RUNTIME_LIBRARIES= ${PREFIX}/lib
.endif
###
### Support using GTK X11 widgets.
###
.if !empty(PKG_OPTIONS:Mgtk)
. include "../../x11/gtk/buildlink3.mk"
CONFIGURE_ARGS+= --with-gtk
CONFIGURE_ARGS+= --with-menubars=yes
CONFIGURE_ARGS+= --with-scrollbars=yes
CONFIGURE_ARGS+= --with-dialogs=yes
CONFIGURE_ARGS+= --with-widgets=yes
CONFIGURE_ARGS+= --with-xim=yes
.endif
###
### Support using Lucid X11 widgets.
###
.if !empty(PKG_OPTIONS:Mlucid)
. include "../../mk/xaw.buildlink3.mk"
CONFIGURE_ARGS+= --with-toolbars=yes
CONFIGURE_ARGS+= --with-menubars=yes
CONFIGURE_ARGS+= --with-scrollbars=lucid
CONFIGURE_ARGS+= --with-dialogs=lucid
CONFIGURE_ARGS+= --with-widgets=lucid
CONFIGURE_ARGS+= --with-athena=xaw
CONFIGURE_ARGS+= --with-xim=xlib
.endif
###
### Support using Motif X11 widgets.
###
.if !empty(PKG_OPTIONS:Mmotif)
. include "../../mk/motif.buildlink3.mk"
CONFIGURE_ARGS+= --with-menubars=motif
CONFIGURE_ARGS+= --with-scrollbars=motif
CONFIGURE_ARGS+= --with-dialogs=motif
CONFIGURE_ARGS+= --with-widgets=motif
CONFIGURE_ARGS+= --with-xim=motif
.endif
###
### Support using Athena X11 widgets.
###
.if !empty(PKG_OPTIONS:Mxaw)
. include "../../mk/xaw.buildlink3.mk"
CONFIGURE_ARGS+= --with-menubars=athena
CONFIGURE_ARGS+= --with-scrollbars=athena
CONFIGURE_ARGS+= --with-dialogs=athena
CONFIGURE_ARGS+= --with-widgets=athena
CONFIGURE_ARGS+= --with-athena=xaw
CONFIGURE_ARGS+= --with-xim=xlib
.endif