From 10c83a230c8dfdc4e625822825ca7109a58d3a01 Mon Sep 17 00:00:00 2001 From: Calvin Hill Date: Sat, 20 May 2017 20:08:43 +0100 Subject: [PATCH] libepoxy: new recipe (#1353) --- media-libs/libepoxy/libepoxy-1.4.2.recipe | 85 +++++++++++++++++++ .../libepoxy/patches/libepoxy-1.4.2.patchset | 25 ++++++ 2 files changed, 110 insertions(+) create mode 100644 media-libs/libepoxy/libepoxy-1.4.2.recipe create mode 100644 media-libs/libepoxy/patches/libepoxy-1.4.2.patchset diff --git a/media-libs/libepoxy/libepoxy-1.4.2.recipe b/media-libs/libepoxy/libepoxy-1.4.2.recipe new file mode 100644 index 000000000..02015e39f --- /dev/null +++ b/media-libs/libepoxy/libepoxy-1.4.2.recipe @@ -0,0 +1,85 @@ +SUMMARY="A library for handling OpenGL function pointer management for you" +DESCRIPTION="Epoxy is a library for handling OpenGL function pointer \ +management for you. +It hides the complexity of dlopen(), dlsym(), glXGetProcAddress(), \ +eglGetProcAddress(), etc. from the app developer, with very little \ +knowledge needed on their part. They get to read GL specs and write \ +code using undecorated function names like glCompileShader(). \ +Don't forget to check for your extensions or versions being present \ +before you use them, just like before! We'll tell you what you forgot \ +to check for instead of just segfaulting, though." +HOMEPAGE="https://github.com/anholt/libepoxy" +COPYRIGHT="2017 Emmanuele Bassi" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/anholt/libepoxy/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="61613b2cdc0167917229aa308d6eab2473f0408f84f3ccbd77d8677b42e89e39" +PATCHES="libepoxy-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + epoxy$secondaryArchSuffix = $portVersion compat >= 1 + lib:libepoxy$secondaryArchSuffix = 1.4.2 compat >= 1 + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libEGL$secondaryArchSuffix + " + +PROVIDES_devel=" + epoxy${secondaryArchSuffix}_devel = $portVersion compat >= 1 + devel:libepoxy$secondaryArchSuffix = 1.4.2 compat >= 1 + " +REQUIRES_devel=" + epoxy$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libGL$secondaryArchSuffix + devel:libEGL$secondaryArchSuffix + devel:util_macros$secondaryArchSuffix + setuptools_python3 + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:pkg_config$secondaryArchSuffix + cmd:make + cmd:python3 + cmd:meson + cmd:ninja + " + +BUILD() +{ + mkdir -p _build + + cd _build + + meson --buildtype=release --prefix=$prefix \ + --libdir=$libDir --includedir=$includeDir + + ninja $jobargs +} + +INSTALL() +{ + cd _build + + ninja install + + prepareInstalledDevelLib libepoxy + fixPkgconfig + + packageEntries devel \ + $developDir +} + +TEST() +{ + ninja test +} + diff --git a/media-libs/libepoxy/patches/libepoxy-1.4.2.patchset b/media-libs/libepoxy/patches/libepoxy-1.4.2.patchset new file mode 100644 index 000000000..2d7bad2da --- /dev/null +++ b/media-libs/libepoxy/patches/libepoxy-1.4.2.patchset @@ -0,0 +1,25 @@ +From 86645565b801312f09c44d25dc76e2536c284e01 Mon Sep 17 00:00:00 2001 +From: "Joseph C, Hill" +Date: Sat, 20 May 2017 13:02:08 +0100 +Subject: [PATCH] disable glx for Haiku + +--- + meson.build | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/meson.build b/meson.build +index 5435f45..77b9d06 100644 +--- a/meson.build ++++ b/meson.build +@@ -42,6 +42,8 @@ if enable_glx == 'auto' + build_glx = false + elif host_system == 'android' + build_glx = false ++ elif host_system == 'haiku' ++ build_glx = false + else + build_glx = true + endif +-- +2.12.2 +