--- v2.2.5.orig/debian/control
+++ v2.2.5/debian/control
@@ -0,0 +1,18 @@
+Source: muparser
+Section: sectionName
+Priority: optional
+Standards-Version: 3.9.6
+Maintainer: Russell Standish <hpcoder@hpcoders.com.au>
+Build-Depends: debhelper (>= 4.1.16)
+
+Package: libmuparser-dev
+Section: libdevel
+Architecture: any
+Depends: libmuparser, ${shlibs:Depends}
+Description: muParser is an extensible high performance math parser library written in C++. It works by transforming a mathematical expression into bytecode and precalculating constant parts of the expression.
+
+Package: libmuparser
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: muParser is an extensible high performance math parser library written in C++. It works by transforming a mathematical expression into bytecode and precalculating constant parts of the expression.
+
--- v2.2.5.orig/debian/rules
+++ v2.2.5/debian/rules
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=5
+
+CFLAGS = -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+DESTDIR=/usr/src/packages/BUILD/debian/libmuparser
+
+ifeq ($(DEB_HOST_GNU_CPU),x86_64)
+LIBDIR=lib64
+else
+LIBDIR=lib
+endif
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+# Add here commands to compile the package.
+	sh configure --enable-samples --enable-shared --prefix=/usr
+	$(MAKE) -j1
+# --- end custom part for compiling
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+# Add here commands to clean up after the build process.
+	make clean || true
+# --- end custom part for cleaning up
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+# Add here commands to install the package
+	make install DESTDIR=$(DESTDIR)-dev
+	mkdir -p $(DESTDIR)/usr/lib
+	mv $(DESTDIR)-dev/usr/lib/lib*.so.* $(DESTDIR)/usr/lib
+# --- end custom part for installing
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+	dh_installcron
+	dh_installman
+	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- v2.2.5.orig/debian/compat
+++ v2.2.5/debian/compat
@@ -0,0 +1,1 @@
+5
--- v2.2.5.orig/debian/changelog
+++ v2.2.5/debian/changelog
@@ -0,0 +1,5 @@
+muparser (2.2.4) stable; urgency=low
+
+  * Initial release. (Closes: #XXXXXX)
+
+ -- Russell Standish <rks@parallel.hpcoders.com.au>  Tue, 03 Mar 2015 11:47:42 +1100
--- v2.2.5.orig/Makefile.in.orig	2010-11-10 17:20:25.613034414 +0100
+++ v2.2.5/Makefile.in	2010-11-10 17:20:46.068784224 +0100
@@ -104,8 +104,8 @@
 
 ### Conditionally set variables: ###
 
-@COND_DEPS_TRACKING_0@CXXC = $(CXX)
-@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
+@COND_DEPS_TRACKING_0@CXXC = $(CXX) $(CXXFLAGS)
+@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX) $(CXXFLAGS)
 @COND_DEBUG_0@DEBUG_BUILD_POSTFIX = 
 @COND_DEBUG_1@DEBUG_BUILD_POSTFIX = d
 @COND_SHARED_0@__muParser_lib___depname = \
From: Jan Engelhardt <jengelh@inai.de>
Date: 2015-02-03 00:43:03.433735818 +0100

muparser broke the ABI between 2.2.3 and 2.2.4 by changing.
The abidiff(1) report from libabigail:

  [C]'method std::size_t mu::ParserError::GetPos()' has some indirect sub-type changes:
    return type changed:
      entity changed from typedef std::size_t to int
        name changed from 'long unsigned int' to 'int'
        size changed from 64 to 32 bits
        alignment changed from 64 to 32 bits

Work around this messup by using the full version as unique SONAME.
---
 Makefile.in               |    6 +++---
 build/autoconf/aclocal.m4 |    5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

Index: muparser-2.2.4/Makefile.in
===================================================================
--- v2.2.5.orig/Makefile.in
+++ v2.2.5/Makefile.in
@@ -143,7 +143,7 @@ COND_WINDOWS_IMPLIB_1___muParser_dll___i
 @COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
 @COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@	= .2.2.4.$(SO_SUFFIX)
 @COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1@__muParser_dll___targetsuf3 \
-@COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1@	= .$(SO_SUFFIX).2
+@COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1@	= .$(SO_SUFFIX).2.2.5
 @COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
 @COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@	= -2.$(SO_SUFFIX)
 @COND_USE_SOVERSION_0@__muParser_dll___targetsuf3 = .$(SO_SUFFIX)
Index: muparser-2.2.4/build/autoconf/aclocal.m4
===================================================================
--- v2.2.5.orig/build/autoconf/aclocal.m4
+++ v2.2.5/build/autoconf/aclocal.m4
@@ -1317,8 +1317,9 @@ AC_DEFUN([AC_BAKEFILE_SHARED_VERSIONS],
             SONAME_FLAG="-Wl,-soname,"
         fi
         USE_SOVERSION=1
-        USE_SOVERLINUX=1
-        USE_SOTWOSYMLINKS=1
+        USE_SOVERLINUX=0
+        USE_SOVERSOLARIS=1
+        USE_SOTWOSYMLINKS=0
       ;;
 
       *-*-solaris2* )
