| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= ncurses
|
|---|
| 10 | PKG_VERSION:= 5.2
|
|---|
| 11 | PKG_RELEASE:= 10
|
|---|
| 12 | PKG_MD5SUM:= 464d6a49010cf2a6eb9ce59a264d4d47
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= @GNU/ncurses
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | $(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 20 |
|
|---|
| 21 | $(WRKBUILD)/.configured:
|
|---|
| 22 | touch $@
|
|---|
| 23 |
|
|---|
| 24 | $(WRKBUILD)/.built:
|
|---|
| 25 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 26 | ./configure \
|
|---|
| 27 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 28 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 29 | --build=$(GNU_HOST_NAME) \
|
|---|
| 30 | --program-prefix="" \
|
|---|
| 31 | --program-suffix="" \
|
|---|
| 32 | --prefix=/usr \
|
|---|
| 33 | --exec-prefix=/usr \
|
|---|
| 34 | --bindir=/usr/bin \
|
|---|
| 35 | --datadir=/usr/share \
|
|---|
| 36 | --includedir=/usr/include \
|
|---|
| 37 | --infodir=/usr/share/info \
|
|---|
| 38 | --libdir=/usr/lib \
|
|---|
| 39 | --libexecdir=/usr/lib \
|
|---|
| 40 | --localstatedir=/var \
|
|---|
| 41 | --mandir=/usr/share/man \
|
|---|
| 42 | --sbindir=/usr/sbin \
|
|---|
| 43 | --sysconfdir=/etc \
|
|---|
| 44 | --disable-nls \
|
|---|
| 45 | --enable-largefile \
|
|---|
| 46 | --enable-echo \
|
|---|
| 47 | --enable-const \
|
|---|
| 48 | --enable-overwrite \
|
|---|
| 49 | --disable-rpath \
|
|---|
| 50 | --without-ada \
|
|---|
| 51 | --without-cxx \
|
|---|
| 52 | --without-cxx-binding \
|
|---|
| 53 | --without-debug \
|
|---|
| 54 | --without-profile \
|
|---|
| 55 | --with-progs \
|
|---|
| 56 | --with-normal \
|
|---|
| 57 | --without-shared \
|
|---|
| 58 | --with-terminfo-dirs=/usr/share/terminfo \
|
|---|
| 59 | --with-default-terminfo-dir=/usr/share/terminfo \
|
|---|
| 60 | );
|
|---|
| 61 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 62 | DESTDIR="$(WRKINST)" \
|
|---|
| 63 | libs install.progs
|
|---|
| 64 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 65 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 66 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 67 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 68 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 69 | ac_cv_linux_vers="2" \
|
|---|
| 70 | ./configure \
|
|---|
| 71 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 72 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 73 | --build=$(GNU_HOST_NAME) \
|
|---|
| 74 | --program-prefix="" \
|
|---|
| 75 | --program-suffix="" \
|
|---|
| 76 | --prefix=/usr \
|
|---|
| 77 | --exec-prefix=/usr \
|
|---|
| 78 | --bindir=/usr/bin \
|
|---|
| 79 | --datadir=/usr/share \
|
|---|
| 80 | --includedir=/usr/include \
|
|---|
| 81 | --infodir=/usr/share/info \
|
|---|
| 82 | --libdir=/usr/lib \
|
|---|
| 83 | --libexecdir=/usr/lib \
|
|---|
| 84 | --localstatedir=/var \
|
|---|
| 85 | --mandir=/usr/share/man \
|
|---|
| 86 | --sbindir=/usr/sbin \
|
|---|
| 87 | --sysconfdir=/etc \
|
|---|
| 88 | --disable-nls \
|
|---|
| 89 | --enable-largefile \
|
|---|
| 90 | --enable-echo \
|
|---|
| 91 | --enable-const \
|
|---|
| 92 | --enable-overwrite \
|
|---|
| 93 | --disable-rpath \
|
|---|
| 94 | --without-ada \
|
|---|
| 95 | --without-cxx \
|
|---|
| 96 | --without-cxx-binding \
|
|---|
| 97 | --without-debug \
|
|---|
| 98 | --without-profile \
|
|---|
| 99 | --without-progs \
|
|---|
| 100 | --with-normal \
|
|---|
| 101 | --with-shared \
|
|---|
| 102 | --with-terminfo-dirs=/usr/share/terminfo \
|
|---|
| 103 | --with-default-terminfo-dir=/usr/share/terminfo \
|
|---|
| 104 | );
|
|---|
| 105 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 106 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 107 | BUILD_CC="$(TARGET_CC)" \
|
|---|
| 108 | HOSTCC="$(HOSTCC)" \
|
|---|
| 109 | HOSTCCFLAGS="\$$(CPPFLAGS)" \
|
|---|
| 110 | DESTDIR="$(WRKINST)" \
|
|---|
| 111 | libs install.libs install.data
|
|---|
| 112 | touch $@
|
|---|
| 113 |
|
|---|
| 114 | $(IPKG_LIBNCURSES):
|
|---|
| 115 | $(INSTALL_DIR) $(IDIR_LIBNCURSES)/usr/lib
|
|---|
| 116 | $(INSTALL_DIR) $(IDIR_LIBNCURSES)/usr/share/terminfo
|
|---|
| 117 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libncurses*.so.* $(IDIR_LIBNCURSES)/usr/lib/
|
|---|
| 118 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libpanel*.so.* $(IDIR_LIBNCURSES)/usr/lib/
|
|---|
| 119 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libmenu*.so.* $(IDIR_LIBNCURSES)/usr/lib/
|
|---|
| 120 | for f in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 v/vt220 x/xterm x/xterm-color; do \
|
|---|
| 121 | install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
|
|---|
| 122 | $(INSTALL_DATA) $(WRKINST)/usr/share/terminfo/$${f} \
|
|---|
| 123 | $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
|
|---|
| 124 | done
|
|---|
| 125 | $(RSTRIP) $(IDIR_LIBNCURSES)
|
|---|
| 126 | $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
|
|---|
| 127 |
|
|---|
| 128 | $(STAGING_DIR)/usr/lib/libncurses.so: $(WRKBUILD)/.built
|
|---|
| 129 | $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
|
|---|
| 130 | $(INSTALL_DIR) $(STAGING_DIR)/usr/include
|
|---|
| 131 | $(INSTALL_DATA) $(WRKINST)/usr/include/curses.h $(STAGING_DIR)/usr/include/
|
|---|
| 132 | $(INSTALL_DATA) $(WRKINST)/usr/include/ncurses.h $(STAGING_DIR)/usr/include/
|
|---|
| 133 | $(INSTALL_DATA) $(WRKINST)/usr/include/panel.h $(STAGING_DIR)/usr/include/
|
|---|
| 134 | $(INSTALL_DATA) $(WRKINST)/usr/include/term.h $(STAGING_DIR)/usr/include/
|
|---|
| 135 | $(INSTALL_DATA) $(WRKINST)/usr/include/termcap.h $(STAGING_DIR)/usr/include/
|
|---|
| 136 | $(INSTALL_DATA) $(WRKINST)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/
|
|---|
| 137 | $(INSTALL_DATA) $(WRKINST)/usr/include/menu.h $(STAGING_DIR)/usr/include/
|
|---|
| 138 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
|
|---|
| 139 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libncurses.a $(STAGING_DIR)/usr/lib/
|
|---|
| 140 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libncurses.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 141 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libpanel.a $(STAGING_DIR)/usr/lib/
|
|---|
| 142 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libpanel.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 143 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libmenu.a $(STAGING_DIR)/usr/lib/
|
|---|
| 144 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libmenu.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 145 |
|
|---|
| 146 | compile-targets: install-dev
|
|---|
| 147 | clean-targets: uninstall-dev
|
|---|
| 148 |
|
|---|
| 149 | install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
|
|---|
| 150 |
|
|---|
| 151 | uninstall-dev:
|
|---|
| 152 | rm -rf \
|
|---|
| 153 | $(STAGING_DIR)/usr/include/curses.h \
|
|---|
| 154 | $(STAGING_DIR)/usr/include/ncurses.h \
|
|---|
| 155 | $(STAGING_DIR)/usr/include/panel.h \
|
|---|
| 156 | $(STAGING_DIR)/usr/include/menu.h \
|
|---|
| 157 | $(STAGING_DIR)/usr/include/panel.h \
|
|---|
| 158 | $(STAGING_DIR)/usr/include/term.h \
|
|---|
| 159 | $(STAGING_DIR)/usr/include/termcap.h \
|
|---|
| 160 | $(STAGING_DIR)/usr/include/unctrl.h \
|
|---|
| 161 | $(STAGING_DIR)/usr/lib/libcurses.so \
|
|---|
| 162 | $(STAGING_DIR)/usr/lib/libncurses,panel.a \
|
|---|
| 163 | $(STAGING_DIR)/usr/lib/libncurses.so* \
|
|---|
| 164 | $(STAGING_DIR)/usr/lib/libpanel.a \
|
|---|
| 165 | $(STAGING_DIR)/usr/lib/libpanel.so* \
|
|---|
| 166 | $(STAGING_DIR)/usr/lib/libmenu.a \
|
|---|
| 167 | $(STAGING_DIR)/usr/lib/libmenu.so*
|
|---|
| 168 |
|
|---|