added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,278 @@
SUMMARY = "Emacs is the extensible, customizable, self-documenting real-time display editor"
HOMEPAGE = "https://www.gnu.org/software/emacs/"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
SRC_URI = "https://ftp.gnu.org/pub/gnu/emacs/emacs-${PV}.tar.xz \
file://0001-largefile.m4-Update-from-latest-gnulib.patch \
"
SRC_URI:append:class-target = " file://usemake-docfile-native.patch"
SRC_URI[sha256sum] = "ee21182233ef3232dc97b486af2d86e14042dbb65bbc535df562c3a858232488"
CVE_CHECK_IGNORE = "\
CVE-2007-6109 \
"
PACKAGECONFIG[gnutls] = "--with-gnutls=yes,--with-gnutls=no,gnutls"
PACKAGECONFIG[kerberos] = "--with-kerberos=yes,--with-kerberos=no,krb5"
PACKAGECONFIG[libgmp] = "--with-libgmp=yes,--with-libgmp=no,gmp"
PACKAGECONFIG ??= "gnutls kerberos libgmp"
# We could use --without-all but its better to
# split it into several packages (size of minimal doesnt change)
EXTRA_OECONF = " --with-x=no --with-dumping=none --disable-build-details"
# Disable seccomp, as its a default dependency for gnutls but it doesnt work when cross-compiling emacs
EXTRA_OECONF:append = " ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'ac_cv_have_decl_SECCOMP_FILTER_FLAG_TSYNC=no ac_cv_have_decl_SECCOMP_SET_MODE_FILTER=no', '', d)}"
DEPENDS = "ncurses"
DEPENDS:append:class-target = " emacs-native"
inherit autotools mime-xdg pkgconfig
# Remove build host references to avoid target pollution
do_compile:prepend () {
sed -i -e 's|${TMPDIR}||g' ${B}/src/config.h
sed -i -e 's|${B}||g' ${B}/src/epaths.h
}
do_compile:class-native (){
cd ${B}/lib-src
oe_runmake make-docfile
oe_runmake make-fingerprint
}
do_install:class-native(){
install -d ${D}${bindir}
install -m 755 ${B}/lib-src/make-docfile ${D}/${bindir}/
install -m 755 ${B}/lib-src/make-fingerprint ${D}/${bindir}/
}
do_install:append(){
# Delete systemd stuff, extend using DISTRO_FEATURES?
rm -rf ${D}/${libdir}
# Extra stuff which isnt needed
rm -rf ${D}/${datadir}/metainfo
rm -rf ${D}/${datadir}/info
# Emacs copies files to ${D} while building, which were unpacked
# by a different user, we need to restore those
chown -R root:root ${D}${datadir}
}
# Use a similar strategy to how we build python:
# Create three packages
# minimal - A working lisp based text editor
# base - What would probably work for most
# full - A fully working emacs
# The lists of files are long but are worth it
# Installing "emacs" installs the base package
PACKAGE_BEFORE_PN = "${PN}-minimal ${PN}-base ${PN}-full"
RPROVIDES:${PN}-base = "${PN}"
RDEPENDS:${PN}-base:class-target = "${PN}-minimal"
RDEPENDS:${PN}-full:class-target = "${PN}"
# A minimal version of emacs that works
# These are kept sorted in alphabetical order
FILES:${PN}-minimal = " \
${bindir}/emacs* \
${datadir}/${BPN}/${PV}/etc/charsets/ \
${datadir}/${BPN}/${PV}/lisp/abbrev.elc \
${datadir}/${BPN}/${PV}/lisp/bindings.elc \
${datadir}/${BPN}/${PV}/lisp/buff-menu.elc \
${datadir}/${BPN}/${PV}/lisp/button.elc \
${datadir}/${BPN}/${PV}/lisp/case-table.elc \
${datadir}/${BPN}/${PV}/lisp/composite.elc \
${datadir}/${BPN}/${PV}/lisp/cus-face.elc \
${datadir}/${BPN}/${PV}/lisp/cus-start.elc \
${datadir}/${BPN}/${PV}/lisp/custom.elc \
${datadir}/${BPN}/${PV}/lisp/disp-table.elc \
${datadir}/${BPN}/${PV}/lisp/electric.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/backquote.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/byte-opt.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/byte-run.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/bytecomp.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cconv.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-generic.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-preloaded.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/easymenu.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/eldoc.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/float-sup.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/gv.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/lisp-mode.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/lisp.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/macroexp.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/map-ynp.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/map.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/nadvice.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/regexp-opt.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/seq.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/shorthands.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/subr-x.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/syntax.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/tabulated-list.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/timer.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/vc/warnings.elc \
${datadir}/${BPN}/${PV}/lisp/env.elc \
${datadir}/${BPN}/${PV}/lisp/epa-hook.elc \
${datadir}/${BPN}/${PV}/lisp/facemenu.elc \
${datadir}/${BPN}/${PV}/lisp/faces.elc \
${datadir}/${BPN}/${PV}/lisp/files.elc \
${datadir}/${BPN}/${PV}/lisp/font-core.elc \
${datadir}/${BPN}/${PV}/lisp/font-lock.elc \
${datadir}/${BPN}/${PV}/lisp/format.elc \
${datadir}/${BPN}/${PV}/lisp/frame.elc \
${datadir}/${BPN}/${PV}/lisp/help.elc \
${datadir}/${BPN}/${PV}/lisp/image.elc \
${datadir}/${BPN}/${PV}/lisp/indent.elc \
${datadir}/${BPN}/${PV}/lisp/international/characters.elc \
${datadir}/${BPN}/${PV}/lisp/international/charprop.el \
${datadir}/${BPN}/${PV}/lisp/international/charscript.elc \
${datadir}/${BPN}/${PV}/lisp/international/cp51932.elc \
${datadir}/${BPN}/${PV}/lisp/international/emoji-zwj.elc \
${datadir}/${BPN}/${PV}/lisp/international/eucjp-ms.elc \
${datadir}/${BPN}/${PV}/lisp/international/iso-transl.elc \
${datadir}/${BPN}/${PV}/lisp/international/mule-cmds.elc \
${datadir}/${BPN}/${PV}/lisp/international/mule-conf.elc \
${datadir}/${BPN}/${PV}/lisp/international/mule.elc \
${datadir}/${BPN}/${PV}/lisp/international/uni*.el \
${datadir}/${BPN}/${PV}/lisp/isearch.elc \
${datadir}/${BPN}/${PV}/lisp/jit-lock.elc \
${datadir}/${BPN}/${PV}/lisp/jka-cmpr-hook.elc \
${datadir}/${BPN}/${PV}/lisp/language/burmese.elc \
${datadir}/${BPN}/${PV}/lisp/language/cham.elc \
${datadir}/${BPN}/${PV}/lisp/language/chinese.elc \
${datadir}/${BPN}/${PV}/lisp/language/cyrillic.elc \
${datadir}/${BPN}/${PV}/lisp/language/czech.elc \
${datadir}/${BPN}/${PV}/lisp/language/english.elc \
${datadir}/${BPN}/${PV}/lisp/language/ethiopic.elc \
${datadir}/${BPN}/${PV}/lisp/language/european.elc \
${datadir}/${BPN}/${PV}/lisp/language/georgian.elc \
${datadir}/${BPN}/${PV}/lisp/language/greek.elc \
${datadir}/${BPN}/${PV}/lisp/language/hebrew.elc \
${datadir}/${BPN}/${PV}/lisp/language/indian.elc \
${datadir}/${BPN}/${PV}/lisp/language/japanese.elc \
${datadir}/${BPN}/${PV}/lisp/language/khmer.elc \
${datadir}/${BPN}/${PV}/lisp/language/korean.elc \
${datadir}/${BPN}/${PV}/lisp/language/lao.elc \
${datadir}/${BPN}/${PV}/lisp/language/misc-lang.elc \
${datadir}/${BPN}/${PV}/lisp/language/romanian.elc \
${datadir}/${BPN}/${PV}/lisp/language/sinhala.elc \
${datadir}/${BPN}/${PV}/lisp/language/slovak.elc \
${datadir}/${BPN}/${PV}/lisp/language/tai-viet.elc \
${datadir}/${BPN}/${PV}/lisp/language/thai.elc \
${datadir}/${BPN}/${PV}/lisp/language/tibetan.elc \
${datadir}/${BPN}/${PV}/lisp/language/utf-8-lang.elc \
${datadir}/${BPN}/${PV}/lisp/language/vietnamese.elc \
${datadir}/${BPN}/${PV}/lisp/ldefs-boot.el \
${datadir}/${BPN}/${PV}/lisp/loaddefs.el \
${datadir}/${BPN}/${PV}/lisp/loadup.el \
${datadir}/${BPN}/${PV}/lisp/menu-bar.elc \
${datadir}/${BPN}/${PV}/lisp/minibuffer.elc \
${datadir}/${BPN}/${PV}/lisp/mouse.elc \
${datadir}/${BPN}/${PV}/lisp/newcomment.elc \
${datadir}/${BPN}/${PV}/lisp/obarray.elc \
${datadir}/${BPN}/${PV}/lisp/paren.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/elisp-mode.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/prog-mode.elc \
${datadir}/${BPN}/${PV}/lisp/register.elc \
${datadir}/${BPN}/${PV}/lisp/replace.elc \
${datadir}/${BPN}/${PV}/lisp/rfn-eshadow.elc \
${datadir}/${BPN}/${PV}/lisp/select.elc \
${datadir}/${BPN}/${PV}/lisp/simple.elc \
${datadir}/${BPN}/${PV}/lisp/simple.elc \
${datadir}/${BPN}/${PV}/lisp/startup.elc \
${datadir}/${BPN}/${PV}/lisp/subr.elc \
${datadir}/${BPN}/${PV}/lisp/tab-bar.elc \
${datadir}/${BPN}/${PV}/lisp/term/tty-colors.elc \
${datadir}/${BPN}/${PV}/lisp/term/xterm.elc \
${datadir}/${BPN}/${PV}/lisp/textmodes/fill.elc \
${datadir}/${BPN}/${PV}/lisp/textmodes/page.elc \
${datadir}/${BPN}/${PV}/lisp/textmodes/paragraphs.elc \
${datadir}/${BPN}/${PV}/lisp/textmodes/text-mode.elc \
${datadir}/${BPN}/${PV}/lisp/tooltip.elc \
${datadir}/${BPN}/${PV}/lisp/uniquify.elc \
${datadir}/${BPN}/${PV}/lisp/vc/ediff-hook.elc \
${datadir}/${BPN}/${PV}/lisp/vc/vc-hooks.elc \
${datadir}/${BPN}/${PV}/lisp/version.elc \
${datadir}/${BPN}/${PV}/lisp/widget.elc \
${datadir}/${BPN}/${PV}/lisp/window.elc \
${prefix}/libexec \
"
# What works for "most" is relative, but this can be easily extended if needed
FILES:${PN}-base = " \
${datadir}/${BPN}/${PV}/etc/e \
${datadir}/${BPN}/${PV}/etc/forms \
${datadir}/${BPN}/${PV}/etc/srecode \
${datadir}/${BPN}/${PV}/etc/themes/adwaita-theme.el \
${datadir}/${BPN}/${PV}/etc/themes/deeper-blue-theme.el \
${datadir}/${BPN}/${PV}/etc/themes/light-blue-theme.el \
${datadir}/${BPN}/${PV}/etc/themes/misterioso-theme.el \
${datadir}/${BPN}/${PV}/etc/themes/tango-theme.el \
${datadir}/${BPN}/${PV}/etc/themes/wheatgrass-theme.el \
${datadir}/${BPN}/${PV}/etc/themes/wombat-theme.el \
${datadir}/${BPN}/${PV}/lisp/ansi-color.elc \
${datadir}/${BPN}/${PV}/lisp/auth-source.elc \
${datadir}/${BPN}/${PV}/lisp/calendar/iso8601.elc \
${datadir}/${BPN}/${PV}/lisp/calendar/parse-time.elc \
${datadir}/${BPN}/${PV}/lisp/calendar/time-date.elc \
${datadir}/${BPN}/${PV}/lisp/cedet \
${datadir}/${BPN}/${PV}/lisp/comint.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-lib.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-macs.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/cl-seq.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/eieio-core.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/eieio.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/inline.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/pcase.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/ring.elc \
${datadir}/${BPN}/${PV}/lisp/emacs-lisp/smie.elc \
${datadir}/${BPN}/${PV}/lisp/files-x.elc \
${datadir}/${BPN}/${PV}/lisp/format-spec.elc \
${datadir}/${BPN}/${PV}/lisp/json.elc \
${datadir}/${BPN}/${PV}/lisp/ls-lisp.elc \
${datadir}/${BPN}/${PV}/lisp/net/tramp-compat.elc \
${datadir}/${BPN}/${PV}/lisp/net/tramp-integration.elc \
${datadir}/${BPN}/${PV}/lisp/net/tramp-loaddefs.el \
${datadir}/${BPN}/${PV}/lisp/net/tramp-sh.elc \
${datadir}/${BPN}/${PV}/lisp/net/tramp.elc \
${datadir}/${BPN}/${PV}/lisp/net/trampver.elc \
${datadir}/${BPN}/${PV}/lisp/password-cache.elc \
${datadir}/${BPN}/${PV}/lisp/pcomplete.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/*asm* \
${datadir}/${BPN}/${PV}/lisp/progmodes/*perl* \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-align.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-cmds.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-defs.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-engine.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-fonts.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-guess.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-menus.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-mode.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-styles.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cc-vars.elc \
${datadir}/${BPN}/${PV}/lisp/progmodes/cpp* \
${datadir}/${BPN}/${PV}/lisp/progmodes/executable* \
${datadir}/${BPN}/${PV}/lisp/progmodes/make* \
${datadir}/${BPN}/${PV}/lisp/progmodes/prog* \
${datadir}/${BPN}/${PV}/lisp/progmodes/python* \
${datadir}/${BPN}/${PV}/lisp/progmodes/sh-script* \
${datadir}/${BPN}/${PV}/lisp/shell.elc \
${datadir}/${BPN}/${PV}/lisp/subdirs.el \
${datadir}/${BPN}/${PV}/site-lisp/ \
"
# Restore FILES for the full package to catch everything left
FILES:${PN}-full = "${FILES:${PN}}"
FILES:${PN}-full:append = " ${datadir}/icons"
# The following does NOT build a native emacs.
# It only builds some parts of it that are
# required to by the build for target emacs.
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,390 @@
From c2bea3d033b5abd44698722d8eedc2b87373b33b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 2 Apr 2023 10:42:43 -0700
Subject: [PATCH] largefile.m4: Update from latest gnulib
brings in latest largefile specific changes which autoconf 2.72+ requires
Upstream-Status: Inappropriate [Drop it with new emacs release which has it]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
m4/largefile.m4 | 330 ++++++++++++++++++++++++++++++++++++++----------
1 file changed, 263 insertions(+), 67 deletions(-)
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 3e8b5e3..7fb81b8 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,7 +1,7 @@
# Enable large files on systems where this is not the default.
# Enable support for files on Linux file systems with 64-bit inode numbers.
-# Copyright 1992-1996, 1998-2022 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,8 +10,9 @@
# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
# and ftello in C++ mode as well.
+# Fixed in Autoconf 2.72, which has AC_SYS_YEAR2038.
AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
-[
+ m4_ifndef([AC_SYS_YEAR2038], [[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_FUNC_FSEEKO
case "$host_os" in
@@ -20,10 +21,10 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
;;
esac
-])
+ ]])
+)
-# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+
-# with _TIME_BITS. Also, work around a problem in autoconf <= 2.69:
+# Work around a problem in autoconf <= 2.69:
# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
# or configures them incorrectly in some cases.
m4_version_prereq([2.70], [], [
@@ -43,33 +44,258 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
])
])# m4_version_prereq 2.70
+# Support AC_SYS_YEAR2038, even if Autoconf 2.71 or earlier.
+# This code is taken from Autoconf master.
+m4_ifndef([AC_SYS_YEAR2038], [
+
+# _AC_SYS_YEAR2038_TEST_CODE
+# --------------------------
+# C code used to probe for time_t that can represent time points more
+# than 2**31 - 1 seconds after the epoch. With the usual Unix epoch,
+# these correspond to dates after 2038-01-18 22:14:07 +0000 (Gregorian),
+# hence the name.
+AC_DEFUN([_AC_SYS_YEAR2038_TEST_CODE],
+[[
+ #include <time.h>
+ /* Check that time_t can represent 2**32 - 1 correctly. */
+ #define LARGE_TIME_T \\
+ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
+ int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
+ && LARGE_TIME_T % 65537 == 0)
+ ? 1 : -1];
+]])
+
+# _AC_SYS_YEAR2038_OPTIONS
+# ------------------------
+# List of known ways to enable support for large time_t. If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_YEAR2038_PROBE.
+m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
+ ["none needed"] dnl 64-bit and newer 32-bit Unix
+ ["-D_TIME_BITS=64"] dnl glibc 2.34 with some 32-bit ABIs
+ ["-D__MINGW_USE_VC2005_COMPAT"] dnl 32-bit MinGW
+ ["-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"]
+ dnl 32-bit MinGW (misconfiguration)
+))
+
+# _AC_SYS_YEAR2038_PROBE([IF-NOT-DETECTED])
+# -----------------------------------------
+# Subroutine of AC_SYS_YEAR2038. Probe for time_t that can represent
+# time points more than 2**31 - 1 seconds after the epoch (dates after
+# 2038-01-18, see above) and set the cache variable ac_cv_sys_year2038_opts
+# to one of the values in the _AC_SYS_YEAR2038_OPTIONS list, or to
+# "support not detected" if none of them worked. Then, set compilation
+# options and #defines as necessary to enable large time_t support.
+#
+# Note that we do not test whether mktime, localtime, etc. handle
+# large values of time_t correctly, as that would require use of
+# AC_TRY_RUN. Note also that some systems only support large time_t
+# together with large off_t.
+#
+# If support is not detected, the behavior depends on which of the
+# top-level AC_SYS_YEAR2038 macros was used (see below).
+#
+# If you change this macro you may also need to change
+# _AC_SYS_YEAR2038_OPTIONS.
+AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
+[AC_CACHE_CHECK([for $CC option to enable timestamps after Jan 2038],
+ [ac_cv_sys_year2038_opts],
+ [ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_opt_found=no
+ for ac_opt in _AC_SYS_YEAR2038_OPTIONS; do
+ AS_IF([test x"$ac_opt" != x"none needed"],
+ [CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_YEAR2038_TEST_CODE])],
+ [ac_cv_sys_year2038_opts="$ac_opt"
+ ac_opt_found=yes])
+ test $ac_opt_found = no || break
+ done
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected"])
+
+ac_have_year2038=yes
+AS_CASE([$ac_cv_sys_year2038_opts],
+ ["none needed"], [],
+ ["support not detected"],
+ [ac_have_year2038=no
+ AS_CASE([$enable_year2038],
+ [yes],
+ [# If we're not cross compiling and 'touch' works with a large
+ # timestamp, then we can presume the system supports wider time_t
+ # *somehow* and we just weren't able to detect it. One common
+ # case that we deliberately *don't* probe for is a system that
+ # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
+ # wide time_t. (It would be inappropriate for us to override an
+ # intentional use of -m32.) Error out, demanding use of
+ # --disable-year2038 if this is intentional.
+ AS_IF([test $cross_compiling = no],
+ [AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
+ [AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
+ [*'Feb 7 2106'* | *'Feb 7 17:10'*],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [this system appears to support timestamps after January 2038,
+ but no mechanism for enabling wide 'time_t' was detected.
+ Did you mean to build a 64-bit binary? (e.g. 'CC="${CC} -m64"'.)
+ To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+ [], [], [55]))])])])])],
+
+ ["-D_TIME_BITS=64"],
+ [AC_DEFINE([_TIME_BITS], [64],
+ [Number of bits in time_t, on hosts where this is settable.])],
+
+ ["-D__MINGW_USE_VC2005_COMPAT=1"],
+ [AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
+ [Define to 1 on platforms where this makes time_t a 64-bit type.])],
-# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-# CACHE-VAR,
-# DESCRIPTION,
-# PROLOGUE, [FUNCTION-BODY])
-# --------------------------------------------------------
-m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
-[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
-[while :; do
- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
- [AC_LANG_PROGRAM([$5], [$6])],
- [$3=no; break])
- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
- [AC_LANG_PROGRAM([#undef $1
-#define $1 $2
-$5], [$6])],
- [$3=$2; break])
- $3=unknown
- break
-done])
-case $$3 in #(
- no | unknown) ;;
- *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
-esac
-rm -rf conftest*[]dnl
-])# _AC_SYS_LARGEFILE_MACRO_VALUE
+ ["-U_USE_32_BIT_TIME_T"*],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [the 'time_t' type is currently forced to be 32-bit.
+ It will stop working after January 2038.
+ Remove _USE_32BIT_TIME_T from the compiler flags.],
+ [], [], [55]))],
+
+ [AC_MSG_ERROR(
+ [internal error: bad value for \$ac_cv_sys_year2038_opts])])
+])
+
+# _AC_SYS_YEAR2038_ENABLE
+# -----------------------
+# Subroutine of AC_SYS_YEAR2038 and _AC_SYS_YEAR2038_OPT_IN.
+# Depending on which of the YEAR2038 macros was used, add either an
+# --enable-year2038, or a --disable-year2038, or no option at all to
+# the configure script. Note that this is expanded very late and
+# therefore there cannot be any code in the AC_ARG_ENABLE. The
+# default value for enable_year2038 is emitted unconditionally
+# because the generated code always looks at this variable.
+m4_define([_AC_SYS_YEAR2038_ENABLE],
+[m4_divert_text([DEFAULTS],
+ m4_provide_if([AC_SYS_YEAR2038],
+ [enable_year2038=yes],
+ [enable_year2038=no]))]dnl
+[AC_ARG_ENABLE([year2038],
+ m4_provide_if([AC_SYS_YEAR2038],
+ [AS_HELP_STRING([--disable-year2038],
+ [do not support timestamps after 2038])],
+ [AS_HELP_STRING([--enable-year2038],
+ [support timestamps after 2038])]))])
+
+# _AC_SYS_YEAR2038_OPT_IN
+# -----------------------
+# If the --enable-year2038 option is given to configure, attempt to
+# detect and activate support for large time_t on 32-bit systems.
+# This macro is automatically invoked by AC_SYS_LARGEFILE when large
+# *file* support is detected. It does not AC_REQUIRE AC_SYS_LARGEFILE
+# to avoid a dependency loop, and is therefore unsafe to expose as a
+# documented macro.
+AC_DEFUN([_AC_SYS_YEAR2038_OPT_IN],
+[m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
+ AS_IF([test "$enable_year2038" != no], [_AC_SYS_YEAR2038_PROBE])
+ AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
+])])
+
+# AC_SYS_YEAR2038
+# ---------------
+# Attempt to detect and activate support for large time_t.
+# On systems where time_t is not always 64 bits, this probe can be
+# skipped by passing the --disable-year2038 option to configure.
+AC_DEFUN([AC_SYS_YEAR2038],
+[AC_REQUIRE([AC_SYS_LARGEFILE])]dnl
+[m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
+ AS_IF([test "$enable_year2038" != no], [_AC_SYS_YEAR2038_PROBE])
+ AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
+])])
+
+# _AC_SYS_LARGEFILE_TEST_CODE
+# ---------------------------
+# C code used to probe for large file support.
+m4_define([_AC_SYS_LARGEFILE_TEST_CODE],
+[@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1]];[]dnl
+])
+
+# _AC_SYS_LARGEFILE_OPTIONS
+# -------------------------
+# List of known ways to enable support for large files. If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_LARGEFILE_PROBE.
+m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
+ ["none needed"] dnl Most current systems
+ ["-D_FILE_OFFSET_BITS=64"] dnl X/Open LFS spec
+ ["-D_LARGE_FILES=1"] dnl AIX (which versions?)
+ ["-n32"] dnl Irix 6.2 w/ SGI compiler
+))
+
+# _AC_SYS_LARGEFILE_PROBE
+# -----------------------
+# Subroutine of AC_SYS_LARGEFILE. Probe for large file support and set
+# the cache variable ac_cv_sys_largefile_opts to one of the values in
+# the _AC_SYS_LARGEFILE_OPTIONS list, or to "support not detected" if
+# none of the options in that list worked. Then, set compilation
+# options and #defines as necessary to enable large file support.
+#
+# If large file support is not detected, the behavior depends on which of
+# the top-level AC_SYS_LARGEFILE macros was used (see below).
+#
+# If you change this macro you may also need to change
+# _AC_SYS_LARGEFILE_OPTIONS.
+AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
+[AC_CACHE_CHECK([for $CC option to enable large file support],
+ [ac_cv_sys_largefile_opts],
+ [ac_save_CC="$CC"
+ ac_opt_found=no
+ for ac_opt in _AC_SYS_LARGEFILE_OPTIONS; do
+ AS_IF([test x"$ac_opt" != x"none needed"],
+ [CC="$ac_save_CC $ac_opt"])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_CODE])],
+ [ac_cv_sys_largefile_opts="$ac_opt"
+ ac_opt_found=yes])
+ test $ac_opt_found = no || break
+ done
+ CC="$ac_save_CC"
+ test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"])
+
+ac_have_largefile=yes
+AS_CASE([$ac_cv_sys_largefile_opts],
+ ["none needed"], [],
+ ["support not detected"],
+ [ac_have_largefile=no],
+
+ ["-D_FILE_OFFSET_BITS=64"],
+ [AC_DEFINE([_FILE_OFFSET_BITS], [64],
+ [Number of bits in a file offset, on hosts where this is settable.])],
+
+ ["-D_LARGE_FILES=1"],
+ [AC_DEFINE([_LARGE_FILES], [1],
+ [Define to 1 on platforms where this makes off_t a 64-bit type.])],
+
+ ["-n32"],
+ [CC="$CC -n32"],
+
+ [AC_MSG_ERROR(
+ [internal error: bad value for \$ac_cv_sys_largefile_opts])])
+
+_AC_SYS_YEAR2038_OPT_IN
+])
+# _AC_SYS_LARGEFILE_ENABLE
+# ------------------------
+# Subroutine of AC_SYS_LARGEFILE. Note that this
+# is expanded very late and therefore there cannot be any code in the
+# AC_ARG_ENABLE. The default value for enable_largefile is emitted
+# unconditionally because the generated shell code always looks at
+# this variable.
+m4_define([_AC_SYS_LARGEFILE_ENABLE],
+[m4_divert_text([DEFAULTS],
+ enable_largefile=yes)]dnl
+[AC_ARG_ENABLE([largefile],
+ [AS_HELP_STRING([--disable-largefile], [omit support for large files])])])
# AC_SYS_LARGEFILE
# ----------------
@@ -80,44 +306,14 @@ rm -rf conftest*[]dnl
# Additionally, on Linux file systems with 64-bit inodes a file that happens
# to have a 64-bit inode number cannot be accessed by 32-bit applications on
# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
+# This macro allows configuration to continue if the system doesn't support
+# large files.
AC_DEFUN([AC_SYS_LARGEFILE],
-[AC_ARG_ENABLE(largefile,
- [ --disable-largefile omit support for large files])
-AS_IF([test "$enable_largefile" != no],
- [AC_CACHE_CHECK([for special C compiler options needed for large files],
- ac_cv_sys_largefile_CC,
- [ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
- AC_COMPILE_IFELSE([], [break])
- CC="$CC -n32"
- AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi])
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
- fi
-
- _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
- ac_cv_sys_file_offset_bits,
- [Number of bits in a file offset, on hosts where this is settable.],
- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
- AS_CASE([$ac_cv_sys_file_offset_bits],
- [unknown],
- [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1],
- [ac_cv_sys_large_files],
- [Define for large files, on AIX-style hosts.],
- [_AC_SYS_LARGEFILE_TEST_INCLUDES])],
- [64],
- [gl_YEAR2038_BODY([])])])
-])# AC_SYS_LARGEFILE
+[m4_provide_if([_AC_SYS_LARGEFILE_PROBE], [], [dnl
+ AS_IF([test "$enable_largefile" != no], [_AC_SYS_LARGEFILE_PROBE])
+ AC_CONFIG_COMMANDS_PRE([_AC_SYS_LARGEFILE_ENABLE])
+])])
+])# m4_ifndef AC_SYS_YEAR2038
# Enable large files on systems where this is implemented by Gnulib, not by the
# system headers.
--
2.40.0

View File

@@ -0,0 +1,85 @@
Upstream-Status: Inappropriate [OE-Specific]
When building emacs, it builds some tools for the HOST
that are then used to build for target, such as
make-fingerprint and make-docfile, this needs to be
adapted to be used by bitbake, otherwise the compiled
executables arent compatible with the HOST.
Use the above mentioned tools provided by the native
version of the recipe instead.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Index: emacs-28.2/src/Makefile.in
===================================================================
--- emacs-28.2.orig/src/Makefile.in
+++ emacs-28.2/src/Makefile.in
@@ -462,7 +462,7 @@ ifeq ($(CHECK_STRUCTS),true)
pdumper.o: dmpstruct.h
endif
dmpstruct.h: $(srcdir)/dmpstruct.awk
-dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
+dmpstruct.h: $(dmpstruct_headers)
$(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
$(dmpstruct_headers) > $@
@@ -563,8 +563,7 @@ SYSTEM_TYPE = @SYSTEM_TYPE@
## Strictly speaking, emacs does not depend directly on all of $lisp,
## since not all pieces are used on all platforms. But DOC depends
## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
-emacs$(EXEEXT): temacs$(EXEEXT) \
- lisp.mk $(etc)/DOC $(lisp) \
+emacs$(EXEEXT): lisp.mk $(etc)/DOC $(lisp) \
$(lispsource)/international/charprop.el ${charsets}
ifeq ($(SYSTEM_TYPE),cygwin)
find ${top_builddir} -name '*.eln' | rebase -v -O -T -
@@ -597,15 +596,15 @@ endif
## for the first time, this prevents any variation between configurations
## in the contents of the DOC file.
##
-$(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp)
+$(etc)/DOC: lisp.mk $(obj) $(lisp)
$(AM_V_GEN)$(MKDIR_P) $(etc)
$(AM_V_at)rm -f $(etc)/DOC
- $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \
+ make-docfile -d $(srcdir) \
$(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC
- $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
+ make-docfile -a $(etc)/DOC -d $(lispsource) \
$(shortlisp)
-$(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \
+$(libsrc)/make-fingerprint$(EXEEXT): \
$(lib)/libgnu.a
$(MAKE) -C $(dir $@) $(notdir $@)
@@ -618,8 +617,8 @@ buildobj.h: Makefile
GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m)
-gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
- $(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > globals.tmp
+gl-stamp: $(GLOBAL_SOURCES)
+ make-docfile -d $(srcdir) -g $(obj) > globals.tmp
$(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h
$(AM_V_at)echo timestamp > $@
@@ -633,7 +632,7 @@ $(LIBEGNU_ARCHIVE): $(config_h)
$(MAKE) -C $(dir $@) all
ifeq ($(HAVE_PDUMPER),yes)
- MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT)
+ MAKE_PDUMPER_FINGERPRINT = make-fingerprint
else
MAKE_PDUMPER_FINGERPRINT =
endif
@@ -643,7 +642,7 @@ endif
## This goes on to affect various things, and the emacs binary fails
## to start if Vinstallation_directory has the wrong value.
temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
- $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT)
+ $(charsets) $(charscript) ${emoji-zwj}
$(AM_V_CCLD)$(CC) -o $@.tmp \
$(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
$(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)