File builders/alsa-lib-1.2.7/builder.sh copied from file builders/alsa-lib-1/builder.sh (similarity 55%) (mode: 100644) (index db212fd..72e6fed) |
1 |
1 |
src_name=alsa-lib |
src_name=alsa-lib |
2 |
|
version=1.2.4 |
|
|
2 |
|
version=${pkg_name##*-} |
|
3 |
|
slot=$version |
3 |
4 |
archive_name=$src_name-$version.tar.bz2 |
archive_name=$src_name-$version.tar.bz2 |
4 |
5 |
url0=ftp://ftp.alsa-project.org/pub/lib/$archive_name |
url0=ftp://ftp.alsa-project.org/pub/lib/$archive_name |
5 |
6 |
|
|
6 |
|
slot=1 |
|
7 |
|
|
|
8 |
7 |
src_dir=$src_dir_root/$src_name-$version |
src_dir=$src_dir_root/$src_name-$version |
9 |
8 |
cd $src_dir_root |
cd $src_dir_root |
10 |
9 |
rm -Rf $src_name-$version |
rm -Rf $src_name-$version |
|
... |
... |
rm -Rf $build_dir |
15 |
14 |
mkdir -p $build_dir |
mkdir -p $build_dir |
16 |
15 |
cd $build_dir |
cd $build_dir |
17 |
16 |
|
|
|
17 |
|
PATH_SAVED=$PATH |
|
18 |
|
export PATH="\ |
|
19 |
|
/nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin:\ |
|
20 |
|
/nyan/make/current/bin:\ |
|
21 |
|
$PATH\ |
|
22 |
|
" |
|
23 |
|
target_gnu_triple=$(basename "$(ls -d /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/*-gcc)") |
|
24 |
|
target_gnu_triple=${target_gnu_triple%-gcc} |
|
25 |
|
|
18 |
26 |
# at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option |
# at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option |
19 |
27 |
# lockless dmix-->crackling sound |
# lockless dmix-->crackling sound |
20 |
|
export "CC=gcc -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib -static-libgcc \ |
|
21 |
|
-Wl,-rpath-link,\ |
|
|
28 |
|
export AR=$target_gnu_triple-ar |
|
29 |
|
export OBJDUMP=$target_gnu_triple-objdump |
|
30 |
|
export "CC=$target_gnu_triple-gcc \ |
|
31 |
|
-isystem /nyan/linux-headers/current/include \ |
|
32 |
|
-isystem /nyan/glibc/current/include \ |
|
33 |
|
-B/nyan/glibc/current/lib \ |
|
34 |
|
-L/nyan/glibc/current/lib \ |
|
35 |
|
-static-libgcc \ |
|
36 |
|
-Wl,-s \ |
|
37 |
|
-Wl,-rpath-link,\ |
22 |
38 |
/nyan/glibc/current/lib" |
/nyan/glibc/current/lib" |
23 |
39 |
export 'CFLAGS=-O2 -pipe -fPIC' |
export 'CFLAGS=-O2 -pipe -fPIC' |
24 |
40 |
$src_dir/configure \ |
$src_dir/configure \ |
25 |
41 |
--prefix=/nyan/alsa-lib/$slot \ |
--prefix=/nyan/alsa-lib/$slot \ |
26 |
42 |
--disable-static \ |
--disable-static \ |
27 |
43 |
--enable-shared \ |
--enable-shared \ |
28 |
|
--disable-debug \ |
|
29 |
44 |
--disable-ucm \ |
--disable-ucm \ |
30 |
45 |
--disable-topology \ |
--disable-topology \ |
31 |
46 |
--disable-old-symbols \ |
--disable-old-symbols \ |
32 |
47 |
--disable-python \ |
--disable-python \ |
33 |
|
--with-versioned \ |
|
|
48 |
|
--without-debug \ |
|
49 |
|
--without-versioned \ |
34 |
50 |
--without-debug \ |
--without-debug \ |
35 |
51 |
--without-softfloat |
--without-softfloat |
|
52 |
|
unset AR |
|
53 |
|
unset OBJDUMP |
36 |
54 |
unset CFLAGS |
unset CFLAGS |
37 |
55 |
unset CC |
unset CC |
38 |
56 |
|
|
39 |
|
make -j $threads_n |
|
|
57 |
|
#make -j $threads_n |
|
58 |
|
make |
40 |
59 |
make install |
make install |
41 |
60 |
|
|
42 |
61 |
# it wants an "audio" entry in /etc/group with a GID of 116 |
# it wants an "audio" entry in /etc/group with a GID of 116 |
|
... |
... |
if ! egrep -q '^audio:' /etc/group; then |
44 |
63 |
echo 'audio::116:' >>/etc/group |
echo 'audio::116:' >>/etc/group |
45 |
64 |
fi |
fi |
46 |
65 |
|
|
47 |
|
# cleanup and tidying |
|
48 |
66 |
find /nyan/$src_name/$slot -type f -name '*.la' | xargs rm -f |
find /nyan/$src_name/$slot -type f -name '*.la' | xargs rm -f |
49 |
|
find /nyan/$src_name/$slot -type f | while read f; do if file $f | egrep 'ELF.+(shared|executable)' >/dev/null; then strip -s $f; fi; done |
|
50 |
67 |
|
|
|
68 |
|
export PATH=$PATH_SAVED |
|
69 |
|
unset PATH_SAVED |
|
70 |
|
unset target_gnu_triple |
|
71 |
|
rm -f $pkgs_dir_root/$archive_name |
51 |
72 |
rm -Rf $build_dir $src_dir |
rm -Rf $build_dir $src_dir |
File builders/alsa-utils-1.2.7/aplay.patch added (mode: 100644) (index 0000000..5dbb3e7) |
|
1 |
|
--- a/aplay/aplay.orig.c |
|
2 |
|
+++ b/aplay/aplay.c |
|
3 |
|
@@ -41,7 +41,9 @@ |
|
4 |
|
#include <time.h> |
|
5 |
|
#include <locale.h> |
|
6 |
|
#include <alsa/asoundlib.h> |
|
7 |
|
+#ifdef HAVE_ALSA_USE_CASE_H |
|
8 |
|
#include <alsa/use-case.h> |
|
9 |
|
+#endif |
|
10 |
|
#include <assert.h> |
|
11 |
|
#include <termios.h> |
|
12 |
|
#include <signal.h> |
|
13 |
|
@@ -453,6 +455,7 @@ |
|
14 |
|
return offset; |
|
15 |
|
} |
|
16 |
|
|
|
17 |
|
+#ifdef HAVE_ALSA_USE_CASE_H |
|
18 |
|
static int open_ucm(snd_use_case_mgr_t **uc_mgr, char **pcm_name, const char *name) |
|
19 |
|
{ |
|
20 |
|
char *s, *p; |
|
21 |
|
@@ -476,6 +479,7 @@ |
|
22 |
|
} |
|
23 |
|
return err; |
|
24 |
|
} |
|
25 |
|
+#endif |
|
26 |
|
|
|
27 |
|
static long parse_long(const char *str, int *err) |
|
28 |
|
{ |
|
29 |
|
@@ -553,7 +557,9 @@ |
|
30 |
|
int do_device_list = 0, do_pcm_list = 0, force_sample_format = 0; |
|
31 |
|
snd_pcm_info_t *info; |
|
32 |
|
FILE *direction; |
|
33 |
|
+#ifdef HAVE_ALSA_USE_CASE_H |
|
34 |
|
snd_use_case_mgr_t *uc_mgr = NULL; |
|
35 |
|
+#endif |
|
36 |
|
|
|
37 |
|
#ifdef ENABLE_NLS |
|
38 |
|
setlocale(LC_ALL, ""); |
|
39 |
|
@@ -852,6 +858,7 @@ |
|
40 |
|
goto __end; |
|
41 |
|
} |
|
42 |
|
|
|
43 |
|
+#ifdef HAVE_ALSA_USE_CASE_H |
|
44 |
|
if (strncmp(pcm_name, "ucm.", 4) == 0) { |
|
45 |
|
err = open_ucm(&uc_mgr, &pcm_name, pcm_name + 4); |
|
46 |
|
if (err < 0) { |
|
47 |
|
@@ -861,6 +868,7 @@ |
|
48 |
|
if (verbose) |
|
49 |
|
fprintf(stderr, _("Found UCM PCM device: %s\n"), pcm_name); |
|
50 |
|
} |
|
51 |
|
+#endif |
|
52 |
|
|
|
53 |
|
err = snd_pcm_open(&handle, pcm_name, stream, open_mode); |
|
54 |
|
if (err < 0) { |
|
55 |
|
@@ -951,8 +959,10 @@ |
|
56 |
|
if (verbose==2) |
|
57 |
|
putchar('\n'); |
|
58 |
|
snd_pcm_close(handle); |
|
59 |
|
+#ifdef HAVE_ALSA_USE_CASE_H |
|
60 |
|
if (uc_mgr) |
|
61 |
|
snd_use_case_mgr_close(uc_mgr); |
|
62 |
|
+#endif |
|
63 |
|
handle = NULL; |
|
64 |
|
free(audiobuf); |
|
65 |
|
__end: |
File builders/alsa-utils-1.2.7/builder.sh added (mode: 100644) (index 0000000..c37d0dc) |
|
1 |
|
src_name=alsa-utils |
|
2 |
|
version=${pkg_name##*-} |
|
3 |
|
slot=$version |
|
4 |
|
archive_name=$src_name-$version.tar.bz2 |
|
5 |
|
url0=ftp://ftp.alsa-project.org/pub/utils/$src_name-$version.tar.bz2 |
|
6 |
|
|
|
7 |
|
src_dir=$src_dir_root/$src_name-$version |
|
8 |
|
cd $src_dir_root |
|
9 |
|
rm -Rf $src_name-$version |
|
10 |
|
tar xf $archive_name |
|
11 |
|
|
|
12 |
|
# ifdef missing |
|
13 |
|
cd $src_dir |
|
14 |
|
cp $nyan_root/builders/$pkg_name/aplay.patch $src_dir/aplay.patch |
|
15 |
|
patch -p1 -i $src_dir/aplay.patch |
|
16 |
|
|
|
17 |
|
build_dir=$builds_dir_root/$pkg_name-$version |
|
18 |
|
rm -Rf $build_dir |
|
19 |
|
mkdir -p $build_dir |
|
20 |
|
cd $build_dir |
|
21 |
|
|
|
22 |
|
PATH_SAVED=$PATH |
|
23 |
|
export PATH="\ |
|
24 |
|
/nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin:\ |
|
25 |
|
/nyan/make/current/bin:\ |
|
26 |
|
/nyan/pkgconf/current/bin:\ |
|
27 |
|
$PATH\ |
|
28 |
|
" |
|
29 |
|
target_gnu_triple=$(basename "$(ls -d /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/*-gcc)") |
|
30 |
|
target_gnu_triple=${target_gnu_triple%-gcc} |
|
31 |
|
|
|
32 |
|
|
|
33 |
|
export "PKG_CONFIG_LIBDIR=/nyan/alsa-lib/current/lib/pkgconfig" |
|
34 |
|
|
|
35 |
|
# alsa cppflags broken |
|
36 |
|
export OBJDUMP=$target_gnu_triple-objdump |
|
37 |
|
export AR=$target_gnu_triple-ar |
|
38 |
|
export PKG_CONFIG=/nyan/pkgconf/current/bin/pkgconf |
|
39 |
|
export "CPPFLAGS=-I/nyan/ncurses/current/include/ncurses -I/nyan/ncurses/current/include $(pkgconf --cflags-only-I alsa)" |
|
40 |
|
echo CPPFLAGS=$CPPFLAGS |
|
41 |
|
# at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option |
|
42 |
|
export "CC=$target_gnu_triple-gcc \ |
|
43 |
|
-isystem /nyan/linux-headers/current/include \ |
|
44 |
|
-isystem /nyan/glibc/current/include \ |
|
45 |
|
-static-libgcc \ |
|
46 |
|
-B/nyan/glibc/current/lib \ |
|
47 |
|
-L/nyan/glibc/current/lib \ |
|
48 |
|
-Wl,-s \ |
|
49 |
|
-Wl,-rpath-link,\ |
|
50 |
|
/nyan/glibc/current/lib" |
|
51 |
|
export 'CFLAGS=-O2 -pipe -fPIC' |
|
52 |
|
export "LDFLAGS=-L/nyan/ncurses/current/lib -L/nyan/alsa-lib/current/lib" |
|
53 |
|
export LIBS=-ltinfo |
|
54 |
|
$src_dir/configure \ |
|
55 |
|
--prefix=/nyan/alsa-utils/$slot \ |
|
56 |
|
--disable-shared \ |
|
57 |
|
--disable-nls \ |
|
58 |
|
--disable-rpath \ |
|
59 |
|
--disable-alsatest \ |
|
60 |
|
--disable-xmlto \ |
|
61 |
|
--disable-rst2man |
|
62 |
|
unset OBJDUMP |
|
63 |
|
unset AR |
|
64 |
|
unset PKG_CONFIG_LIBDIR |
|
65 |
|
unset PKG_CONFIG |
|
66 |
|
unset CPPFLAGS |
|
67 |
|
unset CFLAGS |
|
68 |
|
unset CC |
|
69 |
|
unset LDFLAGS |
|
70 |
|
unset LIBS |
|
71 |
|
|
|
72 |
|
make -j $threads_n |
|
73 |
|
make install |
|
74 |
|
|
|
75 |
|
# cleanup and tidying |
|
76 |
|
rm -Rf /nyan/$src_name/$slot/share/man |
|
77 |
|
|
|
78 |
|
# fix detected bashism |
|
79 |
|
sed -i -e 's/bash/sh/' \ |
|
80 |
|
/nyan/alsa-utils/$slot/sbin/alsabat-test.sh \ |
|
81 |
|
/nyan/alsa-utils/$slot/sbin/alsaconf \ |
|
82 |
|
/nyan/alsa-utils/$slot/sbin/alsa-info.sh |
|
83 |
|
|
|
84 |
|
export PATH=$PATH_SAVED |
|
85 |
|
unset PATH_SAVED |
|
86 |
|
unset target_gnu_triple |
|
87 |
|
rm -f $pkgs_dir_root/$archive_name |
|
88 |
|
rm -Rf $build_dir $src_dir |