]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/brltty/brltty.mk
Update for 2018.05-rc2
[coffee/buildroot.git] / package / brltty / brltty.mk
1 ################################################################################
2 #
3 # brltty
4 #
5 ################################################################################
6
7 BRLTTY_VERSION = 5.5
8 BRLTTY_SOURCE = brltty-$(BRLTTY_VERSION).tar.xz
9 BRLTTY_SITE = http://brltty.com/archive
10 BRLTTY_INSTALL_STAGING_OPTS = INSTALL_ROOT=$(STAGING_DIR) install
11 BRLTTY_INSTALL_TARGET_OPTS = INSTALL_ROOT=$(TARGET_DIR) install
12 BRLTTY_LICENSE_FILES = LICENSE-GPL LICENSE-LGPL
13
14 BRLTTY_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) host-autoconf host-pkgconf
15
16 BRLTTY_CONF_OPTS = \
17         --disable-java-bindings \
18         --disable-lisp-bindings \
19         --disable-ocaml-bindings \
20         --disable-python-bindings \
21         --disable-tcl-bindings \
22         --disable-x \
23         --without-midi-package \
24         --without-mikropuhe --without-speechd --without-swift \
25         --without-theta --without-viavoice
26
27 # Autoreconf is needed because we're patching configure.ac in
28 # 0002-Check-for-ioperm-to-make-sure-the-platform-supports-.patch. However,
29 # a plain autoreconf doesn't work, because this package is only
30 # autoconf-based.
31 define BRLTTY_AUTOCONF
32         cd $(BRLTTY_SRCDIR) && $(AUTOCONF)
33 endef
34
35 BRLTTY_PRE_CONFIGURE_HOOKS += BRLTTY_AUTOCONF
36
37 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y)
38 BRLTTY_DEPENDENCIES += bluez5_utils
39 BRLTTY_CONF_OPTS += --with-bluetooth-package
40 else
41 BRLTTY_CONF_OPTS += --without-bluetooth-package
42 endif
43
44 ifeq ($(BR2_PACKAGE_ESPEAK),y)
45 BRLTTY_DEPENDENCIES += espeak
46 BRLTTY_CONF_OPTS += --with-espeak=$(TARGET_DIR)/usr
47 else
48 BRLTTY_CONF_OPTS += --without-espeak
49 endif
50
51 ifeq ($(BR2_PACKAGE_FLITE),y)
52 BRLTTY_DEPENDENCIES += flite
53 BRLTTY_CONF_OPTS += --with-flite=$(STAGING_DIR)/usr
54 else
55 BRLTTY_CONF_OPTS += --without-flite
56 endif
57
58 ifeq ($(BR2_PACKAGE_ICU),y)
59 BRLTTY_DEPENDENCIES += icu
60 BRLTTY_CONF_OPTS += --enable-icu
61 else
62 BRLTTY_CONF_OPTS += --disable-icu
63 endif
64
65 ifeq ($(BR2_PACKAGE_NCURSES),y)
66 BRLTTY_DEPENDENCIES += ncurses
67 BRLTTY_CONF_OPTS += --with-curses
68 else
69 BRLTTY_CONF_OPTS += --without-curses
70 endif
71
72 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
73 BRLTTY_DEPENDENCIES += systemd
74 BRLTTY_CONF_OPTS += --with-service-package
75 else
76 BRLTTY_CONF_OPTS += --without-service-package
77 endif
78
79 ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
80 BRLTTY_CONF_OPTS += --enable-i18n
81 else
82 BRLTTY_CONF_OPTS += --disable-i18n
83 endif
84
85 BRLTTY_TEXT_TABLE = $(call qstrip,$(BR2_PACKAGE_BRLTTY_TEXT_TABLE))
86 ifneq ($(BRLTTY_TEXT_TABLE),)
87 BRLTTY_CONF_OPTS += --with-text-table=$(BRLTTY_TEXT_TABLE)
88 endif
89
90 define BRLTTY_INSTALL_CONF
91         $(INSTALL) -D -m 644 $(@D)/Documents/brltty.conf $(TARGET_DIR)/etc/brltty.conf
92 endef
93
94 BRLTTY_POST_INSTALL_TARGET_HOOKS += BRLTTY_INSTALL_CONF
95
96 define BRLTTY_INSTALL_INIT_SYSV
97         $(INSTALL) -D -m 0755 package/brltty/S10brltty \
98                    $(TARGET_DIR)/etc/init.d/S10brltty
99 endef
100
101 define BRLTTY_INSTALL_INIT_SYSTEMD
102         $(INSTALL) -D -m 0644 package/brltty/brltty.service \
103                    $(TARGET_DIR)/usr/lib/systemd/system/brltty.service
104
105         mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
106         ln -fs  ../../../../usr/lib/systemd/system/brltty.service \
107                 $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/brltty.service
108 endef
109
110 $(eval $(autotools-package))