Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2019 07:00:58 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r492829 - in head/science: . molscript molscript/files
Message-ID:  <201902130700.x1D70wRv097299@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Wed Feb 13 07:00:58 2019
New Revision: 492829
URL: https://svnweb.freebsd.org/changeset/ports/492829

Log:
  New port: science/molscript: Display 3D molecules in schematic and detailed representations

Added:
  head/science/molscript/
  head/science/molscript/Makefile   (contents, props changed)
  head/science/molscript/distinfo   (contents, props changed)
  head/science/molscript/files/
  head/science/molscript/files/glutbitmap.h   (contents, props changed)
  head/science/molscript/files/patch-Makefile.complete   (contents, props changed)
  head/science/molscript/files/patch-clib_ogl__bitmap__character.c   (contents, props changed)
  head/science/molscript/files/patch-png__img.c   (contents, props changed)
  head/science/molscript/pkg-descr   (contents, props changed)
Modified:
  head/science/Makefile

Modified: head/science/Makefile
==============================================================================
--- head/science/Makefile	Wed Feb 13 06:46:29 2019	(r492828)
+++ head/science/Makefile	Wed Feb 13 07:00:58 2019	(r492829)
@@ -153,6 +153,7 @@
     SUBDIR += mmtf
     SUBDIR += mol2ps
     SUBDIR += molgif
+    SUBDIR += molscript
     SUBDIR += molsketch
     SUBDIR += mpb
     SUBDIR += mpqc

Added: head/science/molscript/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/molscript/Makefile	Wed Feb 13 07:00:58 2019	(r492829)
@@ -0,0 +1,47 @@
+# $FreeBSD$
+
+PORTNAME=	MolScript
+DISTVERSION=	2.1.2
+CATEGORIES=	science
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Display 3D molecules in schematic and detailed representations
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/../LICENSE.txt
+
+LIB_DEPENDS=	libpng16.so:graphics/png
+RUN_DEPENDS=	render:graphics/raster3d # molscript use requires the executable 'render' to be present
+
+USES=		gl gmake jpeg localbase:ldflags
+USE_GITHUB=	yes
+GH_ACCOUNT=	pekrau
+GH_TAGNAME=	280abee
+USE_GL=		gl glu glut
+USE_XORG=	x11 xext xmu
+
+MAKEFILE=	Makefile.complete
+
+MAKE_ARGS=	CC=${CC} COPT="${CFLAGS}"
+CFLAGS+=	-I${FILESDIR}
+WRKSRC_SUBDIR=	code
+
+BINARY_ALIAS=	make=${MAKE_CMD}
+
+PROGS=		${PORTNAME:tl} molauto
+
+PLIST_FILES=	${PROGS:S/^/bin\//}
+
+OPTIONS_DEFINE=	DOCS
+
+PORTDOCS=	*
+
+do-install:
+.for e in ${PROGS}
+	${INSTALL_PROGRAM} ${WRKSRC}/../${e} ${STAGEDIR}${PREFIX}/bin
+.endfor
+
+do-install-DOCS-on:
+	cd ${WRKSRC}/../docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>

Added: head/science/molscript/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/molscript/distinfo	Wed Feb 13 07:00:58 2019	(r492829)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1550040979
+SHA256 (pekrau-MolScript-2.1.2-280abee_GH0.tar.gz) = 701f31aa42e5aabe327ab417a7230d394e5511f82d0f43e93ba1d3989719dbe2
+SIZE (pekrau-MolScript-2.1.2-280abee_GH0.tar.gz) = 4749679

Added: head/science/molscript/files/glutbitmap.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/molscript/files/glutbitmap.h	Wed Feb 13 07:00:58 2019	(r492829)
@@ -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__ */

Added: head/science/molscript/files/patch-Makefile.complete
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/molscript/files/patch-Makefile.complete	Wed Feb 13 07:00:58 2019	(r492829)
@@ -0,0 +1,70 @@
+--- Makefile.complete.orig	2017-01-16 17:36:29 UTC
++++ Makefile.complete
+@@ -28,8 +28,8 @@ SHELL = /bin/sh
+ 
+ # 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
++GLUTDIR = $(PREFIX)
++GLUTLINK = $(GLUTDIR)/lib/libglut.so -lGLU -lGL -lXmu -lXext -lX11
+ OPENGLFLAG = -DOPENGL_SUPPORT -I$(GLUTDIR)/include
+ OPENGLOBJ = opengl.o
+ OPENGLCLIBOBJ = ogl_utils.o ogl_body.o ogl_bitmap_character.o
+@@ -40,26 +40,26 @@ IMAGEOBJ =  image.o eps_img.o sgi_img.o
+ 
+ # 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 = $(PREFIX)
++JPEGLINK = $(JPEGDIR)/lib/libjpeg.so
++JPEGFLAG = -DJPEG_SUPPORT -I$(JPEGDIR)/include
+ 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 = /usr
++ZLIBLINK = $(ZLIBDIR)/lib/libz.so
++PNGDIR = $(PREFIX)
++PNGLINK = $(PNGDIR)/lib/libpng.so
++PNGFLAG = -DPNG_SUPPORT -I$(PNGDIR)/include -I$(ZLIBDIR)/include
+ 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)
+-GIFOBJ = gif_img.o
++#GIFDIR = $(FREEWAREDIR)/gd
++#GIFLINK = $(GIFDIR)/libgd.a
++#GIFFLAG = -DGIF_SUPPORT -I$(GIFDIR)
++#GIFOBJ = gif_img.o
+ 
+ # SGI IRIX's C compiler.
+ CC = cc -32
+@@ -67,7 +67,7 @@ CC = cc -32
+ COPT = -O1
+ #  Correctness flags:
+ #CCHECK = -ansi -fullwarn -g -DSELECT_DEBUG
+-CCHECK = -ansi -fullwarn
++CCHECK = -ansi
+ #CCHECK = -ansi -fullwarn -DNDEBUG
+ 
+ # General cc compile flags.
+@@ -95,7 +95,7 @@ clean:
+ 
+ #------------------------------------------------------------
+ $(MOLSCRIPT): $(OBJ) clib/clib.a
+-	$(CC) -o $(MOLSCRIPT) $(COPT) $(OBJ) $(YLIB) clib/clib.a \
++	$(CC) -o $(MOLSCRIPT) $(COPT) $(OBJ) $(YLIB) $(LDFLAGS) clib/clib.a \
+               $(GLUTLINK) $(JPEGLINK) $(PNGLINK) $(GIFLINK) $(ZLIBLINK) -lm
+ 
+ molscript.tab.o: molscript.tab.c molscript.tab.h

Added: head/science/molscript/files/patch-clib_ogl__bitmap__character.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/molscript/files/patch-clib_ogl__bitmap__character.c	Wed Feb 13 07:00:58 2019	(r492829)
@@ -0,0 +1,11 @@
+--- clib/ogl_bitmap_character.c.orig	2019-02-13 05:26:19 UTC
++++ clib/ogl_bitmap_character.c
+@@ -23,7 +23,7 @@
+ 
+ #include <assert.h>
+ 
+-#include <../lib/glut/glutbitmap.h>
++#include "glutbitmap.h"
+ 
+ 
+ /*------------------------------------------------------------*/

Added: head/science/molscript/files/patch-png__img.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/molscript/files/patch-png__img.c	Wed Feb 13 07:00:58 2019	(r492829)
@@ -0,0 +1,19 @@
+--- png_img.c.orig	2017-01-16 17:36:29 UTC
++++ png_img.c
+@@ -19,6 +19,7 @@
+ #include <GL/gl.h>
+ 
+ #include <png.h>
++#include <zlib.h>
+ 
+ #include "clib/str_utils.h"
+ #include "clib/dynstring.h"
+@@ -69,7 +70,7 @@ pngi_first_plot (void)
+   info_ptr = png_create_info_struct (png_ptr);
+   if (info_ptr == NULL)
+     yyerror ("png_img: could not create PNG info structure");
+-  if (setjmp (png_ptr->jmpbuf)) yyerror ("png_img: could not setjmp");
++  if (setjmp (png_jmpbuf(png_ptr))) yyerror ("png_img: could not setjmp");
+ 
+   png_init_io (png_ptr, outfile);
+   png_set_compression_level (png_ptr, compression_level);

Added: head/science/molscript/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/molscript/pkg-descr	Wed Feb 13 07:00:58 2019	(r492829)
@@ -0,0 +1,7 @@
+MolScript is a program for displaying molecular 3D structures, such as proteins,
+in both schematic and detailed representations.
+
+Output formats: PostScript, Raster3D, VRML 2.0, interactive OpenGL, SGI
+(aka RGB), JPEG, EPS, PNG, GIF.
+
+WWW: http://avatar.se/molscript/molscript.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902130700.x1D70wRv097299>