Changeset 98893 for trunk/dports/aqua


Ignore:
Timestamp:
Oct 20, 2012, 8:22:03 AM (7 years ago)
Author:
hum@…
Message:

emacs-mac-app: fix post-extract to overwrite; move files into the app bundle; rename Emacs.app to EmacsMac.app to avoid a conflict with emacs-app; remove conflicts; modify homepage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/aqua/emacs-mac-app/Portfile

    r98848 r98893  
    1414                    GUI support for Mac OS X 10.4 - 10.8.
    1515
    16 homepage            http://www.gnu.org/software/emacs/
     16homepage            http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00803.html
    1717platforms           darwin
    1818license             GPL-3+
     
    3636                    sha256  5a887718c4576f74c26817d473ad6a6e37ceeb72056a7941cce9a689eb21b965
    3737
    38 conflicts           emacs emacs22 emacs23 emacs-snapshot xemacs emacs-app emacs-app-devel
    39 
    4038depends_lib         port:ncurses
    4139
     
    4745    # merge mac port files into emacs distribution.
    4846    copy ${mac_path}/mac ${worksrcpath}
    49     copy ${worksrcpath}/nextstep/Cocoa/Emacs.base/Contents/Resources/Emacs.icns \
     47    copy -force \
     48         ${worksrcpath}/nextstep/Cocoa/Emacs.base/Contents/Resources/Emacs.icns \
    5049         ${worksrcpath}/mac/Emacs.app/Contents/Resources/Emacs.icns
    5150    foreach f [glob ${mac_path}/etc/images/*] {
     
    6867
    6968configure.args      --with-mac \
    70                     --enable-mac-app=${applications_dir} \
    71                     --prefix=${prefix}
     69                    --enable-mac-app=${applications_dir}
    7270
    7371if {${os.major} >= 11 && ${os.platform} == "darwin"} {
     
    7674
    7775post-destroot {
     76    # move files into the app bundle.
     77    # https://github.com/railwaycat/emacs-mac-port/blob/master/build-emacs.app.sh
     78    set app_dir ${destroot}${applications_dir}/Emacs.app/Contents/Resources
     79    set compver [exec uname -m]-apple-darwin[exec uname -r]
     80    foreach d [glob ${destroot}${prefix}/share/emacs/${emacs_version}/*] {
     81        move ${d} ${app_dir}
     82    }
     83    move ${destroot}${prefix}/share/info ${app_dir}
     84    move ${destroot}${prefix}/share/man  ${app_dir}
     85    move ${destroot}${prefix}/var        ${app_dir}
     86    move ${destroot}${prefix}/bin        ${app_dir}/../MacOS
     87    move ${destroot}${prefix}/libexec/emacs/${emacs_version}/${compver} \
     88                                         ${app_dir}/../MacOS/libexec
     89    delete ${destroot}${prefix}
     90    # make the application binary a hard link.
     91    delete ${app_dir}/../MacOS/Emacs
     92    file link -hard ${app_dir}/../MacOS/Emacs ${app_dir}/../MacOS/bin/emacs
     93
    7894    # install additional documents.
    79     xinstall -d ${destroot}${prefix}/share/doc/${name}
     95    set doc_dir ${destroot}${prefix}/share/doc/emacs-mac
     96    xinstall -d ${doc_dir}
    8097    xinstall -m 644 -W ${mac_path} \
    8198        COPYING NEWS-mac README-mac \
    82         ${destroot}${prefix}/share/doc/${name}
     99        ${doc_dir}
    83100    # install site-start.el.
    84     file copy ${filespath}/site-start.el \
    85         ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
    86     reinplace "s|__PREFIX__|${prefix}|g" \
    87         ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp/site-start.el
     101    set site_lisp ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
     102    xinstall -d ${site_lisp}
     103    file copy ${filespath}/site-start.el ${site_lisp}
     104    reinplace "s|__PREFIX__|${prefix}|g" ${site_lisp}/site-start.el
     105    # rename the app bundle to avoid a conflict with emacs-app.
     106    move ${destroot}${applications_dir}/Emacs.app \
     107         ${destroot}${applications_dir}/EmacsMac.app
    88108}
    89109
Note: See TracChangeset for help on using the changeset viewer.