mac80211: update to wireless-testing 2010-11-16
[openwrt.git] / package / ncurses / Makefile
1 #
2 # Copyright (C) 2006-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:=ncurses
11 PKG_VERSION:=5.7
12 PKG_RELEASE:=3
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/ncurses
17 PKG_MD5SUM:=cce05daf61a64501ef6cd8da1f727ec6
18
19 PKG_INSTALL:=1
20 PKG_BUILD_PARALLEL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libncurses
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Terminal handling library
28 URL:=http://www.gnu.org/software/ncurses/
29 VARIANT:=libncurses
30 endef
31
32 define Package/libncursesw
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=Terminal handling library (Unicode)
36 URL:=http://www.gnu.org/software/ncurses/
37 DEPENDS:=libncurses
38 VARIANT:=libncursesw
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42
43 CONFIGURE_ARGS += \
44 --enable-echo \
45 --enable-const \
46 --enable-overwrite \
47 --disable-rpath \
48 --without-ada \
49 --without-cxx \
50 --without-cxx-binding \
51 --without-debug \
52 --without-profile \
53 --without-progs \
54 --with-normal \
55 --with-shared \
56 --with-terminfo-dirs=/usr/share/terminfo \
57 --with-default-terminfo-dir=/usr/share/terminfo
58
59 ifeq ($(BUILD_VARIANT),libncursesw)
60 CONFIGURE_ARGS += \
61 --enable-widec \
62 --with-build-cppflags=-D_GNU_SOURCE
63 endif
64
65 MAKE_FLAGS += \
66 BUILD_CC="$(HOSTCC)" \
67 HOSTCC="$(HOSTCC)" \
68 HOSTCCFLAGS="" \
69 libs
70
71 define Build/Install/Default
72 $(MAKE_VARS) \
73 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
74 $(MAKE_INSTALL_FLAGS) \
75 $(1) install.libs install.data;
76 endef
77
78 define Package/libncurses/install
79 $(INSTALL_DIR) $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.so* $(1)/usr/lib/
81 $(INSTALL_DIR) $(1)/usr/share/terminfo
82 (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
83 for dir in ??; do \
84 [ -d "$$$$dir" ] || continue; \
85 mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
86 done \
87 )
88 for file in a/ansi d/dumb l/linux r/rxvt r/rxvt-unicode s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
89 $(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
90 $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
91 $(1)/usr/share/terminfo/$$$$file; \
92 done
93 endef
94
95 define Package/libncursesw/install
96 $(INSTALL_DIR) $(1)/usr/lib
97 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.so* $(1)/usr/lib/
98 endef
99
100 ifeq ($(BUILD_VARIANT),libncursesw)
101 define Build/InstallDev
102 $(INSTALL_DIR) $(1)/usr/include/ncursesw/
103 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ncursesw/
104
105 $(INSTALL_DIR) $(1)/usr/lib
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/
107 endef
108 else
109 define Build/InstallDev
110 $(INSTALL_DIR) $(1)/usr/include
111 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
112
113 $(INSTALL_DIR) $(1)/usr/lib
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
115 endef
116 endif
117
118 $(eval $(call BuildPackage,libncurses))
119 $(eval $(call BuildPackage,libncursesw))
This page took 0.053127 seconds and 5 git commands to generate.