From b1ab0d22cf3a21a491ad79f5ce5f55381b675ba4 Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Sun, 23 Nov 2008 19:33:41 +0000 Subject: New ebuild, SVG (1.1 for now) schemas for nxml-mode. (Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo-r2 x86_64) --- app-emacs/nxml-svg-schemas/ChangeLog | 11 ++++ .../files/60nxml-svg-schemas-gentoo.el | 8 +++ app-emacs/nxml-svg-schemas/files/Makefile-trang | 6 +++ app-emacs/nxml-svg-schemas/files/schemas.xml | 13 +++++ app-emacs/nxml-svg-schemas/metadata.xml | 8 +++ .../nxml-svg-schemas-1.1.20081123.ebuild | 60 ++++++++++++++++++++++ 6 files changed, 106 insertions(+) create mode 100644 app-emacs/nxml-svg-schemas/ChangeLog create mode 100644 app-emacs/nxml-svg-schemas/files/60nxml-svg-schemas-gentoo.el create mode 100644 app-emacs/nxml-svg-schemas/files/Makefile-trang create mode 100644 app-emacs/nxml-svg-schemas/files/schemas.xml create mode 100644 app-emacs/nxml-svg-schemas/metadata.xml create mode 100644 app-emacs/nxml-svg-schemas/nxml-svg-schemas-1.1.20081123.ebuild (limited to 'app-emacs/nxml-svg-schemas') diff --git a/app-emacs/nxml-svg-schemas/ChangeLog b/app-emacs/nxml-svg-schemas/ChangeLog new file mode 100644 index 000000000000..7dc8fd5927ee --- /dev/null +++ b/app-emacs/nxml-svg-schemas/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for app-emacs/nxml-svg-schemas +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emacs/nxml-svg-schemas/ChangeLog,v 1.1 2008/11/23 19:33:41 flameeyes Exp $ + +*nxml-svg-schemas-1.1.20081123 (23 Nov 2008) + + 23 Nov 2008; Diego E. Pettenò + +files/60nxml-svg-schemas-gentoo.el, +files/Makefile-trang, + +files/schemas.xml, +metadata.xml, +nxml-svg-schemas-1.1.20081123.ebuild: + New ebuild, SVG (1.1 for now) schemas for nxml-mode. + diff --git a/app-emacs/nxml-svg-schemas/files/60nxml-svg-schemas-gentoo.el b/app-emacs/nxml-svg-schemas/files/60nxml-svg-schemas-gentoo.el new file mode 100644 index 000000000000..0d51b11da328 --- /dev/null +++ b/app-emacs/nxml-svg-schemas/files/60nxml-svg-schemas-gentoo.el @@ -0,0 +1,8 @@ + +;;; nxml-gentoo-schemas site-lisp configuration + +;; This must be executed after rng-schema-locating-files +;; is set in rng-loc (which is part of nxml-mode). +(eval-after-load "rng-loc" + '(add-to-list 'rng-schema-locating-files + "@SITEETC@/schemas.xml")) diff --git a/app-emacs/nxml-svg-schemas/files/Makefile-trang b/app-emacs/nxml-svg-schemas/files/Makefile-trang new file mode 100644 index 000000000000..699cf676ff45 --- /dev/null +++ b/app-emacs/nxml-svg-schemas/files/Makefile-trang @@ -0,0 +1,6 @@ +# -*- makefile -*- + +all: $(patsubst %.rng,%.rnc,$(wildcard *.rng)) + +%.rnc: %.rng + trang -I rng -O rnc $< $@ diff --git a/app-emacs/nxml-svg-schemas/files/schemas.xml b/app-emacs/nxml-svg-schemas/files/schemas.xml new file mode 100644 index 000000000000..baebe4af596c --- /dev/null +++ b/app-emacs/nxml-svg-schemas/files/schemas.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/app-emacs/nxml-svg-schemas/metadata.xml b/app-emacs/nxml-svg-schemas/metadata.xml new file mode 100644 index 000000000000..560b5594999f --- /dev/null +++ b/app-emacs/nxml-svg-schemas/metadata.xml @@ -0,0 +1,8 @@ + + + + emacs + + flameeyes@gentoo.org + + diff --git a/app-emacs/nxml-svg-schemas/nxml-svg-schemas-1.1.20081123.ebuild b/app-emacs/nxml-svg-schemas/nxml-svg-schemas-1.1.20081123.ebuild new file mode 100644 index 000000000000..d17cdf81a109 --- /dev/null +++ b/app-emacs/nxml-svg-schemas/nxml-svg-schemas-1.1.20081123.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emacs/nxml-svg-schemas/nxml-svg-schemas-1.1.20081123.ebuild,v 1.1 2008/11/23 19:33:41 flameeyes Exp $ + +inherit elisp + +DESCRIPTION="Extension for nxml-mode with SVG 1.1 schemas" +HOMEPAGE="http://www.w3.org/TR/SVG11/" + +# original SRC_URI is http://www.w3.org/Graphics/SVG/1.1/rng/rng.zip +# but since it's unversioned, I versioned it and got it locally. +SRC_URI="http://www.flameeyes.eu/gentoo-distfiles/w3c-svg-rng-${PV}.zip" + +# This is truly as-is! +LICENSE="as-is" + +# In a future we might have 1.2 schemas too, but for now we can only +# install this one anyway because the schemas.xml syntax is not +# sophisticated enough. +SLOT="1.1" + +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="|| ( >=app-emacs/nxml-mode-20041004-r3 >=virtual/emacs-23 )" + +# Yes this requires Java, but I'd rather not repackage this, if you +# know something better in C, I'll be glad to use that. +DEPEND="app-text/trang" + +SITEFILE=60${PN}-gentoo.el + +S="${WORKDIR}" + +src_unpack() { + unpack ${A} + + # we don't need the doctype for our work + sed -i -e '/DOCTYPE grammar/d' *.rng || die "sed failed" +} + +src_compile() { + emake -f "${FILESDIR}/Makefile-trang" || die "trang failed" +} + +src_install() { + insinto ${SITEETC}/${PN} + doins "${FILESDIR}/schemas.xml" *.rnc || die "install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die +} + +pkg_postinst () { + elisp-site-regen + + if [ $(emacs -batch -q --eval "(princ (fboundp 'nxml-mode))") = nil ]; then + ewarn "This package needs nxml-mode. You should either install" + ewarn "app-emacs/nxml-mode, or use \"eselect emacs\" to select" + ewarn "an Emacs version >= 23." + fi +} -- cgit v1.2.3-65-gdbad