source: issm/oecreview/Archive/12321-12677/ISSM-12578-12579.diff

Last change on this file was 12679, checked in by Mathieu Morlighem, 13 years ago

Added 12321-12677

File size: 12.2 KB
RevLine 
[12679]1Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh
2===================================================================
3--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh (revision 12578)
4+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh (revision 12579)
5@@ -1,5 +1,6 @@
6 #This installs the Android SDK (Software Development Kit)
7 #which is needed for the compilation of the Java project.
8+source $ANDROID_DIR/android_variables.sh
9
10 step=1;
11
12@@ -10,24 +11,29 @@
13 #4: cleanup
14
15 present_dir=`pwd`;
16-default_droid="Android-4.0"
17 sd_card="issm-sdcard"
18
19+((tmp=$1- 3))
20+
21+if [[ $tmp -ge "-2" && $tmp -le "3" ]]; then
22+ step=$1
23+else
24+ echo "Using default step: " $step
25+fi
26+
27 if [[ $step == "1" ]]; then
28
29 #Cleanup the install
30 rm -rf install-sdk install-ant
31
32 #Download from ISSM server
33- $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk_r18-macosx.zip' 'android-sdk_r18-macosx.zip'
34+ $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk_r'$sdk_rev'-macosx.zip' 'android-sdk_r'${sdk_rev}'-macosx.zip'
35
36 # Install Android SDK and NDK.
37- unzip -o android-sdk_r18-macosx.zip
38- unzip -o apache-ant-1.8.2-bin.zip
39+ unzip -o android-sdk_r${sdk_rev}-macosx.zip
40
41 #Move to install
42 mv -f android-sdk-macosx install-sdk
43- mv -f apache-ant-1.8.2 install-ant
44
45 #Post_install configuration:
46 #We need specific settings for specific platforms, for the SDK to
47@@ -35,10 +41,10 @@
48
49 #For now, we need to install:
50 #android sdk platform tools
51- #and a specific android api: API 15 and API 14
52- #Note: API 15 and 14 correspond to Android 4.0.3 and 4.0 respectively.
53+ #and a specific android api: API 16, API 15 and API 14
54+ #Note: API 16, API 15 and 14 correspond to Android 4.1, 4.0.3 and 4.0 respectively.
55
56- cd install-sdk/tools/ && source ./android update sdk -t platform-tools,android-15,android-14,system-image --no-ui
57+ cd install-sdk/tools/ && source ./android update sdk -t platform-tool,${api_levels},system-image --no-ui
58
59 fi
60
61Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh
62===================================================================
63--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh (revision 0)
64+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh (revision 12579)
65@@ -0,0 +1,5 @@
66+sdk_rev=20
67+ndk_rev=8
68+api_levels="android-14,android-15,android-16"
69+default_droid="android-4.1"
70+toolchain_path=${ANDROID_DIR}"/arm-linux-"${default_droid}"/bin/arm-linux-androideabi"
71Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh
72===================================================================
73--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh (revision 12578)
74+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh (revision 12579)
75@@ -2,23 +2,26 @@
76 #which is needed for the compilation of C/C++ code into the
77 #native architecture of the Android device.
78
79-#The android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2 file was downloaded
80+#The android-ndk-r8-darwin-x86.tar.bz2 ndk.tar.bz2 file was downloaded
81 #from the android developer website:
82+source $ANDROID_DIR/android_variables.sh
83
84 #Cleanup the install
85 rm -rf install
86-rm -rf $ANDROID_DIR/arm-linux-android-4.0
87+rm -rf $ANDROID_DIR/arm-linux-android-${default_droid}
88
89 #Download from ISSM server
90-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-ndk-r7b-darwin-x86.tar.bz2' 'dummy.tar.bz2'
91+$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-ndk-r'${ndk_rev}'-darwin-x86.tar.bz2' 'ndk.tar.bz2'
92
93 # Install Android SDK and NDK.
94-bunzip2 dummy.tar.bz2
95-tar -xvf dummy.tar
96-rm -rf dummy.tar dummy.tar.bz2
97+bunzip2 ndk.tar.bz2
98+tar -xvf ndk.tar
99+rm -rf ndk.tar ndk.tar.bz2
100
101 #Move to install
102-mv android-ndk-r7b install
103+mv android-ndk-r${ndk_rev} install
104
105 #Create Standalone Development Directory
106-$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=$ANDROID_DIR/arm-linux-android-4.0
107+#Note: API-14 corresponds to Android 4.0 although we are
108+#calling our toolchain 4.1 to agree with our device.
109+$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$ANDROID_DIR/arm-linux-${default_droid}
110Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh
111===================================================================
112--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh (revision 12578)
113+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh (revision 12579)
114@@ -1,38 +0,0 @@
115-#!/bin/bash
116-
117-#Some cleanup
118-rm -rf src install gsl-1.15
119-mkdir src install
120-
121-#Download from ISSM server
122-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz'
123-
124-#Untar
125-tar -zxvf gsl-1.15.tar.gz
126-
127-#Move gsl into src directory
128-mv gsl-1.15/* src
129-rm -rf gsl-1.15
130-
131-#Configure gsl
132-cd src
133-
134-./configure \
135- CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc\
136- LD=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ld\
137- AR=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ar\
138- RANLIB=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib\
139- NM=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-nm\
140- OBJ_EXT=o\
141- LIB_EXT=a\
142- --host="arm-linux"\
143- --prefix="$ISSM_DIR/externalpackages/gsl/install"
144-
145-#Compile gsl
146-if [ -z $1 ]; then
147- make
148-else
149- make -j $1
150-fi
151-
152-make install
153Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh
154===================================================================
155--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh (revision 0)
156+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh (revision 12579)
157@@ -0,0 +1,39 @@
158+#!/bin/bash
159+source $ANDROID_DIR/android_variables.sh
160+
161+#Some cleanup
162+rm -rf src install gsl-1.15
163+mkdir src install
164+
165+#Download from ISSM server
166+$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz'
167+
168+#Untar
169+tar -zxvf gsl-1.15.tar.gz
170+
171+#Move gsl into src directory
172+mv gsl-1.15/* src
173+rm -rf gsl-1.15
174+
175+#Configure gsl
176+cd src
177+
178+./configure \
179+ CC=${toolchain_path}-gcc\
180+ LD=${toolchain_path}-ld\
181+ AR=${toolchain_path}-ar\
182+ RANLIB=${toolchain_path}-ranlib\
183+ NM=${toolchain_path}-nm\
184+ OBJ_EXT=o\
185+ LIB_EXT=a\
186+ --host="arm-linux"\
187+ --prefix="$ISSM_DIR/externalpackages/gsl/install"
188+
189+#Compile gsl
190+if [ -z $1 ]; then
191+ make
192+else
193+ make -j $1
194+fi
195+
196+make install
197
198Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh
199___________________________________________________________________
200Added: svn:executable
201## -0,0 +1 ##
202+*
203Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh
204===================================================================
205--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh (revision 12578)
206+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh (revision 12579)
207@@ -1,33 +0,0 @@
208-#!/bin/bash
209-
210-#use matlab?
211-matlab=0
212-
213-#Some cleanup
214-rm -rf install triangle
215-mkdir install
216-
217-#Download from ISSM server
218-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
219-
220-#Untar
221-cd install
222-cp ../triangle.zip ./
223-unzip triangle.zip
224-
225-#copy new makefile
226-cp ../configs/android/android-4.0/configure.make ./
227-cp ../makefile ./
228-
229-#Patch triangle.c
230-if [[ $matlab == "1" ]];then
231- patch triangle.c ../triangle.c.patch.matlab
232-else
233- patch triangle.c ../triangle.c.patch.python
234-fi
235-
236-#Compile triangle
237-make
238-
239-#Patch triangle.h
240-patch triangle.h ../triangle.h.patch
241Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make
242===================================================================
243--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make (revision 12578)
244+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make (revision 12579)
245@@ -1,19 +0,0 @@
246-# This makefile configures build process to cross-compile to the android platform.
247-# The binary tools referenced below are specifically configuered to target armeabi-v7a.
248-# Furthermore, the compilers (which are simply wrappers around GNU GCC) are set to
249-# produce binaries that are EABI complient.
250-#
251-# Note that the AAPCS standard defines 'EABI' as a moniker used to specify
252-# a _family_ of similar but distinct ABIs. Android follows the little-endian
253-# ARM GNU/Linux ABI as documented in the following document:
254-#
255-# http://www.codesourcery.com/gnu_toolchains/arm/arm_gnu_linux_abi.pdf
256-
257-ANDROID_BIN=$(ISSM_TIER)/src/android/tmp/android-14-toolchain/bin
258-CC=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc
259-AR=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ar
260-RANLIB=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib
261-CSWITCHES = $(CFLAGS)
262-TRILIBDEFS = -DTRILIBRARY
263-OBJ_EXT=o
264-LIB_EXT=a
265Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make
266===================================================================
267--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make (revision 0)
268+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make (revision 12579)
269@@ -0,0 +1,17 @@
270+# This makefile configures build process to cross-compile to the android platform.
271+# The binary tools referenced below are specifically configuered to target armeabi-v7a.
272+# Furthermore, the compilers (which are simply wrappers around GNU GCC) are set to
273+# produce binaries that are EABI complient.
274+#
275+# Note that the AAPCS standard defines 'EABI' as a moniker used to specify
276+# a _family_ of similar but distinct ABIs. Android follows the little-endian
277+# ARM GNU/Linux ABI as documented in the following document:
278+#
279+# http://www.codesourcery.com/gnu_toolchains/arm/arm_gnu_linux_abi.pdf
280+CC=${toolchain_path}-gcc
281+AR=${toolchain_path}-ar
282+RANLIB=${toolchain_path}-ranlib
283+CSWITCHES = $(CFLAGS)
284+TRILIBDEFS = -DTRILIBRARY
285+OBJ_EXT=o
286+LIB_EXT=a
287Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh
288===================================================================
289--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh (revision 0)
290+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh (revision 12579)
291@@ -0,0 +1,35 @@
292+#!/bin/bash
293+source $ANDROID_DIR/android_variables.sh
294+export toolchain_path
295+
296+#use matlab?
297+matlab=0
298+
299+#Some cleanup
300+rm -rf install triangle
301+mkdir install
302+
303+#Download from ISSM server
304+$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
305+
306+#Untar
307+cd install
308+cp ../triangle.zip ./
309+unzip triangle.zip
310+
311+#copy new makefile
312+cp ../configs//android/configure.make ./
313+cp ../makefile ./
314+
315+#Patch triangle.c
316+if [[ $matlab == "1" ]];then
317+ patch triangle.c ../triangle.c.patch.matlab
318+else
319+ patch triangle.c ../triangle.c.patch.python
320+fi
321+
322+#Compile triangle
323+make
324+
325+#Patch triangle.h
326+patch triangle.h ../triangle.h.patch
Note: See TracBrowser for help on using the repository browser.