From patchwork Sun Mar 5 21:28:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 735487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vbwyc2x3wz9s7t for ; Mon, 6 Mar 2017 08:28:40 +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="q0MHNS35"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BF804307E9; Sun, 5 Mar 2017 21:28:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eBX+2n7NMLom; Sun, 5 Mar 2017 21:28:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 66A45310BE; Sun, 5 Mar 2017 21:28:29 +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 5414C1C10C1 for ; Sun, 5 Mar 2017 21:28:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4FF6F8A827 for ; Sun, 5 Mar 2017 21:28:27 +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 EwjhFqq5V7bo for ; Sun, 5 Mar 2017 21:28:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by hemlock.osuosl.org (Postfix) with ESMTPS id 24CD08A626 for ; Sun, 5 Mar 2017 21:28:26 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id n11so50704822wma.0 for ; Sun, 05 Mar 2017 13:28:26 -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=5oAU7sXSzloIvBQ5VNct8OIgECU976OAA/tDU4yEGng=; b=q0MHNS350KqG9NjcI0eRUGiDkD1OC4zhmpq0l73LF/wrTfZAdNb6Zkqcp1Z5uQN13w gdA0lEYW5+SZ/eoFUGzR8t5oVLarMNjLkusWxNfRt9cZYchmuRwgXMQBPd7NjpbB9+5z +Q9OC2ljWL4oQM9YtyObSXUDAZ76G1IcUSVMrjmF/K7NonMnlCH7r0HlI5j/iDikH/oe 1pdEpaEn3KzneUn/M/Qv+u45+mTw5lm6JZ48kub+E0X+YfzhzrooZhQ31Z+Ut8+EL6OL mnnPf7soVESE5de0ee7u1czz6/p4dTQkJA30eXpkmuNs65hYRsJZd23WoshL2dhDBW5u jk1w== 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=5oAU7sXSzloIvBQ5VNct8OIgECU976OAA/tDU4yEGng=; b=PWD5KI9TCaa9xbB3EGAXB6akAe/H1hPKZkl/tBR7+UL1BEcsqeMQC9uOUC1Uq6FMCT M75kSDdfSfAHA7D1ski4HUhkgNE9OZWu1XHvA8u/BL6jwTr5yi5qcEw7SJlrC8UcaDkP uRBlqgdGZUOwNG7Xb3EI9wpK1cPuY6TOIumJRmsVB+UgR27+wHg7rn+QDU7sdSGMTvHl +9RnRZLvrMEioVG7Oc1+uWdQmBksh8DRuo3/vH9uZZblVRelXiGKy9QWOUi1st9ihPAt CHEcNfe1uUaA7w1opqWZT8t7wwcM0P8sVAq6cplROgxUKi3qLXqLC10V5pRaC/Raf8cM 4LTg== X-Gm-Message-State: AMke39lk5yPnhi9jBgjX77SH+nU6oEOLAamUAm/3L2a0kZJE/xUDrsBrZ075cvo6KD/qWw== X-Received: by 10.28.66.11 with SMTP id p11mr11558580wma.38.1488749304585; Sun, 05 Mar 2017 13:28:24 -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 m201sm12276516wmd.19.2017.03.05.13.28.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Mar 2017 13:28:23 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 5 Mar 2017 22:28:18 +0100 Message-Id: <20170305212818.12594-2-romain.naour@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170305212818.12594-1-romain.naour@gmail.com> References: <20170305212818.12594-1-romain.naour@gmail.com> Cc: Romain Naour Subject: [Buildroot] [PATCH v4 2/2] package/supertux: 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" Checked that libphysfs.so.1 is used by supertux2 binary. $ LD_TRACE_LOADED_OBJECTS=1 /usr/bin/supertux2 ... libphysfs.so.1 => /usr/lib64/libphysfs.so.1 Signed-off-by: Romain Naour --- v4: no change v3: add physfs package dependency upate license list v2: update GCC minimal version to 4.8 Coding style checked with check-package script (v1) and build tested with test-pkg script. --- DEVELOPERS | 1 + package/Config.in | 1 + package/supertux/Config.in | 38 ++++++++++++++++++++++++++++++++ package/supertux/supertux.hash | 2 ++ package/supertux/supertux.mk | 49 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 91 insertions(+) create mode 100644 package/supertux/Config.in create mode 100644 package/supertux/supertux.hash create mode 100644 package/supertux/supertux.mk diff --git a/DEVELOPERS b/DEVELOPERS index 2cb1c51..20a4cba 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1303,6 +1303,7 @@ F: package/mcelog/ F: package/openpowerlink/ F: package/physfs/ F: package/stress-ng/ +F: package/supertux/ F: package/terminology/ F: package/upower/ F: package/xenomai/ diff --git a/package/Config.in b/package/Config.in index 6ecf04f..2579802 100644 --- a/package/Config.in +++ b/package/Config.in @@ -229,6 +229,7 @@ menu "Games" source "package/rubix/Config.in" source "package/sl/Config.in" source "package/stella/Config.in" + source "package/supertux/Config.in" source "package/supertuxkart/Config.in" endmenu diff --git a/package/supertux/Config.in b/package/supertux/Config.in new file mode 100644 index 0000000..43f0e3a --- /dev/null +++ b/package/supertux/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_SUPERTUX + bool "supertux" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_LIBGL # libglew + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on BR2_PACKAGE_XORG7 # libglew, SDL2 OpenGL (GLX) + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 gcc attributes noreturn + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal + depends on BR2_USE_MMU # SDL2 OpenGL (GLX) + depends on !BR2_STATIC_LIBS # SDL2 + depends on BR2_USE_WCHAR # Boost + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_DATE_TIME + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_LIBGLEW + select BR2_PACKAGE_LIBGLU # GL/glu.h + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_OPENAL + select BR2_PACKAGE_PHYSFS + select BR2_PACKAGE_SDL2 + select BR2_PACKAGE_SDL2_IMAGE + select BR2_PACKAGE_SDL2_OPENGL + help + SuperTux is a free classic 2D jump'n run sidescroller game in + a style similar to the original Super Mario games covered + under the GNU GPL. + + http://supertux.github.io/ + +comment "supertux needs X11 and a toolchain w/ C++, OpenGL backend, gcc >= 4.8, NPTL, dynamic library, wchar" + 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_8 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + BR2_STATIC_LIBS || !BR2_USE_WCHAR diff --git a/package/supertux/supertux.hash b/package/supertux/supertux.hash new file mode 100644 index 0000000..c56f608 --- /dev/null +++ b/package/supertux/supertux.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c9dc3b42991ce5c5d0d0cb94e44c4ec2373ad09029940f0e92331e7e9ada0ac5 SuperTux-v0.5.1-Source.tar.gz diff --git a/package/supertux/supertux.mk b/package/supertux/supertux.mk new file mode 100644 index 0000000..6a409e3 --- /dev/null +++ b/package/supertux/supertux.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# supertux +# +################################################################################ + +SUPERTUX_VERSION = 0.5.1 +SUPERTUX_SITE = https://github.com/SuperTux/supertux/releases/download/v$(SUPERTUX_VERSION) +SUPERTUX_SOURCE = SuperTux-v$(SUPERTUX_VERSION)-Source.tar.gz + +# Supertux itself is GPLv3+, but it bundles a few libraries with different +# licenses (sexp-cpp, squirrel, tinygettext) which are linked statically. +SUPERTUX_LICENSE = GPLv3+ (code), CC-BY-SA 2.0, CC-BY-SA 3.0, GPLv2+ (images music sounds) +SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS + +# Use bundled squirrel, tinygettext sexp-cpp packages which are hardcoded in +# the CMake build system. +SUPERTUX_DEPENDENCIES = host-pkgconf boost libcurl libgl libglew libglu \ + libogg libvorbis openal physfs sdl2 sdl2_image + +# ENABLE_BOOST_STATIC_LIBS=OFF: use boost shared libraries since supertux +# depends on !BR2_STATIC_LIBS and boost provide only shared libraries with +# BR2_SHARED_LIBS. +# ENABLE_OPENGL=ON: Can be disabled but will make SuperTux unplayable slow. +# GLBINDING_ENABLED=OFF: use GLEW (default) instead of glbinding. +# Install the game directly in /usr/bin and game data in /usr/share/supertux2. +# Force using physfs.so from staging since the check on PHYSFS_getPrefDir symbol +# in physfs.h (CHECK_SYMBOL_EXISTS) doesn't work. +SUPERTUX_CONF_OPTS += \ + -DENABLE_BOOST_STATIC_LIBS=OFF \ + -DBUILD_DOCUMENTATION=OFF \ + -DENABLE_OPENGL=ON \ + -DGLBINDING_ENABLED=OFF \ + -DINSTALL_SUBDIR_BIN="bin" \ + -DINSTALL_SUBDIR_SHARE="share/supertux2" \ + -DUSE_SYSTEM_PHYSFS=ON + +# 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 SUPERTUX_REMOVE_PEDANTIC + $(SED) 's% -pedantic%%' $(@D)/CMakeLists.txt + $(SED) 's%CHECK_CXX_FLAG(pedantic)%%' $(@D)/external/tinygettext/CMakeLists.txt +endef +SUPERTUX_POST_PATCH_HOOKS += SUPERTUX_REMOVE_PEDANTIC +endif + +$(eval $(cmake-package))