View | Details | Raw Unified | Return to bug 210763 | Differences between
and this patch

Collapse All | Expand All

(-)b/chinese/opencc/Makefile (-10 / +11 lines)
Lines 2-28 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	opencc
4
PORTNAME=	opencc
5
PORTVERSION=	0.4.3
5
PORTVERSION=	1.0.4
6
DISTVERSIONPREFIX=	ver.
6
CATEGORIES=	chinese converters
7
CATEGORIES=	chinese converters
7
MASTER_SITES=	GOOGLE_CODE
8
MASTER_SITES=	GITHUB
8
9
9
MAINTAINER=	lichray@gmail.com
10
MAINTAINER=	lichray@gmail.com
10
COMMENT=	Open Chinese Convert library and utilities
11
COMMENT=	Open Chinese Convert library and utilities
11
12
12
LICENSE=	APACHE20
13
LICENSE=	APACHE20
13
14
15
USE_GITHUB=	yes
16
GH_ACCOUNT=	BYVoid
17
GH_PROJECT=	OpenCC
18
14
USES=		cmake
19
USES=		cmake
15
USE_LDCONFIG=	yes
20
USE_LDCONFIG=	yes
16
21
17
OPTIONS_DEFINE=	NLS
22
OPTIONS_DEFINE=	TESTS
18
19
NLS_USES=	gettext
20
NLS_CMAKE_ON=	-DENABLE_GETTEXT=On
21
23
22
OPTIONS_SUB=	yes
24
TESTS_DESC=	Build the unit testing
25
TESTS_CMAKE_ON=	-DENABLE_GTEST=ON
23
26
24
post-patch:
27
TEST_TARGET=	test
25
	@${REINPLACE_CMD} -e 's@/usr/local@${LOCALBASE}@g' \
26
		${WRKSRC}/CMakeLists.txt
27
28
28
.include <bsd.port.mk>
29
.include <bsd.port.mk>
(-)b/chinese/opencc/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (opencc-0.4.3.tar.gz) = 7bdcf9e38ac05a16750d5276494d810db107c8a8b5f8b87e2357ee167a13a587
1
TIMESTAMP = 1467470273
2
SIZE (opencc-0.4.3.tar.gz) = 535151
2
SHA256 (BYVoid-OpenCC-ver.1.0.4_GH0.tar.gz) = 0553b7461ebd379d118d45d7f40f8a6e272750115bdbc49267595a05ee3481ac
3
SIZE (BYVoid-OpenCC-ver.1.0.4_GH0.tar.gz) = 1597309
(-)b/chinese/opencc/files/patch-CMakeLists.txt (-25 / +9 lines)
Lines 1-27 Link Here
1
--- CMakeLists.txt.orig	2010-12-23 07:18:23.000000000 -0600
1
--- CMakeLists.txt.orig	2016-07-02 15:04:34 UTC
2
+++ CMakeLists.txt	2011-11-28 15:23:31.089426523 -0600
2
+++ CMakeLists.txt
3
@@ -42,6 +42,8 @@ set (
3
@@ -98,7 +98,7 @@ install(
4
 
4
   FILES
5
 if (ENABLE_GETTEXT)
5
     ${CMAKE_BINARY_DIR}/opencc.pc
6
 	find_package(Gettext REQUIRED)
6
   DESTINATION
7
+	find_path(GETTEXT_INCLUDE_DIR libintl.h)
7
-    ${DIR_LIBRARY}/pkgconfig
8
+	find_library(GETTEXT_LIBRARIES NAMES intl PATHS /usr/local/lib)
8
+    ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig
9
 endif (ENABLE_GETTEXT)
10
 
11
 include (TestBigEndian)
12
@@ -75,7 +77,7 @@ install(
13
 	FILES
14
 		${CMAKE_BINARY_DIR}/opencc.pc
15
 	DESTINATION
16
-		${DIR_LIBRARY}/pkgconfig
17
+	${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig
18
 )
9
 )
19
 
10
 
20
 ######## Subdirectories
11
 ######## Compiler flags
21
@@ -88,4 +90,4 @@ if (GETTEXT_FOUND AND ENABLE_GETTEXT)
22
 	add_subdirectory(po)
23
 endif (GETTEXT_FOUND AND ENABLE_GETTEXT)
24
 
25
-add_subdirectory(test)
26
\ No newline at end of file
27
+add_subdirectory(test)
(-)a/chinese/opencc/files/patch-doc_CMakeLists.txt (-9 lines)
Removed Link Here
1
--- doc/CMakeLists.txt~	2010-12-23 07:18:23.000000000 -0600
2
+++ doc/CMakeLists.txt	2011-11-28 14:52:15.884747557 -0600
3
@@ -3,5 +3,5 @@ install(
4
 		opencc.1
5
 		opencc_dict.1
6
 	DESTINATION
7
-		${DIR_SHARE}/man/man1
8
+	${CMAKE_INSTALL_PREFIX}/man/man1
9
 )
(-)a/chinese/opencc/files/patch-src_tools_CMakeLists.txt (-24 lines)
Removed Link Here
1
--- src/tools/CMakeLists.txt.orig	2010-12-23 07:18:23.000000000 -0600
2
+++ src/tools/CMakeLists.txt	2011-11-28 15:46:19.473573693 -0600
3
@@ -30,6 +30,10 @@ target_link_libraries(
4
 	${LIBOPENCC_TARGET}
5
 )
6
 
7
+if(ENABLE_GETTEXT)
8
+	target_link_libraries(opencc_dict ${GETTEXT_LIBRARIES})
9
+endif(ENABLE_GETTEXT)
10
+
11
 install(
12
 	TARGETS
13
 		opencc_dict
14
@@ -61,6 +65,10 @@ target_link_libraries(
15
 	${LIBOPENCC_TARGET}
16
 )
17
 
18
+if(ENABLE_GETTEXT)
19
+	target_link_libraries(opencc ${GETTEXT_LIBRARIES})
20
+endif(ENABLE_GETTEXT)
21
+
22
 install(
23
 	TARGETS
24
 		opencc
(-)a/chinese/opencc/files/patch-src_utils.c (-46 lines)
Removed Link Here
1
--- src/utils.c.orig	2014-04-07 11:37:35.909060780 -0400
2
+++ src/utils.c	2014-04-07 11:53:24.429168115 -0400
3
@@ -19,6 +19,11 @@
4
 #include "utils.h"
5
 #include <unistd.h>
6
 
7
+#ifdef __FreeBSD__
8
+  #include <sys/types.h>
9
+  #include <sys/sysctl.h>
10
+#endif
11
+
12
 #ifdef __APPLE__
13
   #include "TargetConditionals.h"
14
   #ifdef TARGET_OS_MAC
15
@@ -95,14 +100,19 @@ const char* executable_path(void) {
16
   static int calculated = 0;
17
 
18
   if (!calculated) {
19
-#ifdef __linux
20
+#if defined(__linux)
21
     ssize_t res = readlink("/proc/self/exe", path_buffer, sizeof(path_buffer));
22
     assert(res != -1);
23
-#elif __APPLE__
24
+#elif defined(__FreeBSD__)
25
+    int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
26
+    size_t size = sizeof(path_buffer);
27
+    int res = sysctl(mib, 4, path_buffer, &size, NULL, 0);
28
+    assert(res == 0);
29
+#elif defined(__APPLE__)
30
     uint32_t size = sizeof(path_buffer);
31
     int res = _NSGetExecutablePath(path_buffer, &size);
32
     assert(res == 0);
33
-#elif _WIN32 || _WIN64
34
+#elif defined(_WIN32) || defined(_WIN64)
35
     // NOTE: for "C:\\opencc.exe" on Windows, the returned path "C:" is
36
     // incorrect until a '/' is appended to it later in try_open_file()
37
     DWORD res = GetModuleFileNameA(NULL, path_buffer, PATH_BUFFER_SIZE);
38
@@ -110,7 +120,7 @@ const char* executable_path(void) {
39
 #else
40
     /* Other unsupported os */
41
     assert(0);
42
-#endif /* ifdef __linux */
43
+#endif /* if defined(__linux) */
44
     char* last_sep = strrchr(path_buffer, PATH_SEPARATOR);
45
     assert(last_sep != NULL);
46
     *last_sep = '\0';
(-)b/chinese/opencc/pkg-plist (-32 / +49 lines)
Lines 1-38 Link Here
1
bin/opencc
1
bin/opencc
2
bin/opencc_dict
2
bin/opencc_dict
3
bin/opencc_phrase_extract
4
include/opencc/BinaryDict.hpp
5
include/opencc/Common.hpp
6
include/opencc/Config.hpp
7
include/opencc/Conversion.hpp
8
include/opencc/ConversionChain.hpp
9
include/opencc/Converter.hpp
10
include/opencc/DartsDict.hpp
11
include/opencc/Dict.hpp
12
include/opencc/DictEntry.hpp
13
include/opencc/DictGroup.hpp
14
include/opencc/Exception.hpp
15
include/opencc/Export.hpp
16
include/opencc/Lexicon.hpp
17
include/opencc/MaxMatchSegmentation.hpp
18
include/opencc/Optional.hpp
19
include/opencc/PhraseExtract.hpp
20
include/opencc/Segmentation.hpp
21
include/opencc/Segments.hpp
22
include/opencc/SerializableDict.hpp
23
include/opencc/SimpleConverter.hpp
24
include/opencc/TextDict.hpp
25
include/opencc/UTF8StringSlice.hpp
26
include/opencc/UTF8Util.hpp
3
include/opencc/opencc.h
27
include/opencc/opencc.h
4
include/opencc/opencc_types.h
5
include/opencc/openccxx.h
6
lib/libopencc.a
7
lib/libopencc.so
28
lib/libopencc.so
8
lib/libopencc.so.1
9
lib/libopencc.so.1.0.0
29
lib/libopencc.so.1.0.0
30
lib/libopencc.so.2
10
libdata/pkgconfig/opencc.pc
31
libdata/pkgconfig/opencc.pc
11
man/man1/opencc.1.gz
32
%%DATADIR%%/HKVariants.ocd
12
man/man1/opencc_dict.1.gz
33
%%DATADIR%%/HKVariantsPhrases.ocd
13
%%NLS%%share/locale/zh_CN/LC_MESSAGES/opencc.mo
34
%%DATADIR%%/HKVariantsRev.ocd
14
%%NLS%%share/locale/zh_HK/LC_MESSAGES/opencc.mo
35
%%DATADIR%%/HKVariantsRevPhrases.ocd
15
%%NLS%%share/locale/zh_TW/LC_MESSAGES/opencc.mo
36
%%DATADIR%%/JPVariants.ocd
16
%%DATADIR%%/from_tw_phrases.txt
37
%%DATADIR%%/STCharacters.ocd
17
%%DATADIR%%/from_tw_variants.txt
38
%%DATADIR%%/STPhrases.ocd
18
%%DATADIR%%/mix2zhs.ini
39
%%DATADIR%%/TSCharacters.ocd
19
%%DATADIR%%/mix2zht.ini
40
%%DATADIR%%/TSPhrases.ocd
20
%%DATADIR%%/simp_to_trad_characters.ocd
41
%%DATADIR%%/TWPhrases.ocd
21
%%DATADIR%%/simp_to_trad_phrases.ocd
42
%%DATADIR%%/TWPhrasesRev.ocd
22
%%DATADIR%%/to_cn_phrases.txt
43
%%DATADIR%%/TWVariants.ocd
23
%%DATADIR%%/to_tw_phrases.txt
44
%%DATADIR%%/TWVariantsRev.ocd
24
%%DATADIR%%/to_tw_variants.txt
45
%%DATADIR%%/TWVariantsRevPhrases.ocd
25
%%DATADIR%%/trad_to_simp_characters.ocd
46
%%DATADIR%%/hk2s.json
26
%%DATADIR%%/trad_to_simp_phrases.ocd
47
%%DATADIR%%/s2hk.json
27
%%DATADIR%%/zhs2zht.ini
48
%%DATADIR%%/s2t.json
28
%%DATADIR%%/zhs2zhtw_p.ini
49
%%DATADIR%%/s2tw.json
29
%%DATADIR%%/zhs2zhtw_v.ini
50
%%DATADIR%%/s2twp.json
30
%%DATADIR%%/zhs2zhtw_vp.ini
51
%%DATADIR%%/t2hk.json
31
%%DATADIR%%/zht2zhs.ini
52
%%DATADIR%%/t2s.json
32
%%DATADIR%%/zht2zhtw_p.ini
53
%%DATADIR%%/t2tw.json
33
%%DATADIR%%/zht2zhtw_v.ini
54
%%DATADIR%%/tw2s.json
34
%%DATADIR%%/zht2zhtw_vp.ini
55
%%DATADIR%%/tw2sp.json
35
%%DATADIR%%/zhtw2zhcn_s.ini
36
%%DATADIR%%/zhtw2zhcn_t.ini
37
%%DATADIR%%/zhtw2zhs.ini
38
%%DATADIR%%/zhtw2zht.ini
(-)b/chinese/fcitx-rime/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	fcitx-rime
4
PORTNAME=	fcitx-rime
5
PORTVERSION=	0.3.1
5
PORTVERSION=	0.3.1
6
PORTREVISION=	1
6
CATEGORIES=	chinese
7
CATEGORIES=	chinese
7
MASTER_SITES=	http://download.fcitx-im.org/${PORTNAME}/
8
MASTER_SITES=	http://download.fcitx-im.org/${PORTNAME}/
8
DIST_SUBDIR=	fcitx
9
DIST_SUBDIR=	fcitx

Return to bug 210763