diff options
author | mi <mi@FreeBSD.org> | 2013-05-14 02:20:14 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2013-05-14 02:20:14 +0800 |
commit | d0972ad898849f076a1a63abf42422d9ff915b9b (patch) | |
tree | 21921148b2c13136e5cf284d78760b88b4c13573 /graphics | |
parent | 7964e16538919356057dc0c3ada65bb1983b8f82 (diff) | |
download | freebsd-ports-gnome-d0972ad898849f076a1a63abf42422d9ff915b9b.tar.gz freebsd-ports-gnome-d0972ad898849f076a1a63abf42422d9ff915b9b.tar.zst freebsd-ports-gnome-d0972ad898849f076a1a63abf42422d9ff915b9b.zip |
Stop insisting on particular major versions of the shared libraries we
depend on.
Make compilable with newer compilers (gcc47, gcc48).
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/libgfx/Makefile | 8 | ||||
-rw-r--r-- | graphics/libgfx/files/patch-warnings | 52 |
2 files changed, 56 insertions, 4 deletions
diff --git a/graphics/libgfx/Makefile b/graphics/libgfx/Makefile index 8df8ed5d1218..cc7aaaf2e945 100644 --- a/graphics/libgfx/Makefile +++ b/graphics/libgfx/Makefile @@ -16,11 +16,11 @@ COMMENT= OpenGL/FLTK development LICENSE= MIT -LIB_DEPENDS= fltk.1:${PORTSDIR}/x11-toolkits/fltk \ - tiff.4:${PORTSDIR}/graphics/tiff \ +LIB_DEPENDS= fltk:${PORTSDIR}/x11-toolkits/fltk \ + tiff:${PORTSDIR}/graphics/tiff \ png15:${PORTSDIR}/graphics/png \ - gzstream.0:${PORTSDIR}/devel/gzstream \ - jpeg.11:${PORTSDIR}/graphics/jpeg + gzstream:${PORTSDIR}/devel/gzstream \ + jpeg:${PORTSDIR}/graphics/jpeg BUILD_WRKSRC= ${WRKSRC}/src diff --git a/graphics/libgfx/files/patch-warnings b/graphics/libgfx/files/patch-warnings new file mode 100644 index 000000000000..39b803b461c1 --- /dev/null +++ b/graphics/libgfx/files/patch-warnings @@ -0,0 +1,52 @@ +--- src/raster.cxx 2004-09-27 00:45:31.000000000 -0400 ++++ src/raster.cxx 2013-05-13 13:53:50.000000000 -0400 +@@ -10,4 +10,6 @@ + #include <gfx/raster.h> + ++#include <string.h> /* For memcpy() */ ++ + #include <string> + #include <cctype> +@@ -49,6 +51,6 @@ + + +-static char *img_names[] = {"PPM", "PNG", "TIFF", "JPEG"}; +-static char *img_ext[] = {"ppm", "png", "tif", "jpg"}; ++static const char *img_names[] = {"PPM", "PNG", "TIFF", "JPEG"}; ++static const char *img_ext[] = {"ppm", "png", "tif", "jpg"}; + + const char *image_type_name(int type) +--- src/gltools.cxx 2005-06-18 09:58:15.000000000 -0400 ++++ src/gltools.cxx 2013-05-13 13:56:31.000000000 -0400 +@@ -57,5 +57,5 @@ + GLuint nnames = *ptr++; + GLuint cur_zmin = *ptr++; +- /* GLuint cur_zmax = */ *ptr++; ++ ptr++; + + if( cur_zmin < zmin ) +--- src/arcball.cxx 2004-09-27 00:45:31.000000000 -0400 ++++ src/arcball.cxx 2013-05-13 13:58:11.000000000 -0400 +@@ -20,22 +20,4 @@ + { + +-// Converts a unit quaternion to two points on the unit sphere +-static void quat_to_sphere(const Quat& q, Vec3& from, Vec3& to) +-{ +- const Vec3& v = q.vector(); +- +- double s = sqrt(v[0]*v[0] + v[1]*v[1]); +- if( s==0.0 ) +- from = Vec3(0.0, 1.0, 0.0); +- else +- from = Vec3(-v[1]/s, v[0]/s, 0.0); +- +- to[0] = q.scalar()*from[0] - v[2]*from[1]; +- to[1] = q.scalar()*from[1] + v[2]*from[2]; +- to[2] = v[0]*from[1] - v[1]*from[0]; +- +- if(q.scalar() < 0.0) from = -from; +-} +- + // Converts to points on unit sphere into a unit quaternion + static Quat quat_from_sphere(const Vec3& from, const Vec3& to) |