diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85371d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +alleggl-0.4.3.tar.bz2 diff --git a/alleggl-0.4.2-gcc43.patch b/alleggl-0.4.2-gcc43.patch new file mode 100644 index 0000000..8c461b5 --- /dev/null +++ b/alleggl-0.4.2-gcc43.patch @@ -0,0 +1,12 @@ +diff -up alleggl/include/allegrogl/GLext/gl_ext_api.h~ alleggl/include/allegrogl/GLext/gl_ext_api.h +--- alleggl/include/allegrogl/GLext/gl_ext_api.h~ 2008-01-04 21:39:04.000000000 +0100 ++++ alleggl/include/allegrogl/GLext/gl_ext_api.h 2008-01-04 21:39:04.000000000 +0100 +@@ -1824,7 +1824,7 @@ AGL_API(void, BindBufferBaseNV, (GLenum + AGL_API(void, TransformFeedbackAttribsNV, (GLsizei, const GLint *, GLenum)) + AGL_API(void, TransformFeedbackVaryingsNV,(GLuint, GLsizei, const GLint *, GLenum)) + AGL_API(void, BeginTransformFeedbackNV, (GLenum)) +-AGL_API(void, EndTransformFeedbackNV, (GLvoid)) ++AGL_API(void, EndTransformFeedbackNV, (void)) + AGL_API(GLint, GetVaryingLocationNV, (GLuint, const GLchar *)) + AGL_API(void, GetActiveVaryingNV, (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)) + AGL_API(void, ActiveVaryingNV, (GLuint, const GLchar *)) diff --git a/alleggl-0.4.3-fullscreen-viewport.patch b/alleggl-0.4.3-fullscreen-viewport.patch new file mode 100644 index 0000000..50842a0 --- /dev/null +++ b/alleggl-0.4.3-fullscreen-viewport.patch @@ -0,0 +1,18 @@ +diff -up alleggl/src/x.c~ alleggl/src/x.c +--- alleggl/src/x.c~ 2007-09-18 22:36:28.000000000 +0200 ++++ alleggl/src/x.c 2009-09-10 22:09:01.000000000 +0200 +@@ -1005,6 +1005,14 @@ old_choose_visual: + #ifdef ALLEGROGL_HAVE_XF86VIDMODE + if (fullscreen) { + setattr.override_redirect = True; ++ ++ /* Warp the pointer to the upper left corner, this is ++ necessary as the: XF86VidModeSetViewPort() call below does ++ not seem to do anything on newer Xorg servers, instead the ++ viewport is always be centered at the last mouse position */ ++ XWarpPointer(_xwin.display, None, ++ XDefaultRootWindow(_xwin.display), ++ 0, 0, 0, 0, 0, 0); + if (!XF86VidModeSwitchToMode(_xwin.display, _xwin.screen, + _xwin.modesinfo[bestmode])) { + diff --git a/alleggl-0.4.3-make.patch b/alleggl-0.4.3-make.patch new file mode 100644 index 0000000..9bbe8d8 --- /dev/null +++ b/alleggl-0.4.3-make.patch @@ -0,0 +1,99 @@ +diff -up alleggl/make/makefile.all~ alleggl/make/makefile.all +--- alleggl/make/makefile.all~ 2007-01-06 21:39:09.000000000 +0100 ++++ alleggl/make/makefile.all 2010-09-10 09:14:33.192573997 +0200 +@@ -47,7 +47,6 @@ ifeq ($(DATA_INSTALLER),) + PROG_INSTALLER=cp + endif + +-install: $(LIB_PATH_U) $(HEADERS_U) $(EXT_HEADERS_U) + ifdef UNIX_TOOLS + define CP_INSTALL + $(foreach file, $(HEADERS_U), - $(DATA_INSTALLER) $(file) $(subst include,$(COMPILER_INCLUDE_DIR_U),$(file)) +@@ -59,6 +58,31 @@ ifdef UNIX_TOOLS + $(foreach link, $(LIB_LINKS_U), - ln -sf $(notdir $(LIB_PATH_U)) $(subst $(LIB_DIR),$(COMPILER_LIB_DIR_U),$(link)) + ) + endef ++ define RM_UNINSTALL ++ $(foreach link, $(LIB_LINKS_U), - rm -f $(subst $(LIB_DIR),$(COMPILER_LIB_DIR_U),$(link)) ++ ) ++ $(foreach file, $(HEADERS_U), - rm -f $(subst include,$(COMPILER_INCLUDE_DIR_U),$(file)) ++ ) ++ $(foreach file, $(EXT_HEADERS_U), - rm -f $(subst include,$(COMPILER_INCLUDE_DIR_U),$(file)) ++ ) ++ endef ++else ++ define CP_INSTALL ++ $(foreach file, $(HEADERS_D), - copy /y $(file) $(subst include,$(COMPILER_INCLUDE_DIR_D),$(file)) ++ ) ++ $(foreach file, $(EXT_HEADERS_D), - copy /y $(file) $(subst include,$(COMPILER_INCLUDE_DIR_D),$(file)) ++ ) ++ endef ++ define RM_UNINSTALL ++ $(foreach file, $(notdir $(HEADERS_D)), - del $(COMPILER_INCLUDE_DIR_D)\$(file) ++ ) ++ $(foreach file, $(notdir $(EXT_HEADERS_D)), - del $(COMPILER_INCLUDE_DIR_D)\$(file) ++ ) ++ endef ++endif ++ ++install: $(LIB_PATH_U) $(HEADERS_U) $(EXT_HEADERS_U) ++ifdef UNIX_TOOLS + ifeq ($(wildcard $(COMPILER_INCLUDE_DIR_U)/allegrogl),) + mkdir -p $(COMPILER_INCLUDE_DIR_U)/allegrogl + endif +@@ -73,12 +97,6 @@ ifdef UNIX_TOOLS + - $(INSTALL_LINK) + - $(LDCONFIG) + else +- define CP_INSTALL +- $(foreach file, $(HEADERS_D), - copy /y $(file) $(subst include,$(COMPILER_INCLUDE_DIR_D),$(file)) +- ) +- $(foreach file, $(EXT_HEADERS_D), - copy /y $(file) $(subst include,$(COMPILER_INCLUDE_DIR_D),$(file)) +- ) +- endef + - mkdir $(COMPILER_INCLUDE_DIR_D)\allegrogl + - mkdir $(COMPILER_INCLUDE_DIR_D)\allegrogl\GLext + - $(CP_INSTALL) +@@ -89,25 +107,11 @@ endif + + uninstall: + ifdef UNIX_TOOLS +- define RM_UNINSTALL +- $(foreach link, $(LIB_LINKS_U), - rm -f $(subst $(LIB_DIR),$(COMPILER_LIB_DIR_U),$(link)) +- ) +- $(foreach file, $(HEADERS_U), - rm -f $(subst include,$(COMPILER_INCLUDE_DIR_U),$(file)) +- ) +- $(foreach file, $(EXT_HEADERS_U), - rm -f $(subst include,$(COMPILER_INCLUDE_DIR_U),$(file)) +- ) +- endef + - rm -f $(COMPILER_LIB_DIR_U)/$(notdir $(LIB_PATH_U)) + - $(RM_UNINSTALL) + - rm -rf $(COMPILER_INCLUDE_DIR_U)/allegrogl/GLext + - rm -rf $(COMPILER_INCLUDE_DIR_U)/allegrogl + else +- define RM_UNINSTALL +- $(foreach file, $(notdir $(HEADERS_D)), - del $(COMPILER_INCLUDE_DIR_D)\$(file) +- ) +- $(foreach file, $(notdir $(EXT_HEADERS_D)), - del $(COMPILER_INCLUDE_DIR_D)\$(file) +- ) +- endef + - $(RM_UNINSTALL) + - rmdir /s /q $(COMPILER_INCLUDE_DIR_D)\allegrogl + - del $(COMPILER_LIB_DIR_D)\$(notdir $(LIB_PATH_U)) +diff -up alleggl/make/makefile.unx~ alleggl/make/makefile.unx +--- alleggl/make/makefile.unx~ 2007-11-10 20:33:06.000000000 +0100 ++++ alleggl/make/makefile.unx 2010-09-10 09:24:30.423574002 +0200 +@@ -149,11 +149,12 @@ distlist: + + include make/makefile.dep + +-$(LIB_PATH_U): $(GENERAL_LIB_OBJS) $(PLATFORM_OBJECT) + define MAKE_LINKS + $(foreach link, $(LIB_LINKS_U), - ln -sf $(notdir $(LIB_PATH_U)) $(link) + ) + endef ++ ++$(LIB_PATH_U): $(GENERAL_LIB_OBJS) $(PLATFORM_OBJECT) + $(LIB_BUILDER) $@ $^ + - $(MAKE_LINKS) + diff --git a/alleggl-0.4.3-rhbz658758.patch b/alleggl-0.4.3-rhbz658758.patch new file mode 100644 index 0000000..6613829 --- /dev/null +++ b/alleggl-0.4.3-rhbz658758.patch @@ -0,0 +1,16 @@ +diff -up alleggl/src/glext.c~ alleggl/src/glext.c +--- alleggl/src/glext.c~ 2007-05-15 15:37:46.000000000 +0200 ++++ alleggl/src/glext.c 2010-12-01 08:51:23.631386748 +0100 +@@ -450,6 +450,12 @@ static void __fill_in_info_struct(const + struct allegro_gl_info *info) { + const char *renderer = (const char*)rendereru; + ++ /* The render string can be NULL ?? See: ++ https://bugzilla.redhat.com/show_bug.cgi?id=658758 */ ++ if (renderer == NULL) { ++ renderer = "foobar"; ++ } ++ + /* Some cards are "special"... */ + if (strstr(renderer, "3Dfx/Voodoo")) { + info->is_voodoo = 1; diff --git a/alleggl.spec b/alleggl.spec new file mode 100644 index 0000000..a6fedd4 --- /dev/null +++ b/alleggl.spec @@ -0,0 +1,153 @@ +Name: alleggl +Version: 0.4.3 +Release: 8%{?dist} +Summary: OpenGL support library for Allegro +Group: System Environment/Libraries +License: zlib +URL: http://allegrogl.sourceforge.net/ +Source0: http://downloads.sourceforge.net/allegrogl/%{name}-%{version}.tar.bz2 +Patch0: alleggl-0.4.2-gcc43.patch +Patch1: alleggl-0.4.3-fullscreen-viewport.patch +Patch2: alleggl-0.4.3-make.patch +Patch3: alleggl-0.4.3-rhbz658758.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: allegro-devel libGLU-devel libX11-devel libXext-devel +BuildRequires: libXpm-devel libXxf86vm-devel + +%description +AllegroGL is an Allegro add-on that allows you to use OpenGL alongside Allegro. +You use OpenGL for your rendering to the screen, and Allegro for miscellaneous +tasks like gathering input, doing timers, getting cross-platform portability, +loading data, and drawing your textures. So this library fills the same hole +that things like glut do. + +AllegroGL also automatically exposes most, if not all, OpenGL extensions +available to user programs. This means you no longer have to manually load +them; extension management is already done for you. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: allegro-devel libGL-devel + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%setup -q -n %{name} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + + +%build +# the --with-x-foo is there so that configure doesn't add -L/usr/lib to +# the LDFLAGS, as that will result in an installed older alleggl getting used +# during the linking of the examples, possibly resulting in an error +%configure --disable-static --x-includes='' --x-libraries='' +make %{?_smp_mflags} 'LIB_BUILDER=gcc -shared -Wl,-soname,libagl.so.0 -o' \ + CFLAGS="$RPM_OPT_FLAGS -ffast-math" + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +# alleggl installs an autoheader generated header file which could very +# well conflict with other autoheader generated header files, so we override +# this with our own version which contains only the bare minimum: +echo '#define ALLEGROGL_HAVE_DYNAMIC_LINK 1' \ + > $RPM_BUILD_ROOT%{_includedir}/alleggl_config.h +echo '#define ALLEGROGL_HAVE_XF86VIDMODE 1' \ + >> $RPM_BUILD_ROOT%{_includedir}/alleggl_config.h + +# we don't want these files to end up under %%doc and there is no way +# to %%exclude files from %%doc, so we remove them +rm docs/html/index.hh? + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc bugs.txt todo.txt +%{_libdir}/libagl.so.0* + +%files devel +%defattr(-,root,root,-) +%doc extensions.txt faq.txt howto.txt quickstart.txt docs/html +%{_includedir}/* +%{_libdir}/libagl.so + + +%changelog +* Wed Dec 1 2010 Hans de Goede 0.4.3-8 +- Fix crash when libGL reports a NULL rendering string (#658758) + +* Fri Sep 10 2010 Hans de Goede 0.4.3-7 +- Fix FTBFS (#631146) + +* Thu Sep 10 2009 Hans de Goede 0.4.3-6 +- Fix (workaround) viewport issues in fullscreen mode (#522116) + +* Fri Jul 24 2009 Fedora Release Engineering - 0.4.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Feb 23 2009 Fedora Release Engineering - 0.4.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 15 2008 Hans de Goede 0.4.3-3 +- Upstream has done a new (respin) release without bumping the version GRR +- Rebuild for gcc 4.3 + +* Fri Dec 4 2007 Hans de Goede 0.4.3-2 +- Fix headers to allow inclusion from c++ programs compiled with gcc 4.3 + +* Sun Nov 11 2007 Hans de Goede 0.4.3-1 +- New upstream release 0.4.3 +- Drop prebuild doxygen Source as upstream now includes prebuild doxygen docs + +* Sun Oct 21 2007 Hans de Goede 0.4.2-2 +- Some cleanups to the multilib doxygen documentation bugfix + +* Sun Oct 21 2007 Hans de Goede 0.4.2-1 +- Upstream has renamed rc1 to final, so drop the .rc1 from the release field +- Fix multilib conflicts in doxygen documentation (bz 340611) + +* Thu Aug 2 2007 Hans de Goede 0.4.2-0.2.rc1 +- Update License tag for new Licensing Guidelines compliance + +* Sun Jun 3 2007 Hans de Goede 0.4.1-1 +- New upstream release 0.4.1 final + +* Wed Dec 13 2006 Hans de Goede 0.4.0-1 +- New upstream release 0.4.0 final + +* Mon Aug 28 2006 Hans de Goede 0.4.0-0.5.rc4 +- FE6 Rebuild + +* Thu Aug 10 2006 Hans de Goede 0.4.0-0.4.rc4 +- Cleanup %%doc for both base and -devel a bit + +* Fri Aug 4 2006 Hans de Goede 0.4.0-0.3.rc4 +- Add missing BRs: libXext-devel and libXpm-devel + +* Thu Aug 3 2006 Hans de Goede 0.4.0-0.2.rc4 +- Replace installed autoheader generated header file with our own version + which contains only the nescesarry alleggl specific defines, thus avoiding + possible conflicts with other autoheader generated headers. + +* Thu Aug 3 2006 Hans de Goede 0.4.0-0.1.rc4 +- Initial Fedora Extras package diff --git a/dead.package b/dead.package deleted file mode 100644 index e17dda2..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -alleggl is now part of / bundled with allegro itself \ No newline at end of file diff --git a/sources b/sources new file mode 100644 index 0000000..5037554 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +de84c6ab982499501940854893ea0dbd alleggl-0.4.3.tar.bz2