1 | #!/bin/bash |
---|
2 | |
---|
3 | ### libmikmod ### |
---|
4 | |
---|
5 | cd ${SRC} |
---|
6 | LOG=libmikmod-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 libmikmod-${LIBMIKMOD_VER} |
---|
17 | cd ${PKGDIR} |
---|
18 | |
---|
19 | # Edits required for 3.1.11 and 3.2.0 beta (except the VERSION edit w 3.2.0) |
---|
20 | case ${LIBMIKMOD_VER} in |
---|
21 | 3.1.11 ) |
---|
22 | apply_patch libmikmod-3.1.11-a |
---|
23 | |
---|
24 | sed -i -e "s/VERSION=10/VERSION=11/" \ |
---|
25 | -e "s/sys_asoundlib/alsa_asoundlib/" \ |
---|
26 | -e "s/snd_cards/snd_card_load/g" \ |
---|
27 | -e "s|sys/asoundlib.h|alsa/asoundlib.h|g" \ |
---|
28 | -e "s/^LIBOBJS/#LIBOBJS/g" \ |
---|
29 | configure.in && |
---|
30 | autoconf || barf |
---|
31 | ;; |
---|
32 | 3.2.* ) |
---|
33 | sed -i -e "s/sys_asoundlib/alsa_asoundlib/" \ |
---|
34 | -e "s/snd_cards/snd_card_load/g" \ |
---|
35 | -e "s|sys/asoundlib.h|alsa/asoundlib.h|g" \ |
---|
36 | -e "s/^LIBOBJS/#LIBOBJS/g" \ |
---|
37 | configure.in && |
---|
38 | autoconf || barf |
---|
39 | ;; |
---|
40 | esac |
---|
41 | |
---|
42 | sed -i -e "/libdir=/s@/lib*@/${libdirname}@g" \ |
---|
43 | libmikmod-config.in |
---|
44 | |
---|
45 | max_log_init libmikmod ${LIBMIKMOD_VER} "blfs (shared)" ${CONFLOGS} ${LOG} |
---|
46 | CC="${CC-gcc} ${ARCH_CFLAGS}" \ |
---|
47 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \ |
---|
48 | CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \ |
---|
49 | CXXFLAGS="-O2 -pipe ${TGT_CFLAGS}" \ |
---|
50 | ./configure --prefix=/usr ${extra_conf} \ |
---|
51 | --mandir=/usr/share/man \ |
---|
52 | --infodir=/usr/share/info \ |
---|
53 | >> ${LOGFILE} 2>&1 && |
---|
54 | echo " o Configure OK" && |
---|
55 | |
---|
56 | min_log_init ${BUILDLOGS} && |
---|
57 | make \ |
---|
58 | >> ${LOGFILE} 2>&1 && |
---|
59 | echo " o Build OK" && |
---|
60 | |
---|
61 | min_log_init ${INSTLOGS} && |
---|
62 | make install \ |
---|
63 | >> ${LOGFILE} 2>&1 && |
---|
64 | echo " o ALL OK" || barf |
---|
65 | |
---|
66 | if [ "Y" = "${MULTIARCH}" ]; then |
---|
67 | use_wrapper /usr/bin/libmikmod-config |
---|
68 | fi |
---|
69 | |
---|
70 | case ${LIBMIKMOD_VER} in |
---|
71 | 3.1.* ) chmod 755 /usr/${libdirname}/libmikmod.so.2.* ;; |
---|
72 | 3.2.* ) chmod 755 /usr/${libdirname}/libmikmod.so.3.* ;; |
---|
73 | esac |
---|