/
Portfile
66 lines (55 loc) · 1.87 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# $Id$
PortSystem 1.0
name libsdl_net-framework
version 1.2.5
platforms macosx
categories devel net
maintainers darwinports@opendarwin.org
description cross-platform networking library
long_description This is a small sample cross-platform networking \
library, with a sample chat client and server \
application. The chat client uses the GUIlib GUI \
framework library.
homepage http://www.libsdl.org/projects/SDL_net/
master_sites ${homepage}/release/
distname SDL_net-${version}
dist_subdir libsdl_net
checksums md5 e45b1048d2747480dcc65ece4130a920
depends_lib port:libsdl-framework \
port:libsdl_net
configure.args --disable-sdltest
set buildindir build
platform darwin 8 {
if {$xcodeversion == "2.1"} {
set buildindir build/Deployment
}
}
post-extract {
system "cd ${worksrcpath} && tar -xvzf PBProjects.tar.gz"
}
post-patch {
reinplace "s|~/Library/Frameworks|./build/Frameworks|g" \
${worksrcpath}/PBProjects/SDL_net.pbproj/project.pbxproj
reinplace "s|\$(HOME)/Library/Frameworks|/Library/Frameworks|g" \
${worksrcpath}/PBProjects/SDL_net.pbproj/project.pbxproj
reinplace "s|\$HOME/Library/Frameworks|/Library/Frameworks|g" \
${worksrcpath}/PBProjects/SDL_net.pbproj/project.pbxproj
reinplace "s|build/SDL_net.framework|${buildindir}/SDL_net.framework|g" \
${worksrcpath}/PBProjects/SDL_net.pbproj/project.pbxproj
}
build.dir "${worksrcpath}/PBProjects"
build.type pbx
build.target -buildstyle Deployment -target Framework
post-build {
cd ${worksrcpath}/PBProjects
system "install_name_tool -id /Library/Frameworks/SDL_net.framework/SDL_net \
build/Frameworks/SDL_net.framework/SDL_net"
}
destroot {
cd "${worksrcpath}/PBProjects/build/Frameworks"
xinstall -d -m 0755 ${destroot}/Library/Frameworks
system "cp -R SDL_net.framework ${destroot}/Library/Frameworks"
}
platform darwin 6 {
depends_lib-append lib:libdl:dlcompat
}