#2 Make xemacs an optional component
Merged 2 years ago by peter. Opened 2 years ago by tdawson.
rpms/ tdawson/erlang master  into  master

file modified
+23 -11

@@ -20,6 +20,7 @@ 

  ##

  

  %global __with_emacs 1

+ %global __with_xemacs 1

  %global __with_examples 1

  %global __with_java 1

  #

@@ -60,7 +61,7 @@ 

  

  Name:		erlang

  Version:	20.3.6

- Release:	1%{?dist}

+ Release:	2%{?dist}

  Summary:	General-purpose programming language and runtime environment

  

  Group:		Development/Languages

@@ -802,9 +803,11 @@ 

  %if %{__with_emacs}

  BuildRequires: emacs

  BuildRequires: emacs-el

+ %endif %{__with_emacs}

+ %if %{__with_xemacs}

  BuildRequires: xemacs

  BuildRequires: xemacs-packages-extra-el

- %endif %{__with_emacs}

+ %endif %{__with_xemacs}

  Requires: %{name}-compiler%{?_isa} = %{version}-%{release}

  Requires: %{name}-erts%{?_isa} = %{version}-%{release}

  Requires: %{name}-inets%{?_isa} = %{version}-%{release}

@@ -813,12 +816,14 @@ 

  Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}

  %if %{__with_emacs}

  Requires: emacs-filesystem

- Requires: xemacs-filesystem

  Obsoletes: emacs-erlang

  Obsoletes: emacs-erlang-el

+ %endif %{__with_emacs}

+ %if %{__with_xemacs}

+ Requires: xemacs-filesystem

  Obsoletes: xemacs-erlang

  Obsoletes: xemacs-erlang-el

- %endif %{__with_emacs}

+ %endif %{__with_xemacs}

  

  

  %description tools

@@ -910,7 +915,8 @@ 

  pushd emacs-erlang

  %{_emacs_bytecompile} *.el

  popd

- 

+ %endif %{__with_emacs}

+ %if %{__with_xemacs}

  # XEmacs related stuff

  cat > xemacs-erlang-init.el << EOF

  (setq load-path (cons "%{_xemacs_sitelispdir}/erlang" load-path))

@@ -924,7 +930,7 @@ 

  pushd xemacs-erlang

  %{_xemacs_bytecompile} *.el

  popd

- %endif %{__with_emacs}

+ %endif %{__with_xemacs}

  

  make

  

@@ -954,7 +960,8 @@ 

  		"$RPM_BUILD_ROOT%{_emacs_sitelispdir}/erlang/"

  done

  install -m 0644 emacs-erlang/*.elc "$RPM_BUILD_ROOT%{_emacs_sitelispdir}/erlang/"

- 

+ %endif %{__with_emacs}

+ %if %{__with_xemacs}

  # XEmacs related stuff

  install -m 0755 -d "$RPM_BUILD_ROOT%{_xemacs_sitestartdir}"

  install -m 0755 -d "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang"

@@ -966,7 +973,7 @@ 

  done

  rm -f "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/erlang-flymake.el"

  install -m 0644 xemacs-erlang/*.elc "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/"

- %endif %{__with_emacs}

+ %endif %{__with_xemacs}

  

  make DESTDIR=$RPM_BUILD_ROOT install

  

@@ -1948,16 +1955,18 @@ 

  %endif

  %if %{__with_emacs}

  %dir %{_emacs_sitelispdir}/erlang

- %dir %{_xemacs_sitelispdir}/erlang

  %doc %{_emacs_sitelispdir}/erlang/README

- %doc %{_xemacs_sitelispdir}/erlang/README

  %{_emacs_sitelispdir}/erlang/*.el

  %{_emacs_sitelispdir}/erlang/*.elc

  %{_emacs_sitestartdir}/erlang-init.el

+ %endif %{__with_emacs}

+ %if %{__with_xemacs}

+ %dir %{_xemacs_sitelispdir}/erlang

+ %doc %{_xemacs_sitelispdir}/erlang/README

  %{_xemacs_sitelispdir}/erlang/*.el

  %{_xemacs_sitelispdir}/erlang/*.elc

  %{_xemacs_sitestartdir}/erlang-init.el

- %endif %{__with_emacs}

+ %endif %{__with_xemacs}

  

  %if %{__with_wxwidgets}

  %files wx

@@ -2214,6 +2223,9 @@ 

  

  

  %changelog

+ * Fri May 18 2018 Troy Dawson <tdawson@redhat.com> - 20.3.6-2

+ - Make xemacs an optional component

+ 

  * Tue May 15 2018 Peter Lemenkov <lemenkov@gmail.com> - 20.3.6-1

  - Ver. 20.3.6

  

Right now you have to have both emacs and xemacs to build erlang.
This patch makes it simple to build erlang with emacs, but not xemacs.

Pull-Request has been merged by peter

2 years ago