summaryrefslogtreecommitdiff
path: root/sci-mathematics/geomview
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-mathematics/geomview
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-mathematics/geomview')
-rw-r--r--sci-mathematics/geomview/Manifest2
-rw-r--r--sci-mathematics/geomview/files/50geomview-gentoo.el7
-rw-r--r--sci-mathematics/geomview/files/gvcl-mode.el172
-rw-r--r--sci-mathematics/geomview/geomview-1.9.5.ebuild69
-rw-r--r--sci-mathematics/geomview/metadata.xml12
5 files changed, 262 insertions, 0 deletions
diff --git a/sci-mathematics/geomview/Manifest b/sci-mathematics/geomview/Manifest
new file mode 100644
index 00000000000..ac8133e2efa
--- /dev/null
+++ b/sci-mathematics/geomview/Manifest
@@ -0,0 +1,2 @@
+DIST geomview-1.9.5.tar.bz2 4532535 SHA256 6b683735582ac4eab7f2618cf924c1244de58dd3ef195d06442aaea54cd9fb40 SHA512 a22bcd254e1e4c5c6797811f315d158f84fe82a3f95646bfdf3be203e9cd7fc8cacbf26f55a0a08bcb47cf2b2ad17ae4b48cdc4d78f810f48dab9fa1c7d56e7f WHIRLPOOL f89188ba357f814408fd8523ec416aab6052c1fb110110547e3e48a6c2d4bd8aa3d14f9d4995173e38714fa69156940950e2e4266d34685159d6ad35279b67f1
+DIST geomview.png.tar 10240 SHA256 cf1f5b94d868d363fa6f251343b1426cc7e9ed36ed8ee1fea4339ccabcba33cb SHA512 3abdc04f04410a50876af6b0f1aefc6891c47926ca9e5a4a31bd001310972996497f4e6c33db059fdbca09b236b7763e5476d75427e653d54861b4b3a4e54f51 WHIRLPOOL fecc6989bbef303b379673a503c322db1c8bbe61c346bc3dee984319eb29537985f2696c5a716e94398eb873fd6ed77a06e2462b615d7d4f22bad0bb033765a3
diff --git a/sci-mathematics/geomview/files/50geomview-gentoo.el b/sci-mathematics/geomview/files/50geomview-gentoo.el
new file mode 100644
index 00000000000..2e078ec06c3
--- /dev/null
+++ b/sci-mathematics/geomview/files/50geomview-gentoo.el
@@ -0,0 +1,7 @@
+
+;;; geomview site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'gvcl-mode "gvcl-mode"
+ "Major mode for editing Geomview Command Language files." t)
+(add-to-list 'auto-mode-alist '("\\.gcl\\'" . gvcl-mode))
diff --git a/sci-mathematics/geomview/files/gvcl-mode.el b/sci-mathematics/geomview/files/gvcl-mode.el
new file mode 100644
index 00000000000..cbfadafc205
--- /dev/null
+++ b/sci-mathematics/geomview/files/gvcl-mode.el
@@ -0,0 +1,172 @@
+;;; 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
+ '("(\\s-*\\(redraw\\|process-events\\|interest\\|time-interests\\|and\\|sleep-\\(for\\|until\\)\\|or\\|hdefine\\|geometry\\|quote\\|eval\\|if\\|while\\|setq\\|echo\\|let\\|exit\\|quit\\|lambda\\|defun\\|progn\\|backcolor\\|read\\|camera\\|new-geometry\\|car\\|cdr\\|cons\\|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\\|inertia\\|allgeoms\\|focus-change\\)\\>" . font-lock-keyword-face)))
+ "Additional Keywords to highlight in GVCL mode.")
+
+(defconst gvcl-font-lock-keywords-3
+ (append gvcl-font-lock-keywords-2
+ (list
+ '("\\<\\(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)
+ ;; more OOGL keywords
+ '("\\<\\(SINUSOIDAL\\|CYLINDRICAL\\|RECTANGULAR\\|STEREOGRAPHIC\\|ONEFACE\\)\\>" . font-lock-keyword-face)
+ ;; apperance constants
+ '("\\<\\(blend\\|modulate\\|replace\\|decal\\|replacelights\\|face\\|edge\\|vect\\|transparent\\|normal\\|normscale\\|evert\\|texturing\\|mipmap\\|linear\\|mipinterp\\|backcull\\|concave\\|shadelines\\|keepcolor\\|smooth\\|flat\\|constant\\|csmooth\\|vcflat\\|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
+ '("\\<\\(apply\\|shading\\|localviewer\\|attenconst\\|attenmult2?\\|normscale\\|shading\\|linewidth\\|patchdice\\|ka\\|ambient\\|kd\\|diffuse\\|ks\\|specular\\|shininess\\|backdiffuse\\|alpha\\|edgecolor\\|normalcolor\\|color\\|position\\|file\\|alphafile\\|background\\|texturing\\)\\>" . font-lock-keyword-face)
+ ;; some more types
+ '("\\<\\(texture\\|light\\|material\\|lighting\\|light\\|image\\|appearance\\|n?transforms?\\|tlist\\)\\>" . font-lock-type-face)
+ ;; some more constants
+ '("\\<\\(yes\\|no\\|on\\|off\\|toggle\\|center\\|none\\)\\>" . font-lock-constant-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.5.ebuild b/sci-mathematics/geomview/geomview-1.9.5.ebuild
new file mode 100644
index 00000000000..09be63e4526
--- /dev/null
+++ b/sci-mathematics/geomview/geomview-1.9.5.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit elisp-common eutils flag-o-matic fdo-mime
+
+DESCRIPTION="Interactive Geometry Viewer"
+HOMEPAGE="http://geomview.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+ http://dev.gentoo.org/~jlec/distfiles/geomview.png.tar"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="motionaveraging debug emacs zlib"
+
+DEPEND=">=x11-libs/motif-2.3:0
+ virtual/glu
+ virtual/opengl
+ emacs? ( virtual/emacs )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ x11-misc/xdg-utils"
+
+S="${WORKDIR}/${P/_/-}"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_configure() {
+ econf --docdir=/usr/share/doc/${PF} \
+ --with-htmlbrowser=xdg-open \
+ --with-pdfviewer=xdg-open \
+ $(use_enable debug d1debug) \
+ $(use_with zlib) \
+ $(use_enable motionaveraging motion-averaging)
+}
+
+src_compile() {
+ default
+ if use emacs; then
+ cp "${FILESDIR}/gvcl-mode.el" "${S}"
+ elisp-compile *.el
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog NEWS INSTALL.Geomview || die
+ doicon "${WORKDIR}"/geomview.png || die
+ make_desktop_entry ${PN} "GeomView ${PV}" \
+ /usr/share/pixmaps/${PN}.png \
+ "Science;Math;Education"
+
+ if use emacs; then
+ elisp-install ${PN} *.el *.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/geomview/metadata.xml b/sci-mathematics/geomview/metadata.xml
new file mode 100644
index 00000000000..3094fb6de48
--- /dev/null
+++ b/sci-mathematics/geomview/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-mathematics</herd>
+ <longdescription>Geomview is an interactive geometry viewer and Object Oriented Graphics Library (OOGL).</longdescription>
+ <use>
+ <flag name="motionaveraging">Enable experimental motion averaging technique</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">geomview</remote-id>
+ </upstream>
+</pkgmetadata>