commit:     d56f500d8ccce7abfe3f3865ed95e7d5294abe18
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  2 14:08:51 2016 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Wed Mar  2 14:08:51 2016 +0000
URL:        https://gitweb.gentoo.org/proj/lisp.git/commit/?id=d56f500d

x11-wm/stumpwm: Add metadata and contrib modules

 x11-wm/stumpwm/metadata.xml         | 61 +++++++++++++++++++++++++++++++++++++
 x11-wm/stumpwm/stumpwm-0.9.9.ebuild | 57 ++++++++++++++++++++++++++--------
 2 files changed, 106 insertions(+), 12 deletions(-)

diff --git a/x11-wm/stumpwm/metadata.xml b/x11-wm/stumpwm/metadata.xml
new file mode 100644
index 0000000..578e246
--- /dev/null
+++ b/x11-wm/stumpwm/metadata.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Chema Alonso</name>
+  </maintainer>
+  <longdescription lang="en">
+    Stumpwm is a tiling, keyboard driven X11 Window Manager written entirely in
+    Common Lisp.
+
+    If you're tired of flipping through themes like channel-surfing, and going
+    from one perfect-except-for-just-one-thing window manager to another
+    even-more-broken-in-some-other-way then perhaps Stumpwm can help.
+
+    Stumpwm attempts to be customizable yet visually minimal. There are no
+    window decorations, no icons, and no buttons.
+    It does have various hooks to attach your personal customizations, and
+    variables to tweak.
+
+      * Hack the good hack
+      * debug your good hack
+      * customize your window manager 
+
+    while it's running. That's right. With a 100% Common Lisp window manager
+    there's no stopping the hacks. Just re-eval and GO!
+  </longdescription>
+  <longdescription lang="es">
+    Stumpwm es un gestor de ventanas estilo mosaico gestionado por teclado
+    escrito completamente en Common Lisp.
+
+       Si está cansado de cambiar de temas como navegación por canales y vagar
+       de un gestor de ventanas perfecto excepto por esa pequeña característica
+       a otro incluso más roto de alguna otra forma, entonces quizá Stumpwm
+       pueda ser de ayuda.
+
+       Stumpwm persigue ser personalizable a la vez que mínimo. No hay
+       decoración en las ventanas, ni iconos ni botones.
+       Dispone de varios enganches para realizar nuestras propias 
configuraciones
+       personales y variables que podemos ajustar a nuestras necesidades para:
+
+      * Cacharrear de forma correcta
+      * Depurar nuestro propio cacharreo
+         * Personalizar nuestro gestor de ventanas
+
+       mientras está corriendo. Eso está bien. Con un gestor de ventanas 
escrito
+       al 100% en Common Lisp no hay forma de detener el cacharreo. 
¡Simplemente
+       reevalúe y CONTINÚE!
+  </longdescription>
+  <use>
+    <flag name="contrib">Install contrib modules</flag>
+    <flag name="doc">Include documentation</flag>
+    <flag name="emacs">Add support for GNU Emacs</flag>
+    <flag name="clisp">Use CLISP for the runtime</flag>
+    <flag name="ecl">Use SCL for the runtime</flag>
+    <flag name="sbcl">Use SBCL for the runtime</flag>
+  </use>
+  <upstream>
+    <remote-id type="github">stumpwm/stumpwm</remote-id>
+  </upstream>
+</pkgmetadata>

diff --git a/x11-wm/stumpwm/stumpwm-0.9.9.ebuild 
b/x11-wm/stumpwm/stumpwm-0.9.9.ebuild
index 4ec18be..8fade26 100644
--- a/x11-wm/stumpwm/stumpwm-0.9.9.ebuild
+++ b/x11-wm/stumpwm/stumpwm-0.9.9.ebuild
@@ -4,47 +4,76 @@
 
 EAPI=5
 
-inherit common-lisp-3 glo-utils eutils elisp-common autotools
+inherit common-lisp-3 eutils elisp-common autotools
 
 DESCRIPTION="Stumpwm is a Window Manager written entirely in Common Lisp."
 HOMEPAGE="http://www.nongnu.org/stumpwm/";
-SRC_URI="http://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="doc clisp ecl +sbcl emacs"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc emacs clisp ecl +sbcl"
 
 RESTRICT="strip mirror"
 
 RDEPEND="dev-lisp/cl-ppcre
-               sbcl? ( >=dev-lisp/clx-0.7.3_p20081030 )
+               sbcl?  ( >=dev-lisp/sbcl-1.0.32 )
+               sbcl? ( >=dev-lisp/clx-0.7.4 )
                !sbcl? ( !clisp? ( !ecl? ( >=dev-lisp/sbcl-1.0.32 ) ) )
                !sbcl? ( !clisp? (  ecl? ( >=dev-lisp/ecls-10.4.1 ) ) )
                !sbcl? (  clisp? ( >=dev-lisp/clisp-2.44[X,new-clx] ) )
-               sbcl?  ( >=dev-lisp/sbcl-1.0.32 )
                emacs? ( virtual/emacs app-emacs/slime )"
 DEPEND="${RDEPEND}
                sys-apps/texinfo
                doc? ( virtual/texi2dvi )"
 
 SITEFILE=70${PN}-gentoo.el
+CLPKGDIR="${CLSOURCEROOT}/${CLPACKAGE}"
+CONTRIBDIR="${CLPKGDIR}/contrib"
+
+get_lisp() {
+       local lisp
+
+       for lisp in "$@" ; do
+               use ${lisp} && echo ${lisp} && return
+       done
+}
 
 do_doc() {
        local pdffile="${PN}.pdf"
 
-       texi2pdf -o "${pdffile}" "${PN}.texi.in" && dodoc "${pdffile}" || die
-       cp "${FILESDIR}"/README.Gentoo . && sed -i "s:@VERSION@:${PV}:" 
README.Gentoo
+       texi2pdf -o "${pdffile}" "${PN}.texi" && dodoc "${pdffile}" || die
+       cp "${FILESDIR}/README.Gentoo" . && sed -i "s:@VERSION@:${PV}:" 
README.Gentoo || die
        dodoc AUTHORS NEWS README.md README.Gentoo
-       doinfo ${PN}.info
+       doinfo "${PN}.info"
        docinto examples ; dodoc sample-stumpwmrc.lisp
 }
 
+do_contrib() {
+       emake install-modules
+       rm -r "${D}${CONTRIBDIR}"/.git* || die
+}
+
 src_prepare() {
        # Upstream didn't change the version before packaging
-       sed -i "${S}/${PN}.asd" -e 's/:version "0.9.8"/:version "0.9.9"/' || die
+       sed -i -e 's/:version "0.9.8"/:version "0.9.9"/' "${PN}.asd" || die
+       # Bug 534592. Does not build with asdf:oos, using require to load the 
package
+       sed -i "load-${PN}.lisp.in" -e "s/asdf:oos 'asdf:load-op/require/" || 
die
+       if use contrib ; then
+               # Fix contrib directory
+               sed -i -e "s|@CONTRIB_DIR@|@MODULE_DIR@|" make-image.lisp.in || 
die
+               sed -i -e "s|\~\/.${CLPACKAGE}\.d/modules|${D}${CONTRIBDIR}|" 
Makefile.in || die
+               sed -i -e "s|\${HOME}/\.${CLPACKAGE}\.d/modules|${CONTRIBDIR}|" 
configure.ac || die
+       fi
        eautoreconf
-       econf --with-lisp=$(glo_best_flag sbcl clisp ecl)
+}
+
+src_configure() {
+       local moduleconfig
+
+       use contrib && moduleconfig="--with-module-dir=${CONTRIBDIR}/contrib"
+       econf --with-lisp=$(get_lisp sbcl clisp ecl) "${moduleconfig}"
 }
 
 src_compile() {
@@ -52,13 +81,17 @@ src_compile() {
 }
 
 src_install() {
-       common-lisp-export-impl-args $(glo_best_flag sbcl clisp ecl)
+       common-lisp-export-impl-args $(get_lisp sbcl clisp ecl)
        dobin stumpwm
        make_session_desktop StumpWM /usr/bin/stumpwm
 
        common-lisp-install-sources *.lisp
        common-lisp-install-asdf ${PN}.asd
+       # Fix ASDF dir
+       sed -i -e "/(:directory/c\   (:directory \"${CLPKGDIR}\")" \
+               "${D}${CLPKGDIR}/load-stumpwm.lisp" || die
        use doc && do_doc
+       use contrib && do_contrib
 }
 
 pkg_postinst() {

Reply via email to