source: trunk/dports/mail/libmilter/Portfile

Last change on this file was 138279, checked in by dluke@…, 2 years ago

libmilter: version bump, update to Sendmail 8.15.2

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# $Id: Portfile 138279 2015-07-04 00:02:53Z ryandesign@macports.org $
2PortSystem 1.0
3
4name                    libmilter
5set major_version       8.15
6version                 ${major_version}.2
7categories              mail
8maintainers             geeklair.net:dluke
9platforms               darwin
10description             libmilter library from Sendmail
11license                 Permissive
12
13long_description        Sendmail's Content Management API (milter) provides \
14                        third-party programs to access mail messages as they \
15                        are being processed by the Mail Transfer Agent (MTA), \
16                        allowing them to examine and modify message content \
17                        and meta-information. Filtering policies implemented \
18                        by Milter-conformant filters may then be centrally \
19                        configured and composed in an end-user's MTA \
20                        configuration file
21
22homepage                http://www.sendmail.org/doc/sendmail-current/libmilter/docs/
23master_sites            ftp://ftp.sendmail.org/pub/sendmail/ \
24                        http://www.mirrorservice.org/sites/ftp.sendmail.org/pub/sendmail/
25distname                sendmail.${version}
26
27checksums       sha256  24f94b5fd76705f15897a78932a5f2439a32b1a2fdc35769bb1a5f5d9b4db439 \
28                rmd160  1fe2210e1ded1fe2ee640fceb1de29f19ceaa8e4
29
30worksrcdir      sendmail-${version}
31
32set arch_flags "${configure.cc_archflags}"
33post-patch {
34        if [file exists ${worksrcpath}/devtools/OS/Darwin.${os.major}.x] {
35                file copy ${worksrcpath}/devtools/OS/Darwin.${os.major}.x \
36                        ${worksrcpath}/devtools/Site/site.config.m4
37        } else {
38                file copy ${worksrcpath}/devtools/OS/Darwin.10.x \
39                        ${worksrcpath}/devtools/Site/site.config.m4
40                reinplace "s|-DDARWIN=100000|-DDARWIN=${os.major}0000|" \
41                        ${worksrcpath}/devtools/Site/site.config.m4
42        }
43        if [variant_isset universal] {
44                reinplace "s|\${Extra_CC_Flags}|${arch_flags}|" \
45                        ${worksrcpath}/devtools/Site/site.config.m4
46        }
47}
48
49use_configure   no
50
51build   {
52                system "cd ${worksrcpath}/${name} && \
53                        ./Build -O ${worksrcpath}/macports"
54       
55                close [open ${worksrcpath}/include/sm_os.h a]
56
57                system "cd ${worksrcpath}/macports/*/${name} && \
58                        ${configure.cc} ${configure.cflags} ${arch_flags}\
59                        -fno-common -DNOT_SENDMAIL -Dsm_snprintf=snprintf \
60                        -D_THREAD_SAFE -DBIND_8_COMPAT -DXP_MT -DNETINET6 \
61                        -I${worksrcpath}/include \
62                        -I${worksrcpath}/sendmail -c *.c"
63               
64                set x {}
65                fs-traverse object ${worksrcpath}/macports {
66                        if {[file isfile ${object}] && [regexp ".o$" ${object}]} {
67                                lappend x ${object}
68                        }
69                }
70
71                set objects [join ${x} " "]
72
73                system "${configure.cc} ${configure.cflags} ${arch_flags} -dynamiclib \
74                        -install_name ${prefix}/lib/${name}.dylib \
75                        -compatibility_version ${major_version} \
76                        -current_version ${version} \
77                        -o ${worksrcpath}/macports/libmilter.dylib ${objects}"
78        }
79
80destroot        {
81                        file copy "${worksrcpath}/macports/libmilter.dylib" \
82                                "${destroot}${prefix}/lib/"
83                        file copy "${worksrcpath}/include/${name}" \
84                                "${destroot}${prefix}/include/"
85                        file delete "${destroot}${prefix}/include/${name}/milter.h"
86                }
87
88variant universal {
89        set arch_flags "${configure.universal_cflags}"
90}
Note: See TracBrowser for help on using the repository browser.