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)
# 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]$||")
Name: emacs
Version: 27.1
Release: 1mamba
Release: 2mamba
Summary: Common files needed to run the GNU Emacs text editor
Group: Applications/Text
Vendor: openmamba
@ -23,54 +21,54 @@ Patch3: %{name}-21.3-x86_64.patch
Patch4: emacs-24.3-libgif-5.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: GConf-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
%if ! %{with_xtoolkit_motif}
BuildRequires: libatk-devel
BuildRequires: libcairo-devel
%endif
BuildRequires: libdbus-devel
BuildRequires: libfontconfig-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libfreetype-devel
%endif
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libgif-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libglib-devel
%endif
BuildRequires: libgmp-devel
BuildRequires: libgnutls-devel
BuildRequires: libgomp-devel
BuildRequires: libgpm-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libgtk-devel
%endif
BuildRequires: libICE-devel
BuildRequires: libharfbuzz-devel
BuildRequires: libjansson-devel
BuildRequires: libjpeg-devel
BuildRequires: libMagick-devel
BuildRequires: liblcms2-devel
BuildRequires: libncurses-devel
%if ! %{with_xtoolkit_motif}
BuildRequires: libpango-devel
%endif
%if "%{?stage1}" != "1"
BuildRequires: libpng-devel
%endif
BuildRequires: librsvg-devel
BuildRequires: libselinux-devel
BuildRequires: libsoup-devel
BuildRequires: libsystemd-devel
%if "%{?stage1}" != "1"
BuildRequires: libSM-devel
BuildRequires: libtiff-devel
BuildRequires: libX11-devel
BuildRequires: libwebkit2gtk-devel
%endif
BuildRequires: libXft-devel
BuildRequires: libxcb-devel
BuildRequires: libxml2-devel
%if "%{?stage1}" != "1"
BuildRequires: libXpm-devel
%endif
BuildRequires: libXrender-devel
BuildRequires: libz-devel
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: debianutils
%if "%{?stage1}" != "1"
@ -84,10 +82,6 @@ Requires: debianutils
Requires(post):%{__install_info}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
# NOTE:
# Does Emacs use -lXaw3d? no
# (usage of Xaw3d is disabled when xtoolkit is set to motif)
%description
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.
@ -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'll also need to install the emacs package in order to run Emacs.
#% debug_package
%debug_package
%prep
%setup -q -n %{name}-%{dirver}
#-D -T
#%patch0 -p1 -b .infofix
#%patch1 -p1 -b .security_mktemp
#patch2 -p1 -b .ia64
@ -159,43 +154,33 @@ You'll also need to install the emacs package in order to run Emacs.
#%patch4 -p1
#sed -i 's/ctags/gctags/g' etc/etags.1
#./autogen.sh
%build
./autogen.sh
#:<< _EOF
CFLAGSEXTRA="-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216"
CONFOPTS="\
--build=%{_build} \
--host=%{_host} \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--sharedstatedir=/var \
--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 ..
#CONFOPTS="\
#--build=%{_build} \
#--host=%{_host} \
#--prefix=%{_prefix} \
#--libdir=%{_libdir} \
#--libexecdir=%{_libdir} \
#--mandir=%{_mandir} \
#--infodir=%{_infodir} \
#--sharedstatedir=/var \
#--with-pop"
# build binary with X support
%if "%{?stage1}" != "1"
[ -d build-withx ] && rm -rf build-withx
mkdir build-withx && cd build-withx
ln -s ../configure .
CFLAGS="%{optflags} $CFLAGSEXTRA" LDFLAGS=-s \
../configure ${CONFOPTS} \
%if %{with_xtoolkit_motif}
--with-x-toolkit=motif \
%else
--with-x-toolkit=gtk \
%endif
%configure ${CONFOPTS} \
--libexecdir=%{_libdir} \
--with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
--with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no \
--with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json \
--with-sound \
%{_arch}-pc-linux-gnu
@ -204,6 +189,22 @@ CFLAGS="%{optflags} $CFLAGSEXTRA" LDFLAGS=-s \
cd ..
%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
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
PATH=$PATH:/sbin
@ -215,15 +216,27 @@ ARCHDIR=%{_arch}-pc-linux-gnu
%define opt_build nox
%endif
%makeoldinstall -C build-%{opt_build} \
sharedstatedir=%{buildroot}/var \
libexecdir=%{buildroot}%{_libdir} \
%makeinstall -C build-%{opt_build} \
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
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}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
@ -231,7 +244,7 @@ mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
# remove sun specific stuff
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}%{_libdir}/%{name}/%{dirver}/%{_arch}-pc-linux-gnu/fakemail
rm -f %{buildroot}%{_infodir}/dir
@ -294,20 +307,7 @@ find %{buildroot}%{_datadir}/%{name}/%{dirver}/lisp/leim \
-name '*.el.gz' -print | sed "s,%{buildroot},," | \
grep -v "leim\/leim-list.el" >> el-filelist
%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
%if "%{?stage1}" == "1"
rm -rf %{buildroot}%{_datadir}/icons %{buildroot}%{_datadir}/applications
%endif
@ -354,7 +354,7 @@ exit 0
%{_bindir}/etags
#%{_bindir}/grep-changelog
#%{_bindir}/rcs-checkin
#%{_userunitdir}/emacs.service
%{_userunitdir}/emacs.service
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{dirver}
%dir %{_libdir}/%{name}/%{dirver}/%{_host}
@ -386,18 +386,20 @@ exit 0
%files nox
%defattr(-,root,root)
%{_bindir}/%{name}
%{_bindir}/emacs
%{_bindir}/emacs-%{dirver}-nox
%{_bindir}/emacs-%{dirver}-nox.pdmp
%if "%{?stage1}" == "1"
%{_bindir}/%{name}-%{dirver}
%{_bindir}/emacs-%{dirver}
%endif
%{_bindir}/%{name}-%{dirver}-nox
%{_datadir}/%{name}/%{dirver}/etc/DOC
#%doc src/COPYING
%if "%{?stage1}" != "1"
%files X11
%defattr(-,root,root)
%{_bindir}/%{name}-%{dirver}
%{_bindir}/emacs-%{dirver}
%{_bindir}/emacs-%{dirver}.pdmp
%{_bindir}/xemacs
%{_datadir}/pixmaps/xemacs.png
%{_datadir}/applications/xemacs.desktop
@ -406,12 +408,13 @@ exit 0
%{_datadir}/icons/hicolor/scalable/apps/emacs.ico
%{_datadir}/icons/hicolor/scalable/apps/emacs.svg
%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document*.svg
%if %{with_xtoolkit_motif}
%{_datadir}/X11/app-defaults/Emacs
%endif
%endif
%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
- automatic version update by autodist