# $Id: Portfile 138279 2015-07-04 00:02:53Z dluke@macports.org $ PortSystem 1.0 name libmilter set major_version 8.15 version ${major_version}.2 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 sha256 24f94b5fd76705f15897a78932a5f2439a32b1a2fdc35769bb1a5f5d9b4db439 \ rmd160 1fe2210e1ded1fe2ee640fceb1de29f19ceaa8e4 worksrcdir sendmail-${version} set arch_flags "${configure.cc_archflags}" post-patch { if [file exists ${worksrcpath}/devtools/OS/Darwin.${os.major}.x] { file copy ${worksrcpath}/devtools/OS/Darwin.${os.major}.x \ ${worksrcpath}/devtools/Site/site.config.m4 } else { 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 -DNETINET6 \ -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}" }