diff options
author | vanilla <vanilla@FreeBSD.org> | 2011-12-02 09:27:24 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2011-12-02 09:27:24 +0800 |
commit | ae270b9919cf7efa356a398f053ea0822e61871c (patch) | |
tree | 1bd45c227528851b7ba9a0fc4c2745ed3e703127 /chinese | |
parent | 9cc099042d47abfda332f3241e1718edbc6387f5 (diff) | |
download | freebsd-ports-gnome-ae270b9919cf7efa356a398f053ea0822e61871c.tar.gz freebsd-ports-gnome-ae270b9919cf7efa356a398f053ea0822e61871c.tar.zst freebsd-ports-gnome-ae270b9919cf7efa356a398f053ea0822e61871c.zip |
Add opencc 0.2.0, open Chinese Convert library and utilities.
PR: ports/162931
Submitted by: Zhihao Yuan <lichray@gmail.com>
Feature safe: yes
Diffstat (limited to 'chinese')
-rw-r--r-- | chinese/Makefile | 1 | ||||
-rw-r--r-- | chinese/opencc/Makefile | 39 | ||||
-rw-r--r-- | chinese/opencc/distinfo | 2 | ||||
-rw-r--r-- | chinese/opencc/files/patch-CMakeLists.txt | 27 | ||||
-rw-r--r-- | chinese/opencc/files/patch-doc_CMakeLists.txt | 9 | ||||
-rw-r--r-- | chinese/opencc/files/patch-src_tools_CMakeLists.txt | 24 | ||||
-rw-r--r-- | chinese/opencc/pkg-descr | 5 | ||||
-rw-r--r-- | chinese/opencc/pkg-plist | 29 |
8 files changed, 136 insertions, 0 deletions
diff --git a/chinese/Makefile b/chinese/Makefile index 88a15d104678..eb2e979dbe6d 100644 --- a/chinese/Makefile +++ b/chinese/Makefile @@ -82,6 +82,7 @@ SUBDIR += muni SUBDIR += mutt SUBDIR += oicq + SUBDIR += opencc SUBDIR += opendesktop-fonts SUBDIR += oto SUBDIR += oxim diff --git a/chinese/opencc/Makefile b/chinese/opencc/Makefile new file mode 100644 index 000000000000..bf4988b20bfb --- /dev/null +++ b/chinese/opencc/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: opencc +# Date created: 28 Nov 2011 +# Whom: Zhihao Yuan <lichray@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= opencc +PORTVERSION= 0.2.0 +CATEGORIES= chinese converters +MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} + +MAINTAINER= lichray@gmail.com +COMMENT= Open Chinese Convert library and utilities + +LICENSE= ASL + +MAN1= opencc.1 opencc_dict.1 + +USE_CMAKE= yes +USE_LDCONFIG= yes + +.if !defined(WITHOUT_NLS) +USE_GETTEXT= yes +CMAKE_ARGS+= -DENABLE_GETTEXT=On +PLIST_SUB+= NLS="" +.else +PLIST_SUB+= NLS="@comment " +.endif + +.if defined(NOPORTDATA) +IGNORE= thesaurus are required, undefine NOPORTDATA +.endif + +post-patch: + @${REINPLACE_CMD} -e 's@/usr/local@${LOCALBASE}@g' \ + ${WRKSRC}/CMakeLists.txt + +.include <bsd.port.mk> diff --git a/chinese/opencc/distinfo b/chinese/opencc/distinfo new file mode 100644 index 000000000000..3bf703e7703c --- /dev/null +++ b/chinese/opencc/distinfo @@ -0,0 +1,2 @@ +SHA256 (opencc-0.2.0.tar.gz) = fc4b3203482c7e5ad5c887dc08f83cd1d0e0c1fd1bdd9ec48672ca89bfe2a424 +SIZE (opencc-0.2.0.tar.gz) = 496313 diff --git a/chinese/opencc/files/patch-CMakeLists.txt b/chinese/opencc/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..181f72ca80a6 --- /dev/null +++ b/chinese/opencc/files/patch-CMakeLists.txt @@ -0,0 +1,27 @@ +--- 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 + ) + + ######## 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) diff --git a/chinese/opencc/files/patch-doc_CMakeLists.txt b/chinese/opencc/files/patch-doc_CMakeLists.txt new file mode 100644 index 000000000000..23a05bfb3137 --- /dev/null +++ b/chinese/opencc/files/patch-doc_CMakeLists.txt @@ -0,0 +1,9 @@ +--- 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 + ) diff --git a/chinese/opencc/files/patch-src_tools_CMakeLists.txt b/chinese/opencc/files/patch-src_tools_CMakeLists.txt new file mode 100644 index 000000000000..f86d5d91e4e0 --- /dev/null +++ b/chinese/opencc/files/patch-src_tools_CMakeLists.txt @@ -0,0 +1,24 @@ +--- 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 diff --git a/chinese/opencc/pkg-descr b/chinese/opencc/pkg-descr new file mode 100644 index 000000000000..b3e487df146b --- /dev/null +++ b/chinese/opencc/pkg-descr @@ -0,0 +1,5 @@ +Open Chinese Convert (OpenCC) is an open source Simplified-Traditional +Chinese conversion project, providing high quality thesaurus and libopencc, +as well as a conversion utility and a dictionary generator. + +WWW: https://code.google.com/p/opencc/ diff --git a/chinese/opencc/pkg-plist b/chinese/opencc/pkg-plist new file mode 100644 index 000000000000..c862d1c4cc2b --- /dev/null +++ b/chinese/opencc/pkg-plist @@ -0,0 +1,29 @@ +bin/opencc +bin/opencc_dict +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 +libdata/pkgconfig/opencc.pc +%%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%%/mix2zhs.ini +%%DATADIR%%/mix2zht.ini +%%DATADIR%%/simp_to_trad_characters.ocd +%%DATADIR%%/simp_to_trad_phrases.ocd +%%DATADIR%%/trad_to_simp_characters.ocd +%%DATADIR%%/trad_to_simp_phrases.ocd +%%DATADIR%%/zhs2zht.ini +%%DATADIR%%/zht2zhs.ini +%%NLS%%@dirrmtry share/locale/zh_TW/LC_MESSAGES +%%NLS%%@dirrmtry share/locale/zh_TW +%%NLS%%@dirrmtry share/locale/zh_HK/LC_MESSAGES +%%NLS%%@dirrmtry share/locale/zh_HK +%%NLS%%@dirrmtry share/locale/zh_CN/LC_MESSAGES +%%NLS%%@dirrmtry share/locale/zh_CN +@dirrm %%DATADIR%% +@dirrm include/opencc |