My MacPorts
Revision | 225e8980fbcb06ccec174e886727eba7cec86ef1 (tree) |
---|---|
Time | 2009-03-26 20:10:17 |
Author | Kazuki Sakamoto <sakamoto@splh...> |
Commiter | Kazuki Sakamoto |
vim-app install kaoriya vim scripts and fix alpha
@@ -66,8 +66,7 @@ configure.args --without-x \ | ||
66 | 66 | --with-tlib=ncurses \ |
67 | 67 | --enable-multibyte \ |
68 | 68 | --with-features=huge |
69 | -configure.cppflags -DSYS_VIMRC_FILE=\\"${prefix}/etc/vimrc\\" \ | |
70 | - -I${prefix}/include | |
69 | +configure.cppflags -I${prefix}/include | |
71 | 70 | configure.ldflags -L${prefix}/lib |
72 | 71 | |
73 | 72 | extract.only [suffix ${realname}-${vim_version}] |
@@ -91,8 +90,6 @@ pre-destroot { | ||
91 | 90 | destroot { |
92 | 91 | # copy Vim.app |
93 | 92 | file copy ${worksrcpath}/src/Vim.app ${destroot}${applications_dir} |
94 | - xinstall -m 644 ${filespath}/vimrc ${filespath}/gvimrc \ | |
95 | - ${destroot}${applications_dir}/Vim.app | |
96 | 93 | xinstall -m 644 ${workpath}/doc-txt.icns \ |
97 | 94 | ${destroot}${applications_dir}/Vim.app/Contents/Resources |
98 | 95 | xinstall -m 644 ${workpath}/app.icns \ |
@@ -116,12 +113,6 @@ destroot { | ||
116 | 113 | |
117 | 114 | # general vim variants |
118 | 115 | |
119 | -variant big description {Build big feature set} conflicts huge { | |
120 | - configure.args-append --with-features=big | |
121 | -} | |
122 | -variant huge description {Build huge feature set} conflicts big { | |
123 | - configure.args-append --with-features=huge | |
124 | -} | |
125 | 116 | variant xim description {Build with support for X Input Method} { |
126 | 117 | configure.args-append --with-xim |
127 | 118 | } |
@@ -15,21 +15,21 @@ set cpo&vim | ||
15 | 15 | |
16 | 16 | " Define mac-standard menu items and keyboard shortcuts. |
17 | 17 | |
18 | -aunmenu &File.&New | |
18 | +"aunmenu &File.&New | |
19 | 19 | amenu 10.325 &File.&New<Tab><D-n> <D-n> |
20 | 20 | nmap <D-n> :confirm enew<CR> |
21 | 21 | vmap <D-n> <Esc><D-n>gv |
22 | 22 | imap <D-n> <C-O><D-n> |
23 | 23 | cmap <D-n> <C-C><D-n> |
24 | 24 | omap <D-n> <Esc><D-n> |
25 | -aunmenu &File.&Open\.\.\. | |
25 | +"aunmenu &File.&Open\.\.\. | |
26 | 26 | amenu 10.310 &File.&Open\.\.\.<Tab><D-o> <D-o> |
27 | 27 | nmap <D-o> :browse confirm e<CR> |
28 | 28 | vmap <D-o> <Esc><D-o>gv |
29 | 29 | imap <D-o> <C-O><D-o> |
30 | 30 | cmap <D-o> <C-C><D-o> |
31 | 31 | omap <D-o> <Esc><D-o> |
32 | -aunmenu &File.&Close | |
32 | +"aunmenu &File.&Close | |
33 | 33 | amenu 10.330 &File.&Close<Tab><D-w> <D-w> |
34 | 34 | nmap <silent> <D-w> :if winheight(2) < 0 <Bar> |
35 | 35 | \ confirm enew <Bar> |
@@ -40,7 +40,7 @@ vmap <D-w> <Esc><D-w>gv | ||
40 | 40 | imap <D-w> <C-O><D-w> |
41 | 41 | cmap <D-w> <C-C><D-w> |
42 | 42 | omap <D-w> <Esc><D-w> |
43 | -aunmenu &File.&Save | |
43 | +"aunmenu &File.&Save | |
44 | 44 | amenu 10.340 &File.&Save<Tab><D-s> <D-s> |
45 | 45 | nmap <silent> <D-s> :if expand("%") == ""<Bar>browse confirm w<Bar> |
46 | 46 | \ else<Bar>confirm w<Bar>endif<CR> |
@@ -48,7 +48,7 @@ vmap <D-s> <Esc><D-s>gv | ||
48 | 48 | imap <D-s> <C-O><D-s> |
49 | 49 | cmap <D-s> <C-C><D-s> |
50 | 50 | omap <D-s> <Esc><D-s> |
51 | -aunmenu &File.Save\ &As\.\.\. | |
51 | +"aunmenu &File.Save\ &As\.\.\. | |
52 | 52 | amenu 10.350 &File.Save\ &As\.\.\.<Tab><D-S> <D-S-s> |
53 | 53 | nmap <D-S-s> :browse confirm saveas<CR> |
54 | 54 | vmap <D-S-s> <Esc><D-s>gv |
@@ -64,7 +64,7 @@ omap <D-S-s> <Esc><D-s> | ||
64 | 64 | "cmap <D-q> <C-C><D-q> |
65 | 65 | "omap <D-q> <Esc><D-q> |
66 | 66 | " From the Edit menu of SimpleText: |
67 | -aunmenu &Edit.&Undo | |
67 | +"aunmenu &Edit.&Undo | |
68 | 68 | amenu 20.310 &Edit.&Undo<Tab><D-z> <D-z> |
69 | 69 | nmap <D-z> u |
70 | 70 | vmap <D-z> <Esc><D-z>gv |
@@ -80,7 +80,7 @@ vmap <D-c> "+y | ||
80 | 80 | cunmenu &Edit.&Copy |
81 | 81 | cmenu 20.350 &Edit.&Copy<Tab><D-c> <D-c> |
82 | 82 | cmap <D-c> <C-Y> |
83 | -aunmenu &Edit.&Paste | |
83 | +"aunmenu &Edit.&Paste | |
84 | 84 | nmenu 20.360 &Edit.&Paste<Tab><D-v> <D-v> |
85 | 85 | nmap <D-v> "+gP |
86 | 86 | cmenu &Edit.&Paste<Tab><D-v> <D-v> |
@@ -94,7 +94,7 @@ else | ||
94 | 94 | vmap <D-v> "-c<Esc>gix<Esc><SID>Paste"_x |
95 | 95 | imap <D-v> x<Esc><SID>Paste"_s |
96 | 96 | endif |
97 | -aunmenu &Edit.&Select\ All | |
97 | +"aunmenu &Edit.&Select\ All | |
98 | 98 | amenu 20.400 &Edit.Select\ &All<Tab><D-a> <D-a> |
99 | 99 | nmap <silent> <D-a> :if &slm != ""<Bar>exe ":norm gggH<C-O>G"<Bar> |
100 | 100 | \ else<Bar>exe ":norm ggVG"<Bar>endif<CR> |
@@ -102,7 +102,7 @@ vmap <D-a> <Esc><D-a> | ||
102 | 102 | imap <D-a> <Esc><D-a> |
103 | 103 | cmap <D-a> <C-C><D-a> |
104 | 104 | omap <D-a> <Esc><D-a> |
105 | -aunmenu &Edit.&Find | |
105 | +"aunmenu &Edit.&Find | |
106 | 106 | amenu 20.410 &Edit.&Find<Tab><D-f> <D-f> |
107 | 107 | nmap <D-f> / |
108 | 108 | vmap <D-f> <Esc><D-f> |
@@ -2,6 +2,7 @@ | ||
2 | 2 | # see http://2xup.org/log/2006/09/13-0220 |
3 | 3 | # http://kimuraw.txt-nifty.com/d/2006/11/vim_portfile.html |
4 | 4 | set kaoriya_patch vim72-20090321-kaoriya-w32j.exe |
5 | +set kaoriya_path ${worksrcpath}/vim72-kaoriya-w32j | |
5 | 6 | |
6 | 7 | #depends_lib-append lib:libmigemo:cmigemo |
7 | 8 | master_sites-append http://www.kaoriya.net/dist/:kaoriya |
@@ -11,10 +12,12 @@ depends_build-append bin:7za:p7zip | ||
11 | 12 | post-patch { |
12 | 13 | system "7za x ${distpath}/${kaoriya_patch}" |
13 | 14 | if {[variant_isset cocoa]} { |
14 | - file delete ${worksrcpath}/vim72-kaoriya-w32j/patches/0016-transparency_option.diff | |
15 | + file delete ${kaoriya_path}/patches/0016-transparency_option.diff | |
15 | 16 | } |
16 | - system "cat vim72-kaoriya-w32j/patches/*| patch -p0" | |
17 | + system "cat ${kaoriya_path}/patches/*| patch -p0" | |
17 | 18 | system "cat ${portpath}/${filesdir}/patch-fileio.c| patch -p0" |
19 | + system "cat ${portpath}/${filesdir}/vimrc >> ${kaoriya_path}/vimrc" | |
20 | + system "cat ${portpath}/${filesdir}/gvimrc >> ${kaoriya_path}/gvimrc" | |
18 | 21 | } |
19 | 22 | |
20 | 23 | pre-configure { |
@@ -52,6 +55,29 @@ if {![variant_isset aqua] && ![variant_isset cocoa]} {default_variants +aqua} | ||
52 | 55 | post-destroot { |
53 | 56 | set runtimePath \ |
54 | 57 | "${destroot}${applications_dir}/Vim.app/Contents/Resources/vim/runtime" |
58 | + xinstall -m 644 ${kaoriya_path}/vimrc ${kaoriya_path}/gvimrc \ | |
59 | + ${destroot}${applications_dir}/Vim.app/Contents/Resources/vim | |
60 | + xinstall -d ${runtimePath}/lang/ja/LC_MESSAGES | |
61 | + set scripts { \ | |
62 | + encode_japan.vim \ | |
63 | + keymap/azik_cp932.vim \ | |
64 | + keymap/japanese_cp932.vim \ | |
65 | + keymap/tcode_cp932.vim \ | |
66 | + keymap/tutcode_cp932.vim \ | |
67 | + lang/ja/LC_MESSAGES/vim.mo \ | |
68 | + plugin/autodate.vim \ | |
69 | + plugin/cmdex.vim \ | |
70 | + plugin/dicwin.vim \ | |
71 | + plugin/format.vim \ | |
72 | + plugin/hz_ja.vim \ | |
73 | + plugin/scrnmode.vim \ | |
74 | + plugin/verifyenc.vim \ | |
75 | + } | |
76 | + system "gnutar -C ${kaoriya_path}/runtime/ -cf - ${scripts} | \ | |
77 | + gnutar -C ${runtimePath} -xvf -" | |
78 | + foreach f ${scripts} { | |
79 | + file attributes ${runtimePath}/${f} -permissions 0644 | |
80 | + } | |
55 | 81 | file copy ${prefix}/share/migemo/tools/migemo.vim \ |
56 | 82 | ${runtimePath}/plugin/migemo.vim |
57 | 83 | reinplace "s|dict/migemo-dict|dict/\".\\&encoding.\"/migemo-dict|" \ |
@@ -13,7 +13,7 @@ | ||
13 | 13 | #define FF_Y(row) (gui_mac.main_height - FILL_Y(row)) |
14 | 14 | #define FT_Y(row) (gui_mac.main_height - TEXT_Y(row)) |
15 | 15 | -#define VIM_BG_ALPHA ((100 - p_transp) / 100.0) |
16 | -+#define VIM_BG_ALPHA ((p_transp - 255) / 255.0) | |
16 | ++#define VIM_BG_ALPHA (p_transp / 255.0) | |
17 | 17 | |
18 | 18 | /* A simple view to make setting text area, scrollbar position inside |
19 | 19 | * vim window easier */ |