From patchwork Sun Feb 26 16:48:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 732552 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vWW5l1wXdz9sNl for ; Mon, 27 Feb 2017 03:49:31 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HjDi6sAR"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 084C88566E; Sun, 26 Feb 2017 16:49:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cj3ZeuYgdBH9; Sun, 26 Feb 2017 16:49:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0480A85673; Sun, 26 Feb 2017 16:49:24 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id AA8421C0586 for ; Sun, 26 Feb 2017 16:49:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A6D7B88920 for ; Sun, 26 Feb 2017 16:49:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 231VEiDqgGFZ for ; Sun, 26 Feb 2017 16:49:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id 2229088913 for ; Sun, 26 Feb 2017 16:49:19 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id o22so6847140wro.3 for ; Sun, 26 Feb 2017 08:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GdzCysVl2bRLp0iN8P0IuTiFEQIuiihJa/0CktgyFmU=; b=HjDi6sARaPqSCjkeAqhMooetOBRBKB6rt9WYhx04wwr2BCadhh3LRQtCVtyUBrJ6tq 2WhTH1jqXG9tG9NTqwv2sluwhiIfxzr7ZdbKbrX8eKy7WujjyuPPaG9yn3fId9q0YQYF ZsdjnSCuvV9QYcazp5RExzNINHY1HBQ7Nsh+WIUaSCMCbedM37bayWXDrxMR6kVt+hJk HPyo1wjw7wlATYeJLt8gSpZqCH0zbpbkZPgApPqLbRMhmqpKHwQkA2+zpV2R9fufkYFN dHyEvpSasbWlwsMR71VIKfCZWKMXcT8AJ/QtbcMHL0IiCf1v8kJzfRJ1YRGc8qu/zWz7 a35A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GdzCysVl2bRLp0iN8P0IuTiFEQIuiihJa/0CktgyFmU=; b=mwOkVFGT60UwNYXkMKZDdUXPdcL6L7SfZC1Hw/ctF/ZEm2tutULIr3al/mIUrIuCLd Q0z+grmZ1cPJx8xfkz9+O7416TsZm6Ht3nztADNzQSx01trmu+jeU9HzTEwKuG2J/OMT mywhb8586Zjkj1T2mbnoO6/6vBLoyxRQKqQGAS9aWqghnhq/IseOfaJ2VLQ8daxQxX2h pibIKU9TbwryXWeGFf04p3LhI/VSTXlhEc+0tLg7o/PWymJwM0W3NUyfRr4pMbaO6Dh5 8JCS3WgZhwunK9TKsP6e/Azx45JXjiCSEJHgO4wYtpIpQKRKHvMjV01ADFE5j/I7esQZ FBkQ== X-Gm-Message-State: AMke39kGefkiOI94aY2D57jV5m2AI9oQY/2/T/uxkgmaO/KKDupXjsHgbvJCd8T+CAlsmg== X-Received: by 10.223.162.211 with SMTP id t19mr11206460wra.57.1488127757646; Sun, 26 Feb 2017 08:49:17 -0800 (PST) Received: from localhost.localdomain (gam75-1-81-57-22-125.fbx.proxad.net. [81.57.22.125]) by smtp.gmail.com with ESMTPSA id v18sm6020033wrc.41.2017.02.26.08.49.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Feb 2017 08:49:16 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 26 Feb 2017 17:48:55 +0100 Message-Id: <20170226164855.10834-3-romain.naour@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170226164855.10834-1-romain.naour@gmail.com> References: <20170226164855.10834-1-romain.naour@gmail.com> Cc: Romain Naour Subject: [Buildroot] [PATCH v3 3/3] package/lugaru: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Lugaru needs SDL2 library with OpenGL support which require X11 support. Otherwise Lugaru error out with "No dynamic GL support in video driver" message. https://osslugaru.gitlab.io/ Signed-off-by: Romain Naour --- v3: drom custom CMAKE_INSTALL_DIR add dependency BR2_USE_MMU v2: bump to v1.2 fix build issue due an invalid conversion fix musl issue on x86 x86_64 with incompatible posix_memalign declaration (pkg-test). Build tested with pkg-test and coding style verified by check-package (v1). --- DEVELOPERS | 1 + package/Config.in | 1 + .../0001-ImageIO-fix-invalid-conversion.patch | 35 ++++++++++++++++++++ package/lugaru/Config.in | 38 ++++++++++++++++++++++ package/lugaru/lugaru.hash | 2 ++ package/lugaru/lugaru.mk | 30 +++++++++++++++++ 6 files changed, 107 insertions(+) create mode 100644 package/lugaru/0001-ImageIO-fix-invalid-conversion.patch create mode 100644 package/lugaru/Config.in create mode 100644 package/lugaru/lugaru.hash create mode 100644 package/lugaru/lugaru.mk diff --git a/DEVELOPERS b/DEVELOPERS index 09a0a6e..c80fdb4 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1282,6 +1282,7 @@ F: package/expedite/ F: package/iqvlinux/ F: package/liblinear/ F: package/linux-syscall-support/ +F: package/lugaru/ F: package/mcelog/ F: package/openpowerlink/ F: package/stress-ng/ diff --git a/package/Config.in b/package/Config.in index deff0fe..aad0842 100644 --- a/package/Config.in +++ b/package/Config.in @@ -222,6 +222,7 @@ menu "Games" source "package/gnuchess/Config.in" source "package/lbreakout2/Config.in" source "package/ltris/Config.in" + source "package/lugaru/Config.in" source "package/opentyrian/Config.in" source "package/opentyrian-data/Config.in" source "package/prboom/Config.in" diff --git a/package/lugaru/0001-ImageIO-fix-invalid-conversion.patch b/package/lugaru/0001-ImageIO-fix-invalid-conversion.patch new file mode 100644 index 0000000..6096477 --- /dev/null +++ b/package/lugaru/0001-ImageIO-fix-invalid-conversion.patch @@ -0,0 +1,35 @@ +From 73e56ba8e91b6bae59220e6f25c1b7c15817edb5 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 12 Feb 2017 21:17:44 +0100 +Subject: [PATCH] ImageIO: fix invalid conversion + +Fixes: +Source/Utils/ImageIO.cpp:125:27: error: invalid conversion from 'int' to 'boolean' [-fpermissive] + cinfo.quantize_colors = 0; + ^ + +quantize_colors type is bool, so it must be initialized to TRUE or FALSE. + +Patch status: upsteam + +Signed-off-by: Romain Naour +--- + Source/Utils/ImageIO.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/Utils/ImageIO.cpp b/Source/Utils/ImageIO.cpp +index 706c201..c19a63e 100644 +--- a/Source/Utils/ImageIO.cpp ++++ b/Source/Utils/ImageIO.cpp +@@ -122,7 +122,7 @@ static bool load_jpg(const char* file_name, ImageRec& tex) + (void)jpeg_read_header(&cinfo, TRUE); + + cinfo.out_color_space = JCS_RGB; +- cinfo.quantize_colors = 0; ++ cinfo.quantize_colors = FALSE; + (void)jpeg_calc_output_dimensions(&cinfo); + (void)jpeg_start_decompress(&cinfo); + +-- +2.9.3 + diff --git a/package/lugaru/Config.in b/package/lugaru/Config.in new file mode 100644 index 0000000..521c89a --- /dev/null +++ b/package/lugaru/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_LUGARU + bool "lugaru" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_LIBGL # libglu + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on BR2_PACKAGE_XORG7 # SDL2 OpenGL (GLX) + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal + depends on BR2_USE_MMU # SDL2 OpenGL (GLX) + depends on !BR2_STATIC_LIBS # SDL2 + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBGLU # GL/glu.h + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_OPENAL + select BR2_PACKAGE_SDL2 + select BR2_PACKAGE_SDL2_OPENGL + select BR2_PACKAGE_ZLIB + help + Lugaru (pronounced Loo-GAH-roo) is a cross-platform + third-person action game. The main character, Turner, is an + anthropomorphic rebel bunny rabbit with impressive combat + skills. In his quest to find those responsible for + slaughtering his village, he uncovers a far-reaching + conspiracy involving the corrupt leaders of the rabbit + republic and the starving wolves from a nearby den. Turner + takes it upon himself to fight against their plot and save + his fellow rabbits from slavery. + + https://osslugaru.gitlab.io/ + +comment "lugaru needs X11 and a toolchain w/ C++, OpenGL backend, gcc >= 4.7, NPTL, dynamic library" + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_LIBGL || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + BR2_STATIC_LIBS diff --git a/package/lugaru/lugaru.hash b/package/lugaru/lugaru.hash new file mode 100644 index 0000000..6ba2bca --- /dev/null +++ b/package/lugaru/lugaru.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 f3ea477caf78911c69939fbdc163f9f6517c7ef2267e716a0e050be1a166ef97 lugaru-1.2.tar.xz diff --git a/package/lugaru/lugaru.mk b/package/lugaru/lugaru.mk new file mode 100644 index 0000000..7704931 --- /dev/null +++ b/package/lugaru/lugaru.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# lugaru +# +################################################################################ + +LUGARU_VERSION = 1.2 +LUGARU_SITE = https://bitbucket.org/osslugaru/lugaru/downloads +LUGARU_SOURCE = lugaru-$(LUGARU_VERSION).tar.xz + +LUGARU_LICENSE = GPLv2+, CC-BY-SA-3.0 (Wolfire and Slib assets), \ + CC-BY-SA-4.0 (OSS Lugaru, Jendraz and Philtron R. assets) +LUGARU_LICENSE_FILES = COPYING.txt CONTENT-LICENSE.txt + +LUGARU_DEPENDENCIES = host-pkgconf jpeg libgl libglu libpng libvorbis \ + openal sdl2 zlib + +# Avoid incompatible posix_memalign declaration on x86 and x86_64 with +# musl. +# https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html +ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_i386)$(BR2_x86_64),y:y) +define LUGARU_REMOVE_PEDANTIC + $(SED) 's% -pedantic%%' $(@D)/CMakeLists.txt +endef +LUGARU_POST_PATCH_HOOKS += LUGARU_REMOVE_PEDANTIC +endif + +LUGARU_CONF_OPTS = -DSYSTEM_INSTALL=ON + +$(eval $(cmake-package))