Disable Native-Compilation feature

Resolves: RHEL-55467
Related: RHEL-33495
This commit is contained in:
Jacek Migacz 2024-08-21 19:39:36 +02:00
parent fbb8fa6e52
commit df50ad7084

View File

@ -111,7 +111,6 @@ Supplements: (libwayland-server and emacs-common)
%define site_start_d %{site_lisp}/site-start.d %define site_start_d %{site_lisp}/site-start.d
%define pkgconfig %{_datadir}/pkgconfig %define pkgconfig %{_datadir}/pkgconfig
%define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host} %define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host}
%define native_lisp %{_libdir}/emacs/%{version}/native-lisp
%global desc %{expand:Emacs is a powerful, customizable, self-documenting, modeless text %global desc %{expand:Emacs is a powerful, customizable, self-documenting, modeless text
editor. Emacs contains special code editing features, a scripting editor. Emacs contains special code editing features, a scripting
@ -270,7 +269,7 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS;
--with-jpeg \ --with-jpeg \
--with-json \ --with-json \
--with-modules \ --with-modules \
--with-native-compilation=aot \ --with-native-compilation=no \
--with-png \ --with-png \
--with-rsvg \ --with-rsvg \
--with-sqlite3 \ --with-sqlite3 \
@ -290,7 +289,7 @@ mkdir build-nw && cd build-nw
ln -s ../configure . ln -s ../configure .
%configure --with-json \ %configure --with-json \
--with-modules \ --with-modules \
--with-native-compilation=aot \ --with-native-compilation=no \
--with-sqlite3 \ --with-sqlite3 \
--with-tree-sitter \ --with-tree-sitter \
%if %{without gpm} %if %{without gpm}
@ -315,7 +314,7 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS;
--with-jpeg \ --with-jpeg \
--with-json \ --with-json \
--with-modules \ --with-modules \
--with-native-compilation=aot \ --with-native-compilation=no \
--with-png \ --with-png \
--with-rsvg \ --with-rsvg \
--with-sqlite3 \ --with-sqlite3 \
@ -344,7 +343,7 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS;
--with-jpeg \ --with-jpeg \
--with-json \ --with-json \
--with-modules \ --with-modules \
--with-native-compilation=aot \ --with-native-compilation=no \
--with-pgtk \ --with-pgtk \
--with-png \ --with-png \
--with-rsvg \ --with-rsvg \
@ -501,47 +500,10 @@ install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${
nw_pdmp="emacs-$(./build-nw/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" nw_pdmp="emacs-$(./build-nw/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
install -p -m 0644 build-nw/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${nw_pdmp} install -p -m 0644 build-nw/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${nw_pdmp}
# Install native compiled Lisp of all builds echo %{emacs_libexecdir}/${pgtk_pdmp} >> pgtk-filelist
pgtk_comp_native_ver=$(ls -1 build-pgtk/native-lisp) echo %{emacs_libexecdir}/${gtkx11_pdmp} >> gtk+x11-filelist
gtkx11_comp_native_ver=$(ls -1 build-gtk+x11/native-lisp) echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-filelist
lucid_comp_native_ver=$(ls -1 build-lucid/native-lisp) echo %{emacs_libexecdir}/${nw_pdmp} >> nw-filelist
nw_comp_native_ver=$(ls -1 build-nw/native-lisp)
cp -ar build-pgtk/native-lisp/${pgtk_comp_native_ver} %{buildroot}%{native_lisp}
cp -ar build-gtk+x11/native-lisp/${gtkx11_comp_native_ver} %{buildroot}%{native_lisp}
cp -ar build-lucid/native-lisp/${lucid_comp_native_ver} %{buildroot}%{native_lisp}
cp -ar build-nw/native-lisp/${nw_comp_native_ver} %{buildroot}%{native_lisp}
(TOPDIR=${PWD}
cd %{buildroot}
find .%{native_lisp}/${gtkx11_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/gtk+x11-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/gtk+x11-dirs "%%%%dir %%p\n" \)
)
(TOPDIR=${PWD}
cd %{buildroot}
find .%{native_lisp}/${pgtk_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/pgtk-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/pgtk-dirs "%%%%dir %%p\n" \)
)
(TOPDIR=${PWD}
cd %{buildroot}
find .%{native_lisp}/${lucid_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/lucid-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/lucid-dirs "%%%%dir %%p\n" \)
)
(TOPDIR=${PWD}
cd %{buildroot}
find .%{native_lisp}/${nw_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/nw-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/nw-dirs "%%%%dir %%p\n" \)
)
echo %{emacs_libexecdir}/${pgtk_pdmp} >> pgtk-eln-filelist
echo %{emacs_libexecdir}/${gtkx11_pdmp} >> gtk+x11-eln-filelist
echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-eln-filelist
echo %{emacs_libexecdir}/${nw_pdmp} >> nw-eln-filelist
# remove leading . from filelists
sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-eln-filelist *-dirs
# remove exec permissions from eln files to prevent the debuginfo extractor from
# trying to extract debuginfo from them
find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs chmod -x
# ensure native files are newer than byte-code files
# see: https://bugzilla.redhat.com/show_bug.cgi?id=2157979#c11
find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs touch
%check %check
appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml
@ -584,22 +546,22 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
/usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ /usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
--slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || :
%files -f pgtk-eln-filelist -f pgtk-dirs %files -f pgtk-filelist
%{_bindir}/emacs-%{version} %{_bindir}/emacs-%{version}
%attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs
%{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml %{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
%files gtk+x11 -f gtk+x11-eln-filelist -f gtk+x11-dirs %files gtk+x11 -f gtk+x11-filelist
%{_bindir}/emacs-%{version}-gtk+x11 %{_bindir}/emacs-%{version}-gtk+x11
%attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs
%attr(0755,-,-) %ghost %{_bindir}/emacs-gtk+x11 %attr(0755,-,-) %ghost %{_bindir}/emacs-gtk+x11
%files lucid -f lucid-eln-filelist -f lucid-dirs %files lucid -f lucid-filelist
%{_bindir}/emacs-%{version}-lucid %{_bindir}/emacs-%{version}-lucid
%attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs
%attr(0755,-,-) %ghost %{_bindir}/emacs-lucid %attr(0755,-,-) %ghost %{_bindir}/emacs-lucid
%files nw -f nw-eln-filelist -f nw-dirs %files nw -f nw-filelist
%{_bindir}/emacs-%{version}-nox %{_bindir}/emacs-%{version}-nox
%{_bindir}/emacs-%{version}-nw %{_bindir}/emacs-%{version}-nw
%{_bindir}/emacs-nox %{_bindir}/emacs-nox