From d7e5a263b81891ce5e678727c258689415b8350e Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Tue, 14 Apr 2015 04:06:11 +0000 Subject: [PATCH] - Update to version 7.1.7; rephrase COMMENT text; fix Makefile header - Request Lua via USES=lua:52 instead of (ab)using LIB_DEPENDS - Add missing dependency on libjpeg (graphics/jpeg) - Ipe uses Pdflatex for producing Postscript/PDF files, so make USE_LATEX more specific (latex -> pdftex); unfortunately, it doesn't save us from having to download huge (~1.6G) texlive-20140525-texmf.tar.xz distfile; it would be nice to make LaTeX an optional dependency PR: 199238 --- graphics/ipe/Makefile | 16 ++-- graphics/ipe/distinfo | 4 +- .../ipe/files/patch-ipelib__ipebitmap.cpp | 19 ++-- .../ipe/files/patch-ipelib_ipeplatform.cpp | 88 +++++++++++++++++++ graphics/ipe/pkg-plist | 5 +- 5 files changed, 108 insertions(+), 24 deletions(-) create mode 100644 graphics/ipe/files/patch-ipelib_ipeplatform.cpp diff --git a/graphics/ipe/Makefile b/graphics/ipe/Makefile index baf42542a77a..597505136d82 100644 --- a/graphics/ipe/Makefile +++ b/graphics/ipe/Makefile @@ -1,27 +1,27 @@ -# Created by: bremner@unb.ca +# Created by: David Bremner # $FreeBSD$ PORTNAME= ipe -PORTVERSION= 7.1.6 +PORTVERSION= 7.1.7 DISTVERSIONSUFFIX= -src CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}${PORTVERSION:R:R}/${PORTNAME}/${PORTVERSION:R} MAINTAINER= ports@FreeBSD.org -COMMENT= Extensible vector graphics editor with Latex text support +COMMENT= Extensible vector graphics editor with LaTeX support LICENSE= GPLv3 # (or later) -LIB_DEPENDS= liblua-5.2.so:${PORTSDIR}/lang/lua52 +LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src -USES= dos2unix gmake iconv pkgconfig +USES= dos2unix gmake iconv lua:52 pkgconfig DOS2UNIX_FILES= ipelib/Makefile USE_GNOME= cairo USE_QT4= gui moc_build qmake_build rcc_build uic_build -USE_TEX= latex +USE_TEX= pdftex MAKE_ENV= DL_LIBS="" \ DLL_CFLAGS="-fPIC" \ ICONV_CFLAGS="-I${ICONV_PREFIX}/include" \ @@ -37,8 +37,8 @@ MAKE_ENV= DL_LIBS="" \ IPEPREFIX="${PREFIX}" \ JPEG_CFLAGS="-I${LOCALBASE}/include" \ JPEG_LIBS="-L${LOCALBASE}/lib -ljpeg" \ - LUA_CFLAGS="-I${LOCALBASE}/include/lua52" \ - LUA_LIBS="-L${LOCALBASE}/lib -llua-5.2" \ + LUA_CFLAGS="-I${LUA_INCDIR}" \ + LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}" \ MOC="${MOC}" USE_LDCONFIG= yes diff --git a/graphics/ipe/distinfo b/graphics/ipe/distinfo index af926c6517a6..ed683d162600 100644 --- a/graphics/ipe/distinfo +++ b/graphics/ipe/distinfo @@ -1,2 +1,2 @@ -SHA256 (ipe-7.1.6-src.tar.gz) = d13918418591b11590ca4fe48a97e29ea5d0274540d3d83dec400d8f8f155d79 -SIZE (ipe-7.1.6-src.tar.gz) = 1608612 +SHA256 (ipe-7.1.7-src.tar.gz) = ec670cd7f0fa521271fc54bf9b663570d82280bdbe405be6de59535fec7c00d2 +SIZE (ipe-7.1.7-src.tar.gz) = 1758157 diff --git a/graphics/ipe/files/patch-ipelib__ipebitmap.cpp b/graphics/ipe/files/patch-ipelib__ipebitmap.cpp index 58c77fe0e6f3..2907cec3c4d6 100644 --- a/graphics/ipe/files/patch-ipelib__ipebitmap.cpp +++ b/graphics/ipe/files/patch-ipelib__ipebitmap.cpp @@ -1,23 +1,16 @@ --- ipelib/ipebitmap.cpp.orig +++ ipelib/ipebitmap.cpp -@@ -32,10 +32,16 @@ +@@ -32,7 +32,9 @@ #include "ipeutils.h" #include +#if 0 #include +#endif + #include using namespace ipe; - -+#if 1 -+extern bool dctDecode(Buffer dctData, Buffer pixelData); -+#endif -+ - // -------------------------------------------------------------------- - - /*! \class ipe::Bitmap::MRenderData -@@ -331,6 +337,7 @@ +@@ -332,6 +334,7 @@ // -------------------------------------------------------------------- @@ -25,15 +18,17 @@ bool dctDecode(Buffer dctData, Buffer pixelData, int components) { tjhandle handle = tjInitDecompress(); -@@ -363,6 +370,7 @@ +@@ -364,6 +367,9 @@ tjDestroy(handle); return true; } ++#else ++bool dctDecode(Buffer dctData, Buffer pixelData); +#endif //! Convert bitmap data to a height x width pixel array in rgb format. /*! Returns empty buffer if it cannot decode the bitmap information. -@@ -387,7 +395,11 @@ +@@ -388,7 +394,11 @@ return Buffer(); } else if (filter() == EDCTDecode) { pixels = Buffer(width() * height() * components()); diff --git a/graphics/ipe/files/patch-ipelib_ipeplatform.cpp b/graphics/ipe/files/patch-ipelib_ipeplatform.cpp new file mode 100644 index 000000000000..6b8cf457ec85 --- /dev/null +++ b/graphics/ipe/files/patch-ipelib_ipeplatform.cpp @@ -0,0 +1,88 @@ +--- ipelib/ipeplatform.cpp.orig 2015-02-23 13:02:13 UTC ++++ ipelib/ipeplatform.cpp +@@ -37,7 +37,6 @@ + #include + #else + #include +-#include + #endif + #include + #include +@@ -46,6 +45,17 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++# if __FreeBSD_version < 900045 ++# define NO_XLOCALE ++# endif ++#endif ++ ++#ifndef NO_XLOCALE ++#include ++#endif ++ + using namespace ipe; + + // -------------------------------------------------------------------- +@@ -70,12 +80,14 @@ int Platform::libVersion() + static bool initialized = false; + static bool showDebug = false; + static Platform::DebugHandler debugHandler = 0; ++#ifndef NO_XLOCALE + #ifdef WIN32 + // not yet available in MINGW RT library + // _locale_t ipeLocale; + #else + locale_t ipeLocale; + #endif ++#endif + + #ifdef WIN32 + // Counterpart to Platform::wideToUtf8 +@@ -100,11 +112,13 @@ static void debugHandlerImpl(const char + + static void cleanup_repository() + { ++#ifndef NO_XLOCALE + #ifdef WIN32 + // _free_locale(ipeLocale); + #else + freelocale(ipeLocale); + #endif ++#endif + Repository::cleanup(); + } + +@@ -127,11 +141,13 @@ void Platform::initLib(int version) + if (getenv("IPEDEBUG") != 0) + showDebug = true; + debugHandler = debugHandlerImpl; ++#ifndef NO_XLOCALE + #ifdef WIN32 + // ipeLocale = ::_create_locale(LC_NUMERIC, "C"); + #else + ipeLocale = newlocale(LC_NUMERIC_MASK, "C", NULL); + #endif ++#endif + atexit(cleanup_repository); + #ifndef WIN32 + if (version == IPELIB_VERSION) +@@ -462,12 +478,16 @@ String Platform::wideToUtf8(const wchar_ + + double Platform::toDouble(String s) + { ++#ifdef NO_XLOCALE ++ return strtod(s.z(), 0); ++#else + #ifdef WIN32 + return strtod(s.z(), 0); + // return _strtod_l(s.z(), 0, ipeLocale); + #else + return strtod_l(s.z(), 0, ipeLocale); + #endif ++#endif + } + + void ipeAssertionFailed(const char *file, int line, const char *assertion) diff --git a/graphics/ipe/pkg-plist b/graphics/ipe/pkg-plist index 70f2b9c2d6c5..85604328833e 100644 --- a/graphics/ipe/pkg-plist +++ b/graphics/ipe/pkg-plist @@ -36,13 +36,12 @@ include/ipesnap.h include/ipestyle.h include/ipetext.h include/ipetool.h +include/ipetoolbase.h include/ipeutils.h include/ipexml.h lib/ipe/%%VERSION%%/ipelets/align.lua lib/ipe/%%VERSION%%/ipelets/euclid.lua lib/ipe/%%VERSION%%/ipelets/goodies.lua -lib/ipe/%%VERSION%%/ipelets/image.lua -lib/ipe/%%VERSION%%/ipelets/image.so lib/ipe/%%VERSION%%/ipelets/move.lua lib/ipe/%%VERSION%%/ipelets/search-replace.lua lib/ipe/%%VERSION%%/ipelets/symbols.lua @@ -101,9 +100,11 @@ man/man1/ipetoipe.1.gz %%DATADIR%%/%%VERSION%%/icons/snapangle.png %%DATADIR%%/%%VERSION%%/icons/snapauto.png %%DATADIR%%/%%VERSION%%/icons/snapbd.png +%%DATADIR%%/%%VERSION%%/icons/snapctl.png %%DATADIR%%/%%VERSION%%/icons/snapgrid.png %%DATADIR%%/%%VERSION%%/icons/snapint.png %%DATADIR%%/%%VERSION%%/icons/snapvtx.png +%%DATADIR%%/%%VERSION%%/icons/stop.png %%DATADIR%%/%%VERSION%%/icons/undo.png %%DATADIR%%/%%VERSION%%/icons/zoom_in.png %%DATADIR%%/%%VERSION%%/icons/zoom_out.png