aboutsummaryrefslogtreecommitdiff
path: root/chinese/sunpinyin/files
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2015-04-07 09:42:28 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2015-04-07 09:42:28 +0000
commit7c8f075e6844fed592e7a66656d815096a3ba1fe (patch)
tree84110f1d5e363d5e99c882bdadaa5df658487b61 /chinese/sunpinyin/files
parented88184ff868381b97b9286c46c5404af3c58cd1 (diff)
downloadports-7c8f075e6844fed592e7a66656d815096a3ba1fe.tar.gz
ports-7c8f075e6844fed592e7a66656d815096a3ba1fe.zip
Notes
Diffstat (limited to 'chinese/sunpinyin/files')
-rw-r--r--chinese/sunpinyin/files/patch-SConstruct34
-rw-r--r--chinese/sunpinyin/files/patch-raw_Makefile21
-rw-r--r--chinese/sunpinyin/files/patch-src_sunpinyin-dictgen.mk.in26
3 files changed, 42 insertions, 39 deletions
diff --git a/chinese/sunpinyin/files/patch-SConstruct b/chinese/sunpinyin/files/patch-SConstruct
index d18c10030ceb..a631a54cacf4 100644
--- a/chinese/sunpinyin/files/patch-SConstruct
+++ b/chinese/sunpinyin/files/patch-SConstruct
@@ -1,23 +1,21 @@
---- SConstruct.orig 2012-07-18 12:25:59.000000000 +0800
-+++ SConstruct 2013-09-14 14:44:54.603035259 +0800
-@@ -176,10 +176,12 @@
-
- libln_builder = Builder(action='ln -s ${SOURCE.name} ${TARGET.name}',
- chdir=True)
-- env = Environment(ENV=os.environ, CFLAGS=cflags, CXXFLAGS=cflags,
-- TAR=tar, MAKE=make, WGET=wget,
+--- SConstruct.orig 2014-11-14 09:17:48.000000000 -0500
++++ SConstruct 2015-04-01 16:11:27.540297600 -0400
+@@ -215,10 +215,11 @@ def CreateEnvironment():
+ make = 'gmake'
+ tar = 'gtar'
+ libln_builder = Builder(action='cd ${TARGET.dir} && ln -s ${SOURCE.name} ${TARGET.name}')
+- env = Environment(ENV=os.environ, CFLAGS=cflags, CXXFLAGS='',
++ env = Environment(ENV=os.environ,
+ MAKE=make, WGET=wget, W3M=w3m, TAR=tar,
- CPPPATH=['.'] + allinc(),
- tools=['default', 'textfile'])
-+ env = Environment(tools=['default', 'textfile'], **ARGUMENTS)
-+ env['ENV'] = os.environ
-+ env['TAR'] = tar
-+ env['MAKE'] = make
++ tools=['default', 'textfile'],
++ **ARGUMENTS)
+ env['CPPPATH'] = ['.'] + allinc()
-+
env.Append(BUILDERS={'InstallAsSymlink': libln_builder})
+ env['ENDIANNESS'] = "be" if sys.byteorder == "big" else "le"
return env
-
-@@ -324,7 +326,6 @@
+@@ -375,7 +376,6 @@ def DoConfigure():
conf.CheckFunc('getopt_long')
conf.CheckFunc('getpagesize')
conf.CheckFunc('get_opt')
@@ -25,12 +23,12 @@
conf.CheckCHeader('inttypes.h')
conf.CheckCHeader('locale.h')
conf.CheckCHeader('libintl.h')
-@@ -420,7 +421,7 @@
+@@ -463,7 +463,7 @@ def DoInstall():
lib_target_bin),
]
- lib_pkgconfig_target = env.Install(os.path.join(libdir, 'pkgconfig'),
+ lib_pkgconfig_target = env.Install(os.path.join(env['PREFIX'], 'libdata/pkgconfig'),
['sunpinyin-2.0.pc'])
- libdata_target = env.Install(libdatadir,
- ['data/lm_sc.t3g',
+ bin_target = env.Install(bindir, bins)
+ man1_target = env.Install(man1dir, man1s)
diff --git a/chinese/sunpinyin/files/patch-raw_Makefile b/chinese/sunpinyin/files/patch-raw_Makefile
deleted file mode 100644
index 0d626f8653c8..000000000000
--- a/chinese/sunpinyin/files/patch-raw_Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
---- raw/Makefile~ 2011-02-17 21:39:52.000000000 -0600
-+++ raw/Makefile 2011-11-10 01:52:50.258400612 -0600
-@@ -11,18 +11,12 @@ stamp-lm: lm_sc.t3g.arpa.tar.bz2
- $(TAR) -jxf $^
- touch $@
-
--lm_sc.t3g.arpa.tar.bz2:
-- $(WGET) $(LM_URL)/$@
--
- dict.utf8: stamp-dict
-
- stamp-dict: dict.utf8.tar.bz2
- $(TAR) -jxf $^
- touch $@
-
--dict.utf8.tar.bz2:
-- $(WGET) $(LM_URL)/$@
--
- clean:
- @rm -f stamp-dict stamp-lm lm_sc.t3g.arpa dict.utf8
- @echo cleaned
diff --git a/chinese/sunpinyin/files/patch-src_sunpinyin-dictgen.mk.in b/chinese/sunpinyin/files/patch-src_sunpinyin-dictgen.mk.in
new file mode 100644
index 000000000000..926457694627
--- /dev/null
+++ b/chinese/sunpinyin/files/patch-src_sunpinyin-dictgen.mk.in
@@ -0,0 +1,26 @@
+--- src/sunpinyin-dictgen.mk.in.orig 2014-11-14 09:17:48.000000000 -0500
++++ src/sunpinyin-dictgen.mk.in 2015-04-01 14:42:35.541184598 -0400
+@@ -42,22 +42,7 @@ DL_ROOT = ${DL_HOST}/open-gram
+ DICT_PAT = 'dict\.utf8-[0-9]\+.tar.bz2'
+ SLM_PAT = 'lm_sc\.3gm\.arpa-[0-9]\+.tar.bz2'
+
+-DICT_AR = $(shell ${W3M} ${DL_LIST} | grep -o ${DICT_PAT} | sort | tail -n 1)
+-SLM_AR = $(shell ${W3M} ${DL_LIST} | grep -o ${SLM_PAT} | sort | tail -n 1)
+-
+-all: install
+-
+-${DICT_AR}:
+- ${WGET} ${DL_ROOT}/$@
+-
+-dict.utf8: ${DICT_AR}
+- ${TAR} xmf $^
+-
+-${SLM_AR}:
+- ${WGET} ${DL_ROOT}/$@
+-
+-lm_sc.3gm.arpa: ${SLM_AR}
+- ${TAR} xmf $^
++all: lm_sc.t3g pydict_sc.bin
+
+ lm_sc.3gm: lm_sc.3gm.arpa dict.utf8
+ slmpack $^ $@