diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2007-07-06 07:30:51 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2007-07-06 07:30:51 +0000 |
commit | e51a4aa02f46004eee7831090e4c0a464469278c (patch) | |
tree | 2a2fa3d47584ed51afdc6188d60e2005ac7e2cfe /sci-mathematics/geomview | |
parent | one more flag for geomview (diff) | |
download | gentoo-2-e51a4aa02f46004eee7831090e4c0a464469278c.tar.gz gentoo-2-e51a4aa02f46004eee7831090e4c0a464469278c.tar.bz2 gentoo-2-e51a4aa02f46004eee7831090e4c0a464469278c.zip |
overdue version bump and feature additions
(Portage version: 2.1.3_rc6)
Diffstat (limited to 'sci-mathematics/geomview')
-rw-r--r-- | sci-mathematics/geomview/ChangeLog | 10 | ||||
-rw-r--r-- | sci-mathematics/geomview/files/digest-geomview-1.9.2 | 3 | ||||
-rw-r--r-- | sci-mathematics/geomview/files/geomview.png | bin | 0 -> 4078 bytes | |||
-rw-r--r-- | sci-mathematics/geomview/files/gvcl-mode.el | 169 | ||||
-rw-r--r-- | sci-mathematics/geomview/geomview-1.9.2.ebuild | 86 |
5 files changed, 267 insertions, 1 deletions
diff --git a/sci-mathematics/geomview/ChangeLog b/sci-mathematics/geomview/ChangeLog index 824dbb8239f4..ad9a396d0217 100644 --- a/sci-mathematics/geomview/ChangeLog +++ b/sci-mathematics/geomview/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-mathematics/geomview # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/geomview/ChangeLog,v 1.4 2007/04/04 06:08:02 nerdboy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/geomview/ChangeLog,v 1.5 2007/07/06 07:30:51 nerdboy Exp $ + +*geomview-1.9.2 (06 Jul 2007) + + 06 Jul 2007; Steve Arnold <nerdboy@gentoo.org> +files/geomview.png, + +files/gvcl-mode.el, +geomview-1.9.2.ebuild: + overdue version bump and feature additions (modified ebuild from user, + but I admit to finding it on my hard drive and I have no idea where it + originally came from) *geomview-1.8.2_rc9 (04 Apr 2007) diff --git a/sci-mathematics/geomview/files/digest-geomview-1.9.2 b/sci-mathematics/geomview/files/digest-geomview-1.9.2 new file mode 100644 index 000000000000..192e8c45e993 --- /dev/null +++ b/sci-mathematics/geomview/files/digest-geomview-1.9.2 @@ -0,0 +1,3 @@ +MD5 1f9e463afa33082703a5afc90e0b6692 geomview-1.9.2.tar.bz2 3060421 +RMD160 af91598a2ce379df33aefbc018d40f4079891ed5 geomview-1.9.2.tar.bz2 3060421 +SHA256 de91ba018fa08626180102d281d8564e5a55329a2a13fef23165504c56200c40 geomview-1.9.2.tar.bz2 3060421 diff --git a/sci-mathematics/geomview/files/geomview.png b/sci-mathematics/geomview/files/geomview.png Binary files differnew file mode 100644 index 000000000000..5170f1ed7b5c --- /dev/null +++ b/sci-mathematics/geomview/files/geomview.png diff --git a/sci-mathematics/geomview/files/gvcl-mode.el b/sci-mathematics/geomview/files/gvcl-mode.el new file mode 100644 index 000000000000..f47ae487a536 --- /dev/null +++ b/sci-mathematics/geomview/files/gvcl-mode.el @@ -0,0 +1,169 @@ +;;; gvcl-mode.el --- A major mode for editing Geomview Command Language files + +;; Copyright (C) 2007 Claus-Justus Heine + +;; Author: Claus-Justus Heine +;; Keywords: extensions + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; Writing an Emacs major mode is really a non-trivial task. This file +;; really covers only some basic things (comment-start, +;; syntax-highlighting, crude indentation support). + +;;; Code: + +;; Setup + +;;First, we define some variables that all modes should +;;define. gvlisp-mode-hook allows the user to run their own code when +;;your mode is run + +(defvar gvcl-mode-hook nil) + +(defvar gvcl-indent-offset 2 "Incremental indentation offset.") + +;;Now we create a keymap. This map, here called gvcl-mode-map, allows +;;both you and users to define their own keymaps. The keymap is +;;immediately set to a default keymap. Then, using define-key, we +;;insert an example keybinding into the keymap, which maps the +;;newline-and-indent function to Control-j (which is actually the +;;default binding for this function, but is included anyway as an +;;example). Of course, you may define as many keybindings as you wish. +;; +;;If your keymap will have very few entries, then you may want to +;;consider make-sparse-keymap rather than make-keymap +(defvar gvcl-mode-map + (let ((gvcl-mode-map (make-keymap))) + (define-key gvcl-mode-map "\C-j" 'newline-and-indent) + gvcl-mode-map) + "Keymap for Geomview Command Language major mode.") + +;;Here, we append a definition to auto-mode-alist. This tells emacs +;;that when a buffer with a name ending with .wpd is opened, then +;;gvcl-mode should be started in that buffer. Some modes leave this +;;step to the user. +(add-to-list 'auto-mode-alist '("\\.gcl\\'" . gvcl-mode)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Syntax highlighting using keywords + +(defconst gvcl-font-lock-keywords-1 + (list + '("(\\(progn\\|backcolor\\|read\\|camera\\|new-geometry\\|car\\|cdr\\|emodule-\\S-+\\|ui-\\S-+\\|normalization\\)\\>" . font-lock-builtin-face) + '("\\(\"\\w*\"\\)" . font-lock-variable-name-face)) + "Minimal highlighting expressions for GVCL mode.") + +(defconst gvcl-font-lock-keywords-2 + (append gvcl-font-lock-keywords-1 + (list + '("\\<\\(\\(location\\|origin\\)\\s-+\\(camera\\|local\\|global\\|ndc\\|screen\\)\\)\\>" . font-lock-constant-face) + '("\\<\\(define\\|geom\\(etry\\)?\\|camera\\|window\\)\\>" . font-lock-keyword-face))) + "Additional Keywords to highlight in GVCL mode.") + +(defconst gvcl-font-lock-keywords-3 + (append gvcl-font-lock-keywords-2 + (list + '("\\<\\(yes\\|no\\|on\\|off\\|toggle\\|center\\|none\\|focus-change\\|allgeoms\\)\\>" . font-lock-constant-face) + '("\\<\\(INST\\|T?LIST\\|\\(ST\\)?Z?u?v?C?N?U?4?n?\\(OFF\\|MESH\\|SKEL\\|VECT\\|QUAD\\|BEZ\\|BBP\\|BBOX\\|SPHERE\\|GROUP\\|DISCGRP\\|COMMENT\\)\\)\\>" . font-lock-type-face) + ;; apperance constants + '("\\<\\(apply\\s-+\\(blend\\|modulate\\|replace\\|decal\\)\\|replacelights\\|face\\|edge\\|vect\\|transparent\\|normal\\|normscale\\|evert\\|texturing\\|mipmap\\|linear\\|mipinterp\\|backcull\\|concave\\|shadelines\\|keepcolor\\|shading\\s-+\\(smooth\\|flat\\|constant\\)\\|replacelights\\|clamp\\s-+\\(s\\|t\\|st\\|none\\)\\)\\>" . font-lock-constant-face) + ;; image constants + '("\\<\\(RGB\\|RGBA\\|ALPHA\\|LUMINANCE\\|LUMINANCE_ALPHA\\)\\>" . font-lock-constant-face) + ;; image keywords + '("\\<\\(inertia\\|width\\|height\\|channels\\|maxval\\|data\\)\\>" . font-lock-keyword-face) + ;; apperance keywords + '("\\<\\(localviewer\\|attenconst\\|attenmult2?\\|normscale\\|shading\\|linewidth\\|patchdice\\|ka\\|ambient\\|kd\\|diffuse\\|ks\\|specular\\|shininess\\|backdiffuse\\|alpha\\|edgecolor\\|normalcolor\\|color\\|position\\|file\\|alphafile\\|background\\)\\>" . font-lock-keyword-face) + ;; some more types + '("\\<\\(texture\\|light\\|material\\|lighting\\|light\\|image\\|appearance\\|n?transforms?\\)\\>" . font-lock-type-face) + )) + "Balls-out highlighting in GVCL mode.") + +;;I've now defined more GVCL constants. This completes the list of +;;GVCL keywords. + +(defvar gvcl-font-lock-keywords gvcl-font-lock-keywords-3 + "Default highlighting expressions for GVCL mode.") + +;;Here I've defined the default level of highlighting to be the +;;maximum. This is just my preference\u2014 the user can change this +;;variable (if the user knows how! This might be something to put in +;;the documentation for your own mode). + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Indentation + +(defun gvcl-indent-line () + "Indent current line as GVCL code." + (interactive) +;; (beginning-of-line) + (let ((savep (> (current-column) (current-indentation))) + (indent (condition-case nil (max (gvcl-calculate-indentation) 0) + (error 0)))) + (if savep + (save-excursion (indent-line-to indent)) + (indent-line-to indent)))) + +(defun gvcl-calculate-indentation () + "Return the column to which the current line should be indented." + (save-excursion + (beginning-of-line) + (if (< (point) 2) + 0 + (skip-chars-forward " \t") + (let ((indent-above (if (eq (char-syntax (following-char)) ?\) ) + 0 + gvcl-indent-offset))) + (up-list -1) + (+ (current-indentation) indent-above))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; The syntax table + +(defvar gvcl-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?_ "w" st) + (modify-syntax-entry ?# "<" st) + (modify-syntax-entry ?\n ">" st) + (modify-syntax-entry ?{ "(}" st) + (modify-syntax-entry ?} "){" st) + (modify-syntax-entry ?( "()" st) + (modify-syntax-entry ?) ")(" st) + st) + "Syntax table for `gvcl-mode'.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Derive the stuff from fundamental mode + +(define-derived-mode gvcl-mode fundamental-mode "GVCL" + "Major mode for editing Geomview Command Language files." + (set (make-local-variable 'font-lock-defaults) '(gvcl-font-lock-keywords)) + (set (make-local-variable 'comment-start) "# ") + (set (make-local-variable 'comment-start-skip) "#+\\s-*") + (set (make-local-variable 'indent-line-function) 'gvcl-indent-line)) + + +(provide 'gvcl-mode) + +(provide 'gvcl-mode) + +;;; gvcl-mode.el ends here diff --git a/sci-mathematics/geomview/geomview-1.9.2.ebuild b/sci-mathematics/geomview/geomview-1.9.2.ebuild new file mode 100644 index 000000000000..30cac08b5b4b --- /dev/null +++ b/sci-mathematics/geomview/geomview-1.9.2.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/geomview/geomview-1.9.2.ebuild,v 1.1 2007/07/06 07:30:51 nerdboy Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="Interactive Geometry Viewer" +SRC_URI="http://mesh.dl.sourceforge.net/sourceforge/geomview/${P/_/-}.tar.bz2" +HOMEPAGE="http://geomview.sourceforge.net" + +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="avg bzip2 debug emacs netpbm pdf zlib" + +DEPEND="zlib? ( sys-libs/zlib ) + virtual/motif + virtual/opengl" + +RDEPEND="${DEPEND} + netpbm? ( >=media-libs/netpbm-10.37.0 ) + bzip2? ( app-arch/bzip2 ) + app-arch/gzip + pdf? ( || ( app-text/xpdf + kde-base/kpdf + kde-base/kghostview + app-text/gv + app-text/gsview + app-text/epdfview + app-text/acroread ) + ) + virtual/w3m" + +S="${WORKDIR}/${P/_/-}" + +src_compile() { + # GNU standard is /usr/share/doc/${PN}, so override this; also note + # that motion averaging is still experimental. + if use pdf; then + local myconf="--docdir=/usr/share/doc/${PF}" + else + local myconf="--docdir=/usr/share/doc/${PF} --without-pdfviewer" + fi + + econf ${myconf} $(use_enable debug d1debug) $(use_with zlib) \ + $(use_enable avg motion-averaging) \ + || die "could not configure" + + make || die "make failed" +} + +src_install() { + emake DESTDIR=${D} install || die "emake install failed" + + doicon ${FILESDIR}/geomview.png + make_desktop_entry geomview "GeomView ${PV}" \ + "/usr/share/pixmaps/geomview.png" \ + "Application;Science;Math;Other" + + dodoc AUTHORS ChangeLog NEWS INSTALL.Geomview + + if !use pdf; then + rm ${D}usr/share/doc/${PF}/${PN}.pdf + fi + + if use emacs; then + insinto /usr/share/geomview + doins ${FILESDIR}/gvcl-mode.el || die + fi +} + +pkg_postinst() { + elog "GeomView expects you to have both Firefox and Xpdf installed for" + elog "viewing the documentation (this can be changed at runtime)." + elog "" + elog "The w3m virtual should handle the HTML borwser part, and if" + elog "you wish to use an alternate PDF viewer, feel free to remove" + elog "xpdf and use the viewer of your choice (see the docs for how" + elog "to setup the \'(ui-pdf-viewer VIEWER)\' GCL-command)." + elog "" + elog "If you use emacs, enable the corresponding use flag and check" + elog "out the provided mode file for editing the GeomView command" + elog "language (courtesy of Claus-Justus Heine). Incorporating it" + elog "into your emacs configuration is left as an exercise..." + elog "" +} |