mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
chinese/opencc: 0.4.3 -> 1.0.4
PR: 210763 Changes: https://github.com/BYVoid/OpenCC/blob/master/NEWS.md Submitted by: Iblis Lin <iblis@hs.ntnu.edu.tw> Approved by: lichray@gmail.com (maintainer)
This commit is contained in:
parent
99381cbe1b
commit
9cdea908c2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=418255
@ -2,27 +2,32 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= opencc
|
||||
PORTVERSION= 0.4.3
|
||||
PORTVERSION= 1.0.4
|
||||
DISTVERSIONPREFIX= ver.
|
||||
CATEGORIES= chinese converters
|
||||
MASTER_SITES= GOOGLE_CODE
|
||||
MASTER_SITES= GITHUB
|
||||
|
||||
MAINTAINER= lichray@gmail.com
|
||||
COMMENT= Open Chinese Convert library and utilities
|
||||
|
||||
LICENSE= APACHE20
|
||||
|
||||
USES= cmake
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= BYVoid
|
||||
GH_PROJECT= OpenCC
|
||||
|
||||
USES= cmake compiler:c++11-lib python:build
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
OPTIONS_DEFINE= NLS
|
||||
OPTIONS_DEFINE= TESTS
|
||||
|
||||
NLS_USES= gettext
|
||||
NLS_CMAKE_ON= -DENABLE_GETTEXT=On
|
||||
TESTS_DESC= Build the unit testing
|
||||
TESTS_CMAKE_ON= -DENABLE_GTEST=ON
|
||||
|
||||
OPTIONS_SUB= yes
|
||||
TEST_TARGET= test
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's@/usr/local@${LOCALBASE}@g' \
|
||||
${WRKSRC}/CMakeLists.txt
|
||||
@${REINPLACE_CMD} -e "s|python|${PYTHON_CMD}|g" \
|
||||
${WRKSRC}/data/CMakeLists.txt
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (opencc-0.4.3.tar.gz) = 7bdcf9e38ac05a16750d5276494d810db107c8a8b5f8b87e2357ee167a13a587
|
||||
SIZE (opencc-0.4.3.tar.gz) = 535151
|
||||
TIMESTAMP = 1467470273
|
||||
SHA256 (BYVoid-OpenCC-ver.1.0.4_GH0.tar.gz) = 0553b7461ebd379d118d45d7f40f8a6e272750115bdbc49267595a05ee3481ac
|
||||
SIZE (BYVoid-OpenCC-ver.1.0.4_GH0.tar.gz) = 1597309
|
||||
|
@ -1,27 +1,11 @@
|
||||
--- CMakeLists.txt.orig 2010-12-23 07:18:23.000000000 -0600
|
||||
+++ CMakeLists.txt 2011-11-28 15:23:31.089426523 -0600
|
||||
@@ -42,6 +42,8 @@ set (
|
||||
|
||||
if (ENABLE_GETTEXT)
|
||||
find_package(Gettext REQUIRED)
|
||||
+ find_path(GETTEXT_INCLUDE_DIR libintl.h)
|
||||
+ find_library(GETTEXT_LIBRARIES NAMES intl PATHS /usr/local/lib)
|
||||
endif (ENABLE_GETTEXT)
|
||||
|
||||
include (TestBigEndian)
|
||||
@@ -75,7 +77,7 @@ install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/opencc.pc
|
||||
DESTINATION
|
||||
- ${DIR_LIBRARY}/pkgconfig
|
||||
+ ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig
|
||||
--- CMakeLists.txt.orig 2016-07-02 15:04:34 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -98,7 +98,7 @@ install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/opencc.pc
|
||||
DESTINATION
|
||||
- ${DIR_LIBRARY}/pkgconfig
|
||||
+ ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig
|
||||
)
|
||||
|
||||
######## Subdirectories
|
||||
@@ -88,4 +90,4 @@ if (GETTEXT_FOUND AND ENABLE_GETTEXT)
|
||||
add_subdirectory(po)
|
||||
endif (GETTEXT_FOUND AND ENABLE_GETTEXT)
|
||||
|
||||
-add_subdirectory(test)
|
||||
\ No newline at end of file
|
||||
+add_subdirectory(test)
|
||||
######## Compiler flags
|
||||
|
@ -1,9 +0,0 @@
|
||||
--- doc/CMakeLists.txt~ 2010-12-23 07:18:23.000000000 -0600
|
||||
+++ doc/CMakeLists.txt 2011-11-28 14:52:15.884747557 -0600
|
||||
@@ -3,5 +3,5 @@ install(
|
||||
opencc.1
|
||||
opencc_dict.1
|
||||
DESTINATION
|
||||
- ${DIR_SHARE}/man/man1
|
||||
+ ${CMAKE_INSTALL_PREFIX}/man/man1
|
||||
)
|
@ -1,24 +0,0 @@
|
||||
--- src/tools/CMakeLists.txt.orig 2010-12-23 07:18:23.000000000 -0600
|
||||
+++ src/tools/CMakeLists.txt 2011-11-28 15:46:19.473573693 -0600
|
||||
@@ -30,6 +30,10 @@ target_link_libraries(
|
||||
${LIBOPENCC_TARGET}
|
||||
)
|
||||
|
||||
+if(ENABLE_GETTEXT)
|
||||
+ target_link_libraries(opencc_dict ${GETTEXT_LIBRARIES})
|
||||
+endif(ENABLE_GETTEXT)
|
||||
+
|
||||
install(
|
||||
TARGETS
|
||||
opencc_dict
|
||||
@@ -61,6 +65,10 @@ target_link_libraries(
|
||||
${LIBOPENCC_TARGET}
|
||||
)
|
||||
|
||||
+if(ENABLE_GETTEXT)
|
||||
+ target_link_libraries(opencc ${GETTEXT_LIBRARIES})
|
||||
+endif(ENABLE_GETTEXT)
|
||||
+
|
||||
install(
|
||||
TARGETS
|
||||
opencc
|
@ -1,46 +0,0 @@
|
||||
--- src/utils.c.orig 2014-04-07 11:37:35.909060780 -0400
|
||||
+++ src/utils.c 2014-04-07 11:53:24.429168115 -0400
|
||||
@@ -19,6 +19,11 @@
|
||||
#include "utils.h"
|
||||
#include <unistd.h>
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ #include <sys/types.h>
|
||||
+ #include <sys/sysctl.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
#include "TargetConditionals.h"
|
||||
#ifdef TARGET_OS_MAC
|
||||
@@ -95,14 +100,19 @@ const char* executable_path(void) {
|
||||
static int calculated = 0;
|
||||
|
||||
if (!calculated) {
|
||||
-#ifdef __linux
|
||||
+#if defined(__linux)
|
||||
ssize_t res = readlink("/proc/self/exe", path_buffer, sizeof(path_buffer));
|
||||
assert(res != -1);
|
||||
-#elif __APPLE__
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
||||
+ size_t size = sizeof(path_buffer);
|
||||
+ int res = sysctl(mib, 4, path_buffer, &size, NULL, 0);
|
||||
+ assert(res == 0);
|
||||
+#elif defined(__APPLE__)
|
||||
uint32_t size = sizeof(path_buffer);
|
||||
int res = _NSGetExecutablePath(path_buffer, &size);
|
||||
assert(res == 0);
|
||||
-#elif _WIN32 || _WIN64
|
||||
+#elif defined(_WIN32) || defined(_WIN64)
|
||||
// NOTE: for "C:\\opencc.exe" on Windows, the returned path "C:" is
|
||||
// incorrect until a '/' is appended to it later in try_open_file()
|
||||
DWORD res = GetModuleFileNameA(NULL, path_buffer, PATH_BUFFER_SIZE);
|
||||
@@ -110,7 +120,7 @@ const char* executable_path(void) {
|
||||
#else
|
||||
/* Other unsupported os */
|
||||
assert(0);
|
||||
-#endif /* ifdef __linux */
|
||||
+#endif /* if defined(__linux) */
|
||||
char* last_sep = strrchr(path_buffer, PATH_SEPARATOR);
|
||||
assert(last_sep != NULL);
|
||||
*last_sep = '\0';
|
@ -1,38 +1,55 @@
|
||||
bin/opencc
|
||||
bin/opencc_dict
|
||||
bin/opencc_phrase_extract
|
||||
include/opencc/BinaryDict.hpp
|
||||
include/opencc/Common.hpp
|
||||
include/opencc/Config.hpp
|
||||
include/opencc/Conversion.hpp
|
||||
include/opencc/ConversionChain.hpp
|
||||
include/opencc/Converter.hpp
|
||||
include/opencc/DartsDict.hpp
|
||||
include/opencc/Dict.hpp
|
||||
include/opencc/DictEntry.hpp
|
||||
include/opencc/DictGroup.hpp
|
||||
include/opencc/Exception.hpp
|
||||
include/opencc/Export.hpp
|
||||
include/opencc/Lexicon.hpp
|
||||
include/opencc/MaxMatchSegmentation.hpp
|
||||
include/opencc/Optional.hpp
|
||||
include/opencc/PhraseExtract.hpp
|
||||
include/opencc/Segmentation.hpp
|
||||
include/opencc/Segments.hpp
|
||||
include/opencc/SerializableDict.hpp
|
||||
include/opencc/SimpleConverter.hpp
|
||||
include/opencc/TextDict.hpp
|
||||
include/opencc/UTF8StringSlice.hpp
|
||||
include/opencc/UTF8Util.hpp
|
||||
include/opencc/opencc.h
|
||||
include/opencc/opencc_types.h
|
||||
include/opencc/openccxx.h
|
||||
lib/libopencc.a
|
||||
lib/libopencc.so
|
||||
lib/libopencc.so.1
|
||||
lib/libopencc.so.1.0.0
|
||||
lib/libopencc.so.2
|
||||
libdata/pkgconfig/opencc.pc
|
||||
man/man1/opencc.1.gz
|
||||
man/man1/opencc_dict.1.gz
|
||||
%%NLS%%share/locale/zh_CN/LC_MESSAGES/opencc.mo
|
||||
%%NLS%%share/locale/zh_HK/LC_MESSAGES/opencc.mo
|
||||
%%NLS%%share/locale/zh_TW/LC_MESSAGES/opencc.mo
|
||||
%%DATADIR%%/from_tw_phrases.txt
|
||||
%%DATADIR%%/from_tw_variants.txt
|
||||
%%DATADIR%%/mix2zhs.ini
|
||||
%%DATADIR%%/mix2zht.ini
|
||||
%%DATADIR%%/simp_to_trad_characters.ocd
|
||||
%%DATADIR%%/simp_to_trad_phrases.ocd
|
||||
%%DATADIR%%/to_cn_phrases.txt
|
||||
%%DATADIR%%/to_tw_phrases.txt
|
||||
%%DATADIR%%/to_tw_variants.txt
|
||||
%%DATADIR%%/trad_to_simp_characters.ocd
|
||||
%%DATADIR%%/trad_to_simp_phrases.ocd
|
||||
%%DATADIR%%/zhs2zht.ini
|
||||
%%DATADIR%%/zhs2zhtw_p.ini
|
||||
%%DATADIR%%/zhs2zhtw_v.ini
|
||||
%%DATADIR%%/zhs2zhtw_vp.ini
|
||||
%%DATADIR%%/zht2zhs.ini
|
||||
%%DATADIR%%/zht2zhtw_p.ini
|
||||
%%DATADIR%%/zht2zhtw_v.ini
|
||||
%%DATADIR%%/zht2zhtw_vp.ini
|
||||
%%DATADIR%%/zhtw2zhcn_s.ini
|
||||
%%DATADIR%%/zhtw2zhcn_t.ini
|
||||
%%DATADIR%%/zhtw2zhs.ini
|
||||
%%DATADIR%%/zhtw2zht.ini
|
||||
%%DATADIR%%/HKVariants.ocd
|
||||
%%DATADIR%%/HKVariantsPhrases.ocd
|
||||
%%DATADIR%%/HKVariantsRev.ocd
|
||||
%%DATADIR%%/HKVariantsRevPhrases.ocd
|
||||
%%DATADIR%%/JPVariants.ocd
|
||||
%%DATADIR%%/STCharacters.ocd
|
||||
%%DATADIR%%/STPhrases.ocd
|
||||
%%DATADIR%%/TSCharacters.ocd
|
||||
%%DATADIR%%/TSPhrases.ocd
|
||||
%%DATADIR%%/TWPhrases.ocd
|
||||
%%DATADIR%%/TWPhrasesRev.ocd
|
||||
%%DATADIR%%/TWVariants.ocd
|
||||
%%DATADIR%%/TWVariantsRev.ocd
|
||||
%%DATADIR%%/TWVariantsRevPhrases.ocd
|
||||
%%DATADIR%%/hk2s.json
|
||||
%%DATADIR%%/s2hk.json
|
||||
%%DATADIR%%/s2t.json
|
||||
%%DATADIR%%/s2tw.json
|
||||
%%DATADIR%%/s2twp.json
|
||||
%%DATADIR%%/t2hk.json
|
||||
%%DATADIR%%/t2s.json
|
||||
%%DATADIR%%/t2tw.json
|
||||
%%DATADIR%%/tw2s.json
|
||||
%%DATADIR%%/tw2sp.json
|
||||
|
Loading…
Reference in New Issue
Block a user