ports/162931: New port: chinese/opencc: Open Chinese Convert
Zhihao Yuan
lichray at gmail.com
Mon Nov 28 22:30:16 UTC 2011
>Number: 162931
>Category: ports
>Synopsis: New port: chinese/opencc: Open Chinese Convert
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 28 22:30:15 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Zhihao Yuan
>Release: FreeBSD 8.2-STABLE amd64
>Organization:
Northern Illinois University
>Environment:
System: FreeBSD elitebook.hp 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Nov 12 03:41:26 CST 2011 lichray at elitebook.hp:/usr/obj/home/lichray/devel/freebsd-8/sys/HOUKAGO amd64
>Description:
Simplified-Traditional Chinese conversion is language conversion, not just character set conversion. This is the best existing open source library.
https://code.google.com/p/opencc/
>How-To-Repeat:
>Fix:
--- opencc.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# opencc
# opencc/pkg-plist
# opencc/pkg-descr
# opencc/Makefile
# opencc/files
# opencc/files/patch-doc_CMakeLists.txt
# opencc/files/patch-src_tools_CMakeLists.txt
# opencc/files/patch-CMakeLists.txt
# opencc/distinfo
#
echo c - opencc
mkdir -p opencc > /dev/null 2>&1
echo x - opencc/pkg-plist
sed 's/^X//' >opencc/pkg-plist << '2694bf6927b5c8d05506d75be33c5524'
Xbin/opencc
Xbin/opencc_dict
Xinclude/opencc/opencc.h
Xinclude/opencc/opencc_types.h
Xinclude/opencc/openccxx.h
Xlib/libopencc.a
Xlib/libopencc.so
Xlib/libopencc.so.1
Xlib/libopencc.so.1.0.0
Xlibdata/pkgconfig/opencc.pc
X%%NLS%%share/locale/zh_CN/LC_MESSAGES/opencc.mo
X%%NLS%%share/locale/zh_HK/LC_MESSAGES/opencc.mo
X%%NLS%%share/locale/zh_TW/LC_MESSAGES/opencc.mo
X%%DATADIR%%/mix2zhs.ini
X%%DATADIR%%/mix2zht.ini
X%%DATADIR%%/simp_to_trad_characters.ocd
X%%DATADIR%%/simp_to_trad_phrases.ocd
X%%DATADIR%%/trad_to_simp_characters.ocd
X%%DATADIR%%/trad_to_simp_phrases.ocd
X%%DATADIR%%/zhs2zht.ini
X%%DATADIR%%/zht2zhs.ini
X at dirrm %%DATADIR%%
X at dirrm include/opencc
2694bf6927b5c8d05506d75be33c5524
echo x - opencc/pkg-descr
sed 's/^X//' >opencc/pkg-descr << '3109f50d2425c127a4347c80272bf75d'
XOpen Chinese Convert (OpenCC) is an open source Simplified-Traditional
XChinese conversion project, providing high quality thesaurus and libopencc,
Xas well as a conversion utility and a dictionary generator.
X
XWWW: https://code.google.com/p/opencc/
3109f50d2425c127a4347c80272bf75d
echo x - opencc/Makefile
sed 's/^X//' >opencc/Makefile << 'a787b135dd9f4319af02436c2eb93673'
X# New ports collection makefile for: opencc
X# Date created: 28 Nov 2011
X# Whom: Zhihao Yuan <lichray at gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME= opencc
XPORTVERSION= 0.2.0
XCATEGORIES= chinese converters
XMASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
X
XMAINTAINER= lichray at gmail.com
XCOMMENT= Open Chinese Convert library and utilities
X
XLICENSE= ASL
X
XMAN1= opencc.1 opencc_dict.1
X
XUSE_CMAKE= yes
XUSE_LDCONFIG= yes
X
X.if !defined(WITHOUT_NLS)
XUSE_GETTEXT= yes
XCMAKE_ARGS+= -DENABLE_GETTEXT=On
XPLIST_SUB+= NLS=""
X.else
XPLIST_SUB+= NLS="@comment "
X.endif
X
X.if defined(NOPORTDATA)
XIGNORE= thesaurus are required, undefine NOPORTDATA
X.endif
X
Xpost-patch:
X @${REINPLACE_CMD} -e 's@/usr/local@${LOCALBASE}@g' \
X ${WRKSRC}/CMakeLists.txt
X
X.include <bsd.port.mk>
a787b135dd9f4319af02436c2eb93673
echo c - opencc/files
mkdir -p opencc/files > /dev/null 2>&1
echo x - opencc/files/patch-doc_CMakeLists.txt
sed 's/^X//' >opencc/files/patch-doc_CMakeLists.txt << '33b17ce1f017a11a5c712d9761e4d4a9'
X--- doc/CMakeLists.txt~ 2010-12-23 07:18:23.000000000 -0600
X+++ doc/CMakeLists.txt 2011-11-28 14:52:15.884747557 -0600
X@@ -3,5 +3,5 @@ install(
X opencc.1
X opencc_dict.1
X DESTINATION
X- ${DIR_SHARE}/man/man1
X+ ${CMAKE_INSTALL_PREFIX}/man/man1
X )
33b17ce1f017a11a5c712d9761e4d4a9
echo x - opencc/files/patch-src_tools_CMakeLists.txt
sed 's/^X//' >opencc/files/patch-src_tools_CMakeLists.txt << 'f47919dfe729023ead38fae2aca9b33f'
X--- src/tools/CMakeLists.txt.orig 2010-12-23 07:18:23.000000000 -0600
X+++ src/tools/CMakeLists.txt 2011-11-28 15:46:19.473573693 -0600
X@@ -30,6 +30,10 @@ target_link_libraries(
X ${LIBOPENCC_TARGET}
X )
X
X+if(ENABLE_GETTEXT)
X+ target_link_libraries(opencc_dict ${GETTEXT_LIBRARIES})
X+endif(ENABLE_GETTEXT)
X+
X install(
X TARGETS
X opencc_dict
X@@ -61,6 +65,10 @@ target_link_libraries(
X ${LIBOPENCC_TARGET}
X )
X
X+if(ENABLE_GETTEXT)
X+ target_link_libraries(opencc ${GETTEXT_LIBRARIES})
X+endif(ENABLE_GETTEXT)
X+
X install(
X TARGETS
X opencc
f47919dfe729023ead38fae2aca9b33f
echo x - opencc/files/patch-CMakeLists.txt
sed 's/^X//' >opencc/files/patch-CMakeLists.txt << '7b75067db6d8d1ca67f51bbc54463360'
X--- CMakeLists.txt.orig 2010-12-23 07:18:23.000000000 -0600
X+++ CMakeLists.txt 2011-11-28 15:23:31.089426523 -0600
X@@ -42,6 +42,8 @@ set (
X
X if (ENABLE_GETTEXT)
X find_package(Gettext REQUIRED)
X+ find_path(GETTEXT_INCLUDE_DIR libintl.h)
X+ find_library(GETTEXT_LIBRARIES NAMES intl PATHS /usr/local/lib)
X endif (ENABLE_GETTEXT)
X
X include (TestBigEndian)
X@@ -75,7 +77,7 @@ install(
X FILES
X ${CMAKE_BINARY_DIR}/opencc.pc
X DESTINATION
X- ${DIR_LIBRARY}/pkgconfig
X+ ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig
X )
X
X ######## Subdirectories
X@@ -88,4 +90,4 @@ if (GETTEXT_FOUND AND ENABLE_GETTEXT)
X add_subdirectory(po)
X endif (GETTEXT_FOUND AND ENABLE_GETTEXT)
X
X-add_subdirectory(test)
X\ No newline at end of file
X+add_subdirectory(test)
7b75067db6d8d1ca67f51bbc54463360
echo x - opencc/distinfo
sed 's/^X//' >opencc/distinfo << 'e151a94f329fc9a37b57135f32a7992e'
XSHA256 (opencc-0.2.0.tar.gz) = fc4b3203482c7e5ad5c887dc08f83cd1d0e0c1fd1bdd9ec48672ca89bfe2a424
XSIZE (opencc-0.2.0.tar.gz) = 496313
e151a94f329fc9a37b57135f32a7992e
exit
--- opencc.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list