Ticket #51130: Portfile

File Portfile, 2.1 KB (added by jan@…, 8 years ago)

Updated Portfile

Line 
1# $Id$
2
3PortSystem 1.0
4
5name                    nsis
6version                 2.51
7categories              devel
8license                 zlib CPL-1 MIT
9platforms               darwin
10maintainers             nomaintainer
11homepage                http://nsis.sourceforge.net/
12description             NSIS is a tool for creating win32 installers.
13long_description        NSIS (Nullsoft Scriptable Install System) is a tool \
14                        that allows programmers to create software installers \
15                        for Windows. It is released under an open source \
16                        license and is completely free for any use.
17
18master_sites            sourceforge
19
20distfiles               nsis-${version}-src.tar.bz2 \
21                        nsis-${version}.zip
22checksums               nsis-${version}-src.tar.bz2 \
23                                md5     002538226a72a38ba1abb0d5d4ffdc45 \
24                                sha1    b27ad336a6110285c8ff211fa7594892e1f1bbcc \
25                                rmd160  deffd8b7f1423cf2bf69c3b46fd03c9b756c1494 \
26                        nsis-${version}.zip \
27                                md5     d7ac858776a1cf0ed11cb78029c84c0a \
28                                sha1    8366044a9e78878e48eeaaae6c2e203d99321cf5 \
29                                rmd160  946b37e26d694dd97ca7b40cee05d31635cd3316
30
31worksrcdir              nsis-${version}-src
32use_bzip2               yes
33
34depends_build           port:scons port:i386-mingw32-gcc
35
36extract.only            nsis-${version}-src.tar.bz2
37
38post-extract {
39        system "cd ${workpath} && unzip ${distpath}/nsis-${version}.zip"
40}
41
42use_configure           no
43
44# nsis can only ever be built 32-bit, but relies on libiconv. Since the dependency is limited to only iconv,
45# we will rely on the base system 32-bit libiconv installation. Should MacPorts switch to 32-bit/64-bit universal
46# builds by default, this decision should be revisited.
47set scons.args          "PREFIX=\"${prefix}\" PREFIX_DEST=\"${destroot}\" SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all"
48# APPEND_CPPPATH=\"${prefix}/include\" APPEND_LIBPATH=\"${prefix}/lib\"
49
50build {
51        system "cd ${worksrcpath} && scons ${scons.args}"
52}
53
54destroot {
55        system "cd ${worksrcpath} && scons ${scons.args} install"
56        foreach dir {Bin Docs Include Plugins Contrib Examples Menu Stubs} {
57                file delete -force ${destpath}${prefix}/share/nsis/${dir}
58                file copy -force ${workpath}/nsis-${version}/${dir} ${destpath}${prefix}/share/nsis
59        }
60        system "chmod -R go-w '${destpath}${prefix}/share/nsis'"
61}