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