Skip to content

Commit 9bbff45

Browse files
committed
Fix windows build
1 parent 5e76383 commit 9bbff45

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

libncurses-6.0.build.bash

+5-14
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ cd objdir
2020
PREFIX=`pwd`
2121
cd -
2222

23+
if [[ $OS == "Msys" || $OS == "Cygwin" || $CROSS_COMPILE_HOST == "i686-w64-mingw32" ]] ; then
24+
#Avoid compiling ncurses in Windows platform
25+
exit 0
26+
fi
27+
2328
if [[ ! -f ncurses-6.0.tar.gz ]] ;
2429
then
2530
wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
@@ -29,13 +34,6 @@ tar xfv ncurses-6.0.tar.gz
2934

3035
cd ncurses-6.0
3136
CONFARGS="--prefix=$PREFIX --disable-shared --without-debug --without-ada --enable-widec --with-cxx-binding"
32-
if [[ $CROSS_COMPILE != "" ]] ; then
33-
CONFARGS="$CONFARGS --host=$CROSS_COMPILE_HOST"
34-
# solve bug with --host not being effective on second level directory
35-
export CC=$CROSS_COMPILE_HOST-gcc
36-
export AR=$CROSS_COMPILE_HOST-ar
37-
export RANLIB=$CROSS_COMPILE_HOST-ranlib
38-
fi
3937
CFLAGS="-w -O2 $CFLAGS -fPIC" CXXFLAGS="-w -O2 $CXXFLAGS -fPIC" LDFLAGS="-s $LDFLAGS -fPIC" ./configure $CONFARGS
4038
make -j 4
4139
make install
@@ -50,13 +48,6 @@ tar xfv readline-7.0.tar.gz
5048

5149
cd readline-7.0
5250
CONFARGS="--prefix=$PREFIX --disable-shared"
53-
if [[ $CROSS_COMPILE != "" ]] ; then
54-
CONFARGS="$CONFARGS --host=$CROSS_COMPILE_HOST"
55-
# solve bug with --host not being effective on second level directory
56-
export CC=$CROSS_COMPILE_HOST-gcc
57-
export AR=$CROSS_COMPILE_HOST-ar
58-
export RANLIB=$CROSS_COMPILE_HOST-ranlib
59-
fi
6051
CFLAGS="-w -O2 $CFLAGS -fPIC" CXXFLAGS="-w -O2 $CXXFLAGS -fPIC" LDFLAGS="-s $LDFLAGS -fPIC" ./configure $CONFARGS
6152
make -j 4
6253
make install

0 commit comments

Comments
 (0)