summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2008-11-23 19:33:41 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2008-11-23 19:33:41 +0000
commitb1ab0d22cf3a21a491ad79f5ce5f55381b675ba4 (patch)
treef412531dc4274adfe996c44ad4c40d3ddb782057 /app-emacs/nxml-svg-schemas
parentPatches to fix compilation with gcc-4.3, thanks to Mario Fetka <mario DOT fet... (diff)
downloadgentoo-2-b1ab0d22cf3a21a491ad79f5ce5f55381b675ba4.tar.gz
gentoo-2-b1ab0d22cf3a21a491ad79f5ce5f55381b675ba4.tar.bz2
gentoo-2-b1ab0d22cf3a21a491ad79f5ce5f55381b675ba4.zip
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)
Diffstat (limited to 'app-emacs/nxml-svg-schemas')
-rw-r--r--app-emacs/nxml-svg-schemas/ChangeLog11
-rw-r--r--app-emacs/nxml-svg-schemas/files/60nxml-svg-schemas-gentoo.el8
-rw-r--r--app-emacs/nxml-svg-schemas/files/Makefile-trang6
-rw-r--r--app-emacs/nxml-svg-schemas/files/schemas.xml13
-rw-r--r--app-emacs/nxml-svg-schemas/metadata.xml8
-rw-r--r--app-emacs/nxml-svg-schemas/nxml-svg-schemas-1.1.20081123.ebuild60
6 files changed, 106 insertions, 0 deletions
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ò <flameeyes@gentoo.org>
+ +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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
+ <!-- This version of the locatingRules does not support having
+ enough details to distinguish between different SVG versions,
+ maybe in the future it will.
+ -->
+
+ <uri pattern="*.svg" typeId="SVG" />
+ <namespace ns="http://www.w3.org/2000/svg" typeId="SVG" />
+ <documentElement localName="svg" typeId="SVG" />
+
+ <typeId id="SVG" uri="svg11.rnc" />
+</locatingRules>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>emacs</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
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
+}