1 | #!/bin/bash
|
---|
2 |
|
---|
3 | ### fftw3 ###
|
---|
4 |
|
---|
5 | cd ${SRC}
|
---|
6 |
|
---|
7 | SELF=`basename ${0}`
|
---|
8 | set_buildenv
|
---|
9 | set_libdirname
|
---|
10 | setup_multiarch
|
---|
11 |
|
---|
12 | unpack_tarball fftw-${FFTW3_VER}
|
---|
13 | if [ -d ${PKGDIR}-single ]; then rm -rf ${PKGDIR}-single ; fi
|
---|
14 | mv ${PKGDIR} ${PKGDIR}-single
|
---|
15 |
|
---|
16 | unpack_tarball fftw-${FFTW3_VER}
|
---|
17 | if [ -d ${PKGDIR}-double ]; then rm -rf ${PKGDIR}-double ; fi
|
---|
18 | mv ${PKGDIR} ${PKGDIR}-double
|
---|
19 |
|
---|
20 | unpack_tarball fftw-${FFTW3_VER}
|
---|
21 | if [ -d ${PKGDIR}-long-double ]; then rm -rf ${PKGDIR}-long-double ; fi
|
---|
22 | mv ${PKGDIR} ${PKGDIR}-long-double
|
---|
23 |
|
---|
24 |
|
---|
25 | ### SINGLE ###
|
---|
26 | cd ${SRC}/${PKGDIR}-single
|
---|
27 | LOG=fftw3-single-blfs.log
|
---|
28 |
|
---|
29 | extra_conf=""
|
---|
30 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
31 | extra_conf="--libdir=/usr/${libdirname}"
|
---|
32 | fi
|
---|
33 |
|
---|
34 | # TODO: gonna need to set extra_conf for each arch methinks...
|
---|
35 | # currently only handling amd64/i686
|
---|
36 |
|
---|
37 | MACHINE=`uname --machine`
|
---|
38 | if [ "${MACHINE}" = "x86_64" ]; then
|
---|
39 | case ${BUILDENV} in
|
---|
40 | 32 )
|
---|
41 | extra_conf="${extra_conf} --enable-sse"
|
---|
42 | ;;
|
---|
43 | esac
|
---|
44 | fi
|
---|
45 |
|
---|
46 | max_log_init fftw3-single ${FFTW3_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
|
---|
47 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
48 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
49 | CFLAGS="${TGT_CFLAGS}" \
|
---|
50 | CXXFLAGS="${TGT_CFLAGS}" \
|
---|
51 | ./configure --prefix=/usr ${extra_conf} \
|
---|
52 | --mandir=/usr/share/man \
|
---|
53 | --infodir=/usr/share/info \
|
---|
54 | --enable-shared --enable-threads --enable-float \
|
---|
55 | >> ${LOGFILE} 2>&1 &&
|
---|
56 | echo " o Configure OK" &&
|
---|
57 |
|
---|
58 | min_log_init ${BUILDLOGS} &&
|
---|
59 | make ${PMFLAGS} \
|
---|
60 | >> ${LOGFILE} 2>&1 &&
|
---|
61 | echo " o Build OK" || barf
|
---|
62 |
|
---|
63 | min_log_init ${TESTLOGS} &&
|
---|
64 | make check \
|
---|
65 | >> ${LOGFILE} 2>&1 &&
|
---|
66 | echo " o Test OK" || errmsg
|
---|
67 |
|
---|
68 | min_log_init ${INSTLOGS} &&
|
---|
69 | make install \
|
---|
70 | >> ${LOGFILE} 2>&1 &&
|
---|
71 | echo " o ALL OK" || barf
|
---|
72 |
|
---|
73 | #### DOUBLE ###
|
---|
74 | cd ${SRC}/${PKGDIR}-double
|
---|
75 |
|
---|
76 | LOG=fftw3-double-blfs.log
|
---|
77 | extra_conf=""
|
---|
78 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
79 | extra_conf="${extra_conf} --libdir=/usr/${libdirname}"
|
---|
80 | fi
|
---|
81 |
|
---|
82 | # OK, for 32bit on amd64, we can use -sse2 extensions, but it barfs on
|
---|
83 | # 64bit...
|
---|
84 | #
|
---|
85 | # TODO: gonna need to set extra_conf for each arch methinks...
|
---|
86 | # currently only handling amd64/i686
|
---|
87 |
|
---|
88 | MACHINE=`uname --machine`
|
---|
89 | if [ "${MACHINE}" = "x86_64" ]; then
|
---|
90 | case ${BUILDENV} in
|
---|
91 | 32 )
|
---|
92 | extra_conf="${extra_conf} --enable-sse2"
|
---|
93 | ;;
|
---|
94 | esac
|
---|
95 | fi
|
---|
96 |
|
---|
97 | max_log_init fftw3-double ${FFTW3_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
|
---|
98 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
99 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
100 | CFLAGS="${TGT_CFLAGS}" \
|
---|
101 | CXXFLAGS="${TGT_CFLAGS}" \
|
---|
102 | ./configure --prefix=/usr ${extra_conf} \
|
---|
103 | --mandir=/usr/share/man \
|
---|
104 | --infodir=/usr/share/info \
|
---|
105 | --enable-shared --enable-threads \
|
---|
106 | >> ${LOGFILE} 2>&1 &&
|
---|
107 | echo " o Configure OK" &&
|
---|
108 |
|
---|
109 | min_log_init ${BUILDLOGS} &&
|
---|
110 | make ${PMFLAGS} \
|
---|
111 | >> ${LOGFILE} 2>&1 &&
|
---|
112 | echo " o Build OK" || barf
|
---|
113 |
|
---|
114 | min_log_init ${TESTLOGS} &&
|
---|
115 | make check \
|
---|
116 | >> ${LOGFILE} 2>&1 &&
|
---|
117 | echo " o Test OK" || errmsg
|
---|
118 |
|
---|
119 | min_log_init ${INSTLOGS} &&
|
---|
120 | make install \
|
---|
121 | >> ${LOGFILE} 2>&1 &&
|
---|
122 | echo " o ALL OK" || barf
|
---|
123 |
|
---|
124 |
|
---|
125 | #### LONG DOUBLE ###
|
---|
126 | cd ${SRC}/${PKGDIR}-double
|
---|
127 |
|
---|
128 | LOG=fftw3-long-double-blfs.log
|
---|
129 | extra_conf=""
|
---|
130 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
131 | extra_conf="--libdir=/usr/${libdirname}"
|
---|
132 | fi
|
---|
133 |
|
---|
134 | # OK, for 32bit on amd64, we can use -sse extensions, but it barfs on
|
---|
135 | # 64bit... k7 extensions work for 64bit though...
|
---|
136 | #
|
---|
137 | # TODO: gonna need to set extra_conf for each arch methinks...
|
---|
138 | # currently only handling amd64/i686
|
---|
139 |
|
---|
140 | max_log_init fftw3-double ${FFTW3_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
|
---|
141 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
142 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
143 | CFLAGS="${TGT_CFLAGS}" \
|
---|
144 | CXXFLAGS="${TGT_CFLAGS}" \
|
---|
145 | ./configure --prefix=/usr ${extra_conf} \
|
---|
146 | --mandir=/usr/share/man \
|
---|
147 | --infodir=/usr/share/info \
|
---|
148 | --enable-shared --enable-threads --enable-long-double \
|
---|
149 | >> ${LOGFILE} 2>&1 &&
|
---|
150 | echo " o Configure OK" &&
|
---|
151 |
|
---|
152 | min_log_init ${BUILDLOGS} &&
|
---|
153 | make ${PMFLAGS} \
|
---|
154 | >> ${LOGFILE} 2>&1 &&
|
---|
155 | echo " o Build OK" || barf
|
---|
156 |
|
---|
157 | min_log_init ${TESTLOGS} &&
|
---|
158 | make check \
|
---|
159 | >> ${LOGFILE} 2>&1 &&
|
---|
160 | echo " o Test OK" || errmsg
|
---|
161 |
|
---|
162 | min_log_init ${INSTLOGS} &&
|
---|
163 | make install \
|
---|
164 | >> ${LOGFILE} 2>&1 &&
|
---|
165 | echo " o ALL OK" || barf
|
---|
166 |
|
---|