diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2011-04-08 03:49:26 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2011-04-08 03:49:26 +0000 |
commit | 6cfc47cc83a6ad857f677e33698a8a756ca48e5c (patch) | |
tree | 54c306dd490f0996ded4c6fa84867dd3ce5a03b9 /graphics | |
parent | 642529daa16a7a112a1194664ec104afa305a527 (diff) |
Add simpleviewer 1.7.1553.8560, small and simple OpenGL image viewer
with transparency support.
Notes
Notes:
svn path=/head/; revision=272365
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/Makefile | 1 | ||||
-rw-r--r-- | graphics/simpleviewer/Makefile | 41 | ||||
-rw-r--r-- | graphics/simpleviewer/distinfo | 2 | ||||
-rw-r--r-- | graphics/simpleviewer/files/patch-defreeglut | 93 | ||||
-rw-r--r-- | graphics/simpleviewer/pkg-descr | 10 |
5 files changed, 147 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile index ad95be4984dd..07e43e353c1b 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -891,6 +891,7 @@ SUBDIR += showimg SUBDIR += silgraphite SUBDIR += simage + SUBDIR += simpleviewer SUBDIR += sk1libs SUBDIR += skanlite SUBDIR += skencil diff --git a/graphics/simpleviewer/Makefile b/graphics/simpleviewer/Makefile new file mode 100644 index 000000000000..92700f9ccc56 --- /dev/null +++ b/graphics/simpleviewer/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: Simple Viewer GL +# Date created: 08 Apr 2011 +# Whom: Alexey Dokuchaev <danfe@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= simpleviewer +PORTVERSION= 1.7.1553.8560 +CATEGORIES= graphics +MASTER_SITES= SF/${PORTNAME}/OpenGL%20edition +DISTNAME= sviewgl-src-${PORTVERSION} + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Small and simple OpenGL image viewer with transparency support + +LICENSE= GPLv2 + +LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \ + png.6:${PORTSDIR}/graphics/png \ + ungif.5:${PORTSDIR}/graphics/libungif + +USE_BZIP2= yes +USE_EFL= imlib2 +USE_GL= glut +WRKSRC= ${WRKDIR}/sviewgl-src +MAKE_ARGS= CC=${CXX} + +PLIST_FILES= bin/sviewgl + +post-patch: +# Respect CFLAGS, prefer more widely used libungif instead of giflib + @${REINPLACE_CMD} -e 's,-O2,${CFLAGS}, ; s,/usr,${LOCALBASE},g ; \ + s,=-s,=-L${LOCALBASE}/lib, ; s,lgif,lungif,' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's,const struct dirent,struct dirent,' \ + ${WRKSRC}/src/fileslist.* + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/sviewgl ${PREFIX}/bin + +.include <bsd.port.mk> diff --git a/graphics/simpleviewer/distinfo b/graphics/simpleviewer/distinfo new file mode 100644 index 000000000000..fc93497dba47 --- /dev/null +++ b/graphics/simpleviewer/distinfo @@ -0,0 +1,2 @@ +SHA256 (sviewgl-src-1.7.1553.8560.tar.bz2) = 509de7d8a42c58fbd365a3b730994fef0ff1199536a20f58f29930917339f4c8 +SIZE (sviewgl-src-1.7.1553.8560.tar.bz2) = 522209 diff --git a/graphics/simpleviewer/files/patch-defreeglut b/graphics/simpleviewer/files/patch-defreeglut new file mode 100644 index 000000000000..7bb03bc3487c --- /dev/null +++ b/graphics/simpleviewer/files/patch-defreeglut @@ -0,0 +1,93 @@ +--- src/ftstring.h.orig ++++ src/ftstring.h +@@ -13,7 +13,7 @@ + #include <string> + #include <memory> + #include <map> +-#include <GL/freeglut.h> ++#include <GL/glut.h> + #include <ft2build.h> + #include FT_FREETYPE_H + #include FT_GLYPH_H +--- src/ftsymbol.h.orig ++++ src/ftsymbol.h +@@ -8,7 +8,7 @@ + #ifndef FTSYMBOL_H + #define FTSYMBOL_H + +-#include <GL/freeglut.h> ++#include <GL/glut.h> + + class CFTSymbol { + public: +--- src/quad.h.orig ++++ src/quad.h +@@ -9,7 +9,7 @@ + #define QUAD_H + + #include "rect.h" +-#include <GL/freeglut.h> ++#include <GL/glut.h> + + class CQuad { + public: +--- src/window.cpp.orig ++++ src/window.cpp +@@ -56,7 +56,7 @@ + //glutEntryFunc(); + glutMotionFunc(callbackMouse); + glutPassiveMotionFunc(callbackMouse); +- glutMouseWheelFunc(callbackMouseWheel); ++// glutMouseWheelFunc(callbackMouseWheel); + // glutWMCloseFunc(closeWindow); + + glEnable(GL_BLEND); +@@ -222,6 +222,7 @@ + } + } + ++#if 0 + void CWindow::fnMouseWheel(int wheel, int direction, int x, int y) { + if(direction > 0) { + updateScale(true); +@@ -230,11 +231,18 @@ + updateScale(false); + } + } ++#endif ++ ++#define GLUT_SCROLL_UP 3 ++#define GLUT_SCROLL_DOWN 4 + + void CWindow::fnMouseButtons(int button, int state, int x, int y) { + if(button == GLUT_LEFT_BUTTON) { + m_mouseLB = (state == GLUT_DOWN); +- } ++ } else if (button == GLUT_SCROLL_UP) ++ updateScale(true); ++ else if (button == GLUT_SCROLL_DOWN) ++ updateScale(false); + } + + void CWindow::fnKeyboard(unsigned char key, int x, int y) { +@@ -246,7 +254,7 @@ + switch(key) { + case 27: // ESC + // exit(0); +- glutLeaveMainLoop(); ++ //glutLeaveMainLoop(); + break; + case 127: // Delete + if(mod == GLUT_ACTIVE_CTRL) { +@@ -639,9 +647,11 @@ + g_window->fnMouseButtons(button, state, x, y); + } + ++#if 0 + void CWindow::callbackMouseWheel(int wheel, int direction, int x, int y) { + g_window->fnMouseWheel(wheel, direction, x, y); + } ++#endif + + void CWindow::callbackKeyboardSpecial(int key, int x, int y) { + g_window->fnKeyboardSpecial(key, x, y); diff --git a/graphics/simpleviewer/pkg-descr b/graphics/simpleviewer/pkg-descr new file mode 100644 index 000000000000..24720c65f5c4 --- /dev/null +++ b/graphics/simpleviewer/pkg-descr @@ -0,0 +1,10 @@ +Simple Viewer GL is simple and tiny OpenGL based image viewer. Its features: + + - Lightweight and fast: utilize hardware-accelerated video card + - Very simple interface + - Suitable for default image viewer of desktop + - Minimal lib dependency: look library requirements below + - Desktop independent: does not require any specific desktop environment + - Open source, licensed under GNU GPL + +WWW: http://simpleviewer.sourceforge.net/ |