diff options
| author | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-11 09:47:50 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-11 09:47:50 +0200 |
| commit | 0f52cc583d829e4df410bbdcd8d487b2f21ccc1b (patch) | |
| tree | 241b0bd2936dfe6cbbaa84cccf3837936e66c4be | |
| parent | 7ab4010c82780f15ad4d16a17f43defdb43f6d8d (diff) | |
| download | meta-openembedded-0f52cc583d829e4df410bbdcd8d487b2f21ccc1b.tar.gz | |
libmikmod 3.1.12: import from OE classic
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
5 files changed, 280 insertions, 0 deletions
diff --git a/meta-oe/recipes-multimedia/mikmod/libmikmod/CVE-2010-2971.patch b/meta-oe/recipes-multimedia/mikmod/libmikmod/CVE-2010-2971.patch new file mode 100644 index 0000000000..94ea8f52a2 --- /dev/null +++ b/meta-oe/recipes-multimedia/mikmod/libmikmod/CVE-2010-2971.patch | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | --- | ||
| 2 | loaders/load_it.c | 4 ++++ | ||
| 3 | 1 file changed, 4 insertions(+) | ||
| 4 | |||
| 5 | --- libmikmod-3.1.12.orig/loaders/load_it.c | ||
| 6 | +++ libmikmod-3.1.12/loaders/load_it.c | ||
| 7 | @@ -743,6 +743,8 @@ BOOL IT_Load(BOOL curious) | ||
| 8 | #define IT_LoadEnvelope(name,type) \ | ||
| 9 | ih. name##flg =_mm_read_UBYTE(modreader); \ | ||
| 10 | ih. name##pts =_mm_read_UBYTE(modreader); \ | ||
| 11 | + if (ih. name##pts > ITENVCNT) \ | ||
| 12 | + ih. name##pts = ITENVCNT; \ | ||
| 13 | ih. name##beg =_mm_read_UBYTE(modreader); \ | ||
| 14 | ih. name##end =_mm_read_UBYTE(modreader); \ | ||
| 15 | ih. name##susbeg=_mm_read_UBYTE(modreader); \ | ||
| 16 | @@ -756,6 +758,8 @@ BOOL IT_Load(BOOL curious) | ||
| 17 | #define IT_LoadEnvelope(name,type) \ | ||
| 18 | ih. name/**/flg =_mm_read_UBYTE(modreader); \ | ||
| 19 | ih. name/**/pts =_mm_read_UBYTE(modreader); \ | ||
| 20 | + if (ih. name/**/pts > ITENVCNT) \ | ||
| 21 | + ih. name/**/pts = ITENVCNT; \ | ||
| 22 | ih. name/**/beg =_mm_read_UBYTE(modreader); \ | ||
| 23 | ih. name/**/end =_mm_read_UBYTE(modreader); \ | ||
| 24 | ih. name/**/susbeg=_mm_read_UBYTE(modreader); \ | ||
diff --git a/meta-oe/recipes-multimedia/mikmod/libmikmod/autofoo.patch b/meta-oe/recipes-multimedia/mikmod/libmikmod/autofoo.patch new file mode 100644 index 0000000000..22d8170aa8 --- /dev/null +++ b/meta-oe/recipes-multimedia/mikmod/libmikmod/autofoo.patch | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | |||
| 2 | # | ||
| 3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
| 4 | # | ||
| 5 | |||
| 6 | --- libmikmod-3.2.0-beta2/configure.in~autofoo | ||
| 7 | +++ libmikmod-3.2.0-beta2/configure.in | ||
| 8 | @@ -415,8 +415,6 @@ | ||
| 9 | |||
| 10 | AC_CHECK_FUNCS(setenv snprintf srandom) | ||
| 11 | AC_REPLACE_FUNCS(strcasecmp strdup strstr) | ||
| 12 | -# Change extension, as we use libtool | ||
| 13 | -LIBOBJS="`echo $LIBOBJS|sed -e 's/\.o/\.lo/g'`" | ||
| 14 | |||
| 15 | AC_HEADER_EGREP(srandom,math.h,AC_DEFINE(SRANDOM_IN_MATH_H)) | ||
| 16 | |||
diff --git a/meta-oe/recipes-multimedia/mikmod/libmikmod/ldflags.patch b/meta-oe/recipes-multimedia/mikmod/libmikmod/ldflags.patch new file mode 100644 index 0000000000..4261379ee4 --- /dev/null +++ b/meta-oe/recipes-multimedia/mikmod/libmikmod/ldflags.patch | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | diff -urN libmikmod-3.1.12.orig/libmikmod/Makefile.in libmikmod-3.1.12/libmikmod/Makefile.in | ||
| 2 | --- libmikmod-3.1.12.orig/libmikmod/Makefile.in 2004-01-21 17:43:52.000000000 +0000 | ||
| 3 | +++ libmikmod-3.1.12/libmikmod/Makefile.in 2009-04-02 11:28:01.000000000 +0000 | ||
| 4 | @@ -72,7 +72,7 @@ | ||
| 5 | rm -f Makefile | ||
| 6 | |||
| 7 | $(LIB): $(OBJ) | ||
| 8 | - $(LIBTOOL) --mode=link $(CC) -version-info 2:4:0 -o $@ $(OBJ) $(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir) | ||
| 9 | + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info 2:4:0 -o $@ $(OBJ) $(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir) | ||
| 10 | |||
| 11 | dl_hpux.lo: $(top_srcdir)/dlapi/dl_hpux.c \ | ||
| 12 | $(top_srcdir)/dlapi/dlfcn.h | ||
diff --git a/meta-oe/recipes-multimedia/mikmod/libmikmod/m4.patch b/meta-oe/recipes-multimedia/mikmod/libmikmod/m4.patch new file mode 100644 index 0000000000..ac7f2d7d04 --- /dev/null +++ b/meta-oe/recipes-multimedia/mikmod/libmikmod/m4.patch | |||
| @@ -0,0 +1,197 @@ | |||
| 1 | --- /dev/null | ||
| 2 | +++ libmikmod-3.2.0-beta2/m4/esd.m4 | ||
| 3 | @@ -0,0 +1,194 @@ | ||
| 4 | +# Configure paths for ESD | ||
| 5 | +# Manish Singh 98-9-30 | ||
| 6 | +# stolen back from Frank Belew | ||
| 7 | +# stolen from Manish Singh | ||
| 8 | +# Shamelessly stolen from Owen Taylor | ||
| 9 | + | ||
| 10 | +dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | ||
| 11 | +dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS | ||
| 12 | +dnl | ||
| 13 | +AC_DEFUN(AM_PATH_ESD, | ||
| 14 | +[dnl | ||
| 15 | +dnl Get the cflags and libraries from the esd-config script | ||
| 16 | +dnl | ||
| 17 | +AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)], | ||
| 18 | + esd_prefix="$withval", esd_prefix="") | ||
| 19 | +AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)], | ||
| 20 | + esd_exec_prefix="$withval", esd_exec_prefix="") | ||
| 21 | +AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program], | ||
| 22 | + , enable_esdtest=yes) | ||
| 23 | + | ||
| 24 | + if test x$esd_exec_prefix != x ; then | ||
| 25 | + esd_args="$esd_args --exec-prefix=$esd_exec_prefix" | ||
| 26 | + if test x${ESD_CONFIG+set} != xset ; then | ||
| 27 | + ESD_CONFIG=$esd_exec_prefix/bin/esd-config | ||
| 28 | + fi | ||
| 29 | + fi | ||
| 30 | + if test x$esd_prefix != x ; then | ||
| 31 | + esd_args="$esd_args --prefix=$esd_prefix" | ||
| 32 | + if test x${ESD_CONFIG+set} != xset ; then | ||
| 33 | + ESD_CONFIG=$esd_prefix/bin/esd-config | ||
| 34 | + fi | ||
| 35 | + fi | ||
| 36 | + | ||
| 37 | + AC_PATH_PROG(ESD_CONFIG, esd-config, no) | ||
| 38 | + min_esd_version=ifelse([$1], ,0.2.7,$1) | ||
| 39 | + AC_MSG_CHECKING(for ESD - version >= $min_esd_version) | ||
| 40 | + no_esd="" | ||
| 41 | + if test "$ESD_CONFIG" = "no" ; then | ||
| 42 | + no_esd=yes | ||
| 43 | + else | ||
| 44 | + AC_LANG_SAVE | ||
| 45 | + AC_LANG_C | ||
| 46 | + ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` | ||
| 47 | + ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` | ||
| 48 | + | ||
| 49 | + esd_major_version=`$ESD_CONFIG $esd_args --version | \ | ||
| 50 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
| 51 | + esd_minor_version=`$ESD_CONFIG $esd_args --version | \ | ||
| 52 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
| 53 | + esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ | ||
| 54 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
| 55 | + if test "x$enable_esdtest" = "xyes" ; then | ||
| 56 | + ac_save_CFLAGS="$CFLAGS" | ||
| 57 | + ac_save_LIBS="$LIBS" | ||
| 58 | + CFLAGS="$CFLAGS $ESD_CFLAGS" | ||
| 59 | + LIBS="$LIBS $ESD_LIBS" | ||
| 60 | +dnl | ||
| 61 | +dnl Now check if the installed ESD is sufficiently new. (Also sanity | ||
| 62 | +dnl checks the results of esd-config to some extent | ||
| 63 | +dnl | ||
| 64 | + rm -f conf.esdtest | ||
| 65 | + AC_TRY_RUN([ | ||
| 66 | +#include <stdio.h> | ||
| 67 | +#include <stdlib.h> | ||
| 68 | +#include <string.h> | ||
| 69 | +#include <esd.h> | ||
| 70 | + | ||
| 71 | +char* | ||
| 72 | +my_strdup (char *str) | ||
| 73 | +{ | ||
| 74 | + char *new_str; | ||
| 75 | + | ||
| 76 | + if (str) | ||
| 77 | + { | ||
| 78 | + new_str = malloc ((strlen (str) + 1) * sizeof(char)); | ||
| 79 | + strcpy (new_str, str); | ||
| 80 | + } | ||
| 81 | + else | ||
| 82 | + new_str = NULL; | ||
| 83 | + | ||
| 84 | + return new_str; | ||
| 85 | +} | ||
| 86 | + | ||
| 87 | +int main () | ||
| 88 | +{ | ||
| 89 | + int major, minor, micro; | ||
| 90 | + char *tmp_version; | ||
| 91 | + | ||
| 92 | + system ("touch conf.esdtest"); | ||
| 93 | + | ||
| 94 | + /* HP/UX 9 (%@#!) writes to sscanf strings */ | ||
| 95 | + tmp_version = my_strdup("$min_esd_version"); | ||
| 96 | + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | ||
| 97 | + printf("%s, bad version string\n", "$min_esd_version"); | ||
| 98 | + exit(1); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + if (($esd_major_version > major) || | ||
| 102 | + (($esd_major_version == major) && ($esd_minor_version > minor)) || | ||
| 103 | + (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) | ||
| 104 | + { | ||
| 105 | + return 0; | ||
| 106 | + } | ||
| 107 | + else | ||
| 108 | + { | ||
| 109 | + printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); | ||
| 110 | + printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); | ||
| 111 | + printf("*** best to upgrade to the required version.\n"); | ||
| 112 | + printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); | ||
| 113 | + printf("*** to point to the correct copy of esd-config, and remove the file\n"); | ||
| 114 | + printf("*** config.cache before re-running configure\n"); | ||
| 115 | + return 1; | ||
| 116 | + } | ||
| 117 | +} | ||
| 118 | + | ||
| 119 | +],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
| 120 | + CFLAGS="$ac_save_CFLAGS" | ||
| 121 | + LIBS="$ac_save_LIBS" | ||
| 122 | + AC_LANG_RESTORE | ||
| 123 | + fi | ||
| 124 | + fi | ||
| 125 | + if test "x$no_esd" = x ; then | ||
| 126 | + AC_MSG_RESULT(yes) | ||
| 127 | + ifelse([$2], , :, [$2]) | ||
| 128 | + else | ||
| 129 | + AC_MSG_RESULT(no) | ||
| 130 | + if test "$ESD_CONFIG" = "no" ; then | ||
| 131 | + echo "*** The esd-config script installed by ESD could not be found" | ||
| 132 | + echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" | ||
| 133 | + echo "*** your path, or set the ESD_CONFIG environment variable to the" | ||
| 134 | + echo "*** full path to esd-config." | ||
| 135 | + else | ||
| 136 | + if test -f conf.esdtest ; then | ||
| 137 | + : | ||
| 138 | + else | ||
| 139 | + echo "*** Could not run ESD test program, checking why..." | ||
| 140 | + CFLAGS="$CFLAGS $ESD_CFLAGS" | ||
| 141 | + LIBS="$LIBS $ESD_LIBS" | ||
| 142 | + AC_LANG_SAVE | ||
| 143 | + AC_LANG_C | ||
| 144 | + AC_TRY_LINK([ | ||
| 145 | +#include <stdio.h> | ||
| 146 | +#include <esd.h> | ||
| 147 | +], [ return 0; ], | ||
| 148 | + [ echo "*** The test program compiled, but did not run. This usually means" | ||
| 149 | + echo "*** that the run-time linker is not finding ESD or finding the wrong" | ||
| 150 | + echo "*** version of ESD. If it is not finding ESD, you'll need to set your" | ||
| 151 | + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
| 152 | + echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
| 153 | + echo "*** is required on your system" | ||
| 154 | + echo "***" | ||
| 155 | + echo "*** If you have an old version installed, it is best to remove it, although" | ||
| 156 | + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], | ||
| 157 | + [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
| 158 | + echo "*** exact error that occured. This usually means ESD was incorrectly installed" | ||
| 159 | + echo "*** or that you have moved ESD since it was installed. In the latter case, you" | ||
| 160 | + echo "*** may want to edit the esd-config script: $ESD_CONFIG" ]) | ||
| 161 | + CFLAGS="$ac_save_CFLAGS" | ||
| 162 | + LIBS="$ac_save_LIBS" | ||
| 163 | + AC_LANG_RESTORE | ||
| 164 | + fi | ||
| 165 | + fi | ||
| 166 | + ESD_CFLAGS="" | ||
| 167 | + ESD_LIBS="" | ||
| 168 | + ifelse([$3], , :, [$3]) | ||
| 169 | + fi | ||
| 170 | + AC_SUBST(ESD_CFLAGS) | ||
| 171 | + AC_SUBST(ESD_LIBS) | ||
| 172 | + rm -f conf.esdtest | ||
| 173 | +]) | ||
| 174 | + | ||
| 175 | +dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]]) | ||
| 176 | +dnl Test, whether esd supports multiple recording clients (version >=0.2.21) | ||
| 177 | +dnl | ||
| 178 | +AC_DEFUN(AM_ESD_SUPPORTS_MULTIPLE_RECORD, | ||
| 179 | +[dnl | ||
| 180 | + AC_MSG_NOTICE([whether installed esd version supports multiple recording clients]) | ||
| 181 | + ac_save_ESD_CFLAGS="$ESD_CFLAGS" | ||
| 182 | + ac_save_ESD_LIBS="$ESD_LIBS" | ||
| 183 | + AM_PATH_ESD(0.2.21, | ||
| 184 | + ifelse([$1], , [ | ||
| 185 | + AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, true) | ||
| 186 | + AC_DEFINE(ESD_SUPPORTS_MULTIPLE_RECORD, 1, | ||
| 187 | + [Define if you have esound with support of multiple recording clients.])], | ||
| 188 | + [$1]), | ||
| 189 | + ifelse([$2], , [AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, false)], [$2]) | ||
| 190 | + if test "x$ac_save_ESD_CFLAGS" != x ; then | ||
| 191 | + ESD_CFLAGS="$ac_save_ESD_CFLAGS" | ||
| 192 | + fi | ||
| 193 | + if test "x$ac_save_ESD_LIBS" != x ; then | ||
| 194 | + ESD_LIBS="$ac_save_ESD_LIBS" | ||
| 195 | + fi | ||
| 196 | + ) | ||
| 197 | +]) | ||
diff --git a/meta-oe/recipes-multimedia/mikmod/libmikmod_3.1.12.bb b/meta-oe/recipes-multimedia/mikmod/libmikmod_3.1.12.bb new file mode 100644 index 0000000000..cd80a6fd9e --- /dev/null +++ b/meta-oe/recipes-multimedia/mikmod/libmikmod_3.1.12.bb | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | DESCRIPTION = "libmikmod is a module player library supporting many formats, including mod, s3m, it, and xm." | ||
| 2 | SECTION = "libs" | ||
| 3 | LICENSE = "LGPLv2.1" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=b2b941d484c442e5c031a51463d8e11b" | ||
| 5 | |||
| 6 | DEPENDS = "alsa-lib" | ||
| 7 | |||
| 8 | SRC_URI = "\ | ||
| 9 | ${SOURCEFORGE_MIRROR}/mikmod/libmikmod-${PV}.tar.gz \ | ||
| 10 | file://m4.patch \ | ||
| 11 | file://autofoo.patch \ | ||
| 12 | file://ldflags.patch \ | ||
| 13 | file://CVE-2010-2971.patch \ | ||
| 14 | " | ||
| 15 | |||
| 16 | SRC_URI[md5sum] = "9f3c740298260d5f88981fc0d51f6f16" | ||
| 17 | SRC_URI[sha256sum] = "891a2b780306e6ef86e381f459e71a085d4e7f56c970a879d3bf341c01bdfc32" | ||
| 18 | |||
| 19 | inherit autotools binconfig lib_package | ||
| 20 | |||
| 21 | EXTRA_OECONF = "\ | ||
| 22 | --disable-af \ | ||
| 23 | --enable-alsa \ | ||
| 24 | --disable-esd \ | ||
| 25 | --enable-oss \ | ||
| 26 | --disable-sam9407 \ | ||
| 27 | --disable-ultra \ | ||
| 28 | --disable-esdtest \ | ||
| 29 | --enable-threads \ | ||
| 30 | " | ||
| 31 | |||
