1 |
dirtyepic 10/02/20 05:31:00 |
2 |
|
3 |
Added: wxsvg-1.0.2-external-expat.patch |
4 |
Log: |
5 |
Add support for building against system expat. (bug #249625 by Diego) |
6 |
(Portage version: 2.2_rc63/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-libs/wxsvg/files/wxsvg-1.0.2-external-expat.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/wxsvg/files/wxsvg-1.0.2-external-expat.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/wxsvg/files/wxsvg-1.0.2-external-expat.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: wxsvg-1.0.2-external-expat.patch |
15 |
=================================================================== |
16 |
https://bugs.gentoo.org/249625 |
17 |
https://sourceforge.net/projects/wxsvg/forums/forum/424987/topic/2875326 |
18 |
|
19 |
diff --git a/configure.in b/configure.in |
20 |
index 233fc88..92a2814 100644 |
21 |
--- a/configure.in |
22 |
+++ b/configure.in |
23 |
@@ -17,6 +17,9 @@ AC_ARG_ENABLE(render, |
24 |
AC_ARG_ENABLE(ffmpeg, |
25 |
[ --enable-ffmpeg Enable ffmpeg decoder support (default: enabled)], |
26 |
[enable_ffmpeg=$enableval],[enable_ffmpeg=yes]) |
27 |
+AC_ARG_WITH(sys-expat, |
28 |
+ [ --with-sys-expat Use the system expat library (default: use bundled expat library)], |
29 |
+ [], [with_sys_expat=no]) |
30 |
|
31 |
AC_MSG_CHECKING(for install location) |
32 |
case "$prefix" in |
33 |
@@ -165,6 +168,15 @@ if test x$enable_ffmpeg = xyes; then |
34 |
LIBS="$LIBS $FFMPEG_LIBS" |
35 |
fi |
36 |
|
37 |
+dnl check if system expat requested |
38 |
+if test "x$with_sys_expat" = "xyes"; then |
39 |
+ AC_CHECK_LIB([expat],[XML_ParserCreate],[SYS_EXPAT="yes"]) |
40 |
+ if test "x$SYS_EXPAT" = "x" ; then |
41 |
+ AC_MSG_WARN([system expat library not found, will use built-in instead]) |
42 |
+ with_sys_expat=no |
43 |
+ fi |
44 |
+fi |
45 |
+AM_CONDITIONAL(SYS_EXPAT, [test x$with_sys_expat = xyes]) |
46 |
|
47 |
dnl vars |
48 |
AC_SUBST(LDFLAGS) |
49 |
diff --git a/src/svgxml/Makefile.am b/src/svgxml/Makefile.am |
50 |
index 28ef05c..72370ea 100644 |
51 |
--- a/src/svgxml/Makefile.am |
52 |
+++ b/src/svgxml/Makefile.am |
53 |
@@ -1,7 +1,15 @@ |
54 |
+if SYS_EXPAT |
55 |
+SUBDIRS = |
56 |
+else |
57 |
SUBDIRS = expat |
58 |
+endif |
59 |
|
60 |
noinst_LTLIBRARIES = libwxsvgxml.la |
61 |
libwxsvgxml_la_SOURCES = svgxml.cpp svgxmlhelpr.cpp |
62 |
+if SYS_EXPAT |
63 |
+libwxsvgxml_la_LIBADD = -lexpat |
64 |
+else |
65 |
libwxsvgxml_la_LIBADD = expat/libexpat.la |
66 |
+endif |
67 |
|
68 |
INCLUDES = -I$(top_builddir)/include/wxSVGXML |