mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add simpleviewer 1.7.1553.8560, small and simple OpenGL image viewer
with transparency support.
This commit is contained in:
parent
642529daa1
commit
6cfc47cc83
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=272365
5 changed files with 147 additions and 0 deletions
|
@ -891,6 +891,7 @@
|
|||
SUBDIR += showimg
|
||||
SUBDIR += silgraphite
|
||||
SUBDIR += simage
|
||||
SUBDIR += simpleviewer
|
||||
SUBDIR += sk1libs
|
||||
SUBDIR += skanlite
|
||||
SUBDIR += skencil
|
||||
|
|
41
graphics/simpleviewer/Makefile
Normal file
41
graphics/simpleviewer/Makefile
Normal file
|
@ -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>
|
2
graphics/simpleviewer/distinfo
Normal file
2
graphics/simpleviewer/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (sviewgl-src-1.7.1553.8560.tar.bz2) = 509de7d8a42c58fbd365a3b730994fef0ff1199536a20f58f29930917339f4c8
|
||||
SIZE (sviewgl-src-1.7.1553.8560.tar.bz2) = 522209
|
93
graphics/simpleviewer/files/patch-defreeglut
Normal file
93
graphics/simpleviewer/files/patch-defreeglut
Normal file
|
@ -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);
|
10
graphics/simpleviewer/pkg-descr
Normal file
10
graphics/simpleviewer/pkg-descr
Normal file
|
@ -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/
|
Loading…
Add table
Reference in a new issue