allegro4: fix build

error message was:

| CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
|    ALLEGRO_USE_CONSTRUCTOR_EXITCODE (advanced)
| For details see /home/Superandy/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/allegro4/4.4.2-r0/allegro-4.4.2/TryRunResults.cmake

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
Andreas Müller
2013-01-09 01:48:14 +01:00
parent dd27f116d5
commit 112137eeaa
2 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
From ad105eee25e248e56c87d82fe8c70c44b4676bd9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 9 Jan 2013 01:31:38 +0100
Subject: [PATCH] CMakeLists.txt: don't try to run in cross environment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [Cross-compile specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
CMakeLists.txt | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 245be10..8f4e331 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,14 +189,6 @@ if(UNIX)
set(MAP_FAILED "((void *) -1)")
endif()
- check_c_source_runs("
- static int notsupported = 1;
- void test_ctor (void) __attribute__((constructor));
- void test_ctor (void) { notsupported = 0; }
- int main(void) { return (notsupported); }
- "
- ALLEGRO_USE_CONSTRUCTOR)
-
find_library(RT_LIBRARY rt)
check_c_source_compiles("
#include <time.h>
--
1.7.4.4

View File

@@ -10,7 +10,8 @@ PR = "r0"
DEPENDS = "virtual/libgl libglu libx11 libxcursor physfs openal jpeg"
SRC_URI = "${SOURCEFORGE_MIRROR}/alleg/allegro/${PV}/allegro-${PV}.tar.gz \
file://avoid_lib_paths.patch \
file://avoid_lib_paths.patch \
file://0001-CMakeLists.txt-don-t-try-to-run-in-cross-environment.patch \
"
SRC_URI[md5sum] = "4db71b0460fc99926ae91d223199c2e6"
@@ -20,3 +21,5 @@ inherit cmake binconfig
S = "${WORKDIR}/allegro-${PV}"
FILES_${PN} += "${libdir}/allegro"
FILES_${PN}-dbg += "${libdir}/allegro/*/.debug"