commit:     9d76320ce03b12e8b1211e8ee91a0deed63fa66d
Author:     Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Sun Oct  8 20:43:59 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct  9 00:29:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d76320c

sys-devel/llvm-common: add USE=emacs for llvm modes in utils/emacs

Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Closes: https://github.com/gentoo/gentoo/pull/31635
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/llvm-common/llvm-common-14.0.6.ebuild    | 38 ++++++++++++++++++----
 sys-devel/llvm-common/llvm-common-15.0.7.ebuild    | 36 +++++++++++++++++---
 sys-devel/llvm-common/llvm-common-16.0.6.ebuild    | 36 +++++++++++++++++---
 sys-devel/llvm-common/llvm-common-17.0.1.ebuild    | 36 +++++++++++++++++---
 .../llvm-common/llvm-common-17.0.2.9999.ebuild     | 36 +++++++++++++++++---
 sys-devel/llvm-common/llvm-common-17.0.2.ebuild    | 36 +++++++++++++++++---
 .../llvm-common/llvm-common-18.0.0.9999.ebuild     | 36 +++++++++++++++++---
 .../llvm-common-18.0.0_pre20230925.ebuild          | 36 +++++++++++++++++---
 .../llvm-common-18.0.0_pre20231002.ebuild          | 36 +++++++++++++++++---
 9 files changed, 280 insertions(+), 46 deletions(-)

diff --git a/sys-devel/llvm-common/llvm-common-14.0.6.ebuild 
b/sys-devel/llvm-common/llvm-common-14.0.6.ebuild
index 2be11dd95e44..c8fdea852737 100644
--- a/sys-devel/llvm-common/llvm-common-14.0.6.ebuild
+++ b/sys-devel/llvm-common/llvm-common-14.0.6.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos 
~x64-macos"
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-15.0.7.ebuild 
b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
index 5c69c0a3337c..3419b7207944 100644
--- a/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
+++ b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos 
~x64-macos"
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-16.0.6.ebuild 
b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
index ce993645101a..d1ceab13d169 100644
--- a/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
+++ b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux 
~ppc-macos ~x64-macos"
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-17.0.1.ebuild 
b/sys-devel/llvm-common/llvm-common-17.0.1.ebuild
index 4dd4fe395fe7..b90c15d2e3e5 100644
--- a/sys-devel/llvm-common/llvm-common-17.0.1.ebuild
+++ b/sys-devel/llvm-common/llvm-common-17.0.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 
~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-17.0.2.9999.ebuild 
b/sys-devel/llvm-common/llvm-common-17.0.2.9999.ebuild
index ce5f03ca34a5..d2cde923ede3 100644
--- a/sys-devel/llvm-common/llvm-common-17.0.2.9999.ebuild
+++ b/sys-devel/llvm-common/llvm-common-17.0.2.9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS=""
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-17.0.2.ebuild 
b/sys-devel/llvm-common/llvm-common-17.0.2.ebuild
index 4dd4fe395fe7..b90c15d2e3e5 100644
--- a/sys-devel/llvm-common/llvm-common-17.0.2.ebuild
+++ b/sys-devel/llvm-common/llvm-common-17.0.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 
~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-18.0.0.9999.ebuild 
b/sys-devel/llvm-common/llvm-common-18.0.0.9999.ebuild
index ce5f03ca34a5..d2cde923ede3 100644
--- a/sys-devel/llvm-common/llvm-common-18.0.0.9999.ebuild
+++ b/sys-devel/llvm-common/llvm-common-18.0.0.9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS=""
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-18.0.0_pre20230925.ebuild 
b/sys-devel/llvm-common/llvm-common-18.0.0_pre20230925.ebuild
index ce5f03ca34a5..d2cde923ede3 100644
--- a/sys-devel/llvm-common/llvm-common-18.0.0_pre20230925.ebuild
+++ b/sys-devel/llvm-common/llvm-common-18.0.0_pre20230925.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS=""
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

diff --git a/sys-devel/llvm-common/llvm-common-18.0.0_pre20231002.ebuild 
b/sys-devel/llvm-common/llvm-common-18.0.0_pre20231002.ebuild
index ce5f03ca34a5..d2cde923ede3 100644
--- a/sys-devel/llvm-common/llvm-common-18.0.0_pre20231002.ebuild
+++ b/sys-devel/llvm-common/llvm-common-18.0.0_pre20231002.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit llvm.org
+inherit elisp-common llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of LLVM"
 HOMEPAGE="https://llvm.org/";
@@ -11,18 +11,44 @@ HOMEPAGE="https://llvm.org/";
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
 KEYWORDS=""
+IUSE="emacs"
 
 RDEPEND="
        !sys-devel/llvm:0
 "
+BDEPEND="
+       emacs? ( >=app-editors/emacs-23.1:* )
+"
 
-LLVM_COMPONENTS=( llvm/utils/vim )
+LLVM_COMPONENTS=( llvm/utils )
 llvm.org_set_globals
 
+SITEFILE="50llvm-gentoo.el"
+BYTECOMPFLAGS="-L emacs"
+
+src_compile() {
+       default
+
+       use emacs && elisp-compile emacs/*.el
+}
+
 src_install() {
        insinto /usr/share/vim/vimfiles
-       doins -r */
+       doins -r vim/*/
        # some users may find it useful
-       newdoc README README.vim
-       dodoc vimrc
+       newdoc vim/README README.vim
+       dodoc vim/vimrc
+
+       if use emacs ; then
+               elisp-install llvm emacs/*.{el,elc}
+               elisp-make-site-file "${SITEFILE}" llvm
+       fi
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
 }

Reply via email to