allegro, cleanup old (#8936)

This commit is contained in:
Schrijvers Luc
2023-07-03 10:41:56 +02:00
committed by GitHub
parent dd3b1ce6f6
commit 646d32294e
4 changed files with 0 additions and 535 deletions

View File

@@ -1,88 +0,0 @@
SUMMARY="Game programming library"
DESCRIPTION="\
The Allegro library provides C/C++ programmers low-level routines commonly
needed in game programing, such as input, graphics, midi, sound effects,
and timing. It is cross platform and works with many different compilers.
Originally developed by Shawn Hargreaves, it is now a group project with
contributions from all over the world! Some of its key features include:
* Ease of Use - comes with comprehensive documentation and examples
* Extensibility - if the built-in functionality isn't enough, there are many add-ons available
* Cross Platform - without changing a single line of code, you can create versions for Windows, OS X, Linux, DOS, and others! Works with many compilers, including DJGPP and VC++
* Open Source - anyone can contribute, including you!
* Free - it won't cost you a dime, and there are no restrictions on its usage."
HOMEPAGE="http://alleg.sourceforge.net/"
COPYRIGHT="1998-2010 Shawn Hargreaves et al."
LICENSE="Allegro"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/alleg/files/allegro/4.4.1.1/allegro-4.4.1.1.tar.gz/download"
CHECKSUM_SHA256="4e29884cba88b289da5b22da93e8760d68a197d093b23f61e994f3594760d782"
PATCHES="allegro-4.4.1.1.patchset"
ARCHITECTURES="?all"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
allegro$secondaryArchSuffix = $portVersion
lib:liballeg$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libogg
lib:libpng
lib:libvorbis
lib:libz
"
PROVIDES_devel="
allegro${secondaryArchSuffix}_devel = $portVersion compat >= 4.4
cmd:allegro_config = $portVersion compat >= 4.4
cmd:colormap = $portVersion compat >= 4.4
cmd:dat = $portVersion compat >= 4.4
cmd:dat2c = $portVersion compat >= 4.4
cmd:dat2s = $portVersion compat >= 4.4
cmd:exedat = $portVersion compat >= 4.4
cmd:grabber = $portVersion compat >= 4.4
cmd:pack = $portVersion compat >= 4.4
cmd:pat2dat = $portVersion compat >= 4.4
cmd:rgbmap = $portVersion compat >= 4.4
cmd:textconv = $portVersion compat >= 4.4
devel:liballeg$secondaryArchSuffix = $portVersion compat >= 4.4
devel:libjpgalleg = $portVersion compat >= 4.4
devel:libloadpng = $portVersion compat >= 4.4
devel:liblogg = $portVersion compat >= 4.4
"
REQUIRES_devel="
allegro$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libogg
devel:libpng$secondaryArchSuffix
devel:libvorbis
devel:libz
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake . -DCMAKE_INSTALL_PREFIX=$prefix -DDOCDIR=$docDir -DMANDIR=$manDir
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs liballeg libjpgalleg libloadpng liblogg
packageEntries devel $developDir $binDir
}

View File

@@ -1,88 +0,0 @@
SUMMARY="A cross-platform game programming library"
DESCRIPTION="Allegro 4 and Allegro 5 are cross-platform, libraries mainly \
aimed at video game and multimedia programming. They handle common, low-level \
tasks such as creating windows, accepting user input, loading data, drawing \
images, playing sounds, etc. and generally abstracting away the underlying \
platform. However, Allegro is not a game engine: you are free to design and \
structure your program as you like.
According to the Oxford Companion to Music, Allegro is the Italian for «quick, \
lively, bright». It is also a recursive acronym which stands for «Allegro Low \
LEvel Game ROutines». Allegro was started by Shawn Hargreaves in the mid-90's \
but has since received contributions from hundreds of people over the net."
HOMEPAGE="http://alleg.sourceforge.net/"
COPYRIGHT="1998-2010 Shawn Hargreaves et al."
LICENSE="Allegro"
REVISION="3"
SOURCE_URI="http://sourceforge.net/projects/alleg/files/allegro/4.4.2/allegro-4.4.2.tar.gz"
CHECKSUM_SHA256="1b21e7577dbfada02d85ca4510bd22fedaa6ce76fde7f4838c7c1276eb840fdc"
PATCHES="allegro-4.4.2.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
allegro$secondaryArchSuffix = $portVersion
lib:liballeg$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
allegro${secondaryArchSuffix}_devel = $portVersion compat >= 4.4
cmd:allegro_config$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:colormap$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:dat$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:dat2c$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:dat2s$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:exedat$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:grabber$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:pack$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:pat2dat$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:rgbmap$secondaryArchSuffix = $portVersion compat >= 4.4
cmd:textconv$secondaryArchSuffix = $portVersion compat >= 4.4
devel:liballeg$secondaryArchSuffix = $portVersion compat >= 4.4
devel:libjpgalleg$secondaryArchSuffix = $portVersion compat >= 4.4
devel:libloadpng$secondaryArchSuffix = $portVersion compat >= 4.4
devel:liblogg$secondaryArchSuffix = $portVersion compat >= 4.4
"
REQUIRES_devel="
allegro$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libogg$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake . -DCMAKE_INSTALL_PREFIX=$prefix -DDOCDIR=$docDir -DMANDIR=$manDir \
-DLIB_SUFFIX=$secondaryArchSubDir
make $jobArgs
}
INSTALL()
{
make install
fixPkgconfig
prepareInstalledDevelLibs liballeg libjpgalleg libloadpng liblogg
packageEntries devel $developDir $binDir
}

View File

@@ -1,180 +0,0 @@
From cbe10814911be2ea285d73d455065e430bf6c92a Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 29 Nov 2013 21:27:01 +0100
Subject: applying patch allegro-4.4.1.1.patch
diff --git a/src/beos/bdwindow.cpp b/src/beos/bdwindow.cpp
index 2ef8460..28c9678 100644
--- a/src/beos/bdwindow.cpp
+++ b/src/beos/bdwindow.cpp
@@ -413,9 +413,9 @@ static struct BITMAP *_be_gfx_bdirectwindow_init(GFX_DRIVER *drv, int w, int h,
}
#ifdef ALLEGRO_NO_ASM
- bmp->read_bank = _be_gfx_bwindow_read_write_bank;
- bmp->write_bank = _be_gfx_bwindow_read_write_bank;
- _screen_vtable.unwrite_bank = _be_gfx_bwindow_unwrite_bank;
+ bmp->read_bank = (void *)_be_gfx_bwindow_read_write_bank;
+ bmp->write_bank = (void *)_be_gfx_bwindow_read_write_bank;
+ _screen_vtable.unwrite_bank = (void *)_be_gfx_bwindow_unwrite_bank;
#else
bmp->read_bank = _be_gfx_bwindow_read_write_bank_asm;
bmp->write_bank = _be_gfx_bwindow_read_write_bank_asm;
diff --git a/src/beos/bwindow.cpp b/src/beos/bwindow.cpp
index d89e1d4..61a1885 100644
--- a/src/beos/bwindow.cpp
+++ b/src/beos/bwindow.cpp
@@ -347,9 +347,9 @@ extern "C" struct BITMAP *be_gfx_bwindow_init(int w, int h, int v_w, int v_h, in
}
#ifdef ALLEGRO_NO_ASM
- bmp->read_bank = _be_gfx_bwindow_read_write_bank;
- bmp->write_bank = _be_gfx_bwindow_read_write_bank;
- _screen_vtable.unwrite_bank = _be_gfx_bwindow_unwrite_bank;
+ bmp->read_bank = (void *)_be_gfx_bwindow_read_write_bank;
+ bmp->write_bank = (void *)_be_gfx_bwindow_read_write_bank;
+ _screen_vtable.unwrite_bank = (void *)_be_gfx_bwindow_unwrite_bank;
#else
bmp->read_bank = _be_gfx_bwindow_read_write_bank_asm;
bmp->write_bank = _be_gfx_bwindow_read_write_bank_asm;
diff --git a/src/beos/bwscreen.cpp b/src/beos/bwscreen.cpp
index af22981..4aeda05 100644
--- a/src/beos/bwscreen.cpp
+++ b/src/beos/bwscreen.cpp
@@ -363,9 +363,9 @@ static struct BITMAP *_be_gfx_bwindowscreen_init(GFX_DRIVER *drv, int w, int h,
#ifdef ALLEGRO_NO_ASM
if (gfx_capabilities) {
- bmp->write_bank = be_gfx_bwindowscreen_read_write_bank;
- bmp->read_bank = be_gfx_bwindowscreen_read_write_bank;
- _screen_vtable.unwrite_bank = be_gfx_bwindowscreen_unwrite_bank;
+ bmp->write_bank = (void *)be_gfx_bwindowscreen_read_write_bank;
+ bmp->read_bank = (void *)be_gfx_bwindowscreen_read_write_bank;
+ _screen_vtable.unwrite_bank = (void *)be_gfx_bwindowscreen_unwrite_bank;
}
#else
if (gfx_capabilities) {
diff --git a/src/file.c b/src/file.c
index 654e632..7d56d8f 100644
--- a/src/file.c
+++ b/src/file.c
@@ -31,6 +31,10 @@
#include "allegro.h"
#include "allegro/internal/aintern.h"
+#ifdef ALLEGRO_HAIKU
+ #define O_BINARY 0
+#endif
+
#ifndef ALLEGRO_MPW
#include <sys/stat.h>
#endif
--
1.8.3.4
From e3cc30c9d162fff9e1b74985da390969eea932e8 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 30 Nov 2013 11:16:32 +0100
Subject: Allegro: fix recipe following CMake changes
* Our CMake doesn't define BEOS anymore, so have Allegro build accept
HAIKU as well.
* Fix some hardcoded installation paths.
* Add a missing zlib include, I guess because of a newer libpng.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 103d012..7e83070 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -280,7 +280,7 @@ if(APPLE)
endif(COMPILER_GCC)
endif(APPLE)
-if(BEOS)
+if(BEOS OR HAIKU)
if(CMAKE_SYSTEM_NAME STREQUAL Haiku)
set(ALLEGRO_HAIKU 1)
else(CMAKE_SYSTEM_NAME STREQUAL Haiku)
@@ -288,9 +288,9 @@ if(BEOS)
endif(CMAKE_SYSTEM_NAME STREQUAL Haiku)
set(WFLAGS "-W -Wall -Wno-unused -Wno-multichar -Wno-ctor-dtor-privacy")
set(WFLAGS_C_ONLY "")
-endif(BEOS)
+endif()
-if(UNIX AND NOT APPLE AND NOT BEOS)
+if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
set(ALLEGRO_UNIX 1)
endif()
@@ -582,10 +582,10 @@ endif(WIN32)
# -- Haiku/BeOS --
-if(BEOS)
+if(BEOS OR HAIKU)
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_BEOS_FILES})
list(APPEND PLATFORM_LIBS game midi device)
-endif(BEOS)
+endif()
# -- Mac OS X --
diff --git a/addons/loadpng/loadpng.c b/addons/loadpng/loadpng.c
index 33f5527..9253260 100644
--- a/addons/loadpng/loadpng.c
+++ b/addons/loadpng/loadpng.c
@@ -9,6 +9,7 @@
#include <allegro.h>
#include <allegro/internal/aintern.h>
#include "loadpng.h"
+#include <zlib.h>
/* We need internals _color_load_depth and _fixup_loaded_bitmap. The
* first can be replaced by the new get_color_depth() function which
diff --git a/cmake/Common.cmake b/cmake/Common.cmake
index 654c01c..2a9b171 100644
--- a/cmake/Common.cmake
+++ b/cmake/Common.cmake
@@ -43,7 +43,11 @@ endfunction(install_our_library)
function(install_our_headers)
foreach(hdr ${ARGN})
get_source_file_property(LOC ${hdr} MACOSX_PACKAGE_LOCATION)
- string(REGEX REPLACE "^Headers" "include" LOC ${LOC})
+ if(HAIKU)
+ string(REGEX REPLACE "^Headers" "develop/headers" LOC ${LOC})
+ else()
+ string(REGEX REPLACE "^Headers" "include" LOC ${LOC})
+ endif()
install(FILES ${hdr} DESTINATION ${LOC})
endforeach()
endfunction(install_our_headers)
--
1.8.3.4
From 8a85c675661240b48a07625473da010646ea6e17 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 30 Nov 2013 11:36:07 +0100
Subject: Avoid a crash when not started from terminal.
BeOS seems to set TERM environment variable to "dumb", but we don't.
diff --git a/src/beos/bsysapi.cpp b/src/beos/bsysapi.cpp
index c6e4dad..a7c9d46 100644
--- a/src/beos/bsysapi.cpp
+++ b/src/beos/bsysapi.cpp
@@ -128,7 +128,7 @@ static int32 system_thread(void *data)
using_custom_allegro_app = false;
term = getenv("TERM");
- if (!strcmp(term, "dumb")) {
+ if (!term || !strcmp(term, "dumb")) {
/* The TERM environmental variable is set to "dumb" if the app was
* not started from a terminal.
*/
--
1.8.3.4

View File

@@ -1,179 +0,0 @@
From dd7f77dd640f2e3305f3af2e6a91c2b6dacfc632 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 30 Nov 2013 12:14:54 +0100
Subject: Import Allegro 4.4.1.1 fixes that were not upstreamed.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 245be10..08a2a32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -291,7 +291,7 @@ if(APPLE)
endif(COMPILER_GCC)
endif(APPLE)
-if(BEOS)
+if(BEOS OR HAIKU)
if(CMAKE_SYSTEM_NAME STREQUAL Haiku)
set(ALLEGRO_HAIKU 1)
else(CMAKE_SYSTEM_NAME STREQUAL Haiku)
@@ -300,9 +300,9 @@ if(BEOS)
set(WFLAGS "-W -Wall -Wno-unused -Wno-multichar")
set(WFLAGS_C_ONLY "")
set(WFLAGS_CXX_ONLY "-Wno-ctor-dtor-privacy")
-endif(BEOS)
+endif()
-if(UNIX AND NOT APPLE AND NOT BEOS)
+if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
set(ALLEGRO_UNIX 1)
endif()
@@ -628,10 +628,10 @@ endif(WIN32)
# -- Haiku/BeOS --
-if(BEOS)
+if(BEOS OR HAIKU)
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_BEOS_FILES})
list(APPEND PLATFORM_LIBS game midi device)
-endif(BEOS)
+endif()
# -- Mac OS X --
diff --git a/cmake/Common.cmake b/cmake/Common.cmake
index 41822dd..1b56e1b 100644
--- a/cmake/Common.cmake
+++ b/cmake/Common.cmake
@@ -43,7 +43,11 @@ endfunction(install_our_library)
function(install_our_headers)
foreach(hdr ${ARGN})
get_source_file_property(LOC ${hdr} MACOSX_PACKAGE_LOCATION)
- string(REGEX REPLACE "^Headers" "include" LOC ${LOC})
+ if(HAIKU)
+ string(REGEX REPLACE "^Headers" "develop/headers" LOC ${LOC})
+ else()
+ string(REGEX REPLACE "^Headers" "include" LOC ${LOC})
+ endif()
install(FILES ${hdr} DESTINATION ${LOC})
endforeach()
endfunction(install_our_headers)
diff --git a/src/beos/bsysapi.cpp b/src/beos/bsysapi.cpp
index c6e4dad..a7c9d46 100644
--- a/src/beos/bsysapi.cpp
+++ b/src/beos/bsysapi.cpp
@@ -128,7 +128,7 @@ static int32 system_thread(void *data)
using_custom_allegro_app = false;
term = getenv("TERM");
- if (!strcmp(term, "dumb")) {
+ if (!term || !strcmp(term, "dumb")) {
/* The TERM environmental variable is set to "dumb" if the app was
* not started from a terminal.
*/
--
2.2.2
From 6f2c9d6d41abe0588c25757fae58f5656b153709 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 25 Sep 2014 11:09:14 +0200
Subject: Hack install dirfor binaries.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08a2a32..b841cf6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -893,7 +893,7 @@ if(UNIX) # including MACOSX
)
install(PROGRAMS ${CMAKE_BINARY_DIR}/allegro-config
- DESTINATION bin
+ DESTINATION bin${LIB_SUFFIX}
)
endif(UNIX)
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 170c3b4..572317e 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -48,7 +48,7 @@ target_link_libraries(aldat allegro ${ALDAT_JPGALLEG})
function(add_our_tool nm)
add_our_executable(${nm} ${nm}.c ${ARGN})
install(TARGETS ${nm}
- DESTINATION bin
+ DESTINATION bin${LIB_SUFFIX}
)
endfunction()
@@ -69,7 +69,7 @@ target_link_libraries(pat2dat aldat)
add_our_executable(grabber WIN32 grabber.c)
target_link_libraries(grabber aldat)
install(TARGETS grabber
- DESTINATION bin
+ DESTINATION bin${LIB_SUFFIX}
)
#-----------------------------------------------------------------------------#
--
2.2.2
From 55918d6a59c3bbf710303e41f7919915ea5b0777 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 12 Nov 2015 23:02:46 +0100
Subject: Remove useless check of the keyboard id
* Why not accept different keyboard types?
diff --git a/src/beos/bkeyapi.cpp b/src/beos/bkeyapi.cpp
index 302f353..74a672f 100644
--- a/src/beos/bkeyapi.cpp
+++ b/src/beos/bkeyapi.cpp
@@ -26,8 +26,6 @@
#error something is wrong with the makefile
#endif
-#define KEY_ID_PC101 0 // the docs say it should be 0x83ab, but they lie
-
#define KEY_SEMAPHORE_NAME "keyboard driver waiting..."
#define KEY_THREAD_PERIOD 33333 // microseconds, 1/30th of a second
@@ -44,8 +42,6 @@
#define PREFIX_W "al-bkey WARNING: "
#define PREFIX_E "al-bkey ERROR: "
-static uint16 keyboard_id = (uint16)(-1);
-
static volatile int keyboard_thread_running = FALSE;
static thread_id keyboard_thread_id = -1;
@@ -299,14 +295,6 @@ extern "C" int be_key_init(void)
_pckeys_init();
- if (get_keyboard_id(&keyboard_id) == B_ERROR) {
- goto cleanup;
- }
-
- if (keyboard_id != KEY_ID_PC101) {
- goto cleanup;
- }
-
waiting_for_input = create_sem(0, "waiting for input...");
if (waiting_for_input < B_NO_ERROR) {
@@ -363,8 +351,6 @@ extern "C" void be_key_exit(void)
delete_sem(waiting_for_input);
waiting_for_input = -1;
}
-
- keyboard_id = (uint16)(-1);
}
--
2.2.2