update buildroot to 2017.02.11

This commit is contained in:
jbnadal
2018-05-22 15:35:47 +02:00
parent 4bf1f5e091
commit a3c10bd762
9257 changed files with 433426 additions and 1701 deletions

View File

@@ -0,0 +1,49 @@
From d9c517d9a4e168c1f7ed28ad0eb9365d69f5ceb2 Mon Sep 17 00:00:00 2001
From: Rodrigo Rebello <rprebello@gmail.com>
Date: Thu, 22 Oct 2015 11:29:55 -0200
Subject: [PATCH] Fix "`gcc_struct' attribute directive ignored" warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Compilation for target architectures other than i386, x86_64 or PowerPC
(e.g. ARM) caused multiple warnings like the following to appear:
doomdata.h:75:1: warning: gcc_struct attribute directive ignored
} PACKEDATTR mapsidedef_t;
^
This was due to 'gcc_struct' being undefined for these architectures.
Since that attribute was actually introduced by commit 87db726b9a9ae61ca
to address the fact that -mms-bitfields became the default for GCC on
Windows, limit it to that case.
Upstream-status: accepted, not yet released.
https://github.com/chocolate-doom/chocolate-doom/pull/629
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
src/doomtype.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/doomtype.h b/src/doomtype.h
index bf0a40e..77c026c 100644
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -52,10 +52,10 @@
#ifdef __GNUC__
-#ifdef __clang__
-#define PACKEDATTR __attribute__((packed))
-#else
+#if defined(_WIN32) && !defined(__clang__)
#define PACKEDATTR __attribute__((packed,gcc_struct))
+#else
+#define PACKEDATTR __attribute__((packed))
#endif
#else
--
2.1.4

View File

@@ -0,0 +1,67 @@
From fd12fa91aa8e35dbd3ffa5bfe055baf6bde0cd63 Mon Sep 17 00:00:00 2001
From: Rodrigo Rebello <rprebello@gmail.com>
Date: Thu, 22 Oct 2015 15:28:11 -0200
Subject: [PATCH] configure: fix --with-PACKAGE option checks
Options of the form --with-PACKAGE[=yes] (e.g. --with-libpng), when
passed to configure, were being treated as though --without-PACKAGE had
been given.
Although the intention is to have configure check and use PACKAGE by
default if it's available, thus requiring the user to pass an option
only if PACKAGE must NOT be used, there are times when the opposite
might be desired (i.e. the user wants to indicate PACKAGE MUST be used).
Moreover, allowing --with-PACKAGE and behaving as if --without-PACKAGE
had been specified is in itself quite confusing.
Fix that by testing the result of 'with_PACKAGE' in configure.ac and
acting accordingly instead of blindly assuming a 'no'.
Upstream-status: accepted, not yet released.
https://github.com/chocolate-doom/chocolate-doom/pull/630
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
configure.ac | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index ee97fe2..7b03485 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,14 @@ AC_SDL_MAIN_WORKAROUND([
[Build without libsamplerate @<:@default=check@:>@]),
[],
[
- AC_CHECK_LIB(samplerate, src_new)
+ [with_libsamplerate=check]
+ ])
+ AS_IF([test "x$with_libsamplerate" != xno], [
+ AC_CHECK_LIB(samplerate, src_new, [], [
+ AS_IF([test "x$with_libsamplerate" != xcheck], [AC_MSG_FAILURE(
+ [--with-libsamplerate was given, but test for libsamplerate failed])
+ ])
+ ])
])
# Check for libpng.
AC_ARG_WITH([libpng],
@@ -88,8 +95,15 @@ AC_SDL_MAIN_WORKAROUND([
[Build without libpng @<:@default=check@:>@]),
[],
[
+ [with_libpng=check]
+ ])
+ AS_IF([test "x$with_libpng" != xno], [
AC_CHECK_LIB(z, zlibVersion)
- AC_CHECK_LIB(png, png_get_io_ptr)
+ AC_CHECK_LIB(png, png_get_io_ptr, [], [
+ AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE(
+ [--with-libpng was given, but test for libpng failed])
+ ])
+ ])
])
AC_CHECK_LIB(m, log)
--
2.1.4

View File

@@ -0,0 +1,80 @@
From 87c7399305b30045a856d737bbfd8f59b8f52392 Mon Sep 17 00:00:00 2001
From: Rodrigo Rebello <rprebello@gmail.com>
Date: Fri, 6 Nov 2015 12:14:01 -0200
Subject: [PATCH] opl: limit use of ioperm/inb/outb to x86 architecture
The use of I/O ports in the Linux driver to directly control OPL chips
is x86 specific and only really makes sense for x86-based PC's with
compatible hardware.
For some architectures (e.g. ARM), ioperm, inb and outb do exist and are
detected by the configure script (via AC_CHECK_FUNCS(ioperm)), but their
use is inappropriate in these cases and should be avoided.
In some other scenarios, like when using a GNU toolchain + uClibc for
PowerPC, the build even fails with the following error:
opl_linux.c:26:20: fatal error: sys/io.h: No such file or directory
That is so because ioperm() is exported by uClibc and gets detected by
configure, which enables the "Linux" driver via definition of
HAVE_IOPERM, but in practice 'sys/io.h' is missing for ppc (inb/outb is
not implemented, and the call to ioperm() would return EIO anyway).
So, besides testing for HAVE_IOPERM, also test if either __i386__ or
__x86_64__ are defined before enabling this OPL driver.
Upstream-status: accepted, not yet released.
https://github.com/chocolate-doom/chocolate-doom/pull/638
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
opl/opl.c | 4 ++--
opl/opl_linux.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/opl/opl.c b/opl/opl.c
index 60f027d..0d25689 100644
--- a/opl/opl.c
+++ b/opl/opl.c
@@ -27,7 +27,7 @@
//#define OPL_DEBUG_TRACE
-#ifdef HAVE_IOPERM
+#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM)
extern opl_driver_t opl_linux_driver;
#endif
#if defined(HAVE_LIBI386) || defined(HAVE_LIBAMD64)
@@ -40,7 +40,7 @@ extern opl_driver_t opl_sdl_driver;
static opl_driver_t *drivers[] =
{
-#ifdef HAVE_IOPERM
+#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM)
&opl_linux_driver,
#endif
#if defined(HAVE_LIBI386) || defined(HAVE_LIBAMD64)
diff --git a/opl/opl_linux.c b/opl/opl_linux.c
index 5df5d46..19e4c3e 100644
--- a/opl/opl_linux.c
+++ b/opl/opl_linux.c
@@ -17,7 +17,7 @@
#include "config.h"
-#ifdef HAVE_IOPERM
+#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM)
#include <stdio.h>
#include <string.h>
@@ -99,5 +99,5 @@ opl_driver_t opl_linux_driver =
OPL_Timer_AdjustCallbacks,
};
-#endif /* #ifdef HAVE_IOPERM */
+#endif /* #if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM) */
--
2.1.4

View File

@@ -0,0 +1,217 @@
From 3163bf87d7b955d08dedd5ebaccb1b2a86ffdcb9 Mon Sep 17 00:00:00 2001
From: Simon Howard <fraggle@soulsphere.org>
Date: Thu, 25 Feb 2016 22:55:04 -0500
Subject: [PATCH] configure: Switch to pkg-config macros.
All dependency libraries install pkg-config .pc files nowadays, which
makes the process of looking them up a lot simpler. Get rid of the SDL
workaround macro as it's not needed.
[Backported from upstream commit 3163bf87d7b955d08dedd5ebaccb1b2a86ffdcb9.
Fixes static linking issues with SDL_mixer.]
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
configure.ac | 117 ++++++++++++++--------------------------
opl/examples/Makefile.am | 2 +-
src/Makefile.am | 7 ++-
textscreen/Makefile.am | 2 +-
textscreen/examples/Makefile.am | 2 +-
5 files changed, 49 insertions(+), 81 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7b03485..48f83ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,89 +33,54 @@ then
CFLAGS="-O$OPT_LEVEL -g $WARNINGS $orig_CFLAGS"
fi
-dnl Search for SDL ...
-
-AM_PATH_SDL(1.1.3)
-
-# Add the SDL compiler flags to the default compiler flag variables.
-# It is important to do this now, before checking for headers and
-# library functions. The reason being that on Windows, sdl-config
-# sets the -mno-cygwin compiler option in order to generate MinGW
-# executables. If we don't do this now, we might end up discovering
-# header files that are not actually available to us when we come
-# to compile.
-
-CFLAGS="$CFLAGS $SDL_CFLAGS"
-LDFLAGS="$LDFLAGS $SDL_LIBS"
-
-# On some platforms, SDL renames main() to SDL_main() using a #define,
-# so that its own main, stored in the SDLmain library, can be run first.
-# Unfortunately, this causes problems for autoconf, which builds
-# test programs to probe the system. All library/header/symbol checks
-# must be run in this block, that performs a workaround for the problem.
-
-AC_SDL_MAIN_WORKAROUND([
-
- # Check for SDL_mixer.
-
- AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[
- SDLMIXER_LIBS="$SDLMIXER_LIBS -lSDL_mixer"
- ],[
- echo "*** Could not find SDL_mixer. Please install it."
- exit -1
- ])
-
- # Check for SDL_net.
-
- AC_CHECK_LIB(SDL_net,SDLNet_UDP_Send,[
- SDLNET_LIBS="$SDLNET_LIBS -lSDL_net"
- ],[
- echo "*** Could not find SDL_net. Please install it."
- exit -1
- ])
-
- # Check for libsamplerate.
- AC_ARG_WITH([libsamplerate],
- AS_HELP_STRING([--without-libsamplerate],
- [Build without libsamplerate @<:@default=check@:>@]),
- [],
- [
- [with_libsamplerate=check]
- ])
- AS_IF([test "x$with_libsamplerate" != xno], [
- AC_CHECK_LIB(samplerate, src_new, [], [
- AS_IF([test "x$with_libsamplerate" != xcheck], [AC_MSG_FAILURE(
- [--with-libsamplerate was given, but test for libsamplerate failed])
- ])
+PKG_CHECK_MODULES([SDL], [sdl])
+PKG_CHECK_MODULES([SDLMIXER], [SDL_mixer])
+PKG_CHECK_MODULES([SDLNET], [SDL_net])
+
+# Check for libsamplerate.
+AC_ARG_WITH([libsamplerate],
+AS_HELP_STRING([--without-libsamplerate],
+ [Build without libsamplerate @<:@default=check@:>@]),
+[],
+[
+ [with_libsamplerate=check]
+])
+AS_IF([test "x$with_libsamplerate" != xno], [
+ PKG_CHECK_MODULES([SAMPLERATE], [samplerate >= 0.1.8], [
+ AC_DEFINE([HAVE_LIBSAMPLERATE], [1], [libsamplerate installed])
+ ], [
+ AS_IF([test "x$with_libsamplerate" != xcheck], [AC_MSG_FAILURE(
+ [--with-libsamplerate was given, but test for libsamplerate failed])
])
])
- # Check for libpng.
- AC_ARG_WITH([libpng],
- AS_HELP_STRING([--without-libpng],
- [Build without libpng @<:@default=check@:>@]),
- [],
- [
- [with_libpng=check]
- ])
- AS_IF([test "x$with_libpng" != xno], [
- AC_CHECK_LIB(z, zlibVersion)
- AC_CHECK_LIB(png, png_get_io_ptr, [], [
- AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE(
- [--with-libpng was given, but test for libpng failed])
- ])
+])
+# Check for libpng.
+AC_ARG_WITH([libpng],
+AS_HELP_STRING([--without-libpng],
+ [Build without libpng @<:@default=check@:>@]),
+[],
+[
+ [with_libpng=check]
+])
+AS_IF([test "x$with_libpng" != xno], [
+ PKG_CHECK_MODULES([PNG], [libpng >= 1.6.10], [
+ AC_DEFINE([HAVE_LIBPNG], [1], [libpng installed])
+ ], [
+ AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE(
+ [--with-libpng was given, but test for libpng failed])
])
])
- AC_CHECK_LIB(m, log)
+])
+AC_CHECK_LIB(m, log)
- AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
- AC_CHECK_FUNCS(mmap ioperm)
+AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
+AC_CHECK_FUNCS(mmap ioperm)
- # OpenBSD I/O i386 library for I/O port access.
- # (64 bit has the same thing with a different name!)
+# OpenBSD I/O i386 library for I/O port access.
+# (64 bit has the same thing with a different name!)
- AC_CHECK_LIB(i386, i386_iopl)
- AC_CHECK_LIB(amd64, amd64_iopl)
-])
+AC_CHECK_LIB(i386, i386_iopl)
+AC_CHECK_LIB(amd64, amd64_iopl)
case $host in
*cygwin* | *mingw* )
diff --git a/opl/examples/Makefile.am b/opl/examples/Makefile.am
index 9afcd51..54c37f8 100644
--- a/opl/examples/Makefile.am
+++ b/opl/examples/Makefile.am
@@ -1,5 +1,5 @@
-AM_CFLAGS = -I$(top_srcdir)/opl
+AM_CFLAGS = -I$(top_srcdir)/opl @SDL_CFLAGS@
noinst_PROGRAMS=droplay
diff --git a/src/Makefile.am b/src/Makefile.am
index 78ee3ba..9624e01 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -21,7 +21,8 @@ execgames_SCRIPTS = $(SETUP_BINARIES)
AM_CFLAGS = -I$(top_srcdir)/textscreen \
-I$(top_srcdir)/opl \
-I$(top_srcdir)/pcsound \
- @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
+ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ \
+ @SAMPLERATE_CFLAGS@ @PNG_CFLAGS@
# Common source files used by absolutely everything:
@@ -150,7 +151,9 @@ EXTRA_LIBS = \
@LDFLAGS@ \
@SDL_LIBS@ \
@SDLMIXER_LIBS@ \
- @SDLNET_LIBS@
+ @SDLNET_LIBS@ \
+ @SAMPLERATE_LIBS@ \
+ @PNG_LIBS@
if HAVE_WINDRES
@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES_WITH_DEH) resource.rc
diff --git a/textscreen/Makefile.am b/textscreen/Makefile.am
index 628d4ff..427ed40 100644
--- a/textscreen/Makefile.am
+++ b/textscreen/Makefile.am
@@ -1,5 +1,5 @@
-AM_CFLAGS = -I$(top_srcdir)/src
+AM_CFLAGS = -I$(top_srcdir)/src @SDL_CFLAGS@
CTAGS_ARGS=-I TXT_UNCAST_ARG+
diff --git a/textscreen/examples/Makefile.am b/textscreen/examples/Makefile.am
index 4632d92..b857748 100644
--- a/textscreen/examples/Makefile.am
+++ b/textscreen/examples/Makefile.am
@@ -1,5 +1,5 @@
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/textscreen
+AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/textscreen @SDL_CFLAGS@
noinst_PROGRAMS=guitest calculator
--
2.1.4

View File

@@ -0,0 +1,12 @@
config BR2_PACKAGE_CHOCOLATE_DOOM
bool "chocolate-doom"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_SDL
select BR2_PACKAGE_SDL_MIXER
select BR2_PACKAGE_SDL_NET
help
Chocolate Doom is a set of conservative source ports for Doom,
Heretic, Hexen and Strife, with a philosophy of preserving the
look, feel, and bugs of the vanilla versions of each.
http://www.chocolate-doom.org

View File

@@ -0,0 +1,2 @@
# Locally computed
sha256 ad11e2871667c6fa0658abf2dcba0cd9b26fbd651ee8df55adfdc18ad8fd674a chocolate-doom-2.2.1.tar.gz

View File

@@ -0,0 +1,38 @@
################################################################################
#
# chocolate-doom
#
################################################################################
CHOCOLATE_DOOM_VERSION = 2.2.1
CHOCOLATE_DOOM_SITE = http://www.chocolate-doom.org/downloads/$(CHOCOLATE_DOOM_VERSION)
CHOCOLATE_DOOM_LICENSE = GPLv2+
CHOCOLATE_DOOM_LICENSE_FILES = COPYING
CHOCOLATE_DOOM_DEPENDENCIES = host-pkgconf sdl sdl_mixer sdl_net
# We're patching configure.ac, so we need to autoreconf
CHOCOLATE_DOOM_AUTORECONF = YES
# Avoid installing desktop entries, icons, etc.
CHOCOLATE_DOOM_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec
CHOCOLATE_DOOM_CONF_OPTS = \
--disable-sdltest \
--with-sdl-prefix=$(STAGING_DIR)/usr \
--with-sdl-exec-prefix=$(STAGING_DIR)/usr
ifeq ($(BR2_PACKAGE_LIBPNG),y)
CHOCOLATE_DOOM_DEPENDENCIES += libpng
CHOCOLATE_DOOM_CONF_OPTS += --with-libpng
else
CHOCOLATE_DOOM_CONF_OPTS += --without-libpng
endif
ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
CHOCOLATE_DOOM_DEPENDENCIES += libsamplerate
CHOCOLATE_DOOM_CONF_OPTS += --with-libsamplerate
else
CHOCOLATE_DOOM_CONF_OPTS += --without-libsamplerate
endif
$(eval $(autotools-package))