dev-perl/OpenGL: add 0.700.200

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-03-14 04:18:20 +00:00
parent a1660c9e80
commit c1402aa73a
3 changed files with 150 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST OpenGL-0.70.tar.gz 783810 BLAKE2B 9112057cb0eed654827aaed84646c31d80833f6cce90a7a6066d648558c90ade0126b4f79033bef08adce1e3024c2eb4d1e6b10d4807bb422bce18ffcb1baba9 SHA512 7d418015b2553dd69805252b5957bc97013260617d5a358f692e29b8da884590421c81fbc71d4dd678c93a5c89047d6af8c32f15bf0bd0e4ce514c200e634af5
DIST OpenGL-0.7002.tar.gz 792095 BLAKE2B 3df5bbfa746dde0bd3a4488872670b09d6fae3ec0bc0dd680ba239405741ebd4da6136af6335f3c79e4e88d572f6c98bb4c2739c7274f66559e126df1e7869d5 SHA512 41f1ca91dc7a92e173e3fab67f9d0a94205b17de94f6662d7588e46b8bdfac1b016ab237a045ff50eb7d46d1f342f253f8afb7254f4b7b14feca24b0acc293ba

View File

@@ -0,0 +1,54 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DIST_AUTHOR=ETJ
DIST_VERSION=0.7002
inherit perl-module
DESCRIPTION="Perl interface providing graphics display using OpenGL"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
IUSE="examples"
RDEPEND="
media-libs/freeglut:=
x11-libs/libICE:=
x11-libs/libXext:=
x11-libs/libXi:=
x11-libs/libXmu:=
"
DEPEND="${RDEPEND}"
BDEPEND="${RDEPEND}"
mydoc="Release_Notes"
PATCHES=(
"${FILESDIR}"/${PN}-0.700.200-no-display.patch
)
src_prepare() {
# This should be merely moved to t/ as it gets
# installed to OS otherwise.
# But it presently fails tests, and can't be made not to.
# ( And will need virtualx when it can )
# Something to do with OpenGL implementation ala eselect.
perl_rm_files "test.pl"
perl-module_src_prepare
}
src_compile() {
#sed -i -e 's/PERL_DL_NONLAZY=1//' Makefile || die
perl-module_src_compile
}
src_install() {
perl-module_src_install
if use examples; then
dodoc -r examples
docompress -x /usr/share/doc/${PF}/examples
fi
}

View File

@@ -0,0 +1,95 @@
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -611,9 +611,7 @@ my $build_config =
FILES =>
"Config.pm ".
"gl_exclude.h ".
- "utils/glversion.txt ".
- "utils/glversion$Config{exe_ext} ".
- "utils/glversion$Config{obj_ext}"
+ "utils/glversion.txt "
}
};
@@ -834,65 +832,6 @@ sub get_extensions
print "GLUT not found\n";
}
- # Platform-specific makefiles for glversion
- my $make_ver;
- if ($IS_STRAWBERRY)
- {
- $make_ver = "&strawberry.bat";
- print "strawberry glversion: '$make_ver'\n" if $verbose>1;
- }
- elsif ($IS_MINGW)
- {
- $make_ver = "&mingw.bat";
- print "mingw glversion: '$make_ver'\n" if $verbose>1;
- }
- elsif ($IS_W32API)
- {
- $make_ver = ";make -f Makefile.cygwin " . (length($lib) ? "GLUT_LIB=$lib " : "") . (length($def) ? "GLUT_DEF=$def " : "");
- print "cygwin glversion: '$make_ver'\n" if $verbose>1;
- }
- elsif ($^O eq 'MSWin32')
- {
- $make_ver = '&nmake -f makefile.mak ' . (length($def) ? "GLUT_DEF=$def " : "");
- print "MSWin32 glversion: '$make_ver'\n" if $verbose>1;
- }
- elsif ($^O eq 'darwin')
- {
- $make_ver = ";make -f Makefile.macosx " . (length($lib) ? "GLUT_LIB=$lib " : "") . (length($def) ? "GLUT_DEF=$def " : "");
- print "MacOSX glversion: '$make_ver'\n" if $verbose>1;
- }
- else
- {
- if ($ENV{TERM} ne 'xterm')
- {
- print "\nIn order to test your GPU's capabilities, run this make under an X11 shell\n\n";
- }
-
- $make_ver = ";make -f Makefile " . (length($lib) ? "GLUT_LIB=$lib " : "") . (length($def) ? "GLUT_DEF=$def " : "");
- print "glversion: '$make_ver'\n" if $verbose>1;
- }
- my $exec = 'cd utils'."$make_ver clean".$make_ver;
- print "glversion: $exec\n" if ($verbose);
- my $stat = `$exec`;
- print "\n$stat\n\n" if ($verbose);
- unlink "utils/freeglut.dll" or die "could not remove temporary freeglut: $!" if -f "utils/freeglut.dll";
-
- # Parse glversion.txt file
- open GLDATA, $glv_file or die "get_extensions: could not open $glv_file: $!\n";
- my $gldata = {};
- my @gldata = <GLDATA>;
- close(GLDATA);
-
- foreach my $line (@gldata)
- {
- $line =~ s|[\r\n]+||;
- my($key,$val) = split('=',$line);
- $gldata->{$key} = $val;
- }
- die "get_extensions: no extensions found in $glv_file\n" if !keys %$gldata;
-
- print "This looks like OpenGL Version: $gldata->{VERSION}\n";
-
# Parse glext_procs.h file
open GLEXT, "glext_procs.h" or die "get_extensions: could not open glext_procs.h: $!\n";
my @lines = <GLEXT>;
@@ -907,13 +846,11 @@ sub get_extensions
$no_ext->{$ext}++;
}
+ use Config;
+ my $gldata = { };
# Create gl_exclude.h
die "Unable to write to $exc_file\n" if (!open(GLEXC,">$exc_file"));
- 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 ";
# Fix GLUT flags based on results
if ($gldata->{FREEGLUT})