[109955] trunk/dports/graphics/cogl
devans at macports.org
devans at macports.org
Thu Aug 22 15:44:51 PDT 2013
Revision: 109955
https://trac.macports.org/changeset/109955
Author: devans at macports.org
Date: 2013-08-22 15:44:51 -0700 (Thu, 22 Aug 2013)
Log Message:
-----------
cogl: update to version 1.14.0, fix +x11 configuration, add +examples variant to install example programs.
Modified Paths:
--------------
trunk/dports/graphics/cogl/Portfile
trunk/dports/graphics/cogl/files/leopard.patch
Added Paths:
-----------
trunk/dports/graphics/cogl/files/patch-clock_gettime.diff
trunk/dports/graphics/cogl/files/patch-cogl-cogl-bitmap-pixbuf.c.diff
trunk/dports/graphics/cogl/files/patch-disable-quartz.diff
Modified: trunk/dports/graphics/cogl/Portfile
===================================================================
--- trunk/dports/graphics/cogl/Portfile 2013-08-22 22:22:43 UTC (rev 109954)
+++ trunk/dports/graphics/cogl/Portfile 2013-08-22 22:44:51 UTC (rev 109955)
@@ -4,8 +4,7 @@
PortSystem 1.0
name cogl
-version 1.12.2
-revision 1
+version 1.14.0
set branch [join [lrange [split ${version} .] 0 1] .]
categories graphics
description A hardware accelerated 3D graphics API
@@ -19,30 +18,29 @@
platforms darwin
homepage http://blogs.gnome.org/clutter/
master_sites gnome:sources/${name}/${branch}
+
use_xz yes
-checksums rmd160 fb0bba618f06028e9c1c6b1904dfcc0fc4f659dc \
- sha256 31971d4c6543c589f6fc49ab1724dfbdc7062c58a7da842cb1935e32ca6e1d7e
+checksums rmd160 69a87d46c21999bde675a518ab3cbb5dfa159131 \
+ sha256 276e8c9f5ff0fcd57c1eaf74cc245f41ad469a95a18ac831fac2d5960baa5ae8
depends_build port:pkgconfig
depends_lib path:lib/pkgconfig/cairo.pc:cairo \
- port:gobject-introspection \
- port:mesa \
- path:lib/pkgconfig/pango.pc:pango
+ path:lib/pkgconfig/pango.pc:pango \
+ port:gobject-introspection
-configure.args --enable-introspection=yes \
- --enable-cogl-pango=yes
+patchfiles leopard.patch \
+ patch-clock_gettime.diff \
+ patch-cogl-cogl-bitmap-pixbuf.c.diff
-patchfiles leopard.patch
-
-post-patch {
- reinplace "/SUBDIRS/s/tests//" ${worksrcpath}/Makefile.am
-}
-
use_autoreconf yes
autoreconf.args -fvi
+configure.args --enable-introspection=yes \
+ --enable-cogl-pango=yes \
+ --disable-silent-rules
+
#
# if clutter is installed and version is less than 1.12.0
# deactivate clutter before activating cogl to avoid conflict
@@ -60,18 +58,25 @@
}
variant x11 conflicts quartz {
+ patchfiles-append patch-disable-quartz.diff
depends_lib-append port:gdk-pixbuf2 \
+ port:mesa \
port:xorg-libXcomposite \
port:xorg-libXdamage \
port:xorg-libXext \
- port:xorg-libXfixes
- configure.args-append --enable-gdk-pixbuf=yes \
- --enable-quartz-image=no \
- --with-x
+ port:xorg-libXfixes \
+ port:xorg-libXrandr
+ configure.args-append --with-x \
+ --x-includes=${prefix}/include \
+ --x-libraries=${prefix}/lib \
+ --enable-glx=yes \
+ --enable-gdk-pixbuf=yes \
+ --enable-quartz-image=no
}
variant quartz conflicts x11 {
- configure.args-append --enable-gdk-pixbuf=no \
+ configure.args-append --enable-glx=no \
+ --enable-gdk-pixbuf=no \
--enable-quartz-image=yes \
--without-x
configure.ldflags-append \
@@ -80,9 +85,14 @@
}
variant debug description {Enable debugging} {
- configure.args-append --enable-debug
+ configure.optflags -g -O0
+ configure.args-append --enable-debug=yes
}
+variant examples description {Install simple example applications} {
+ configure.args-append --enable-examples-install=yes
+}
+
if {![variant_isset quartz]} {
default_variants +x11
}
Modified: trunk/dports/graphics/cogl/files/leopard.patch
===================================================================
--- trunk/dports/graphics/cogl/files/leopard.patch 2013-08-22 22:22:43 UTC (rev 109954)
+++ trunk/dports/graphics/cogl/files/leopard.patch 2013-08-22 22:44:51 UTC (rev 109955)
@@ -1,8 +1,8 @@
---- cogl/cogl-gles2-context.c.orig 2013-02-03 12:14:30.000000000 -0800
-+++ cogl/cogl-gles2-context.c 2013-02-03 12:14:46.000000000 -0800
-@@ -45,6 +45,67 @@
- #include "cogl-texture-2d-private.h"
+--- cogl/cogl-gles2-context.c.orig 2013-02-21 05:08:18.000000000 -0800
++++ cogl/cogl-gles2-context.c 2013-08-20 22:28:45.000000000 -0700
+@@ -48,6 +48,67 @@
#include "cogl-pipeline-opengl-private.h"
+ #include "cogl-error-private.h"
+#ifndef GL_FRAMEBUFFER
+#define GL_FRAMEBUFFER 0x8D40
Added: trunk/dports/graphics/cogl/files/patch-clock_gettime.diff
===================================================================
--- trunk/dports/graphics/cogl/files/patch-clock_gettime.diff (rev 0)
+++ trunk/dports/graphics/cogl/files/patch-clock_gettime.diff 2013-08-22 22:44:51 UTC (rev 109955)
@@ -0,0 +1,29 @@
+--- cogl/winsys/cogl-winsys-glx.c.orig 2013-08-20 12:33:26.000000000 -0700
++++ cogl/winsys/cogl-winsys-glx.c 2013-08-20 12:37:55.000000000 -0700
+@@ -56,7 +56,26 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++
++#ifdef __MACH__
++#include <mach/mach_time.h>
++#define CLOCK_REALTIME 0
++#define CLOCK_MONOTONIC 0
++static int
++clock_gettime(int clk_id, struct timespec *t){
++ mach_timebase_info_data_t timebase;
++ mach_timebase_info(&timebase);
++ uint64_t time;
++ time = mach_absolute_time();
++ double nseconds = ((double)time * (double)timebase.numer)/((double)timebase.denom);
++ double seconds = ((double)time * (double)timebase.numer)/((double)timebase.denom * 1e9);
++ t->tv_sec = seconds;
++ t->tv_nsec = nseconds;
++ return 0;
++}
++#else
+ #include <time.h>
++#endif
+
+ #include <glib/gi18n-lib.h>
+
Added: trunk/dports/graphics/cogl/files/patch-cogl-cogl-bitmap-pixbuf.c.diff
===================================================================
--- trunk/dports/graphics/cogl/files/patch-cogl-cogl-bitmap-pixbuf.c.diff (rev 0)
+++ trunk/dports/graphics/cogl/files/patch-cogl-cogl-bitmap-pixbuf.c.diff 2013-08-22 22:44:51 UTC (rev 109955)
@@ -0,0 +1,47 @@
+From 1827965befccf331b0787f71cb191d370640a9de Mon Sep 17 00:00:00 2001
+From: Neil Roberts <neil at linux.intel.com>
+Date: Thu, 28 Mar 2013 13:57:11 +0000
+Subject: quartz-image: Pass a CoglError argument to the bitmap functions
+
+Since 67cad9c0 and f7735e141a the bitmap allocation and mapping
+functions now take an extra error argument. The quartz image backend
+was missed in this update so Cogl would fail to compile if
+--enable-quartz-image is used.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=696730
+
+Reviewed-by: Robert Bragg <robert at linux.intel.com>
+---
+diff --git a/cogl/cogl-bitmap-pixbuf.c b/cogl/cogl-bitmap-pixbuf.c
+index a02b253..ad34234 100644
+--- cogl/cogl-bitmap-pixbuf.c.orig
++++ cogl/cogl-bitmap-pixbuf.c
+@@ -125,11 +125,24 @@ _cogl_bitmap_from_file (CoglContext *ctx,
+ /* allocate buffer big enough to hold pixel data */
+ bmp = _cogl_bitmap_new_with_malloc_buffer (ctx,
+ width, height,
+- COGL_PIXEL_FORMAT_ARGB_8888);
++ COGL_PIXEL_FORMAT_ARGB_8888,
++ error);
++ if (bmp == NULL)
++ {
++ CFRelease (image);
++ return NULL;
++ }
+ rowstride = cogl_bitmap_get_rowstride (bmp);
+ out_data = _cogl_bitmap_map (bmp,
+ COGL_BUFFER_ACCESS_WRITE,
+- COGL_BUFFER_MAP_HINT_DISCARD);
++ COGL_BUFFER_MAP_HINT_DISCARD,
++ error);
++ if (out_data == NULL)
++ {
++ cogl_object_unref (bmp);
++ CFRelease (image);
++ return NULL;
++ }
+
+ /* render to buffer */
+ color_space = CGColorSpaceCreateWithName (kCGColorSpaceGenericRGB);
+--
+cgit v0.9.2
Added: trunk/dports/graphics/cogl/files/patch-disable-quartz.diff
===================================================================
--- trunk/dports/graphics/cogl/files/patch-disable-quartz.diff (rev 0)
+++ trunk/dports/graphics/cogl/files/patch-disable-quartz.diff 2013-08-22 22:44:51 UTC (rev 109955)
@@ -0,0 +1,21 @@
+--- configure.ac.orig 2013-03-25 06:29:03.000000000 -0700
++++ configure.ac 2013-08-21 08:24:19.000000000 -0700
+@@ -194,7 +194,8 @@
+ AC_MSG_RESULT([$platform_win32])
+ AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
+
+-AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
++dnl AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
++platform_quartz=no
+ AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"])
+
+ dnl ================================================================
+@@ -678,7 +679,7 @@
+ ,
+ [AC_MSG_ERROR([Unable to locate required GL library])])
+ ])
+- COGL_GL_LIBNAME="libGL.so.1"
++ COGL_GL_LIBNAME="$prefix/lib/libGL.dylib"
+ ])
+
+ AC_DEFINE([HAVE_COGL_GL], [1], [Have GL for rendering])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130822/be7a54a1/attachment.html>
More information about the macports-changes
mailing list