Index: head/textproc/sdcv/Makefile =================================================================== --- head/textproc/sdcv/Makefile (revision 444769) +++ head/textproc/sdcv/Makefile (revision 444770) @@ -1,38 +1,36 @@ # Created by: chinsan # $FreeBSD$ PORTNAME= sdcv -PORTVERSION= 0.4.2 -PORTREVISION= 4 +DISTVERSION= 0.5.0-beta2 +DISTVERSIONSUFFIX= -Source CATEGORIES= textproc -MASTER_SITES= SF +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= citrin@citrin.ru COMMENT= Text-based utility for work with dictionaries in StarDict's format LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -GNU_CONFIGURE= yes -USES= autoreconf gettext pkgconfig readline tar:bzip2 +USES= cmake:outsource pkgconfig readline tar:bzip2 USE_GNOME= glib20 SUB_FILES= pkg-message -CPPFLAGS+= -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib +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 - @${REINPLACE_CMD} -e \ - 's|@mandir@/uk|@mandir@|' ${WRKSRC}/doc/uk/Makefile.am - @${REINPLACE_CMD} -e \ - 's|getopt1.c getopt.h||' ${WRKSRC}/src/Makefile.am - @${RM} ${WRKSRC}/src/getopt.h - @${REINPLACE_CMD} '/AM_GNU_GETTEXT_VERSION/s/0\.14\.1/0.19.1/' \ - ${WRKSRC}/configure.ac + +post-build-NLS-on: + cd ${BUILD_WRKSRC} && ${MAKE_CMD} lang .include Index: head/textproc/sdcv/distinfo =================================================================== --- head/textproc/sdcv/distinfo (revision 444769) +++ head/textproc/sdcv/distinfo (revision 444770) @@ -1,2 +1,3 @@ -SHA256 (sdcv-0.4.2.tar.bz2) = a164f079e93986814ea2d39f3a49cf9d1b71b01aad908254457fe3d0ded9deb2 -SIZE (sdcv-0.4.2.tar.bz2) = 181384 +TIMESTAMP = 1488927916 +SHA256 (sdcv-0.5.0-beta2-Source.tar.bz2) = 386cfc96285a653c697f8baeab676cb3f1645cea029464d194872d0bbae14ffb +SIZE (sdcv-0.5.0-beta2-Source.tar.bz2) = 51508 Index: head/textproc/sdcv/files/patch-src__readline.cpp =================================================================== --- head/textproc/sdcv/files/patch-src__readline.cpp (revision 444769) +++ head/textproc/sdcv/files/patch-src__readline.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- src/readline.cpp.orig -+++ src/readline.cpp -@@ -23,6 +23,7 @@ - #endif - - #include -+#include - #ifdef WITH_READLINE - # include - # include Property changes on: head/textproc/sdcv/files/patch-src__readline.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/sdcv/files/patch-src__lib__lib.cpp =================================================================== --- head/textproc/sdcv/files/patch-src__lib__lib.cpp (revision 444769) +++ head/textproc/sdcv/files/patch-src__lib__lib.cpp (nonexistent) @@ -1,27 +0,0 @@ ---- src/lib/lib.cpp.orig -+++ src/lib/lib.cpp -@@ -496,9 +496,13 @@ - entries[i].keystr=p; - len=strlen(p); - p+=len+1; -- entries[i].off=g_ntohl(*reinterpret_cast(p)); -+ /* -+ * Can not use typecasting here, because *data does not have -+ * to be alligned and unalligned access fails on some architectures. -+ */ -+ entries[i].off=((unsigned char)p[0] << 24) | ((unsigned char)p[1] << 16) | ((unsigned char)p[2] << 8) | (unsigned char)p[3]; - p+=sizeof(guint32); -- entries[i].size=g_ntohl(*reinterpret_cast(p)); -+ entries[i].size=((unsigned char)p[0] << 24) | ((unsigned char)p[1] << 16) | ((unsigned char)p[2] << 8) | (unsigned char)p[3]; - p+=sizeof(guint32); - } - } -@@ -513,7 +517,7 @@ - { - fseek(idxfile, wordoffset[page_idx], SEEK_SET); - guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx]; -- fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. -+ fread(wordentry_buf, std::min(sizeof(wordentry_buf), (size_t)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. - return wordentry_buf; - } - Property changes on: head/textproc/sdcv/files/patch-src__lib__lib.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/sdcv/files/patch-src__libwrapper.cpp =================================================================== --- head/textproc/sdcv/files/patch-src__libwrapper.cpp (revision 444769) +++ head/textproc/sdcv/files/patch-src__libwrapper.cpp (nonexistent) @@ -1,50 +0,0 @@ ---- src/libwrapper.cpp.orig -+++ src/libwrapper.cpp -@@ -24,6 +24,7 @@ - - #include - #include -+#include - - #include "utils.hpp" - -@@ -117,7 +118,6 @@ - switch (*p++) { - case 'm': - case 'l': //need more work... -- case 'g': - sec_size = strlen(p); - if (sec_size) { - res+="\n"; -@@ -127,6 +127,7 @@ - } - sec_size++; - break; -+ case 'g': - case 'x': - sec_size = strlen(p); - if (sec_size) { -@@ -208,6 +209,15 @@ - - void Library::LookupData(const string &str, TSearchResultList& res_list) - { -+#if defined(_LIBCPP_VERSION) -+ std::vector > drl(ndicts()); -+ if (!Libs::LookupData(str.c_str(), &drl[0])) -+ return; -+ for (int idict=0; idict drl[ndicts()]; - if (!Libs::LookupData(str.c_str(), drl)) - return; -@@ -215,6 +225,7 @@ - for (std::vector::size_type j=0; j -+#include - #include - #include - Property changes on: head/textproc/sdcv/files/patch-src__utils.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/sdcv/files/patch-src__sdcv.cpp =================================================================== --- head/textproc/sdcv/files/patch-src__sdcv.cpp (revision 444769) +++ head/textproc/sdcv/files/patch-src__sdcv.cpp (nonexistent) @@ -1,15 +0,0 @@ ---- src/sdcv.cpp.orig -+++ src/sdcv.cpp -@@ -161,7 +161,11 @@ - - strlist_t dicts_dir_list; - -- dicts_dir_list.push_back(std::string(g_get_home_dir())+G_DIR_SEPARATOR+ -+ const char *homedir = g_getenv ("HOME"); -+ if (!homedir) -+ homedir = g_get_home_dir (); -+ -+ dicts_dir_list.push_back(std::string(homedir)+G_DIR_SEPARATOR+ - ".stardict"+G_DIR_SEPARATOR+"dic"); - dicts_dir_list.push_back(data_dir); - Property changes on: head/textproc/sdcv/files/patch-src__sdcv.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/sdcv/files/patch-CMakeLists.txt =================================================================== --- head/textproc/sdcv/files/patch-CMakeLists.txt (nonexistent) +++ head/textproc/sdcv/files/patch-CMakeLists.txt (revision 444770) @@ -0,0 +1,26 @@ +--- CMakeLists.txt.orig 2013-07-07 14:55:00 UTC ++++ CMakeLists.txt +@@ -110,6 +110,10 @@ target_link_libraries(sdcv + ${ZLIB_LIBRARIES} + ${READLINE_LIBRARY} + ) ++set_target_properties(sdcv ++ PROPERTIES ++ LINK_FLAGS ${GLIB2_LDFLAGS} ++) + if (ENABLE_NLS) + set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "locale") + endif () +@@ -117,8 +121,10 @@ endif () + include(CPack) + + INSTALL(TARGETS sdcv DESTINATION "bin") +-INSTALL(FILES doc/sdcv.1 DESTINATION "share/man/man1") +-INSTALL(FILES doc/uk/sdcv.1 DESTINATION "share/man/uk/man1") ++ ++include(GNUInstallDirs) ++INSTALL(FILES doc/sdcv.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") ++INSTALL(FILES doc/uk/sdcv.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/uk.UTF-8/man1") + + if (ENABLE_NLS) + INSTALL(DIRECTORY "${gettext_outDir}" DESTINATION "share") Property changes on: head/textproc/sdcv/files/patch-CMakeLists.txt ___________________________________________________________________ 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 Index: head/textproc/sdcv/files/patch-src__lib__mapfile.hpp =================================================================== --- head/textproc/sdcv/files/patch-src__lib__mapfile.hpp (revision 444769) +++ head/textproc/sdcv/files/patch-src__lib__mapfile.hpp (revision 444770) @@ -1,12 +1,12 @@ ---- src/lib/mapfile.hpp.orig +--- src/lib/mapfile.hpp.orig 2013-07-06 22:28:17 UTC +++ src/lib/mapfile.hpp -@@ -5,6 +5,9 @@ +@@ -4,6 +4,9 @@ # include "config.h" #endif +#include +#include + #ifdef HAVE_MMAP # include # include Index: head/textproc/sdcv/files/patch-src_libwrapper.cpp =================================================================== --- head/textproc/sdcv/files/patch-src_libwrapper.cpp (nonexistent) +++ head/textproc/sdcv/files/patch-src_libwrapper.cpp (revision 444770) @@ -0,0 +1,11 @@ +--- src/libwrapper.cpp.orig 2013-07-07 14:34:44 UTC ++++ src/libwrapper.cpp +@@ -285,7 +285,7 @@ namespace { + sdcv_pager& operator=(const sdcv_pager&) = delete; + ~sdcv_pager() { + if (output != stdout) +- fclose(output); ++ pclose(output); + } + FILE *get_stream() { return output; } + private: Property changes on: head/textproc/sdcv/files/patch-src_libwrapper.cpp ___________________________________________________________________ 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 Index: head/textproc/sdcv/files/pkg-message.in =================================================================== --- head/textproc/sdcv/files/pkg-message.in (revision 444769) +++ head/textproc/sdcv/files/pkg-message.in (revision 444770) @@ -1,14 +1,14 @@ ************************************************************************** sdcv is now installed. you have to fetch the dictionaries to make it work correctly. 1. Make directory for dictionaries files : - # mkdir -p %%PREFIX%%/share/stardict/dict + # mkdir -p %%PREFIX%%/share/stardict/dic 2. Please put your dictionary file at : - %%PREFIX%%/share/stardict/dict/ + %%PREFIX%%/share/stardict/dic/ ************************************************************************** Index: head/textproc/sdcv/pkg-descr =================================================================== --- head/textproc/sdcv/pkg-descr (revision 444769) +++ head/textproc/sdcv/pkg-descr (revision 444770) @@ -1,8 +1,8 @@ SDCV(StarDict under Console Version) is simple, cross-platform text-based utility for work with dictionaries in StarDict's format. The word from "list of words" may be string with leading '/' for using Fuzzy search algorithm, string may contain '?' and '*' for using regexp search. It work in interactive and not interactive mode. -WWW: http://sdcv.sourceforge.net/ +WWW: http://dushistov.github.io/sdcv/ Index: head/textproc/sdcv/pkg-plist =================================================================== --- head/textproc/sdcv/pkg-plist (revision 444769) +++ head/textproc/sdcv/pkg-plist (revision 444770) @@ -1,7 +1,10 @@ bin/sdcv man/man1/sdcv.1.gz -share/locale/ru/LC_MESSAGES/sdcv.mo -share/locale/sk/LC_MESSAGES/sdcv.mo -share/locale/uk/LC_MESSAGES/sdcv.mo -share/locale/zh_CN/LC_MESSAGES/sdcv.mo -share/locale/zh_TW/LC_MESSAGES/sdcv.mo +man/uk.UTF-8/man1/sdcv.1.gz +%%NLS%%share/locale/cs/LC_MESSAGES/sdcv.mo +%%NLS%%share/locale/fr/LC_MESSAGES/sdcv.mo +%%NLS%%share/locale/ru/LC_MESSAGES/sdcv.mo +%%NLS%%share/locale/sk/LC_MESSAGES/sdcv.mo +%%NLS%%share/locale/uk/LC_MESSAGES/sdcv.mo +%%NLS%%share/locale/zh_CN/LC_MESSAGES/sdcv.mo +%%NLS%%share/locale/zh_TW/LC_MESSAGES/sdcv.mo