media-libs/libfpx: Fix building with GCC-6
authorPeter Levine <plevine457@gmail.com>
Sun, 14 May 2017 00:35:39 +0000 (20:35 -0400)
committerDavid Seifert <soap@gentoo.org>
Fri, 26 May 2017 20:58:04 +0000 (22:58 +0200)
Bug: https://bugs.gentoo.org/show_bug.cgi?id=594094
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4623

media-libs/libfpx/files/libfpx-1.2.0.13-export-symbols.patch
media-libs/libfpx/files/libfpx-1.3.1_p6-gcc6.patch [new file with mode: 0644]
media-libs/libfpx/libfpx-1.3.1_p6.ebuild

index 9e0f1632550041e4590fd714968e0860a88deb05..dfb974bc7164ce47291f8e2473ebae63e23f056a 100644 (file)
@@ -1,8 +1,8 @@
 * At least the Darwin linker doesn't like double symbols during the
   final linking stage...
 
---- jpeg/jpegconf.h
-+++ jpeg/jpegconf.h
+--- a/jpeg/jpegconf.h
++++ b/jpeg/jpegconf.h
 @@ -27,6 +27,6 @@
  #   pragma warning(disable : 4244)
  #   pragma warning(disable : 4142)
diff --git a/media-libs/libfpx/files/libfpx-1.3.1_p6-gcc6.patch b/media-libs/libfpx/files/libfpx-1.3.1_p6-gcc6.patch
new file mode 100644 (file)
index 0000000..75c7a7e
--- /dev/null
@@ -0,0 +1,35 @@
+--- a/oless/h/page.hxx
++++ b/oless/h/page.hxx
+@@ -47,6 +47,7 @@
+ {
+ public:
+     void * operator new(size_t size, size_t sizeData);
++    void operator delete(void *ptr);
+ 
+     CMSFPage(CMSFPage *pmpNext);
+     inline ~CMSFPage();
+@@ -133,6 +134,24 @@
+ }
+ 
+ //+---------------------------------------------------------------------------
++//
++//  Member: CMSFPage::operator delete, public
++//
++//  Synopsis: Overloaded delete operator for CMSFPage.
++//
++//  Arguments:  [ptr] -- Pointer to CMSFPage object
++//
++//----------------------------------------------------------------------------
++
++inline void CMSFPage::operator delete(void *ptr)
++{
++    if (ptr) {
++        free(ptr);
++        ptr = NULL;
++    }
++}
++
++//+---------------------------------------------------------------------------
+ //
+ //  Member: CMSFPage::GetNext, public
+ //
index f8bca2dbbedfc8a21ef89b53b1e499240083e4b9..fcaf30fc17d2d85fbaa3705a4df8ca0584998061 100644 (file)
@@ -15,10 +15,13 @@ IUSE="static-libs"
 
 S=${WORKDIR}/${P/_p/-}
 
-src_prepare() {
-       epatch "${FILESDIR}"/${PN}-1.2.0.13-export-symbols.patch
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.2.0.13-export-symbols.patch
+       "${FILESDIR}"/${P}-gcc6.patch
+)
 
-       eapply_user
+src_prepare() {
+       default
 
        # we're not windows, even though we don't define __unix by default
        [[ ${CHOST} == *-darwin* ]] && append-flags -D__unix