commit:     6c82e2f4d3719294e85e9d58f98d2a2561023d39
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 10 00:55:24 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 10 00:56:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c82e2f4

dev-perl/OpenGL-GLUT: new package, add 0.720.0

New dep of dev-perl/PDL, split out from dev-perl/OpenGL I think.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-perl/OpenGL-GLUT/Manifest                      |  1 +
 dev-perl/OpenGL-GLUT/OpenGL-GLUT-0.720.0.ebuild    | 38 +++++++++++++++
 .../files/OpenGL-GLUT-0.720.0-no-display.patch     | 55 ++++++++++++++++++++++
 dev-perl/OpenGL-GLUT/metadata.xml                  | 23 +++++++++
 4 files changed, 117 insertions(+)

diff --git a/dev-perl/OpenGL-GLUT/Manifest b/dev-perl/OpenGL-GLUT/Manifest
new file mode 100644
index 000000000000..34e41b734d43
--- /dev/null
+++ b/dev-perl/OpenGL-GLUT/Manifest
@@ -0,0 +1 @@
+DIST OpenGL-GLUT-0.72.tar.gz 481377 BLAKE2B 
ab17aeca021a9a52e1af2362602abb357f09215468f545e2639ef7e1225375dd88d9f5d367ef59713d479e2b907b00d67242ff8e91d187931c538b82804354ad
 SHA512 
ade45f62e83ea279f9dabc03fa802cd401577a04f708293d829ca8a4b7fd5369579a010a018e45fce0d472e70b725222301f242bc48cf859c8a8430e68f43149

diff --git a/dev-perl/OpenGL-GLUT/OpenGL-GLUT-0.720.0.ebuild 
b/dev-perl/OpenGL-GLUT/OpenGL-GLUT-0.720.0.ebuild
new file mode 100644
index 000000000000..1ec605acc121
--- /dev/null
+++ b/dev-perl/OpenGL-GLUT/OpenGL-GLUT-0.720.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=ETJ
+DIST_VERSION=0.72
+
+inherit perl-module
+
+DESCRIPTION="Perl bindings to GLUT/FreeGLUT GUI toolkit"
+
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       media-libs/freeglut:=
+       x11-libs/libICE:=
+       x11-libs/libXext:=
+       x11-libs/libXi:=
+       x11-libs/libXmu:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.720.0-no-display.patch
+)
+
+src_prepare() {
+       # Per Fedora, "This is basically not a test, but an interactive demo"
+       mv test.pl demo.pl || die
+
+       # Unbundle GL headers
+       find include -type f -delete || die
+
+       perl-module_src_prepare
+}

diff --git a/dev-perl/OpenGL-GLUT/files/OpenGL-GLUT-0.720.0-no-display.patch 
b/dev-perl/OpenGL-GLUT/files/OpenGL-GLUT-0.720.0-no-display.patch
new file mode 100644
index 000000000000..17e2c1bd422b
--- /dev/null
+++ b/dev-perl/OpenGL-GLUT/files/OpenGL-GLUT-0.720.0-no-display.patch
@@ -0,0 +1,55 @@
+https://src.fedoraproject.org/rpms/perl-OpenGL-GLUT/blob/f39/f/OpenGL-GLUT-0.72-Don-t-check-current-display-for-extensions.patch
+--- a/Makefile.PL.orig
++++ b/Makefile.PL
+@@ -567,6 +567,7 @@ my $build_config =
+ {
+   'NAME'      => 'OpenGL::GLUT',
+   'VERSION_FROM'=> 'lib/OpenGL/GLUT.pm',
++  'PM'        => { 'lib/OpenGL/GLUT.pm' => 'blib/lib/OpenGL/GLUT.pm' },
+   PREREQ_PM => {
+     'OpenGL' => '0.70',
+   },
+@@ -604,9 +605,9 @@ my $build_config =
+   {
+     FILES =>
+       "utils/glversion.txt ".
+-      "gl_exclude.h ".
+-      "utils/glversion$Config{exe_ext} ".
+-      "utils/glversion$Config{obj_ext}"
++      "gl_exclude.h "
++      #"utils/glversion$Config{exe_ext} ".
++      #"utils/glversion$Config{obj_ext}"
+   }
+ };
+ 
+@@ -825,6 +826,7 @@ sub get_extensions
+     print "GLUT not found\n";
+   }
+ 
++=cut
+   # Platform-specific makefiles for glversion
+   my $make_ver;
+   if ($IS_STRAWBERRY)
+@@ -883,6 +885,8 @@ sub get_extensions
+   die "get_extensions: no extensions found in $glv_file\n" if !keys %$gldata;
+ 
+   print "This looks like OpenGL Version: $gldata->{VERSION}\n";
++=cut
++  my $gldata = { };
+ 
+   # Parse glext_procs.h file
+   open GLEXT, "glext_procs.h" or die "get_extensions: could not open 
glext_procs.h: $!\n";
+@@ -901,11 +905,12 @@ sub get_extensions
+ 
+   # Create gl_exclude.h
+   die "Unable to write to $exc_file\n" if (!open(GLEXC,">$exc_file"));
++=cut
+   print GLEXC "// OpenGL Extension Exclusions - may be modified before 
building.\n";
+   print GLEXC "//\n";
+   print GLEXC "// Generated for ".$gldata->{VENDOR}.", 
".$gldata->{RENDERER}."\n";
+   print GLEXC "// OpenGL v".$gldata->{VERSION}.", using ";
+-
++=cut
+   # Fix GLUT flags based on results
+   if ($gldata->{FREEGLUT})
+   {

diff --git a/dev-perl/OpenGL-GLUT/metadata.xml 
b/dev-perl/OpenGL-GLUT/metadata.xml
new file mode 100644
index 000000000000..41c6c925b1d3
--- /dev/null
+++ b/dev-perl/OpenGL-GLUT/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<maintainer type="project">
+  <email>s...@gentoo.org</email>
+  <name>Gentoo Science Project</name>
+</maintainer>
+<maintainer type="project">
+  <email>p...@gentoo.org</email>
+  <name>Gentoo Perl Project</name>
+</maintainer>
+<longdescription lang="en">
+  OpenGL is a Perl module that provides an interface to most of Open Graphics
+  Library, API versions 1.0, 1.1 and 1.2. There is full support for the Utility
+  Toolkit (GLUT) up to version 3 and provides some additional functionality via
+  partial support for the Utility Library (GLU). It also provides functionality
+  to use the X Window System (through X11 and GLX) as an alternative to GLUT.
+</longdescription>
+<upstream>
+  <remote-id type="cpan">OpenGL</remote-id>
+  <remote-id type="cpan-module">OpenGL</remote-id>
+</upstream>
+</pkgmetadata>

Reply via email to