Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f61995b1ab | ||
|
|
cdfda605ed | ||
|
|
54c5899748 | ||
|
|
9b19175a28 |
6 changed files with 127 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
OpenGL-0.62.tar.gz
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: perl-OpenGL
|
||||
# $Id$
|
||||
NAME := perl-OpenGL
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
50
perl-OpenGL-0.62-dist.patch
Normal file
50
perl-OpenGL-0.62-dist.patch
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
Don't check current display for extensions, build all.
|
||||
|
||||
diff -up OpenGL-0.62/Makefile.PL.dist OpenGL-0.62/Makefile.PL
|
||||
--- OpenGL-0.62/Makefile.PL.dist 2009-12-11 01:10:00.000000000 +0100
|
||||
+++ OpenGL-0.62/Makefile.PL 2010-01-07 13:00:26.000000000 +0100
|
||||
@@ -579,9 +579,9 @@ my $build_config =
|
||||
{
|
||||
FILES =>
|
||||
"Config.pm ".
|
||||
- "utils/glversion.txt ".
|
||||
- "utils/glversion$Config{exe_ext} ".
|
||||
- "utils/glversion$Config{obj_ext}"
|
||||
+ "utils/glversion.txt "
|
||||
+ #"utils/glversion$Config{exe_ext} ".
|
||||
+ #"utils/glversion$Config{obj_ext}"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -790,6 +790,7 @@ sub get_extensions
|
||||
print "GLUT not found\n";
|
||||
}
|
||||
|
||||
+=cut
|
||||
# Platform-specific makefiles for glversion
|
||||
my $make_ver;
|
||||
if ($IS_MINGW)
|
||||
@@ -848,7 +849,9 @@ sub get_extensions
|
||||
print "get_extensions: no extensions found in $glv_file\n" if $verbose;
|
||||
return '';
|
||||
}
|
||||
-
|
||||
+=cut
|
||||
+ use Config;
|
||||
+ my $gldata = { };
|
||||
|
||||
# Parse glext_procs.h file
|
||||
return '' if (!open(GLEXT,"glext_procs.h"));
|
||||
@@ -867,10 +870,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->{GLUT} > 0)
|
||||
75
perl-OpenGL.spec
Normal file
75
perl-OpenGL.spec
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
Name: perl-OpenGL
|
||||
Version: 0.62
|
||||
Release: 2%{?dist}
|
||||
Summary: Perl OpenGL bindings
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: http://search.cpan.org/dist/OpenGL/
|
||||
Source0: http://www.cpan.org/authors/id/C/CH/CHM/OpenGL-%{version}.tar.gz
|
||||
Patch0: perl-OpenGL-0.62-dist.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: freeglut-devel
|
||||
BuildRequires: libXi-devel
|
||||
BuildRequires: libXmu-devel
|
||||
BuildRequires: libXext-devel
|
||||
BuildRequires: libICE-devel
|
||||
BuildRequires: perl(Test::More)
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
%description
|
||||
Perl bindings to implementations of OpenGL and GLUT, providing virtually all
|
||||
of the OpenGL 1.0, and 1.1 functions, and most of 1.2.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n OpenGL-%{version}
|
||||
%patch0 -p1 -b .dist
|
||||
|
||||
|
||||
%build
|
||||
# This is basically not a test, but an interactive demo
|
||||
mv test.pl demo.pl
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" \
|
||||
dist=NO_EXCLUSIONS verbose
|
||||
# Certain OpenGL calls may not be present in our OpenGL
|
||||
# implementation, let us just ignore them.
|
||||
sed 's/PERL_DL_NONLAZY=1//' -i Makefile
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||
|
||||
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
|
||||
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
|
||||
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
||||
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
|
||||
%check
|
||||
make test
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{perl_vendorarch}/auto/*
|
||||
%{perl_vendorarch}/OpenGL*
|
||||
%{_mandir}/man3/*
|
||||
%doc CHANGES COPYRIGHT GIT_CHANGES KNOWN_PROBLEMS README Release_Notes
|
||||
%doc SUPPORTS TODO demo.pl
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Jan 10 2010 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> 0.62-2
|
||||
- Require Xext to fix EL-5 build
|
||||
|
||||
* Thu Jan 07 2010 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> 0.62-1
|
||||
- Initial packaging
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
905407fa94ca0fc9c1e0ae7c140a4272 OpenGL-0.62.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue