Skip to content

Commit 8438080

Browse files
ldesrochesConchuOD
authored andcommitted
package/libm2d: reintroduce libm2d
libm2d has been reworked and provides an API for 2D acceleration that is used by EGT. It supports the GFX2D accelerator found on SAM9X60 and SAM9X75. Remove the vestige of the dependency of cairo on libm2d. It is no longer true with this new version. Signed-off-by: Ludovic Desroches <[email protected]> Reviewed-by: Nayab Sayed <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent c33cb3d commit 8438080

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ source "$BR2_EXTERNAL_MCHP_PATH/package/dt-overlay-mchp/Config.in"
99

1010
source "$BR2_EXTERNAL_MCHP_PATH/package/g1-decoder/Config.in"
1111
source "$BR2_EXTERNAL_MCHP_PATH/package/gst1-at91/Config.in"
12+
source "$BR2_EXTERNAL_MCHP_PATH/package/libm2d/Config.in"
1213
source "$BR2_EXTERNAL_MCHP_PATH/package/libplanes/Config.in"
1314
source "$BR2_EXTERNAL_MCHP_PATH/package/ptc_examples/Config.in"
1415
source "$BR2_EXTERNAL_MCHP_PATH/package/python-mpio/Config.in"

external.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
include $(sort $(wildcard $(BR2_EXTERNAL_MCHP_PATH)/package/*/*.mk))
22

3-
# add libm2d as a dependency of cairo when it is enabled
4-
ifeq ($(BR2_PACKAGE_LIBM2D),y)
5-
CAIRO_DEPENDENCIES += libm2d
6-
$(CAIRO_TARGET_CONFIGURE): | libm2d
7-
CAIRO_CONF_OPTS += --enable-gfx2d
8-
endif

package/egt/egt.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ else
148148
EGT_CONF_OPTS += --without-libmagic
149149
endif
150150

151+
ifeq ($(BR2_PACKAGE_LIBM2D),y)
152+
EGT_DEPENDENCIES += libm2d
153+
endif
154+
151155
define EGT_RUN_AUTOGEN
152156
cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
153157
endef

package/libm2d/Config.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
comment "libm2d requires a GPU strategy"
2+
depends on BR2_MCHP_SAM_NO_GPU
3+
4+
comment "libm2d depends on libdrm"
5+
depends on !BR2_PACKAGE_LIBDRM
6+
7+
config BR2_PACKAGE_LIBM2D
8+
bool "libm2d"
9+
depends on BR2_MCHP_SAM_HAS_GPU2D
10+
depends on BR2_PACKAGE_LIBDRM
11+
depends on !BR2_MCHP_SAM_NO_GPU
12+
help
13+
libm2d is a library that provides the Microchip 2D Graphics API.

package/libm2d/libm2d.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
################################################################################
2+
#
3+
# libm2d
4+
#
5+
################################################################################
6+
7+
LIBM2D_VERSION = v2.0.0-rc1
8+
LIBM2D_SITE = $(call github,linux4sam,libm2d,$(LIBM2D_VERSION))
9+
LIBM2D_LICENSE = MIT
10+
LIBM2D_LICENSE_FILES = COPYING
11+
LIBM2D_DEPENDENCIES = libdrm host-pkgconf
12+
LIBM2D_INSTALL_STAGING = YES
13+
14+
$(eval $(cmake-package))

0 commit comments

Comments
 (0)