summaryrefslogtreecommitdiffstats
path: root/utils/kmscon/Makefile
blob: 3fdef71c773bf2d717d80e7d00e5962d20d10b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
include $(TOPDIR)/rules.mk

PKG_NAME:=kmscon
PKG_VERSION:=10.0.3
PKG_RELEASE:=5

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/kmscon/kmscon/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=4a0552d3cd3ba16df4fcff61f2b1431650bcd9e7ecabc03625ce52345b9c95c5

PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk

PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_kmscon-mod-gl

MESON_ARGS += \
	-Dtests=false \
	-Ddocs=disabled \
	-Dlibseat=enabled \
	-Ddbus=disabled \
	-Dvideo_fbdev=disabled \
	-Dvideo_drm2d=enabled \
	-Dfont_psf=enabled \
	-Dfont_unifont=disabled \
	-Dfont_freetype=disabled \
	-Dfont_pango=disabled

ifdef CONFIG_PACKAGE_kmscon-mod-gl
MESON_ARGS += \
	-Dvideo_drm3d=enabled \
	-Drenderer_gltex=enabled
else
MESON_ARGS += \
	-Dvideo_drm3d=disabled \
	-Drenderer_gltex=disabled
endif

define Package/kmscon
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=Terminal emulator on a KMS device
  URL:=https://github.com/kmscon/kmscon
  DEPENDS:=input-support +libtsm +libxkbcommon +libudev +libdrm +zlib \
	+xkeyboard-config +libseat +seatd
endef

define Package/kmscon/description
  A terminal emulator that draws directly on a DRM/KMS device, so a
  system needs no framebuffer console to have a text console. Draws in
  software on the KMS device; install kmscon-mod-gl for the OpenGL ES
  path.
endef

define Package/kmscon-mod-gl
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=OpenGL ES rendering for kmscon
  URL:=https://github.com/kmscon/kmscon
  DEPENDS:=kmscon +libmesa
endef

define Package/kmscon-mod-gl/description
  The drm3d video backend and the gltex renderer, which draw through
  OpenGL ES instead of in software. kmscon loads them if they are
  present and uses them only when started with --hwaccel. Worth
  installing on a system that carries Mesa anyway.
endef

define Package/kmscon/conffiles
/etc/config/kmscon
endef

define Package/kmscon/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kmscon $(1)/usr/bin/
	$(INSTALL_DIR) $(1)/usr/lib/kmscon
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/kmscon/mod-psf.so $(1)/usr/lib/kmscon/
	$(INSTALL_DIR) $(1)/etc/config
	$(INSTALL_DATA) ./files/kmscon.config $(1)/etc/config/kmscon
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/kmscon.init $(1)/etc/init.d/kmscon
endef

define Package/kmscon-mod-gl/install
	$(INSTALL_DIR) $(1)/usr/lib/kmscon
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/kmscon/mod-drm3d.so $(1)/usr/lib/kmscon/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/kmscon/mod-gltex.so $(1)/usr/lib/kmscon/
endef

$(eval $(call BuildPackage,kmscon))
$(eval $(call BuildPackage,kmscon-mod-gl))