mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH V2 1/3] libmikmod: add package
Date: Wed, 14 Mar 2012 11:40:39 +0100	[thread overview]
Message-ID: <1331721639-9980-1-git-send-email-w.sang@pengutronix.de> (raw)
In-Reply-To: <1331719246-26938-2-git-send-email-w.sang@pengutronix.de>

needed to extend SDL capabilities for tracker music.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---

* 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 <w.sang@pengutronix.de>
+Subject: libmikmod: apply patch for CVE-2010-2971
+
+Signed-off-by: Chris Larson <chris_larson@mentor.com>
+
+Taken from OpenEmbedded (4880cfd0217466c737c14f5fe7687baa0a01c00d)
+
+Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
+
+---
+ 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 <w.sang@pengutronix.de>
+Subject: libmikmod: add LDFLAGS
+
+Taken from OpenEmbedded (c7a2bcb77ed92c0731bb696e0909ef3184a568e7)
+
+Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
+
+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 <w.sang@pengutronix.de>
+#
+# 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 <w.sang@pengutronix.de>")
+	@$(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
ptxdist@pengutronix.de

  reply	other threads:[~2012-03-14 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 10:00 [ptxdist] [PATCH 0/3] have 'supertux' with music Wolfram Sang
2012-03-14 10:00 ` [ptxdist] [PATCH 1/3] libmikmod: add package Wolfram Sang
2012-03-14 10:40   ` Wolfram Sang [this message]
2012-03-14 10:00 ` [ptxdist] [PATCH 2/3] sdl_mixer: enable MOD support Wolfram Sang
2012-03-14 10:00 ` [ptxdist] [PATCH 3/3] supertux: add library for music Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331721639-9980-1-git-send-email-w.sang@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox