[packages] libdirectfd: directfb depends on libsysfs
[packages.git] / libs / libdirectfb / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=DirectFB
11 PKG_VERSION:=1.4.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.directfb.org/downloads/Core/DirectFB-1.4
16 PKG_MD5SUM:=e4376c6c5b8e27d735edb7f62a7a8e86
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/directfb
24     TITLE:=DirectFB
25     SECTION:=libs
26     CATEGORY:=Libraries
27     URL:=http://directfb.org
28     DEPENDS:=+libpng +libjpeg +libpthread +libfreetype +libsysfs
29 endef
30
31 define Package/directfb/description
32     DirectFB is a thin library that provides hardware graphics acceleration, input device handling and abstraction, integrated windowing system with support for translucent windows and multiple display layers, not only on top of the Linux Framebuffer Device. It is a complete hardware abstraction layer with software fallbacks for every graphics operation that is not supported by the underlying hardware.
33 endef
34
35 TARGET_LDFLAGS+="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
36 CONFIGURE_CMD=./autogen.sh
37
38 define Feature/DirectFB
39   TARGET_NAME:=drawing-backend
40   TARGET_TITLE:=Drawing Backend
41   NAME:=DirectFB
42 endef
43
44 define Build/Configure
45         $(call Build/Configure/Default, \
46                 --disable-osx \
47                 --disable-x11 \
48                 --enable-debug-support \
49                 --disable-network \
50                 --disable-mmx \
51                 --disable-sse \
52                 --enable-fbdev \
53                 --disable-sdl \
54                 --disable-vnc \
55                 --enable-sysfs \
56                 --with-inputdrivers=linuxinput \
57                 --with-gfxdrivers=none \
58         )
59 endef
60
61 define Build/InstallDev
62         $(INSTALL_DIR) \
63                 $(1)/usr/include \
64                 $(1)/usr/lib \
65                 $(1)/usr/lib/pkgconfig
66         $(CP) \
67                 $(PKG_INSTALL_DIR)/usr/lib/* \
68                 $(1)/usr/lib/
69         $(CP) \
70                 $(PKG_INSTALL_DIR)/usr/include/* \
71                 $(1)/usr/include/
72         $(CP) \
73                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig \
74                 $(1)/usr/lib/
75 endef
76
77 define Package/directfb/install
78         $(INSTALL_DIR) \
79                 $(1)/usr/bin \
80                 $(1)/usr/lib \
81                 $(1)/usr/share/directfb-1.4.2 \
82                 $(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBFont \
83                 $(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider \
84                 $(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBVideoProvider \
85                 $(1)/usr/lib/directfb-1.4-0/wm \
86                 $(1)/usr/lib/directfb-1.4-0/systems \
87                 $(1)/usr/lib/directfb-1.4-0/inputdrivers
88         $(CP) \
89                 $(PKG_INSTALL_DIR)/usr/bin/* \
90                 $(1)/usr/bin/
91         $(CP) \
92                 $(PKG_INSTALL_DIR)/usr/share/directfb-1.4.2/* \
93                 $(1)/usr/share/directfb-1.4.2/
94         $(CP) \
95                 $(PKG_INSTALL_DIR)/usr/lib/lib{direct,fusion}*.so* \
96                 $(1)/usr/lib/
97         $(CP) \
98                 $(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/interfaces/IDirectFBFont/*.so* \
99                 $(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBFont/
100         $(CP) \
101                 $(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/*.so* \
102                 $(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/
103         $(CP) \
104                 $(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/interfaces/IDirectFBVideoProvider/*.so* \
105                 $(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBVideoProvider/
106         $(CP) \
107                 $(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/wm/*.so* \
108                 $(1)/usr/lib/directfb-1.4-0/wm/
109         $(CP) \
110                 $(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/systems/*.so* \
111                 $(1)/usr/lib/directfb-1.4-0/systems/
112         $(CP) \
113                 $(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/inputdrivers/*.so* \
114                 $(1)/usr/lib/directfb-1.4-0/inputdrivers/
115 endef
116
117 $(eval $(call Feature,DirectFB))
118 $(eval $(call BuildPackage,directfb))