aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/sdcv
diff options
context:
space:
mode:
authoreugen <eugen@FreeBSD.org>2017-07-01 00:42:47 +0800
committereugen <eugen@FreeBSD.org>2017-07-01 00:42:47 +0800
commit55f4971b7f50f048ef36191672809d98b9f09cff (patch)
treee782bf5ed85e9ebd0f2c48eebb805b9dc501197e /textproc/sdcv
parent225db92c6e2fc0c8b6d28a8799bc63037bac0eb1 (diff)
downloadfreebsd-ports-gnome-55f4971b7f50f048ef36191672809d98b9f09cff.tar.gz
freebsd-ports-gnome-55f4971b7f50f048ef36191672809d98b9f09cff.tar.zst
freebsd-ports-gnome-55f4971b7f50f048ef36191672809d98b9f09cff.zip
Update textproc/sdcv to 0.5.0-beta2:
- remove some patches that were integrated upstream and add new; - pass maintaintership to the submitter. PR: 217671 Submitted by: Anton Yuzhaninov <citrin@citrin.ru> Approved by: vsevolod (mentor)
Diffstat (limited to 'textproc/sdcv')
-rw-r--r--textproc/sdcv/Makefile28
-rw-r--r--textproc/sdcv/distinfo5
-rw-r--r--textproc/sdcv/files/patch-CMakeLists.txt26
-rw-r--r--textproc/sdcv/files/patch-src__lib__lib.cpp27
-rw-r--r--textproc/sdcv/files/patch-src__lib__mapfile.hpp4
-rw-r--r--textproc/sdcv/files/patch-src__libwrapper.cpp50
-rw-r--r--textproc/sdcv/files/patch-src__readline.cpp10
-rw-r--r--textproc/sdcv/files/patch-src__sdcv.cpp15
-rw-r--r--textproc/sdcv/files/patch-src__utils.cpp11
-rw-r--r--textproc/sdcv/files/patch-src_libwrapper.cpp11
-rw-r--r--textproc/sdcv/files/pkg-message.in4
-rw-r--r--textproc/sdcv/pkg-descr2
-rw-r--r--textproc/sdcv/pkg-plist13
13 files changed, 66 insertions, 140 deletions
diff --git a/textproc/sdcv/Makefile b/textproc/sdcv/Makefile
index 2b8c91e4b19c..413ad23234e3 100644
--- a/textproc/sdcv/Makefile
+++ b/textproc/sdcv/Makefile
@@ -2,37 +2,35 @@
# $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 <bsd.port.mk>
diff --git a/textproc/sdcv/distinfo b/textproc/sdcv/distinfo
index 39d5b02616ca..a3bf1ba31947 100644
--- a/textproc/sdcv/distinfo
+++ b/textproc/sdcv/distinfo
@@ -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
diff --git a/textproc/sdcv/files/patch-CMakeLists.txt b/textproc/sdcv/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..3e56c4845d2a
--- /dev/null
+++ b/textproc/sdcv/files/patch-CMakeLists.txt
@@ -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")
diff --git a/textproc/sdcv/files/patch-src__lib__lib.cpp b/textproc/sdcv/files/patch-src__lib__lib.cpp
deleted file mode 100644
index 06d46e87249c..000000000000
--- a/textproc/sdcv/files/patch-src__lib__lib.cpp
+++ /dev/null
@@ -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<guint32 *>(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<guint32 *>(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;
- }
-
diff --git a/textproc/sdcv/files/patch-src__lib__mapfile.hpp b/textproc/sdcv/files/patch-src__lib__mapfile.hpp
index 0637a27997b7..20fa57921079 100644
--- a/textproc/sdcv/files/patch-src__lib__mapfile.hpp
+++ b/textproc/sdcv/files/patch-src__lib__mapfile.hpp
@@ -1,6 +1,6 @@
---- 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
diff --git a/textproc/sdcv/files/patch-src__libwrapper.cpp b/textproc/sdcv/files/patch-src__libwrapper.cpp
deleted file mode 100644
index 55fb7c0cf432..000000000000
--- a/textproc/sdcv/files/patch-src__libwrapper.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
---- src/libwrapper.cpp.orig
-+++ src/libwrapper.cpp
-@@ -24,6 +24,7 @@
-
- #include <glib/gi18n.h>
- #include <map>
-+#include <cstring>
-
- #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<std::vector<gchar *> > drl(ndicts());
-+ if (!Libs::LookupData(str.c_str(), &drl[0]))
-+ return;
-+ for (int idict=0; idict<ndicts(); ++idict)
-+ for (gchar *res : drl[idict]) {
-+ SimpleLookup(res, res_list);
-+ g_free(res);
-+#else
- std::vector<gchar *> drl[ndicts()];
- if (!Libs::LookupData(str.c_str(), drl))
- return;
-@@ -215,6 +225,7 @@
- for (std::vector<gchar *>::size_type j=0; j<drl[idict].size(); ++j) {
- SimpleLookup(drl[idict][j], res_list);
- g_free(drl[idict][j]);
-+#endif
- }
- }
-
diff --git a/textproc/sdcv/files/patch-src__readline.cpp b/textproc/sdcv/files/patch-src__readline.cpp
deleted file mode 100644
index 1e6641c923f7..000000000000
--- a/textproc/sdcv/files/patch-src__readline.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/readline.cpp.orig
-+++ src/readline.cpp
-@@ -23,6 +23,7 @@
- #endif
-
- #include <cstdio>
-+#include <cstdlib>
- #ifdef WITH_READLINE
- # include <readline/readline.h>
- # include <readline/history.h>
diff --git a/textproc/sdcv/files/patch-src__sdcv.cpp b/textproc/sdcv/files/patch-src__sdcv.cpp
deleted file mode 100644
index 4067984cc1eb..000000000000
--- a/textproc/sdcv/files/patch-src__sdcv.cpp
+++ /dev/null
@@ -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);
-
diff --git a/textproc/sdcv/files/patch-src__utils.cpp b/textproc/sdcv/files/patch-src__utils.cpp
deleted file mode 100644
index 3d2c61882d1c..000000000000
--- a/textproc/sdcv/files/patch-src__utils.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/utils.cpp.orig
-+++ src/utils.cpp
-@@ -22,6 +22,8 @@
- # include "config.h"
- #endif
-
-+#include <cstdio>
-+#include <cstdlib>
- #include <glib.h>
- #include <glib/gi18n.h>
-
diff --git a/textproc/sdcv/files/patch-src_libwrapper.cpp b/textproc/sdcv/files/patch-src_libwrapper.cpp
new file mode 100644
index 000000000000..c5b72bb26ff5
--- /dev/null
+++ b/textproc/sdcv/files/patch-src_libwrapper.cpp
@@ -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:
diff --git a/textproc/sdcv/files/pkg-message.in b/textproc/sdcv/files/pkg-message.in
index 75c4a30cf7f6..5c0b9cda7659 100644
--- a/textproc/sdcv/files/pkg-message.in
+++ b/textproc/sdcv/files/pkg-message.in
@@ -4,11 +4,11 @@ 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/
**************************************************************************
diff --git a/textproc/sdcv/pkg-descr b/textproc/sdcv/pkg-descr
index 1a5f57e7e15b..fad1e2845184 100644
--- a/textproc/sdcv/pkg-descr
+++ b/textproc/sdcv/pkg-descr
@@ -5,4 +5,4 @@ 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/
diff --git a/textproc/sdcv/pkg-plist b/textproc/sdcv/pkg-plist
index 3947a4a5485d..90399bd57cc4 100644
--- a/textproc/sdcv/pkg-plist
+++ b/textproc/sdcv/pkg-plist
@@ -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