Accepting request 1114250 from editors
- For GNUS: Use message-user-fqdn instead of gnus-local-organization - Now with changed pdump.patch patch from bjorn.bidar@thaodan.de - Build also wayland gtk based binary - Support wayland binary by checking for XDG_SESSION_TYPE - Provide eln native shared binaries for all emacs program binaries - Pass libdir to configure so native Emacs lisp files are installed correctly on 64bit systems OBS-URL: https://build.opensuse.org/request/show/1114250 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/emacs?expand=0&rev=177
This commit is contained in:
commit
d9b03e3cf9
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 28 11:53:14 UTC 2023 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- For GNUS: Use message-user-fqdn instead of gnus-local-organization
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 26 12:37:30 UTC 2023 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Now with changed pdump.patch patch from bjorn.bidar@thaodan.de
|
||||
- Build also wayland gtk based binary
|
||||
- Support wayland binary by checking for XDG_SESSION_TYPE
|
||||
- Provide eln native shared binaries for all emacs program binaries
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 26 00:11:46 UTC 2023 - Björn Bidar <bjorn.bidar@thaodan.de>
|
||||
|
||||
- Pass libdir to configure so native Emacs lisp files are installed
|
||||
correctly on 64bit systems
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 11 10:33:54 UTC 2023 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
22
emacs.sh
22
emacs.sh
@ -5,9 +5,10 @@
|
||||
# The environment variable EMACS_TOOLKIT is used to determine
|
||||
# the prefered GUI. Possible values/types of EMACS_TOOLKIT are
|
||||
#
|
||||
# nox -- for pure console based GNU Emacs
|
||||
# gtk -- for full GTK2/3 based GNU Emacs
|
||||
# x11 -- for full LUCID based GNU Emacs (used Xaw3d)
|
||||
# nox -- for pure console based GNU Emacs
|
||||
# gtk -- for full GTK2/3 based GNU Emacs (for real X11)
|
||||
# wayland -- for full GTK2/3 based GNU Emacs (for wayland)
|
||||
# x11 -- for full LUCID based GNU Emacs (used Xaw3d)
|
||||
#
|
||||
# Should work but remember history
|
||||
# bnc#345669 -- Emacs doesn't un-maximize in KDE/KWin
|
||||
@ -21,11 +22,22 @@
|
||||
# esac
|
||||
# fi
|
||||
#
|
||||
: ${EMACS_TOOLKIT:=gtk}
|
||||
if test -n "${XDG_SESSION_TYPE}"
|
||||
then
|
||||
if test "${XDG_SESSION_TYPE}" = wayland -a -x ${0}-wayland
|
||||
then
|
||||
: ${EMACS_TOOLKIT:=wayland}
|
||||
else
|
||||
: ${EMACS_TOOLKIT:=gtk}
|
||||
fi
|
||||
else
|
||||
: ${EMACS_TOOLKIT:=gtk}
|
||||
fi
|
||||
#
|
||||
# Enabled again
|
||||
#
|
||||
if test "$EMACS_TOOLKIT" = gtk; then
|
||||
if test "$EMACS_TOOLKIT" = gtk -o "$EMACS_TOOLKIT" = wayland
|
||||
then
|
||||
# Currently (2013/05/24) the parser of the GNOME libs
|
||||
# are broken that is it is not independent from locale
|
||||
LC_NUMERIC=POSIX
|
||||
|
110
emacs.spec
110
emacs.spec
@ -148,6 +148,7 @@ BuildRequires: pkgconfig(xrandr)
|
||||
BuildRequires: pkgconfig(xrender)
|
||||
BuildRequires: pkgconfig(xshmfence)
|
||||
BuildRequires: pkgconfig(xt)
|
||||
BuildRequires: pkgconfig(xwayland)
|
||||
BuildRequires: pkgconfig(xxf86vm)
|
||||
URL: http://www.gnu.org/software/emacs/
|
||||
Version: 29.1
|
||||
@ -256,6 +257,8 @@ Requires: gnu-unifont-bitmap-fonts
|
||||
Requires: ifnteuro
|
||||
Requires: xorg-x11-fonts
|
||||
Requires: xorg-x11-fonts-core
|
||||
Requires: (ghostscript-fonts-std or urw-base35-fonts)
|
||||
%glib2_gsettings_schema_requires
|
||||
Enhances: libX11-6
|
||||
Summary: GNU Emacs: Emacs binary with X Window System Support
|
||||
Group: Productivity/Text/Editors
|
||||
@ -279,8 +282,6 @@ Requires: emacs-el = %{version}
|
||||
Summary: GNU Emacs-nox: Emacs Lisp native compiled binary files
|
||||
Group: Productivity/Text/Editors
|
||||
|
||||
%define _libeln %{_prefix}/lib
|
||||
|
||||
%description -n emacs-eln
|
||||
Emacs Lisp (Elisp) is the Lisp dialect used by the Emacs text editor
|
||||
family. GNU Emacs can currently execute Elisp code either interpreted
|
||||
@ -354,6 +355,7 @@ popd
|
||||
%endif
|
||||
|
||||
%build
|
||||
umask 022
|
||||
%if %{without autoconf}
|
||||
# We don't want to run autoconf
|
||||
if test configure.ac -nt aclocal.m4 -o m4/gnulib-comp.m4 -nt aclocal.m4 ; then
|
||||
@ -444,6 +446,7 @@ export CC CFLAGS LANG LC_CTYPE LDFLAGS
|
||||
--sharedstatedir=%{_localstatedir}/lib \
|
||||
--libexecdir=%{_libexecdir} \
|
||||
--with-file-notification=yes \
|
||||
--libdir=%{_libdir} \
|
||||
--enable-locallisppath=%{_datadir}/emacs/%{version}/site-lisp:%{_datadir}/emacs/site-lisp
|
||||
"
|
||||
DESKTOP="--with-x \
|
||||
@ -463,6 +466,7 @@ DESKTOP="--with-x \
|
||||
"
|
||||
GTK="${DESKTOP} \
|
||||
--with-x-toolkit=gtk3 \
|
||||
--without-pgtk \
|
||||
--with-toolkit-scroll-bars \
|
||||
--x-includes=%{_x11inc} \
|
||||
--x-libraries=%{_x11lib} \
|
||||
@ -470,11 +474,6 @@ DESKTOP="--with-x \
|
||||
--with-m17n-flt \
|
||||
%if %{with cairo}
|
||||
--with-cairo \
|
||||
%endif
|
||||
%if %{with nativecomp}
|
||||
--with-native-compilation \
|
||||
%else
|
||||
--without-native-compilation \
|
||||
%endif
|
||||
--with-xwidgets \
|
||||
"
|
||||
@ -485,7 +484,6 @@ DESKTOP="--with-x \
|
||||
--x-libraries=%{_x11lib}:%{_x11data} \
|
||||
--without-libotf \
|
||||
--without-m17n-flt \
|
||||
--without-native-compilation \
|
||||
"
|
||||
NOX11="--with-gpm \
|
||||
--without-x \
|
||||
@ -502,7 +500,6 @@ DESKTOP="--with-x \
|
||||
--without-libotf \
|
||||
--without-m17n-flt \
|
||||
--without-harfbuzz \
|
||||
--without-native-compilation \
|
||||
"
|
||||
COMP="--disable-build-details \
|
||||
%if %{with mailutils}
|
||||
@ -510,6 +507,11 @@ DESKTOP="--with-x \
|
||||
--with-mailutils
|
||||
%else
|
||||
--with-pop \
|
||||
%endif
|
||||
%if %{with nativecomp}
|
||||
--with-native-compilation \
|
||||
%else
|
||||
--without-native-compilation \
|
||||
%endif
|
||||
--without-hesiod \
|
||||
--with-gameuser=:games \
|
||||
@ -533,27 +535,45 @@ fi
|
||||
ac_cv_lib_gif_EGifPutExtensionLast=yes
|
||||
export ac_cv_lib_gif_EGifPutExtensionLast
|
||||
|
||||
parking=$(mktemp -p ${PWD} -d parking.XXXXXX)
|
||||
CFLAGS="$CFLAGS -DPDMP_BASE='\"emacs-nox\"'" ./configure ${COMP} ${PREFIX} ${NOX11} ${SYS} --with-dumping=pdumper
|
||||
%make_build V=1
|
||||
make -C lisp/ updates compile V=1
|
||||
for i in $(find site-lisp/ -name '*.el'); do
|
||||
EMACSLOADPATH='' src/emacs -batch -q --no-site -f batch-byte-compile $i
|
||||
done
|
||||
cp src/emacs emacs-nox
|
||||
cp src/emacs.pdmp emacs-nox.pdmp
|
||||
cp -p src/emacs src/emacs-nox
|
||||
cp -p src/emacs.pdmp src/emacs-nox.pdmp
|
||||
%if %{with nativecomp}
|
||||
find native-lisp -type d -exec mkdir -p "${parking}%{_libdir}/emacs/%{version}/{}" \;
|
||||
find native-lisp -type f -exec install -m 0644 "{}" "${parking}%{_libdir}/emacs/%{version}/{}" \;
|
||||
%endif
|
||||
make distclean
|
||||
#
|
||||
CFLAGS="$CFLAGS -DPDMP_BASE='\"emacs-x11\"'" ./configure ${COMP} ${PREFIX} ${X11} ${SYS} --with-dumping=pdumper
|
||||
%make_build
|
||||
cp src/emacs emacs-x11
|
||||
cp src/emacs.pdmp emacs-x11.pdmp
|
||||
cp -p src/emacs src/emacs-x11
|
||||
cp -p src/emacs.pdmp src/emacs-x11.pdmp
|
||||
%if %{with nativecomp}
|
||||
find native-lisp -type d -exec mkdir -p "${parking}%{_libdir}/emacs/%{version}/{}" \;
|
||||
find native-lisp -type f -exec install -m 0644 "{}" "${parking}%{_libdir}/emacs/%{version}/{}" \;
|
||||
%endif
|
||||
make distclean
|
||||
#
|
||||
CFLAGS="$CFLAGS -DPDMP_BASE='\"emacs-gtk\"'" ./configure ${COMP} ${PREFIX} ${GTK} ${SYS} --with-dumping=pdumper
|
||||
%make_build
|
||||
cp src/emacs emacs-gtk
|
||||
cp src/emacs.pdmp emacs-gtk.pdmp
|
||||
find -name '*.eln'
|
||||
cp src/emacs src/emacs-gtk
|
||||
cp src/emacs.pdmp src/emacs-gtk.pdmp
|
||||
%if %{with nativecomp}
|
||||
find native-lisp -type d -exec mkdir -p "${parking}%{_libdir}/emacs/%{version}/{}" \;
|
||||
find native-lisp -type f -exec install -m 0644 "{}" "${parking}%{_libdir}/emacs/%{version}/{}" \;
|
||||
%endif
|
||||
make distclean
|
||||
#
|
||||
CFLAGS="$CFLAGS -DPDMP_BASE='\"emacs-wayland\"'" ./configure ${COMP} ${PREFIX} ${GTK//--without-pgtk/--with-pgtk} ${SYS} --with-dumping=pdumper
|
||||
%make_build
|
||||
cp src/emacs src/emacs-wayland
|
||||
cp src/emacs.pdmp src/emacs-wayland.pdmp
|
||||
|
||||
%if %{with tex4pdf}
|
||||
#
|
||||
@ -568,6 +588,7 @@ rm -vf site-start.el.orig
|
||||
popd
|
||||
|
||||
%install
|
||||
umask 022
|
||||
#
|
||||
PATH=/sbin:$PATH
|
||||
##
|
||||
@ -578,12 +599,24 @@ mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}
|
||||
make install DESTDIR=%{buildroot} systemdunitdir=%{_userunitdir}
|
||||
rm -vf %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}/*.pdmp
|
||||
install -m 0755 emacs-nox %{buildroot}%{_bindir}
|
||||
install -m 0755 emacs-gtk %{buildroot}%{_bindir}
|
||||
install -m 0755 emacs-x11 %{buildroot}%{_bindir}
|
||||
install -m 0644 emacs-nox.pdmp %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}/
|
||||
install -m 0644 emacs-gtk.pdmp %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}/
|
||||
install -m 0644 emacs-x11.pdmp %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}/
|
||||
%if %{with nativecomp}
|
||||
pushd native-lisp/
|
||||
ln -sf ../parking.*/usr/lib64/emacs/29.1/native-lisp/* .
|
||||
popd
|
||||
%endif
|
||||
for pdmp in emacs-nox emacs-gtk emacs-x11 emacs-wayland
|
||||
do
|
||||
install -m 0755 src/${pdmp} %{buildroot}%{_bindir}
|
||||
install -m 0644 src/${pdmp}.pdmp %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}/
|
||||
ln -sf ${pdmp}.pdmp %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}/${pdmp}-$(src/${pdmp} --fingerprint).pdmp
|
||||
done
|
||||
%if %{with nativecomp}
|
||||
pushd parking.*/%{_libdir}/emacs/%{version}/
|
||||
find native-lisp -type d -exec mkdir -p "%{buildroot}%{_libdir}/emacs/%{version}/{}" \;
|
||||
find native-lisp -type f -exec install -m 0644 "{}" "%{buildroot}%{_libdir}/emacs/%{version}/{}" \;
|
||||
popd
|
||||
%endif
|
||||
rm -rf parking.*
|
||||
rm -vf %{buildroot}/usr/bin/emacs
|
||||
rm -vf %{buildroot}%{_libexecdir}/emacs/%{version}/${configuration}/emacs.pdmp
|
||||
install -p %{S:5} %{buildroot}/usr/bin/emacs
|
||||
@ -723,19 +756,19 @@ ln -sf %{_sysconfdir}/alternatives/ctags.1%{ext_man} %{buildroot}%{_mandir}/man1
|
||||
|
||||
%if %{with nativecomp}
|
||||
touch eln.list
|
||||
for eln in %{buildroot}%{_libeln}/emacs/%{version}/native-lisp/%{version}-*/*.eln
|
||||
for eln in %{buildroot}%{_libdir}/emacs/%{version}/native-lisp/%{version}-*/*.eln
|
||||
do
|
||||
if test -e $eln
|
||||
then
|
||||
echo '%%{_libeln}/emacs/%%{version}/native-lisp/%%{version}-*/*.eln' >> eln.list
|
||||
echo '%%{_libdir}/emacs/%%{version}/native-lisp/%%{version}-*/*.eln' >> eln.list
|
||||
fi
|
||||
break
|
||||
done
|
||||
for eln in %{buildroot}%{_libeln}/emacs/%{version}/native-lisp/%{version}-*/preloaded/*.eln
|
||||
for eln in %{buildroot}%{_libdir}/emacs/%{version}/native-lisp/%{version}-*/preloaded/*.eln
|
||||
do
|
||||
if test -e $eln
|
||||
then
|
||||
echo '%%{_libeln}/emacs/%%{version}/native-lisp/%%{version}-*/preloaded/*.eln' >> eln.list
|
||||
echo '%%{_libdir}/emacs/%%{version}/native-lisp/%%{version}-*/preloaded/*.eln' >> eln.list
|
||||
fi
|
||||
break
|
||||
done
|
||||
@ -770,6 +803,10 @@ if test -e usr/share/emacs/site-lisp/auctex/font-latex.elc ; then
|
||||
TeX-auto-global "<none>")' -f batch-byte-compile font-latex.el > /dev/null 2>&1
|
||||
cd $owd
|
||||
fi
|
||||
%glib2_gsettings_schema_post
|
||||
|
||||
%postun -n emacs-x11
|
||||
%glib2_gsettings_schema_postun
|
||||
|
||||
%if 0%{?suse_version} <= 1500
|
||||
%post info
|
||||
@ -982,7 +1019,7 @@ fi
|
||||
%{_datadir}/emacs/%{version}/etc/charsets/symbol.map
|
||||
%{_datadir}/emacs/%{version}/etc/compilation.txt
|
||||
%{_datadir}/emacs/%{version}/etc/emacs_lldb.py
|
||||
%{_datadir}/emacs/%{version}/etc/org.gnu.emacs.defaults.gschema.xml
|
||||
%{_datadir}/emacs/%{version}/etc/org.gnu.emacs.defaults.gschema.*
|
||||
%dir %{_datadir}/emacs/%{version}/etc/org/
|
||||
%dir %{_datadir}/emacs/%{version}/etc/org/csl/
|
||||
%{_datadir}/emacs/%{version}/etc/org/csl/README
|
||||
@ -3438,17 +3475,20 @@ fi
|
||||
%files -n emacs-nox
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/emacs-nox
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-nox.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-nox*.pdmp
|
||||
|
||||
%files -n emacs-x11
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/emacs-x11
|
||||
%{_bindir}/emacs-gtk
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-x11.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-gtk.pdmp
|
||||
%{_bindir}/emacs-wayland
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-x11*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-gtk*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-wayland*.pdmp
|
||||
%dir %{appDefaultsDir}
|
||||
%{appDefaultsFile}
|
||||
%{_datadir}/applications/emacs*.desktop
|
||||
%{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
|
||||
%{_datadir}/icons/hicolor/128x128/apps/emacs.png
|
||||
%{_datadir}/icons/hicolor/16x16/apps/emacs.png
|
||||
%{_datadir}/icons/hicolor/24x24/apps/emacs.png
|
||||
@ -3467,11 +3507,11 @@ fi
|
||||
%if %{with nativecomp}
|
||||
%files -n emacs-eln -f eln.list
|
||||
%defattr(-, root, root)
|
||||
%dir %{_libeln}/emacs/
|
||||
%dir %{_libeln}/emacs/%{version}/
|
||||
%dir %{_libeln}/emacs/%{version}/native-lisp/
|
||||
%dir %{_libeln}/emacs/%{version}/native-lisp/%{version}-*/
|
||||
%dir %{_libeln}/emacs/%{version}/native-lisp/%{version}-*/preloaded/
|
||||
%dir %{_libdir}/emacs/
|
||||
%dir %{_libdir}/emacs/%{version}/
|
||||
%dir %{_libdir}/emacs/%{version}/native-lisp/
|
||||
%dir %{_libdir}/emacs/%{version}/native-lisp/%{version}-*/
|
||||
%dir %{_libdir}/emacs/%{version}/native-lisp/%{version}-*/preloaded/
|
||||
%endif
|
||||
|
||||
%files -n emacs-info
|
||||
|
59
pdump.patch
59
pdump.patch
@ -1,15 +1,17 @@
|
||||
From: Andreas Schwab
|
||||
Port to GNU Emacs 29.1: Werner Fink
|
||||
From 54823555425ffabe31b42672b1894d0e3ff1b018 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@thaodan.de>
|
||||
Date: Fri, 10 Feb 2023 23:31:35 +0200
|
||||
Subject: [PATCH] Allow to override pdmp base
|
||||
|
||||
Index: src/emacs.c
|
||||
===================================================================
|
||||
---
|
||||
src/emacs.c | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
src/emacs.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/emacs.c b/src/emacs.c
|
||||
index 687b8c7f81f0..2d6bfe07d813 100644
|
||||
--- src/emacs.c
|
||||
+++ src/emacs.c 2023-08-07 07:30:34.317996305 +0000
|
||||
@@ -867,12 +867,16 @@ load_pdump (int argc, char **argv)
|
||||
+++ src/emacs.c
|
||||
@@ -920,11 +920,15 @@ load_pdump (int argc, char **argv, char *dump_file)
|
||||
NULL
|
||||
#endif
|
||||
;
|
||||
@ -21,38 +23,19 @@ Index: src/emacs.c
|
||||
"Emacs"
|
||||
#else
|
||||
"emacs"
|
||||
#endif
|
||||
+#endif
|
||||
#endif
|
||||
;
|
||||
|
||||
/* TODO: maybe more thoroughly scrub process environment in order to
|
||||
@@ -957,6 +961,29 @@ load_pdump (int argc, char **argv)
|
||||
path_exec = ns_relocate (path_exec);
|
||||
#endif
|
||||
|
||||
@@ -1065,7 +1069,11 @@ load_pdump (int argc, char **argv, char *dump_file)
|
||||
if (IS_DIRECTORY_SEP (*p))
|
||||
last_sep = p;
|
||||
}
|
||||
+#ifdef PDMP_BASE
|
||||
+ if (emacs_executable && *emacs_executable)
|
||||
+ {
|
||||
+ needed = (strlen (path_exec)
|
||||
+ + 1
|
||||
+ + strlen (argv0_base)
|
||||
+ + 1
|
||||
+ + strlen (suffix)
|
||||
+ + 1);
|
||||
+ if (bufsize < needed)
|
||||
+ {
|
||||
+ xfree (dump_file);
|
||||
+ dump_file = xpalloc (NULL, &bufsize, needed - bufsize, -1, 1);
|
||||
+ }
|
||||
+ sprintf (dump_file, "%s%c%s%s",
|
||||
+ path_exec, DIRECTORY_SEP, argv0_base, suffix);
|
||||
+ result = pdumper_load (dump_file, emacs_executable);
|
||||
+
|
||||
+ if (result == PDUMPER_LOAD_SUCCESS)
|
||||
+ goto out;
|
||||
+ }
|
||||
+ argv0_base = PDMP_BASE;
|
||||
+#else
|
||||
argv0_base = last_sep ? last_sep + 1 : argv[0];
|
||||
+#endif
|
||||
+
|
||||
/* Look for "emacs-FINGERPRINT.pdmp" in PATH_EXEC. We hardcode
|
||||
"emacs" in "emacs-FINGERPRINT.pdmp" so that the Emacs binary
|
||||
still works if the user copies and renames it. */
|
||||
ptrdiff_t needed = (strlen (path_exec)
|
||||
+ 1
|
||||
+ strlen (argv0_base)
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3f821f184fc426ad3d56362e14865fcd623c29f605be1a64a53fd063b565a13e
|
||||
size 51754
|
||||
oid sha256:71eec8719fedbff1e466b9d70d958eef3bd32057b409525a24b7baedf30c0e0a
|
||||
size 51856
|
||||
|
Loading…
x
Reference in New Issue
Block a user