Skip to content

Commit 0db27a2

Browse files
committedJan 2, 2017
[TEST] Statically compile libncurses
1 parent a500215 commit 0db27a2

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
 

‎libncurses-6.0.build.bash

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash -ex
2+
# Copyright (c) 2014-2016 Arduino LLC
3+
#
4+
# This program is free software; you can redistribute it and/or
5+
# modify it under the terms of the GNU General Public License
6+
# as published by the Free Software Foundation; either version 2
7+
# of the License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program; if not, write to the Free Software
16+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17+
18+
mkdir -p objdir
19+
cd objdir
20+
PREFIX=`pwd`
21+
cd -
22+
23+
if [[ ! -f ncurses-6.0.tar.gz ]] ;
24+
then
25+
wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
26+
fi
27+
28+
tar xfv ncurses-6.0.tar.gz
29+
30+
cd ncurses-6.0
31+
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
39+
CFLAGS="-w -O2 $CFLAGS -fPIC" CXXFLAGS="-w -O2 $CXXFLAGS -fPIC" LDFLAGS="-s $LDFLAGS -fPIC" ./configure $CONFARGS
40+
make -j 4
41+
make install
42+
cd ..
43+
44+
if [[ ! -f readline-7.0.tar.gz ]] ;
45+
then
46+
wget https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz
47+
fi
48+
49+
tar xfv readline-7.0.tar.gz
50+
51+
cd readline-7.0
52+
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
60+
CFLAGS="-w -O2 $CFLAGS -fPIC" CXXFLAGS="-w -O2 $CXXFLAGS -fPIC" LDFLAGS="-s $LDFLAGS -fPIC" ./configure $CONFARGS
61+
make -j 4
62+
make install
63+
cd ..
64+

‎package-avrdude.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ rm -rf avrdude-6.3 libusb-1.0.20 libusb-compat-0.1.5 libusb-win32-bin-1.2.6.0 li
7474
./libusb-1.0.20.build.bash
7575
./libusb-compat-0.1.5.build.bash
7676
./libelf-0.8.13.build.bash
77+
./libncurses-6.0.build.bash
7778
./avrdude-6.3.build.bash
7879

7980
# if producing a windows build, compress as zip and

0 commit comments

Comments
 (0)
Please sign in to comment.