From 6c82e2f4d3719294e85e9d58f98d2a2561023d39 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 10 Apr 2024 01:55:24 +0100 Subject: [PATCH] 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 --- dev-perl/OpenGL-GLUT/Manifest | 1 + .../OpenGL-GLUT/OpenGL-GLUT-0.720.0.ebuild | 38 +++++++++++++ .../OpenGL-GLUT-0.720.0-no-display.patch | 55 +++++++++++++++++++ dev-perl/OpenGL-GLUT/metadata.xml | 23 ++++++++ 4 files changed, 117 insertions(+) create mode 100644 dev-perl/OpenGL-GLUT/Manifest create mode 100644 dev-perl/OpenGL-GLUT/OpenGL-GLUT-0.720.0.ebuild create mode 100644 dev-perl/OpenGL-GLUT/files/OpenGL-GLUT-0.720.0-no-display.patch create mode 100644 dev-perl/OpenGL-GLUT/metadata.xml diff --git a/dev-perl/OpenGL-GLUT/Manifest b/dev-perl/OpenGL-GLUT/Manifest new file mode 100644 index 0000000000000..34e41b734d43e --- /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 0000000000000..1ec605acc1213 --- /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 0000000000000..17e2c1bd422b8 --- /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 0000000000000..41c6c925b1d35 --- /dev/null +++ b/dev-perl/OpenGL-GLUT/metadata.xml @@ -0,0 +1,23 @@ + + + + + sci@gentoo.org + Gentoo Science Project + + + perl@gentoo.org + Gentoo Perl Project + + + 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. + + + OpenGL + OpenGL + +