head	1.5;
access;
symbols
	pkgsrc-2026Q3:1.3.0.26
	pkgsrc-2026Q3-base:1.3
	pkgsrc-2026Q2:1.3.0.24
	pkgsrc-2026Q2-base:1.3
	pkgsrc-2026Q1:1.3.0.22
	pkgsrc-2026Q1-base:1.3
	pkgsrc-2025Q4:1.3.0.20
	pkgsrc-2025Q4-base:1.3
	pkgsrc-2025Q3:1.3.0.18
	pkgsrc-2025Q3-base:1.3
	pkgsrc-2025Q2:1.3.0.16
	pkgsrc-2025Q2-base:1.3
	pkgsrc-2025Q1:1.3.0.14
	pkgsrc-2025Q1-base:1.3
	pkgsrc-2024Q4:1.3.0.12
	pkgsrc-2024Q4-base:1.3
	pkgsrc-2024Q3:1.3.0.10
	pkgsrc-2024Q3-base:1.3
	pkgsrc-2024Q2:1.3.0.8
	pkgsrc-2024Q2-base:1.3
	pkgsrc-2024Q1:1.3.0.6
	pkgsrc-2024Q1-base:1.3
	pkgsrc-2023Q4:1.3.0.4
	pkgsrc-2023Q4-base:1.3
	pkgsrc-2023Q3:1.3.0.2
	pkgsrc-2023Q3-base:1.3;
locks; strict;
comment	@# @;


1.5
date	2026.10.14.19.32.13;	author markd;	state Exp;
branches;
next	1.4;
commitid	yjLYaxN74bFjOtZG;

1.4
date	2026.09.25.09.48.07;	author wiz;	state Exp;
branches;
next	1.3;
commitid	aB8SCn2lxhnHcZWG;

1.3
date	2023.08.14.05.13.31;	author wiz;	state Exp;
branches;
next	1.2;
commitid	BIiCypQBHffmgIAE;

1.2
date	2023.08.12.03.20.58;	author wiz;	state Exp;
branches;
next	1.1;
commitid	72BY0ytYOq6sHrAE;

1.1
date	2023.07.31.15.03.33;	author ryoon;	state Exp;
branches;
next	;
commitid	4qzOBWkCJLRUYXyE;


desc
@@


1.5
log
@emacs*: load local-site-start from site-start.el

Since we now use site-start.el allow it to load a local-site-start.el
for those users who had their own use for it.
@
text
@# $NetBSD: Makefile.common,v 1.4 2026/09/25 09:48:07 wiz Exp $
#
# used by editors/emacs29/Makefile
# used by editors/emacs29-nox11/Makefile

.include "../../mk/bsd.prefs.mk"

DISTNAME=	emacs-${EMACS_VERSION}
PKGNAME?=	${DISTNAME:S/emacs/emacs29/}
CATEGORIES=	editors
MASTER_SITES=	${MASTER_SITE_GNU:=emacs/}
EXTRACT_SUFX=	.tar.xz

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$//}

# use makeinfo from pkgsrc/deve/gtexinfo
TEXINFO_REQD+=	4.13

GNU_CONFIGURE=	yes
INFO_FILES=	yes
USE_TOOLS+=	autoconf gmake gzip makeinfo gm4 gsed

REPLACE_SH+=	autogen.sh

CONFIGURE_ARGS+=	--srcdir=${WRKSRC}
CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
CONFIGURE_ARGS+=	--disable-autodepend
CONFIGURE_ENV+=		GAMEOWN=${GAMES_USER}

USE_GAMESGROUP=		yes

BUILD_DEFS+=		VARBASE
BUILD_DEFS+=		GAMEDATAMODE
PLIST_SRC+=		../../editors/emacs29/PLIST

.include "../../editors/emacs29/version.mk"

BUILD_TARGET=		bootstrap
EMACS_VERSION=		${_EMACS_VERSION_MAJOR}.${_EMACS_VERSION_MINOR}
PLIST_SUBST+=		EMACS_VERSION=${EMACS_VERSION}
PLIST_VARS+=		native nonative

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}
CHECK_WRKREF_SKIP+=	libexec/emacs/${PKGVERSION_NOREV}/${MACHINE_GNU_PLATFORM}/emacs.pdmp

PRINT_PLIST_AWK+=	{ gsub(/${MACHINE_GNU_PLATFORM}/, "$${MACHINE_GNU_PLATFORM}"); }

.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} == "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/emacs29/files/site-init.el ${WRKSRC}/lisp
	${CHMOD} -R go-w ${WRKSRC}

.include "../../devel/libgetopt/buildlink3.mk"

# The lisp of other packages lives under this version's directory and so
# does their info, but Emacs builds Info-default-directory-list from its
# own --infodir at configure time and cannot be told at run time except
# through INFOPATH.  This adds the version's info directory to the list
# at startup; without it the files land where nothing looks.
# Since we are using site-start.el allow it to load a local-site-start.el
# if it exists.
post-install: emacs-info-path
emacs-info-path:
	${ECHO} '(setq Info-default-directory-list (append Info-default-directory-list' \
		> ${DESTDIR}${PREFIX}/share/emacs/${PKGVERSION_NOREV}/site-lisp/site-start.el
	${ECHO} '  (list (expand-file-name "../info" (file-name-directory load-file-name)))))' \
		>> ${DESTDIR}${PREFIX}/share/emacs/${PKGVERSION_NOREV}/site-lisp/site-start.el
	${ECHO} '  (load "local-site-start" t)' \
		>> ${DESTDIR}${PREFIX}/share/emacs/${PKGVERSION_NOREV}/site-lisp/site-start.el
@


1.4
log
@*: adapt packages to new emacs framework

With a lot of help from Showta Ishizaki.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.3 2023/08/14 05:13:31 wiz Exp $
d94 2
d102 2
@


1.3
log
@emacs29*: fix PLIST for no-native-compilation

XXX: why doesn't emacs29-nox11 use options.mk?
XXX: shouldn't we enable native-compilation by default for emacs29-nox11?
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.2 2023/08/12 03:20:58 wiz Exp $
d88 12
@


1.2
log
@emacs29: sync with wip/emacs-git

Add options for libgccjit libotf libwebp tree-sitter, default on.
Remove motif option, support was removed upstream.

Fix PLIST for me (amd64/10.99.5).

Bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.1 2023/07/31 15:03:33 ryoon Exp $
d46 1
@


1.1
log
@editors/emacs29: import emacs29-29.1

GNU Emacs is an extensible, customizable editor textand more.  At its
core is an interpreter for Emacs Lisp, a dialect of the Lisp
programming language with extensions to support text editing.  The
features of GNU Emacs include:

- Content-sensitive editing modes, including syntax coloring, for a
  wide variety of file types including plain text, source code, and
  HTML.
- Complete built-in documentation, including a tutorial for new users.
- Support for many languages and their scripts, including all scripts,
  Russian, Greek, Japanese, Chinese, Korean, Thai, Vietnamese, Lao,
  Ethiopian, and some Indian scripts.
- Highly customizable, using Emacs Lisp code or a graphical
  customization interface.
- A large number of extensions that add other functionality, including
  a project planner, mail and news reader, debugger interface,
  calendar, and more.  Many of these extensions are distributed with
  GNU Emacs; others are available separately.

This package contains Emacs version 29.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.1 2022/04/06 22:40:38 wiz Exp $
d22 1
a22 1
TEXINFO_REQD=	4.13
a86 1
.include "../../textproc/tree-sitter/buildlink3.mk"
@

