needed to extend SDL capabilities for tracker music.

Signed-off-by: Wolfram Sang <[email protected]>
---

* dropped unused patches
* added patch headers

 patches/libmikmod-3.1.12/CVE-2010-2971.patch |   33 +++++++++++
 patches/libmikmod-3.1.12/ldflags.patch       |   19 +++++++
 patches/libmikmod-3.1.12/series              |    2 +
 rules/libmikmod.in                           |    8 +++
 rules/libmikmod.make                         |   76 ++++++++++++++++++++++++++
 5 files changed, 138 insertions(+), 0 deletions(-)
 create mode 100644 patches/libmikmod-3.1.12/CVE-2010-2971.patch
 create mode 100644 patches/libmikmod-3.1.12/ldflags.patch
 create mode 100644 patches/libmikmod-3.1.12/series
 create mode 100644 rules/libmikmod.in
 create mode 100644 rules/libmikmod.make

diff --git a/patches/libmikmod-3.1.12/CVE-2010-2971.patch 
b/patches/libmikmod-3.1.12/CVE-2010-2971.patch
new file mode 100644
index 0000000..e712ed0
--- /dev/null
+++ b/patches/libmikmod-3.1.12/CVE-2010-2971.patch
@@ -0,0 +1,33 @@
+From: Wolfram Sang <[email protected]>
+Subject: libmikmod: apply patch for CVE-2010-2971
+
+Signed-off-by: Chris Larson <[email protected]>
+
+Taken from OpenEmbedded (4880cfd0217466c737c14f5fe7687baa0a01c00d)
+
+Signed-off-by: Wolfram Sang <[email protected]>
+
+---
+ loaders/load_it.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- libmikmod-3.1.12.orig/loaders/load_it.c
++++ libmikmod-3.1.12/loaders/load_it.c
+@@ -743,6 +743,8 @@ BOOL IT_Load(BOOL curious)
+ #define IT_LoadEnvelope(name,type)                                            
                                \
+                               ih. name##flg   =_mm_read_UBYTE(modreader);     
                        \
+                               ih. name##pts   =_mm_read_UBYTE(modreader);     
                        \
++                              if (ih. name##pts > ITENVCNT)                   
                                \
++                                      ih. name##pts = ITENVCNT;               
                                        \
+                               ih. name##beg   =_mm_read_UBYTE(modreader);     
                        \
+                               ih. name##end   =_mm_read_UBYTE(modreader);     
                        \
+                               ih. name##susbeg=_mm_read_UBYTE(modreader);     
                        \
+@@ -756,6 +758,8 @@ BOOL IT_Load(BOOL curious)
+ #define IT_LoadEnvelope(name,type)                                            
                                \
+                               ih. name/**/flg   =_mm_read_UBYTE(modreader);   
                \
+                               ih. name/**/pts   =_mm_read_UBYTE(modreader);   
                \
++                              if (ih. name/**/pts > ITENVCNT)                 
                                \
++                                      ih. name/**/pts = ITENVCNT;             
                                        \
+                               ih. name/**/beg   =_mm_read_UBYTE(modreader);   
                \
+                               ih. name/**/end   =_mm_read_UBYTE(modreader);   
                \
+                               ih. name/**/susbeg=_mm_read_UBYTE(modreader);   
                \
diff --git a/patches/libmikmod-3.1.12/ldflags.patch 
b/patches/libmikmod-3.1.12/ldflags.patch
new file mode 100644
index 0000000..0236256
--- /dev/null
+++ b/patches/libmikmod-3.1.12/ldflags.patch
@@ -0,0 +1,19 @@
+From: Wolfram Sang <[email protected]>
+Subject: libmikmod: add LDFLAGS
+
+Taken from OpenEmbedded (c7a2bcb77ed92c0731bb696e0909ef3184a568e7)
+
+Signed-off-by: Wolfram Sang <[email protected]>
+
+diff -urN libmikmod-3.1.12.orig/libmikmod/Makefile.in 
libmikmod-3.1.12/libmikmod/Makefile.in
+--- libmikmod-3.1.12.orig/libmikmod/Makefile.in        2004-01-21 
17:43:52.000000000 +0000
++++ libmikmod-3.1.12/libmikmod/Makefile.in     2009-04-02 11:28:01.000000000 
+0000
+@@ -72,7 +72,7 @@
+       rm -f Makefile
+ 
+ $(LIB): $(OBJ)
+-      $(LIBTOOL) --mode=link $(CC) -version-info 2:4:0 -o $@ $(OBJ) 
$(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir)
++      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info 2:4:0 -o $@ 
$(OBJ) $(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir)
+ 
+ dl_hpux.lo:   $(top_srcdir)/dlapi/dl_hpux.c \
+                       $(top_srcdir)/dlapi/dlfcn.h
diff --git a/patches/libmikmod-3.1.12/series b/patches/libmikmod-3.1.12/series
new file mode 100644
index 0000000..d921086
--- /dev/null
+++ b/patches/libmikmod-3.1.12/series
@@ -0,0 +1,2 @@
+ldflags.patch
+CVE-2010-2971.patch
diff --git a/rules/libmikmod.in b/rules/libmikmod.in
new file mode 100644
index 0000000..dc29e0f
--- /dev/null
+++ b/rules/libmikmod.in
@@ -0,0 +1,8 @@
+## SECTION=multimedia_sound
+
+config LIBMIKMOD
+       tristate
+       prompt "libmikmod                        "
+       help
+         libmikmod is a module player library supporting many formats,
+         including mod, s3m, it, and xm.
diff --git a/rules/libmikmod.make b/rules/libmikmod.make
new file mode 100644
index 0000000..bdc1bdc
--- /dev/null
+++ b/rules/libmikmod.make
@@ -0,0 +1,76 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Wolfram Sang <[email protected]>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBMIKMOD) += libmikmod
+
+#
+# Paths and names
+#
+LIBMIKMOD_VERSION      := 3.1.12
+LIBMIKMOD_MD5          := 9f3c740298260d5f88981fc0d51f6f16
+LIBMIKMOD              := libmikmod-$(LIBMIKMOD_VERSION)
+LIBMIKMOD_SUFFIX       := tar.gz
+LIBMIKMOD_URL          := 
http://downloads.sourceforge.net/mikmod/$(LIBMIKMOD).$(LIBMIKMOD_SUFFIX)
+LIBMIKMOD_SOURCE       := $(SRCDIR)/$(LIBMIKMOD).$(LIBMIKMOD_SUFFIX)
+LIBMIKMOD_DIR          := $(BUILDDIR)/$(LIBMIKMOD)
+LIBMIKMOD_LICENSE      := LGPLv2+
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(LIBMIKMOD_SOURCE):
+       @$(call targetinfo)
+       @$(call get, LIBMIKMOD)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBMIKMOD_PATH := PATH=$(CROSS_PATH)
+LIBMIKMOD_ENV  := $(CROSS_ENV)
+
+#
+# autoconf
+#
+LIBMIKMOD_AUTOCONF := \
+       $(CROSS_AUTOCONF_USR) \
+       --disable-af \
+       --enable-alsa \
+       --disable-esd \
+       --disable-oss \
+       --disable-sam9407 \
+       --disable-ultra \
+       --disable-esdtest \
+       --enable-threads
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libmikmod.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, libmikmod)
+       @$(call install_fixup, libmikmod, PRIORITY, optional)
+       @$(call install_fixup, libmikmod, SECTION, base)
+       @$(call install_fixup, libmikmod, AUTHOR, "Wolfram Sang 
<[email protected]>")
+       @$(call install_fixup, libmikmod, DESCRIPTION, missing)
+
+       @$(call install_lib, libmikmod, 0, 0, 0644, libmikmod)
+
+       @$(call install_finish, libmikmod)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
1.7.9.1


-- 
ptxdist mailing list
[email protected]

Reply via email to