diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2019-02-13 07:00:58 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2019-02-13 07:00:58 +0000 |
commit | 2900541294a485917c859bbbfbaacfa233fee7c8 (patch) | |
tree | 7f8d440f82e9dbc693b4f213df9655a02da5b42b /science/molscript/files | |
parent | x11-themes/greybird-theme: fix build when NOTIFYD=off (diff) |
New port: science/molscript: Display 3D molecules in schematic and detailed representations
Diffstat (limited to 'science/molscript/files')
-rw-r--r-- | science/molscript/files/glutbitmap.h | 32 | ||||
-rw-r--r-- | science/molscript/files/patch-Makefile.complete | 70 | ||||
-rw-r--r-- | science/molscript/files/patch-clib_ogl__bitmap__character.c | 11 | ||||
-rw-r--r-- | science/molscript/files/patch-png__img.c | 19 |
4 files changed, 132 insertions, 0 deletions
diff --git a/science/molscript/files/glutbitmap.h b/science/molscript/files/glutbitmap.h new file mode 100644 index 000000000000..9584bb129daa --- /dev/null +++ b/science/molscript/files/glutbitmap.h @@ -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/science/molscript/files/patch-Makefile.complete b/science/molscript/files/patch-Makefile.complete new file mode 100644 index 000000000000..639070c23145 --- /dev/null +++ b/science/molscript/files/patch-Makefile.complete @@ -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 diff --git a/science/molscript/files/patch-clib_ogl__bitmap__character.c b/science/molscript/files/patch-clib_ogl__bitmap__character.c new file mode 100644 index 000000000000..7459fad7b339 --- /dev/null +++ b/science/molscript/files/patch-clib_ogl__bitmap__character.c @@ -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" + + + /*------------------------------------------------------------*/ diff --git a/science/molscript/files/patch-png__img.c b/science/molscript/files/patch-png__img.c new file mode 100644 index 000000000000..32a6ac945c5c --- /dev/null +++ b/science/molscript/files/patch-png__img.c @@ -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); |