diff --git a/.gitignore b/.gitignore index f3eb88d..3976a2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -allegro-4.2.0.tar.gz +allegro-4.2.3.tar.gz +/allegro-4.4.2.tar.gz +/allegro-4.4.3.tar.gz +/allegro-4.4.3.1.tar.gz 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.0.3-libdir.patch b/allegro-4.0.3-libdir.patch index 3672a83..f9b7983 100644 --- a/allegro-4.0.3-libdir.patch +++ b/allegro-4.0.3-libdir.patch @@ -1,45 +1,20 @@ ---- 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.4.2/misc/allegro-config.in~ allegro-4.4.2/misc/allegro-config.in +--- allegro-4.4.2/misc/allegro-config.in~ 2010-03-03 11:22:34.000000000 +0100 ++++ allegro-4.4.2/misc/allegro-config.in 2011-07-12 10:42:05.231457514 +0200 +@@ -19,8 +19,15 @@ exec_prefix=$prefix exec_prefix_set=no include_prefix=@INCLUDE_PREFIX@ + include_path=${prefix}/include +-lib_path=${exec_prefix}/lib@LIB_SUFFIX@ + bin_path=${exec_prefix}/bin +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@ lib_type=@LIB_TO_LINK@ - - accepts_frameworks=no - --allegro_ldflags="@LDFLAGS@" -+allegro_ldflags="-Wl,--export-dynamic " - 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-64bit.patch b/allegro-4.2.0-64bit.patch deleted file mode 100644 index 8967f2f..0000000 --- a/allegro-4.2.0-64bit.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- allegro-4.2.0/src/unix/umodules.c.64bit 2006-02-26 14:43:37.000000000 +0100 -+++ allegro-4.2.0/src/unix/umodules.c 2006-02-26 14:44:26.000000000 +0100 -@@ -44,7 +44,12 @@ - /* where to look for modules.lst */ - static char *module_path[] = - { -- "/usr/local/lib/allegro/", "/usr/lib/allegro/", NULL -+#ifdef __LP64__ -+ "/usr/lib64/allegro/", -+#else -+ "/usr/lib/allegro/", -+#endif -+ NULL - }; - - diff --git a/allegro-4.2.0-alsa-big-endian.patch b/allegro-4.2.0-alsa-big-endian.patch deleted file mode 100644 index 680539c..0000000 --- a/allegro-4.2.0-alsa-big-endian.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- allegro-4.2.0/src/unix/alsa9.c~ 2006-02-26 09:11:32.000000000 +0100 -+++ allegro-4.2.0/src/unix/alsa9.c 2006-02-26 09:11:32.000000000 +0100 -@@ -361,7 +361,7 @@ - alsa_bits = 8; - break; - -- case SND_PCM_FORMAT_U16_LE: -+ case SND_PCM_FORMAT_U16_NE: - if (sizeof(short) != 2) { - ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format")); - goto Error; diff --git a/allegro-4.2.0-digmid.patch b/allegro-4.2.0-digmid.patch deleted file mode 100644 index 7c0fc66..0000000 --- a/allegro-4.2.0-digmid.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- allegro-4.2.0/src/digmid.c.digmid 2004-09-03 11:30:22.000000000 +0200 -+++ allegro-4.2.0/src/digmid.c 2006-02-01 16:35:03.000000000 +0100 -@@ -519,7 +519,7 @@ - { - PACKFILE *f; - char dir[1024], file[1024], buf[1024], filename[1024]; -- char todo[256][32]; -+ char todo[256][1024]; - char *argv[16], *p; - char tmp[128]; - int argc; -@@ -679,8 +679,11 @@ - /* read from regular disk files */ - for (i=0; i<256; i++) { - if (ugetc(todo[i])) { -- ustrzcpy(filename, sizeof(filename), dir); -- ustrzcat(filename, sizeof(filename), todo[i]); -+ if (is_relative_filename(todo[i])) { -+ ustrzcpy(filename, sizeof(filename), dir); -+ ustrzcat(filename, sizeof(filename), todo[i]); -+ } else -+ ustrzcpy(filename, sizeof(filename), todo[i]); - - if (ugetc(get_extension(filename)) == 0) - ustrzcat(filename, sizeof(filename), uconvert_ascii(".pat", tmp)); diff --git a/allegro-4.2.0-fullscreen.patch b/allegro-4.2.0-fullscreen.patch deleted file mode 100644 index 9bb978d..0000000 --- a/allegro-4.2.0-fullscreen.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff -ur allegro-4.2.0.orig/include/allegro/platform/aintunix.h allegro-4.2.0/include/allegro/platform/aintunix.h ---- allegro-4.2.0.orig/include/allegro/platform/aintunix.h 2005-09-04 18:00:07.000000000 +0200 -+++ allegro-4.2.0/include/allegro/platform/aintunix.h 2006-03-02 14:50:17.000000000 +0100 -@@ -88,7 +88,11 @@ - - AL_FUNC(void, _xwin_handle_input, (void)); - AL_FUNC(void, _xwin_private_handle_input, (void)); -- -+ AL_FUNC(int , _xwin_keyboard_init, (void)); -+ AL_FUNC(void, _xwin_keyboard_exit, (void)); -+ -+ AL_VAR(int, _xwin_keyboard_installed); -+ - #ifndef ALLEGRO_MULTITHREADED - - AL_VAR(int, _xwin_missed_input); -Only in allegro-4.2.0/include/allegro/platform: aintunix.h~ -diff -ur allegro-4.2.0.orig/include/xalleg.h allegro-4.2.0/include/xalleg.h ---- allegro-4.2.0.orig/include/xalleg.h 2004-12-02 02:02:31.000000000 +0100 -+++ allegro-4.2.0/include/xalleg.h 2006-03-02 14:42:58.000000000 +0100 -@@ -126,6 +126,7 @@ - int num_modes; - int mode_switched; - int override_redirected; -+ int window_used; - #endif - - char window_title[1024]; -Only in allegro-4.2.0/include: xalleg.h~ -diff -ur allegro-4.2.0.orig/src/x/xkeyboard.c allegro-4.2.0/src/x/xkeyboard.c ---- allegro-4.2.0.orig/src/x/xkeyboard.c 2005-11-05 17:06:53.000000000 +0100 -+++ allegro-4.2.0/src/x/xkeyboard.c 2006-03-02 14:50:19.000000000 +0100 -@@ -34,12 +34,12 @@ - #define PREFIX_W "al-xkey WARNING: " - #define PREFIX_E "al-xkey ERROR: " - -+int _xwin_keyboard_installed = 0; - #ifdef ALLEGRO_USE_XIM - static XIM xim = NULL; - static XIC xic = NULL; - #endif - static XModifierKeymap *xmodmap = NULL; --static int xkeyboard_installed = 0; - static int used[KEY_MAX]; - static int sym_per_key; - static int min_keycode, max_keycode; -@@ -365,7 +365,7 @@ - void _xwin_keyboard_handler(XKeyEvent *event, int dga2_hack) - { - int keycode; -- if (!xkeyboard_installed) -+ if (!_xwin_keyboard_installed) - return; - - if (_xwin_keyboard_callback) -@@ -646,7 +646,7 @@ - { - XKeyboardControl values; - -- if (!xkeyboard_installed) -+ if (!_xwin_keyboard_installed) - return; - - XLOCK(); -@@ -668,10 +668,10 @@ - - - --/* x_keyboard_init -+/* _xwin_keyboard_init - * Initialise the X11 keyboard driver. - */ --static int x_keyboard_init(void) -+int _xwin_keyboard_init(void) - { - #ifdef ALLEGRO_USE_XIM - XIMStyles *xim_styles; -@@ -680,7 +680,7 @@ - int i; - #endif - -- if (xkeyboard_installed) -+ if (_xwin_keyboard_installed) - return 0; - - main_pid = getpid(); -@@ -745,21 +745,21 @@ - - XUNLOCK (); - -- xkeyboard_installed = 1; -+ _xwin_keyboard_installed = 1; - - return 0; - } - - - --/* x_keyboard_exit -+/* _xwin_keyboard_exit - * Shut down the X11 keyboard driver. - */ --static void x_keyboard_exit(void) -+void _xwin_keyboard_exit(void) - { -- if (!xkeyboard_installed) -+ if (!_xwin_keyboard_installed) - return; -- xkeyboard_installed = 0; -+ _xwin_keyboard_installed = 0; - - XLOCK (); - -@@ -799,8 +799,8 @@ - "X11 keyboard", - "X11 keyboard", - FALSE, -- x_keyboard_init, -- x_keyboard_exit, -+ _xwin_keyboard_init, -+ _xwin_keyboard_exit, - NULL, // AL_METHOD(void, poll, (void)); - x_set_leds, - NULL, // AL_METHOD(void, set_rate, (int delay, int rate)); -Only in allegro-4.2.0/src/x: xkeyboard.c~ -diff -ur allegro-4.2.0.orig/src/x/xwin.c allegro-4.2.0/src/x/xwin.c ---- allegro-4.2.0.orig/src/x/xwin.c 2005-10-27 23:23:40.000000000 +0200 -+++ allegro-4.2.0/src/x/xwin.c 2006-03-02 14:48:00.000000000 +0100 -@@ -130,6 +130,7 @@ - 0, /* num_modes */ - 0, /* mode_switched */ - 0, /* override_redirected */ -+ 0, /* window_used */ - #endif - - XWIN_DEFAULT_WINDOW_TITLE, /* window_title */ -@@ -322,20 +323,13 @@ - } - } - -- -- --/* _xwin_hide_x_mouse: -- * Create invisible X cursor -+/* _xwin_free_cursor: -+ * Helper for freeing the cursor which is done in a number of different places. - */ --static void _xwin_hide_x_mouse(void) -+static void _xwin_free_cursor(void) - { -- unsigned long gcmask; -- XGCValues gcvalues; -- Pixmap pixmap; -- -- XUndefineCursor(_xwin.display, _xwin.window); -- - if (_xwin.cursor != None) { -+ XUndefineCursor(_xwin.display, _xwin.window); - XFreeCursor(_xwin.display, _xwin.cursor); - _xwin.cursor = None; - } -@@ -346,7 +340,19 @@ - _xwin.xcursor_image = None; - } - #endif -+} - -+/* _xwin_hide_x_mouse: -+ * Create invisible X cursor -+ */ -+static void _xwin_hide_x_mouse(void) -+{ -+ unsigned long gcmask; -+ XGCValues gcvalues; -+ Pixmap pixmap; -+ -+ _xwin_free_cursor(); -+ - pixmap = XCreatePixmap(_xwin.display, _xwin.window, 1, 1, 1); - if (pixmap != None) { - GC temp_gc; -@@ -462,20 +468,7 @@ - static void _xwin_private_destroy_window(void) - { - _xwin_private_destroy_screen(); -- -- if (_xwin.cursor != None) { -- XUndefineCursor(_xwin.display, _xwin.window); -- XFreeCursor(_xwin.display, _xwin.cursor); -- _xwin.cursor = None; -- } -- --#ifdef ALLEGRO_XWINDOWS_WITH_XCURSOR -- if (_xwin.xcursor_image != None) { -- XcursorImageDestroy(_xwin.xcursor_image); -- _xwin.xcursor_image = None; -- } --#endif -- -+ _xwin_free_cursor(); - _xwin.visual = 0; - - if (_xwin.gc != None) { -@@ -673,10 +666,6 @@ - static BITMAP *_xwin_private_create_screen(GFX_DRIVER *drv, int w, int h, - int vw, int vh, int depth, int fullscreen) - { --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -- XSetWindowAttributes setattr; --#endif -- - if (_xwin.window == None) { - ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("No window")); - return 0; -@@ -715,11 +704,50 @@ - #ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - /* If we are going fullscreen, disable window decorations. */ - if (fullscreen) { -+ XSetWindowAttributes setattr; -+ -+ /* HACK HACK HACK -+ We need to destroy the window if it has already been used once, -+ since doing fullscreen with a window wich has been mapped already -+ has issues. see: http:// mail not archived yet */ -+ if (_xwin.window_used) { -+ /* remember if the keyboard was installed */ -+ int keyb_installed = _xwin_keyboard_installed; -+ -+ /* remember the cursor and set the cursor to None so that the -+ remembered cursor does not get freed. */ -+ Cursor cursor = _xwin.cursor; -+#ifdef ALLEGRO_XWINDOWS_WITH_XCURSOR -+ XcursorImage *xcursor_image = _xwin.xcursor_image; -+ _xwin.xcursor_image = None; -+#endif -+ _xwin.cursor = None; -+ -+ /* close keyboard & window, then recreate both */ -+ _xwin_keyboard_exit(); -+ _xwin_private_destroy_window(); -+ if ((*_xwin_window_creator)()) { -+ ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Could not create window")); -+ return 0; -+ } -+ if (keyb_installed) -+ /* has a return value but can't fail */ -+ _xwin_keyboard_init(); -+ -+ /* Free the new cursor and put the old one back */ -+ _xwin_free_cursor(); -+ _xwin.cursor = cursor; -+#ifdef ALLEGRO_XWINDOWS_WITH_XCURSOR -+ _xwin.xcursor_image = xcursor_image; -+#endif -+ XDefineCursor(_xwin.display, _xwin.window, _xwin.cursor); -+ } - setattr.override_redirect = True; - XChangeWindowAttributes(_xwin.display, _xwin.window, - CWOverrideRedirect, &setattr); - _xwin.override_redirected = 1; - } -+ _xwin.window_used = 1; - #endif - - /* Set window size and save dimensions. */ -Only in allegro-4.2.0/src/x: xwin.c~ diff --git a/allegro-4.2.0-fullscreen2.patch b/allegro-4.2.0-fullscreen2.patch deleted file mode 100644 index 6d5ec63..0000000 --- a/allegro-4.2.0-fullscreen2.patch +++ /dev/null @@ -1,781 +0,0 @@ ---- allegro-4.2.0/include/xalleg.h.fullscreen 2004-12-02 02:02:31.000000000 +0100 -+++ allegro-4.2.0/include/xalleg.h 2006-03-03 23:10:18.000000000 +0100 -@@ -124,8 +124,8 @@ - #ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - XF86VidModeModeInfo **modesinfo; - int num_modes; -- int mode_switched; -- int override_redirected; -+ int mode_switched; /* only kept around and set for ABI compat */ -+ int override_redirected; /* no longer used, kept for ABI compat */ - #endif - - char window_title[1024]; -@@ -139,6 +139,18 @@ - #endif - - void (*close_button_callback)(void); -+ -+ /* These are at the end of the struct to maintain abi compat with -+ allegro-4.2.0 (if and only if compiled with the same configuration). -+ Notice that IMHO apps really shouldnot be using _xwin, but we export it, -+ so its fair game. */ -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+ XF86VidModeModeInfo *orig_modeinfo; -+#endif -+ /* Seperate fullscreen and managed window id's, see -+ _xwin_private_create_window in src/x/xwin.c for more details. */ -+ Window fs_window; -+ Window wm_window; - } _xwin; - - ---- allegro-4.2.0/src/x/xwin.c.fullscreen 2005-10-27 23:23:40.000000000 +0200 -+++ allegro-4.2.0/src/x/xwin.c 2006-03-03 23:52:22.000000000 +0100 -@@ -142,7 +142,12 @@ - NULL, /* mutex */ - #endif - -- NULL /* window close hook */ -+ NULL, /* window close hook */ -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+ 0, /* orig_modeinfo */ -+#endif -+ None, /* fs_window */ -+ None /* wm_window */ - }; - - void *allegro_icon = alex_xpm; -@@ -199,7 +204,6 @@ - static void _xwin_private_set_palette_range(AL_CONST PALETTE p, int from, int to); - static void _xwin_private_set_window_defaults(void); - static void _xwin_private_flush_buffers(void); --static void _xwin_private_resize_window(int w, int h); - static void _xwin_private_process_event(XEvent *event); - static void _xwin_private_set_warped_mouse_mode(int permanent); - static void _xwin_private_redraw_window(int x, int y, int w, int h); -@@ -261,7 +265,8 @@ - static void _xwin_private_slow_palette_32(int sx, int sy, int sw, int sh); - - #ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE --static int _xvidmode_private_set_fullscreen(int w, int h); -+static void _xvidmode_private_set_fullscreen(int w, int h, int *vidmode_width, -+ int *vidmode_height); - static void _xvidmode_private_unset_fullscreen(void); - #endif - -@@ -372,10 +377,31 @@ - } - } - -- -+/* _xwin_wait_mapped: -+ * wait for a window to become mapped. (shamelessly borrowed from SDL) -+ */ -+static void _xwin_wait_mapped(Window win) -+{ -+ XEvent event; -+ do { -+ XMaskEvent(_xwin.display, StructureNotifyMask, &event); -+ } while ( (event.type != MapNotify) || (event.xmap.event != win) ); -+} - - /* _xwin_create_window: -- * Wrapper for XCreateWindow. -+ * We use 3 windows: -+ * -fs_window (for fullscreen) -+ * -wm_window (window managed) -+ * -window (the real window) -+ * 2 of which will be created here: wm_window and window. The fullscreen -+ * window gets (re)created when needed, because reusing it causes trouble see: -+ * http://sourceforge.net/tracker/index.php?func=detail&aid=1441740&group_id=5665&atid=105665 -+ * The real window uses wm_window as parent initially and will be reparened to -+ * the (freshly created) fullscreen window when requested and reparented -+ * back again in screen_destroy. -+ * -+ * Idea / concept of 3 windows borrowed from SDL. But somehow SDL manages -+ * to reuse the fullscreen window too. - */ - static int _xwin_private_create_window(void) - { -@@ -389,21 +415,23 @@ - - _mouse_on = FALSE; - -- /* Create window. */ -+ /* Create the managed window. */ -+ setattr.background_pixel = XBlackPixel(_xwin.display, _xwin.screen); - setattr.border_pixel = XBlackPixel(_xwin.display, _xwin.screen); -- setattr.event_mask = (KeyPressMask | KeyReleaseMask -+ setattr.event_mask = (KeyPressMask | KeyReleaseMask | StructureNotifyMask - | EnterWindowMask | LeaveWindowMask - | FocusChangeMask | ExposureMask | PropertyChangeMask - | ButtonPressMask | ButtonReleaseMask | PointerMotionMask - /*| MappingNotifyMask (SubstructureRedirectMask?)*/); -- _xwin.window = XCreateWindow(_xwin.display, XDefaultRootWindow(_xwin.display), -+ _xwin.wm_window = XCreateWindow(_xwin.display, -+ XDefaultRootWindow(_xwin.display), - 0, 0, 320, 200, 0, - CopyFromParent, InputOutput, CopyFromParent, -- CWBorderPixel | CWEventMask, &setattr); -- -+ CWBackPixel | CWBorderPixel | CWEventMask, -+ &setattr); - - /* Get associated visual and window depth (bits per pixel). */ -- XGetWindowAttributes(_xwin.display, _xwin.window, &getattr); -+ XGetWindowAttributes(_xwin.display, _xwin.wm_window, &getattr); - _xwin.visual = getattr.visual; - _xwin.window_depth = getattr.depth; - -@@ -411,15 +439,27 @@ - if ((_xwin.visual->class == PseudoColor) - || (_xwin.visual->class == GrayScale) - || (_xwin.visual->class == DirectColor)) -- _xwin.colormap = XCreateColormap(_xwin.display, _xwin.window, _xwin.visual, AllocAll); -+ _xwin.colormap = XCreateColormap(_xwin.display, _xwin.wm_window, _xwin.visual, AllocAll); - else -- _xwin.colormap = XCreateColormap(_xwin.display, _xwin.window, _xwin.visual, AllocNone); -- XSetWindowColormap(_xwin.display, _xwin.window, _xwin.colormap); -+ _xwin.colormap = XCreateColormap(_xwin.display, _xwin.wm_window, _xwin.visual, AllocNone); -+ XSetWindowColormap(_xwin.display, _xwin.wm_window, _xwin.colormap); - XInstallColormap(_xwin.display, _xwin.colormap); -+ -+ /* Create the real / drawing window (reuses setattr). */ -+ setattr.colormap = _xwin.colormap; -+ _xwin.window = XCreateWindow(_xwin.display, -+ _xwin.wm_window, -+ 0, 0, 320, 200, 0, -+ CopyFromParent, InputOutput, CopyFromParent, -+ CWBackPixel | CWBorderPixel | CWEventMask | -+ CWColormap, &setattr); - -+ /* Map the real / drawing window it won't appear untill the parent does */ -+ XMapWindow(_xwin.display, _xwin.window); -+ - /* Set WM_DELETE_WINDOW atom in WM_PROTOCOLS property (to get window_delete requests). */ - wm_delete_window = XInternAtom (_xwin.display, "WM_DELETE_WINDOW", False); -- XSetWMProtocols (_xwin.display, _xwin.window, &wm_delete_window, 1); -+ XSetWMProtocols (_xwin.display, _xwin.wm_window, &wm_delete_window, 1); - - /* Set default window parameters. */ - (*_xwin_window_defaultor)(); -@@ -494,6 +534,11 @@ - XDestroyWindow(_xwin.display, _xwin.window); - _xwin.window = None; - } -+ -+ if (_xwin.wm_window != None) { -+ XDestroyWindow(_xwin.display, _xwin.wm_window); -+ _xwin.wm_window = None; -+ } - } - - void _xwin_destroy_window(void) -@@ -673,10 +718,6 @@ - static BITMAP *_xwin_private_create_screen(GFX_DRIVER *drv, int w, int h, - int vw, int vh, int depth, int fullscreen) - { --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -- XSetWindowAttributes setattr; --#endif -- - if (_xwin.window == None) { - ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("No window")); - return 0; -@@ -711,55 +752,48 @@ - ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported color depth")); - return 0; - } -- --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -- /* If we are going fullscreen, disable window decorations. */ -- if (fullscreen) { -- setattr.override_redirect = True; -- XChangeWindowAttributes(_xwin.display, _xwin.window, -- CWOverrideRedirect, &setattr); -- _xwin.override_redirected = 1; -- } --#endif -- -- /* Set window size and save dimensions. */ -- _xwin_private_resize_window(w, h); -+ -+ /* Save dimensions. */ -+ _xwin.window_width = w; -+ _xwin.window_height = h; - _xwin.screen_width = w; - _xwin.screen_height = h; - _xwin.screen_depth = depth; - _xwin.virtual_width = vw; - _xwin.virtual_height = vh; - --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -- if (fullscreen) { -- AL_CONST char *fc; -- char tmp1[64], tmp2[128]; -- int i; -- -- /* Switch video mode. */ -- if (!_xvidmode_private_set_fullscreen(w, h)) { -- ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Can not set video mode")); -- return 0; -- } -+ /* Resize the (real) window */ -+ XResizeWindow(_xwin.display, _xwin.window, w, h); - -- /* Hack: make the window fully visible and center cursor. */ -- XMoveWindow(_xwin.display, _xwin.window, 0, 0); -- XF86VidModeSetViewPort(_xwin.display, _xwin.screen, 0, 0); -- -- /* This chunk is disabled by default because of problems on KDE desktops. */ -- fc = get_config_string(uconvert_ascii("graphics", tmp1), -- uconvert_ascii("force_centering", tmp2), -- NULL); -- -- if ((fc) && ((i = ugetc(fc)) != 0) && ((i == 'y') || (i == 'Y') || (i == '1'))) { -- XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, 0, 0); -- XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, w - 1, 0); -- XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, 0, h - 1); -- XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, w - 1, h - 1); -- } -+ if (fullscreen) { -+ XSetWindowAttributes setattr; -+ /* local width and height vars used for fullscreen window size and for -+ storing the video_mode size which is then used to center the window */ -+ int fs_width = DisplayWidth(_xwin.display, _xwin.screen); -+ int fs_height = DisplayHeight(_xwin.display, _xwin.screen); - -- XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, w / 2, h / 2); -- XSync(_xwin.display, False); -+ /* Create the fullscreen window */ -+ setattr.override_redirect = True; -+ setattr.background_pixel = XBlackPixel(_xwin.display, _xwin.screen); -+ setattr.border_pixel = XBlackPixel(_xwin.display, _xwin.screen); -+ setattr.event_mask = StructureNotifyMask; -+ setattr.colormap = _xwin.colormap; -+ _xwin.fs_window = XCreateWindow(_xwin.display, -+ XDefaultRootWindow(_xwin.display), -+ 0, 0, fs_width, fs_height, 0, -+ CopyFromParent, InputOutput, -+ CopyFromParent, CWOverrideRedirect | -+ CWBackPixel | CWColormap | CWBorderPixel | -+ CWEventMask, &setattr); -+ -+ /* Map the fullscreen window */ -+ XMapRaised(_xwin.display, _xwin.fs_window); -+ _xwin_wait_mapped(_xwin.fs_window); -+ /* Make sure we got to the top of the window stack */ -+ XRaiseWindow(_xwin.display, _xwin.fs_window); -+ -+ /* Reparent the real window */ -+ XReparentWindow(_xwin.display, _xwin.window, _xwin.fs_window, 0, 0); - - /* Grab the keyboard and mouse. */ - if (XGrabKeyboard(_xwin.display, XDefaultRootWindow(_xwin.display), False, -@@ -775,8 +809,45 @@ - return 0; - } - _xwin.mouse_grabbed = 1; -- } -+ -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+ /* Try to switch video mode. This must be done after the pointer is -+ grabbed, because otherwise it can be outside the window negating the -+ XF86VidModeSetViewPort done in set_fullscreen. This makes the old -+ center the window hack unnescesarry. Notice that since the XF86VM -+ extension requests do not go through the regular X output buffer? We -+ need to make sure that all above requests are processed first. */ -+ XSync(_xwin.display, False); -+ _xvidmode_private_set_fullscreen(w, h, &fs_width, &fs_height); - #endif -+ -+ /* Center the window (if nescesarry) */ -+ if ((fs_width != w) || (fs_height != h)) -+ XMoveWindow(_xwin.display, _xwin.window, (fs_width - w) / 2, -+ (fs_height - h) / 2); -+ -+ /* Last: center the cursor */ -+ XWarpPointer(_xwin.display, None, _xwin.window, 0, 0, 0, 0, w / 2, h / 2); -+ } else { -+ XSizeHints *hints = XAllocSizeHints();; -+ -+ /* Resize managed window. */ -+ XResizeWindow(_xwin.display, _xwin.wm_window, w, h); -+ -+ /* Set size and position hints for Window Manager. */ -+ if (hints) { -+ hints->flags = PMinSize | PMaxSize | PBaseSize; -+ hints->min_width = hints->max_width = hints->base_width = w; -+ hints->min_height = hints->max_height = hints->base_height = h; -+ XSetWMNormalHints(_xwin.display, _xwin.wm_window, hints); -+ -+ XFree(hints); -+ } -+ -+ /* Map the window managed window */ -+ XMapWindow(_xwin.display, _xwin.wm_window); -+ _xwin_wait_mapped(_xwin.wm_window); -+ } - - /* Create XImage with the size of virtual screen. */ - if (_xwin_private_create_ximage(vw, vh) != 0) { -@@ -804,12 +875,6 @@ - bmp = _xwin_private_create_screen(drv, w, h, vw, vh, depth, fullscreen); - if (bmp == 0) { - _xwin_private_destroy_screen(); -- /* Work around a weird bug with some window managers (KWin, Window Maker). */ -- if (fullscreen) { -- bmp = _xwin_private_create_screen(drv, w, h, vw, vh, depth, fullscreen); -- if (bmp == 0) -- _xwin_private_destroy_screen(); -- } - } - XUNLOCK(); - return bmp; -@@ -843,7 +908,6 @@ - - _xwin_private_destroy_ximage(); - --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - if (_xwin.mouse_grabbed) { - XUngrabPointer(_xwin.display, CurrentTime); - _xwin.mouse_grabbed = 0; -@@ -854,14 +918,8 @@ - _xwin.keyboard_grabbed = 0; - } - -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - _xvidmode_private_unset_fullscreen(); -- -- if (_xwin.override_redirected) { -- setattr.override_redirect = False; -- XChangeWindowAttributes(_xwin.display, _xwin.window, -- CWOverrideRedirect, &setattr); -- _xwin.override_redirected = 0; -- } - #endif - - /* whack color-conversion blitter */ -@@ -869,8 +927,16 @@ - _release_colorconv_blitter(blitter_func); - blitter_func = NULL; - } -- -- XUnmapWindow (_xwin.display, _xwin.window); -+ -+ if (_xwin.fs_window != None) { -+ /* Reparent the real window! */ -+ XReparentWindow(_xwin.display, _xwin.window, _xwin.wm_window, 0, 0); -+ XUnmapWindow(_xwin.display, _xwin.fs_window); -+ XDestroyWindow(_xwin.display, _xwin.fs_window); -+ _xwin.fs_window = None; -+ } -+ else -+ XUnmapWindow (_xwin.display, _xwin.wm_window); - - (*_xwin_window_defaultor)(); - } -@@ -2139,31 +2205,31 @@ - XpmAttributes attributes; - #endif - -- if (_xwin.window == None) -+ if (_xwin.wm_window == None) - return; - - /* Set window title. */ -- XStoreName(_xwin.display, _xwin.window, _xwin.window_title); -+ XStoreName(_xwin.display, _xwin.wm_window, _xwin.window_title); - - /* Set hints. */ - hint.res_name = _xwin.application_name; - hint.res_class = _xwin.application_class; -- XSetClassHint(_xwin.display, _xwin.window, &hint); -+ XSetClassHint(_xwin.display, _xwin.wm_window, &hint); - - wm_hints.flags = InputHint | StateHint | WindowGroupHint; - wm_hints.input = True; - wm_hints.initial_state = NormalState; -- wm_hints.window_group = _xwin.window; -+ wm_hints.window_group = _xwin.wm_window; - - #ifdef ALLEGRO_XWINDOWS_WITH_XPM - if (allegro_icon) { - wm_hints.flags |= IconPixmapHint | IconMaskHint; - attributes.valuemask = XpmReturnAllocPixels | XpmReturnExtensions; -- XpmCreatePixmapFromData(_xwin.display,_xwin.window,allegro_icon,&wm_hints.icon_pixmap,&wm_hints.icon_mask, &attributes); -+ XpmCreatePixmapFromData(_xwin.display,_xwin.wm_window,allegro_icon,&wm_hints.icon_pixmap,&wm_hints.icon_mask, &attributes); - } - #endif - -- XSetWMHints(_xwin.display, _xwin.window, &wm_hints); -+ XSetWMHints(_xwin.display, _xwin.wm_window, &wm_hints); - } - - -@@ -2213,41 +2279,6 @@ - } - - -- --/* _xwin_resize_window: -- * Wrapper for XResizeWindow. -- */ --static void _xwin_private_resize_window(int w, int h) --{ -- XSizeHints *hints; -- -- if (_xwin.window == None) -- return; -- -- /* New window size. */ -- _xwin.window_width = w; -- _xwin.window_height = h; -- -- /* Resize window. */ -- XUnmapWindow(_xwin.display, _xwin.window); -- XResizeWindow(_xwin.display, _xwin.window, w, h); -- XMapWindow(_xwin.display, _xwin.window); -- -- hints = XAllocSizeHints(); -- if (hints == 0) -- return; -- -- /* Set size and position hints for Window Manager. */ -- hints->flags = PMinSize | PMaxSize | PBaseSize; -- hints->min_width = hints->max_width = hints->base_width = w; -- hints->min_height = hints->max_height = hints->base_height = h; -- XSetWMNormalHints(_xwin.display, _xwin.window, hints); -- -- XFree(hints); --} -- -- -- - /* _xwin_process_event: - * Process one event. - */ -@@ -2723,51 +2754,93 @@ - * Support for XF86VidMode extension. - */ - #ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+/* qsort comparison function for sorting the modes */ -+static int cmpmodes(const void *va, const void *vb) -+{ -+ const XF86VidModeModeInfo *a = *(const XF86VidModeModeInfo **)va; -+ const XF86VidModeModeInfo *b = *(const XF86VidModeModeInfo **)vb; -+ if ( a->hdisplay == b->hdisplay ) -+ return b->vdisplay - a->vdisplay; -+ else -+ return b->hdisplay - a->hdisplay; -+} -+ - /* _xvidmode_private_set_fullscreen: -- * Attempt to switch video mode and make window fullscreen. -+ * Attempt to switch to a better matching video mode. -+ * Matching code for non exact match (smallest bigger res) rather shamelessly -+ * taken from SDL. - */ --static int _xvidmode_private_set_fullscreen(int w, int h) -+static void _xvidmode_private_set_fullscreen(int w, int h, int *vidmode_width, -+ int *vidmode_height) - { - int vid_event_base, vid_error_base; - int vid_major_version, vid_minor_version; -- XF86VidModeModeInfo *mode; - int i; -- -+ - /* Test that display is local. */ -- if (!_xwin_private_display_is_local()) { -- ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("VidMode extension requires local display")); -- return 0; -- } -+ if (!_xwin_private_display_is_local()) -+ return; - - /* Test for presence of VidMode extension. */ - if (!XF86VidModeQueryExtension(_xwin.display, &vid_event_base, &vid_error_base) -- || !XF86VidModeQueryVersion(_xwin.display, &vid_major_version, &vid_minor_version)) { -- ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("VidMode extension is not supported")); -- return 0; -- } -+ || !XF86VidModeQueryVersion(_xwin.display, &vid_major_version, &vid_minor_version)) -+ return; - - /* Get list of modelines. */ - if (!XF86VidModeGetAllModeLines(_xwin.display, _xwin.screen, - &_xwin.num_modes, &_xwin.modesinfo)) -- return 0; -- -- /* Search for a matching video mode. */ -- for (i = 0; i < _xwin.num_modes; i++) { -- mode = _xwin.modesinfo[i]; -- if ((mode->hdisplay == w) && (mode->vdisplay == h)) { -- /* Switch video mode. */ -- if (!XF86VidModeSwitchToMode(_xwin.display, _xwin.screen, mode)) -- return 0; -+ return; - -- /* Lock mode switching. */ -- XF86VidModeLockModeSwitch(_xwin.display, _xwin.screen, True); -+ /* Remember the mode to restore */ -+ _xwin.orig_modeinfo = _xwin.modesinfo[0]; - -- _xwin.mode_switched = 1; -- return 1; -- } -+ /* Search for an exact matching video mode. */ -+ for (i = 0; i < _xwin.num_modes; i++) { -+ if ((_xwin.modesinfo[i]->hdisplay == w) && -+ (_xwin.modesinfo[i]->vdisplay == h)) -+ break; - } - -- return 0; -+ /* Search for a non exact match (smallest bigger res). */ -+ if (i == _xwin.num_modes) { -+ int best_width = 0, best_height = 0; -+ qsort(_xwin.modesinfo, _xwin.num_modes, sizeof(void *), cmpmodes); -+ for (i = _xwin.num_modes-1; i > 0; i--) { -+ if ( ! best_width ) { -+ if ( (_xwin.modesinfo[i]->hdisplay >= w) && -+ (_xwin.modesinfo[i]->vdisplay >= h) ) { -+ best_width = _xwin.modesinfo[i]->hdisplay; -+ best_height = _xwin.modesinfo[i]->vdisplay; -+ } -+ } else { -+ if ( (_xwin.modesinfo[i]->hdisplay != best_width) || -+ (_xwin.modesinfo[i]->vdisplay != best_height) ) { -+ i++; -+ break; -+ } -+ } -+ } -+ } -+ -+ /* Switch video mode. */ -+ if ((_xwin.modesinfo[i] == _xwin.orig_modeinfo) || -+ !XF86VidModeSwitchToMode(_xwin.display, _xwin.screen, -+ _xwin.modesinfo[i])) { -+ *vidmode_width = _xwin.orig_modeinfo->hdisplay; -+ *vidmode_height = _xwin.orig_modeinfo->vdisplay; -+ _xwin.orig_modeinfo = NULL; -+ } else { -+ *vidmode_width = _xwin.modesinfo[i]->hdisplay; -+ *vidmode_height = _xwin.modesinfo[i]->vdisplay; -+ /* only kept / set for compatibility with apps which check this */ -+ _xwin.mode_switched = 1; -+ } -+ -+ /* Lock mode switching. */ -+ XF86VidModeLockModeSwitch(_xwin.display, _xwin.screen, True); -+ -+ /* Set viewport. */ -+ XF86VidModeSetViewPort(_xwin.display, _xwin.screen, 0, 0); - } - - -@@ -2793,13 +2866,15 @@ - static void _xvidmode_private_unset_fullscreen(void) - { - if (_xwin.num_modes > 0) { -- if (_xwin.mode_switched) { -- /* Unlock mode switching. */ -- XF86VidModeLockModeSwitch(_xwin.display, _xwin.screen, False); -+ /* Unlock mode switching. */ -+ XF86VidModeLockModeSwitch(_xwin.display, _xwin.screen, False); - -+ if (_xwin.orig_modeinfo) { - /* Restore the original video mode. */ -- XF86VidModeSwitchToMode(_xwin.display, _xwin.screen, _xwin.modesinfo[0]); -- -+ XF86VidModeSwitchToMode(_xwin.display, _xwin.screen, -+ _xwin.orig_modeinfo); -+ _xwin.orig_modeinfo = 0; -+ /* only kept / set for compatibility with apps which check this */ - _xwin.mode_switched = 0; - } - -@@ -2809,36 +2884,35 @@ - _xwin.modesinfo = 0; - } - } -+#endif - - - --/* _xvidmode_private_fetch_mode_list: -+/* _xwin_private_fetch_mode_list: - * Generates a list of valid video modes. - */ --static GFX_MODE_LIST *_xvidmode_private_fetch_mode_list(void) -+static GFX_MODE_LIST *_xwin_private_fetch_mode_list(void) - { -+ int num_modes = 1, num_bpp = 0; -+ GFX_MODE_LIST *mode_list; -+ int i, j; -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+ int has_vidmode = 0; - int vid_event_base, vid_error_base; - int vid_major_version, vid_minor_version; - XF86VidModeModeInfo **modesinfo; -- int num_modes, num_bpp; -- GFX_MODE_LIST *mode_list; -- int i, j; -- -- /* Test that display is local. */ -- if (!_xwin_private_display_is_local()) -- return 0; -- -- /* Test for presence of VidMode extension. */ -- if (!XF86VidModeQueryExtension(_xwin.display, &vid_event_base, &vid_error_base) -- || !XF86VidModeQueryVersion(_xwin.display, &vid_major_version, &vid_minor_version)) -- return 0; -- -- /* Get list of modelines. */ -- if (!XF86VidModeGetAllModeLines(_xwin.display, _xwin.screen, &num_modes, &modesinfo)) -- return 0; -+ -+ /* Test that display is local. */ -+ if ( _xwin_private_display_is_local() && -+ /* Test for presence of VidMode extension. */ -+ XF86VidModeQueryExtension(_xwin.display, &vid_event_base, &vid_error_base) && -+ XF86VidModeQueryVersion(_xwin.display, &vid_major_version, &vid_minor_version) && -+ /* Get list of modelines. */ -+ XF86VidModeGetAllModeLines(_xwin.display, _xwin.screen, &num_modes, &modesinfo)) -+ has_vidmode = 1; -+#endif - - /* Calculate the number of color depths we have to support. */ -- num_bpp = 0; - #ifdef ALLEGRO_COLOR8 - num_bpp++; - #endif -@@ -2857,25 +2931,48 @@ - /* Allocate space for mode list. */ - mode_list = malloc(sizeof(GFX_MODE_LIST)); - if (!mode_list) { -- free_modelines(modesinfo, num_modes); -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+ if (has_vidmode) -+ free_modelines(modesinfo, num_modes); -+#endif - return 0; - } - - mode_list->mode = malloc(sizeof(GFX_MODE) * ((num_modes * num_bpp) + 1)); - if (!mode_list->mode) { - free(mode_list); -- free_modelines(modesinfo, num_modes); -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+ if (has_vidmode) -+ free_modelines(modesinfo, num_modes); -+#endif - return 0; - } - - /* Fill in mode list. */ - j = 0; - for (i = 0; i < num_modes; i++) { --#define ADD_MODE(BPP) \ -+ -+#define ADD_SCREEN_MODE(BPP) \ -+ mode_list->mode[j].width = DisplayWidth(_xwin.display, _xwin.screen); \ -+ mode_list->mode[j].height = DisplayHeight(_xwin.display, _xwin.screen); \ -+ mode_list->mode[j].bpp = BPP; \ -+ j++ -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+#define ADD_VIDMODE_MODE(BPP) \ - mode_list->mode[j].width = modesinfo[i]->hdisplay; \ - mode_list->mode[j].height = modesinfo[i]->vdisplay; \ - mode_list->mode[j].bpp = BPP; \ - j++ -+#define ADD_MODE(BPP) \ -+ if (has_vidmode) { \ -+ ADD_VIDMODE_MODE(BPP); \ -+ } else { \ -+ ADD_SCREEN_MODE(BPP); \ -+ } -+#else -+#define ADD_MODE(BPP) ADD_SCREEN_MODE(BPP) -+#endif -+ - #ifdef ALLEGRO_COLOR8 - ADD_MODE(8); - #endif -@@ -2896,11 +2993,13 @@ - mode_list->mode[j].bpp = 0; - mode_list->num_modes = j; - -- free_modelines(modesinfo, num_modes); -+#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE -+ if (has_vidmode) -+ free_modelines(modesinfo, num_modes); -+#endif - - return mode_list; - } --#endif - - - -@@ -2909,15 +3008,11 @@ - */ - GFX_MODE_LIST *_xwin_fetch_mode_list(void) - { --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - GFX_MODE_LIST *list; - XLOCK(); -- list = _xvidmode_private_fetch_mode_list(); -+ list = _xwin_private_fetch_mode_list(); - XUNLOCK(); - return list; --#else -- return 0; --#endif - } - - ---- allegro-4.2.0/src/x/xgfxdrv.c~ 2006-03-08 22:47:27.000000000 +0100 -+++ allegro-4.2.0/src/x/xgfxdrv.c 2006-03-08 22:47:27.000000000 +0100 -@@ -61,7 +61,6 @@ - - - --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - static BITMAP *_xwin_fullscreen_gfxdrv_init(int w, int h, int vw, int vh, int color_depth); - - -@@ -98,7 +97,6 @@ - 0, - FALSE - }; --#endif - - - -@@ -109,9 +107,7 @@ - { GFX_XDGA2, &gfx_xdga2, FALSE }, - { GFX_XDGA2_SOFT, &gfx_xdga2_soft, FALSE }, - #endif --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - { GFX_XWINDOWS_FULLSCREEN, &gfx_xwin_fullscreen, TRUE }, --#endif - { GFX_XWINDOWS, &gfx_xwin, TRUE }, - { 0, NULL, 0 } - }; -@@ -138,7 +134,6 @@ - - - --#ifdef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE - /* _xwin_fullscreen_gfxdrv_init: - * Creates screen bitmap (with video mode extension). - */ -@@ -146,4 +141,3 @@ - { - return _xwin_create_screen(&gfx_xwin_fullscreen, w, h, vw, vh, color_depth, TRUE); - } --#endif diff --git a/allegro-4.2.0-mprotect.patch b/allegro-4.2.0-mprotect.patch deleted file mode 100644 index 1d21702..0000000 --- a/allegro-4.2.0-mprotect.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- allegro-4.2.0/tools/grabber.c.mprotect 2005-09-04 18:00:18.000000000 +0200 -+++ allegro-4.2.0/tools/grabber.c 2006-03-11 23:27:31.000000000 +0100 -@@ -3121,6 +3121,7 @@ - case OSTYPE_SUNOS: s = "SunOS/Solaris"; break; - case OSTYPE_FREEBSD: s = "FreeBSD"; break; - case OSTYPE_NETBSD: s = "NetBSD"; break; -+ case OSTYPE_OPENBSD: s = "OpenBSD"; break; - case OSTYPE_IRIX: s = "IRIX"; break; - case OSTYPE_DARWIN: s = "Darwin"; break; - case OSTYPE_QNX: s = "QNX"; break; ---- allegro-4.2.0/include/allegro/platform/alunixac.hin.mprotect 2005-10-30 21:23:33.000000000 +0100 -+++ allegro-4.2.0/include/allegro/platform/alunixac.hin 2006-03-11 23:27:31.000000000 +0100 -@@ -169,6 +169,9 @@ - /* Define to 1 if you have the `mmap' function. */ - #undef HAVE_MMAP - -+/* Define to 1 if you have the `mprotect' function. */ -+#undef HAVE_MPROTECT -+ - /* Define to 1 if you have the header file, and it defines `DIR'. */ - #undef HAVE_NDIR_H - ---- allegro-4.2.0/include/allegro/system.h.mprotect 2005-03-15 21:32:43.000000000 +0100 -+++ allegro-4.2.0/include/allegro/system.h 2006-03-11 23:27:31.000000000 +0100 -@@ -53,6 +53,7 @@ - #define OSTYPE_SUNOS AL_ID('S','U','N',' ') - #define OSTYPE_FREEBSD AL_ID('F','B','S','D') - #define OSTYPE_NETBSD AL_ID('N','B','S','D') -+#define OSTYPE_OPENBSD AL_ID('O','B','S','D') - #define OSTYPE_IRIX AL_ID('I','R','I','X') - #define OSTYPE_DARWIN AL_ID('D','A','R','W') - #define OSTYPE_QNX AL_ID('Q','N','X',' ') ---- allegro-4.2.0/configure.mprotect 2005-11-06 10:54:00.000000000 +0100 -+++ allegro-4.2.0/configure 2006-03-11 23:27:31.000000000 +0100 -@@ -11225,7 +11225,7 @@ - - - --for ac_func in mmap memcmp mkstemp stricmp strlwr strupr vprintf -+for ac_func in mmap mprotect memcmp mkstemp stricmp strlwr strupr vprintf - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 ---- allegro-4.2.0/configure.in.mprotect 2005-08-07 23:50:49.000000000 +0200 -+++ allegro-4.2.0/configure.in 2006-03-11 23:27:31.000000000 +0100 -@@ -713,7 +713,7 @@ - AC_STRUCT_TM - AC_TYPE_SIGNAL - --AC_CHECK_FUNCS(mmap memcmp mkstemp stricmp strlwr strupr vprintf) -+AC_CHECK_FUNCS(mmap mprotect memcmp mkstemp stricmp strlwr strupr vprintf) - - dnl Tweak header files for library build - CFLAGS="$CFLAGS -DALLEGRO_LIB_BUILD" ---- allegro-4.2.0/src/unix/usystem.c.mprotect 2005-09-04 18:00:17.000000000 +0200 -+++ allegro-4.2.0/src/unix/usystem.c 2006-03-11 23:27:31.000000000 +0100 -@@ -196,6 +196,9 @@ - else if (!strcmp(utsn.sysname, "NetBSD")) { - os_type = OSTYPE_NETBSD; - } -+ else if (!strcmp(utsn.sysname, "OpenBSD")) { -+ os_type = OSTYPE_OPENBSD; -+ } - else if ((!strcmp(utsn.sysname, "IRIX")) - || (!strcmp(utsn.sysname, "IRIX64"))) { - os_type = OSTYPE_IRIX; ---- allegro-4.2.0/src/unix/uesd.c.mprotect 2005-03-12 08:54:27.000000000 +0100 -+++ allegro-4.2.0/src/unix/uesd.c 2006-03-11 23:27:31.000000000 +0100 -@@ -27,6 +27,7 @@ - - #include - #include -+#include /* FD_ZERO() needs this */ - #include - #include - ---- allegro-4.2.0/src/i386/istretch.c.mprotect 2005-03-15 19:02:22.000000000 +0100 -+++ allegro-4.2.0/src/i386/istretch.c 2006-03-11 23:31:44.000000000 +0100 -@@ -30,6 +30,11 @@ - #include "winalleg.h" /* For VirtualProtect */ - #endif /* ifdef ALLEGRO_WINDOWS */ - -+#ifdef HAVE_MPROTECT -+ #include -+ #include -+ #include -+#endif - - - /* helper macro for generating stretchers in each color depth */ -@@ -435,7 +440,14 @@ - #ifdef ALLEGRO_WINDOWS - /* Play nice with Windows executable memory protection */ - VirtualProtect(_scratch_mem, _scratch_mem_size, PAGE_EXECUTE_READWRITE, &old_protect); -- #endif /* ifdef ALLEGRO_WINDOWS */ -+ #elif defined(HAVE_MPROTECT) -+ { -+ char *p = (char *)((unsigned long)_scratch_mem & ~(PAGE_SIZE-1ul)); -+ if (mprotect(p, _scratch_mem_size + ((char *)_scratch_mem - p), -+ PROT_EXEC|PROT_READ|PROT_WRITE)) -+ perror("allegro-error: mprotect failed during stretched blit!"); -+ } -+ #endif - - /* call the stretcher */ - _do_stretch(source, dest, _scratch_mem, sx>>16, sy, syd, diff --git a/allegro-4.2.0-multilib.patch b/allegro-4.2.0-multilib.patch deleted file mode 100644 index 0c0507e..0000000 --- a/allegro-4.2.0-multilib.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- 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 - - /* Define if assembler supports MMX. */ --#undef ALLEGRO_MMX -+#ifdef __i386__ -+#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 diff --git a/allegro-4.2.0-nicevsync.patch b/allegro-4.2.0-nicevsync.patch deleted file mode 100644 index 4424144..0000000 --- a/allegro-4.2.0-nicevsync.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- allegro-4.2.0/src/x/xwin.c~ 2006-03-21 12:57:42.000000000 +0100 -+++ allegro-4.2.0/src/x/xwin.c 2006-03-21 12:57:42.000000000 +0100 -@@ -2265,6 +2265,7 @@ - XUNLOCK(); - - do { -+ rest(1); - } while (retrace_count == prev); - } - else { diff --git a/allegro-4.2.0-no-execheap.patch b/allegro-4.2.0-no-execheap.patch deleted file mode 100644 index ad6b98f..0000000 --- a/allegro-4.2.0-no-execheap.patch +++ /dev/null @@ -1,596 +0,0 @@ -diff -ur allegro-4.2.0.orig/src/i386/icsprite.c allegro-4.2.0/src/i386/icsprite.c ---- allegro-4.2.0.orig/src/i386/icsprite.c 2001-11-06 16:30:47.000000000 +0100 -+++ allegro-4.2.0/src/i386/icsprite.c 2006-03-13 23:26:53.000000000 +0100 -@@ -45,6 +45,11 @@ - #if defined ALLEGRO_COLOR24 || defined ALLEGRO_COLOR32 - unsigned long *p32; - #endif -+ -+ #ifdef USE_MMAP_GEN_CODE_BUF -+ /* make sure we get a new map */ -+ _map_size = 0; -+ #endif - - for (y=0; yh; y++) { - -@@ -270,13 +275,40 @@ - - COMPILER_RET(); - -+ #ifdef USE_MMAP_GEN_CODE_BUF -+ /* Lie about the size, return the size mapped which >= size used / -+ compiler_pos, because we need the size mapped for munmap */ -+ *len = _map_size; -+ /* we don't need _rw_map or _map_fd anymore */ -+ munmap(_rw_map, _map_size); -+ close(_map_fd); -+ return _exec_map; -+ #else - p = malloc(compiler_pos); - if (p) { - memcpy(p, _scratch_mem, compiler_pos); - *len = compiler_pos; -+ #ifdef ALLEGRO_WINDOWS -+ { -+ DWORD old_protect; -+ /* Play nice with Windows executable memory protection */ -+ VirtualProtect(p, compiler_pos, PAGE_EXECUTE_READWRITE, &old_protect); -+ } -+ #elif defined(HAVE_MPROTECT) -+ { -+ char *aligned_p = (char *)((unsigned long)p & ~(PAGE_SIZE-1ul)); -+ if (mprotect(aligned_p, compiler_pos + ((char *)p - aligned_p), -+ PROT_EXEC|PROT_READ|PROT_WRITE)) { -+ perror("allegro-error: mprotect failed during stretched blit!"); -+ free(p); -+ return NULL; -+ } -+ } -+ #endif - } - - return p; -+ #endif - } - - -@@ -327,8 +359,11 @@ - if (sprite) { - for (plane=0; plane<4; plane++) - if (sprite->proc[plane].draw) -+ #ifdef USE_MMAP_GEN_CODE_BUF -+ munmap(sprite->proc[plane].draw, sprite->proc[plane].len); -+ #else - free(sprite->proc[plane].draw); -- -+ #endif - free(sprite); - } - } -diff -ur allegro-4.2.0.orig/src/i386/istretch.c allegro-4.2.0/src/i386/istretch.c ---- allegro-4.2.0.orig/src/i386/istretch.c 2006-03-13 22:48:45.000000000 +0100 -+++ allegro-4.2.0/src/i386/istretch.c 2006-03-13 23:18:56.000000000 +0100 -@@ -216,29 +216,18 @@ - char depth; - char flags; - int lru; -- void *data; -+ void *exec; /* xr_ mapping in the mmap case, normally both in one. */ - int size; -+#ifdef USE_MMAP_GEN_CODE_BUF -+ void *rw; /* _rw mapping for the mmap case. */ -+ int fd; /* mapping backing fd for the mmap case. */ -+#endif - } STRETCHER_INFO; - -- - #define NUM_STRETCHERS 8 - -- --static STRETCHER_INFO stretcher_info[NUM_STRETCHERS] = --{ -- { 0, 0, 0, 0, 0, 0, NULL, 0 }, -- { 0, 0, 0, 0, 0, 0, NULL, 0 }, -- { 0, 0, 0, 0, 0, 0, NULL, 0 }, -- { 0, 0, 0, 0, 0, 0, NULL, 0 }, -- { 0, 0, 0, 0, 0, 0, NULL, 0 }, -- { 0, 0, 0, 0, 0, 0, NULL, 0 }, -- { 0, 0, 0, 0, 0, 0, NULL, 0 }, -- { 0, 0, 0, 0, 0, 0, NULL, 0 } --}; -- -- -+static STRETCHER_INFO stretcher_info[NUM_STRETCHERS]; - static int stretcher_count = 0; -- - static int stretcher_virgin = TRUE; - - -@@ -251,11 +240,14 @@ - int i; - - for (i=0; i>= 2; -- _do_stretch(source, dest, stretcher_info[i].data, sx>>16, sy, syd, -+ _do_stretch(source, dest, stretcher_info[i].exec, sx>>16, sy, syd, - dest_x, dest_y, dest_height, dest->vtable->color_depth); - stretcher_info[i].lru = stretcher_count; - return; -@@ -382,17 +383,18 @@ - } - } - -- /* make sure all allocated memory is freed atexit */ -- if (stretcher_virgin) { -- stretcher_virgin = FALSE; -- _add_exit_func(free_stretchers, "free_stretchers"); -- } -- -+ #ifdef USE_MMAP_GEN_CODE_BUF -+ _exec_map = stretcher_info[best].exec; -+ _rw_map = stretcher_info[best].rw; -+ _map_size = stretcher_info[best].size; -+ _map_fd = stretcher_info[best].fd; -+ #else - prev_scratch_mem = _scratch_mem; - prev_scratch_mem_size = _scratch_mem_size; - -- _scratch_mem = stretcher_info[best].data; -+ _scratch_mem = stretcher_info[best].exec; - _scratch_mem_size = stretcher_info[best].size; -+ #endif - - if (is_linear_bitmap(dest)) { - /* build a simple linear stretcher */ -@@ -439,7 +441,7 @@ - #ifdef ALLEGRO_WINDOWS - /* Play nice with Windows executable memory protection */ - VirtualProtect(_scratch_mem, _scratch_mem_size, PAGE_EXECUTE_READWRITE, &old_protect); -- #elif defined(HAVE_MPROTECT) -+ #elif defined(HAVE_MPROTECT) && !defined(USE_MMAP_GEN_CODE_BUF) - { - char *p = (char *)((unsigned long)_scratch_mem & ~(PAGE_SIZE-1ul)); - if (mprotect(p, _scratch_mem_size + ((char *)_scratch_mem - p), -@@ -448,22 +450,29 @@ - } - #endif - -- /* call the stretcher */ -- _do_stretch(source, dest, _scratch_mem, sx>>16, sy, syd, -- dest_x, dest_y, dest_height, dest->vtable->color_depth); -- -- /* and store it in the cache */ -+ /* store it in the cache */ - stretcher_info[best].sx = sx; - stretcher_info[best].sxd = sxd; - stretcher_info[best].dest_width = dest_width; - stretcher_info[best].depth = dest->vtable->color_depth; - stretcher_info[best].flags = flags; - stretcher_info[best].lru = stretcher_count; -- stretcher_info[best].data = _scratch_mem; -+ #ifdef USE_MMAP_GEN_CODE_BUF -+ stretcher_info[best].exec = _exec_map; -+ stretcher_info[best].rw = _rw_map; -+ stretcher_info[best].size = _map_size; -+ stretcher_info[best].fd = _map_fd; -+ #else -+ stretcher_info[best].exec = _scratch_mem; - stretcher_info[best].size = _scratch_mem_size; - - _scratch_mem = prev_scratch_mem; - _scratch_mem_size = prev_scratch_mem_size; -+ #endif -+ -+ /* and call the stretcher */ -+ _do_stretch(source, dest, stretcher_info[best].exec, sx>>16, sy, syd, -+ dest_x, dest_y, dest_height, dest->vtable->color_depth); - } - - -diff -ur allegro-4.2.0.orig/src/i386/opcodes.h allegro-4.2.0/src/i386/opcodes.h ---- allegro-4.2.0.orig/src/i386/opcodes.h 2000-05-14 22:17:13.000000000 +0200 -+++ allegro-4.2.0/src/i386/opcodes.h 2006-03-13 23:00:31.000000000 +0100 -@@ -19,6 +19,51 @@ - #ifndef OPCODES_H - #define OPCODES_H - -+/* mremap is only available under Linux, so is selinux which is the reason for -+ USE_MMAP_GEN_CODE_BUF so that is no problem. */ -+#ifdef ALLEGRO_LINUX -+ #define USE_MMAP_GEN_CODE_BUF -+ #define __USE_GNU /* for mremap */ -+ #include /* for mkstemp */ -+ #include /* for unlink */ -+ #include /* for PAGE_SIZE */ -+ #include /* for mmap */ -+ -+ static void *_exec_map; -+ static void *_rw_map; -+ static int _map_size; -+ static int _map_fd; -+ -+ #define GROW_GEN_CODE_BUF(size) \ -+ if (!_map_size) { \ -+ /* Create backing file. FIXME: error-checking, but how? */ \ -+ char tempfile_name[] = "/tmp/allegroXXXXXX"; \ -+ _map_fd = mkstemp(tempfile_name); \ -+ unlink(tempfile_name); \ -+ /* Grow backing file to multiple of page size */ \ -+ _map_size = (size + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1); \ -+ ftruncate(_map_fd, _map_size); \ -+ /* And create the 2 mappings */ \ -+ _exec_map = mmap(0, _map_size, PROT_EXEC | PROT_READ, MAP_SHARED, \ -+ _map_fd, 0); \ -+ _rw_map = mmap(0, _map_size, PROT_READ | PROT_WRITE, MAP_SHARED, \ -+ _map_fd, 0); \ -+ } \ -+ else if (size > _map_size) { \ -+ int old_size = _map_size; \ -+ /* Grow backing file to multiple of page size */ \ -+ _map_size = (size + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1); \ -+ ftruncate(_map_fd, _map_size); \ -+ /* And remap the 2 mappings */ \ -+ _exec_map = mremap(_exec_map, old_size, _map_size, MREMAP_MAYMOVE); \ -+ _rw_map = mremap(_rw_map, old_size, _map_size, MREMAP_MAYMOVE); \ -+ } -+ -+ #define GEN_CODE_BUF _rw_map -+#else -+ #define GROW_GEN_CODE_BUF(size) _grow_scratch_mem(size) -+ #define GEN_CODE_BUF _scratch_mem -+#endif - - #ifdef ALLEGRO_ASM_USE_FS - #define FS_PREFIX() COMPILER_BYTE(0x64) -@@ -30,37 +75,37 @@ - - - #define COMPILER_BYTE(val) { \ -- *(((unsigned char *)_scratch_mem)+compiler_pos) = val; \ -+ *(((unsigned char *)GEN_CODE_BUF)+compiler_pos) = val; \ - compiler_pos++; \ - } - - - #define COMPILER_WORD(val) { \ -- *((unsigned short *)(((char *)_scratch_mem)+compiler_pos)) = val; \ -+ *((unsigned short *)(((char *)GEN_CODE_BUF)+compiler_pos)) = val; \ - compiler_pos += 2; \ - } - - - #define COMPILER_LONG(val) { \ -- *((unsigned long *)(((char *)_scratch_mem)+compiler_pos)) = val; \ -+ *((unsigned long *)(((char *)GEN_CODE_BUF)+compiler_pos)) = val; \ - compiler_pos += 4; \ - } - - - #define COMPILER_INC_ESI() { \ -- _grow_scratch_mem(compiler_pos+1); \ -+ GROW_GEN_CODE_BUF(compiler_pos+1); \ - COMPILER_BYTE(0x46); /* incl %esi */ \ - } - - - #define COMPILER_INC_EDI() { \ -- _grow_scratch_mem(compiler_pos+1); \ -+ GROW_GEN_CODE_BUF(compiler_pos+1); \ - COMPILER_BYTE(0x47); /* incl %edi */ \ - } - - - #define COMPILER_ADD_ESI(val) { \ -- _grow_scratch_mem(compiler_pos+6); \ -+ GROW_GEN_CODE_BUF(compiler_pos+6); \ - COMPILER_BYTE(0x81); /* addl $val, %esi */ \ - COMPILER_BYTE(0xC6); \ - COMPILER_LONG(val); \ -@@ -68,87 +113,87 @@ - - - #define COMPILER_ADD_ECX_EAX() { \ -- _grow_scratch_mem(compiler_pos+2); \ -+ GROW_GEN_CODE_BUF(compiler_pos+2); \ - COMPILER_BYTE(0x01); /* addl %ecx, %eax */ \ - COMPILER_BYTE(0xC8); \ - } - - - #define COMPILER_MOV_EAX(val) { \ -- _grow_scratch_mem(compiler_pos+5); \ -+ GROW_GEN_CODE_BUF(compiler_pos+5); \ - COMPILER_BYTE(0xB8); /* movl $val, %eax */ \ - COMPILER_LONG(val); \ - } - - - #define COMPILER_MOV_ECX(val) { \ -- _grow_scratch_mem(compiler_pos+5); \ -+ GROW_GEN_CODE_BUF(compiler_pos+5); \ - COMPILER_BYTE(0xB9); /* movl $val, %ecx */ \ - COMPILER_LONG(val); \ - } - - - #define COMPILER_MOV_EDX(val) { \ -- _grow_scratch_mem(compiler_pos+5); \ -+ GROW_GEN_CODE_BUF(compiler_pos+5); \ - COMPILER_BYTE(0xBA); /* movl $val, %edx */ \ - COMPILER_LONG(val); \ - } - - - #define COMPILER_MOV_EDI_EAX() { \ -- _grow_scratch_mem(compiler_pos+2); \ -+ GROW_GEN_CODE_BUF(compiler_pos+2); \ - COMPILER_BYTE(0x89); /* movl %edi, %eax */ \ - COMPILER_BYTE(0xF8); \ - } - - - #define COMPILER_CALL_ESI() { \ -- _grow_scratch_mem(compiler_pos+2); \ -+ GROW_GEN_CODE_BUF(compiler_pos+2); \ - COMPILER_BYTE(0xFF); /* call *%esi */ \ - COMPILER_BYTE(0xD6); \ - } - - - #define COMPILER_OUTW() { \ -- _grow_scratch_mem(compiler_pos+2); \ -+ GROW_GEN_CODE_BUF(compiler_pos+2); \ - COMPILER_BYTE(0x66); /* outw %ax, %dx */ \ - COMPILER_BYTE(0xEF); \ - } - - - #define COMPILER_PUSH_ESI() { \ -- _grow_scratch_mem(compiler_pos+1); \ -+ GROW_GEN_CODE_BUF(compiler_pos+1); \ - COMPILER_BYTE(0x56); /* pushl %esi */ \ - } - - - #define COMPILER_PUSH_EDI() { \ -- _grow_scratch_mem(compiler_pos+1); \ -+ GROW_GEN_CODE_BUF(compiler_pos+1); \ - COMPILER_BYTE(0x57); /* pushl %edi */ \ - } - - - #define COMPILER_POP_ESI() { \ -- _grow_scratch_mem(compiler_pos+1); \ -+ GROW_GEN_CODE_BUF(compiler_pos+1); \ - COMPILER_BYTE(0x5E); /* popl %esi */ \ - } - - - #define COMPILER_POP_EDI() { \ -- _grow_scratch_mem(compiler_pos+1); \ -+ GROW_GEN_CODE_BUF(compiler_pos+1); \ - COMPILER_BYTE(0x5F); /* popl %edi */ \ - } - - - #define COMPILER_REP_MOVSB() { \ -- _grow_scratch_mem(compiler_pos+2); \ -+ GROW_GEN_CODE_BUF(compiler_pos+2); \ - COMPILER_BYTE(0xF2); /* rep */ \ - COMPILER_BYTE(0xA4); /* movsb */ \ - } - - - #define COMPILER_REP_MOVSW() { \ -- _grow_scratch_mem(compiler_pos+3); \ -+ GROW_GEN_CODE_BUF(compiler_pos+3); \ - COMPILER_BYTE(0xF3); /* rep */ \ - COMPILER_BYTE(0x66); /* word prefix */ \ - COMPILER_BYTE(0xA5); /* movsw */ \ -@@ -156,14 +201,14 @@ - - - #define COMPILER_REP_MOVSL() { \ -- _grow_scratch_mem(compiler_pos+2); \ -+ GROW_GEN_CODE_BUF(compiler_pos+2); \ - COMPILER_BYTE(0xF3); /* rep */ \ - COMPILER_BYTE(0xA5); /* movsl */ \ - } - - - #define COMPILER_REP_MOVSL2() { \ -- _grow_scratch_mem(compiler_pos+17); \ -+ GROW_GEN_CODE_BUF(compiler_pos+17); \ - COMPILER_BYTE(0x8D); /* leal (%ecx, %ecx, 2), %ecx */ \ - COMPILER_BYTE(0x0C); \ - COMPILER_BYTE(0x49); \ -@@ -185,7 +230,7 @@ - - - #define COMPILER_LODSB() { \ -- _grow_scratch_mem(compiler_pos+3); \ -+ GROW_GEN_CODE_BUF(compiler_pos+3); \ - COMPILER_BYTE(0x8A); /* movb (%esi), %al */ \ - COMPILER_BYTE(0x06); \ - COMPILER_BYTE(0x46); /* incl %esi */ \ -@@ -193,7 +238,7 @@ - - - #define COMPILER_LODSW() { \ -- _grow_scratch_mem(compiler_pos+6); \ -+ GROW_GEN_CODE_BUF(compiler_pos+6); \ - COMPILER_BYTE(0x66); /* word prefix */ \ - COMPILER_BYTE(0x8B); /* movw (%esi), %ax */ \ - COMPILER_BYTE(0x06); \ -@@ -204,7 +249,7 @@ - - - #define COMPILER_LODSL() { \ -- _grow_scratch_mem(compiler_pos+5); \ -+ GROW_GEN_CODE_BUF(compiler_pos+5); \ - COMPILER_BYTE(0x8B); /* movl (%esi), %eax */ \ - COMPILER_BYTE(0x06); \ - COMPILER_BYTE(0x83); /* addl $4, %esi */ \ -@@ -214,7 +259,7 @@ - - - #define COMPILER_LODSL2() { \ -- _grow_scratch_mem(compiler_pos+15); \ -+ GROW_GEN_CODE_BUF(compiler_pos+15); \ - COMPILER_BYTE(0x8B); /* movl (%esi), %eax */ \ - COMPILER_BYTE(0x06); \ - COMPILER_BYTE(0x25); /* andl $0xFFFFFF, %eax */ \ -@@ -231,7 +276,7 @@ - - - #define COMPILER_STOSB() { \ -- _grow_scratch_mem(compiler_pos+4); \ -+ GROW_GEN_CODE_BUF(compiler_pos+4); \ - COMPILER_BYTE(0x26); /* movb %al, %es:(%edi) */ \ - COMPILER_BYTE(0x88); \ - COMPILER_BYTE(0x07); \ -@@ -240,7 +285,7 @@ - - - #define COMPILER_STOSW() { \ -- _grow_scratch_mem(compiler_pos+7); \ -+ GROW_GEN_CODE_BUF(compiler_pos+7); \ - COMPILER_BYTE(0x26); /* es segment prefix */ \ - COMPILER_BYTE(0x66); /* word prefix */ \ - COMPILER_BYTE(0x89); /* movw %ax, %es:(%edi) */ \ -@@ -252,7 +297,7 @@ - - - #define COMPILER_STOSL() { \ -- _grow_scratch_mem(compiler_pos+6); \ -+ GROW_GEN_CODE_BUF(compiler_pos+6); \ - COMPILER_BYTE(0x26); /* es segment prefix */ \ - COMPILER_BYTE(0x89); /* movl %eax, %es:(%edi) */ \ - COMPILER_BYTE(0x07); \ -@@ -263,7 +308,7 @@ - - - #define COMPILER_STOSL2() { \ -- _grow_scratch_mem(compiler_pos+11); \ -+ GROW_GEN_CODE_BUF(compiler_pos+11); \ - COMPILER_BYTE(0x66); /* word prefix */ \ - COMPILER_BYTE(0x26); /* es segment prefix */ \ - COMPILER_BYTE(0x89); /* movw %ax, %es:(%edi) */ \ -@@ -279,7 +324,7 @@ - - - #define COMPILER_MASKED_STOSB(mask_color) { \ -- _grow_scratch_mem(compiler_pos+8); \ -+ GROW_GEN_CODE_BUF(compiler_pos+8); \ - COMPILER_BYTE(0x08); /* orb %al, %al */ \ - COMPILER_BYTE(0xC0); \ - COMPILER_BYTE(0x74); /* jz skip */ \ -@@ -292,7 +337,7 @@ - - - #define COMPILER_MASKED_STOSW(mask_color) { \ -- _grow_scratch_mem(compiler_pos+13); \ -+ GROW_GEN_CODE_BUF(compiler_pos+13); \ - COMPILER_BYTE(0x66); /* word prefix */ \ - COMPILER_BYTE(0x3D); /* cmpw mask_color, %ax */ \ - COMPILER_WORD(mask_color); \ -@@ -309,7 +354,7 @@ - - - #define COMPILER_MASKED_STOSL(mask_color) { \ -- _grow_scratch_mem(compiler_pos+13); \ -+ GROW_GEN_CODE_BUF(compiler_pos+13); \ - COMPILER_BYTE(0x3D); /* cmpl mask_color, %eax */ \ - COMPILER_LONG(mask_color); \ - COMPILER_BYTE(0x74); /* jz skip */ \ -@@ -324,7 +369,7 @@ - - - #define COMPILER_MASKED_STOSL2(mask_color) { \ -- _grow_scratch_mem(compiler_pos+18); \ -+ GROW_GEN_CODE_BUF(compiler_pos+18); \ - COMPILER_BYTE(0x3D); /* cmpl mask_color, %eax */ \ - COMPILER_LONG(mask_color); \ - COMPILER_BYTE(0x74); /* jz skip */ \ -@@ -360,7 +405,7 @@ - - - #define COMPILER_MOVB_IMMED(offset, val) { \ -- _grow_scratch_mem(MOV_IMMED_SIZE(2+FS_SIZE, offset)); \ -+ GROW_GEN_CODE_BUF(MOV_IMMED_SIZE(2+FS_SIZE, offset)); \ - FS_PREFIX(); /* fs: */ \ - COMPILER_BYTE(0xC6); /* movb $val, offset(%eax) */ \ - MOV_IMMED(offset); \ -@@ -369,7 +414,7 @@ - - - #define COMPILER_MOVW_IMMED(offset, val) { \ -- _grow_scratch_mem(MOV_IMMED_SIZE(4+FS_SIZE, offset)); \ -+ GROW_GEN_CODE_BUF(MOV_IMMED_SIZE(4+FS_SIZE, offset)); \ - COMPILER_BYTE(0x66); /* word prefix */ \ - FS_PREFIX(); /* fs: */ \ - COMPILER_BYTE(0xC7); /* movw $val, offset(%eax) */ \ -@@ -379,7 +424,7 @@ - - - #define COMPILER_MOVL_IMMED(offset, val) { \ -- _grow_scratch_mem(MOV_IMMED_SIZE(5+FS_SIZE, offset)); \ -+ GROW_GEN_CODE_BUF(MOV_IMMED_SIZE(5+FS_SIZE, offset)); \ - FS_PREFIX(); /* fs: */ \ - COMPILER_BYTE(0xC7); /* movl $val, offset(%eax) */ \ - MOV_IMMED(offset); \ -@@ -388,7 +433,7 @@ - - - #define COMPILER_RET() { \ -- _grow_scratch_mem(compiler_pos+1); \ -+ GROW_GEN_CODE_BUF(compiler_pos+1); \ - COMPILER_BYTE(0xC3); /* ret */ \ - } - diff --git a/allegro-4.2.0-noexecstack.patch b/allegro-4.2.0-noexecstack.patch deleted file mode 100644 index 2bf10b8..0000000 --- a/allegro-4.2.0-noexecstack.patch +++ /dev/null @@ -1,207 +0,0 @@ ---- allegro-4.2.0/src/x/xdga2s.s.noexecstack 2004-08-27 15:54:05.000000000 +0200 -+++ allegro-4.2.0/src/x/xdga2s.s 2006-07-06 17:22:04.000000000 +0200 -@@ -48,6 +48,7 @@ - - ret - -+.section .note.GNU-stack,"",@progbits - #endif - #endif - ---- allegro-4.2.0/src/x/xwins.s.noexecstack 2004-09-03 11:30:45.000000000 +0200 -+++ allegro-4.2.0/src/x/xwins.s 2006-07-06 17:22:04.000000000 +0200 -@@ -49,5 +49,6 @@ - popl %ecx - ret - -+.section .note.GNU-stack,"",@progbits - #endif - ---- allegro-4.2.0/src/i386/iblit16.s.noexecstack 2005-06-22 18:51:16.000000000 +0200 -+++ allegro-4.2.0/src/i386/iblit16.s 2006-07-06 17:22:04.000000000 +0200 -@@ -741,5 +741,5 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR16 */ ---- allegro-4.2.0/src/i386/iblit24.s.noexecstack 2005-06-22 18:51:16.000000000 +0200 -+++ allegro-4.2.0/src/i386/iblit24.s 2006-07-06 17:22:04.000000000 +0200 -@@ -370,5 +370,5 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR24 */ ---- allegro-4.2.0/src/i386/iblit32.s.noexecstack 2005-06-22 18:51:16.000000000 +0200 -+++ allegro-4.2.0/src/i386/iblit32.s 2006-07-06 17:22:04.000000000 +0200 -@@ -355,5 +355,5 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR32 */ ---- allegro-4.2.0/src/i386/iblit8.s.noexecstack 2005-06-22 18:51:16.000000000 +0200 -+++ allegro-4.2.0/src/i386/iblit8.s 2006-07-06 17:22:04.000000000 +0200 -@@ -785,5 +785,5 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR8 */ ---- allegro-4.2.0/src/i386/icpus.s.noexecstack 2005-03-10 19:28:16.000000000 +0100 -+++ allegro-4.2.0/src/i386/icpus.s 2006-07-06 17:22:04.000000000 +0200 -@@ -213,3 +213,4 @@ - popl %ebp - ret - -+.section .note.GNU-stack,"",@progbits ---- allegro-4.2.0/src/i386/igfx15.s.noexecstack 2000-05-14 22:17:13.000000000 +0200 -+++ allegro-4.2.0/src/i386/igfx15.s 2006-07-06 17:22:04.000000000 +0200 -@@ -433,6 +433,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR16 */ - ---- allegro-4.2.0/src/i386/igfx16.s.noexecstack 2000-05-14 22:17:11.000000000 +0200 -+++ allegro-4.2.0/src/i386/igfx16.s 2006-07-06 17:22:04.000000000 +0200 -@@ -484,6 +484,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR16 */ - ---- allegro-4.2.0/src/i386/igfx24.s.noexecstack 2000-05-14 22:17:13.000000000 +0200 -+++ allegro-4.2.0/src/i386/igfx24.s 2006-07-06 17:22:04.000000000 +0200 -@@ -578,6 +578,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR24 */ - ---- allegro-4.2.0/src/i386/igfx32.s.noexecstack 2000-05-14 22:17:11.000000000 +0200 -+++ allegro-4.2.0/src/i386/igfx32.s 2006-07-06 17:22:04.000000000 +0200 -@@ -464,6 +464,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR32 */ - ---- allegro-4.2.0/src/i386/igfx8.s.noexecstack 2001-04-09 06:49:29.000000000 +0200 -+++ allegro-4.2.0/src/i386/igfx8.s 2006-07-06 17:22:04.000000000 +0200 -@@ -527,6 +527,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR8 */ - ---- allegro-4.2.0/src/i386/imisc.s.noexecstack 2002-07-05 12:23:47.000000000 +0200 -+++ allegro-4.2.0/src/i386/imisc.s 2006-07-06 17:22:04.000000000 +0200 -@@ -600,3 +600,4 @@ - popl %ebp - ret /* end of fixhypot() */ - -+.section .note.GNU-stack,"",@progbits ---- allegro-4.2.0/src/i386/iscan.s.noexecstack 2004-09-06 18:06:53.000000000 +0200 -+++ allegro-4.2.0/src/i386/iscan.s 2006-07-06 17:22:04.000000000 +0200 -@@ -2777,3 +2777,5 @@ - ret /* end of _poly_scanline_ptex_mask_trans24() */ - - #endif /* COLOR24 */ -+ -+.section .note.GNU-stack,"",@progbits ---- allegro-4.2.0/src/i386/iscanmmx.s.noexecstack 2003-07-16 21:43:28.000000000 +0200 -+++ allegro-4.2.0/src/i386/iscanmmx.s 2006-07-06 17:22:04.000000000 +0200 -@@ -1670,5 +1670,5 @@ - - #endif /* COLOR24 */ - -- -+.section .note.GNU-stack,"",@progbits - #endif /* MMX */ ---- allegro-4.2.0/src/i386/ispr15.s.noexecstack 2001-11-10 20:31:50.000000000 +0100 -+++ allegro-4.2.0/src/i386/ispr15.s 2006-07-06 17:22:04.000000000 +0200 -@@ -491,6 +491,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR16 */ - ---- allegro-4.2.0/src/i386/ispr16.s.noexecstack 2002-10-02 20:29:57.000000000 +0200 -+++ allegro-4.2.0/src/i386/ispr16.s 2006-07-06 17:22:04.000000000 +0200 -@@ -886,6 +886,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR16 */ - ---- allegro-4.2.0/src/i386/ispr24.s.noexecstack 2002-10-02 20:29:57.000000000 +0200 -+++ allegro-4.2.0/src/i386/ispr24.s 2006-07-06 17:22:04.000000000 +0200 -@@ -910,6 +910,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR24 */ - ---- allegro-4.2.0/src/i386/ispr32.s.noexecstack 2002-10-02 20:29:57.000000000 +0200 -+++ allegro-4.2.0/src/i386/ispr32.s 2006-07-06 17:22:04.000000000 +0200 -@@ -697,6 +697,6 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR32 */ - ---- allegro-4.2.0/src/i386/ispr8.s.noexecstack 2004-10-16 21:44:25.000000000 +0200 -+++ allegro-4.2.0/src/i386/ispr8.s 2006-07-06 17:22:04.000000000 +0200 -@@ -1044,5 +1044,5 @@ - - - -- -+.section .note.GNU-stack,"",@progbits - #endif /* ifdef ALLEGRO_COLOR8 */ ---- allegro-4.2.0/src/i386/izbuf.s.noexecstack 2004-04-08 21:26:20.000000000 +0200 -+++ allegro-4.2.0/src/i386/izbuf.s 2006-07-06 17:22:04.000000000 +0200 -@@ -2328,3 +2328,5 @@ - ret /* end of _poly_zbuf_ptex_mask_trans24() */ - - #endif /* COLOR24 */ -+ -+.section .note.GNU-stack,"",@progbits ---- allegro-4.2.0/src/misc/icolconv.s.noexecstack 2006-07-06 17:32:28.000000000 +0200 -+++ allegro-4.2.0/src/misc/icolconv.s 2006-07-06 17:34:31.000000000 +0200 -@@ -3288,3 +3288,4 @@ - - #endif /* ALLEGRO_NO_COLORCOPY */ - -+.section .note.GNU-stack,"",@progbits ---- allegro-4.2.0/src/amd64/acpus.s.noexecstack 2005-03-07 11:24:38.000000000 +0100 -+++ allegro-4.2.0/src/amd64/acpus.s 2006-07-06 17:22:04.000000000 +0200 -@@ -128,3 +128,4 @@ - popq %rbp - ret - -+.section .note.GNU-stack,"",@progbits diff --git a/allegro-4.2.0-nostrip.patch b/allegro-4.2.0-nostrip.patch deleted file mode 100644 index 796f71b..0000000 --- a/allegro-4.2.0-nostrip.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- allegro-4.2.0/misc/deplib.sh.nostrip 2006-01-23 21:35:02.000000000 +0100 -+++ allegro-4.2.0/misc/deplib.sh 2006-01-23 21:35:09.000000000 +0100 -@@ -70,7 +70,7 @@ - done - echo "$prev" - echo "" --write_code alleg LIBALLEG -s -+write_code alleg LIBALLEG "" - echo "" - echo "" - diff --git a/allegro-4.4.2-buildsys-fix.patch b/allegro-4.4.2-buildsys-fix.patch new file mode 100644 index 0000000..68d00dd --- /dev/null +++ b/allegro-4.4.2-buildsys-fix.patch @@ -0,0 +1,12 @@ +diff -up allegro-4.4.2/docs/CMakeLists.txt~ allegro-4.4.2/docs/CMakeLists.txt +--- allegro-4.4.2/docs/CMakeLists.txt~ 2011-07-13 10:40:58.000000000 +0200 ++++ allegro-4.4.2/docs/CMakeLists.txt 2011-07-13 10:47:19.561523944 +0200 +@@ -72,7 +72,7 @@ foreach(page ${DOC_SRCS}) + string(REPLACE "._tx" "" basename ${basename}) + + set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page}) +- if(${page} MATCHES "/build/") ++ if(${page} MATCHES "src/build/") + set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.txt) + set(html_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.html) + else() diff --git a/allegro-4.4.2-compat-fix-aliases.patch b/allegro-4.4.2-compat-fix-aliases.patch new file mode 100644 index 0000000..88164cb --- /dev/null +++ b/allegro-4.4.2-compat-fix-aliases.patch @@ -0,0 +1,27 @@ +--- a/include/allegro/alcompat.h ++++ b/include/allegro/alcompat.h +@@ -40,6 +40,24 @@ + #endif + #endif + ++ #ifdef ALLEGRO_FIX_ALIASES ++ AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y)) ++ AL_ALIAS(fixed fsub(fixed x, fixed y), fixsub(x, y)) ++ AL_ALIAS(fixed fmul(fixed x, fixed y), fixmul(x, y)) ++ AL_ALIAS(fixed fdiv(fixed x, fixed y), fixdiv(x, y)) ++ AL_ALIAS(int fceil(fixed x), fixceil(x)) ++ AL_ALIAS(int ffloor(fixed x), fixfloor(x)) ++ AL_ALIAS(fixed fcos(fixed x), fixcos(x)) ++ AL_ALIAS(fixed fsin(fixed x), fixsin(x)) ++ AL_ALIAS(fixed ftan(fixed x), fixtan(x)) ++ AL_ALIAS(fixed facos(fixed x), fixacos(x)) ++ AL_ALIAS(fixed fasin(fixed x), fixasin(x)) ++ AL_ALIAS(fixed fatan(fixed x), fixatan(x)) ++ AL_ALIAS(fixed fatan2(fixed y, fixed x), fixatan2(y, x)) ++ AL_ALIAS(fixed fsqrt(fixed x), fixsqrt(x)) ++ AL_ALIAS(fixed fhypot(fixed x, fixed y), fixhypot(x, y)) ++ #endif ++ + #endif /* !defined ALLEGRO_SRC */ + + diff --git a/allegro-4.4.2-doc-noversion.patch b/allegro-4.4.2-doc-noversion.patch new file mode 100644 index 0000000..38b3f9d --- /dev/null +++ b/allegro-4.4.2-doc-noversion.patch @@ -0,0 +1,32 @@ +diff -up allegro-4.4.2/docs/CMakeLists.txt~ allegro-4.4.2/docs/CMakeLists.txt +--- allegro-4.4.2/docs/CMakeLists.txt~ 2009-10-31 00:05:30.000000000 +0100 ++++ allegro-4.4.2/docs/CMakeLists.txt 2011-07-12 11:24:06.604309215 +0200 +@@ -8,8 +8,8 @@ if(NOT WANT_DOCS OR CMAKE_CROSSCOMPILING + return() + endif() + +-set(DOCDIR "doc" CACHE STRING "Install docs into $DOCDIR/allegro-$VERSION") +-set(ACTUAL_DOC_DIR "${DOCDIR}/allegro-${ALLEGRO_VERSION}") ++set(DOCDIR "doc" CACHE STRING "Install docs into $DOCDIR") ++set(ACTUAL_DOC_DIR "${DOCDIR}") + + add_executable(makedoc + src/makedoc/makedoc.c +@@ -156,7 +156,7 @@ endif(UNIX) + # + + option(WANT_DOCS_MAN "Generate man pages" on) +-set(MANDIR "man" CACHE STRING "Install man pages into this directory") ++set(MANDIR "share/man" CACHE STRING "Install man pages into this directory") + + if(WANT_DOCS_MAN) + set(man_out ${CMAKE_CURRENT_BINARY_DIR}/man/allegro_init.3) +@@ -187,7 +187,7 @@ endif(WANT_DOCS_MAN) + option(WANT_DOCS_INFO "Generate Info document" on) + find_program(MAKEINFO NAMES makeinfo) + mark_as_advanced(MAKEINFO) +-set(INFODIR "info" CACHE STRING "Install Info docs into this directory") ++set(INFODIR "share/info" CACHE STRING "Install Info docs into this directory") + + if(WANT_DOCS_INFO AND MAKEINFO) + set(texi_out ${CMAKE_CURRENT_BINARY_DIR}/texi/allegro.texi) diff --git a/allegro-4.4.2-keybgrab-fix.patch b/allegro-4.4.2-keybgrab-fix.patch new file mode 100644 index 0000000..62e1c08 --- /dev/null +++ b/allegro-4.4.2-keybgrab-fix.patch @@ -0,0 +1,43 @@ +diff -up allegro-4.4.2/src/x/xwin.c~ allegro-4.4.2/src/x/xwin.c +--- allegro-4.4.2/src/x/xwin.c~ 2015-06-23 11:04:53.000000000 +0200 ++++ allegro-4.4.2/src/x/xwin.c 2015-06-23 11:09:33.010580738 +0200 +@@ -26,6 +26,7 @@ + #include "xwin.h" + + #include ++#include + #include + #include + #include +@@ -736,6 +736,8 @@ static void _xwin_private_setup_driver_d + static BITMAP *_xwin_private_create_screen(GFX_DRIVER *drv, int w, int h, + int vw, int vh, int depth, int fullscreen) + { ++ int i; ++ + if (_xwin.window == None) { + ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("No window")); + return 0; +@@ -816,8 +818,20 @@ static BITMAP *_xwin_private_create_scre + XReparentWindow(_xwin.display, _xwin.window, _xwin.fs_window, 0, 0); + + /* Grab the keyboard and mouse. */ +- if (XGrabKeyboard(_xwin.display, XDefaultRootWindow(_xwin.display), False, +- GrabModeAsync, GrabModeAsync, CurrentTime) != GrabSuccess) { ++ ++ /* ++ * Sometimes the window-manager has grabbed the keyboard while it is ++ * starting an allegro app, so if grabing fails retry for 2 seconds ++ * before giving up. ++ */ ++ for (i = 0; i < 20; i++) { ++ if (XGrabKeyboard(_xwin.display, XDefaultRootWindow(_xwin.display), False, ++ GrabModeAsync, GrabModeAsync, CurrentTime) == GrabSuccess) ++ break; ++ ++ usleep(100000); /* Sleep 100 ms before retrying */ ++ } ++ if (i == 20) { + ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Can not grab keyboard")); + return 0; + } diff --git a/allegro-4.4.2-mutex-fix.patch b/allegro-4.4.2-mutex-fix.patch new file mode 100644 index 0000000..e2e6ae1 --- /dev/null +++ b/allegro-4.4.2-mutex-fix.patch @@ -0,0 +1,91 @@ +diff -up allegro-4.4.2/src/unix/uthreads.c~ allegro-4.4.2/src/unix/uthreads.c +--- allegro-4.4.2/src/unix/uthreads.c~ 2009-11-22 02:17:42.000000000 +0100 ++++ allegro-4.4.2/src/unix/uthreads.c 2014-10-29 15:00:24.977558559 +0100 +@@ -303,32 +303,27 @@ struct bg_manager _bg_man_pthreads = { + + + +-/* custom mutex that supports nested locking */ +-struct my_mutex { +- int lock_count; /* level of nested locking */ +- pthread_t owner; /* thread which owns the mutex */ +- pthread_mutex_t actual_mutex; /* underlying mutex object */ +-}; +- +- +- + /* _unix_create_mutex: + * Creates a mutex and returns a pointer to it. + */ + void *_unix_create_mutex(void) + { +- struct my_mutex *mx; ++ pthread_mutex_t *mx; ++ pthread_mutexattr_t attr; + +- mx = _AL_MALLOC(sizeof(struct my_mutex)); ++ mx = _AL_MALLOC(sizeof(pthread_mutex_t)); + if (!mx) { + *allegro_errno = ENOMEM; + return NULL; + } + +- mx->lock_count = 0; +- mx->owner = (pthread_t) 0; ++ pthread_mutexattr_init(&attr); ++ if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0) ++ abort(); /* XXX */ + +- pthread_mutex_init(&mx->actual_mutex, NULL); ++ pthread_mutex_init(mx, &attr); ++ ++ pthread_mutexattr_destroy(&attr); + + return (void *)mx; + } +@@ -340,11 +335,8 @@ void *_unix_create_mutex(void) + */ + void _unix_destroy_mutex(void *handle) + { +- struct my_mutex *mx = (struct my_mutex *)handle; +- +- pthread_mutex_destroy(&mx->actual_mutex); +- +- _AL_FREE(mx); ++ pthread_mutex_destroy(handle); ++ _AL_FREE(handle); + } + + +@@ -354,14 +346,7 @@ void _unix_destroy_mutex(void *handle) + */ + void _unix_lock_mutex(void *handle) + { +- struct my_mutex *mx = (struct my_mutex *)handle; +- +- if (mx->owner != pthread_self()) { +- pthread_mutex_lock(&mx->actual_mutex); +- mx->owner = pthread_self(); +- } +- +- mx->lock_count++; ++ pthread_mutex_lock(handle); + } + + +@@ -371,14 +356,7 @@ void _unix_lock_mutex(void *handle) + */ + void _unix_unlock_mutex(void *handle) + { +- struct my_mutex *mx = (struct my_mutex *)handle; +- +- mx->lock_count--; +- +- if (mx->lock_count == 0) { +- mx->owner = (pthread_t) 0; +- pthread_mutex_unlock(&mx->actual_mutex); +- } ++ pthread_mutex_unlock(handle); + } + + #endif /* ALLEGRO_HAVE_LIBPTHREAD */ diff --git a/allegro-4.4.2-no-xsync-from-thread.patch b/allegro-4.4.2-no-xsync-from-thread.patch new file mode 100644 index 0000000..60c429b --- /dev/null +++ b/allegro-4.4.2-no-xsync-from-thread.patch @@ -0,0 +1,17 @@ +Calling Xsync from the bg thread causes deadlock issues +diff -up allegro-4.4.2/src/x/xwin.c~ allegro-4.4.2/src/x/xwin.c +--- allegro-4.4.2/src/x/xwin.c~ 2009-10-17 09:05:12.000000000 +0200 ++++ allegro-4.4.2/src/x/xwin.c 2014-10-29 15:17:08.381148654 +0100 +@@ -2463,11 +2463,8 @@ void _xwin_private_handle_input(void) + _mouse_y - (_xwin_mouse_extended_range ? _xwin.scroll_y : 0)); + } + +- /* Flush X-buffers. */ +- _xwin_private_flush_buffers(); +- + /* How much events are available in the queue. */ +- events = events_queued = XEventsQueued(_xwin.display, QueuedAlready); ++ events = events_queued = XPending(_xwin.display); + if (events <= 0) + return; + diff --git a/allegro-4.4.3-dat2c-buffer-overflow.patch b/allegro-4.4.3-dat2c-buffer-overflow.patch new file mode 100644 index 0000000..118fd4d --- /dev/null +++ b/allegro-4.4.3-dat2c-buffer-overflow.patch @@ -0,0 +1,32 @@ +tools/dat2c: Fix a buffer overlow + +When prefix is set and datafile_name is not set then +strlen(prefix) + 6 bytes are necessary, not strlen(prefix) 5, +because then we get: "$(prefix)_data\0" which requires 6 bytes +extra for "_data\0". + +This fixes dat2c crashing like this: + + dat2c mbdata.dat -o mbdata.c -h mbdata.h -p mb -g + *** buffer overflow detected ***: terminated + make: *** [Makefile:45: mbdata.c] Aborted (core dumped) + +When compiled with a recent gcc version + a high FORTIFY_SOURCE setting. + +Link: https://bugzilla.redhat.com/show_bug.cgi?id=2225996 +diff -up allegro-4.4.3.1/tools/dat2c.c~ allegro-4.4.3.1/tools/dat2c.c +--- allegro-4.4.3.1/tools/dat2c.c~ 2019-03-04 02:30:11.000000000 +0100 ++++ allegro-4.4.3.1/tools/dat2c.c 2023-07-26 20:12:52.250765448 +0200 +@@ -1641,9 +1641,10 @@ int do_conversion(struct dat2c *dat2c) + int result = 0; + char *prefixed_name = 0; + +- prefixed_name = malloc(5 + ++ /* 2 for '_' + '\0' */ ++ prefixed_name = malloc(2 + + (dat2c->prefix ? (signed)strlen(dat2c->prefix) : 0) + +- (dat2c->datafile_name ? (signed)strlen(dat2c->datafile_name) : 0)); ++ (dat2c->datafile_name ? (signed)strlen(dat2c->datafile_name) : 4)); + if (!prefixed_name) + out_of_memory(); + sprintf(prefixed_name, "%s%s%s", diff --git a/allegro-4.4.3-datafile-double-free.patch b/allegro-4.4.3-datafile-double-free.patch new file mode 100644 index 0000000..9958b7c --- /dev/null +++ b/allegro-4.4.3-datafile-double-free.patch @@ -0,0 +1,14 @@ +Fix double free in load_file_object + +unload_datafile already calls _AL_FREE. +diff -up allegro-4.4.3/src/datafile.c~ allegro-4.4.3/src/datafile.c +--- allegro-4.4.3/src/datafile.c~ 2019-02-25 23:33:13.000000000 +0100 ++++ allegro-4.4.3/src/datafile.c 2019-02-25 23:39:39.320622137 +0100 +@@ -1348,7 +1348,6 @@ static void *load_file_object(PACKFILE * + /* gracefully handle failure */ + if (failed) { + unload_datafile(dat); +- _AL_FREE(dat); + dat = NULL; + } + diff --git a/allegro-4.4.3-texinfo-non-utf8-input-fix.patch b/allegro-4.4.3-texinfo-non-utf8-input-fix.patch new file mode 100644 index 0000000..30d8f27 --- /dev/null +++ b/allegro-4.4.3-texinfo-non-utf8-input-fix.patch @@ -0,0 +1,11 @@ +diff -up allegro-4.4.3/docs/src/allegro._tx.orig allegro-4.4.3/docs/src/allegro._tx +--- allegro-4.4.3/docs/src/allegro._tx.orig 2019-02-02 20:28:46.000000000 +0100 ++++ allegro-4.4.3/docs/src/allegro._tx 2019-11-04 11:12:39.352699777 +0100 +@@ -23,6 +23,7 @@ + @man_shortdesc_force1=allegro + @man_shortdesc_force2=Allegro game programming library. + @$\input texinfo ++@$@documentencoding ISO-8859-1 + @$@setfilename allegro.inf + @$@settitle Allegro Manual + @$@setchapternewpage odd diff --git a/allegro.rpmlintrc b/allegro.rpmlintrc new file mode 100644 index 0000000..bb33462 --- /dev/null +++ b/allegro.rpmlintrc @@ -0,0 +1,7 @@ +# Some of our sub-packages do not contain docs +addFilter("W: no-documentation") +# Some of our tools do not have a manpage +addFilter("W: no-manual-page-for-binary .*") +# Ignore warnings about some manpages being shared between functions +addFilter("W: files-duplicate /usr/share/man/man3/.*") +addFilter("W: package-with-huge-docs.*") diff --git a/allegro.spec b/allegro.spec index 0c63b74..8005301 100644 --- a/allegro.spec +++ b/allegro.spec @@ -1,35 +1,46 @@ Name: allegro -Version: 4.2.0 -Release: 18%{?dist} +Version: 4.4.3.1 +Release: 19%{?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-digmid.patch -Patch5: allegro-4.2.0-alsa-big-endian.patch -Patch6: allegro-4.2.0-64bit.patch -Patch7: allegro-4.2.0-fullscreen2.patch -Patch8: allegro-4.2.0-mprotect.patch -Patch9: allegro-4.2.0-no-execheap.patch -Patch10: allegro-4.2.0-nicevsync.patch -Patch11: allegro-4.2.0-noexecstack.patch -Patch12: allegro-4.2.0-multilib.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: esound-devel, texinfo, perl, arts-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++ +URL: http://liballeg.org/ +Source0: https://github.com/liballeg/allegro5/releases/download/%{version}/allegro-%{version}.tar.gz +Patch1: allegro-4.0.3-cfg.patch +Patch2: allegro-4.0.3-libdir.patch +Patch5: allegro-4.4.2-buildsys-fix.patch +Patch6: allegro-4.4.2-doc-noversion.patch +# Replace racy recursive mutex implementation with proper recursive mutexes +Patch8: allegro-4.4.2-mutex-fix.patch +# Calling Xsync from the bg thread causes deadlock issues +Patch9: allegro-4.4.2-no-xsync-from-thread.patch +# gnome-shell starts apps while gnome-shell has the keyb grabbed... +Patch10: allegro-4.4.2-keybgrab-fix.patch +# 4.4.3 has dropped the fadd/fsub etc aliases, but some apps need them +Patch11: allegro-4.4.2-compat-fix-aliases.patch +# 4.4.3 accidentally broke the tools, fix them (rhbz1682921) +Patch12: allegro-4.4.3-datafile-double-free.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1767827 +# starting texinfo-6.7 the default encoding is UTF-8 and because allegro's +# source .texi file is encoded in ISO-8859-1, additional command is needed +Patch13: allegro-4.4.3-texinfo-non-utf8-input-fix.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2225996 +# Fix a buffer overflow in dat2c tool causing FTBFS of allegro using packages +Patch14: allegro-4.4.3-dat2c-buffer-overflow.patch + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: texinfo cmake +BuildRequires: xorg-x11-proto-devel libX11-devel libXpm-devel libXcursor-devel +BuildRequires: libXxf86vm-devel libXxf86dga-devel libGL-devel libGLU-devel +BuildRequires: alsa-lib-devel jack-audio-connection-kit-devel +BuildRequires: libjpeg-devel libpng-devel libvorbis-devel +Requires: timidity++-patches %description Allegro is a cross-platform library intended for use in computer games @@ -51,17 +62,15 @@ videogiochi ed in altri tipi di programmazione multimediale. Allegro je multiplatformní knihovna pro počítačové hry a jiné typy multimediálního programování. + %package devel 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 -Group: Development/Libraries -Requires: %{name} = %{version}-%{release}, xorg-x11-proto-devel +Summary(cs): Knihovna pro programování her +Requires: %{name}%{?_isa} = %{version}-%{release}, xorg-x11-proto-devel Requires: libX11-devel, libXcursor-devel -Requires(post): /sbin/install-info -Requires(preun): /sbin/install-info %description devel Allegro is a cross-platform library intended for use in computer games @@ -88,14 +97,15 @@ Allegro je multiplatformní knihovna pro počítačové hry a jiné typy multimediálního programování. Tento balíček je je potřebný k sestavení programů napsaných v Allegru. + %package tools 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 -Group: Development/Tools -Requires: %{name} = %{version}-%{release} +Summary(cs): Přídavné nástroje pro programovou knihovnu Allegro +Requires: %{name}%{?_isa} = %{version}-%{release} + %description tools Allegro is a cross-platform library intended for use in computer games @@ -125,98 +135,203 @@ 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 jack-plugin +Summary: Allegro JACK (Jack Audio Connection Kit) plugin +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description jack-plugin +This package contains a plugin for Allegro which enables Allegro to playback +sound through JACK (Jack Audio Connection Kit). + + +%package -n alleggl +Summary: OpenGL support library for Allegro +License: Zlib OR GPL-1.0-or-later +URL: http://allegrogl.sourceforge.net/ +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n alleggl +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. + +%package -n alleggl-devel +Summary: Development files for alleggl +License: Zlib OR GPL-1.0-or-later +Requires: alleggl%{?_isa} = %{version}-%{release} + +%description -n alleggl-devel +The alleggl-devel package contains libraries and header files for +developing applications that use alleggl. + + +%package -n jpgalleg +Summary: JPEG library for the Allegro game library +License: Zlib +URL: http://www.ecplusplus.com/index.php?page=projects&pid=1 +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n jpgalleg +jpgalleg is a JPEG library for use with the Allegro game library. It allows +using JPEG's as Allegro bitmaps. + +%package -n jpgalleg-devel +Summary: Development files for jpgalleg +License: Zlib +Requires: jpgalleg%{?_isa} = %{version}-%{release} + +%description -n jpgalleg-devel +The jpgalleg-devel package contains libraries and header files for +developing applications that use jpgalleg. + + +%package loadpng +Summary: OGG/Vorbis library for the Allegro game library +License: LicenseRef-Fedora-Public-Domain +URL: http://wiki.allegro.cc/index.php?title=LoadPNG +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description loadpng +loadpng is some glue that makes it easy to use libpng to load and +save bitmaps from Allegro programs. + +%package loadpng-devel +Summary: Development files for loadpng +License: LicenseRef-Fedora-Public-Domain +Requires: %{name}-loadpng%{?_isa} = %{version}-%{release} + +%description loadpng-devel +The loadpng-devel package contains libraries and header files for +developing applications that use loadpng. + + +%package logg +Summary: OGG/Vorbis library for the Allegro game library +License: MIT +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description logg +LOGG is an Allegro add-on library for playing OGG/Vorbis audio files. + +%package logg-devel +Summary: Development files for logg +License: MIT +Requires: %{name}-logg%{?_isa} = %{version}-%{release} + +%description logg-devel +The logg-devel package contains libraries and header files for +developing applications that use logg. + %prep -%setup -q -%patch1 -p1 -b .libdir -%patch2 -p1 -b .config -%patch3 -p1 -z .nostrip -%patch4 -p1 -z .digmid -%patch5 -p1 -z .alsa-big-endian -%patch6 -p1 -z .64bit -%patch7 -p1 -z .fullscreen -%patch8 -p1 -z .mprotect -%patch9 -p1 -z .execheap -%patch10 -p1 -z .nicevsync -%patch11 -p1 -z .noexecstack -%patch12 -p1 -z .multilib - +%autosetup -p1 %build -%configure \ -%ifnarch %{ix86} - --enable-vga=no --enable-vbeaf=no \ +export CMAKE_POLICY_VERSION_MINIMUM=3.5 +%cmake \ +%if "%{?_lib}" == "lib64" + %{?_cmake_lib_suffix64} \ %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 -MKDATA_PRELOAD=../../lib/unix/liballeg-%{version}.so \ - DAT=../../tools/dat sh misc/mkdata.sh + -DOpenGL_GL_PREFERENCE:STRING=LEGACY -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ + -DDOCDIR:STRING=%{_pkgdocdir} -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE +%cmake_build +pushd %{_vpath_builddir} +# Converting text documentation to UTF-8 encoding. +for file in docs/AUTHORS docs/CHANGES docs/THANKS \ + docs/info/*.info docs/txt/*.txt docs/man/get_camera_matrix.3 \ + ../addons/allegrogl/changelog; do + iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ + touch -r $file $file.new && \ + mv $file.new $file +done +popd %install -rm -rf $RPM_BUILD_ROOT -make install install-man install-info \ - DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true +%cmake_install + +pushd %{_vpath_builddir} +# installation of these is broken, because they use a cmake GLOB, but +# that gets "resolved" when runnning cmake, and at that time the files +# to install aren't generated yet ... +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 +mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/html +install -p -m 644 docs/man/*.3 $RPM_BUILD_ROOT%{_mandir}/man3 +install -p -m 644 docs/html/*.{html,css} \ + $RPM_BUILD_ROOT%{_pkgdocdir}/html/ +install -m 755 docs/makedoc $RPM_BUILD_ROOT%{_bindir}/allegro-makedoc +popd + +# Install some extra files install -Dpm 644 allegro.cfg $RPM_BUILD_ROOT%{_sysconfdir}/allegrorc +install -pm 755 tools/x11/xfixicon.sh $RPM_BUILD_ROOT%{_bindir} install -dm 755 $RPM_BUILD_ROOT%{_datadir}/allegro install -pm 644 keyboard.dat language.dat $RPM_BUILD_ROOT%{_datadir}/allegro -find demo examples setup -type f -perm +111 -print | xargs rm -chmod 755 `find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.so"` -rm -f $RPM_BUILD_ROOT%{_infodir}/dir -rm -f $RPM_BUILD_ROOT%{_libdir}/liball{p,d}_unsharable.a +install -Dpm 644 misc/allegro.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal/allegro.m4 + +mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/allegrogl +install -pm 644 addons/allegrogl/changelog addons/allegrogl/faq.txt \ + addons/allegrogl/readme.txt addons/allegrogl/bugs.txt \ + addons/allegrogl/extensions.txt addons/allegrogl/howto.txt addons/allegrogl/quickstart.txt \ + addons/allegrogl/todo.txt $RPM_BUILD_ROOT%{_pkgdocdir}/allegrogl/ + +mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/loadpng +install -pm 644 addons/loadpng/CHANGES.txt addons/loadpng/README.txt addons/loadpng/THANKS.txt \ + $RPM_BUILD_ROOT%{_pkgdocdir}/loadpng/ + +mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/jpgalleg +install -pm 644 addons/jpgalleg/readme.txt \ + $RPM_BUILD_ROOT%{_pkgdocdir}/jpgalleg/ -%post -p /sbin/ldconfig +%ldconfig_scriptlets +%ldconfig_scriptlets -n alleggl -%postun -p /sbin/ldconfig +%ldconfig_scriptlets -n jpgalleg -%post devel -/sbin/install-info %{_infodir}/allegro.info %{_infodir}/dir 2>/dev/null || : +%ldconfig_scriptlets loadpng -%preun devel -if [ $1 -eq 0 ] ; then - /sbin/install-info --delete %{_infodir}/allegro.info %{_infodir}/dir \ - 2>/dev/null || : -fi - - -%clean -rm -rf $RPM_BUILD_ROOT +%ldconfig_scriptlets logg %files -%defattr(-,root,root,-) -%doc readme.txt docs/build/unix.txt docs/build/linux.txt -%doc AUTHORS CHANGES THANKS +%{_pkgdocdir}/ +%exclude %{_pkgdocdir}/dat*.txt +%exclude %{_pkgdocdir}/grabber.txt +%exclude %{_pkgdocdir}/allegrogl +%exclude %{_pkgdocdir}/jpgalleg +%exclude %{_pkgdocdir}/loadpng +%exclude %{_pkgdocdir}/loadpng +%license %{_pkgdocdir}/license.txt %config(noreplace) %{_sysconfdir}/allegrorc -%{_libdir}/liballeg*.so* -%{_libdir}/allegro +%{_libdir}/liballeg.so.4* %{_datadir}/allegro +# We cannot use exclude for alleg-jack.so because then the build-id for it +# still ends up in the main allegro package, e.g. rpmlint says: +# allegro.x86_64: W: dangling-relative-symlink /usr/lib/.build-id/48/024a0ddad02d9c6f4b956fb18f20d4a0bfde41 ../../../../usr/lib64/allegro/4.4.3/alleg-jack.so +%dir %{_libdir}/allegro +%dir %{_libdir}/allegro/4.4.3 +%{_libdir}/allegro/4.4.3/alleg-alsa*.so +%{_libdir}/allegro/4.4.3/alleg-dga2.so +%{_libdir}/allegro/4.4.3/modules.lst %files devel -%defattr(-,root,root,-) -%doc docs/txt/abi.txt docs/txt/ahack.txt docs/txt/allegro.txt -%doc docs/txt/const.txt docs/txt/faq.txt docs/txt/help.txt -%doc todo.txt docs/html -%doc demo examples setup %{_bindir}/allegro-config -%{_libdir}/liballeg_unsharable.a -%{_libdir}/liball?.so.* -%{_libdir}/liball?-%{version}.so -%{_includedir}/*alleg* +%{_bindir}/allegro-makedoc +%{_libdir}/liballeg.so +%{_libdir}/pkgconfig/allegro.pc +%{_includedir}/allegro +%{_includedir}/allegro.h +%{_includedir}/xalleg.h +%{_datadir}/aclocal/allegro.m4 %{_infodir}/allegro.info* %{_mandir}/man3/* -%{_datadir}/aclocal/allegro.m4 %files tools -%defattr(-,root,root,-) -%doc tools/plugins/plugins.txt +%{_pkgdocdir}/dat*.txt +%{_pkgdocdir}/grabber.txt %{_bindir}/colormap %{_bindir}/dat %{_bindir}/dat2s @@ -227,172 +342,113 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/pat2dat %{_bindir}/rgbmap %{_bindir}/textconv +%{_bindir}/xfixicon.sh + +%files jack-plugin +%{_libdir}/allegro/4.4.3/alleg-jack.so + +%files -n alleggl +%license addons/allegrogl/gpl.txt +%license addons/allegrogl/zlib.txt +%{_libdir}/liballeggl.so.4* + +%files -n alleggl-devel +%{_pkgdocdir}/allegrogl/ +%{_libdir}/liballeggl.so +%{_libdir}/pkgconfig/allegrogl.pc +%{_includedir}/alleggl.h +%{_includedir}/allegrogl + +%files -n jpgalleg +%license addons/jpgalleg/license.txt +%{_libdir}/libjpgalleg.so.4* + +%files -n jpgalleg-devel +%{_pkgdocdir}/jpgalleg/ +%{_libdir}/libjpgalleg.so +%{_libdir}/pkgconfig/jpgalleg.pc +%{_includedir}/jpgalleg.h + +%files loadpng +%license addons/loadpng/LICENSE.txt +%{_pkgdocdir}/loadpng/ +%{_libdir}/libloadpng.so.4* + +%files loadpng-devel +%{_libdir}/libloadpng.so +%{_libdir}/pkgconfig/loadpng.pc +%{_includedir}/loadpng.h + +%files logg +%license addons/logg/LICENSE.txt +%{_libdir}/liblogg.so.4* + +%files logg-devel +%{_libdir}/liblogg.so +%{_libdir}/pkgconfig/logg.pc +%{_includedir}/logg.h %changelog -* Sun Oct 15 2006 Hans de Goede 4.2.0-18 -- Multilib devel goodness (make allegro-devel i386 and x86_64 parallel - installable) +* Fri Jan 16 2026 Fedora Release Engineering - 4.4.3.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild -* Sat Sep 2 2006 Hans de Goede 4.2.0-17 -- FE6 Rebuild +* Wed Jul 23 2025 Fedora Release Engineering - 4.4.3.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Fri Jul 14 2006 Hans de Goede 4.2.0-16 -- Don't package the main allegro lib in -devel as its already in the main - package, iow only put the debug and profile versions -devel. +* Thu Jul 17 2025 Cristian Le - 4.4.3.1-17 +- Add LIB_SUFFIX flag explicitly (rhbz#2381173) -* Thu Jul 6 2006 Hans de Goede 4.2.0-15 -- Stop allegro from making applications linked against it claim that they - need an executable stack (Patch11). Unfortunatly this requires a rebuild of - all applications linked against allegro. +* Fri May 30 2025 Cristian Le - 4.4.3.1-16 +- Allow to build with CMake 4.0 -* Mon Jun 26 2006 Jindrich Novy 4.2.0-14 -- compile alld and allp debuging/profiling libraries (#196616) -- fix typo in release caused by recent changes +* Thu Jan 16 2025 Fedora Release Engineering - 4.4.3.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild -* Sat Jun 10 2006 Hans de Goede 4.2.0-13 -- Add autoconf BR for missing autoheader with the new mock config. +* Wed Jul 17 2024 Fedora Release Engineering - 4.4.3.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild -* Tue Mar 21 2006 Hans de Goede 4.2.0-12 -- Sleep in xwindows vsync emulation, instead of busy waiting. -- Add %%{dist} to Release +* Mon Jan 22 2024 Fedora Release Engineering - 4.4.3.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Mon Mar 13 2006 Hans de Goede 4.2.0-11 -- really, _really_ fix asm stretch code on i386 with NX processors, long -  story see bugzilla bug 185214 . +* Fri Jan 19 2024 Fedora Release Engineering - 4.4.3.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Sat Mar 11 2006 Hans de Goede 4.2.0-10 -- really fix asm stretch code on i386 with NX processors, on OpenBSD mprotects - first argument does not need to be page-aligned, but on Linux it does. - Note that for this to work you may also need to disable selinux (rh 185214) +* Wed Jul 26 2023 Hans de Goede - 4.4.3.1-11 +- Fix dat2c bug causing FTBFS of allegro using packages (rhbz#2225996) +- Trim changelog -* Wed Mar 8 2006 Hans de Goede 4.2.0-9 -- fix fullscreen <-> window switching bug (bz 183645) -- fix asm stretch code on i386 with NX processors, thanks to openBSD. +* Wed Jul 19 2023 Fedora Release Engineering - 4.4.3.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild -* Mon Feb 27 2006 Hans de Goede 4.2.0-8 -- fix sound not working on PPC (bz 183112) -- fix allegro not finding and loading plugins/modules on x86_64 (bz 183113) +* Wed Jan 18 2023 Fedora Release Engineering - 4.4.3.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild -* Tue Feb 8 2006 Jindrich Novy 4.2.0-7 -- set timidity++ as Requires instead of BuildRequires +* Wed Jul 20 2022 Fedora Release Engineering - 4.4.3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -* Tue Feb 7 2006 Jindrich Novy 4.2.0-6 -- fix digmid loading of timidity midi patches (#180154) +* Wed Jan 19 2022 Fedora Release Engineering - 4.4.3.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild -* Wed Jan 25 2006 Jindrich Novy 4.2.0-5 -- update default allegro configuration to use sound successfully, - thanks to Hans de Goede (#178383) -- add timidity++ dependency +* Wed Jul 21 2021 Fedora Release Engineering - 4.4.3.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -* Mon Jan 23 2006 Hans de Goede 4.2.0-4 -- add allegro-4.2.0-nostrip.patch, so that the main .so file - doesn't get stripped and we actually get debuginfo for it in - allegro-debuginfo +* Mon Jan 25 2021 Fedora Release Engineering - 4.4.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild -* Fri Jan 20 2006 Hans de Goede 4.2.0-3 -- update / fix BuildRequires for modular X (bz 178245) +* Fri Jul 31 2020 Fedora Release Engineering - 4.4.3.1-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild -* Fri Dec 16 2005 Jindrich Novy 4.2.0-2 -- update dependencies for the new modular X -- disable _smp_mflags to workaround build failure caused - by bad dependencies +* Mon Jul 27 2020 Fedora Release Engineering - 4.4.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild -* Wed May 25 2005 Jindrich Novy 4.2.0-1 -- update to 4.2.0 -- package dat2c, allegro.m4 -- replace XFree86-devel Buildrequires with xorg-x11-devel -- drop mmaptest, novga, gcc4 patches +* Tue Jan 28 2020 Fedora Release Engineering - 4.4.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild -* Wed May 25 2005 Jindrich Novy 4.0.3-13 -- fix compilation on x86_64 (#158648) - -* Sun May 22 2005 Jeremy Katz - 4.0.3-12 -- rebuild on all arches - -* Mon May 2 2005 Jindrich Novy 0:4.0.3-11 -- fix build failures with gcc4 (#156224) -- don't use %%{name} in patch names -- add Czech translation to package description/summary - -* Fri Apr 7 2005 Michael Schwendt -- rebuilt - -* Fri Mar 4 2005 Ville Skyttä -- Split context marked dependency syntax to work around #118773. - -* Sun Feb 13 2005 Ville Skyttä - 0:4.0.3-9 -- Disable vga and vbeaf on all non-%%{ix86}. -- Fix lib paths in allegro-config for 64-bit archs. -- Use *nix commands in allegrorc's [grabber] section. - -* Sun Feb 13 2005 Ville Skyttä - 0:4.0.3-8 -- Build without vga and vbeaf on non-x86-like archs. -- Apply upstream patch to fix build without vga. - -* Fri Nov 12 2004 Ville Skyttä - 0:4.0.3-7 -- Explicitly disable svgalib for now. -- Let rpm take care of all stripping. -- Build with whatever the compiler supports, MMX and friends are detected - at runtime. -- Minor specfile style improvements. - -* Wed Nov 10 2004 Michael Schwendt - 0:4.0.3-6 -- Fix build for FC3 via fixed mmap test in configure script. - -* Mon Nov 10 2003 Ville Skyttä - 0:4.0.3-0.fdr.5 -- Use MMX/SSE where appropriate (bug 959). - -* Mon May 26 2003 Ville Skyttä - 0:4.0.3-0.fdr.4 -- Include *.so.* symlink. -- Re-introduce ldconfigs. -- *grumble* - -* Mon May 26 2003 Ville Skyttä - 0:4.0.3-0.fdr.3 -- -devel Requires XFree86-devel. - -* Mon May 26 2003 Ville Skyttä - 0:4.0.3-0.fdr.2 -- Handle --excludedocs installs gracefully. -- BuildRequires arts-devel. -- Make *.so executable so RPM groks autodependencies. -- Update to accordance with current Fedora spec template. - -* Sat Apr 26 2003 Ville Skyttä - 0:4.0.3-0.fdr.1 -- Update to 4.0.3. -- Make build honor optflags. -- Remove redundant ldconfigs. - -* Sat Apr 5 2003 Ville Skyttä - 0:4.0.3-0.fdr.0.1.rc3 -- Update to 4.0.3RC3. - -* Thu Mar 20 2003 Ville Skyttä - 0:4.0.3-0.fdr.0.1.rc2 -- Update to 4.0.3RC2, and to current Fedora guidelines. -- make -jX works again. -- Don't remove info files on -devel upgrade. - -* Wed Feb 19 2003 Warren Togami 4.0.3-0.beta2.fedora.2 -- Disable smp make flags, Makefile needs fixing - -* Wed Feb 12 2003 Ville Skyttä - 4.0.3-0.beta2.fedora.1 -- First Fedora release, based on upstream source RPM. - -* Fri Dec 07 2001 Angelo Mottola 4.0.0-1 -- added italian translation - -* Tue Oct 02 2001 Peter Wang 3.9.39-1 -- icon courtesy of Johan Peitz - -* Mon Sep 24 2001 Peter Wang -- remaining translations by Eric Botcazou and Grzegorz Adam Hankiewicz - -* Sun Sep 23 2001 Peter Wang -- translations by Eric Botcazou and Javier González -- language.dat and keyboard.dat moved to main package -- devel split into devel and tools packages -- makedoc added to tools package - -* Wed Sep 16 2001 Peter Wang -- merged Osvaldo's spec file with gfoot's spec and some other changes - -* Wed Sep 27 2000 Osvaldo Santana Neto -- updated to 3.9.33 +* Tue Nov 05 2019 Antonio Trande - 4.4.3.1-1 +- Release 4.4.3.1 +- Use %%_pkgdocdir +- Use CMake3 on epel +- Use dedicated CMake 'build' directory +- Patched for texinfo-6.7 (rhbz#1767827) diff --git a/sources b/sources index 75ee1c4..d6c8d16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a8b2c85c58b16345fe735f72763f3a6e allegro-4.2.0.tar.gz +SHA512 (allegro-4.4.3.1.tar.gz) = c5a552ab710226493447eb2547b3d7559badb96f511fbefd315b665b7486013a6710c83b69363eb09f90f53ef4278fe7b90cfee88d90d88f0fe8dc7df7606729