| [c8b93bd] | 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.
|
|---|
| [475ad56] | 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| [c8b93bd] | 9 | PKG_NAME:= ncurses
|
|---|
| [28ebbe0] | 10 | PKG_VERSION:= 5.6
|
|---|
| [fe6ed64] | 11 | PKG_RELEASE:= 2
|
|---|
| [28ebbe0] | 12 | PKG_MD5SUM:= b6593abe1089d6aab1551c105c9300e3
|
|---|
| [475ad56] | 13 |
|
|---|
| [c8b93bd] | 14 | PKG_SOURCE_URL:= @GNU/ncurses
|
|---|
| [475ad56] | 15 |
|
|---|
| [c8b93bd] | 16 | include $(TOPDIR)/mk/package.mk
|
|---|
| [475ad56] | 17 |
|
|---|
| 18 | $(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 19 |
|
|---|
| [d419478] | 20 | $(WRKBUILD)/.configured:
|
|---|
| [475ad56] | 21 | touch $@
|
|---|
| 22 |
|
|---|
| [d419478] | 23 | $(WRKBUILD)/.built:
|
|---|
| 24 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| [475ad56] | 25 | ./configure \
|
|---|
| [4acfd49] | 26 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 27 | --host=$(GNU_TARGET_NAME) \
|
|---|
| [475ad56] | 28 | --build=$(GNU_HOST_NAME) \
|
|---|
| 29 | --program-prefix="" \
|
|---|
| 30 | --program-suffix="" \
|
|---|
| 31 | --prefix=/usr \
|
|---|
| 32 | --exec-prefix=/usr \
|
|---|
| 33 | --bindir=/usr/bin \
|
|---|
| 34 | --datadir=/usr/share \
|
|---|
| 35 | --includedir=/usr/include \
|
|---|
| 36 | --infodir=/usr/share/info \
|
|---|
| 37 | --libdir=/usr/lib \
|
|---|
| 38 | --libexecdir=/usr/lib \
|
|---|
| 39 | --localstatedir=/var \
|
|---|
| 40 | --mandir=/usr/share/man \
|
|---|
| 41 | --sbindir=/usr/sbin \
|
|---|
| 42 | --sysconfdir=/etc \
|
|---|
| [c57fbc9] | 43 | --disable-nls \
|
|---|
| [475ad56] | 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 | --with-progs \
|
|---|
| 54 | --with-normal \
|
|---|
| 55 | --without-shared \
|
|---|
| 56 | --with-terminfo-dirs=/usr/share/terminfo \
|
|---|
| 57 | --with-default-terminfo-dir=/usr/share/terminfo \
|
|---|
| [28ebbe0] | 58 | --with-build-cc=cc \
|
|---|
| [475ad56] | 59 | );
|
|---|
| [d419478] | 60 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 61 | DESTDIR="$(WRKINST)" \
|
|---|
| [475ad56] | 62 | libs install.progs
|
|---|
| [d419478] | 63 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| [475ad56] | 64 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 65 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 66 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 67 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 68 | ac_cv_linux_vers="2" \
|
|---|
| 69 | ./configure \
|
|---|
| 70 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 71 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 72 | --build=$(GNU_HOST_NAME) \
|
|---|
| 73 | --program-prefix="" \
|
|---|
| 74 | --program-suffix="" \
|
|---|
| 75 | --prefix=/usr \
|
|---|
| 76 | --exec-prefix=/usr \
|
|---|
| 77 | --bindir=/usr/bin \
|
|---|
| 78 | --datadir=/usr/share \
|
|---|
| 79 | --includedir=/usr/include \
|
|---|
| 80 | --infodir=/usr/share/info \
|
|---|
| 81 | --libdir=/usr/lib \
|
|---|
| 82 | --libexecdir=/usr/lib \
|
|---|
| 83 | --localstatedir=/var \
|
|---|
| 84 | --mandir=/usr/share/man \
|
|---|
| 85 | --sbindir=/usr/sbin \
|
|---|
| 86 | --sysconfdir=/etc \
|
|---|
| [c57fbc9] | 87 | --disable-nls \
|
|---|
| [475ad56] | 88 | --enable-echo \
|
|---|
| 89 | --enable-const \
|
|---|
| 90 | --enable-overwrite \
|
|---|
| 91 | --disable-rpath \
|
|---|
| 92 | --without-ada \
|
|---|
| 93 | --without-cxx \
|
|---|
| 94 | --without-cxx-binding \
|
|---|
| 95 | --without-debug \
|
|---|
| 96 | --without-profile \
|
|---|
| 97 | --without-progs \
|
|---|
| 98 | --with-normal \
|
|---|
| 99 | --with-shared \
|
|---|
| 100 | --with-terminfo-dirs=/usr/share/terminfo \
|
|---|
| 101 | --with-default-terminfo-dir=/usr/share/terminfo \
|
|---|
| [28ebbe0] | 102 | --with-build-cc=cc \
|
|---|
| [475ad56] | 103 | );
|
|---|
| [d419478] | 104 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| [475ad56] | 105 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 106 | BUILD_CC="$(TARGET_CC)" \
|
|---|
| 107 | HOSTCC="$(HOSTCC)" \
|
|---|
| 108 | HOSTCCFLAGS="\$$(CPPFLAGS)" \
|
|---|
| [d419478] | 109 | DESTDIR="$(WRKINST)" \
|
|---|
| [475ad56] | 110 | libs install.libs install.data
|
|---|
| 111 | touch $@
|
|---|
| 112 |
|
|---|
| 113 | $(IPKG_LIBNCURSES):
|
|---|
| [c8b93bd] | 114 | $(INSTALL_DIR) $(IDIR_LIBNCURSES)/usr/lib
|
|---|
| 115 | $(INSTALL_DIR) $(IDIR_LIBNCURSES)/usr/share/terminfo
|
|---|
| [5142240] | 116 | $(CP) $(WRKINST)/usr/lib/libncurses*.so.* $(IDIR_LIBNCURSES)/usr/lib/
|
|---|
| 117 | $(CP) $(WRKINST)/usr/lib/libpanel*.so.* $(IDIR_LIBNCURSES)/usr/lib/
|
|---|
| 118 | $(CP) $(WRKINST)/usr/lib/libmenu*.so.* $(IDIR_LIBNCURSES)/usr/lib/
|
|---|
| [35f655f] | 119 | $(CP) $(WRKINST)/usr/lib/libform*.so.* $(IDIR_LIBNCURSES)/usr/lib/
|
|---|
| [a66776f] | 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 \
|
|---|
| [475ad56] | 121 | install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
|
|---|
| [c8b93bd] | 122 | $(INSTALL_DATA) $(WRKINST)/usr/share/terminfo/$${f} \
|
|---|
| [475ad56] | 123 | $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
|
|---|
| 124 | done
|
|---|
| 125 | $(RSTRIP) $(IDIR_LIBNCURSES)
|
|---|
| 126 | $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
|
|---|
| 127 |
|
|---|
| [d419478] | 128 | $(STAGING_DIR)/usr/lib/libncurses.so: $(WRKBUILD)/.built
|
|---|
| [c8b93bd] | 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/
|
|---|
| [35f655f] | 138 | $(INSTALL_DATA) $(WRKINST)/usr/include/eti.h $(STAGING_DIR)/usr/include/
|
|---|
| 139 | $(INSTALL_DATA) $(WRKINST)/usr/include/form.h $(STAGING_DIR)/usr/include/
|
|---|
| [fe6ed64] | 140 | $(INSTALL_DATA) $(WRKINST)/usr/include/ncurses_dll.h $(STAGING_DIR)/usr/include/
|
|---|
| [5142240] | 141 | $(CP) $(WRKINST)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
|
|---|
| [c8b93bd] | 142 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libncurses.a $(STAGING_DIR)/usr/lib/
|
|---|
| [5142240] | 143 | $(CP) $(WRKINST)/usr/lib/libncurses.so* $(STAGING_DIR)/usr/lib/
|
|---|
| [c8b93bd] | 144 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libpanel.a $(STAGING_DIR)/usr/lib/
|
|---|
| [5142240] | 145 | $(CP) $(WRKINST)/usr/lib/libpanel.so* $(STAGING_DIR)/usr/lib/
|
|---|
| [c8b93bd] | 146 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libmenu.a $(STAGING_DIR)/usr/lib/
|
|---|
| [5142240] | 147 | $(CP) $(WRKINST)/usr/lib/libmenu.so* $(STAGING_DIR)/usr/lib/
|
|---|
| [35f655f] | 148 | $(CP) $(WRKINST)/usr/lib/libform.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 149 | $(INSTALL_DATA) $(WRKINST)/usr/lib/libform.a $(STAGING_DIR)/usr/lib/
|
|---|
| [c8b93bd] | 150 |
|
|---|
| 151 | compile-targets: install-dev
|
|---|
| 152 | clean-targets: uninstall-dev
|
|---|
| [475ad56] | 153 |
|
|---|
| 154 | install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
|
|---|
| 155 |
|
|---|
| 156 | uninstall-dev:
|
|---|
| 157 | rm -rf \
|
|---|
| 158 | $(STAGING_DIR)/usr/include/curses.h \
|
|---|
| [c8b93bd] | 159 | $(STAGING_DIR)/usr/include/ncurses.h \
|
|---|
| [fe6ed64] | 160 | $(STAGING_DIR)/usr/include/ncurses_dll.h \
|
|---|
| [c8b93bd] | 161 | $(STAGING_DIR)/usr/include/panel.h \
|
|---|
| [475ad56] | 162 | $(STAGING_DIR)/usr/include/menu.h \
|
|---|
| 163 | $(STAGING_DIR)/usr/include/panel.h \
|
|---|
| [c8b93bd] | 164 | $(STAGING_DIR)/usr/include/term.h \
|
|---|
| [35f655f] | 165 | $(STAGING_DIR)/usr/include/form.h \
|
|---|
| [c8b93bd] | 166 | $(STAGING_DIR)/usr/include/termcap.h \
|
|---|
| [475ad56] | 167 | $(STAGING_DIR)/usr/include/unctrl.h \
|
|---|
| 168 | $(STAGING_DIR)/usr/lib/libcurses.so \
|
|---|
| [c8b93bd] | 169 | $(STAGING_DIR)/usr/lib/libncurses,panel.a \
|
|---|
| 170 | $(STAGING_DIR)/usr/lib/libncurses.so* \
|
|---|
| 171 | $(STAGING_DIR)/usr/lib/libpanel.a \
|
|---|
| 172 | $(STAGING_DIR)/usr/lib/libpanel.so* \
|
|---|
| [35f655f] | 173 | $(STAGING_DIR)/usr/lib/libform.a \
|
|---|
| 174 | $(STAGING_DIR)/usr/lib/libform.so* \
|
|---|
| [c8b93bd] | 175 | $(STAGING_DIR)/usr/lib/libmenu.a \
|
|---|
| 176 | $(STAGING_DIR)/usr/lib/libmenu.so*
|
|---|