Index: head/Mk/Uses/emacs.mk =================================================================== --- head/Mk/Uses/emacs.mk (nonexistent) +++ head/Mk/Uses/emacs.mk (revision 460701) @@ -0,0 +1,133 @@ +# $FreeBSD$ +# +# Provide support for ports requiring Emacs. This includes flavors with proper +# dependencies and useful variables. +# +# Feature: emacs +# Usage: USES=emacs or USES=emacs:args +# Valid ARGS: build, run +# +# build Indicates that Emacs is needed at build time. +# run Indicates that Emacs is needed at run time. +# +# If build and run are omitted from the argument list, Emacs will be added to +# BUILD_DEPENDS and RUN_DEPENDS. EMACS_NO_DEPENDS can be set to prevent both +# Emacs dependencies. +# +# Variables, which can be set in make.conf: +# DEFAULT_VERSIONS+= The default flavor for Emacs ports can be added to +# DEFAULT_VERSIONS. For example, +# DEFAULT_VERSIONS+= emacs=nox +# Valid flavors: full canna nox devel_full devel_nox +# Flavors specified on the command line take precedence. +# +# Variables, which can be set by ports: +# EMACS_FLAVORS_EXCLUDE: Do NOT build these Emacs flavors. +# If EMACS_FLAVORS_EXCLUDE is not define then all +# valid Emacs flavors are assumed. +# +# EMACS_NO_DEPENDS: Do NOT add build or run dependencies on Emacs. +# +# Variables, which can be read by ports: +# EMACS_CMD: Emacs command with full path (e.g. /usr/local/bin/emacs-25.3) +# EMACS_FLAVOR: Used for dependencies (e.g. BUILD_DEPENDS= dash.el${EMACS_PKGNAMESUFFIX}>0:devel/dash@${EMACS_FLAVOR}) +# EMACS_LIBDIR: Emacs Library directory without ${PREFIX} (e.g. share/emacs) +# EMACS_LIBDIR_WITH_VER: Library directory without ${PREFIX} including version (e.g. share/emacs/25.3) +# EMACS_MAJOR_VER: Emacs major version (e.g. 25) +# EMACS_PKGNAMESUFFIX: PKGNAMESUFFIX to distinguish Emacs flavors +# EMACS_SITE_LISPDIR: Emacs site-lisp directory without ${PREFIX} (e.g. share/emacs/site-lisp) +# EMACS_VER: Emacs version (e.g. 25.3) +# EMACS_VERSION_SITE_LISPDIR: Include version (e.g. share/emacs/25.3/site-lisp) +#------------------------------------------------------------------------------- +# +# MAINTAINER: emacs@FreeBSD.org + +.if !defined(_INCLUDE_USES_EMACS_MK) +_INCLUDE_USES_EMACS_MK= yes + +# Make sure that no dependency or some other environment variable +# pollutes the build/run dependency detection +.undef _EMACS_BUILD_DEP +.undef _EMACS_RUN_DEP +_EMACS_ARGS= ${emacs_ARGS:S/,/ /g} +.if ${_EMACS_ARGS:Mbuild} +_EMACS_BUILD_DEP= yes +_EMACS_ARGS:= ${_EMACS_ARGS:Nbuild} +.endif +.if ${_EMACS_ARGS:Mrun} +_EMACS_RUN_DEP= yes +_EMACS_ARGS:= ${_EMACS_ARGS:Nrun} +.endif + +# If the port does not specify a build or run dependency, and does not define +# EMACS_NO_DEPENDS, assume both dependencies are required. +.if !defined(_EMACS_BUILD_DEP) && !defined(_EMACS_RUN_DEP) && \ + !defined(EMACS_NO_DEPENDS) +_EMACS_BUILD_DEP= yes +_EMACS_RUN_DEP= yes +.endif + +.if defined(_EMACS_RUN_DEP) +FLAVORS= full canna nox devel_full devel_nox +.for flavor in ${EMACS_FLAVORS_EXCLUDE} +FLAVORS:= ${FLAVORS:N${flavor}} +.endfor +.else +FLAVORS= full +.endif + +.if empty(FLAVOR) +.if defined(EMACS_DEFAULT) +FLAVOR= ${EMACS_DEFAULT} +.else +FLAVOR= ${FLAVORS:[1]} +.endif +.endif +EMACS_FLAVOR= ${FLAVOR} + +.if ${FLAVOR:Mdevel*} +EMACS_VER= 27.0.50 +EMACS_PORTDIR= editors/emacs-devel +.else +EMACS_VER= 25.3 +EMACS_PORTDIR= editors/emacs +.endif + +EMACS_MAJOR_VER= ${EMACS_VER:C/\..*//} +EMACS_LIBDIR= share/emacs +EMACS_LIBDIR_WITH_VER= share/emacs/${EMACS_VER} +EMACS_PORT_NAME= emacs${EMACS_MAJOR_VER} + +.if ${FLAVOR:M*nox} +EMACS_PKGNAMESUFFIX= -${EMACS_PORT_NAME}_nox +.elif ${FLAVOR:Mcanna} +EMACS_PKGNAMESUFFIX= -${EMACS_PORT_NAME}_canna +.else +EMACS_PKGNAMESUFFIX= -${EMACS_PORT_NAME} +.endif + +EMACS_CMD= ${PREFIX}/bin/emacs-${EMACS_VER} +EMACS_SITE_LISPDIR= ${EMACS_LIBDIR}/site-lisp +EMACS_VERSION_SITE_LISPDIR= ${EMACS_LIBDIR_WITH_VER}/site-lisp + +.if defined(_EMACS_BUILD_DEP) +BUILD_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTDIR}@${EMACS_FLAVOR:C/devel_//} +.endif +.if defined(_EMACS_RUN_DEP) +RUN_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTDIR}@${EMACS_FLAVOR:C/devel_//} +.endif + +MAKE_ARGS+= EMACS=${EMACS_CMD} +SCRIPTS_ENV+= EMACS_LIBDIR=${EMACS_LIBDIR} \ + EMACS_VER=${EMACS_VER} \ + EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \ + EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR} \ + EMACS_VERSION_SITE_LISPDIR=${EMACS_VERSION_SITE_LISPDIR} + +PLIST_SUB+= EMACS_LIBDIR=${EMACS_LIBDIR} \ + EMACS_VER=${EMACS_VER} \ + EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \ + EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR} \ + EMACS_VERSION_SITE_LISPDIR=${EMACS_VERSION_SITE_LISPDIR} + +.endif # _INCLUDE_USES_EMACS_MK Property changes on: head/Mk/Uses/emacs.mk ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/migemo-emacs/Makefile =================================================================== --- head/japanese/migemo-emacs/Makefile (nonexistent) +++ head/japanese/migemo-emacs/Makefile (revision 460701) @@ -0,0 +1,30 @@ +# Created by: MANTANI Nobutaka +# $FreeBSD$ + +PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX} +COMMENT= Japanese incremental search tool for Emacs +MASTERDIR= ${.CURDIR}/../../japanese/migemo +PKGDIR= ${.CURDIR} +PLIST= ${MASTERDIR}/pkg-plist +PKGMESSAGE= ${MASTERDIR}/pkg-message + +BUILD_DEPENDS= apel${EMACS_PKGNAMESUFFIX}>=10.8:editors/apel@${EMACS_FLAVOR} +RUN_DEPENDS= apel${EMACS_PKGNAMESUFFIX}>=10.8:editors/apel@${EMACS_FLAVOR} \ + migemo:japanese/migemo + +USES= emacs + +CONFLICTS= ja-migemo.el + +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --with-emacs=${EMACS_CMD} +ALL_TARGET= migemo.elc + +PLIST_SUB= MIGEMO="@comment " ELISP="" +SLAVE_PORT= yes + +do-install: + ${INSTALL_DATA} ${WRKSRC}/migemo.el ${STAGEDIR}${PREFIX}/${EMACS_LIBDIR}/site-lisp + ${INSTALL_DATA} ${WRKSRC}/migemo.elc ${STAGEDIR}${PREFIX}/${EMACS_LIBDIR}/site-lisp + +.include "${MASTERDIR}/Makefile" Property changes on: head/japanese/migemo-emacs/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/migemo-emacs/pkg-descr =================================================================== --- head/japanese/migemo-emacs/pkg-descr (nonexistent) +++ head/japanese/migemo-emacs/pkg-descr (revision 460701) @@ -0,0 +1,8 @@ +Migemo is a Japanese incremental search tool for Emacs. +You can search Japanese words on Emacs without Kanji conversion. + +To use Migemo, you must set following elisp to your own .emacs file. + +(load-library "migemo") + +WWW: http://migemo.namazu.org/ Property changes on: head/japanese/migemo-emacs/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property