1 Commits

Author SHA1 Message Date
Andreas Müller
e738f286ff z80: move to sdl2
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
2016-08-05 17:48:10 +02:00
33 changed files with 692 additions and 882 deletions

7
README
View File

@@ -6,9 +6,4 @@ URI: git://git.openembedded.org/openembedded-core
branch: master branch: master
revision: HEAD revision: HEAD
URI: git://git.openembedded.org/meta-openembedded Layer maintainer: Andreas Müller <schnitzeltony@googlemail.com>
branch: master
revision: HEAD
layers: meta-oe
Layer maintainer: Andreas Müller <schnitzeltony@gmail.com>

View File

@@ -7,6 +7,3 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb"
BBFILE_COLLECTIONS += "meta-retro" BBFILE_COLLECTIONS += "meta-retro"
BBFILE_PATTERN_meta-retro := "^${LAYERDIR}/" BBFILE_PATTERN_meta-retro := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-retro = "10" BBFILE_PRIORITY_meta-retro = "10"
LAYERDEPENDS_meta-retro = "core openembedded-layer filesystems-layer games-layer"
LAYERSERIES_COMPAT_meta-retro = "rocko sumo thud"

View File

@@ -1,4 +1,4 @@
SUMMARY = "DOSBox is a DOS-emulator that uses the SDL-library" SUMMARY = "OSBox is a DOS-emulator that uses the SDL-library"
HOMEPAGE = "http://www.dosbox.com/" HOMEPAGE = "http://www.dosbox.com/"
LICENSE = "GPLv2+" LICENSE = "GPLv2+"
@@ -13,15 +13,10 @@ SRC_URI = " \
file://dosbox.desktop \ file://dosbox.desktop \
file://dosbox.png \ file://dosbox.png \
file://0001-use-pkgconfig-to-find-sdl.patch \ file://0001-use-pkgconfig-to-find-sdl.patch \
file://0002-include-dos_inc.h-add-missing-include.patch \
" "
SRC_URI[md5sum] = "7110ee24a45a2b4951ad52eb1a3722be" SRC_URI[md5sum] = "b9b240fa87104421962d14eee71351e8"
SRC_URI[sha256sum] = "7077303595bedd7cd0bb94227fa9a6b5609e7c90a3e6523af11bc4afcb0a57cf" SRC_URI[sha256sum] = "13f74916e2d4002bad1978e55727f302ff6df3d9be2f9b0e271501bd0a938e05"
PACKAGECONFIG ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)} \
"
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
do_install_append() { do_install_append() {
install -d ${D}/${datadir}/applications install -d ${D}/${datadir}/applications

View File

@@ -1,6 +1,6 @@
From 032998923ef3a8e3267d64063723482679a7f736 Mon Sep 17 00:00:00 2001 From 032998923ef3a8e3267d64063723482679a7f736 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 9 Sep 2018 22:31:41 +0200 Date: Fri, 26 Feb 2016 22:49:19 +0100
Subject: [PATCH] use pkgconfig to find sdl Subject: [PATCH] use pkgconfig to find sdl
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@@ -8,20 +8,19 @@ Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [oe specific] Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
--- ---
configure.ac | 21 +-------------------- configure.in | 20 +-------------------
1 file changed, 1 insertion(+), 20 deletions(-) 1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac diff --git a/configure.in b/configure.in
index a723222..3b28be1 100644 index 016ea95..79341e5 100644
--- a/configure.ac --- a/configure.in
+++ b/configure.ac +++ b/configure.in
@@ -26,29 +26,10 @@ if test x$host = xi386-pc-os2-emx ; then @@ -28,28 +28,10 @@ if test x$host = xi386-pc-os2-emx ; then
LDFLAGS="$LDFLAGS -Zomf -Zmt"
fi fi
-dnl Check for SDL dnl Check for SDL
-SDL_VERSION=1.2.0 -SDL_VERSION=1.2.0
-AM_PATH_SDL($SDL_VERSION, -AM_PATH_SDL($SDL_VERSION,
- :, - :,
@@ -33,7 +32,7 @@ index a723222..3b28be1 100644
-dnl Check if SDL is 1.2.x (1.3 not supported) -dnl Check if SDL is 1.2.x (1.3 not supported)
-AC_MSG_CHECKING([SDL version only being 1.2.X]) -AC_MSG_CHECKING([SDL version only being 1.2.X])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -AC_COMPILE_IFELSE([
-#include "SDL.h" -#include "SDL.h"
-void blah(){ -void blah(){
-#if SDL_MINOR_VERSION != 2 -#if SDL_MINOR_VERSION != 2
@@ -41,7 +40,7 @@ index a723222..3b28be1 100644
-#endif -#endif
-; -;
-} -}
-])],AC_MSG_RESULT([yes]),[ -],AC_MSG_RESULT([yes]),[
- AC_MSG_RESULT([no]) - AC_MSG_RESULT([no])
- AC_MSG_ERROR([Only libSDL 1.2.X supported])]) - AC_MSG_ERROR([Only libSDL 1.2.X supported])])
- -
@@ -49,5 +48,5 @@ index a723222..3b28be1 100644
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
-- --
2.14.4 2.5.0

View File

@@ -0,0 +1,35 @@
From 9502307543db1329af0d7d6aadb0ee67d4089f52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 26 Feb 2016 22:57:57 +0100
Subject: [PATCH] include/dos_inc.h: add missing include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
More or less taken from [1]
[1] http://pkgs.fedoraproject.org/cgit/rpms/dosbox.git/tree/dosbox-0.74-gcc46.patch
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
include/dos_inc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/dos_inc.h b/include/dos_inc.h
index 290d76b..b16a164 100644
--- a/include/dos_inc.h
+++ b/include/dos_inc.h
@@ -28,6 +28,8 @@
#include "mem.h"
#endif
+#include <stddef.h>
+
#ifdef _MSC_VER
#pragma pack (1)
#endif
--
2.5.0

View File

@@ -0,0 +1,68 @@
From 168f7f181099e6fbbb4ba7100e45f224afec6107 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sat, 26 Dec 2015 21:29:16 +0100
Subject: [PATCH] use pkg-config for finding sdl library settings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
scripts/src/osd/sdl.lua | 6 +++---
scripts/src/osd/sdl_cfg.lua | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index d1a8322..32ca84a 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -78,7 +78,7 @@ function maintargetosdoptions(_target,_subtarget)
}
configuration { }
else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
+ local str = backtick("pkg-config --libs sdl2 | sed 's/-lSDLmain//'")
addlibfromstring(str)
addoptionsfromstring(str)
end
@@ -280,7 +280,7 @@ if BASE_TARGETOS=="unix" then
"SDL2.framework",
}
else
- local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
+ local str = backtick("pkg-config --libs --static sdl2 | sed 's/-lSDLmain//'")
addlibfromstring(str)
addoptionsfromstring(str)
end
@@ -300,7 +300,7 @@ if BASE_TARGETOS=="unix" then
"SDL2",
}
else
- local str = backtick(sdlconfigcmd() .. " --libs")
+ local str = backtick("pkg-config --libs sdl2")
addlibfromstring(str)
addoptionsfromstring(str)
end
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index 0fd15e5..839a468 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -84,13 +84,13 @@ if BASE_TARGETOS=="unix" then
"MACOSX_USE_LIBSDL",
}
buildoptions {
- backtick(sdlconfigcmd() .. " --cflags | sed 's:/SDL::'"),
+ backtick("pkg-config --cflags sdl2 | sed 's:/SDL::'"),
}
end
end
else
buildoptions {
- backtick(sdlconfigcmd() .. " --cflags"),
+ backtick("pkg-config --cflags sdl2"),
}
if _OPTIONS["targetos"]~="asmjs" then
buildoptions {
--
2.5.5

View File

@@ -0,0 +1,327 @@
From 917f9e35b110c84b7748e47d7cf27097c04f8e49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 1 Jan 2016 20:48:10 +0100
Subject: [PATCH] float4_neon.h: refactor buildins for later gcc's
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
taken from [1-2]
[1] https://patchwork.ozlabs.org/patch/410050/
[2] https://gcc.gnu.org/ml/gcc-patches/2014-04/txtfStfgLNxV5.txt
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
3rdparty/bx/include/bx/float4_neon.h | 74 ++++++++++++++++++++++++------------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/3rdparty/bx/include/bx/float4_neon.h b/3rdparty/bx/include/bx/float4_neon.h
index 3b6fa18..df42814 100644
--- a/3rdparty/bx/include/bx/float4_neon.h
+++ b/3rdparty/bx/include/bx/float4_neon.h
@@ -96,22 +96,22 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float float4_x(float4_t _a)
{
- return __builtin_neon_vget_lanev4sf(_a, 0, 3);
+ return __builtin_neon_vget_lanev4sf(_a, 0);
}
BX_FLOAT4_FORCE_INLINE float float4_y(float4_t _a)
{
- return __builtin_neon_vget_lanev4sf(_a, 1, 3);
+ return __builtin_neon_vget_lanev4sf(_a, 1);
}
BX_FLOAT4_FORCE_INLINE float float4_z(float4_t _a)
{
- return __builtin_neon_vget_lanev4sf(_a, 2, 3);
+ return __builtin_neon_vget_lanev4sf(_a, 2);
}
BX_FLOAT4_FORCE_INLINE float float4_w(float4_t _a)
{
- return __builtin_neon_vget_lanev4sf(_a, 3, 3);
+ return __builtin_neon_vget_lanev4sf(_a, 3);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_ld(const void* _ptr)
@@ -179,14 +179,14 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_itof(float4_t _a)
{
const _i32x4_t itof = __builtin_neon_vreinterpretv4siv4sf(_a);
- const float4_t result = __builtin_neon_vcvtv4si(itof, 1);
+ const float4_t result = __builtin_neon_vcvtsv4si(itof);
return result;
}
BX_FLOAT4_FORCE_INLINE float4_t float4_ftoi(float4_t _a)
{
- const _i32x4_t ftoi = __builtin_neon_vcvtv4sf(_a, 1);
+ const _i32x4_t ftoi = __builtin_neon_vcvtsv4sf(_a);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(ftoi);
return result;
@@ -194,32 +194,32 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_add(float4_t _a, float4_t _b)
{
- return __builtin_neon_vaddv4sf(_a, _b, 3);
+ return __builtin_neon_vaddv4sf(_a, _b);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_sub(float4_t _a, float4_t _b)
{
- return __builtin_neon_vsubv4sf(_a, _b, 3);
+ return __builtin_neon_vsubv4sf(_a, _b);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_mul(float4_t _a, float4_t _b)
{
- return __builtin_neon_vmulv4sf(_a, _b, 3);
+ return __builtin_neon_vmulfv4sf(_a, _b);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_rcp_est(float4_t _a)
{
- return __builtin_neon_vrecpev4sf(_a, 3);
+ return __builtin_neon_vrecpev4sf(_a);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_rsqrt_est(float4_t _a)
{
- return __builtin_neon_vrsqrtev4sf(_a, 3);
+ return __builtin_neon_vrsqrtev4sf(_a);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_cmpeq(float4_t _a, float4_t _b)
{
- const _i32x4_t tmp = __builtin_neon_vceqv4sf(_a, _b, 3);
+ const _i32x4_t tmp = __builtin_neon_vceqv4sf(_a, _b);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp);
return result;
@@ -227,7 +227,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_cmplt(float4_t _a, float4_t _b)
{
- const _i32x4_t tmp = __builtin_neon_vcgtv4sf(_b, _a, 3);
+ const _i32x4_t tmp = __builtin_neon_vcgtv4sf(_b, _a);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp);
return result;
@@ -235,7 +235,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_cmple(float4_t _a, float4_t _b)
{
- const _i32x4_t tmp = __builtin_neon_vcgev4sf(_b, _a, 3);
+ const _i32x4_t tmp = __builtin_neon_vcgev4sf(_b, _a);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp);
return result;
@@ -243,7 +243,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_cmpgt(float4_t _a, float4_t _b)
{
- const _i32x4_t tmp = __builtin_neon_vcgtv4sf(_a, _b, 3);
+ const _i32x4_t tmp = __builtin_neon_vcgtv4sf(_a, _b);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp);
return result;
@@ -251,7 +251,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_cmpge(float4_t _a, float4_t _b)
{
- const _i32x4_t tmp = __builtin_neon_vcgev4sf(_a, _b, 3);
+ const _i32x4_t tmp = __builtin_neon_vcgev4sf(_a, _b);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp);
return result;
@@ -259,19 +259,19 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_min(float4_t _a, float4_t _b)
{
- return __builtin_neon_vminv4sf(_a, _b, 3);
+ return __builtin_neon_vminfv4sf(_a, _b);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_max(float4_t _a, float4_t _b)
{
- return __builtin_neon_vmaxv4sf(_a, _b, 3);
+ return __builtin_neon_vmaxfv4sf(_a, _b);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_and(float4_t _a, float4_t _b)
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vandv4si(tmp0, tmp1, 0);
+ const _i32x4_t tmp2 = tmp0 & tmp1;
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -281,7 +281,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vbicv4si(tmp0, tmp1, 0);
+ const _i32x4_t tmp2 = tmp0 & ~tmp1;
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -291,7 +291,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vorrv4si(tmp0, tmp1, 0);
+ const _i32x4_t tmp2 = tmp0 | tmp1;
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -301,7 +301,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_veorv4si(tmp0, tmp1, 0);
+ const _i32x4_t tmp2 = tmp0 ^ tmp1;
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -312,7 +312,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
if (__builtin_constant_p(_count) )
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
- const _i32x4_t tmp1 = __builtin_neon_vshl_nv4si(tmp0, _count, 0);
+ const _i32x4_t tmp1 = __builtin_neon_vshl_nv4si(tmp0, _count);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1);
return result;
@@ -320,7 +320,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t shift = __builtin_neon_vdup_nv4si( (__builtin_neon_si)_count);
- const _i32x4_t tmp1 = __builtin_neon_vshlv4si(tmp0, shift, 1);
+ const _i32x4_t tmp1 = __builtin_neon_vshlsv4si(tmp0, shift);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1);
return result;
@@ -331,7 +331,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
if (__builtin_constant_p(_count) )
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
- const _i32x4_t tmp1 = __builtin_neon_vshr_nv4si(tmp0, _count, 0);
+ const _i32x4_t tmp1 = __builtin_neon_vshru_nv4si(tmp0, _count);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1);
return result;
@@ -339,7 +339,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t shift = __builtin_neon_vdup_nv4si( (__builtin_neon_si)-_count);
- const _i32x4_t tmp1 = __builtin_neon_vshlv4si(tmp0, shift, 1);
+ const _i32x4_t tmp1 = __builtin_neon_vshlsv4si(tmp0, shift);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1);
return result;
@@ -350,7 +350,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
if (__builtin_constant_p(_count) )
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
- const _i32x4_t tmp1 = __builtin_neon_vshr_nv4si(tmp0, _count, 1);
+ const _i32x4_t tmp1 = __builtin_neon_vshrs_nv4si(tmp0, _count);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1);
return result;
@@ -358,7 +358,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t shift = __builtin_neon_vdup_nv4si( (__builtin_neon_si)-_count);
- const _i32x4_t tmp1 = __builtin_neon_vshlv4si(tmp0, shift, 1);
+ const _i32x4_t tmp1 = __builtin_neon_vshlsv4si(tmp0, shift);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp1);
return result;
@@ -366,19 +366,19 @@ IMPLEMENT_TEST(xyzw , xyzw);
BX_FLOAT4_FORCE_INLINE float4_t float4_madd(float4_t _a, float4_t _b, float4_t _c)
{
- return __builtin_neon_vmlav4sf(_c, _a, _b, 3);
+ return __builtin_neon_vmlav4sf(_c, _a, _b);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_nmsub(float4_t _a, float4_t _b, float4_t _c)
{
- return __builtin_neon_vmlsv4sf(_c, _a, _b, 3);
+ return __builtin_neon_vmlsv4sf(_c, _a, _b);
}
BX_FLOAT4_FORCE_INLINE float4_t float4_icmpeq(float4_t _a, float4_t _b)
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vceqv4si(tmp0, tmp1, 1);
+ const _i32x4_t tmp2 = __builtin_neon_vceqv4si(tmp0, tmp1);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -388,7 +388,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vcgtv4si(tmp1, tmp0, 1);
+ const _i32x4_t tmp2 = __builtin_neon_vcgtv4si(tmp1, tmp0);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -398,7 +398,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vcgtv4si(tmp0, tmp1, 1);
+ const _i32x4_t tmp2 = __builtin_neon_vcgtv4si(tmp0, tmp1);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -408,7 +408,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vminv4si(tmp0, tmp1, 1);
+ const _i32x4_t tmp2 = __builtin_neon_vminsv4si(tmp0, tmp1);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -418,7 +418,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vmaxv4si(tmp0, tmp1, 1);
+ const _i32x4_t tmp2 = __builtin_neon_vmaxsv4si(tmp0, tmp1);
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -428,7 +428,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vaddv4si(tmp0, tmp1, 1);
+ const _i32x4_t tmp2 = tmp0 + tmp1;
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
@@ -438,7 +438,7 @@ IMPLEMENT_TEST(xyzw , xyzw);
{
const _i32x4_t tmp0 = __builtin_neon_vreinterpretv4siv4sf(_a);
const _i32x4_t tmp1 = __builtin_neon_vreinterpretv4siv4sf(_b);
- const _i32x4_t tmp2 = __builtin_neon_vsubv4si(tmp0, tmp1, 1);
+ const _i32x4_t tmp2 = tmp0 - tmp1;
const float4_t result = __builtin_neon_vreinterpretv4sfv4si(tmp2);
return result;
--
2.5.0

View File

@@ -0,0 +1,39 @@
From b3db2aa6b762711015f2d504006b44e698a4de0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 31 Jul 2016 01:36:52 +0200
Subject: [PATCH] bx/float4_neon.h: Remove neon_reinterpret, use casts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
See gcc6;
commit da08cb5504f0b791ada8889b16620055672999b8
Author: alalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Feb 4 14:49:02 2016 +0000
[ARM] Remove neon_reinterpret, use casts
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
3rdparty/bx/include/bx/float4_neon.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/3rdparty/bx/include/bx/float4_neon.h b/3rdparty/bx/include/bx/float4_neon.h
index c3545d0..811c4ff 100644
--- a/3rdparty/bx/include/bx/float4_neon.h
+++ b/3rdparty/bx/include/bx/float4_neon.h
@@ -6,6 +6,10 @@
#ifndef BX_FLOAT4_NEON_H_HEADER_GUARD
#define BX_FLOAT4_NEON_H_HEADER_GUARD
+/* gcc6 hacks */
+#define __builtin_neon_vreinterpretv4sfv4si(a) ((float4_t)a)
+#define __builtin_neon_vreinterpretv4siv4sf(a) ((_i32x4_t)a)
+
namespace bx
{
typedef __builtin_neon_sf float4_t __attribute__( (__vector_size__(16) ) );
--
2.5.5

View File

@@ -2,18 +2,19 @@ SUMMARY = "Multiple Arcade Machine Emulator"
HOMEPAGE = "http://www.mamedev.org/index.php" HOMEPAGE = "http://www.mamedev.org/index.php"
LICENSE = "GPLv2+" LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f7c747554c44283f89bdf31be2d12551" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=89436197a991695e278e47475b4ff7ae"
SRC_URI = " \ SRC_URI = " \
https://github.com/mamedev/mame/archive/${BPN}${PV}.tar.gz \ https://github.com/mamedev/mame/archive/${BPN}${PV}.tar.gz \
file://0001-use-pkg-config-for-finding-sdl-library-settings.patch \
file://0002-float4_neon.h-refactor-buildins-for-later-gcc-s.patch \
file://0003-bx-float4_neon.h-Remove-neon_reinterpret-use-casts.patch \
" "
SRC_URI[md5sum] = "e690994e57a13380045bd74258a698ca" SRC_URI[md5sum] = "b2aed655e1ea2bccf26bf96f189257ba"
SRC_URI[sha256sum] = "d51f2a3d740dff13acbe23b0bdcdd9a7077ee873baeabdf8ad5b1499bd9df99f" SRC_URI[sha256sum] = "e8837ae9c21ac6ca289c0214747a6d7ff7cc4683b9426377f42cda318fddcb25"
S = "${WORKDIR}/${BPN}-${BPN}${PV}" S = "${WORKDIR}/${BPN}-${BPN}${PV}"
inherit siteinfo
DEPENDS = " \ DEPENDS = " \
libsdl2 \ libsdl2 \
libsdl2-ttf \ libsdl2-ttf \
@@ -31,21 +32,14 @@ DEPENDS = " \
CLEANBROKEN = "1" CLEANBROKEN = "1"
# TBD: x86 may overrideoverrides later - cannot test
MAME_NOASM="NOASM=1"
# genie.lua does not detect 64bit targets at least on aarch64
MAME_PTR64 = "${@oe.utils.conditional('SITEINFO_BITS', '64', '-DPTR64=1', '', d)}"
EXTRA_OEMAKE = " \ EXTRA_OEMAKE = " \
linux \ linux \
CROSS_BUILD=1 \ CROSS_BUILD=1 \
OVERRIDE_CC='${CC} ${MAME_PTR64}' \ OVERRIDE_CC='${CC}' \
OVERRIDE_CXX='${CXX} ${MAME_PTR64}' \ OVERRIDE_CXX='${CXX}' \
TOOLS=1 \ TOOLS=1 \
USE_QTDEBUG=0 \ USE_QTDEBUG=0 \
NOWERROR=1 \ NOWERROR=1 \
${MAME_NOASM} \
USE_SYSTEM_LIB_EXPAT=1 \ USE_SYSTEM_LIB_EXPAT=1 \
USE_SYSTEM_LIB_ZLIB=1 \ USE_SYSTEM_LIB_ZLIB=1 \
USE_SYSTEM_LIB_FLAC=1 \ USE_SYSTEM_LIB_FLAC=1 \
@@ -55,15 +49,9 @@ EXTRA_OEMAKE = " \
USE_SYSTEM_LIB_PORTAUDIO=1 \ USE_SYSTEM_LIB_PORTAUDIO=1 \
" "
do_compile_prepend() { EXTRA_OEMAKE_append_arm = " \
# seems there is some race. Build complains NOASM=1 \
# | Assembler messages: "
# | Fatal error: can't create obj/Release/3rdparty/lzma/C/7zAlloc.o: No such file or directory
# | Assembler messages:
# | Fatal error: can't create obj/Release/src/mame/drivers/acvirus.o: No such file or directory
# But that directory is created with a few files
mkdir -p ${S}/build/projects/sdl/mame/gmake-linux/obj/Release/3rdparty/lzma/C
}
do_install() { do_install() {
# Note: Unstripped mame binary for armv7 is > 1GB!! # Note: Unstripped mame binary for armv7 is > 1GB!!

View File

@@ -1,25 +1,8 @@
From 389ed0e18c10a8b3368d0b9fbd2e1f5a7e37f072 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 30 Jun 2017 09:30:32 +0200
Subject: [PATCH] custtomize configure and Makefile to our needs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
Makefile | 2 +-
configure | 39 +++++++++++++++++++++++----------------
2 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index 35a1e36..a8984d0 100644 index 67b1a10a7a81..620072cc1b9c 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -177,7 +177,7 @@ config.mak: $(srcdir)/configure @@ -172,7 +172,7 @@ config.mak: $(srcdir)/configure
install: all install: all
$(INSTALL) -d "$(DESTDIR)$(BINDIR)" $(INSTALL) -d "$(DESTDIR)$(BINDIR)"
@@ -29,28 +12,38 @@ index 35a1e36..a8984d0 100644
$(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/index.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/" $(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/index.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/"
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics" $(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics"
diff --git a/configure b/configure diff --git a/configure b/configure
index a1ecfb1..05e5c1c 100755 index 419eb8a5fe10..8f453b9f5d62 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -307,6 +307,7 @@ mingw32-cross) @@ -334,6 +334,7 @@ mingw32-cross)
_host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` _host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
_host_os=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` _host_os=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
_host_vendor=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` _host_vendor=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ _host_prefix=$_host + _host_prefix=$_host
;; ;;
esac esac
@@ -347,21 +348,26 @@ esac @@ -375,20 +376,27 @@ esac
#
# Determine the C++ compiler # Determine the C++ compiler
# #
-echo_n "Looking for C++ compiler... " echo_n "Looking for C++ compiler... "
-if test -n "$_host"; then -if test -n "$_host"; then
- compilers="$CXX $_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++" - compilers="$CXX $_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
-else
- compilers="$CXX g++ c++"
-fi
-for compiler in $compilers; do
- if test_compiler $compiler; then
- CXX=$compiler
- echo $CXX
- break
- fi
-done
-if test -z $CXX; then
+if test_compiler "$CXX"; then +if test_compiler "$CXX"; then
+ echo "$CXX" + echo "$CXX"
else +else
- compilers="$CXX g++ c++"
+ if test -n "$_host"; then + if test -n "$_host"; then
+ compilers="$_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++" + compilers="$_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
+ else + else
@@ -61,37 +54,29 @@ index a1ecfb1..05e5c1c 100755
+ echo "testing compile $compiler" + echo "testing compile $compiler"
+ if test_compiler $compiler; then + if test_compiler $compiler; then
+ CXX=$compiler + CXX=$compiler
+ echo $CXX + echo $CXX
+ break + break
+ fi + fi
+ done + done
fi +fi
+
-for compiler in $compilers; do
- if test_compiler "$compiler -std=c++14"; then
- CXX=$compiler
- echo $CXX
- break
- fi
-done
-if test -z $CXX; then
+if test -z "$CXX"; then +if test -z "$CXX"; then
echo "none found!" echo "none found!"
exit 1 exit 1
fi fi
@@ -511,8 +517,9 @@ if test -n "$_host"; then @@ -529,8 +537,9 @@ if test -n "$_host"; then
_host_os=win32 _host_os=win32
;; ;;
*) *)
- echo "Cross-compiling to unknown target, please add your target to configure." - echo "Cross-compiling to unknown target, please add your target to configure."
- exit 1 - exit 1
+ echo "Cross-compiling for Yocto Project based systems." + echo "Cross-compiling for Yocto Project based systems."
+ DEFINES="$DEFINES -DUNIX" + DEFINES="$DEFINES -DUNIX"
+ _host_os=unix + _host_os=unix
;; ;;
esac esac
@@ -676,7 +683,7 @@ fi @@ -734,7 +743,7 @@ fi
# Now, add the appropriate defines/libraries/headers # Now, add the appropriate defines/libraries/headers
# #
echo echo
@@ -100,15 +85,21 @@ index a1ecfb1..05e5c1c 100755
SRC="src" SRC="src"
CORE="$SRC/emucore" CORE="$SRC/emucore"
@@ -694,7 +701,7 @@ ZLIB="$SRC/zlib" @@ -750,7 +759,7 @@ ZLIB="$SRC/zlib"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI -I$TIA -I$TIA_FRAME_MANAGER" INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI"
-INCLUDES="$INCLUDES `$_sdlconfig --cflags`" -INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
+INCLUDES="$INCLUDES `pkg-config --cflags sdl2`" +INCLUDES="$INCLUDES `pkg-config --cflags sdl2`"
if test "$_build_static" = yes ; then if test "$_build_static" = yes ; then
_sdl_conf_libs="--static-libs" _sdl_conf_libs="--static-libs"
LDFLAGS="-static $LDFLAGS" LDFLAGS="-static $LDFLAGS"
-- @@ -758,7 +767,7 @@ else
2.14.3 _sdl_conf_libs="--libs"
fi
-LIBS="$LIBS `$_sdlconfig $_sdl_conf_libs`"
+LIBS="$LIBS `pkg-config --libs sdl2`"
LD=$CXX
case $_host_os in
unix)

View File

@@ -0,0 +1,18 @@
SUMMARY = "Multi-platform Atari 2600 VCS emulator"
HOMEPAGE = "http://stella.sourceforge.net/"
SECTION = "emulators"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://License.txt;md5=878e3965c7b52d85827c75f5a2f3b314"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}-src.tar.gz \
file://cross_compile_support.patch"
SRC_URI[md5sum] = "91d7a7333097345e81f90a39fcdcc324"
SRC_URI[sha256sum] = "c1921671dbc08422ae8a7a4102c6a2a34433f04594d67f55a7129c1504bcd288"
DEPENDS = "libsdl2 zlib libpng"
FILES_${PN} += "${datadir}/icons"
inherit autotools-brokensep

View File

@@ -1,21 +0,0 @@
SUMMARY = "Multi-platform Atari 2600 VCS emulator"
HOMEPAGE = "https://stella-emu.github.io/"
SECTION = "emulators"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://License.txt;md5=878e3965c7b52d85827c75f5a2f3b314"
inherit autotools-brokensep gtk-icon-cache
DEPENDS += "libsdl2 zlib libpng"
SRC_URI = " \
https://github.com/stella-emu/stella/releases/download/${PV}/${BPN}-${PV}-src.tar.xz \
file://0001-custtomize-configure-and-Makefile-to-our-needs.patch \
"
SRC_URI[md5sum] = "f7cccdf4761b7183a235ffeef136e180"
SRC_URI[sha256sum] = "e074317c25e5d4cabec4558909d301c3a7654ad620863f05d342244fe6bdfe0a"
CLEANBROKEN = "1"
FILES_${PN} += "${datadir}/icons"

View File

@@ -1,34 +0,0 @@
From 701abed61ce01e2d91394bc266b98281f006efe7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 21 Oct 2016 18:15:31 +0200
Subject: [PATCH] fix autoreconfig
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
fixes:
| gnu-configize: 'configure.ac' or 'configure.in' is required
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index b5403d2..3b7f0bb 100755
--- a/configure.ac
+++ b/configure.ac
@@ -2360,7 +2360,6 @@ if test x"$FFMPEG_DO_SUBDIRS" = "xyes"; then
else
ac_configure_args="$ac_configure_args --enable-yasm-command=${YASM} --enable-make-command=${MAKE-make} --enable-full-host=${ac_cv_host} --enable-compiler=${CC} --prefix=${prefix}"
fi
- AC_CONFIG_SUBDIRS(src/lib/ffmpeg)
fi
if test x"$HAVE_SHARED_FFMPEG" = "xyes"; then
--
2.5.5

View File

@@ -0,0 +1,68 @@
From 0901ffbd5537d3cf974a3d790304ebf049ca60b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 13 May 2016 00:24:03 +0200
Subject: [PATCH] gifdrv.c: fix build with giflib > 5.1.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/gfxoutputdrv/gifdrv.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/gfxoutputdrv/gifdrv.c b/src/gfxoutputdrv/gifdrv.c
index 7f7f3bc..725e1f0 100644
--- a/src/gfxoutputdrv/gifdrv.c
+++ b/src/gfxoutputdrv/gifdrv.c
@@ -114,7 +114,11 @@ static int gifdrv_open(screenshot_t *screenshot, const char *filename)
if (EGifPutScreenDesc(sdata->fd, screenshot->width, screenshot->height, 8, 0, gif_colors) == GIF_ERROR ||
EGifPutImageDesc(sdata->fd, 0, 0, screenshot->width, screenshot->height, 0, NULL) == GIF_ERROR)
{
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ EGifCloseFile(sdata->fd, 0);
+#else
EGifCloseFile(sdata->fd);
+#endif
VICE_FreeMapObject(gif_colors);
lib_free(sdata->data);
lib_free(sdata->ext_filename);
@@ -145,7 +149,11 @@ static int gifdrv_close(screenshot_t *screenshot)
sdata = screenshot->gfxoutputdrv_data;
+ #if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ EGifCloseFile(sdata->fd, 0);
+#else
EGifCloseFile(sdata->fd);
+#endif
VICE_FreeMapObject(gif_colors);
/* for some reason giflib will create a file with unexpected
@@ -184,7 +192,11 @@ static char *gifdrv_memmap_ext_filename;
static int gifdrv_close_memmap(void)
{
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ EGifCloseFile(gifdrv_memmap_fd, 0);
+#else
EGifCloseFile(gifdrv_memmap_fd);
+#endif
VICE_FreeMapObject(gif_colors);
lib_free(gifdrv_memmap_ext_filename);
@@ -231,7 +243,11 @@ static int gifdrv_open_memmap(const char *filename, int x_size, int y_size, BYTE
if (EGifPutScreenDesc(gifdrv_memmap_fd, x_size, y_size, 8, 0, gif_colors) == GIF_ERROR ||
EGifPutImageDesc(gifdrv_memmap_fd, 0, 0, x_size, y_size, 0, NULL) == GIF_ERROR)
{
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ EGifCloseFile(gifdrv_memmap_fd, 0);
+#else
EGifCloseFile(gifdrv_memmap_fd);
+#endif
VICE_FreeMapObject(gif_colors);
lib_free(gifdrv_memmap_ext_filename);
return -1;
--
2.5.5

View File

@@ -1,101 +0,0 @@
From 6f69c122f0ea97b89bb0bb72cb75e97dc24d5506 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Fri, 8 Jun 2018 11:10:25 +0200
Subject: [PATCH] Hack build with latest FFMPEG
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Taking videos in raw format won't work with ne FFMPEG.
| ../../../vice-3.2/src/gfxoutputdrv/ffmpegdrv.c:363:34: error: 'CODEC_CAP_VARIABLE_FRAME_SIZE' undeclared (first use in this function); did you mean 'AV_CODEC_CAP_VARIABLE_FRAME_SIZE'?
| if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| AV_CODEC_CAP_VARIABLE_FRAME_SIZE
| ../../../vice-3.2/src/gfxoutputdrv/ffmpegdrv.c:461:21: error: 'CODEC_FLAG_GLOBAL_HEADER' undeclared (first use in this function); did you mean 'AV_CODEC_FLAG_GLOBAL_HEADER'?
| c->flags |= CODEC_FLAG_GLOBAL_HEADER;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| AV_CODEC_FLAG_GLOBAL_HEADER
| ../../../../../../../../../oe-core/workspace/sources/vice/src/gfxoutputdrv/ffmpegdrv.c:982:40: error: 'AVFMT_RAWPICTURE' undeclared (first use in this function); did you mean 'FF_API_AVPICTURE'?
| if (ffmpegdrv_oc->oformat->flags & AVFMT_RAWPICTURE) {
| ^~~~~~~~~~~~~~~~
| FF_API_AVPICTURE
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/gfxoutputdrv/ffmpegdrv.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/gfxoutputdrv/ffmpegdrv.c b/src/gfxoutputdrv/ffmpegdrv.c
index 4748348..b52e39b 100644
--- a/src/gfxoutputdrv/ffmpegdrv.c
+++ b/src/gfxoutputdrv/ffmpegdrv.c
@@ -360,7 +360,11 @@ static int ffmpegdrv_open_audio(AVFormatContext *oc, AVStream *st)
}
audio_is_open = 1;
+#ifdef AV_CODEC_CAP_VARIABLE_FRAME_SIZE
+ if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) {
+#else
if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
+#endif
audio_inbuf_samples = 10000;
} else {
audio_inbuf_samples = c->frame_size;
@@ -454,7 +458,11 @@ static int ffmpegmovie_init_audio(int speed, int channels, soundmovie_buffer_t *
/* Some formats want stream headers to be separate. */
if (ffmpegdrv_oc->oformat->flags & AVFMT_GLOBALHEADER)
+#ifdef AV_CODEC_FLAG_GLOBAL_HEADER
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+#else
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+#endif
/* create resampler context */
#ifndef HAVE_FFMPEG_AVRESAMPLE
@@ -787,7 +795,11 @@ static void ffmpegdrv_init_video(screenshot_t *screenshot)
/* Some formats want stream headers to be separate. */
if (ffmpegdrv_oc->oformat->flags & AVFMT_GLOBALHEADER) {
+#ifdef AV_CODEC_FLAG_GLOBAL_HEADER
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+#else
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+#endif
}
if (audio_init_done) {
@@ -967,6 +979,7 @@ static int ffmpegdrv_record(screenshot_t *screenshot)
video_st.frame->pts = video_st.next_pts++;
+#ifdef AVFMT_RAWPICTURE
if (ffmpegdrv_oc->oformat->flags & AVFMT_RAWPICTURE) {
AVPacket pkt;
VICE_P_AV_INIT_PACKET(&pkt);
@@ -978,6 +991,7 @@ static int ffmpegdrv_record(screenshot_t *screenshot)
ret = VICE_P_AV_INTERLEAVED_WRITE_FRAME(ffmpegdrv_oc, &pkt);
} else {
+#endif
AVPacket pkt = { 0 };
int got_packet;
@@ -998,7 +1012,9 @@ static int ffmpegdrv_record(screenshot_t *screenshot)
} else {
ret = 0;
}
+#ifdef AVFMT_RAWPICTURE
}
+#endif
if (ret < 0) {
log_debug("Error while writing video frame");
return -1;
--
2.14.3

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

View File

@@ -1,9 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=X64 (Vice) Name=Vice C64 Emulator
Comment=Commodore 64 Emulator
Exec=x64 Exec=x64
Icon=c64
Terminal=false Terminal=false
StartupNotify=false StartupNotify=false
Categories=Game Categories=Game

View File

@@ -0,0 +1,51 @@
SUMMARY = "Versatile Commodore Emulator"
HOMEPAGE = "http://vice-emu.sourceforge.net"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://doc/html/plain/COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
# Sources for c64 software:
# [1] ftp://arnold.c64.org/pub/games/
SRC_URI = " \
${SOURCEFORGE_MIRROR}/project/vice-emu/releases/${BPN}-${PV}.tar.gz \
file://0001-gifdrv.c-fix-build-with-giflib-5.1.0.patch \
file://vice_64.desktop \
"
SRC_URI[md5sum] = "b017647a0c159bbe43cdb81762d1c577"
SRC_URI[sha256sum] = "ff8b8d5f0f497d1f8e75b95bbc4204993a789284a08a8a59ba727ad81dcace10"
inherit autotools pkgconfig
DEPENDS = "libxt libxmu libxaw libxpm libxv pulseaudio libav libsdl libpng jpeg giflib"
# some options autotools.bbclass adds by default cause configure to complain
# so (hack): copy from autotools.bbclass and remove unwanted
CONFIGUREOPTS = " \
--build=${BUILD_SYS} \
--host=${HOST_SYS} \
--target=${TARGET_SYS} \
--prefix=${prefix} \
--exec_prefix=${exec_prefix} \
--bindir=${bindir} \
--sbindir=${sbindir} \
--libexecdir=${libexecdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--sharedstatedir=${sharedstatedir} \
--localstatedir=${localstatedir} \
--libdir=${libdir} \
--includedir=${includedir} \
--oldincludedir=${oldincludedir} \
--infodir=${infodir} \
--mandir=${mandir} \
${CONFIGUREOPT_DEPTRACK} \
"
EXTRA_OECONF = "--disable-ffmpeg"
do_install_append() {
install -d ${D}/${datadir}/applications
install -m 0644 ${WORKDIR}/vice_64.desktop ${D}/${datadir}/applications
}
FILES_${PN} += "${datadir}/icons"

View File

@@ -1,65 +0,0 @@
SUMMARY = "Versatile Commodore Emulator"
HOMEPAGE = "http://vice-emu.sourceforge.net"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
# Sources for c64 software:
# [1] ftp://arnold.c64.org/pub/games/
SRC_URI = " \
${SOURCEFORGE_MIRROR}/vice-emu/${PN}-${PV}.tar.gz \
file://0001-fix-autoreconfig.patch \
file://0002-Hack-build-with-latest-FFMPEG.patch \
file://c64_16.png \
file://c64_32.png \
file://c64_48.png \
file://vice_64.desktop \
"
SRC_URI[md5sum] = "58ba6b6653097898e059e0194615705a"
SRC_URI[sha256sum] = "28d99f5e110720c97ef16d8dd4219cf9a67661d58819835d19378143697ba523"
inherit autotools pkgconfig gtk-icon-cache
DEPENDS = " \
bdftopcf-native \
mkfontdir-native \
mkfontscale-native \
xa-native \
bison-native \
gtk+ \
libav \
libsdl \
libpng \
jpeg \
giflib \
libxxf86vm \
portaudio-v19 \
mpg123 \
virtual/libgl \
vte9 \
${@bb.utils.contains("DISTRO_FEATURES", "x11 opengl", "gtkglext", "", d)} \
"
PACKAGECONFIG[pulseaudio] = "--with-pulse,--without-pulse,pulseaudio,pulseaudio-server"
EXTRA_OECONF = " \
--disable-option-checking \
--enable-external-ffmpeg \
--enable-parsid \
--enable-fullscreen \
--enable-gnomeui \
--with-uithreads \
--without-oss \
"
do_install_append() {
install -d ${D}/${datadir}/applications
install -m 0644 ${WORKDIR}/vice_64.desktop ${D}/${datadir}/applications
for size in 16 32 48; do
install -d ${D}/${datadir}/icons/hicolor/${size}x${size}/apps
install -m 0644 ${WORKDIR}/c64_${size}.png ${D}/${datadir}/icons/hicolor/${size}x${size}/apps/c64.png
done
}
FILES_${PN} += "${datadir}/icons"

View File

@@ -1,7 +1,7 @@
From c12487107cc52aa13841533fd151362e37f37ff6 Mon Sep 17 00:00:00 2001 From c12487107cc52aa13841533fd151362e37f37ff6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 13 Mar 2015 01:40:33 +0100 Date: Fri, 13 Mar 2015 01:40:33 +0100
Subject: [PATCH] use pkg-config to find sdl Subject: [PATCH] use pkg-config to find sdl2
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
@@ -12,20 +12,20 @@ Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index de4782b..0dfc7ce 100644 index 1144f9b..9bfef24 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -27,8 +27,8 @@ LIBS:= -L/usr/lib -lz @@ -27,8 +27,8 @@ LIBS:= -lz
CFLAGS+= -DDEBUG=$(DEBUG) #CFLAGS+= -DDEBUG=$(DEBUG)
# SDL libraries and cflags # SDL libraries and cflags
-SDL_LIB:= $(shell sdl-config --libs) -SDL_LIB:= $(shell sdl2-config --libs)
-SDL_INC:= $(shell sdl-config --cflags) -SDL_INC:= $(shell sdl2-config --cflags)
+SDL_LIB:= $(shell pkg-config --libs sdl) +SDL_LIB:= $(shell pkg-config --libs sdl2)
+SDL_INC:= $(shell pkg-config --cflags sdl) +SDL_INC:= $(shell pkg-config --cflags sdl2)
# Expat libraries and cflags # Expat libraries and cflags
EXPAT_LIB:= -L/usr/pkg/lib -lexpat EXPAT_LIB:= -L/usr/pkg/lib -lexpat
-- --
1.9.3 2.5.5

View File

@@ -5,26 +5,26 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
SRC_URI = " \ SRC_URI = " \
git://github.com/schnitzeltony/z80.git;branch=master \ git://github.com/schnitzeltony/z80.git;branch=sdl2 \
file://0001-use-pkg-config-to-find-sdl.patch \ file://0001-use-pkg-config-to-find-sdl.patch \
file://cgenie.desktop \ file://cgenie.desktop \
file://trs80.desktop \ file://trs80.desktop \
" "
SRCREV= "413ca44336c4423ac0e39b55d75fce95ff4c31fc" SRCREV= "ec721e4a7f06f22a67e1a9c48f4d681143852e42"
PV = "0.3.1+git${SRCPV}" PV = "0.3.1+git${SRCPV}"
inherit pkgconfig inherit pkgconfig
DEPENDS = "expat libsdl" DEPENDS = "expat libsdl2"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
EXTRA_OEMAKE = "-e MAKEFLAGS=" EXTRA_OEMAKE = "-e MAKEFLAGS="
do_compile() { do_compile() {
SDL_INC=$(pkg-config --cflags sdl) SDL_INC=$(pkg-config --cflags sdl2)
SDL_LIB=$(pkg-config --libs sdl) SDL_LIB=$(pkg-config --libs sdl2)
EXPAT_LIB=$(pkg-config --libs expat) EXPAT_LIB=$(pkg-config --libs expat)
mkdir -p ${S}/obj/trs80 mkdir -p ${S}/obj/trs80

View File

@@ -23,8 +23,6 @@ SRC_URI[music.sha256sum] = "b27f7b9dc5f9c2744402c56c9499dfd9503c17e73a2a5223e745
S = "${WORKDIR}/${BPN}_${PV}-src" S = "${WORKDIR}/${BPN}_${PV}-src"
do_unpack[depends] += "p7zip-native:do_populate_sysroot"
do_compile() { do_compile() {
scons opengl=0 prefix=${D}${prefix} sharepath=${datadir}/${BPN} scons opengl=0 prefix=${D}${prefix} sharepath=${datadir}/${BPN}
} }

View File

@@ -1,73 +0,0 @@
From 229d704ce2958ed22ca3ece49169bf1b1b97163d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 30 Jun 2017 11:15:40 +0200
Subject: [PATCH] increase buffer size to avoid gcc7 format-overflow errors
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/episodes.c | 2 +-
src/episodes.h | 2 +-
src/lvllib.c | 2 +-
src/lvllib.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/episodes.c b/src/episodes.c
index 796d531..f346641 100644
--- a/src/episodes.c
+++ b/src/episodes.c
@@ -41,7 +41,7 @@ JE_EnemyDatType enemyDat;
/* EPISODE variables */
JE_byte initial_episode_num, episodeNum = 0;
JE_boolean episodeAvail[EPISODE_MAX]; /* [1..episodemax] */
-char episode_file[13], cube_file[13];
+char episode_file[15], cube_file[15];
JE_longint episode1DataLoc;
diff --git a/src/episodes.h b/src/episodes.h
index 598e1ae..0ff4380 100644
--- a/src/episodes.h
+++ b/src/episodes.h
@@ -162,7 +162,7 @@ extern JE_EnemyDatType enemyDat;
extern JE_byte initial_episode_num, episodeNum;
extern JE_boolean episodeAvail[EPISODE_MAX];
-extern char episode_file[13], cube_file[13];
+extern char episode_file[15], cube_file[15];
extern JE_longint episode1DataLoc;
extern JE_boolean bonusLevel;
diff --git a/src/lvllib.c b/src/lvllib.c
index a09c040..ca9a183 100644
--- a/src/lvllib.c
+++ b/src/lvllib.c
@@ -22,7 +22,7 @@
JE_LvlPosType lvlPos;
-char levelFile[13]; /* string [12] */
+char levelFile[30]; /* string [29] for gcc7's sake */
JE_word lvlNum;
void JE_analyzeLevel( void )
diff --git a/src/lvllib.h b/src/lvllib.h
index f22e3f5..61b3882 100644
--- a/src/lvllib.h
+++ b/src/lvllib.h
@@ -25,7 +25,7 @@
typedef JE_longint JE_LvlPosType[43]; /* [1..42 + 1] */
extern JE_LvlPosType lvlPos;
-extern char levelFile[13]; /* string [12] */
+extern char levelFile[30]; /* string [29] for gcc7's sake */
extern JE_word lvlNum;
void JE_analyzeLevel( void );
--
2.9.4

View File

@@ -1,82 +0,0 @@
From 655427d665ee6c9bd9f61193b6e48d3dde8b0bde Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Thu, 5 Jul 2018 19:11:21 +0200
Subject: [PATCH] fix build with gcc8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/game_menu.c | 2 +-
src/joystick.c | 4 ++--
src/tyrian2.c | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/game_menu.c b/src/game_menu.c
index 416f2cb..7d24ad7 100644
--- a/src/game_menu.c
+++ b/src/game_menu.c
@@ -852,7 +852,7 @@ void JE_itemScreen( void )
? 100
: (yLoc * 100) / ((cube[currentCube].last_line - 9) * 12);
- char buf[20];
+ char buf[50];
snprintf(buf, sizeof(buf), "%s %d%%", miscText[11], percent_read);
JE_outTextAndDarken(VGAScreen, 176, 160, buf, 14, 1, TINY_FONT);
diff --git a/src/joystick.c b/src/joystick.c
index bf99647..933b791 100644
--- a/src/joystick.c
+++ b/src/joystick.c
@@ -493,14 +493,14 @@ void code_to_assignment( Joystick_assignment *assignment, const char *buffer )
assignment->negative_axis = (toupper(direction) == '-');
}
-/* gives the short (6 or less characters) identifier for a joystick assignment
+/* gives the short (15 or less characters) identifier for a joystick assignment
*
* two of these per direction/action is all that can fit on the joystick config screen,
* assuming two digits for the axis/button/hat number
*/
const char *assignment_to_code( const Joystick_assignment *assignment )
{
- static char name[7];
+ static char name[16];
switch (assignment->type)
{
diff --git a/src/tyrian2.c b/src/tyrian2.c
index 4d528cf..411d8b6 100644
--- a/src/tyrian2.c
+++ b/src/tyrian2.c
@@ -2088,12 +2088,12 @@ draw_player_shot_loop_end:
if (debug)
{
strcpy(tempStr, "");
- for (temp = 0; temp < 9; temp++)
+ /*for (temp = 0; temp < 9; temp++)
{
sprintf(tempStr, "%s%c", tempStr, smoothies[temp] + 48);
}
sprintf(buffer, "SM = %s", tempStr);
- JE_outText(VGAScreen, 30, 70, buffer, 4, 0);
+ JE_outText(VGAScreen, 30, 70, buffer, 4, 0);*/
sprintf(buffer, "Memory left = %d", -1);
JE_outText(VGAScreen, 30, 80, buffer, 4, 0);
@@ -2608,7 +2608,7 @@ new_game:
read_encrypted_pascal_string(s, sizeof(s), ep_f);
char buf[256];
- strncpy(buf, (strlen(s) > 8) ? s + 8 : "", sizeof(buf));
+ strncpy(buf, (strlen(s) > 8) ? s + 8 : "", sizeof(buf)-1);
int j = 0, temp;
while (str_pop_int(buf, &temp))
--
2.14.4

View File

@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS = "libsdl libsdl-net" DEPENDS = "libsdl libsdl-net"
inherit autotools-brokensep pkgconfig inherit autotools-brokensep
SRC_URI = " \ SRC_URI = " \
http://www.camanis.net/opentyrian/releases/${BPN}-${PV}-src.tar.gz \ http://www.camanis.net/opentyrian/releases/${BPN}-${PV}-src.tar.gz \
@@ -14,8 +14,6 @@ SRC_URI = " \
file://0001-Makefile-use-pkgconfig-to-find-sdl.patch \ file://0001-Makefile-use-pkgconfig-to-find-sdl.patch \
file://0002-Fix-several-uninitialized-variable-warnings.patch \ file://0002-Fix-several-uninitialized-variable-warnings.patch \
file://0003-fix-build-with-pedantic-gcc6.patch \ file://0003-fix-build-with-pedantic-gcc6.patch \
file://0004-increase-buffer-size-to-avoid-gcc7-format-overflow-e.patch \
file://0005-fix-build-with-gcc8.patch \
" "
SRC_URI[md5sum] = "978686c5a1dfbac69a2161aadf084c2b" SRC_URI[md5sum] = "978686c5a1dfbac69a2161aadf084c2b"
SRC_URI[sha256sum] = "f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f" SRC_URI[sha256sum] = "f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f"
@@ -23,8 +21,6 @@ SRC_URI[sha256sum] = "f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008
SRC_URI[data.md5sum] = "2a3b206a6de25ed4b771af073f8ca904" SRC_URI[data.md5sum] = "2a3b206a6de25ed4b771af073f8ca904"
SRC_URI[data.sha256sum] = "7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277" SRC_URI[data.sha256sum] = "7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277"
CFLAGS += "-Wimplicit-fallthrough=0"
do_install() { do_install() {
install -d ${D}${bindir} install -d ${D}${bindir}
install ${BPN} ${D}${bindir} install ${BPN} ${D}${bindir}

View File

@@ -1,173 +0,0 @@
From be3b1dcbe0d9920eff4094e0a2ef8cd736051dff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 21 Dec 2016 08:20:27 +0100
Subject: [PATCH] gtkglwidget: various fixes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Taken from [1]
[1] http://pkgs.fedoraproject.org/cgit/rpms/gtkglext.git/plain/gtkglext-1.2.0-bz677457.diff
Upstream Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
gtk/gtkglwidget.c | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/gtk/gtkglwidget.c b/gtk/gtkglwidget.c
index ecb41ef..2e5e9f6 100644
--- a/gtk/gtkglwidget.c
+++ b/gtk/gtkglwidget.c
@@ -16,7 +16,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include <gtk/gtkmain.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
#include "gtkglprivate.h"
#include "gtkglwidget.h"
@@ -68,6 +70,7 @@
gtk_gl_widget_realize (GtkWidget *widget,
GLWidgetPrivate *private)
{
+ GdkWindow *window;
GdkGLWindow *glwindow;
GTK_GL_NOTE_FUNC_PRIVATE ();
@@ -77,9 +80,10 @@
* handlers.
*/
- if (!gdk_window_is_gl_capable (widget->window))
+ window = gtk_widget_get_window (widget);
+ if (!gdk_window_is_gl_capable (window))
{
- glwindow = gdk_window_set_gl_capability (widget->window,
+ glwindow = gdk_window_set_gl_capability (window,
private->glconfig,
NULL);
if (glwindow == NULL)
@@ -127,9 +131,9 @@
* Synchronize OpenGL and window resizing request streams.
*/
- if (GTK_WIDGET_REALIZED (widget) && private->is_realized)
+ if (gtk_widget_get_realized (widget) && private->is_realized)
{
- gldrawable = gdk_window_get_gl_drawable (widget->window);
+ gldrawable = gdk_window_get_gl_drawable (gtk_widget_get_window (widget));
gdk_gl_drawable_wait_gdk (gldrawable);
}
}
@@ -146,7 +150,7 @@
if (private->glcontext != NULL)
{
- gdk_gl_context_destroy (private->glcontext);
+ g_object_unref (private->glcontext);
private->glcontext = NULL;
}
@@ -154,8 +158,8 @@
* Remove OpenGL-capability from widget->window.
*/
- if (GTK_WIDGET_REALIZED (widget))
- gdk_window_unset_gl_capability (widget->window);
+ if (gtk_widget_get_realized (widget))
+ gdk_window_unset_gl_capability (gtk_widget_get_window (widget));
private->is_realized = FALSE;
}
@@ -174,7 +178,7 @@
*/
toplevel = gtk_widget_get_toplevel (widget);
- if (GTK_WIDGET_TOPLEVEL (toplevel) && !GTK_WIDGET_REALIZED (toplevel))
+ if (gtk_widget_is_toplevel (toplevel) && !gtk_widget_get_realized (toplevel))
{
GTK_GL_NOTE (MISC,
g_message (" - Install colormap to the top-level window."));
@@ -188,23 +192,27 @@
GtkStyle *previous_style,
gpointer user_data)
{
+ GdkWindow *window;
+
GTK_GL_NOTE_FUNC_PRIVATE ();
/*
* Set a background of "None" on window to avoid AIX X server crash.
*/
- if (GTK_WIDGET_REALIZED (widget))
+ if (gtk_widget_get_realized (widget))
{
+ window = gtk_widget_get_window (widget);
+
GTK_GL_NOTE (MISC,
g_message (" - window->bg_pixmap = %p",
- ((GdkWindowObject *) (widget->window))->bg_pixmap));
+ ((GdkWindowObject *) window)->bg_pixmap));
- gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
+ gdk_window_set_back_pixmap (window, NULL, FALSE);
GTK_GL_NOTE (MISC,
g_message (" - window->bg_pixmap = %p",
- ((GdkWindowObject *) (widget->window))->bg_pixmap));
+ ((GdkWindowObject *) window)->bg_pixmap));
}
}
@@ -250,8 +258,8 @@
GTK_GL_NOTE_FUNC ();
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
- g_return_val_if_fail (!GTK_WIDGET_NO_WINDOW (widget), FALSE);
- g_return_val_if_fail (!GTK_WIDGET_REALIZED (widget), FALSE);
+ g_return_val_if_fail (gtk_widget_get_has_window (widget), FALSE);
+ g_return_val_if_fail (!gtk_widget_get_realized (widget), FALSE);
g_return_val_if_fail (GDK_IS_GL_CONFIG (glconfig), FALSE);
/*
@@ -432,9 +440,9 @@
GTK_GL_NOTE_FUNC ();
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
+ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
- gldrawable = gdk_window_get_gl_drawable (widget->window);
+ gldrawable = gdk_window_get_gl_drawable (gtk_widget_get_window (widget));
if (gldrawable == NULL)
return NULL;
@@ -474,7 +482,7 @@
GLWidgetPrivate *private;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
+ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
private = g_object_get_qdata (G_OBJECT (widget), quark_gl_private);
if (private == NULL)
@@ -501,7 +509,7 @@
gtk_widget_get_gl_window (GtkWidget *widget)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
+ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
- return gdk_window_get_gl_window (widget->window);
+ return gdk_window_get_gl_window (gtk_widget_get_window (widget));
}
--
2.5.5

View File

@@ -1,51 +0,0 @@
From 9cbea61c54ee97b6a92263f6392cd84a4918aa54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Wed, 6 Jun 2018 14:10:19 +0200
Subject: [PATCH] Fix variable name conflict
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
| ../../gtkglext-1.2.0/gdk/gdkglshapes.c:547:12: error: 'index' redeclared as different kind of symbol
| static int index[20][3] =
| ^~~~~
| In file included from /home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/gtkglext/1.2.0-r0/recipe-sysroot/usr/include/string.h:431:0,
| from /home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/gtkglext/1.2.0-r0/recipe-sysroot/usr/include/glib-2.0/glib/gtestutils.h:30,
| from /home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/gtkglext/1.2.0-r0/recipe-sysroot/usr/include/glib-2.0/glib.h:82,
| from ../../gtkglext-1.2.0/gdk/gdkglshapes.c:21:
| /home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/gtkglext/1.2.0-r0/recipe-sysroot/usr/include/strings.h:68:14: note: previous declaration of 'index' was here
| extern char *index (const char *__s, int __c)
| ^~~~~
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
gdk/gdkglshapes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdk/gdkglshapes.c b/gdk/gdkglshapes.c
index f72abba..d468b05 100644
--- a/gdk/gdkglshapes.c
+++ b/gdk/gdkglshapes.c
@@ -544,7 +544,7 @@ static GLfloat idata[12][3] =
{-Z, -X, 0}
};
-static int index[20][3] =
+static int _index[20][3] =
{
{0, 4, 1},
{0, 9, 4},
@@ -574,7 +574,7 @@ icosahedron(GLenum shadeType)
int i;
for (i = 19; i >= 0; i--) {
- drawtriangle(i, idata, index, shadeType);
+ drawtriangle(i, idata, _index, shadeType);
}
}
--
2.14.3

View File

@@ -1,20 +0,0 @@
SUMMARY = "OpenGL Extension to GTK"
LICENSE = "GPLv2 | LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
inherit gnomebase pkgconfig distro_features_check
REQUIRED_DISTRO_FEATURES = "x11 opengl"
DEPENDS += "gtk+ glib-2.0-native pangox-compat libglu libxmu"
SRC_URI += " \
file://0001-gtkglwidget-various-fixes.patch \
file://0002-Fix-variable-name-conflict.patch \
"
SRC_URI[archive.md5sum] = "ed7ba24ce06a8630c07f2d0ee5f04ab4"
SRC_URI[archive.sha256sum] = "16bd736074f6b14180f206b7e91263fc721b49912ea3258ab5f094cfa5497f51"
GNOME_COMPRESS_TYPE="bz2"
FILES_${PN}-dev += "${libdir}/gtkglext-1.0"

View File

@@ -1,10 +0,0 @@
SUMMARY = "Compatibility library for pangox"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
inherit gnomebase pkgconfig
DEPENDS += "pango"
SRC_URI[archive.md5sum] = "7bcbd0187f03e1e27af9a81e07249c33"
SRC_URI[archive.sha256sum] = "552092b3b6c23f47f4beee05495d0f9a153781f62a1c4b7ec53857a37dfce046"

View File

@@ -1,107 +0,0 @@
From 59fbf0c8d72e22caa7e19afa48c031f8822f276e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Wed, 6 Jun 2018 23:38:38 +0200
Subject: [PATCH] Align Makefiles for cross compiling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
Makefile | 39 ++++++---------------------------------
misc/Makefile | 10 +++++-----
2 files changed, 11 insertions(+), 38 deletions(-)
diff --git a/Makefile b/Makefile
index 0cda4d6..5b9ead0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,4 @@
-# Unix gcc or DOS go32 cross-compiling gcc
-#
-CC = gcc
-LD = gcc
-# for testing. not to be used; build failures in misc/.
-#CFLAGS = -O2 -W -Wall -pedantic -ansi
-CFLAGS = -O2
-LDFLAGS = -lc
-
-# for DOS?
-# CC = gcc-go32
-# LD = gcc-go32
-# CFLAGS = -W -Wall -pedantic
-
-# Other cc
-#CC = cc
-#CFLAGS =
-#LD = ld
-
-DESTDIR = /usr/local
-
-BINDIR = $(DESTDIR)/bin
-MANDIR = $(DESTDIR)/share/man/man1
-DOCDIR = $(DESTDIR)/share/doc
-
-MKDIR = mkdir -p
-INSTALL = install
+LD = $(CC)
all: killxa xa uncpk
@@ -32,7 +6,7 @@ killxa:
rm -f xa
xa:
- (cd src && LD=${LD} CC="${CC} ${CFLAGS}" ${MAKE})
+ (cd src && LD="${LD}" CC="${CC} ${CFLAGS}" ${MAKE})
load:
(cd loader && CC="${CC} ${CFLAGS}" ${MAKE})
@@ -56,11 +30,10 @@ clean:
rm -f xa *.exe *.o65
install: xa uncpk
- $(MKDIR) $(BINDIR)
- $(MKDIR) $(MANDIR)
- $(INSTALL) xa reloc65 ldo65 file65 printcbm uncpk $(BINDIR)
- $(INSTALL) man/file65.1 man/ldo65.1 man/printcbm.1 man/reloc65.1 man/uncpk.1 man/xa.1 $(MANDIR)
- #$(MKDIR) $(DOCDIR)/xa65
+ install -d $(DESTDIR)$(PREFIX)/bin
+ install -m 755 xa reloc65 ldo65 file65 printcbm uncpk $(DESTDIR)$(PREFIX)/bin
+ install -d $(DESTDIR)$(PREFIX)/share/man/man1
+ install -m 644 man/file65.1 man/ldo65.1 man/printcbm.1 man/reloc65.1 man/uncpk.1 man/xa.1 $(DESTDIR)$(PREFIX)/share/man/man1
dist: clean
#cd .. ; tar cvf xa-2.3.8A.tar xa-2.3.8 ; gzip xa-2.3.8A.tar
diff --git a/misc/Makefile b/misc/Makefile
index 2b450e0..6967dad 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -10,19 +10,19 @@ LIBS = #-lncurses -ltermcap -lm
all: ../mkrom.sh ../uncpk ../printcbm ../file65 ../reloc65 ../ldo65
../uncpk: uncpk.c
- ${CC} ${CFLAGS} uncpk.c -o $(XCBMLIB)/uncpk
+ ${CC} ${CFLAGS} $(LDFLAGS) uncpk.c -o $(XCBMLIB)/uncpk
../printcbm: printcbm.c
- ${CC} ${CFLAGS} printcbm.c -o $(XCBMLIB)/printcbm
+ ${CC} ${CFLAGS} $(LDFLAGS) printcbm.c -o $(XCBMLIB)/printcbm
../file65: file65.c
- ${CC} ${CFLAGS} file65.c -o $(XCBMLIB)/file65
+ ${CC} ${CFLAGS} $(LDFLAGS) file65.c -o $(XCBMLIB)/file65
../ldo65: ldo65.c
- ${CC} ${CFLAGS} ldo65.c -o $(XCBMLIB)/ldo65
+ ${CC} ${CFLAGS} $(LDFLAGS) ldo65.c -o $(XCBMLIB)/ldo65
../reloc65: reloc65.c
- ${CC} ${CFLAGS} reloc65.c -o $(XCBMLIB)/reloc65
+ ${CC} ${CFLAGS} $(LDFLAGS) reloc65.c -o $(XCBMLIB)/reloc65
../mkrom.sh: mkrom.sh
cp mkrom.sh ../mkrom.sh

View File

@@ -1,16 +0,0 @@
SUMMARY = "Open-source 6502 cross assembler"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=1f67e705f4eb5064027b8c40ccfdb43e"
SRC_URI = " \
http://www.floodgap.com/retrotech/xa/dists/${BPN}-${PV}.tar.gz \
file://0001-Align-Makefiles-for-cross-compiling.patch \
"
SRC_URI[md5sum] = "884c3dc5bcc8e8f10b05a6907781623d"
SRC_URI[sha256sum] = "3b97d2fe8891336676ca28ff127b69e997f0b5accf2c7009b4517496929b462a"
BBCLASSEXTEND = "native"
do_install() {
oe_runmake DESTDIR=${D} PREFIX=${prefix} install
}