OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | # |
2 | # Copyright (C) 2011 David Kuehling <dvdkhlng TA gmx TOD de> |
3 | # |
4 | # License GPLv2 or later. NO WARRANTY. |
5 | # |
6 | # OpenWRT package for the SVGAlib |
7 | |
8 | # On the nanonote you might need export SVGALIB_DEFAULT_MODE=54 |
9 | # for applications to work correctly. |
10 | |
11 | include $(TOPDIR)/rules.mk |
12 | |
13 | PKG_NAME:=svgalib |
14 | PKG_VERSION:=1.4.3 |
15 | PKG_RELEASE:=2 |
16 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
17 | PKG_SOURCE_URL:=http://www.svgalib.org/ |
18 | PKG_MD5SUM:=7d2778e3beebc07dd7c74668f6887c6f |
19 | PKG_INSTALL:=1 |
20 | #PKG_FIXUP:=libtool |
21 | |
22 | #PKG_BUILD_DEPENDS:= libtool/host |
23 | |
24 | include $(INCLUDE_DIR)/package.mk |
25 | |
26 | |
27 | define Package/svgalib/Default |
28 | SECTION:=libs |
29 | CATEGORY:=Libraries |
30 | TITLE:=Linux SVGA Library |
31 | URL:=http://www.svgalib.org/ |
32 | endef |
33 | |
34 | define Package/svgalib/Default/description |
35 | SVGAlib is a low-level graphics library for Linux. |
36 | This package compiles a portable version that only contains the Linux |
37 | framebuffer driver. |
38 | endef |
39 | |
40 | define Package/svgalib |
41 | $(call Package/svgalib/Default) |
42 | TITLE += |
43 | DEPENDS:= |
44 | endef |
45 | |
46 | define Package/svgalib/description |
47 | $(call Package/svgalib/Default/description) |
48 | endef |
49 | |
50 | |
51 | define Package/svgalib-demo |
52 | $(call Package/svgalib/Default) |
53 | TITLE += (demo programs) |
54 | DEPENDS:=svgalib |
55 | endef |
56 | |
57 | define Package/svgalib-demo/description |
58 | $(call Package/svgalib/Default/description) |
59 | This package contains the demo programs. |
60 | endef |
61 | |
62 | TARGET_CFLAGS += |
63 | |
64 | #TARGET_LDFLAGS += -Wl,-rpath -Wl,$(STAGING_DIR)/usr/lib |
65 | |
66 | # Nothing todo. Makefile.cfg adapted via patch |
67 | define Build/Configure |
68 | endef |
69 | |
70 | #MAKE_FLAGS += -j2 |
71 | |
72 | SVGALIB_BUILD_TARGETS = \ |
73 | shared \ |
74 | static |
75 | |
76 | SVGALIB_INSTALL_TARGETS = \ |
77 | installstaticlib \ |
78 | installsharedlib \ |
79 | installheaders \ |
80 | installconfig |
81 | |
82 | ifdef CONFIG_PACKAGE_svgalib-demo |
83 | SVGALIB_BUILD_TARGETS += demoprogs |
84 | define SVGALIB_COMPILE_DEMO |
85 | $(INSTALL_DIR) $(PKG_BUILD_DIR)/tmp-install/usr/lib |
86 | $(call Build/Compile/Default,installsharedlib DESTDIR=$(PKG_BUILD_DIR)/tmp-install) |
87 | $(call Build/Compile/Default,demoprogs LDFLAGS+="-L$(PKG_BUILD_DIR)/tmp-install/usr/lib") |
88 | endef |
89 | else |
90 | SVGALIB_COMPILE_DEMO:= |
91 | endif |
92 | |
93 | define Build/Compile |
94 | $(call Build/Compile/Default,shared static) |
95 | $(call SVGALIB_COMPILE_DEMO) |
96 | endef |
97 | |
98 | define Build/Install |
99 | $(INSTALL_DIR) $(PKG_INSTALL_DIR)/etc/ |
100 | $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/lib |
101 | $(call Build/Install/Default,\ |
102 | installstaticlib installsharedlib installheaders installconfig) |
103 | endef |
104 | |
105 | define Build/InstallDev |
106 | $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib |
107 | $(CP) \ |
108 | $(PKG_INSTALL_DIR)/usr/include/* \ |
109 | $(1)/usr/include/ |
110 | $(CP) \ |
111 | $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} \ |
112 | $(1)/usr/lib/ |
113 | endef |
114 | |
115 | |
116 | define Package/svgalib/install |
117 | $(INSTALL_DIR) $(1)/usr/lib |
118 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/*.so* \ |
119 | $(1)/usr/lib/ |
120 | $(INSTALL_DIR) $(1)/etc/vga |
121 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/vga/* \ |
122 | $(1)/etc/vga/ |
123 | endef |
124 | |
125 | define Package/svgalib-demo/install |
126 | $(INSTALL_DIR) $(1)/usr/bin |
127 | $(INSTALL_BIN) $$$$(find $(PKG_BUILD_DIR)/demos -executable -type f) \ |
128 | $(1)/usr/bin/ |
129 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/threeDKit/{plane,wrapdemo} \ |
130 | $(1)/usr/bin/ |
131 | endef |
132 | |
133 | $(eval $(call BuildPackage,svgalib)) |
134 | $(eval $(call BuildPackage,svgalib-demo)) |
135 | |
136 | |
137 | # The following comments configure the Emacs editor. Just ignore them. |
138 | # Local Variables: |
139 | # compile-command: "cd ~/src/nanonote/svgalib-1.4.3 && ~/bin/quilt-export target && make -C ~/h/src/qi/openwrt-xburst package/svgalib/compile -j2 V=99" |
140 | # End: |
141 |