[1c379e4] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | ### DirectFB ###
|
---|
| 4 |
|
---|
| 5 | cd ${SRC}
|
---|
| 6 | LOG=DirectFB-blfs.log
|
---|
| 7 |
|
---|
| 8 | SELF=`basename ${0}`
|
---|
| 9 | set_buildenv
|
---|
| 10 | set_libdirname
|
---|
| 11 | setup_multiarch
|
---|
| 12 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
| 13 | extra_conf="--libdir=/usr/${libdirname}"
|
---|
| 14 | fi
|
---|
| 15 |
|
---|
| 16 | unpack_tarball DirectFB-${DIRECTFB_VER}
|
---|
| 17 | cd ${PKGDIR}
|
---|
| 18 |
|
---|
| 19 | case ${TGT_ARCH} in
|
---|
| 20 | i686 ) extra_conf="${extra_conf} --enable-mmx --enable-sse" ;;
|
---|
| 21 | x86_64 )
|
---|
| 22 | ## Need patch for SIMD on amd64, patch stolen from gentoo
|
---|
| 23 | #if [ "${BUILDENV}" = "64" ]; then
|
---|
| 24 | # case ${DIRECTFB_VER} in
|
---|
| 25 | # 0.9.2[12] ) apply_patch DirectFB-0.9.21-simd-amd64 ;;
|
---|
| 26 | # esac
|
---|
| 27 | #fi
|
---|
| 28 | #extra_conf="${extra_conf} --enable-mmx --enable-sse"
|
---|
| 29 |
|
---|
| 30 | ;;
|
---|
| 31 | esac
|
---|
| 32 |
|
---|
| 33 | # fix integer type redefinition errors
|
---|
| 34 | #--------------------------------------
|
---|
| 35 | # This is primarily here to fix amd64 64bit compilation, but if the
|
---|
| 36 | # linux-libc-headers are sane, this should not pose a problem for other
|
---|
| 37 | # architectures.
|
---|
| 38 | apply_patch DirectFB-0.9.22-dfb_types_amd64_hack
|
---|
| 39 |
|
---|
| 40 | max_log_init DirectFB ${DIRECTFB_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
|
---|
| 41 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
| 42 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
| 43 | CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
| 44 | CXXFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
|
---|
| 45 | LDFLAGS="-L/usr/${libdirname}" \
|
---|
| 46 | ./configure --prefix=/usr ${extra_conf} \
|
---|
| 47 | --enable-sysfs --enable-video4linux2 --enable-unique \
|
---|
| 48 | >> ${LOGFILE} 2>&1 &&
|
---|
| 49 | echo " o Configure OK" &&
|
---|
| 50 |
|
---|
| 51 | min_log_init ${BUILDLOGS} &&
|
---|
| 52 | make \
|
---|
| 53 | >> ${LOGFILE} 2>&1 &&
|
---|
| 54 | echo " o Build OK" &&
|
---|
| 55 |
|
---|
| 56 | min_log_init ${INSTLOGS} &&
|
---|
| 57 | make install \
|
---|
| 58 | >> ${LOGFILE} 2>&1 &&
|
---|
| 59 | echo " o ALL OK" || barf
|
---|
| 60 |
|
---|
| 61 | if [ "${MULTIARCH}" = "Y" ]; then
|
---|
| 62 | use_wrapper /usr/bin/directfb-config
|
---|
| 63 | fi
|
---|