Changeset 23516


Ignore:
Timestamp:
Apr 3, 2007, 4:30:46 PM (13 years ago)
Author:
yves@…
Message:

Make a more complete check :
for Apple X11 with or without X11SDK (ticket:6188)
for Apple X11SDK without X11 (ticket:10238)
Also good for ticket:1551

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/x11/XFree86/Portfile

    r23511 r23516  
    2929
    3030patchfiles \
    31     darwin.cf.diff darwinKeyboard.c.diff detect.mk.diff \
    32     patch-GL_apple-Imakefile patch-GL_apple-dri_driver.h \
    33     patch-Xserver-darwin.c patch-Xserver-darwin-Imakefile \
    34     xterm_Imakefile.diff XTerm.ad.diff xfree86.fink.patch
     31    darwin.cf.diff \
     32    darwinKeyboard.c.diff \
     33    detect.mk.diff \
     34    patch-GL_apple-Imakefile \
     35    patch-GL_apple-dri_driver.h \
     36    patch-Xserver-darwin.c \
     37    patch-Xserver-darwin-Imakefile \
     38    xterm_Imakefile.diff \
     39    XTerm.ad.diff \
     40    xfree86.fink.patch
    3541
    3642depends_build   bin:perl:perl5.8
     
    4349destroot.target install install.man
    4450
    45 pre-fetch {
    46     if { [file exists ${prefix}/bin/quartz-wm] } {
    47         ui_msg ""
    48         ui_warn "
    49             You have an Apple X11 installation already.
    50                 MacPorts will not overwrite it.
    51             If you really want to use XFree86 instead,
    52                 please move it aside first :
     51platform darwin {
    5352
    54                     sudo mv /usr/X11R6 /usr/X11R6.apple
    55         "
    56         exit 1
     53    post-patch {
     54        file mkdir "${workpath}/include"
     55        file link -symbolic "${workpath}/include/security" "/usr/include/pam"
    5756    }
    58 }
    5957
    60 platform darwin {
    6158    configure {
    6259        set hostfd [open "${worksrcpath}/config/cf/host.def" a+]
     
    6865        close $hostfd
    6966    }
    70 
    71     post-patch {
    72         file mkdir "${workpath}/include"
    73         file link -symbolic "${workpath}/include/security" "/usr/include/pam"
    74     }
    7567}
    7668
    77 platform macosx {
    78     # Should be fixed in Imakefile
    79     pre-destroot {
    80         reinplace \
    81             "s|\$\(DESTDIR\)\[\[:space:\]\]\[\[:space:\]\]*\$\(|\$\(DESTDIR\)\$\(|g" \
    82                 ${worksrcpath}/programs/Xserver/Makefile
    83      }
    84      post-destroot {
    85         xinstall -d ${destroot}/Applications/MacPorts
    86         cd ${destroot}/Applications/MacPorts
    87         system "ln -s ${prefix}/bin/XDarwin.app"
    88     }
    89 }
    9069
    9170platform puredarwin {
     71
    9272    post-configure      {
    9373        set hostfd [open "${worksrcpath}/config/cf/host.def" a+]
     
    9878    }
    9979}
     80
     81platform macosx {
     82
     83    # Should also check for cookie crumbs in the keyboard
     84    pre-fetch {
     85        if { [file exists ${prefix}/bin/quartz-wm] } {
     86            ui_msg ""
     87            if { ![file exists ${prefix}/include/X11/X.h] } {
     88                ui_error "
     89                    You have an Apple X11 installation already.
     90                        MacPorts will not overwrite it.
     91
     92                    If you wish to use Apple X11,
     93                        install the X11SDK included with Xcode tools.
     94
     95                    If you really want to use XFree86 instead,
     96                        please move it aside first :
     97
     98                            sudo mv /usr/X11R6 /usr/X11R6.apple
     99                "
     100             } else {
     101                ui_error "
     102                    You have an Apple X11 installation already.
     103                        MacPorts will not overwrite it.
     104
     105                    If you really want to use XFree86 instead,
     106                        please move it aside first :
     107
     108                            sudo mv /usr/X11R6 /usr/X11R6.apple
     109                "
     110             }
     111        } elseif { ![file exists ${prefix}/lib/libX11.dylib] } {
     112            ui_msg ""
     113            ui_error "
     114                    You have an Apple X11SDK installation already.
     115                        MacPorts will not overwrite it.
     116
     117                    If you wish to use Apple X11,
     118                        install it from your MacOSX install disc.
     119
     120                    If you really want to use XFree86 instead,
     121                        please move it aside first :
     122
     123                            sudo mv /usr/X11R6 /usr/X11R6.apple
     124            "
     125        }
     126    }
     127
     128    # Dirty hack, should be fixed in Imakefile
     129    pre-destroot {
     130        reinplace \
     131            "s|\$\(DESTDIR\)\[\[:space:\]\]\[\[:space:\]\]*\$\(|\$\(DESTDIR\)\$\(|g" \
     132                ${worksrcpath}/programs/Xserver/Makefile
     133     }
     134
     135     post-destroot {
     136        xinstall -d ${destroot}/Applications/MacPorts
     137        cd ${destroot}/Applications/MacPorts
     138        system "ln -s ${prefix}/bin/XDarwin.app"
     139    }
     140}
Note: See TracChangeset for help on using the changeset viewer.