From ca023713a3c84888a67cf758c0ce2d4502ce1935 Mon Sep 17 00:00:00 2001 From: makc Date: Wed, 2 Oct 2013 20:50:35 +0000 Subject: - Update patches to fix build on 8.x (with old zlib) and 10 (unistd.h) - gnomehack -> pathfix - Convert LIB_DEPENDS to new syntax - Support staging --- textproc/stardict3/Makefile | 13 +++---------- .../stardict3/files/patch-lib__src__libcommon.cpp | 21 ++++++++++----------- .../stardict3/files/patch-lib__src__libcommon.h | 13 ++++++++----- textproc/stardict3/pkg-plist | 1 + 4 files changed, 22 insertions(+), 26 deletions(-) (limited to 'textproc') diff --git a/textproc/stardict3/Makefile b/textproc/stardict3/Makefile index bde8a616b496..81499ba68535 100644 --- a/textproc/stardict3/Makefile +++ b/textproc/stardict3/Makefile @@ -10,8 +10,8 @@ DIST_SUBDIR= stardict MAINTAINER= makc@FreeBSD.org COMMENT= Dictionary lookup program written in Gtk2 -LIB_DEPENDS= sigc-2.0.0:${PORTSDIR}/devel/libsigc++20 \ - enchant.1:${PORTSDIR}/textproc/enchant +LIB_DEPENDS= libsigc-2.0.so:${PORTSDIR}/devel/libsigc++20 \ + libenchant.so:${PORTSDIR}/textproc/enchant RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils GNU_CONFIGURE= yes @@ -21,8 +21,7 @@ CONFIGURE_ARGS= --disable-festival \ --disable-espeak \ --disable-updateinfo USE_BZIP2= yes -USE_GNOME= gnomehack -USES= gettext gmake pkgconfig +USES= gettext gmake pathfix pkgconfig CONFIGURE_WRKSRC= ${WRKSRC}/dict BUILD_WRKSRC= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC= ${CONFIGURE_WRKSRC} @@ -34,7 +33,6 @@ OPTIONS_DEFAULT= ${OPTIONS_DEFINE} CONFLICTS_INSTALL= stardict-2.[0-9]* -NO_STAGE= yes .include .if ${PORT_OPTIONS:MGNOME} @@ -50,8 +48,6 @@ PLIST_SUB= GNOME="@comment " MAKE_ARGS+= AUTOMAKE="${TRUE}" ACLOCAL="${TRUE}" .endif -MAN1= stardict.1 - post-patch: .if !${PORT_OPTIONS:MGNOME} ${REINPLACE_CMD} -e '/DATADIRNAME=lib/s,lib,share,' ${WRKSRC}/dict/m4/intltool.m4 @@ -67,7 +63,4 @@ pre-configure: ${SETENV} ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} && \ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} -post-install: - @${CAT} ${PKGMESSAGE} - .include diff --git a/textproc/stardict3/files/patch-lib__src__libcommon.cpp b/textproc/stardict3/files/patch-lib__src__libcommon.cpp index 18cc56dcbcd3..98bbb01aafd4 100644 --- a/textproc/stardict3/files/patch-lib__src__libcommon.cpp +++ b/textproc/stardict3/files/patch-lib__src__libcommon.cpp @@ -1,11 +1,10 @@ ---- ./lib/src/libcommon.cpp.orig 2011-07-08 12:35:48.000000000 +0000 -+++ ./lib/src/libcommon.cpp 2012-12-11 07:48:00.601016758 +0000 -@@ -599,7 +599,7 @@ - - int unpack_zlib(const char* arch_file_name, const char* out_file_name) - { -- zip::gzFile in(gzopen(arch_file_name, "rb")); -+ zip::gzFileWrapper in(gzopen(arch_file_name, "rb")); - if(!in) { - g_critical("Unable to open archive file: %s.", arch_file_name); - return EXIT_FAILURE; +--- ./lib/src/libcommon.cpp.orig 2012-01-13 06:21:34.000000000 +0000 ++++ ./lib/src/libcommon.cpp 2013-10-02 15:54:43.701934693 +0000 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include "libcommon.h" + #ifdef _WIN32 + # include diff --git a/textproc/stardict3/files/patch-lib__src__libcommon.h b/textproc/stardict3/files/patch-lib__src__libcommon.h index 44667b4e0c4f..8f263bfc942c 100644 --- a/textproc/stardict3/files/patch-lib__src__libcommon.h +++ b/textproc/stardict3/files/patch-lib__src__libcommon.h @@ -1,11 +1,14 @@ ---- ./lib/src/libcommon.h.orig 2011-07-08 12:32:09.000000000 +0000 -+++ ./lib/src/libcommon.h 2012-12-11 07:48:00.604014902 +0000 -@@ -188,7 +188,7 @@ +--- ./lib/src/libcommon.h.orig 2012-01-13 06:21:34.000000000 +0000 ++++ ./lib/src/libcommon.h 2013-10-02 15:13:21.563936478 +0000 +@@ -188,7 +188,11 @@ } namespace zip { --typedef ResourceWrapper gzFile; -+typedef ResourceWrapper gzFileWrapper; ++#if ZLIB_VERNUM > 0x1250 ++typedef ResourceWrapper gzFile; ++#else + typedef ResourceWrapper gzFile; ++#endif } /* Create a new temporary file. Return file name in file name encoding. diff --git a/textproc/stardict3/pkg-plist b/textproc/stardict3/pkg-plist index 653b9ed2c2c4..68478555a2ae 100644 --- a/textproc/stardict3/pkg-plist +++ b/textproc/stardict3/pkg-plist @@ -20,6 +20,7 @@ lib/stardict/plugins/stardict_wordnet_parsedata.so lib/stardict/plugins/stardict_xdxf_parsedata.la lib/stardict/plugins/stardict_xdxf_parsedata.so %%GNOME%%libdata/bonobo/servers/GNOME_Stardict.server +man/man1/stardict.1.gz share/applications/stardict.desktop %%GNOME%%share/gnome/help/stardict/C/figures/acrobat_toolbar.png %%GNOME%%share/gnome/help/stardict/C/figures/portable_apps_menu.png -- cgit