/
Portfile
82 lines (56 loc) · 2.47 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
PortGroup cmake 1.0
PortGroup github 1.0
github.setup glfw glfw bf0adc2c7071485be1d5daf8aa1a0c88ef970281
version 3.1.0_20140325
checksums rmd160 9e20b03b4a40cbd20ffa7882e4cb6071af5e4c9f \
sha256 4a1749e5695279c3e14567c16070ada16c67df21a75505a5e3ef307bc8f4f5ca
categories graphics
maintainers michaelld openmaintainer
description GLFW is a free, open-source, portable library for OpenGL and OpenGL ES application development
license zlib
platforms darwin macosx
long_description ${description}: \
This port follows the GIT master version of GLFW, which is typically updated every few days to weeks.
# use the real home page, not github's
homepage http://www.glfw.org/
# do VPATH build
set vpath ${workpath}/build
pre-configure { file mkdir ${vpath} }
configure.dir ${vpath}
build.dir ${vpath}
# configuration arguments for MacPorts build
configure.args -DBUILD_SHARED_LIBS=on \
-DGLFW_BUILD_EXAMPLES=off \
-DGLFW_BUILD_TESTS=off
# remove top-level include path, such that internal headers are used
# instead of any already-installed ones.
configure.cppflags-delete -I${prefix}/include
# remove top-level library path, such that internal libraries are used
# instead of any already-installed ones.
configure.ldflags-delete -L${prefix}/lib
# set last configure argument to the reletive path
# to the top-level cmake source
configure.post_args ../${worksrcdir}
# be verbose when building, for debugging purposes
build.post_args VERBOSE=1
variant docs description {build documentation} {}
default_variants +docs
if {[variant_isset docs]} {
depends_build-append port:doxygen
configure.args-append -DDOXYGEN_EXECUTABLE=${prefix}/bin/doxygen
} else {
configure.args-append -DDOXYGEN_EXECUTABLE=
}
post-destroot {
# move cmake Modules to an appropriate location
xinstall -m 755 -d ${destroot}${prefix}/share/cmake
move ${destroot}${prefix}/lib/cmake/glfw ${destroot}${prefix}/share/cmake
# copy html docs if requested
if {[variant_isset docs]} {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
copy ${vpath}/docs/html ${destroot}${prefix}/share/doc/${name}
}
}