diff --git a/.cvsignore b/.cvsignore index b3e944d..df13320 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -allegro-4.2.0.tar.gz -allegro-4.2.1.tar.gz +allegro-4.2.2.tar.gz diff --git a/allegro-4.0.3-libdir.patch b/allegro-4.0.3-libdir.patch index 3672a83..051555f 100644 --- a/allegro-4.0.3-libdir.patch +++ b/allegro-4.0.3-libdir.patch @@ -1,16 +1,19 @@ ---- allegro-4.2.0/misc/allegro-config.in.libdir 2005-11-05 17:40:11.000000000 +0100 -+++ allegro-4.2.0/misc/allegro-config.in 2006-10-15 18:38:46.000000000 +0200 -@@ -15,13 +15,21 @@ - exec_prefix=$prefix +diff -up allegro-4.2.2/misc/allegro-config.in.multilib2 allegro-4.2.2/misc/allegro-config.in +--- allegro-4.2.2/misc/allegro-config.in.multilib2 2007-07-22 09:45:47.000000000 +0200 ++++ allegro-4.2.2/misc/allegro-config.in 2007-07-24 21:27:21.000000000 +0200 +@@ -16,15 +16,22 @@ exec_prefix=$prefix exec_prefix_set=no include_prefix=@INCLUDE_PREFIX@ + include_path=@includedir@ +-lib_path=@libdir@ + bin_path=@bindir@ +arch=$(/bin/arch) +if [ "$arch" = "x86_64" -o "$arch" = "s390x" -o "$arch" = "ppc64" \ + -o "$arch" = "ia64" ]; +then -+ libdir="/usr/lib64" ++ lib_path="/usr/lib64" +else -+ libdir="/usr/lib" ++ lib_path="/usr/lib" +fi static_libs=@LINK_WITH_STATIC_LIBS@ @@ -23,23 +26,3 @@ allegro_libs="@LIBS@" allegro_frameworks="@FRAMEWORKS@" allegro_cflags="" -@@ -178,7 +186,7 @@ - fi - - if test "$echo_libs" = "yes"; then -- libdirs=-L${exec_prefix}/lib -+ libdirs=-L${libdir} - if test "$static_libs" = "yes"; then - echo $libdirs $allegro_ldflags -l${lib_type} $allegro_libs - else -@@ -192,8 +200,8 @@ - - if test "$echo_env" = "yes"; then - echo "export PATH=\$PATH:$prefix/bin" -- echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$prefix/lib" -- echo "export LIBRARY_PATH=\$LIBRARY_PATH:$prefix/lib" -+ echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$libdir" -+ echo "export LIBRARY_PATH=\$LIBRARY_PATH:$libdir" - echo "export C_INCLUDE_PATH=\$C_INCLUDE_PATH:$prefix/include" - echo "export CPLUS_INCLUDE_PATH=\$CPLUS_INCLUDE_PATH:$prefix/include" - echo "export OBJC_INCLUDE_PATH=\$OBJC_INCLUDE_PATH:$prefix/include" diff --git a/allegro-4.2.0-multilib.patch b/allegro-4.2.0-multilib.patch index 0c0507e..26e786b 100644 --- a/allegro-4.2.0-multilib.patch +++ b/allegro-4.2.0-multilib.patch @@ -1,16 +1,7 @@ ---- allegro-4.2.0/include/allegro/platform/alunixac.hin~ 2006-10-15 18:45:00.000000000 +0200 -+++ allegro-4.2.0/include/allegro/platform/alunixac.hin 2006-10-15 18:45:00.000000000 +0200 -@@ -49,19 +49,25 @@ - #undef ALLEGRO_LINUX_VBEAF - - /* Define to enable Linux console VGA driver. */ --#undef ALLEGRO_LINUX_VGA -+#ifdef __i386__ -+#define ALLEGRO_LINUX_VGA -+#endif - - /* Define if target machine is little endian. */ - #undef ALLEGRO_LITTLE_ENDIAN +--- allegro-4.2.2/include/allegro/platform/alunixac.hin.multilib 2007-07-15 06:28:15.000000000 +0200 ++++ allegro-4.2.2/include/allegro/platform/alunixac.hin 2007-07-23 12:36:16.000000000 +0200 +@@ -59,10 +59,14 @@ + #undef ALLEGRO_ASM_PREFIX /* Define if assembler supports MMX. */ -#undef ALLEGRO_MMX @@ -18,14 +9,22 @@ +#define ALLEGRO_MMX +#endif - /* Define for Unix platforms, to use C convention for bank switching. */ - #undef ALLEGRO_NO_ASM - /* Define if assembler supports SSE. */ -#undef ALLEGRO_SSE +#ifdef __i386__ +#define ALLEGRO_SSE +#endif - /* Define if constructor attribute is supported. */ - #undef ALLEGRO_USE_CONSTRUCTOR + /* Define if target platform is Darwin. */ + #undef ALLEGRO_DARWIN +@@ -120,7 +124,9 @@ + #undef ALLEGRO_LINUX_VBEAF + + /* Define to enable Linux console VGA driver. */ +-#undef ALLEGRO_LINUX_VGA ++#ifdef __i386__ ++#define ALLEGRO_LINUX_VGA ++#endif + + /*---------------------------------------------------------------------------*/ + 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 ad5e8ab..276ba76 100644 --- a/allegro.spec +++ b/allegro.spec @@ -1,29 +1,31 @@ Name: allegro -Version: 4.2.1 -Release: 2%{?dist} +Version: 4.2.2 +Release: 7%{?dist} Summary: A game programming library Summary(es): Una libreria de programacion de juegos Summary(fr): Une librairie de programmation de jeux Summary(it): Una libreria per la programmazione di videogiochi -Summary(cz): Knihovna pro programování her +Summary(cs): Knihovna pro programování her Group: System Environment/Libraries License: Giftware URL: http://alleg.sourceforge.net/ -Source: http://download.sourceforge.net/alleg/allegro-%{version}.tar.gz -Patch1: allegro-4.0.3-libdir.patch -Patch2: allegro-4.0.3-cfg.patch -Patch3: allegro-4.2.0-nostrip.patch -Patch4: allegro-4.2.0-noexecstack.patch -Patch5: allegro-4.2.0-multilib.patch -Patch6: allegro-4.2.1-noexecmod.patch +Source: http://downloads.sourceforge.net/alleg/allegro-%{version}.tar.gz +Patch1: allegro-4.0.3-cfg.patch +Patch2: allegro-4.2.0-nostrip.patch +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 +BuildRequires: esound-devel, texinfo, perl, arts-devel, glib2-devel BuildRequires: xorg-x11-proto-devel, libX11-devel, libXext-devel, libXt-devel BuildRequires: libXpm-devel, libXcursor-devel, libXxf86vm-devel -BuildRequires: libXxf86dga-devel, autoconf -Requires: timidity++ +BuildRequires: libXxf86dga-devel, jack-audio-connection-kit-devel, autoconf +Requires: timidity++-patches %ifarch %{ix86} Requires(post): policycoreutils /sbin/ldconfig Requires(postun): policycoreutils /sbin/ldconfig @@ -54,7 +56,7 @@ Summary: A game programming library Summary(es): Una libreria de programacion de juegos Summary(fr): Une librairie de programmation de jeux Summary(it): Una libreria per la programmazione di videogiochi -Summary(cz): Knihovna pro programování her +Summary(cs): Knihovna pro programování her Group: Development/Libraries Requires: %{name} = %{version}-%{release}, xorg-x11-proto-devel Requires: libX11-devel, libXcursor-devel @@ -91,7 +93,7 @@ Summary: Extra tools for the Allegro programming library Summary(es): Herramientas adicionales para la librería de programación Allegro Summary(fr): Outils supplémentaires pour la librairie de programmation Allegro Summary(it): Programmi di utilità aggiuntivi per la libreria Allegro -Summary(cz): Přídavné nástroje pro programovou knihovnu Allegro +Summary(cs): Přídavné nástroje pro programovou knihovnu Allegro Group: Development/Tools Requires: %{name} = %{version}-%{release} @@ -123,15 +125,46 @@ Allegro je multiplatformní knihovna pro počítačové hry a jiné typy multimediálního programování. Tento balíček obsahuje přídavné nástroje, které jsou užitečné pro vývoj Allegro programů. +%package esound-plugin +Summary: Allegro Enlightened Sound Daemon plugin +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} + +%description esound-plugin +This package contains a plugin for Allegro which enables Allegro to playback +sound through the Enlightened Sound Daemon (ESD / esound). + +%package arts-plugin +Summary: Allegro aRts (analog realtime synthesizer) plugin +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} + +%description arts-plugin +This package contains a plugin for Allegro which enables Allegro to playback +sound through aRts (analog realtime synthesizer). + +%package jack-plugin +Summary: Allegro JACK (Jack Audio Connection Kit) plugin +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} + +%description jack-plugin +This package contains a plugin for Allegro which enables Allegro to playback +sound through JACK (Jack Audio Connection Kit). + %prep %setup -q -%patch1 -p1 -b .libdir -%patch2 -p1 -b .config -%patch3 -p1 -z .nostrip -%patch4 -p1 -z .noexecstack -%patch5 -p1 -z .multilib -%patch6 -p1 -z .noexecmod +%patch1 -p1 -b .config +%patch2 -p1 -z .nostrip +%patch3 -p1 -z .noexecstack +%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 %build @@ -153,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 @@ -169,7 +203,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/liball{p,d}_unsharable.a semanage fcontext -a -t textrel_shlib_t \ '%{_libdir}/allegro/4\.2\.1/alleg-vga\.so' 2>/dev/null || : # Actually change the context -chcon -t textrel_shlib_t %{_libdir}/allegro/%{version}/alleg-vga.so || : +chcon -t textrel_shlib_t %{_libdir}/allegro/%{version}/alleg-vga.so \ + 2> /dev/null || : %else %post -p /sbin/ldconfig %endif @@ -208,6 +243,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/liballeg*.so* %{_libdir}/allegro %{_datadir}/allegro +%exclude %{_libdir}/allegro/%{version}/alleg-esddigi.so +%exclude %{_libdir}/allegro/%{version}/alleg-artsdigi.so +%exclude %{_libdir}/allegro/%{version}/alleg-jackdigi.so %files devel %defattr(-,root,root,-) @@ -216,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 @@ -238,8 +277,57 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/rgbmap %{_bindir}/textconv +%files esound-plugin +%defattr(-,root,root,-) +%{_libdir}/allegro/%{version}/alleg-esddigi.so + +%files arts-plugin +%defattr(-,root,root,-) +%{_libdir}/allegro/%{version}/alleg-artsdigi.so + +%files jack-plugin +%defattr(-,root,root,-) +%{_libdir}/allegro/%{version}/alleg-jackdigi.so + %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 +- Add BuildRequires: glib2-devel to workaround RH bug 331841 + +* Wed Aug 22 2007 Hans de Goede 4.2.2-5 +- Update to pristine upstream sources instead of using allegro.cc pre-release + +* Tue Aug 21 2007 Hans de Goede 4.2.2-4 +- Rebuild for buildId + +* Sun Aug 12 2007 Hans de Goede 4.2.2-3 +- Enable building of JACK (Jack Audio Connection Kit) sound output plugin +- Put non default sound output plugins in their own subpackage to avoid + dragging in unwanted deps (allegro-esound-plugin, allegro-arts-plugin, + allegro-jack-plugin) (bz 250736) +- Make man pages and info file UTF-8 + +* Tue Jul 24 2007 Hans de Goede 4.2.2-2 +- sync .libdir patch to 4.2.2 and use it again for multilib devel goodness + (make allegro-devel i386 and x86_64 parallel installable again) + +* Mon Jul 23 2007 Jindrich Novy 4.2.2-1 +- update to 4.2.2 +- drop .libdir patch +- sync .multilib patch + +* Fri Jul 6 2007 Hans de Goede 4.2.1-3 +- Silence output of chcon command in %%post, because otherwise users get this: + "chcon: can't apply partial context to unlabeled file" when installing with + selinux disabled (bz 246820) + * Fri Dec 22 2006 Hans de Goede 4.2.1-2 - Restore multilib devel goodness patch (make allegro-devel i386 and x86_64 parallel installable) diff --git a/sources b/sources index 00c03d0..94e57de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0a09d0144ee8652fb8fa00f6cbb324fe allegro-4.2.1.tar.gz +87ffb1def034e0ec29a9ad4a595cda7e allegro-4.2.2.tar.gz