summaryrefslogtreecommitdiff
path: root/media-libs/glew
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-01-22 10:09:44 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-01-22 10:09:44 +0000
commit09351e78166b5e864197c4456ebae3f89dd0bed9 (patch)
tree41a96399f56ed3aa399006871bfce4430db84aa2 /media-libs/glew
parentc8a77dfe4d3d307c1d5dd2650b7297447d8b609d (diff)
gentoo resync : 22.01.2019
Diffstat (limited to 'media-libs/glew')
-rw-r--r--media-libs/glew/Manifest2
-rw-r--r--media-libs/glew/files/glew-2.1.0-mesa-compat.patch21
-rw-r--r--media-libs/glew/glew-2.1.0-r1.ebuild104
3 files changed, 127 insertions, 0 deletions
diff --git a/media-libs/glew/Manifest b/media-libs/glew/Manifest
index 914d2fcb4dbb..469c3fbb551b 100644
--- a/media-libs/glew/Manifest
+++ b/media-libs/glew/Manifest
@@ -1,8 +1,10 @@
AUX glew-2.0.0-install-headers.patch 457 BLAKE2B 284563a64b8f7c01fb13f0dda57acd3d9ed410035cf1be7a8bf6dd9eb07dd84d0ce6a725b8a1999123e61a8de3cb676340eb1092db048e898b84ebe745906441 SHA512 a1a46eb47b4ccbde3dd11d97e4b0be6000a5dfba87e4c9d65d142e572beabd6b6efad2ee278062bc4dd57bb001b65300245fc301f36b11b429b760b4ad385346
+AUX glew-2.1.0-mesa-compat.patch 560 BLAKE2B 385adc6854a8b6cece3c1c5fa5452c7cdb5f99cfa13ce4818c500836803c1ed6dc6f4a6ab43f1add19ee76adf8daf076458a5cbd64012f2c1b6a9802bd98d791 SHA512 15117b0e22786311df0fd614ecba5230d5ec083d0d6acd457b7ae301f75a842c56e4ed50cc0187709fa11cdb2b59e3edeed2b5bc8cacc1b23caca4c1b837e520
DIST glew-1.10.0.tgz 567605 BLAKE2B 18e2b3a4d60b69def1e68778554b43b85c69914daa20b8a64adb2e807df391a2eaff9c6cb2a3c46e5bbbf004655561ae4d2cd8a2fb883a2754f23564993a61b2 SHA512 0c998fda9fe01c9296a3453966c0449c9968f4f5f989065ca65f0da3830ae8d805699d0ee0362c3b18765420222ba18842b9db20986212afceb36c971ae1bdca
DIST glew-1.6.0.tgz 494713 BLAKE2B 17e47092e2eefcad79220232b3aeaf856541f5024bdaa65be866dd7d63ef19ad88b389dd13c2ccf9bafd175d00d18ae94185f890a3d12d61b2445f7fa9d6ba58 SHA512 5b8ca9e97d01d49fde591b0c55683620e0a6ddfaf5e93e03536e6217bbb548adfcd4e945a39ed3cfddac3f239b3272be1b3491f4071689d02c4bfb7e0ec44904
DIST glew-2.1.0.tgz 764073 BLAKE2B 081fb49ef286681657409f950fa03b97210dac3f90197b792d9128a2b9fa271181c9e64422a867b531683ab23010cfeb2f519adc32355839b67bf41934578fb3 SHA512 9a9b4d81482ccaac4b476c34ed537585ae754a82ebb51c3efa16d953c25cc3931be46ed2e49e79c730cd8afc6a1b78c97d52cd714044a339c3bc29734cd4d2ab
EBUILD glew-1.10.0-r100.ebuild 1948 BLAKE2B 49358c8d4969c8ed80c551d6a8dc504a2368ddb5a96f6f8a3e41d38bc028e70f88b714913f6b55cf85d101cb4b8f5a1d8eeef0a64803291e3e553dfb3234fb5b SHA512 97b574ef48d5d88bd86299fd6a9cf3fb85440af015e50ecd5ed841b214b0e9fd278c4d9e70b57c3c6224a3105582cbbfd7da1d2fcb48a6165d51a9421d9c797c
EBUILD glew-1.6.0-r100.ebuild 1921 BLAKE2B 634e76c202e3d4b08ef68b0faf4d8c8c88692b32e0b8536c9a3ab617361ad008030994517dc30146171f61d80bc75fafc1cc8e3e51a1ee76563c443ecc7033d7 SHA512 53e816516b5166ec273a9a722694c7aa0961b63144562630979b2db35d0da697f3bf4f8ff0c1cfa44d95a788d0b5304733db3470b6b245b0e2acd952df67a93f
+EBUILD glew-2.1.0-r1.ebuild 2528 BLAKE2B 740ca5b8368eb073dd23a5a13ba44e1093eeefb1118486139e4f1ebf5d7ade4016ee1898e9f2b9ce73a5dc743f6aaa58ec660f4bf1bca9679cecd04d489a07a5 SHA512 846403dba906bfeb499b7f5320cc642f29161082e5ca32c48114bd019447dd971c97005f76791157a52fc62b9b39e2bd2012a8a3c9c6bcedfb911391dc107c05
EBUILD glew-2.1.0.ebuild 2513 BLAKE2B b8c9f8cac57435196d09f9536a6d2dd11c7236922b99d2df76584c1a04f57fcf505fb21589696e7267b1ab4e63834cad1c84f58cc99f35a9961870950eb431a1 SHA512 40be22ce95d3e618803791ff13ecd40554ceb56cbc8a8cdc1a5cb10800f02b00c22b417fd35b70323a27a718ba68f4a56daec0a0ac06d87a8778b774cbc4c0e3
MISC metadata.xml 296 BLAKE2B 14e5921f53872e45c3b43dbe5d95fbb36162ce327eadfc41b34cbee17c11d1de02562152920026592f3dc508faf080e4e8b4150490a815cf7629b1ecfccda758 SHA512 60f31ba192f23a74365955e122ab54aae36c45b9158a2a5201bac68c46c07195025a9978fec01fa6e9804bc731bf1f7b495445bafb9e53d94f895c128075aa3d
diff --git a/media-libs/glew/files/glew-2.1.0-mesa-compat.patch b/media-libs/glew/files/glew-2.1.0-mesa-compat.patch
new file mode 100644
index 000000000000..391420e8138a
--- /dev/null
+++ b/media-libs/glew/files/glew-2.1.0-mesa-compat.patch
@@ -0,0 +1,21 @@
+diff --git a/include/GL/glew.h b/include/GL/glew.h
+index b5b6987..a9f9e4b 100644
+--- a/include/GL/glew.h
++++ b/include/GL/glew.h
+@@ -93,7 +93,7 @@
+ #if defined(__REGAL_H__)
+ #error Regal.h included before glew.h
+ #endif
+-#if defined(__glext_h_) || defined(__GLEXT_H_)
++#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_)
+ #error glext.h included before glew.h
+ #endif
+ #if defined(__gl_ATI_h_)
+@@ -109,6 +109,7 @@
+ #define __X_GL_H
+ #define __glext_h_
+ #define __GLEXT_H_
++#define __gl_glext_h_
+ #define __gl_ATI_h_
+
+ #if defined(_WIN32)
diff --git a/media-libs/glew/glew-2.1.0-r1.ebuild b/media-libs/glew/glew-2.1.0-r1.ebuild
new file mode 100644
index 000000000000..4b13c557e272
--- /dev/null
+++ b/media-libs/glew/glew-2.1.0-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-minimal toolchain-funcs
+
+DESCRIPTION="The OpenGL Extension Wrangler Library"
+HOMEPAGE="http://glew.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="BSD MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs"
+
+DEPEND="
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.0-install-headers.patch
+ "${FILESDIR}"/${P}-mesa-compat.patch
+ )
+
+ sed -i \
+ -e '/INSTALL/s:-s::' \
+ -e '/$(CC) $(CFLAGS) -o/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
+ -e '/^.PHONY: .*\.pc$/d' \
+ Makefile || die
+
+ if ! use static-libs ; then
+ sed -i \
+ -e '/glew.lib:/s|lib/$(LIB.STATIC) ||' \
+ -e '/glew.lib.mx:/s|lib/$(LIB.STATIC.MX) ||' \
+ -e '/INSTALL.*LIB.STATIC/d' \
+ Makefile || die
+ fi
+
+ # don't do stupid Solaris specific stuff that won't work in Prefix
+ cp config/Makefile.linux config/Makefile.solaris || die
+ # and let freebsd be built as on linux too
+ cp config/Makefile.linux config/Makefile.freebsd || die
+
+ default
+ multilib_copy_sources
+}
+
+glew_system() {
+ # Set the SYSTEM variable instead of probing. #523444 #595280
+ case ${CHOST} in
+ *linux*) echo "linux" ;;
+ *-freebsd*) echo "freebsd" ;;
+ *-darwin*) echo "darwin" ;;
+ *-solaris*) echo "solaris" ;;
+ mingw*|*-mingw*) echo "mingw" ;;
+ *) die "Unknown system ${CHOST}" ;;
+ esac
+}
+
+set_opts() {
+ myglewopts=(
+ AR="$(tc-getAR)"
+ STRIP=true
+ CC="$(tc-getCC)"
+ LD="$(tc-getCC) ${LDFLAGS}"
+ SYSTEM="$(glew_system)"
+ M_ARCH=""
+ LDFLAGS.EXTRA=""
+ POPT="${CFLAGS}"
+ )
+}
+
+multilib_src_compile() {
+ set_opts
+ emake \
+ GLEW_PREFIX="${EPREFIX}/usr" \
+ GLEW_DEST="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ "${myglewopts[@]}"
+}
+
+multilib_src_install() {
+ set_opts
+ emake \
+ GLEW_DEST="${ED}/usr" \
+ LIBDIR="${ED}/usr/$(get_libdir)" \
+ PKGDIR="${ED}/usr/$(get_libdir)/pkgconfig" \
+ "${myglewopts[@]}" \
+ install.all
+
+ dodoc README.md
+ if use doc; then
+ docinto html
+ dodoc doc/*
+ fi
+}