Ticket #43233: patch-asterisk-Portfile.2.diff
File patch-asterisk-Portfile.2.diff, 4.9 KB (added by jul_bsd@…, 11 years ago) |
---|
-
net/asterisk/Portfile
old new 4 4 PortSystem 1.0 5 5 6 6 name asterisk 7 version 1 .6.2.207 version 12.1.1 8 8 categories net 9 9 license GPL-2 10 10 platforms darwin … … 33 33 port:spandsp-devel \ 34 34 port:speex \ 35 35 port:sqlite3 \ 36 port:wget 36 port:wget \ 37 port:jansson 38 ## Optional components: libpri DAHDI 39 40 ## need specific ice-cpp w patch https://wiki.asterisk.org/wiki/display/TOP/System+Requirements 41 depends_build port:cmake port:boost 42 # port:zeroc-ice34 => fails to build 37 43 38 checksums rmd160 8584d0f2e274517ce84576dfa7e936b9befb9fe2\39 sha256 4f3ef1de4644195e0d91816d6741c46ddb5d9ad28b07e631f594674ac9006a2744 checksums rmd160 def51844b5bca9ad3faa8964272c58cbfaf6c150 \ 45 sha256 c53f51b2dea22ca5b2f042562cfc9e021f9dbda64293ef3652f569f86f65b4ba 40 46 41 47 startupitem.create yes 42 48 startupitem.netchange yes 43 startupitem.executable ${prefix}/sbin/asterisk -d 49 startupitem.executable ${prefix}/sbin/asterisk -d -U asterisk -G asterisk -C ${prefix}/etc/asterisk.conf 44 50 45 51 universal_variant no 46 52 47 patchfiles makeopts.in.diff menuselect_Makefile.diff 53 #patchfiles makeopts.in.diff menuselect_Makefile.diff 54 patchfiles patch-makeopts.in.diff 48 55 49 56 configure.args --without-h323 \ 50 --without-netsnmp 57 --without-netsnmp \ 58 --with-crypto=${prefix} --with-curses=${prefix} \ 59 --with-iconv=${prefix} --with-sqlite3=${prefix} \ 60 --with-ssl=${prefix} 51 61 52 62 configure.optflags -O3 63 ## http://comments.gmane.org/gmane.comp.telephony.pbx.asterisk.devel/62632 64 configure.compiler macports-gcc-4.9 53 65 54 66 build.env ASTCFLAGS=-I${prefix}/include \ 55 67 ASTLDFLAGS=-L${prefix}/lib \ … … 67 79 ${destroot}${prefix}/var/spool/asterisk/tmp \ 68 80 ${destroot}${prefix}/var/spool/asterisk/voicemail 69 81 82 #pre-configure { 83 # system "cd ${worksrcpath} && ./cmake/init-cmake.sh -DCMAKE_INSTALL_PREFIX=${prefix}" 84 #} 85 86 post-configure { 87 addgroup asterisk 88 add_users asterisk gid=[existsgroup asterisk] home=${prefix}/var/spool/asterisk shell=/sbin/nologin realname=Asterisk\ user 89 } 90 70 91 variant home_sound_cache description {Use/Build sound file cache from .asterisk_sounds_cache in your home directory} { 71 92 configure.args-append --with-sounds-cache=~/.asterisk_sounds_cache 72 93 } 73 94 95 variant snmp description { snmp support } { 96 depends_lib port:net-snmp 97 configure.args-delete --without-netsnmp 98 configure.args-append --with-netsnmp=${prefix} 99 } 100 101 variant libpri description { libpri support } { 102 depends_lib port:libpri 103 configure.args-append --with-pri=${prefix} 104 } 105 106 variant dahdi description { dahdi support } { 107 depends_lib port:dahdi 108 configure.args-append --with-dahdi=${prefix} 109 } 110 111 variant ldap description { ldap support } { 112 depends_lib-append port:openldap 113 configure.args-append --with-ldap=${prefix} 114 } 115 116 variant libiodbc description { use libiodbc for ODBC access } { 117 depends_lib-append port:libiodbc 118 } 119 120 variant unixodbc description { use unixodbc for ODBC access } { 121 depends_lib-append port:unixODBC 122 } 123 74 124 post-destroot { 75 system "rsync -a ${worksrcpath}/configs/*.sample ${destroot}${prefix}/etc/asterisk" 76 xinstall -m 644 ${filespath}/asterisk.conf.sample.in ${destroot}${prefix}/etc/asterisk/asterisk.conf.sample 77 reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${prefix}/etc/asterisk/asterisk.conf.sample 78 xinstall -d ${destroot}${prefix}/var/log/asterisk \ 125 xinstall -d ${destroot}${prefix}/share/examples/${name} 126 system "rsync -a ${worksrcpath}/configs/*.sample ${destroot}${prefix}/share/examples/${name}/" 127 xinstall -m 644 ${filespath}/asterisk.conf.sample.in ${destroot}${prefix}/share/examples/${name}/asterisk.conf.sample 128 reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${prefix}/share/examples/${name}/asterisk.conf.sample 129 xinstall -d -o asterisk -g asterisk ${destroot}${prefix}/var/log/asterisk \ 79 130 ${destroot}${prefix}/var/run/asterisk \ 80 131 ${destroot}${prefix}/var/spool/asterisk/outgoing 81 132 } 133 134 post-activate { 135 foreach f [glob -directory ${prefix}/share/examples/${name} *.sample] { 136 set fname [file tail $f] 137 set fname trimright .sample 138 if ![file exists ${prefix}/etc/${name}/${fname} ] { 139 copy ${f} ${prefix}/etc/${name}/${fname} 140 } 141 } 142 } 143 144 livecheck.type regex 145 livecheck.url ${homepage}/downloads/asterisk/all-asterisk-versions 146 livecheck.regex "<p>Latest Version - (\\d+(?:\\.\\d+)*)</p>"