# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem              1.0
PortGroup               muniversal 1.0

name                    gtkglextmm
version                 1.2.0
revision        1
checksums               rmd160  2dd9122f8991b2cbfd839ab0aaa6dd444751b7b0 \
                        sha256  8f499c1f95678c56cce908c10bf2c1d0f2267b87e0c480385fa4b128c75bdf7b \
                        size    826309

categories              devel
license                 LGPL-2.1+
maintainers             nomaintainer
description             OpenGL Extension to GTK, C++ bindings

long_description        \
    ${description}

homepage                https://sourceforge.net/projects/gtkglext/
platforms               darwin
master_sites            sourceforge:project/gtkglext/gtkglextmm/${version}

depends_build \
    port:pkgconfig
depends_lib \
	port:gtkglext \
	port:gtkmm

# glibmm headers require C++11
compiler.cxx_standard   2011
configure.cxxflags-append \
                        -std=c++11

configure.args --x-include=${prefix}/include --x-lib=${prefix}/lib

# Fix build issue where build fails due to GDK_DISABLE_DEPRECATED being enabled.
# The order in which files are included matters here. gtkmm does some funky
# stuff to undefine GDK_DISABLE_DEPRECATED, if defined, before including gdk.h
# as it needs some deprecated functionality. Including gtkglwidget.h before
# widget.h causes gdk.h to be included without GDK_DISABLE_DEPRECATED being
# undefined, and gtkmm never gets the chance to work its undefine magic.
patchfiles              patch-gtkglext_gtkmm_gl-widget.cc.diff

patchfiles-append       implicit.patch