remove emacs.pdmp causing conflicts when using differant emacs x/nox target

update configure (with gtk3) and specfile cleanups [release 27.1-2mamba;Sat Oct 24 2020]
This commit is contained in:
Silvan Calarco 2024-01-05 22:04:55 +01:00
parent 380689b227
commit a8b012b690

View File

@ -1,12 +1,10 @@
# Staged build (no first stage deps) # Staged build (no first stage deps)
# rpm -ba emacs.spec --define 'stage1 1' # rpm -ba emacs.spec --define 'stage1 1'
# FIXME: currently (ver.22.1) --x-toolkit=gtk leads to a segfaulting xemacs
%define with_xtoolkit_motif 0
%define dirver %(echo %version | sed "s|[a-z]$||") %define dirver %(echo %version | sed "s|[a-z]$||")
Name: emacs Name: emacs
Version: 27.1 Version: 27.1
Release: 1mamba Release: 2mamba
Summary: Common files needed to run the GNU Emacs text editor Summary: Common files needed to run the GNU Emacs text editor
Group: Applications/Text Group: Applications/Text
Vendor: openmamba Vendor: openmamba
@ -23,54 +21,54 @@ Patch3: %{name}-21.3-x86_64.patch
Patch4: emacs-24.3-libgif-5.patch Patch4: emacs-24.3-libgif-5.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: GConf-devel
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libICE-devel
BuildRequires: libSM-devel
%if "%{?stage1}" != "1"
BuildRequires: libX11-devel
BuildRequires: libXcomposite-devel
BuildRequires: libXext-devel
BuildRequires: libXfixes-devel
BuildRequires: libXinerama-devel
BuildRequires: libXpm-devel
BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel
%endif
BuildRequires: libacl-devel
BuildRequires: libalsa-devel BuildRequires: libalsa-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libatk-devel BuildRequires: libatk-devel
BuildRequires: libcairo-devel BuildRequires: libcairo-devel
%endif
BuildRequires: libdbus-devel BuildRequires: libdbus-devel
BuildRequires: libfontconfig-devel BuildRequires: libfontconfig-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libfreetype-devel BuildRequires: libfreetype-devel
%endif
BuildRequires: libgdk-pixbuf-devel BuildRequires: libgdk-pixbuf-devel
BuildRequires: libgif-devel BuildRequires: libgif-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libglib-devel BuildRequires: libglib-devel
%endif BuildRequires: libgmp-devel
BuildRequires: libgnutls-devel BuildRequires: libgnutls-devel
BuildRequires: libgomp-devel
BuildRequires: libgpm-devel BuildRequires: libgpm-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libgtk-devel BuildRequires: libgtk-devel
%endif BuildRequires: libharfbuzz-devel
BuildRequires: libICE-devel BuildRequires: libjansson-devel
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libMagick-devel BuildRequires: liblcms2-devel
BuildRequires: libncurses-devel BuildRequires: libncurses-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libpango-devel BuildRequires: libpango-devel
%endif
%if "%{?stage1}" != "1" %if "%{?stage1}" != "1"
BuildRequires: libpng-devel BuildRequires: libpng-devel
%endif %endif
BuildRequires: librsvg-devel BuildRequires: librsvg-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: libsoup-devel
BuildRequires: libsystemd-devel
%if "%{?stage1}" != "1" %if "%{?stage1}" != "1"
BuildRequires: libSM-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: libX11-devel BuildRequires: libwebkit2gtk-devel
%endif %endif
BuildRequires: libXft-devel BuildRequires: libxcb-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
%if "%{?stage1}" != "1"
BuildRequires: libXpm-devel
%endif
BuildRequires: libXrender-devel
BuildRequires: libz-devel BuildRequires: libz-devel
BuildRequires: perl-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: debianutils BuildRequires: debianutils
%if "%{?stage1}" != "1" %if "%{?stage1}" != "1"
@ -84,10 +82,6 @@ Requires: debianutils
Requires(post):%{__install_info} Requires(post):%{__install_info}
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
# NOTE:
# Does Emacs use -lXaw3d? no
# (usage of Xaw3d is disabled when xtoolkit is set to motif)
%description %description
Emacs is a powerful, customizable, self-documenting, modeless text editor. Emacs is a powerful, customizable, self-documenting, modeless text editor.
Emacs contains special code editing features, a scripting language (elisp), and the capability to read mail, news and more without leaving the editor. Emacs contains special code editing features, a scripting language (elisp), and the capability to read mail, news and more without leaving the editor.
@ -148,10 +142,11 @@ Install emacs-X11 if you're going to use Emacs with the X Window System.
You should also install emacs-X11 if you're going to run Emacs both with and without X (it will work fine both ways). You should also install emacs-X11 if you're going to run Emacs both with and without X (it will work fine both ways).
You'll also need to install the emacs package in order to run Emacs. You'll also need to install the emacs package in order to run Emacs.
#% debug_package %debug_package
%prep %prep
%setup -q -n %{name}-%{dirver} %setup -q -n %{name}-%{dirver}
#-D -T
#%patch0 -p1 -b .infofix #%patch0 -p1 -b .infofix
#%patch1 -p1 -b .security_mktemp #%patch1 -p1 -b .security_mktemp
#patch2 -p1 -b .ia64 #patch2 -p1 -b .ia64
@ -159,43 +154,33 @@ You'll also need to install the emacs package in order to run Emacs.
#%patch4 -p1 #%patch4 -p1
#sed -i 's/ctags/gctags/g' etc/etags.1 #sed -i 's/ctags/gctags/g' etc/etags.1
#./autogen.sh
%build %build
./autogen.sh #:<< _EOF
CFLAGSEXTRA="-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216" CFLAGSEXTRA="-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216"
CONFOPTS="\ #CONFOPTS="\
--build=%{_build} \ #--build=%{_build} \
--host=%{_host} \ #--host=%{_host} \
--prefix=%{_prefix} \ #--prefix=%{_prefix} \
--libdir=%{_libdir} \ #--libdir=%{_libdir} \
--libexecdir=%{_libdir} \ #--libexecdir=%{_libdir} \
--mandir=%{_mandir} \ #--mandir=%{_mandir} \
--infodir=%{_infodir} \ #--infodir=%{_infodir} \
--sharedstatedir=/var \ #--sharedstatedir=/var \
--with-pop" #--with-pop"
# build binary without X support
[ -d build-nox ] && rm -rf build-nox
mkdir build-nox && cd build-nox
CFLAGS="%{optflags} $CFLAGSEXTRA" LDFLAGS=-s \
../configure ${CONFOPTS} \
--with-x=no
%make bootstrap
%make systemdunitdir=%{_userunitdir}
cd ..
# build binary with X support # build binary with X support
%if "%{?stage1}" != "1" %if "%{?stage1}" != "1"
[ -d build-withx ] && rm -rf build-withx [ -d build-withx ] && rm -rf build-withx
mkdir build-withx && cd build-withx mkdir build-withx && cd build-withx
ln -s ../configure .
CFLAGS="%{optflags} $CFLAGSEXTRA" LDFLAGS=-s \ CFLAGS="%{optflags} $CFLAGSEXTRA" LDFLAGS=-s \
../configure ${CONFOPTS} \ %configure ${CONFOPTS} \
%if %{with_xtoolkit_motif} --libexecdir=%{_libdir} \
--with-x-toolkit=motif \ --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
%else --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no \
--with-x-toolkit=gtk \ --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json \
%endif
--with-sound \ --with-sound \
%{_arch}-pc-linux-gnu %{_arch}-pc-linux-gnu
@ -204,6 +189,22 @@ CFLAGS="%{optflags} $CFLAGSEXTRA" LDFLAGS=-s \
cd .. cd ..
%endif %endif
# build binary without X support
[ -d build-nox ] && rm -rf build-nox
mkdir build-nox && cd build-nox
ln -s ../configure .
CFLAGS="%{optflags} $CFLAGSEXTRA" LDFLAGS=-s \
%configure ${CONFOPTS} \
--libexecdir=%{_libdir} \
--with-x=no \
--with-modules \
--with-json
%make bootstrap
%make systemdunitdir=%{_userunitdir}
cd ..
%install %install
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
PATH=$PATH:/sbin PATH=$PATH:/sbin
@ -215,15 +216,27 @@ ARCHDIR=%{_arch}-pc-linux-gnu
%define opt_build nox %define opt_build nox
%endif %endif
%makeoldinstall -C build-%{opt_build} \ %makeinstall -C build-%{opt_build} \
sharedstatedir=%{buildroot}/var \
libexecdir=%{buildroot}%{_libdir} \
systemdunitdir=%{_userunitdir} systemdunitdir=%{_userunitdir}
#\
# sharedstatedir=%{buildroot}/var \
# libexecdir=%{buildroot}%{_libdir} \
# systemdunitdir=%{_userunitdir}
# Remove emacs.pdmp from common
rm %{buildroot}%{_libdir}/emacs/%{dirver}/%{_host}/emacs.pdmp
# Install emacs.pdmp of the emacs with GTK+
install -p -m 0644 build-withx/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{dirver}.pdmp
# Install the emacs without X
install -p -m 0755 build-nox/src/emacs %{buildroot}%{_bindir}/emacs-%{dirver}-nox
install -p -m 0644 build-nox/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{dirver}-nox.pdmp
rm -f %{buildroot}%{_infodir}/dir rm -f %{buildroot}%{_infodir}/dir
install -D -m755 build-nox/src/emacs %{buildroot}%{_bindir}/emacs-%{dirver}-nox
#install -D -m644 build-nox/etc/DOC-%{version}.1 \
# %{buildroot}%{_datadir}/emacs/%{version}/etc/DOC-%{version}.1
mv %{buildroot}%{_mandir}/man1/ctags.1.gz %{buildroot}%{_mandir}/man1/gctags.1.gz mv %{buildroot}%{_mandir}/man1/ctags.1.gz %{buildroot}%{_mandir}/man1/gctags.1.gz
mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
@ -231,7 +244,7 @@ mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
# remove sun specific stuff # remove sun specific stuff
rm -f %{buildroot}%{_datadir}/%{name}/%{dirver}/etc/emacstool.1 rm -f %{buildroot}%{_datadir}/%{name}/%{dirver}/etc/emacstool.1
# remove unusefull stuff # remove unuseful stuff
rm -f %{buildroot}%{_datadir}/%{name}/%{dirver}/etc/sex.6 rm -f %{buildroot}%{_datadir}/%{name}/%{dirver}/etc/sex.6
rm -f %{buildroot}%{_libdir}/%{name}/%{dirver}/%{_arch}-pc-linux-gnu/fakemail rm -f %{buildroot}%{_libdir}/%{name}/%{dirver}/%{_arch}-pc-linux-gnu/fakemail
rm -f %{buildroot}%{_infodir}/dir rm -f %{buildroot}%{_infodir}/dir
@ -294,20 +307,7 @@ find %{buildroot}%{_datadir}/%{name}/%{dirver}/lisp/leim \
-name '*.el.gz' -print | sed "s,%{buildroot},," | \ -name '*.el.gz' -print | sed "s,%{buildroot},," | \
grep -v "leim\/leim-list.el" >> el-filelist grep -v "leim\/leim-list.el" >> el-filelist
%if "%{?stage1}" != "1" %if "%{?stage1}" == "1"
%if %{with_xtoolkit_motif}
install -d %{buildroot}%{_datadir}/X11/app-defaults/
cat > %{buildroot}%{_datadir}/X11/app-defaults/Emacs << _EOF
Emacs*font: -*-fixed-medium-r-normal-*-*-140-75-75-*-*-*
emacs*foreground: Wheat
emacs*background: DarkSlateGray
emacs*region.attributeForeground: White
emacs*region.attributeBackground: SteelBlue
emacs*pointerColor: Orchid
emacs*cursorColor: Orchid
_EOF
%endif
%else
rm -rf %{buildroot}%{_datadir}/icons %{buildroot}%{_datadir}/applications rm -rf %{buildroot}%{_datadir}/icons %{buildroot}%{_datadir}/applications
%endif %endif
@ -354,7 +354,7 @@ exit 0
%{_bindir}/etags %{_bindir}/etags
#%{_bindir}/grep-changelog #%{_bindir}/grep-changelog
#%{_bindir}/rcs-checkin #%{_bindir}/rcs-checkin
#%{_userunitdir}/emacs.service %{_userunitdir}/emacs.service
%dir %{_libdir}/%{name} %dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{dirver} %dir %{_libdir}/%{name}/%{dirver}
%dir %{_libdir}/%{name}/%{dirver}/%{_host} %dir %{_libdir}/%{name}/%{dirver}/%{_host}
@ -386,18 +386,20 @@ exit 0
%files nox %files nox
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/%{name} %{_bindir}/emacs
%{_bindir}/emacs-%{dirver}-nox
%{_bindir}/emacs-%{dirver}-nox.pdmp
%if "%{?stage1}" == "1" %if "%{?stage1}" == "1"
%{_bindir}/%{name}-%{dirver} %{_bindir}/emacs-%{dirver}
%endif %endif
%{_bindir}/%{name}-%{dirver}-nox
%{_datadir}/%{name}/%{dirver}/etc/DOC %{_datadir}/%{name}/%{dirver}/etc/DOC
#%doc src/COPYING #%doc src/COPYING
%if "%{?stage1}" != "1" %if "%{?stage1}" != "1"
%files X11 %files X11
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/%{name}-%{dirver} %{_bindir}/emacs-%{dirver}
%{_bindir}/emacs-%{dirver}.pdmp
%{_bindir}/xemacs %{_bindir}/xemacs
%{_datadir}/pixmaps/xemacs.png %{_datadir}/pixmaps/xemacs.png
%{_datadir}/applications/xemacs.desktop %{_datadir}/applications/xemacs.desktop
@ -406,12 +408,13 @@ exit 0
%{_datadir}/icons/hicolor/scalable/apps/emacs.ico %{_datadir}/icons/hicolor/scalable/apps/emacs.ico
%{_datadir}/icons/hicolor/scalable/apps/emacs.svg %{_datadir}/icons/hicolor/scalable/apps/emacs.svg
%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document*.svg %{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document*.svg
%if %{with_xtoolkit_motif}
%{_datadir}/X11/app-defaults/Emacs
%endif
%endif %endif
%changelog %changelog
* Sat Oct 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 27.1-2mamba
- remove emacs.pdmp causing conflicts when using differant emacs x/nox target
- update configure (with gtk3) and specfile cleanups
* Thu Aug 13 2020 Automatic Build System <autodist@mambasoft.it> 27.1-1mamba * Thu Aug 13 2020 Automatic Build System <autodist@mambasoft.it> 27.1-1mamba
- automatic version update by autodist - automatic version update by autodist