Skip to content

Commit

Permalink
PACKAGE: Add DirectFB2 & SDL2 (MiyooCFW#134)
Browse files Browse the repository at this point in the history
* Add SDL2 + DirectFB2

---------

Co-authored-by: Apaczer <[email protected]>
  • Loading branch information
tiopex and Apaczer authored Nov 9, 2024
1 parent 6f3f361 commit 313fad9
Show file tree
Hide file tree
Showing 14 changed files with 138 additions and 6 deletions.
1 change: 1 addition & 0 deletions board/miyoo/rootfs/etc/directfbrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no-cursor
11 changes: 11 additions & 0 deletions configs/miyoo_musl_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ BR2_PACKAGE_FATRESIZE=y
BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_LIBERATION=y
BR2_PACKAGE_DJVU=y
BR2_PACKAGE_DIRECTFB2=y
BR2_PACKAGE_DIRECTFB2_MULTI_KERNEL=y
BR2_PACKAGE_DIRECTFB2_FBDEV=y
BR2_PACKAGE_FBCAT=y
BR2_PACKAGE_FBGRAB=y
BR2_PACKAGE_LINUX_FUSION=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
Expand All @@ -95,6 +99,13 @@ BR2_PACKAGE_SDL_MIXER_MIDI_TIMIDITY=y
BR2_PACKAGE_SDL_NET=y
BR2_PACKAGE_SDL_SOUND=y
BR2_PACKAGE_SDL_SOUND_PLAYSOUND=y
BR2_PACKAGE_SDL2=y
BR2_PACKAGE_SDL2_DIRECTFB2=y
BR2_PACKAGE_SDL2_GFX=y
BR2_PACKAGE_SDL2_IMAGE=y
BR2_PACKAGE_SDL2_MIXER=y
BR2_PACKAGE_SDL2_NET=y
BR2_PACKAGE_SDL2_TTF=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_MUPDF=y
BR2_PACKAGE_DBUS=y
Expand Down
12 changes: 12 additions & 0 deletions configs/miyoo_uclibc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,16 @@ BR2_PACKAGE_FATRESIZE=y
BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_LIBERATION=y
BR2_PACKAGE_DJVU=y
BR2_PACKAGE_DIRECTFB2=y
BR2_PACKAGE_DIRECTFB2_MULTI_KERNEL=y
BR2_PACKAGE_DIRECTFB2_FBDEV=y
BR2_PACKAGE_FBCAT=y
BR2_PACKAGE_FBGRAB=y
BR2_PACKAGE_LINUX_FUSION=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
BR2_PACKAGE_SDL_DIRECTFB2=y
BR2_PACKAGE_SDL_GFX=y
BR2_PACKAGE_SDL_IMAGE_GIF=y
BR2_PACKAGE_SDL_IMAGE_LBM=y
Expand All @@ -94,6 +99,13 @@ BR2_PACKAGE_SDL_MIXER_MIDI_TIMIDITY=y
BR2_PACKAGE_SDL_NET=y
BR2_PACKAGE_SDL_SOUND=y
BR2_PACKAGE_SDL_SOUND_PLAYSOUND=y
BR2_PACKAGE_SDL2=y
BR2_PACKAGE_SDL2_DIRECTFB2=y
BR2_PACKAGE_SDL2_GFX=y
BR2_PACKAGE_SDL2_IMAGE=y
BR2_PACKAGE_SDL2_MIXER=y
BR2_PACKAGE_SDL2_NET=y
BR2_PACKAGE_SDL2_TTF=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_MUPDF=y
BR2_PACKAGE_DBUS=y
Expand Down
2 changes: 2 additions & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ comment "Graphic libraries"
source "package/cegui/Config.in"
source "package/directfb/Config.in"
source "package/directfb-examples/Config.in"
source "package/directfb2/Config.in"
source "package/efl/Config.in"
source "package/fb-test-app/Config.in"
source "package/fbcat/Config.in"
Expand All @@ -336,6 +337,7 @@ comment "Graphic libraries"
source "package/fbset/Config.in"
source "package/fbterm/Config.in"
source "package/fbv/Config.in"
source "package/flux/Config.in"
source "package/freerdp/Config.in"
source "package/graphicsmagick/Config.in"
source "package/imagemagick/Config.in"
Expand Down
23 changes: 23 additions & 0 deletions package/directfb2/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
config BR2_PACKAGE_DIRECTFB2
bool "directfb2"
depends on !BR2_PACKAGE_DIRECTFB
select BR2_PACKAGE_FLUX
help
DirectFB2 is a fork of DirectFB.

config BR2_PACKAGE_DIRECTFB2_MULTI
bool "enable multiple application support"
depends on BR2_PACKAGE_DIRECTFB2

config BR2_PACKAGE_DIRECTFB2_MULTI_KERNEL
bool "Enable Linux fusion device support for multi application"
select BR2_PACKAGE_DIRECTFB2_MULTI

config BR2_PACKAGE_DIRECTFB2_DRMKMS
bool "DRM/KMS backend"
depends on BR2_PACKAGE_DIRECTFB2
select BR2_PACKAGE_LIBDRM

config BR2_PACKAGE_DIRECTFB2_FBDEV
bool "fbdev backend"
depends on BR2_PACKAGE_DIRECTFB2
2 changes: 2 additions & 0 deletions package/directfb2/directfb2.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Locally calculated
sha256 1cb65fa5207543970787a06dd71a250ac87f50bc8576c9bb166a09883e69da5c directfb2-4d6b7ddd8477b4b52aa78ec82a3add28ade0c965.tar.gz
43 changes: 43 additions & 0 deletions package/directfb2/directfb2.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
################################################################################
#
# directfb2
#
################################################################################

DIRECTFB2_VERSION = 4d6b7ddd8477b4b52aa78ec82a3add28ade0c965
DIRECTFB2_SITE = $(call github,directfb2,DirectFB2,$(DIRECTFB2_VERSION))
DIRECTFB2_DEPENDENCIES = host-flux
DIRECTFB2_LICENSE = LGPL-2.1
DIRECTFB2_INSTALL_STAGING = YES

DIRECTFB2_CFLAGS = $(TARGET_CFLAGS) -O3
DIRECTFB2_CXXFLAGS = $(TARGET_CFLAGS) -O3
DIRECTFB2_CONF_OPTS += -Dneon=false

ifeq ($(BR2_GCC_ENABLE_LTO),y)
DIRECTFB2_CFLAGS += -flto
DIRECTFB2_CXXFLAGS += -flto
endif

ifeq ($(BR2_PACKAGE_DIRECTFB2_MULTI),y)
DIRECTFB2_CONF_OPTS += -Dmulti=true
endif

ifeq ($(BR2_PACKAGE_DIRECTFB2_MULTI_KERNEL),y)
DIRECTFB2_CONF_OPTS += -Dmulti-kernel=true
endif

ifeq ($(BR2_PACKAGE_DIRECTFB2_DRMKMS),y)
DIRECTFB2_CONF_OPTS += -Ddrmkms=true
DIRECTFB2_DEPENDENCIES += libdrm
else
DIRECTFB2_CONF_OPTS += -Ddrmkms=false
endif

ifeq ($(BR2_PACKAGE_DIRECTFB2_FBDEV),y)
DIRECTFB2_CONF_OPTS += -Dfbdev=true
else
DIRECTFB2_CONF_OPTS += -Dfbdev=false
endif

$(eval $(meson-package))
4 changes: 4 additions & 0 deletions package/flux/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config BR2_PACKAGE_FLUX
bool "flux"
help
flux
2 changes: 2 additions & 0 deletions package/flux/flux.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Locally calculated
sha256 b770c27124d43c73d1767455879d3595ae4ac19eb78d79c3372812fe1506c5b3 flux-e45758aa9384b9740ff021ea952399fd113eb0e9-br1.tar.gz
15 changes: 15 additions & 0 deletions package/flux/flux.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
################################################################################
#
# flux
#
################################################################################

FLUX_VERSION = e45758aa9384b9740ff021ea952399fd113eb0e9
FLUX_SITE = https://github.com/deniskropp/flux.git
FLUX_SITE_METHOD = git
FLUX_LICENSE = GPL-3
FLUX_AUTORECONF = YES
HOST_FLUX_DEPENDENCIES = host-pkgconf

$(eval $(host-autotools-package))

4 changes: 4 additions & 0 deletions package/sdl/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ config BR2_PACKAGE_SDL_DIRECTFB
bool "SDL DirectFB video driver"
depends on BR2_PACKAGE_DIRECTFB

config BR2_PACKAGE_SDL_DIRECTFB2
bool "SDL DirectFB2 video driver"
depends on BR2_PACKAGE_DIRECTFB2

config BR2_PACKAGE_SDL_X11
bool "SDL X11 video driver"
depends on BR2_PACKAGE_XORG7
Expand Down
10 changes: 6 additions & 4 deletions package/sdl/sdl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ endif

ifeq ($(BR2_PACKAGE_SDL_DIRECTFB),y)
SDL_DEPENDENCIES += directfb
SDL_CONF_OPTS += --enable-video-directfb=yes
SDL_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
else
SDL_CONF_OPTS += --enable-video-directfb=no
SDL_CONF_OPTS += --enable-video-directfb
endif

ifeq ($(BR2_PACKAGE_SDL_DIRECTFB2),y)
SDL_DEPENDENCIES += directfb2
SDL_CONF_OPTS += --enable-video-directfb
endif

ifeq ($(BR2_PACKAGE_SDL_X11),y)
Expand Down
7 changes: 7 additions & 0 deletions package/sdl2/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ config BR2_PACKAGE_SDL2_DIRECTFB
comment "DirectFB video driver needs directfb"
depends on !BR2_PACKAGE_DIRECTFB

config BR2_PACKAGE_SDL2_DIRECTFB2
bool "SDL2: DirectFB2 video driver"
depends on BR2_PACKAGE_DIRECTFB2

comment "SDL2: DirectFB2 video driver needs directfb2"
depends on !BR2_PACKAGE_DIRECTFB2

config BR2_PACKAGE_SDL2_X11
bool "X11 video driver"
depends on BR2_PACKAGE_XORG7
Expand Down
8 changes: 6 additions & 2 deletions package/sdl2/sdl2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB),y)
SDL2_DEPENDENCIES += directfb
SDL2_CONF_OPTS += --enable-video-directfb
SDL2_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
else
SDL2_CONF_OPTS += --disable-video-directfb
endif

ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB2),y)
SDL2_DEPENDENCIES += directfb2
SDL2_CONF_OPTS += --enable-video-directfb --disable-directfb-shared
SDL2_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
endif

ifeq ($(BR2_PACKAGE_SDL2_OPENGLES)$(BR2_PACKAGE_RPI_USERLAND),yy)
Expand Down

0 comments on commit 313fad9

Please sign in to comment.