Ticket #11030: i386-mingw32-libunicows.Portfile

File i386-mingw32-libunicows.Portfile, 2.8 KB (added by afb@…, 18 years ago)

Portfile

Line 
1# $Id$
2
3PortSystem 1.0
4
5name                    i386-mingw32-libunicows
6version                 1.1.1
7categories              cross devel
8maintainers             darwinports@opendarwin.org
9description             makes writing Unicode-enabled applications for Win 9x a bit easier
10long_description        Traditionally, win32 Unicode API was only available on \
11                                Windows NT or 2000. If you wanted to take advantage of Unicode \
12                                in your application and support Windows 95/98 at the same time, \
13                                your only option was to deploy two executables, one for NT and \
14                                one for 9X. Fortunately, this changed in 2001 when MS (finally!) \
15                                released MSLU runtime that allows Unicode applications to run \
16                                under Windows 9X. \
17                                \
18                                Less fortunately, this solution requires that you use a special \
19                                statically linked import library that decides at runtime whether \
20                                to load symbols from system libraries like kernel32.dll or \
21                                user32.dll (in case of Windows NT) or from unicows.dll \
22                                (which provides Unicode emulation layer under 9X). \
23                                This import library is only available for Microsoft Visual C++ \
24                                and is only part of the new Platform SDK, which is rather huge package. \
25                                libunicows contains independent implementation of the import library. \
26                                \
27                                For a free runtime DLL, take a look at http://opencow.sourceforge.net/
28
29homepage                http://libunicows.sourceforge.net/
30master_sites    sourceforge:libunicows
31distfiles               libunicows-${version}-src.tar.gz
32                                #libunicows-${version}-mingw32.zip # (binary)
33
34checksums               libunicows-${version}-src.tar.gz \
35                                        md5 e321b0fd4d0a50fcc83fd66dbed67ce1 \
36                                libunicows-${version}-src.tar.gz \
37                                        sha1 7ad79f37e6c7c645cc002507af9bf22a5b8389c6 \
38                                libunicows-${version}-src.tar.gz \
39                                        rmd160 0ce07693aceaa1c9b9d333666b8154c408331499 \
40
41depends_build   port:nasm \
42                                port:i386-mingw32-gcc \
43                                port:i386-mingw32-binutils
44
45set worksrcdir  libunicows-${version}/src
46post-extract {
47        reinplace "s/= gcc/= i386-mingw32-gcc/" ${worksrcpath}/makefile.mingw32
48        reinplace "s/= ld/= i386-mingw32-ld/" ${worksrcpath}/makefile.mingw32
49        reinplace "s/= ranlib/= i386-mingw32-ranlib/" ${worksrcpath}/makefile.mingw32
50        reinplace "s/= ar/= i386-mingw32-ar/" ${worksrcpath}/makefile.mingw32
51        reinplace "s/= strip/= i386-mingw32-strip/" ${worksrcpath}/makefile.mingw32
52}
53
54configure       {}
55post-configure {
56        xinstall -d ${worksrcpath}/build/mingw32
57        xinstall -d ${worksrcpath}/../lib/mingw32
58}
59
60build.cmd               make -f makefile.mingw32
61
62destroot                {}
63post-destroot {
64        cd ${workpath}/libunicows-${version}/lib/mingw32
65        xinstall -d -m 755 ${destroot}${prefix}/i386-mingw32/lib
66        xinstall -m 644 libunicows.a \
67                ${destroot}${prefix}/i386-mingw32/lib
68
69        cd ${workpath}/libunicows-${version}/docs
70        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
71        xinstall -m 644 license.txt readme.txt \
72                ${destroot}${prefix}/share/doc/${name}
73}