generic: update ARM mach-types
[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 --disable-big-core \
55 --disable-home-terminfo \
56 --with-normal \
57 --with-shared \
58 --with-terminfo-dirs=/usr/share/terminfo \
59 --with-default-terminfo-dir=/usr/share/terminfo
60
61 ifeq ($(HOST_OS),FreeBSD)
62 CONFIGURE_ARGS +=
63 --with-terminfo=/usr/share/terminfo.db
64 endif
65
66 ifeq ($(BUILD_VARIANT),libncursesw)
67 CONFIGURE_ARGS += \
68 --enable-widec \
69 --with-build-cppflags=-D_GNU_SOURCE
70 endif
71
72 MAKE_FLAGS += \
73 BUILD_CC="$(HOSTCC)" \
74 HOSTCC="$(HOSTCC)" \
75 HOSTCCFLAGS="" \
76 libs
77
78 define Build/Install/Default
79 $(MAKE_VARS) \
80 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
81 $(MAKE_INSTALL_FLAGS) \
82 $(1) install.libs install.data;
83 endef
84
85 define Package/libncurses/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.so* $(1)/usr/lib/
88 ifneq ($(HOST_OS),FreeBSD)
89 $(INSTALL_DIR) $(1)/usr/share/terminfo
90 (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
91 for dir in ??; do \
92 [ -d "$$$$dir" ] || continue; \
93 mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
94 done \
95 )
96 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 \
97 $(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
98 $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
99 $(1)/usr/share/terminfo/$$$$file; \
100 done
101 endif
102 endef
103
104 define Package/libncursesw/install
105 $(INSTALL_DIR) $(1)/usr/lib
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.so* $(1)/usr/lib/
107 endef
108
109 ifeq ($(BUILD_VARIANT),libncursesw)
110 define Build/InstallDev
111 $(INSTALL_DIR) $(1)/usr/include/ncursesw/
112 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ncursesw/
113
114 $(INSTALL_DIR) $(1)/usr/lib
115 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/
116 endef
117 else
118 define Build/InstallDev
119 $(INSTALL_DIR) $(1)/usr/include
120 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
121
122 $(INSTALL_DIR) $(1)/usr/lib
123 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
124 endef
125 endif
126
127 $(eval $(call BuildPackage,libncurses))
128 $(eval $(call BuildPackage,libncursesw))
This page took 0.057729 seconds and 5 git commands to generate.