pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/libfpx Update distfile and fix build on illumos



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f37993cb6d70
branches:  trunk
changeset: 410158:f37993cb6d70
user:      nros <nros%pkgsrc.org@localhost>
date:      Sun Jan 19 11:07:56 2020 +0000

description:
Update distfile and fix build on illumos

Update distfile for libfpx, difference from the old one:
our patches are applied in it and it is available at the mastersite.
Fix build on illumos and perhaps other platforms by using autoconf
to look for the endian headers instead of using __sun
(solaris.h is not available on illumos).
bump pkgrevision.

diffstat:

 graphics/libfpx/Makefile                         |  11 ++-
 graphics/libfpx/distinfo                         |  16 ++--
 graphics/libfpx/patches/patch-configure.ac       |  15 ++++
 graphics/libfpx/patches/patch-fpx_f__fpxvw.cpp   |  76 ------------------------
 graphics/libfpx/patches/patch-fpxlib-config.h.in |  36 +++++++++++
 graphics/libfpx/patches/patch-ole_olecomm.h      |  21 ++++++
 graphics/libfpx/patches/patch-oless_dir.cxx      |  13 ----
 graphics/libfpx/patches/patch-oless_docfile.cxx  |  27 --------
 8 files changed, 88 insertions(+), 127 deletions(-)

diffs (264 lines):

diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/Makefile
--- a/graphics/libfpx/Makefile  Sun Jan 19 10:50:21 2020 +0000
+++ b/graphics/libfpx/Makefile  Sun Jan 19 11:07:56 2020 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2017/12/03 11:09:46 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2020/01/19 11:07:56 nros Exp $
 
 libfpx_ver=    1.3.1
-DISTNAME=      libfpx-${libfpx_ver}-9
+DISTNAME=      libfpx-${libfpx_ver}-10
 PKGNAME=       libfpx-${libfpx_ver}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    graphics
 MASTER_SITES=  ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/
 MASTER_SITES+= http://www.imagemagick.org/download/delegates/
@@ -17,9 +17,14 @@
 GNU_CONFIGURE= yes
 USE_LANGUAGES= c c++
 USE_LIBTOOL=   yes
+USE_TOOLS+=    autoconf
 
 docdir=                 share/doc/${PKGBASE}
 INSTALLATION_DIRS+=${docdir}
+
+pre-configure:
+       cd ${WRKSRC} && autoconf
+
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/flashpix.h \
                ${DESTDIR}${PREFIX}/${docdir}/copyright-notice
diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/distinfo
--- a/graphics/libfpx/distinfo  Sun Jan 19 10:50:21 2020 +0000
+++ b/graphics/libfpx/distinfo  Sun Jan 19 11:07:56 2020 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.2 2017/10/04 17:19:33 nros Exp $
+$NetBSD: distinfo,v 1.3 2020/01/19 11:07:56 nros Exp $
 
-SHA1 (libfpx-1.3.1-9.tar.xz) = d3aba5f74134feb4c3be40c9a864ce28edf1a7f9
-RMD160 (libfpx-1.3.1-9.tar.xz) = 7ea9bff48fa15dc243e17c4f1a4a59c1b45c09dc
-SHA512 (libfpx-1.3.1-9.tar.xz) = 218e7e0cd0512a1620f219802bc694591c90d494940fc7492076dee56c3707e50f5af50eb3dff9d562a5c0431e05ec9e696e6bdd8735b5b26db0cd3f929ad5f8
-Size (libfpx-1.3.1-9.tar.xz) = 1906072 bytes
-SHA1 (patch-fpx_f__fpxvw.cpp) = b2c91920029b66e74154a9f6ccd9dc494df927be
-SHA1 (patch-oless_dir.cxx) = 23218d4dfcf3c57db6234f4ac0c972bf13267290
-SHA1 (patch-oless_docfile.cxx) = 58f45c75a71d3cfcd7946a366d3d4e191fc2f769
+SHA1 (libfpx-1.3.1-10.tar.xz) = 5e456727fabc04c64f63d72a54d6f6cac77871d4
+RMD160 (libfpx-1.3.1-10.tar.xz) = 3ec68b6e88c41bb62aa67cbb44c5574645355a29
+SHA512 (libfpx-1.3.1-10.tar.xz) = b0e7356510fbf436265f6d03236979e68bd1b1483cde006460588387ad3ee97adef4536e827f7ee6ba9d19f3b75cc8b772e025d13cbe69b36ec84c8bd0d470eb
+Size (libfpx-1.3.1-10.tar.xz) = 1907580 bytes
+SHA1 (patch-configure.ac) = 3bbab2e051783ddff951ac2e325e1ea89b77b5db
+SHA1 (patch-fpxlib-config.h.in) = fba6a9b7f136f0acb0510d0ab74dab1696c6ebad
+SHA1 (patch-ole_olecomm.h) = 489b63289c533abd4f192752e0bdab74603d8880
diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libfpx/patches/patch-configure.ac        Sun Jan 19 11:07:56 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-configure.ac,v 1.1 2020/01/19 11:07:56 nros Exp $
+
+* search for endian headers to make tis package build 
+  on more platforms (illumos)
+ 
+--- configure.ac.orig  2020-01-19 10:26:49.799775110 +0000
++++ configure.ac
+@@ -71,6 +71,7 @@ AC_C_INLINE
+ AC_C_BIGENDIAN
+ 
+ AC_CHECK_HEADERS([wchar.h sys/statfs.h sys/statvfs.h sys/time.h])
++AC_CHECK_HEADERS([endian.h sys/endian.h solaris.h])
+ 
+ # <sys/mount.h> depends on <sys/param.h>
+ AC_CHECK_HEADERS([sys/param.h])
diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/patches/patch-fpx_f__fpxvw.cpp
--- a/graphics/libfpx/patches/patch-fpx_f__fpxvw.cpp    Sun Jan 19 10:50:21 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-$NetBSD: patch-fpx_f__fpxvw.cpp,v 1.1 2017/10/04 17:19:33 nros Exp $
-Fix CVE-2017-12921
---- fpx/f_fpxvw.cpp.orig       2017-10-04 10:25:20.000000000 +0000
-+++ fpx/f_fpxvw.cpp
-@@ -775,27 +775,67 @@ Boolean PFileFlashPixView::WriteCompObj(
- // Get property in summary info property set
- Boolean PFileFlashPixView::GetSummaryInfoProperty (DWORD pID, OLEProperty ** res)
- {
--  return summaryInfoPropertySet->GetProperty(pID, res);
-+  Boolean ok = TRUE;
-+
-+  // If absent, there is an error
-+  if (summaryInfoPropertySet == NULL)
-+    ok = FALSE;
-+
-+  // Get the property
-+  if (ok)
-+    ok = summaryInfoPropertySet->GetProperty(pID, res);
-+
-+  return ok;
- }
- 
- // Set property in summary info property set
- Boolean PFileFlashPixView::SetSummaryInfoProperty (DWORD pID, DWORD propType, OLEProperty ** res)
- {
--  return summaryInfoPropertySet->NewProperty(pID, propType, res);
-+  Boolean ok = TRUE;
-+
-+  // If absent, there is an error
-+  if (summaryInfoPropertySet == NULL)
-+    ok = FALSE;
-+
-+  // Get the property
-+  if (ok)
-+    ok = summaryInfoPropertySet->NewProperty(pID, propType, res);
-+
-+  return ok;
- }
- 
- 
- // Get property in global info property set
- Boolean PFileFlashPixView::GetGlobalInfoProperty (DWORD pID, OLEProperty ** res)
- {
--  return globalInfoPropertySet->GetProperty(pID, res);
-+  Boolean ok = TRUE;
-+
-+  // If absent, there is an error
-+  if (globalInfoPropertySet == NULL)
-+    ok = FALSE;
-+
-+  // Get the property
-+  if (ok)
-+    ok = globalInfoPropertySet->GetProperty(pID, res);
-+
-+  return ok;
- }
- 
- 
- // Set property in global info property set
- Boolean PFileFlashPixView::SetGlobalInfoProperty (DWORD pID, DWORD propType, OLEProperty ** res)
- {
--  return globalInfoPropertySet->NewProperty(pID, propType, res);
-+  Boolean ok = TRUE;
-+
-+  // If absent, there is an error
-+  if (globalInfoPropertySet == NULL)
-+    ok = FALSE;
-+
-+  // Get the property
-+  if (ok)
-+    ok = globalInfoPropertySet->NewProperty(pID, propType, res);
-+
-+  return ok;
- }
- 
- 
diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/patches/patch-fpxlib-config.h.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libfpx/patches/patch-fpxlib-config.h.in  Sun Jan 19 11:07:56 2020 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-fpxlib-config.h.in,v 1.1 2020/01/19 11:07:56 nros Exp $
+
+* search for endian headers to make this package build
+  on more platforms (illumos)
+
+--- fpxlib-config.h.in.orig    2020-01-19 10:29:13.655460121 +0000
++++ fpxlib-config.h.in
+@@ -6,12 +6,18 @@
+ /* Define to 1 if you have the <dlfcn.h> header file. */
+ #undef HAVE_DLFCN_H
+ 
++/* Define to 1 if you have the <endian.h> header file. */
++#undef HAVE_ENDIAN_H
++
+ /* Define to 1 if you have the <inttypes.h> header file. */
+ #undef HAVE_INTTYPES_H
+ 
+ /* Define to 1 if you have the <memory.h> header file. */
+ #undef HAVE_MEMORY_H
+ 
++/* Define to 1 if you have the <solaris.h> header file. */
++#undef HAVE_SOLARIS_H
++
+ /* Define to 1 if you have the <stdint.h> header file. */
+ #undef HAVE_STDINT_H
+ 
+@@ -24,6 +30,9 @@
+ /* Define to 1 if you have the <string.h> header file. */
+ #undef HAVE_STRING_H
+ 
++/* Define to 1 if you have the <sys/endian.h> header file. */
++#undef HAVE_SYS_ENDIAN_H
++
+ /* Define to 1 if you have the <sys/mount.h> header file. */
+ #undef HAVE_SYS_MOUNT_H
+ 
diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/patches/patch-ole_olecomm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libfpx/patches/patch-ole_olecomm.h       Sun Jan 19 11:07:56 2020 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-ole_olecomm.h,v 1.1 2020/01/19 11:07:56 nros Exp $
+
+* use autoconf to select endian header to make the package build on more
+  platforms (illumos)
+
+--- ole/olecomm.h.orig 2020-01-19 10:31:16.620919697 +0000
++++ ole/olecomm.h
+@@ -65,9 +65,11 @@
+ 
+ // value to define if the file is to be read/written in Intel mode or not
+ # if defined(_UNIX)
+-#  ifdef __linux__
++#  ifdef HAVE_ENDIAN_H
+ #   include <endian.h>
+-#  elif defined(__sun)
++#  elif defined(HAVE_SYS_ENDIAN_H)
++#   include <sys/endian.h>
++#  elif defined(HAVE_SOLARIS_H)
+ #   include <solaris.h>
+ #  else
+ #   include <machine/endian.h>
diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/patches/patch-oless_dir.cxx
--- a/graphics/libfpx/patches/patch-oless_dir.cxx       Sun Jan 19 10:50:21 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-oless_dir.cxx,v 1.1 2017/10/04 17:19:33 nros Exp $
-possible fix for CVE-2017-12920
---- oless/dir.cxx.orig 2017-10-03 18:36:32.000000000 +0000
-+++ oless/dir.cxx
-@@ -1100,6 +1100,8 @@ SCODE CDirectory::GetDirEntry(
-     DIRINDEX id = sid / _cdeEntries;
- 
-     msfChk(_dv.GetTable(id, dwFlags, &pds));
-+    if (ppde == NULL)
-+        msfErr(Err, ERROR_INVALID_ADDRESS);
- 
-     *ppde = pds->GetEntry((DIROFFSET)(sid % _cdeEntries));
- 
diff -r 806a09242e34 -r f37993cb6d70 graphics/libfpx/patches/patch-oless_docfile.cxx
--- a/graphics/libfpx/patches/patch-oless_docfile.cxx   Sun Jan 19 10:50:21 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-$NetBSD: patch-oless_docfile.cxx,v 1.1 2017/10/04 17:19:33 nros Exp $
-fix CVE-2017-12925
---- oless/docfile.cxx.orig     2017-10-03 18:06:20.000000000 +0000
-+++ oless/docfile.cxx
-@@ -49,6 +49,7 @@ SCODE DfFromLB(ILockBytes *plst,
-     SCODE sc, scConv;
-     CRootExposedDocFile *prpdf;
-     CDFBasis *pdfb=NULL;
-+    bool prpdf_Release_run = false;
- 
-     UNREFERENCED_PARM(pcid);
-     olDebugOut((DEB_ITRACE, "In  DfFromLB(%p, %X, %lX, %p, %p, %p)\n",
-@@ -71,9 +72,12 @@ SCODE DfFromLB(ILockBytes *plst,
-     return scConv;
- 
- EH_ppcInit:
--    prpdf->Release();
-+    prpdf->Release(); //this also deletes pdfb
-+    prpdf_Release_run = true;
- EH_pdfb:
--    delete pdfb;
-+    if (!prpdf_Release_run) {
-+        delete pdfb;
-+    } 
- EH_Err:
-     return sc;
- }



Home | Main Index | Thread Index | Old Index