New molecular graphics package. GLUT license is for files/glutbitmap.h.
authorDonnie Berkholz <dberkholz@gentoo.org>
Mon, 21 Nov 2005 20:44:37 +0000 (20:44 +0000)
committerDonnie Berkholz <dberkholz@gentoo.org>
Mon, 21 Nov 2005 20:44:37 +0000 (20:44 +0000)
Package-Manager: portage-2.0.53_rc7

sci-chemistry/molscript/ChangeLog [new file with mode: 0644]
sci-chemistry/molscript/Manifest [new file with mode: 0644]
sci-chemistry/molscript/files/digest-molscript-2.1.2 [new file with mode: 0644]
sci-chemistry/molscript/files/fix-makefile-shared.patch [new file with mode: 0644]
sci-chemistry/molscript/files/glutbitmap.h [new file with mode: 0644]
sci-chemistry/molscript/metadata.xml [new file with mode: 0644]
sci-chemistry/molscript/molscript-2.1.2.ebuild [new file with mode: 0644]

diff --git a/sci-chemistry/molscript/ChangeLog b/sci-chemistry/molscript/ChangeLog
new file mode 100644 (file)
index 0000000..6510e75
--- /dev/null
@@ -0,0 +1,11 @@
+# ChangeLog for sci-chemistry/molscript
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molscript/ChangeLog,v 1.1 2005/11/21 20:44:37 spyderous Exp $
+
+*molscript-2.1.2 (21 Nov 2005)
+
+  21 Nov 2005; Donnie Berkholz <spyderous@gentoo.org>;
+  +files/fix-makefile-shared.patch, +files/glutbitmap.h, +metadata.xml,
+  +molscript-2.1.2.ebuild:
+  New molecular graphics package. GLUT license is for files/glutbitmap.h.
+
diff --git a/sci-chemistry/molscript/Manifest b/sci-chemistry/molscript/Manifest
new file mode 100644 (file)
index 0000000..6de6f71
--- /dev/null
@@ -0,0 +1,6 @@
+MD5 51826742d8d4a3edfac57134acd89cf6 ChangeLog 483
+MD5 e1ff3a23a7b31886db0b5eca88385776 files/digest-molscript-2.1.2 67
+MD5 218484e776003634c6eb6da4d42569c1 files/fix-makefile-shared.patch 2057
+MD5 a222d271cfb2d53968f619493075b925 files/glutbitmap.h 845
+MD5 af1bfbb0777267a03e889b08173f2757 metadata.xml 248
+MD5 57438c102f454bc250fe0a476841bec6 molscript-2.1.2.ebuild 1468
diff --git a/sci-chemistry/molscript/files/digest-molscript-2.1.2 b/sci-chemistry/molscript/files/digest-molscript-2.1.2
new file mode 100644 (file)
index 0000000..e328ff1
--- /dev/null
@@ -0,0 +1 @@
+MD5 bfd8ff54d22afe200f050829ee41e197 molscript-2.1.2.tar.gz 412497
diff --git a/sci-chemistry/molscript/files/fix-makefile-shared.patch b/sci-chemistry/molscript/files/fix-makefile-shared.patch
new file mode 100644 (file)
index 0000000..b718b07
--- /dev/null
@@ -0,0 +1,62 @@
+diff -urN molscript-2.1.2.orig/Makefile.complete molscript-2.1.2/Makefile.complete
+--- molscript-2.1.2.orig/Makefile.complete     1998-11-25 01:04:39.000000000 -0800
++++ molscript-2.1.2/Makefile.complete  2005-11-21 12:28:06.000000000 -0800
+@@ -23,9 +23,9 @@
+ 
+ # OpenGL and GLUT for X (UNIX).
+ # Must be modified for Windows 95/NT. <---
+-GLUTDIR = $(FREEWAREDIR)/glut
+-GLUTLINK = $(GLUTDIR)/lib/glut/libglut.a -lGLU -lGL -lXmu -lXext -lX11
+-OPENGLFLAG = -DOPENGL_SUPPORT -I$(GLUTDIR)/include
++GLUTDIR = $(FREEWAREDIR)
++GLUTLINK = -lglut -lGLU -lGL -lXmu -lXext -lX11
++OPENGLFLAG = -DOPENGL_SUPPORT -I$(GLUTDIR)/include/GL
+ OPENGLOBJ = opengl.o
+ OPENGLCLIBOBJ = ogl_utils.o ogl_body.o ogl_bitmap_character.o
+ 
+@@ -35,25 +35,25 @@
+ 
+ # JPEG image file format; requires the JPEG library.
+ # Comment out these lines if the JPEG library is not available. <---
+-JPEGDIR = $(FREEWAREDIR)/jpeg
+-JPEGLINK = $(JPEGDIR)/libjpeg.a
+-JPEGFLAG = -DJPEG_SUPPORT -I$(JPEGDIR)
++JPEGDIR = $(FREEWAREDIR)
++JPEGLINK = -ljpeg
++JPEGFLAG = -DJPEG_SUPPORT
+ JPEGOBJ = jpeg_img.o
+ 
+ # PNG image file format; requires the PNG library and the zlib library.
+ # Comment out these lines if the PNG and zlib libraries are not available. <---
+-ZLIBDIR = $(FREEWAREDIR)/zlib
+-ZLIBLINK = $(ZLIBDIR)/libz.a
+-PNGDIR = $(FREEWAREDIR)/libpng
+-PNGLINK = $(PNGDIR)/libpng.a
+-PNGFLAG = -DPNG_SUPPORT -I$(PNGDIR) -I$(ZLIBDIR)
++ZLIBDIR = $(FREEWAREDIR)
++ZLIBLINK = -lz
++PNGDIR = $(FREEWAREDIR)
++PNGLINK = -lpng
++PNGFLAG = -DPNG_SUPPORT
+ PNGOBJ = png_img.o
+ 
+ # GIF image file format; requires the gd 1.3 library.
+ # Comment out these lines if the gd 1.3 library is not available. <---
+-GIFDIR = $(FREEWAREDIR)/gd
+-GIFLINK = $(GIFDIR)/libgd.a
+-GIFFLAG = -DGIF_SUPPORT -I$(GIFDIR)
++GIFDIR = $(FREEWAREDIR)
++GIFLINK = -lgd
++GIFFLAG = -DGIF_SUPPORT
+ GIFOBJ = gif_img.o
+ 
+ # SGI IRIX's C compiler.
+@@ -62,7 +62,7 @@
+ COPT = -O1
+ #  Correctness flags:
+ #CCHECK = -ansi -fullwarn -g -DSELECT_DEBUG
+-CCHECK = -ansi -fullwarn
++CCHECK = -ansi -Wall
+ #CCHECK = -ansi -fullwarn -DNDEBUG
+ 
+ # General cc compile flags.
diff --git a/sci-chemistry/molscript/files/glutbitmap.h b/sci-chemistry/molscript/files/glutbitmap.h
new file mode 100644 (file)
index 0000000..9584bb1
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef __glutbitmap_h__
+#define __glutbitmap_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#define GLUT_NO_LIB_PRAGMA  /* Avoid auto library linking when building
+                               the GLUT library itself. */
+#include <GL/glut.h>
+
+typedef struct {
+  const GLsizei width;
+  const GLsizei height;
+  const GLfloat xorig;
+  const GLfloat yorig;
+  const GLfloat advance;
+  const GLubyte *bitmap;
+} BitmapCharRec, *BitmapCharPtr;
+
+typedef struct {
+  const char *name;
+  const int num_chars;
+  const int first;
+  const BitmapCharRec * const *ch;
+} BitmapFontRec, *BitmapFontPtr;
+
+typedef void *GLUTbitmapFont;
+
+#endif /* __glutbitmap_h__ */
diff --git a/sci-chemistry/molscript/metadata.xml b/sci-chemistry/molscript/metadata.xml
new file mode 100644 (file)
index 0000000..211b8bd
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+<email>spyderous@gentoo.org</email>
+<name>Donnie Berkholz</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/molscript/molscript-2.1.2.ebuild b/sci-chemistry/molscript/molscript-2.1.2.ebuild
new file mode 100644 (file)
index 0000000..e30d49f
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molscript/molscript-2.1.2.ebuild,v 1.1 2005/11/21 20:44:37 spyderous Exp $
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Display molecular 3D structures, such as proteins, in both schematic and detailed representations."
+HOMEPAGE="http://www.avatar.se/molscript/"
+SRC_URI="${P}.tar.gz"
+LICENSE="glut molscript"
+SLOT="0"
+KEYWORDS="~x86"
+RESTRICT="fetch"
+IUSE=""
+DEPEND="media-libs/jpeg
+       media-libs/libpng
+       media-libs/gd
+       virtual/glut
+       || ( (
+                       x11-libs/libXmu
+                       x11-libs/libXext
+                       x11-libs/libX11
+               )
+               <=x11-base/xorg-x11-6.99
+       )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+       unpack ${A}
+       epatch ${FILESDIR}/fix-makefile-shared.patch
+
+       # Provide glutbitmap.h, because freeglut doesn't have it
+       cp ${FILESDIR}/glutbitmap.h ${S}/clib/
+
+       # Stop an incredibly hacky include
+       sed -i -e 's:<../lib/glut/glutbitmap.h>:"glutbitmap.h":g' \
+               ${S}/clib/ogl_bitmap_character.c
+}
+
+src_compile() {
+       # Prefix of programs it links with
+       export FREEWAREDIR="/usr"
+
+       ln -s Makefile.complete Makefile
+
+       # Honor CC and CFLAGS  from environment;
+       # unfortunately a bash bug prevents us from doing typeset and
+       # assignment on the same line.
+       typeset -a args
+       args=( CC="$(tc-getCC)" \
+               COPT="${CFLAGS}" )
+
+       emake "${args[@]}" || die "emake failed"
+}
+
+src_install() {
+       exeinto /usr/bin
+       doexe molscript molauto
+       dohtml ${S}/doc/*.html
+}