diff --git a/srcpkgs/allegro4/files/TryRunResults.cmake b/srcpkgs/allegro4/files/TryRunResults.cmake new file mode 100644 index 00000000000..446f4f847ed --- /dev/null +++ b/srcpkgs/allegro4/files/TryRunResults.cmake @@ -0,0 +1,31 @@ +# This file was generated by CMake because it detected TRY_RUN() commands +# in crosscompiling mode. It will be overwritten by the next CMake run. +# Copy it to a safe location, set the variables to appropriate values +# and use it then to preset the CMake cache (using -C). + + +# ALLEGRO_USE_CONSTRUCTOR_EXITCODE +# indicates whether the executable would have been able to run on its +# target platform. If so, set ALLEGRO_USE_CONSTRUCTOR_EXITCODE to +# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN". +# ALLEGRO_USE_CONSTRUCTOR_EXITCODE__TRYRUN_OUTPUT +# contains the text the executable would have printed on stdout and stderr. +# If the executable would not have been able to run, set ALLEGRO_USE_CONSTRUCTOR_EXITCODE__TRYRUN_OUTPUT empty. +# Otherwise check if the output is evaluated by the calling CMake code. If so, +# check what the source file would have printed when called with the given arguments. +# The ALLEGRO_USE_CONSTRUCTOR_COMPILED variable holds the build result for this TRY_RUN(). +# +# Source file : /builddir/allegro-4.4.3.1/build/CMakeFiles/CMakeTmp/src.c +# Executable : /builddir/allegro-4.4.3.1/build/CMakeFiles/cmTC_80441-ALLEGRO_USE_CONSTRUCTOR_EXITCODE +# Run arguments : +# Called from: [2] /usr/share/cmake-3.16/Modules/CheckCSourceRuns.cmake +# [1] /builddir/allegro-4.4.3.1/CMakeLists.txt + +set( ALLEGRO_USE_CONSTRUCTOR_EXITCODE + "0" + CACHE STRING "Result from TRY_RUN" FORCE) + +set( ALLEGRO_USE_CONSTRUCTOR_EXITCODE__TRYRUN_OUTPUT + "0" + CACHE STRING "Output from TRY_RUN" FORCE) + diff --git a/srcpkgs/allegro4/template b/srcpkgs/allegro4/template index d540181a35b..d1f7a42707f 100644 --- a/srcpkgs/allegro4/template +++ b/srcpkgs/allegro4/template @@ -1,7 +1,7 @@ # Template file for 'allegro4' pkgname=allegro4 version=4.4.3.1 -revision=1 +revision=2 wrksrc="allegro-${version}" build_style=cmake configure_args="-DWANT_DOCS=OFF" @@ -12,12 +12,17 @@ makedepends="zlib-devel alsa-lib-devel jack-devel libXpm-devel libXxf86vm-devel depends="libGL" short_desc="Portable library mainly aimed at video game and multimedia programming" maintainer="Orphaned " -license="Allegro License (MIT alike)" +license="custom:Allegro" homepage="http://alleg.sourceforge.net/" homepage="https://liballeg.org" distfiles="https://github.com/liballeg/allegro5/releases/download/${version}/allegro-${version}.tar.gz" checksum=ec19dbc9a021244582b4819b3583ee594b50141f9fcf6944a4ed8069cbf8d4d4 -nocross=yes + +pre_configure() { + if [ "$CROSS_BUILD" ]; then + configure_args+=" -C ${FILESDIR}/TryRunResults.cmake" + fi +} post_install() { vlicense docs/txt/license.txt