OSDN Git Service

macvim 20090425
[splhack/MacPorts.git] / editors / macvim / Portfile
index de75b35..8af1ad6 100644 (file)
@@ -2,21 +2,21 @@
 PortSystem     1.0
 
 name                           macvim
-version                                7.2.148
-revision                       1
+version                                20090425
+revision                       0
 categories                     editors
 platforms                      darwin
 maintainers                    nomaintainer
 description                    MacVim is a port of the text editor Vim to Mac OS X.
 long_description       MacVim supports multiple windows with tabbed editing and a host of other features. \
                                        MacVim brings you the full power of Vim to Mac OS X.
-homepage                       http://code.google.com/p/macvim/
+homepage                       http://code.google.com/p/macvim-kaoriya/
 
-set gittag                     a3824cb1356c9f85f592ce13486d11b00bf3640c
+set gittag                     ${version}
 distname                       KaoriYa-${gittag}
 use_zip                                yes
 checksums                      \
-       ${distname}.zip sha1 a0a0e4570589637cf47535b99bdd47ecd0ea5529
+       ${distname}.zip sha1 366acbbbb0a47297622088c19897a691245b71df
 master_sites           \
        "http://repo.or.cz/w/MacVim/KaoriYa.git?a=snapshot;h=${gittag};sf=zip&"
 worksrcdir                     KaoriYa/src
@@ -37,6 +37,14 @@ configure.args               --enable-gui=macvim \
 configure.cppflags     -I${prefix}/include
 configure.ldflags      -L${prefix}/lib
 
+if {[variant_isset universal]} {
+       configure.universal_target      10.4
+       configure.args-append           --with-mac-arch=both
+       set xcodeconfig Universal
+} else {
+       set xcodeconfig Release
+}
+
 use_parallel_build     yes
 
 variant perl description {Enable Perl scripting} {
@@ -59,9 +67,6 @@ variant tcl description {Enable Tcl scripting} {
 variant cscope description {Enable source code browsing with cscope} {
        configure.args-append   --enable-cscope
 }
-variant universal {
-       configure.args-append   --with-mac-arch=both
-}
 
 post-patch {
        reinplace \
@@ -69,16 +74,8 @@ post-patch {
                ${worksrcpath}/MacVim/mvim
 }
 
-pre-configure {
-       system "make autoconf"
-}
-
 post-build {
-       if {[variant_isset universal]} {
-               set xcodeconfig Universal
-       } else {
-               set xcodeconfig Release
-       }
+       system "cd ${worksrcpath}/po; make ja_JP.UTF-8.mo"
        system "cd ${worksrcpath}/MacVim; xcodebuild -configuration ${xcodeconfig}"
 }
 
@@ -91,11 +88,11 @@ set appPath "${destroot}${applications_dir}/MacVim.app/Contents"
 set runtimePath "${appPath}/Resources/vim/runtime"
 
 destroot {
-       file copy ${worksrcpath}/MacVim/build/Release/MacVim.app ${destroot}${applications_dir}
+       file copy ${worksrcpath}/MacVim/build/${xcodeconfig}/MacVim.app ${destroot}${applications_dir}
        xinstall -m 755 ${worksrcpath}/MacVim/mvim ${destroot}${prefix}/bin
-       xinstall -d 755 ${runtimePath}/lang/ja/LC_MESSAGES
-       xinstall -m 644 ${worksrcpath}/po/ja.mo \
-               ${runtimePath}/lang/ja/LC_MESSAGES/vim.mo
+       xinstall -d 755 ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES
+       xinstall -m 644 ${worksrcpath}/po/ja_JP.UTF-8.mo \
+               ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES/vim.mo
        file copy ${prefix}/share/migemo/tools/migemo.vim \
                ${runtimePath}/plugin/migemo.vim
 }
@@ -103,6 +100,13 @@ destroot {
 test.run                       yes
 
 variant standalone description {Enable standalonize} {
+       configure.env-append    PATH="/usr/bin:${env(PATH)}"
+       configure.cppflags-append       -DDYNAMIC_PERL -DDYNAMIC_PYTHON -DDYNAMIC_RUBY
+       post-configure {
+               reinplace "s|^PERL_LIBS|#PERL_LIBS|" ${worksrcpath}/auto/config.mk
+               reinplace "s|^PYTHON_LIBS|#PYTHON_LIBS|" ${worksrcpath}/auto/config.mk
+               reinplace "s|^RUBY_LIBS|#RUBY_LIBS|" ${worksrcpath}/auto/config.mk
+       }
        post-destroot {
                foreach dylib {intl.8 iconv.2 migemo.1 ncurses.5} {
                        set libname [lindex [split ${dylib} .] 0]
@@ -125,8 +129,13 @@ variant standalone description {Enable standalonize} {
                        ${appPath}/Frameworks/libintl.dylib"
 
                xinstall -d 755 ${runtimePath}/dict
-               xinstall -m 644 ${prefix}/share/migemo/utf-8/migemo-dict \
-                       ${runtimePath}/dict
+               foreach mdict {han2zen.dat hira2kata.dat \
+                               migemo-dict roma2hira.dat zen2han.dat} {
+                       xinstall -m 644 ${prefix}/share/migemo/utf-8/${mdict} \
+                               ${runtimePath}/dict
+               }
+
+               xinstall -m 755 ${prefix}/bin/jexctags ${appPath}/MacOS/ctags
        }
 }