libraries/agg: Patch for the newer compiler.

Thanks to USUARIONUEVO

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2018-10-21 09:20:10 +02:00 committed by Robby Workman
parent 7483c96699
commit daf9413971
2 changed files with 13 additions and 0 deletions

View File

@ -71,6 +71,7 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--disable-examples \
--disable-static \
--build=$ARCH-slackware-linux

View File

@ -0,0 +1,12 @@
diff -u -r agg-2.5/include/agg_renderer_outline_aa.h agg-2.5-const/include/agg_renderer_outline_aa.h
--- agg-2.5/include/agg_renderer_outline_aa.h 2006-10-09 06:07:08.000000000 +0200
+++ agg-2.5-const/include/agg_renderer_outline_aa.h 2018-06-16 23:09:16.500057814 +0200
@@ -1375,7 +1375,7 @@
//---------------------------------------------------------------------
void profile(const line_profile_aa& prof) { m_profile = &prof; }
const line_profile_aa& profile() const { return *m_profile; }
- line_profile_aa& profile() { return *m_profile; }
+ line_profile_aa& profile() { return *const_cast<line_profile_aa*>(m_profile); }
//---------------------------------------------------------------------
int subpixel_width() const { return m_profile->subpixel_width(); }