From c634e03c490ad4ee6e7cfb359539028292c8f540 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 20 Oct 2007 03:55:55 +0000 Subject: [PATCH 1/5] Initialize branch F-8 for allegro --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..e9e7ccd --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-8 From 876bb21e0a56227e0a95fdf4e5fcbb23ef728b5c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 22 Jan 2008 10:27:06 +0000 Subject: [PATCH 2/5] - Add makedoc utility to allegro-devel as allegro-makedoc (bz 429450) - Fix sound when using pulseaudio - Fix compilation of inline asm with gcc 4.3 --- allegro-4.2.2-gcc43.patch | 57 ++++++++++++++++++++++++++++ allegro-4.2.2-pulseaudio.patch | 69 ++++++++++++++++++++++++++++++++++ allegro.spec | 13 ++++++- 3 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 allegro-4.2.2-gcc43.patch create mode 100644 allegro-4.2.2-pulseaudio.patch diff --git a/allegro-4.2.2-gcc43.patch b/allegro-4.2.2-gcc43.patch new file mode 100644 index 0000000..2ac6a73 --- /dev/null +++ b/allegro-4.2.2-gcc43.patch @@ -0,0 +1,57 @@ +diff -up allegro-4.2.2/include/allegro/platform/al386gcc.h~ allegro-4.2.2/include/allegro/platform/al386gcc.h +--- allegro-4.2.2/include/allegro/platform/al386gcc.h~ 2008-01-21 19:18:34.000000000 +0100 ++++ allegro-4.2.2/include/allegro/platform/al386gcc.h 2008-01-21 19:18:34.000000000 +0100 +@@ -208,14 +208,13 @@ AL_INLINE(fixed, fixsub, (fixed x, fixed + */ + AL_INLINE(fixed, fixmul, (fixed x, fixed y), + { +- fixed edx __attribute__ ((__unused__)); + fixed result; + + __PRECALCULATE_CONSTANTS(x / 65536.0 * y) + { + __asm__ ( +- " movl %2, %%eax ; " +- " imull %3 ; " /* do the multiply */ ++ " movl %1, %%eax ; " ++ " imull %2 ; " /* do the multiply */ + " shrdl $16, %%edx, %%eax ; " + + " sarl $15, %%edx ; " /* check for overflow */ +@@ -223,14 +222,14 @@ AL_INLINE(fixed, fixmul, (fixed x, fixed + " cmpl $-1, %%edx ; " + " je 0f ; " + +- " movl %5, %%eax ; " /* on overflow, set errno */ +- " movl %4, (%%eax) ; " ++ " movl %4, %%eax ; " /* on overflow, set errno */ ++ " movl %3, (%%eax) ; " + " movl $0x7FFFFFFF, %%eax ; " /* and return MAXINT */ +- " cmpl $0, %2 ; " ++ " cmpl $0, %1 ; " + " jge 1f ; " + " negl %%eax ; " + " 1: " +- " cmpl $0, %3 ; " ++ " cmpl $0, %2 ; " + " jge 0f ; " + " negl %%eax ; " + +@@ -238,15 +237,14 @@ AL_INLINE(fixed, fixmul, (fixed x, fixed + + " 0: " /* finished */ + +- : "=&a" (result), /* the result has to go in eax */ +- "=&d" (edx) /* reliably reserve edx */ ++ : "=&a" (result) /* the result has to go in eax */ + + : "mr" (x), /* x and y can be regs or mem */ + "mr" (y), + "i" (ERANGE), + "m" (allegro_errno) + +- : "%cc", "memory" /* clobbers flags and errno */ ++ : "%cc", "memory", "edx" /* clobbers flags, errno and edx */ + ); + + return result; diff --git a/allegro-4.2.2-pulseaudio.patch b/allegro-4.2.2-pulseaudio.patch new file mode 100644 index 0000000..7e6dfbc --- /dev/null +++ b/allegro-4.2.2-pulseaudio.patch @@ -0,0 +1,69 @@ +diff -up allegro-4.2.2/src/unix/alsa9.c.pulse allegro-4.2.2/src/unix/alsa9.c +--- allegro-4.2.2/src/unix/alsa9.c.pulse 2006-03-18 16:05:34.000000000 +0100 ++++ allegro-4.2.2/src/unix/alsa9.c 2008-01-21 20:01:18.000000000 +0100 +@@ -81,7 +81,7 @@ static double alsa_mixer_allegro_ratio = + + static snd_pcm_t *pcm_handle; + static unsigned char *alsa_bufdata; +-static int alsa_bits, alsa_signed, alsa_stereo; ++static int alsa_bits, alsa_signed, alsa_stereo, alsa_format; + static unsigned int alsa_rate; + static unsigned int alsa_fragments; + static int alsa_sample_size; +@@ -292,7 +292,6 @@ static int alsa_init(int input, int voic + { + int ret = 0; + char tmp1[128], tmp2[128]; +- int format = 0; + unsigned int numfrags = 0; + snd_pcm_uframes_t fragsize; + +@@ -354,29 +353,14 @@ static int alsa_init(int input, int voic + alsa_stereo = (_sound_stereo) ? 1 : 0; + alsa_rate = (_sound_freq > 0) ? _sound_freq : 44100; + alsa_signed = 0; ++ alsa_format = (alsa_bits == 16) ? SND_PCM_FORMAT_U16_NE : SND_PCM_FORMAT_U8; ++ alsa_sample_size = (alsa_bits / 8) * (alsa_stereo ? 2 : 1); + +- format = ((alsa_bits == 16) ? SND_PCM_FORMAT_U16_NE : SND_PCM_FORMAT_U8); +- +- switch (format) { +- +- case SND_PCM_FORMAT_U8: +- alsa_bits = 8; +- break; +- +- case SND_PCM_FORMAT_U16_NE: +- if (sizeof(short) != 2) { +- ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format")); +- goto Error; +- } +- break; +- +- default: +- ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format")); +- goto Error; ++ if (alsa_format == SND_PCM_FORMAT_U16_NE && sizeof(short) != 2) { ++ ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format")); ++ goto Error; + } + +- alsa_sample_size = (alsa_bits / 8) * (alsa_stereo ? 2 : 1); +- + if (fragsize == 0) { + unsigned int size = alsa_rate * ALSA_DEFAULT_BUFFER_MS / 1000 / numfrags; + fragsize = 1; +@@ -389,7 +373,12 @@ static int alsa_init(int input, int voic + + ALSA9_CHECK(snd_pcm_hw_params_any(pcm_handle, hwparams)); + ALSA9_CHECK(snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)); +- ALSA9_CHECK(snd_pcm_hw_params_set_format(pcm_handle, hwparams, format)); ++ if (snd_pcm_hw_params_set_format(pcm_handle, hwparams, alsa_format) < 0) { ++ /* Try again with signed samples (needed atleast for pulseaudio) */ ++ alsa_format = (alsa_bits == 16) ? SND_PCM_FORMAT_S16_NE : SND_PCM_FORMAT_S8; ++ alsa_signed = 1; ++ ALSA9_CHECK(snd_pcm_hw_params_set_format(pcm_handle, hwparams, alsa_format)); ++ } + ALSA9_CHECK(snd_pcm_hw_params_set_channels(pcm_handle, hwparams, alsa_stereo + 1)); + + ALSA9_CHECK(snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &alsa_rate, NULL)); diff --git a/allegro.spec b/allegro.spec index 9feb932..276ba76 100644 --- a/allegro.spec +++ b/allegro.spec @@ -1,6 +1,6 @@ Name: allegro Version: 4.2.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A game programming library Summary(es): Una libreria de programacion de juegos @@ -18,6 +18,8 @@ Patch3: allegro-4.2.0-noexecstack.patch Patch4: allegro-4.2.0-multilib.patch Patch5: allegro-4.2.1-noexecmod.patch Patch6: allegro-4.0.3-libdir.patch +Patch7: allegro-4.2.2-pulseaudio.patch +Patch8: allegro-4.2.2-gcc43.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: esound-devel, texinfo, perl, arts-devel, glib2-devel BuildRequires: xorg-x11-proto-devel, libX11-devel, libXext-devel, libXt-devel @@ -159,6 +161,8 @@ sound through JACK (Jack Audio Connection Kit). %patch4 -p1 -z .multilib %patch5 -p1 -z .noexecmod %patch6 -p1 -z .multilib2 +%patch7 -p1 -z .pulse +%patch8 -p1 -z .gcc43 iconv -f iso-8859-1 -t utf-8 docs/src/allegro._tx > docs/src/allegro._tx.tmp mv docs/src/allegro._tx.tmp docs/src/allegro._tx @@ -182,6 +186,7 @@ make CFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/kde/artsc" rm -rf $RPM_BUILD_ROOT make install install-man install-info \ DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true +install -m 755 docs/makedoc $RPM_BUILD_ROOT%{_bindir}/allegro-makedoc install -Dpm 644 allegro.cfg $RPM_BUILD_ROOT%{_sysconfdir}/allegrorc install -dm 755 $RPM_BUILD_ROOT%{_datadir}/allegro install -pm 644 keyboard.dat language.dat $RPM_BUILD_ROOT%{_datadir}/allegro @@ -249,6 +254,7 @@ rm -rf $RPM_BUILD_ROOT %doc todo.txt docs/html %doc demo examples setup %{_bindir}/allegro-config +%{_bindir}/allegro-makedoc %{_libdir}/liballeg_unsharable.a %{_libdir}/liball?.so.* %{_libdir}/liball?-%{version}.so @@ -285,6 +291,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 21 2008 Hans de Goede 4.2.2-7 +- Add makedoc utility to allegro-devel as allegro-makedoc (bz 429450) +- Fix sound when using pulseaudio +- Fix compilation of inline asm with gcc 4.3 + * Sun Oct 14 2007 Hans de Goede 4.2.2-6 - Require timidity++-patches instead of timidity++ itself so that we don't drag in arts and through arts, qt and boost From 1e47c8a9fda877304832daf95b72ece347e2c412 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 5 May 2008 17:18:51 +0000 Subject: [PATCH 3/5] - Look for /etc/timidity.cfg instead of /usr/share/timidity/timidity.cfg, as the latter is no longer available now that Fedora has switched from timidity++-patches to PersonalCopy-Lite-patches --- allegro-4.0.3-cfg.patch | 2 +- allegro-4.2.2-gcc43-asm.patch | 12 ++++++++++++ allegro.spec | 30 +++++++++++++++++++++++------- 3 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 allegro-4.2.2-gcc43-asm.patch diff --git a/allegro-4.0.3-cfg.patch b/allegro-4.0.3-cfg.patch index e44aaaa..d3a2e10 100644 --- a/allegro-4.0.3-cfg.patch +++ b/allegro-4.0.3-cfg.patch @@ -5,7 +5,7 @@ # patch set for the DIGMID software wavetable driver -patches = -+patches = /usr/share/timidity/timidity.cfg ++patches = /etc/timidity.cfg diff --git a/allegro-4.2.2-gcc43-asm.patch b/allegro-4.2.2-gcc43-asm.patch new file mode 100644 index 0000000..86d3744 --- /dev/null +++ b/allegro-4.2.2-gcc43-asm.patch @@ -0,0 +1,12 @@ +diff -up allegro-4.2.2/src/i386/icpus.s~ allegro-4.2.2/src/i386/icpus.s +--- allegro-4.2.2/src/i386/icpus.s~ 2008-03-20 15:11:46.000000000 +0100 ++++ allegro-4.2.2/src/i386/icpus.s 2008-03-20 15:11:46.000000000 +0100 +@@ -67,7 +67,7 @@ FUNC(_i_is_fpu) + + fninit + movl $0x5A5A, %eax +- fnstsw %eax ++ fnstsw %ax + cmpl $0, %eax + jne is_fpu_not_found + diff --git a/allegro.spec b/allegro.spec index 276ba76..2aa0418 100644 --- a/allegro.spec +++ b/allegro.spec @@ -1,6 +1,6 @@ Name: allegro Version: 4.2.2 -Release: 7%{?dist} +Release: 10%{?dist} Summary: A game programming library Summary(es): Una libreria de programacion de juegos @@ -20,6 +20,7 @@ Patch5: allegro-4.2.1-noexecmod.patch Patch6: allegro-4.0.3-libdir.patch Patch7: allegro-4.2.2-pulseaudio.patch Patch8: allegro-4.2.2-gcc43.patch +Patch9: allegro-4.2.2-gcc43-asm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: esound-devel, texinfo, perl, arts-devel, glib2-devel BuildRequires: xorg-x11-proto-devel, libX11-devel, libXext-devel, libXt-devel @@ -58,6 +59,7 @@ Summary(fr): Une librairie de programmation de jeux Summary(it): Una libreria per la programmazione di videogiochi Summary(cs): Knihovna pro programování her Group: Development/Libraries +Provides: %{name}-static = %{version}-%{release} Requires: %{name} = %{version}-%{release}, xorg-x11-proto-devel Requires: libX11-devel, libXcursor-devel Requires(post): /sbin/install-info @@ -163,6 +165,7 @@ sound through JACK (Jack Audio Connection Kit). %patch6 -p1 -z .multilib2 %patch7 -p1 -z .pulse %patch8 -p1 -z .gcc43 +%patch9 -p1 -z .gcc43-asm iconv -f iso-8859-1 -t utf-8 docs/src/allegro._tx > docs/src/allegro._tx.tmp mv docs/src/allegro._tx.tmp docs/src/allegro._tx @@ -174,12 +177,12 @@ mv docs/src/allegro._tx.tmp docs/src/allegro._tx %endif --enable-svgalib=no \ --enable-dbglib=yes \ - --enable-proflib=yes -%ifnarch %{ix86} -make CFLAGS="$RPM_OPT_FLAGS -DALLEGRO_USE_C -I%{_includedir}/kde/artsc" -%else -make CFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/kde/artsc" -%endif + --enable-proflib=yes \ + --enable-opts=generic +# GRRR configure insists on adding -fomit-frame-pointer, remove it +sed -i 's/-fomit-frame-pointer//g' makefile +# Explicitly set PROG_LDFLAGS to avoid stripping of the utilities +make CFLAGS="$RPM_OPT_FLAGS" PROG_LDFLAGS="-Wl,--export-dynamic" %install @@ -291,6 +294,19 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 5 2008 Hans de Goede 4.2.2-10 +- Look for /etc/timidity.cfg instead of /usr/share/timidity/timidity.cfg, + as the latter is no longer available now that Fedora has switched from + timidity++-patches to PersonalCopy-Lite-patches + +* Tue Apr 1 2008 Hans de Goede 4.2.2-9 +- Fix i386 asm code compilation with latest binutils +- Remove -fomit-frame-pointer from the compile flags of the default build, so + that we get a usefull debuginfo even for the normal (non debug/profile) lib + +* Tue Feb 19 2008 Fedora Release Engineering - 4.2.2-8 +- Autorebuild for GCC 4.3 + * Mon Jan 21 2008 Hans de Goede 4.2.2-7 - Add makedoc utility to allegro-devel as allegro-makedoc (bz 429450) - Fix sound when using pulseaudio From 2131cea1d0b5696f18145bcd5aa0ae506d1208eb Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:26:22 +0000 Subject: [PATCH 4/5] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 81f193b..70f7724 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: allegro -# $Id: Makefile,v 1.1 2004/11/08 04:00:59 cvsextras Exp $ +# $Id: Makefile,v 1.2 2004/11/24 03:09:37 gafton Exp $ NAME := allegro 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 $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +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)) From a9b5151f12b3484077aaefdde07d10db9335b04f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 09:42:40 +0000 Subject: [PATCH 5/5] 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 70f7724..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: allegro -# $Id: Makefile,v 1.2 2004/11/24 03:09:37 gafton Exp $ -NAME := allegro -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 e9e7ccd..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-8