* move libffi to base/ Category
[t2sde.git] / package / base / ncurses / ncurses.conf
blob056d553b7d77b0ca7f5af89773973493ea5ee22e
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/ncurses/ncurses.conf
3 # Copyright (C) 2004 - 2024 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
5
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 if [ $prefix_auto = 1 ]; then
14         prefix=
15         set_confopt
17         var_append confopt ' ' "--with-ada-include=/$datadir/ada/adainclude"
20 var_append makeopt ' ' AR_OPTS=rv
22 atstage toolchain && var_remove_regex confopt " " "--target=.*"
23 atstage native &&
24         var_append confopt ' ' --with-ada-objects="$libdir/ada/adalib" ||
25         var_append confopt ' ' --without-ada
27 # we do not need to waste build cpu cycles just for the tests,
28 var_append confopt " " "--without-tests"
30 var_append confopt " " "--with-normal --disable-widec"
31 [ "$SDECFG_STATIC" != 1 ] && var_append confopt " " "--with-shared"
32 var_append confopt " " "--enable-sigwinch --enable-hard-tabs --enable-colorfgbg"
34 remove_include_termcap() {
35         echo "Removing 'termcap.h' from include/Makefile for 'make install'."
36         sed -i 's,termcap.h,,g' include/Makefile
39 if pkginstalled termcap; then
40         echo_status "Found termcap package -> disabling ncurses internal termcap library."
41         var_append confopt " " "--disable-termcap"
42         hook_add inmake 5 "remove_include_termcap"
43 else
44         hook_add postmake 6 "\
45                 ln -svf libncurses.a $root$libdir/libtermcap.a; \
46                 ln -svf libncurses.so $root$libdir/libtermcap.so"
49 var_append confopt " " "--enable-pc-files --with-pkg-config-libdir=$libdir/pkgconfig"
51 # (maybe) build the wide-curses variant ...
52 [ "$SDECFG_LIBC" != dietlibc ] &&
53 hook_add postmake 5 "eval $MAKE distclean; \
54                      eval_config_command $confopt --enable-widec; \
55                      hook_eval premake; \
56                      eval $MAKE $makeopt; eval $MAKE $makeinstopt includedir=$includedir/ncursesw"
58 hook_add postmake 7 "\
59         ln -svf libncurses.so $root$libdir/libcurses.so; \
60         ln -svf libncurses.a $root$libdir/libcurses.a"
62 # includedir=$includedir/ncurses
63 var_append makeinstopt ' ' "'INSTALL_LIB=\$(INSTALL) -m 755'"