summaryrefslogtreecommitdiff
path: root/editors/emacs25/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'editors/emacs25/Makefile.common')
-rw-r--r--editors/emacs25/Makefile.common77
1 files changed, 77 insertions, 0 deletions
diff --git a/editors/emacs25/Makefile.common b/editors/emacs25/Makefile.common
new file mode 100644
index 00000000000..298099a81eb
--- /dev/null
+++ b/editors/emacs25/Makefile.common
@@ -0,0 +1,77 @@
+# $NetBSD: Makefile.common,v 1.1 2016/09/18 13:36:18 ryoon Exp $
+#
+# used by editors/emacs25/Makefile
+# used by editors/emacs25-nox11/Makefile
+
+.include "../../mk/bsd.prefs.mk"
+
+DISTNAME= emacs-${EMACS_VERSION}
+PKGNAME?= ${DISTNAME:S/emacs/emacs25/}
+CATEGORIES= editors
+MASTER_SITES= ${MASTER_SITE_GNU:=emacs/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://www.gnu.org/software/emacs/
+COMMENT= GNU editing macros (editor)
+LICENSE= gnu-gpl-v3
+
+WRKSRC= ${WRKDIR}/${DISTNAME:S/b$//}
+
+GNU_CONFIGURE= yes
+INFO_FILES= yes
+USE_TOOLS+= autoconf automake gmake makeinfo gzip
+
+CONFIGURE_ARGS+= --srcdir=${WRKSRC}
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+CONFIGURE_ENV+= GAMEOWN=${GAMES_USER}
+
+USE_GAMESGROUP= yes
+
+BUILD_DEFS+= VARBASE
+BUILD_DEFS+= GAMEDATAMODE
+PLIST_SRC+= ../../editors/emacs25/PLIST
+
+.include "../../editors/emacs25/version.mk"
+
+BUILD_TARGET= bootstrap
+EMACS_VERSION= ${_EMACS_VERSION_MAJOR}.${_EMACS_VERSION_MINOR}
+PLIST_SUBST+= EMACS_VERSION=${EMACS_VERSION}
+
+REPLACE_PERL= lib-src/grep-changelog
+CHECK_INTERPRETER_SKIP= bin/grep-changelog
+
+MAKE_DIRS_PERMS+= ${VARBASE}/games/emacs ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
+CONF_FILES_PERMS+= /dev/null ${VARBASE}/games/emacs/snake-scores \
+ ${GAMES_USER} ${GAMES_GROUP} ${GAMEDATAMODE}
+CONF_FILES_PERMS+= /dev/null ${VARBASE}/games/emacs/tetris-scores \
+ ${GAMES_USER} ${GAMES_GROUP} ${GAMEDATAMODE}
+
+SPECIAL_PERMS+= libexec/emacs/${EMACS_VERSION}/${MACHINE_GNU_PLATFORM}/update-game-score ${SETGID_GAMES_PERMS}
+
+# build PATH in the dumped emacs is not a problem
+CHECK_WRKREF_SKIP+= bin/emacs
+CHECK_WRKREF_SKIP+= bin/emacs-${EMACS_VERSION}
+
+.if (${OPSYS} == "NetBSD") && \
+ !exists(/usr/lib/libgcc_s.so) && !exists(/usr/lib/libgcc.a)
+# NetBSD with native Clang doesn't provide libgcc, everything is in libc.
+pre-configure: fake-libgcc
+
+.PHONY: fake-libgcc
+fake-libgcc:
+ ${AR} q ${BUILDLINK_DIR}/lib/libgcc.a
+.endif
+
+.if (${OPSYS} == "NetBSD") && exists(/usr/include/term.h)
+CPPFLAGS+= -DTERMINFO
+.elif ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "OpenBSD"
+.include "../../mk/curses.buildlink3.mk"
+.else
+.include "../../mk/termcap.buildlink3.mk"
+.endif
+
+.include "../../mk/oss.buildlink3.mk"
+
+post-extract:
+ cp ${.CURDIR}/../../editors/emacs25/files/site-init.el ${WRKSRC}/lisp
+ ${CHMOD} -R go-w ${WRKSRC}