Index: head/textproc/sdcv/Makefile =================================================================== --- head/textproc/sdcv/Makefile (revision 445276) +++ head/textproc/sdcv/Makefile (revision 445277) @@ -1,38 +1,39 @@ # Created by: chinsan # $FreeBSD$ PORTNAME= sdcv PORTVERSION= 0.5.1 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= textproc MAINTAINER= citrin@citrin.ru COMMENT= Text-based utility for work with dictionaries in StarDict's format #' LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE USES= cmake:outsource pkgconfig readline USE_GNOME= glib20 SUB_FILES= pkg-message USE_GITHUB= yes GH_ACCOUNT= Dushistov OPTIONS_DEFINE= NLS OPTIONS_SUB= yes NLS_USES= gettext NLS_CMAKE_OFF= -DENABLE_NLS:BOOL=OFF post-patch: .for i in doc/sdcv.1 src/sdcv.cpp @${REINPLACE_CMD} -e \ 's|/usr/share|${PREFIX}/share|' ${WRKSRC}/${i} .endfor post-build-NLS-on: cd ${BUILD_WRKSRC} && ${MAKE_CMD} lang .include Index: head/textproc/sdcv/files/patch-bug19 =================================================================== --- head/textproc/sdcv/files/patch-bug19 (nonexistent) +++ head/textproc/sdcv/files/patch-bug19 (revision 445277) @@ -0,0 +1,60 @@ +--- src/sdcv.cpp.orig ++++ src/sdcv.cpp +@@ -157,7 +157,7 @@ int main(int argc, char *argv[]) try { + }); + + std::list order_list; +- if (use_dict_list) { ++ if (use_dict_list != nullptr) { + for (auto &&x : bookname_to_ifo) { + gchar **p = get_impl(use_dict_list); + for (; *p != nullptr; ++p) +--- src/stardict_lib.cpp.orig ++++ src/stardict_lib.cpp +@@ -89,7 +89,6 @@ bool DictInfo::load_from_ifo_file(const std::string& ifofilename, + if (!g_str_has_prefix( + g_str_has_prefix(get_impl(buffer), (const gchar *)(utf8_bom)) ? get_impl(buffer) + 3 : get_impl(buffer), + magic_data)) { +- g_free(buffer); + return false; + } + +--- src/utils.hpp.orig ++++ src/utils.hpp +@@ -27,6 +27,14 @@ class ResourceWrapper { + } + } + ++ friend inline bool operator==(const ResourceWrapper& lhs, std::nullptr_t) noexcept { ++ return !lhs.p_; ++ } ++ ++ friend inline bool operator!=(const ResourceWrapper& lhs, std::nullptr_t) noexcept { ++ return !!lhs.p_; ++ } ++ + friend inline T *get_impl(const ResourceWrapper& rw) { + return rw.p_; + } +@@ -39,21 +47,6 @@ class ResourceWrapper { + T *p_; + + void free_resource() { if (p_) unref_res(p_); } +- +-// Helper for enabling 'if (sp)' +- struct Tester { +- Tester() {} +- private: +- void operator delete(void*); +- }; +-public: +- // enable 'if (sp)' +- operator Tester*() const { +- if (!*this) +- return 0; +- static Tester t; +- return &t; +- } + }; + + namespace glib { Property changes on: head/textproc/sdcv/files/patch-bug19 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property