Recipe for Allegro 4.4.2.

This commit is contained in:
Adrien Destugues
2013-11-30 12:15:56 +01:00
parent f1ec4b3e8c
commit 32bfd01d12
2 changed files with 173 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
SUMMARY="Allegro 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/"
SRC_URI="http://sourceforge.net/projects/alleg/files/allegro/4.4.2/allegro-4.4.2.tar.gz/download"
CHECKSUM_MD5="4db71b0460fc99926ae91d223199c2e6"
LICENSE="Allegro"
COPYRIGHT="1998-2010 Shawn Hargreaves et al."
REVISION="1"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
PROVIDES="
allegro$secondaryArchSuffix = $portVersion
lib:liballeg$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libpng
lib:libz
lib:libogg
lib:libvorbis
"
BUILD_REQUIRES="
devel:libpng$secondaryArchSuffix
devel:libz
devel:libogg
devel:libvorbis
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:cmake
cmd:make
cmd:pkg_config
"
#PATCHES="allegro-4.4.1.1.patchset"
BUILD()
{
cmake . -DCMAKE_INSTALL_PREFIX=$prefix -DDOCDIR=$docDir -DMANDIR=$manDir
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs liballeg libjpgalleg libloadpng liblogg
packageEntries devel $developDir $binDir
}
PROVIDES_devel="
allegro${secondaryArchSuffix}_devel = $portVersion compat >= 4.4
devel:liballeg$secondaryArchSuffix = $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:libjpgalleg = $portVersion compat >= 4.4
devel:liblogg = $portVersion compat >= 4.4
devel:libloadpng = $portVersion compat >= 4.4
"
REQUIRES_devel="
haiku$secondaryArchSuffix >= $haikuVersion
allegro$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,77 @@
From 3f9d50e146abb2e937adf2d6e0fc7dad9634b20e 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.
*/
--
1.8.3.4