From 9b19175a2874483cdf24fd2d7d016792a98c27e4 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sat, 9 Jan 2010 04:31:19 +0000 Subject: [PATCH 1/4] Initialize branch EL-5 for perl-OpenGL --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..42f697a --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-5 From 54c5899748b5178e606de5bb9c963f1a8b516661 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 10 Jan 2010 16:02:51 +0000 Subject: [PATCH 2/4] Import perl OpenGL --- .cvsignore | 1 + perl-OpenGL-0.62-dist.patch | 50 ++++++++++++++++++++++++++ perl-OpenGL.spec | 71 +++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 123 insertions(+) create mode 100644 perl-OpenGL-0.62-dist.patch create mode 100644 perl-OpenGL.spec diff --git a/.cvsignore b/.cvsignore index e69de29..dfd3dbf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +OpenGL-0.62.tar.gz diff --git a/perl-OpenGL-0.62-dist.patch b/perl-OpenGL-0.62-dist.patch new file mode 100644 index 0000000..6bdc334 --- /dev/null +++ b/perl-OpenGL-0.62-dist.patch @@ -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) diff --git a/perl-OpenGL.spec b/perl-OpenGL.spec new file mode 100644 index 0000000..e58f3df --- /dev/null +++ b/perl-OpenGL.spec @@ -0,0 +1,71 @@ +Name: perl-OpenGL +Version: 0.62 +Release: 1%{?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: 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 +* Thu Jan 07 2010 Lubomir Rintel (Good Data) 0.62-1 +- Initial packaging diff --git a/sources b/sources index e69de29..8e1ba24 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +905407fa94ca0fc9c1e0ae7c140a4272 OpenGL-0.62.tar.gz From cdfda605ed545d2bc3a241ee99dd81bdf4c00d4d Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 10 Jan 2010 16:13:32 +0000 Subject: [PATCH 3/4] - Require Xext to fix EL-5 build --- perl-OpenGL.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/perl-OpenGL.spec b/perl-OpenGL.spec index e58f3df..d496256 100644 --- a/perl-OpenGL.spec +++ b/perl-OpenGL.spec @@ -1,6 +1,6 @@ Name: perl-OpenGL Version: 0.62 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Perl OpenGL bindings License: GPL+ or Artistic Group: Development/Libraries @@ -12,6 +12,7 @@ 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)) @@ -67,5 +68,8 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jan 10 2010 Lubomir Rintel (Good Data) 0.62-2 +- Require Xext to fix EL-5 build + * Thu Jan 07 2010 Lubomir Rintel (Good Data) 0.62-1 - Initial packaging From f61995b1ab52055cb3595bb610d17e0844baa118 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 07:36:05 +0000 Subject: [PATCH 4/4] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 5d252f7..0000000 --- a/Makefile +++ /dev/null @@ -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) diff --git a/branch b/branch deleted file mode 100644 index 42f697a..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-5