source: trunk/dports/devel/pth/Portfile

Last change on this file was 144492, checked in by ionic@…, 21 months ago

pth: work around bug on PPC-platforms leading to programs using pth looping endlessly. Fixes: #49790.

Switch to sigsetjmp/siglongjmp instead of makecontext/setcontext when
detecting a PPC build. For universal builds, x86(_64) will equally be
using ssj/slj, but no functionality will be lost.

Note that dependent software should be revbumped after this change.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 144492 2016-01-10 05:56:47Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                pth
7version             2.0.7
8revision            1
9categories          devel
10license             LGPL-2.1+
11maintainers         nomaintainer
12description         GNU Portable Threads
13long_description    Pth is a very portable POSIX/ANSI-C based library for Unix platforms \
14                    which provides non-preemptive priority-based scheduling for multiple \
15                    threads of execution ("multithreading") inside server applications. All \
16                    threads run in the same address space of the server application, but \
17                    each thread has its own individual program-counter, run-time stack, \
18                    signal mask and errno variable.
19
20platforms           darwin
21
22homepage            http://www.gnu.org/software/pth/
23master_sites        gnu
24
25checksums           md5 9cb4a25331a4c4db866a31cbe507c793 \
26                    sha1 9a71915c89ff2414de69fe104ae1016d513afeee
27
28configure.args      --mandir=${prefix}/share/man
29
30post-configure {
31    reinplace "s|CC -dynamiclib|CC -dynamiclib [get_canonical_archflags]|g" ${worksrcpath}/libtool
32}
33
34use_parallel_build  no
35
36platform darwin {
37    # makecontext/setcontext (the default) is leading to infinite loops in programs on PPC-platforms.
38    # Switch to setjmp/longjmp when building for one of these platforms.
39    # Latter should work equally well on x86(_64).
40    if {![variant_isset universal]} {
41        if {[lsearch ${build_arch} ppc*] != -1} {
42            configure.args-append --with-mctx-mth=sjlj --with-mctx-dsp=ssjlj --with-mctx-stk=sas
43        }
44    }
45
46    variant universal {
47        if {[lsearch ${universal_archs} ppc*] != -1} {
48            configure.args-append --with-mctx-mth=sjlj --with-mctx-dsp=ssjlj --with-mctx-stk=sas
49        }
50    }
51}
52
53post-destroot {
54    reinplace -E {s|-arch [a-z0-9_]+||g} \
55        ${destroot}${prefix}/bin/pth-config
56
57    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
58    xinstall -m 644 -W ${worksrcpath} ANNOUNCE AUTHORS ChangeLog COPYING \
59        HACKING HISTORY INSTALL NEWS PORTING README SUPPORT TESTS THANKS \
60        USERS ${destroot}${prefix}/share/doc/${name}
61}
Note: See TracBrowser for help on using the repository browser.