# $Id: Portfile 105475 2013-04-22 13:53:52Z dluke@macports.org $ PortSystem 1.0 name libmilter set major_version 8.14 version ${major_version}.7 categories mail maintainers geeklair.net:dluke platforms darwin description libmilter library from Sendmail license Permissive long_description Sendmail's Content Management API (milter) provides \ third-party programs to access mail messages as they \ are being processed by the Mail Transfer Agent (MTA), \ allowing them to examine and modify message content \ and meta-information. Filtering policies implemented \ by Milter-conformant filters may then be centrally \ configured and composed in an end-user's MTA \ configuration file homepage http://www.sendmail.org/doc/sendmail-current/libmilter/docs/ master_sites ftp://ftp.sendmail.org/pub/sendmail/ \ http://www.mirrorservice.org/sites/ftp.sendmail.org/pub/sendmail/ distname sendmail.${version} checksums md5 348eedfab0ed00931f2df94e78f22c43 \ sha1 7a16bfd3f14e877b30e6dff4952ab6ae49951314 \ rmd160 6bef8342f9b5e207a7e5e34ece470becf08ef332 worksrcdir sendmail-${version} set arch_flags "${configure.cc_archflags}" post-patch { file copy ${worksrcpath}/devtools/OS/Darwin.10.x \ ${worksrcpath}/devtools/Site/site.config.m4 reinplace "s|-DDARWIN=100000|-DDARWIN=${os.major}0000|" \ ${worksrcpath}/devtools/Site/site.config.m4 if [variant_isset universal] { reinplace "s|\${Extra_CC_Flags}|${arch_flags}|" \ ${worksrcpath}/devtools/Site/site.config.m4 } } use_configure no build { system "cd ${worksrcpath}/${name} && \ ./Build -O ${worksrcpath}/macports" close [open ${worksrcpath}/include/sm_os.h a] system "cd ${worksrcpath}/macports/*/${name} && \ ${configure.cc} ${configure.cflags} ${arch_flags}\ -fno-common -DNOT_SENDMAIL -Dsm_snprintf=snprintf \ -D_THREAD_SAFE -DBIND_8_COMPAT -DXP_MT \ -I${worksrcpath}/include \ -I${worksrcpath}/sendmail -c *.c" set x {} fs-traverse object ${worksrcpath}/macports { if {[file isfile ${object}] && [regexp ".o$" ${object}]} { lappend x ${object} } } set objects [join ${x} " "] system "${configure.cc} ${configure.cflags} ${arch_flags} -dynamiclib \ -install_name ${prefix}/lib/${name}.dylib \ -compatibility_version ${major_version} \ -current_version ${version} \ -o ${worksrcpath}/macports/libmilter.dylib ${objects}" } destroot { file copy "${worksrcpath}/macports/libmilter.dylib" \ "${destroot}${prefix}/lib/" file copy "${worksrcpath}/include/${name}" \ "${destroot}${prefix}/include/" file delete "${destroot}${prefix}/include/${name}/milter.h" } variant universal { set arch_flags "${configure.universal_cflags}" }