Package: libsdl1.2 Version: 1.2.11-1 Severity: serious Tags: patch Justification: Policy 5.6.8
Hi! libsdl1.2 is failing to build in powerpc [0] due to the use of PAGE_SIZE which was dropped in powerpc (and will soon be dropped in the other arches as well). I've created a patch that fixes this problem. I'm dropping the use of PAGE_SIZE completely, in favour of sysconf(_SC_PAGESIZE), as suggested by various developers. I've tested this build in i386, amd64 and powerpc, and it builds fine. Please send this patch upstream. Thanks, Marga
diff -Naru libsdl1.2-1.2.11/src/video/fbcon/SDL_fbvideo.c libsdl1.2-patched/src/video/fbcon/SDL_fbvideo.c --- libsdl1.2-1.2.11/src/video/fbcon/SDL_fbvideo.c 2006-05-17 00:16:07.000000000 -0300 +++ libsdl1.2-patched/src/video/fbcon/SDL_fbvideo.c 2006-08-02 20:46:35.748443472 -0300 @@ -547,7 +547,7 @@ /* Memory map the device, compensating for buggy PPC mmap() */ mapped_offset = (((long)finfo.smem_start) - - (((long)finfo.smem_start)&~(PAGE_SIZE-1))); + (((long)finfo.smem_start)&~(sysconf(_SC_PAGESIZE)-1))); mapped_memlen = finfo.smem_len+mapped_offset; mapped_mem = do_mmap(NULL, mapped_memlen, PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0); diff -Naru libsdl1.2-1.2.11/src/video/ps2gs/SDL_gsyuv.c libsdl1.2-patched/src/video/ps2gs/SDL_gsyuv.c --- libsdl1.2-1.2.11/src/video/ps2gs/SDL_gsyuv.c 2006-05-17 00:16:07.000000000 -0300 +++ libsdl1.2-patched/src/video/ps2gs/SDL_gsyuv.c 2006-08-02 20:35:18.992336121 -0300 @@ -180,7 +180,7 @@ /* Allocate a DMA area for pixel conversion */ bpp = this->screen->format->BytesPerPixel; - map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); + map_offset = (mapped_len + (sysconf(_SC_PAGESIZE)- 1)) & ~(sysconf(_SC_PAGESIZE) - 1); hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) + width * height * bpp + hwdata->macroblocks * (16 * sizeof(long long)) +