# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
github.setup ebassi graphene 1.8.2
categories graphics gnome
maintainers {devans @dbevans} openmaintainer
homepage https://ebassi.github.io/${name}/
description A thin layer of graphic data types
long_description ${description}
checksums rmd160 7806b716353781c789fdb0d9e71a1f364f7645ec \
sha256 3389d8f51d480ad46b1ff2bf541da7c390651ee60f3dbf1cc41b71eea4e2e4bf \
depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:gobject-introspection
# __GNUC__ is unreliable indicator of SSE existence on macOS
patchfiles-append patch-meson.build.diff
compiler.blacklist-append {clang >= 703.0.29 < 800}
# older compilers on Intel do not understand the new SSE compiler instructions
compiler.blacklist-append *gcc-3.* *gcc-4.* {clang < 212}
# 10.5 or less has no special memalign but doesn't absolutely need it
# as the fallthrough to malloc returns aligned memory. Passes all tests.
if {${os.platform} eq "darwin" && ${os.major} < 10 } {
patchfiles-append patch-graphene-leopard.diff
patchfiles-append patch-src-bench-matrix.diff
# attempt to fix build on 10.6 using gcc-4.2
# error: ‘for’ loop initial declaration used outside C99 mode
configure.cflags-append \
if {${build_arch} eq "i386" || ${build_arch} eq "x86_64"} {
supported_archs i386 x86_64
supported_archs ppc ppc64
# gobject-introspection uses g-ir-scanner, which uses $CC from env