diff --git a/lang/php/Portfile b/lang/php/Portfile
index 640f0ce..eacb180 100644
a
|
b
|
|
1 | 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 144450 2016-01-09 07:00:52Z ryandesign@macports.org $ |
| 2 | # $Id$ |
3 | 3 | |
4 | 4 | PortSystem 1.0 |
5 | 5 | PortGroup php 1.1 |
… |
… |
if {[vercmp ${major} 5] > 0} { |
150 | 150 | } |
151 | 151 | |
152 | 152 | if {[is_sapi_subport]} { |
153 | | |
| 153 | |
154 | 154 | depends_build port:pkgconfig |
155 | | |
| 155 | |
156 | 156 | if {${subport} ne ${php}} { |
157 | 157 | depends_lib port:${php} |
158 | 158 | } |
159 | | |
| 159 | |
160 | 160 | depends_lib-append path:bin/gsed:gsed \ |
161 | 161 | port:libiconv \ |
162 | 162 | port:libxml2 \ |
… |
… |
if {[is_sapi_subport]} { |
164 | 164 | port:mhash \ |
165 | 165 | port:pcre \ |
166 | 166 | port:zlib |
167 | | |
| 167 | |
168 | 168 | # Use -p1 to accommodate the Suhosin patch |
169 | 169 | patch.pre_args -p1 |
170 | 170 | patchfiles patch-${php}-scripts-php-config.in.diff |
171 | | |
| 171 | |
172 | 172 | if {[vercmp ${branch} 5.2] <= 0} { |
173 | 173 | patchfiles-append \ |
174 | 174 | patch-${php}-libxml-2.9.diff \ |
… |
… |
if {[is_sapi_subport]} { |
179 | 179 | # Tested all subports (except oracle) and they built with clang-425. The reported failure was with Xcode 4.2. |
180 | 180 | # Xcode 4.3 may work, but leaving it blacklisted due to lack of testing |
181 | 181 | compiler.blacklist {clang < 400} |
182 | | |
| 182 | |
183 | 183 | set phpinidir ${prefix}/etc/${php} |
184 | 184 | set extraphpinidir ${prefix}/var/db/${php} |
185 | | |
| 185 | |
186 | 186 | configure.args --mandir=${prefix}/share/man \ |
187 | 187 | --infodir=${prefix}/share/info \ |
188 | 188 | --program-suffix=[php.suffix_from_branch ${branch}] \ |
… |
… |
if {[is_sapi_subport]} { |
213 | 213 | --without-pear \ |
214 | 214 | --disable-cgi \ |
215 | 215 | --disable-cli |
216 | | |
| 216 | |
217 | 217 | if {[vercmp ${branch} 5.3] >= 0} { |
218 | 218 | configure.args-append \ |
219 | 219 | --enable-fileinfo \ |
220 | 220 | --enable-phar \ |
221 | 221 | --disable-fpm |
222 | | |
| 222 | |
223 | 223 | # ${php}-mysql +mysqlnd needs mysqlnd support compiled into the SAPI |
224 | 224 | configure.env-append \ |
225 | 225 | PHP_MYSQLND_ENABLED=yes |
226 | 226 | } |
227 | | |
| 227 | |
228 | 228 | if {[vercmp ${branch} 5.4] == 0} { |
229 | 229 | # https://bugs.php.net/bug.php?id=68114 |
230 | 230 | configure.args-append ac_cv_decimal_fp_supported=no |
231 | 231 | } |
232 | | |
| 232 | |
233 | 233 | configure.universal_args-delete --disable-dependency-tracking |
234 | | |
| 234 | |
235 | 235 | test.run yes |
236 | | |
| 236 | |
237 | 237 | destroot.args INSTALL_ROOT=${destroot} |
238 | | |
| 238 | |
239 | 239 | variant debug description {Enable debug support (useful to analyze a PHP-related core dump)} { |
240 | 240 | configure.args-append --enable-debug |
241 | 241 | } |
242 | | |
| 242 | |
243 | 243 | if {[vercmp ${branch} 5.3] <= 0} { |
244 | 244 | variant suhosin description {Add Suhosin patch} { |
245 | 245 | pre-fetch { |
… |
… |
if {[is_sapi_subport]} { |
269 | 269 | } |
270 | 270 | } |
271 | 271 | } |
272 | | |
| 272 | |
273 | 273 | if {${subport} ne ${php}} { |
274 | 274 | notes-append "If this is your first install, you need to enable ${subport} in your web server." |
275 | 275 | } |
276 | | |
| 276 | |
277 | 277 | } |
278 | 278 | |
279 | 279 | } |
… |
… |
if {[is_sapi_subport]} { |
282 | 282 | |
283 | 283 | subport ${php} { |
284 | 284 | PortGroup select 1.0 |
285 | | |
| 285 | |
286 | 286 | switch -- ${version} { |
287 | 287 | 5.2.17 {revision 11} |
288 | 288 | 5.3.29 {revision 1} |
289 | 289 | } |
290 | | |
| 290 | |
291 | 291 | depends_run port:php_select |
292 | | |
| 292 | |
293 | 293 | select.group php |
294 | 294 | select.file ${filespath}/${subport} |
295 | | |
| 295 | |
296 | 296 | configure.args-replace --disable-cli --enable-cli |
297 | | |
| 297 | |
298 | 298 | destroot.target install-cli install-build install-headers install-programs |
299 | | |
| 299 | |
300 | 300 | destroot.keepdirs ${destroot}${extraphpinidir} |
301 | | |
| 301 | |
302 | 302 | post-destroot { |
303 | 303 | # Copy the default php.ini files. |
304 | 304 | xinstall -m 755 -d ${destroot}${phpinidir} |
… |
… |
subport ${php} { |
313 | 313 | php.ini-recommended \ |
314 | 314 | ${destroot}${phpinidir} |
315 | 315 | } |
316 | | |
| 316 | |
317 | 317 | if {[vercmp ${branch} 5.3] >= 0} { |
318 | 318 | # Copy mysqlnd headers. |
319 | 319 | xinstall -d ${destroot}${prefix}/include/${php}/php/ext/mysqlnd |
320 | 320 | xinstall -m 644 {*}[glob ${worksrcpath}/ext/mysqlnd/*.h] ${destroot}${prefix}/include/${php}/php/ext/mysqlnd |
321 | 321 | } |
322 | 322 | } |
323 | | |
| 323 | |
324 | 324 | # Include the readline extension http://www.php.net/readline directly in |
325 | 325 | # the PHP CLI SAPI because until PHP 6 the interactive mode "php -a" won't |
326 | 326 | # work with a separately built readline extension. |
… |
… |
subport ${php} { |
340 | 340 | if {![variant_isset readline]} { |
341 | 341 | default_variants +libedit |
342 | 342 | } |
343 | | |
| 343 | |
344 | 344 | if {[vercmp ${branch} 5.5] < 0} { |
345 | 345 | notes-append " |
346 | 346 | PHP ${branch} has reached end-of-life. Please upgrade to PHP 5.5 or newer. The newest stable version is ${php.latest_stable_branch}. |
… |
… |
To learn how to update your code, please read the following guides: |
352 | 352 | |
353 | 353 | " |
354 | 354 | } |
355 | | |
| 355 | |
356 | 356 | if {[vercmp ${branch} ${php.latest_stable_branch}] > 0} { |
357 | 357 | notes-append "${php} @${version}_${revision} is a development preview—do not use it in production!\n\n\n" |
358 | 358 | } |
359 | | |
| 359 | |
360 | 360 | if {![file exists ${phpinidir}/php.ini]} { |
361 | 361 | if {[vercmp ${branch} 5.3] >= 0} { |
362 | 362 | notes-append " |
… |
… |
${phpinidir}/php.ini-recommended. |
387 | 387 | " |
388 | 388 | } |
389 | 389 | } |
390 | | |
| 390 | |
391 | 391 | # Enable livecheck for the two most recent stable PHP branches and the development branch. |
392 | 392 | if {[vercmp ${branch} [lindex ${php.branches} end-3]] >= 0} { |
393 | 393 | livecheck.type regex |
… |
… |
${phpinidir}/php.ini-recommended. |
400 | 400 | |
401 | 401 | subport ${php}-apache2handler { |
402 | 402 | PortGroup active_variants 1.1 |
403 | | |
| 403 | |
404 | 404 | description ${php} Apache 2 Handler SAPI |
405 | | |
| 405 | |
406 | 406 | long_description ${description} |
407 | | |
| 407 | |
408 | 408 | homepage http://www.php.net/install.unix.apache2 |
409 | | |
| 409 | |
410 | 410 | depends_lib-append port:apache2 |
411 | | |
| 411 | |
412 | 412 | require_active_variants apache2 preforkmpm |
413 | | |
| 413 | |
414 | 414 | set apxs ${prefix}/apache2/bin/apxs |
415 | 415 | set confdir ${prefix}/apache2/conf |
416 | 416 | set moduledir ${prefix}/apache2/modules |
417 | | |
| 417 | |
418 | 418 | configure.args-append --with-apxs2=${apxs} |
419 | | |
| 419 | |
420 | 420 | build.target libs/libphp${major}.bundle |
421 | | |
| 421 | |
422 | 422 | destroot.violate_mtree yes |
423 | | |
| 423 | |
424 | 424 | destroot { |
425 | 425 | xinstall -m 755 -d ${destroot}${moduledir} ${destroot}${confdir}/extra |
426 | 426 | xinstall -m 644 ${worksrcpath}/libs/libphp${major}.so ${destroot}${moduledir}/mod_${php}.so |
427 | 427 | xinstall -m 644 ${filespath}/mod_php.conf.in ${destroot}${confdir}/extra/mod_${php}.conf |
428 | 428 | reinplace s/@MAJOR@/${major}/g ${destroot}${confdir}/extra/mod_${php}.conf |
429 | 429 | } |
430 | | |
| 430 | |
431 | 431 | notes-append " |
432 | 432 | |
433 | 433 | To enable ${subport}, run: |
… |
… |
To enable ${subport}, run: |
441 | 441 | |
442 | 442 | subport ${php}-cgi { |
443 | 443 | description ${php} CGI SAPI |
444 | | |
| 444 | |
445 | 445 | long_description ${description} |
446 | | |
| 446 | |
447 | 447 | homepage http://www.php.net/install.unix.commandline |
448 | | |
| 448 | |
449 | 449 | configure.args-delete --disable-cgi |
450 | 450 | if {[vercmp ${branch} 5.3] >= 0} { |
451 | 451 | configure.args-append --enable-cgi |
452 | 452 | } else { |
453 | 453 | configure.args-append --enable-fastcgi --enable-force-cgi-redirect |
454 | 454 | } |
455 | | |
| 455 | |
456 | 456 | if {[vercmp ${branch} 5.4] >= 0} { |
457 | 457 | build.target cgi |
458 | 458 | destroot.target install-cgi |
… |
… |
subport ${php}-cgi { |
461 | 461 | xinstall ${worksrcpath}/sapi/cgi/php-cgi ${destroot}${prefix}/bin/php-cgi[php.suffix_from_branch ${branch}] |
462 | 462 | } |
463 | 463 | } |
464 | | |
| 464 | |
465 | 465 | } |
466 | 466 | |
467 | 467 | ### FPM SAPI ### |
… |
… |
subport ${php}-cgi { |
469 | 469 | if {[vercmp ${branch} 5.3] >= 0} { |
470 | 470 | subport ${php}-fpm { |
471 | 471 | description ${php} FPM SAPI |
472 | | |
| 472 | |
473 | 473 | long_description ${description} |
474 | | |
| 474 | |
475 | 475 | homepage http://www.php.net/install.fpm |
476 | | |
| 476 | |
477 | 477 | set fpmuser nobody |
478 | 478 | set fpmgroup nobody |
479 | | |
| 479 | |
480 | 480 | patchfiles-append patch-${php}-sapi-fpm-php-fpm.conf.in.diff |
481 | | |
| 481 | |
482 | 482 | post-patch { |
483 | 483 | reinplace "s|@PHP@|${php}|g" ${worksrcpath}/sapi/fpm/php-fpm.conf.in |
484 | 484 | } |
485 | | |
| 485 | |
486 | 486 | configure.args-replace --disable-fpm --enable-fpm |
487 | 487 | configure.args-append --datadir=${prefix}/share/examples/${php} \ |
488 | 488 | --sysconfdir=${phpinidir} \ |
489 | 489 | --with-fpm-user=${fpmuser} \ |
490 | 490 | --with-fpm-group=${fpmgroup} |
491 | | |
| 491 | |
492 | 492 | build.target fpm |
493 | | |
| 493 | |
494 | 494 | destroot.target install-fpm |
495 | | |
| 495 | |
496 | 496 | destroot.keepdirs ${destroot}${prefix}/var/log/${php} \ |
497 | 497 | ${destroot}${prefix}/var/run/${php} |
498 | | |
| 498 | |
499 | 499 | post-destroot { |
500 | 500 | xinstall -d -o ${fpmuser} -g ${fpmgroup} ${destroot}${prefix}/var/log/${php} ${destroot}${prefix}/var/run/${php} |
501 | 501 | } |
502 | | |
| 502 | |
503 | 503 | startupitem.create yes |
504 | 504 | startupitem.executable ${prefix}/sbin/php-fpm[php.suffix_from_branch ${branch}] |
505 | | |
| 505 | |
506 | 506 | if {![file exists ${phpinidir}/php-fpm.conf]} { |
507 | 507 | notes-append " |
508 | 508 | |
… |
… |
${phpinidir}/php-fpm.conf.default. |
526 | 526 | subport ${php}-calendar { |
527 | 527 | description a PHP extension for converting between different \ |
528 | 528 | calendar formats |
529 | | |
| 529 | |
530 | 530 | long_description ${description} |
531 | 531 | } |
532 | 532 | |
533 | 533 | subport ${php}-curl { |
534 | 534 | categories-append net www |
535 | | |
| 535 | |
536 | 536 | description a PHP interface to the curl library, which lets you \ |
537 | 537 | download files from servers with a variety of protocols |
538 | | |
| 538 | |
539 | 539 | long_description ${description} |
540 | | |
| 540 | |
541 | 541 | depends_lib-append port:curl |
542 | | |
| 542 | |
543 | 543 | configure.args-append --with-curl=${prefix} |
544 | 544 | } |
545 | 545 | |
546 | 546 | subport ${php}-dba { |
547 | 547 | categories-append databases |
548 | | |
| 548 | |
549 | 549 | description a PHP interface for accessing DBM databases such as \ |
550 | 550 | BerkeleyDB |
551 | | |
| 551 | |
552 | 552 | long_description ${description} |
553 | | |
| 553 | |
554 | 554 | variant gdbm conflicts qdbm description {Add GDBM support} { |
555 | 555 | depends_lib-append port:gdbm |
556 | 556 | configure.args-append --with-gdbm=${prefix} |
557 | 557 | } |
558 | | |
| 558 | |
559 | 559 | variant qdbm conflicts gdbm description {Add QDBM support} { |
560 | 560 | depends_lib-append port:qdbm |
561 | 561 | configure.args-append --with-qdbm=${prefix} |
… |
… |
subport ${php}-dba { |
565 | 565 | if {[vercmp ${branch} 5.3] >= 0} { |
566 | 566 | subport ${php}-enchant { |
567 | 567 | categories-append textproc devel |
568 | | |
| 568 | |
569 | 569 | description a PHP interface to enchant |
570 | | |
| 570 | |
571 | 571 | long_description ${name} is ${description}, a common API for many spell libraries. |
572 | | |
| 572 | |
573 | 573 | depends_lib-append port:enchant |
574 | | |
| 574 | |
575 | 575 | configure.args-append --with-enchant=${prefix} |
576 | | |
| 576 | |
577 | 577 | post-destroot { |
578 | 578 | set docdir ${prefix}/share/doc/${subport} |
579 | 579 | xinstall -d ${destroot}${docdir} |
580 | 580 | xinstall -m 644 -W ${destroot.dir} CREDITS ${destroot}${docdir} |
581 | | |
| 581 | |
582 | 582 | set examplesdir ${prefix}/share/examples/${subport} |
583 | 583 | xinstall -d ${destroot}${examplesdir} |
584 | 584 | xinstall -m 644 ${destroot.dir}/docs/examples/example1.php \ |
… |
… |
subport ${php}-enchant { |
589 | 589 | |
590 | 590 | subport ${php}-exif { |
591 | 591 | categories-append graphics |
592 | | |
| 592 | |
593 | 593 | description a PHP interface to the EXIF image metadata functions |
594 | | |
| 594 | |
595 | 595 | long_description ${description} |
596 | 596 | } |
597 | 597 | |
598 | 598 | subport ${php}-ftp { |
599 | 599 | categories-append net |
600 | | |
| 600 | |
601 | 601 | description a PHP extension for accessing file servers using the \ |
602 | 602 | File Transfer Protocol |
603 | | |
| 603 | |
604 | 604 | long_description ${description} |
605 | | |
| 605 | |
606 | 606 | depends_lib-append path:lib/libssl.dylib:openssl |
607 | | |
| 607 | |
608 | 608 | configure.args-append --with-openssl-dir=${prefix} |
609 | 609 | } |
610 | 610 | |
611 | 611 | subport ${php}-gd { |
612 | 612 | categories-append graphics |
613 | | |
| 613 | |
614 | 614 | description a PHP interface to the gd library |
615 | | |
| 615 | |
616 | 616 | long_description ${description} |
617 | | |
| 617 | |
618 | 618 | depends_lib-append port:freetype \ |
619 | 619 | port:jpeg \ |
620 | 620 | port:libpng \ |
621 | 621 | port:zlib |
622 | | |
| 622 | |
623 | 623 | patchfiles-append patch-${php}-ext-gd-config.m4.diff |
624 | | |
| 624 | |
625 | 625 | configure.args-append --with-freetype-dir=${prefix} \ |
626 | 626 | --with-jpeg-dir=${prefix} \ |
627 | 627 | --with-png-dir=${prefix} \ |
… |
… |
subport ${php}-gd { |
632 | 632 | depends_lib-append port:webp |
633 | 633 | configure.args-append --with-webp-dir=${prefix} |
634 | 634 | } |
635 | | |
| 635 | |
636 | 636 | if {[vercmp ${branch} 7] < 0} { |
637 | 637 | variant t1lib description {Add PostScript Type 1 font support with t1lib} { |
638 | 638 | depends_lib-append port:t1lib |
… |
… |
subport ${php}-gd { |
643 | 643 | |
644 | 644 | subport ${php}-gettext { |
645 | 645 | categories-append devel |
646 | | |
| 646 | |
647 | 647 | description a PHP interface to the gettext natural language \ |
648 | 648 | support functions |
649 | | |
| 649 | |
650 | 650 | long_description ${description} |
651 | | |
| 651 | |
652 | 652 | depends_lib-append port:gettext |
653 | | |
| 653 | |
654 | 654 | configure.args-append --with-gettext=${prefix} |
655 | 655 | } |
656 | 656 | |
657 | 657 | subport ${php}-gmp { |
658 | 658 | categories-append devel math |
659 | | |
| 659 | |
660 | 660 | description a PHP interface to GMP, the GNU multiprocessing \ |
661 | 661 | library through which you can work with \ |
662 | 662 | arbitrary-length integers |
663 | | |
| 663 | |
664 | 664 | long_description ${description} |
665 | | |
| 665 | |
666 | 666 | depends_lib-append port:gmp |
667 | | |
| 667 | |
668 | 668 | if {[vercmp ${branch} 5.2] <= 0} { |
669 | 669 | patchfiles-append patch-${php}-ext-gmp-gmp.c.diff |
670 | 670 | } |
671 | | |
| 671 | |
672 | 672 | configure.args-append --with-gmp=${prefix} |
673 | 673 | } |
674 | 674 | |
675 | 675 | subport ${php}-iconv { |
676 | 676 | categories-append textproc |
677 | | |
| 677 | |
678 | 678 | description a PHP interface to the libiconv character encoding \ |
679 | 679 | conversion functions |
680 | | |
| 680 | |
681 | 681 | long_description ${description} |
682 | | |
| 682 | |
683 | 683 | depends_lib-append port:libiconv |
684 | | |
| 684 | |
685 | 685 | configure.args-append --with-iconv=${prefix} |
686 | 686 | } |
687 | 687 | |
688 | 688 | subport ${php}-imap { |
689 | 689 | categories-append mail |
690 | | |
| 690 | |
691 | 691 | description a PHP interface to the IMAP protocol |
692 | | |
| 692 | |
693 | 693 | long_description ${description} |
694 | | |
| 694 | |
695 | 695 | depends_build-append port:cclient |
696 | | |
| 696 | |
697 | 697 | depends_lib-append port:kerberos5 \ |
698 | 698 | port:libcomerr |
699 | | |
| 699 | |
700 | 700 | configure.args-append --with-imap=${prefix} \ |
701 | 701 | --with-imap-ssl=${prefix} \ |
702 | 702 | --with-kerberos=${prefix} |
… |
… |
subport ${php}-intl { |
707 | 707 | switch -- ${version} { |
708 | 708 | 5.3.29 {revision 2} |
709 | 709 | } |
710 | | |
| 710 | |
711 | 711 | categories-append devel |
712 | | |
| 712 | |
713 | 713 | description internationalization extension for PHP |
714 | | |
| 714 | |
715 | 715 | long_description Internationalization extension implements ICU \ |
716 | 716 | library functionality in PHP. |
717 | | |
| 717 | |
718 | 718 | depends_lib-append port:icu |
719 | 719 | } |
720 | 720 | } |
721 | 721 | |
722 | 722 | subport ${php}-ipc { |
723 | 723 | php.extensions shmop sysvmsg sysvsem sysvshm |
724 | | |
| 724 | |
725 | 725 | description interprocess communication extensions for PHP |
726 | | |
| 726 | |
727 | 727 | long_description PHP extensions for interprocess communication (IPC), including the \ |
728 | 728 | shmop, sysvmsg, sysvsem, and sysvshm extensions. |
729 | 729 | } |
730 | 730 | |
731 | 731 | subport ${php}-ldap { |
732 | 732 | categories-append databases |
733 | | |
| 733 | |
734 | 734 | description a PHP interface to LDAP |
735 | 735 | |
736 | 736 | long_description ${subport} is ${description}, the Lightweight Directory \ |
737 | 737 | Access Protocol, which is used to access Directory \ |
738 | 738 | Servers. |
739 | | |
| 739 | |
740 | 740 | depends_lib-append port:openldap \ |
741 | 741 | port:cyrus-sasl2 |
742 | | |
| 742 | |
743 | 743 | configure.args-append --with-ldap=${prefix} \ |
744 | 744 | --with-ldap-sasl=${prefix} |
745 | 745 | } |
746 | 746 | |
747 | 747 | subport ${php}-mbstring { |
748 | 748 | categories-append textproc |
749 | | |
| 749 | |
750 | 750 | description a PHP extension for manipulating strings in multibyte \ |
751 | 751 | encodings |
752 | | |
| 752 | |
753 | 753 | long_description ${description} |
754 | 754 | } |
755 | 755 | |
756 | 756 | subport ${php}-mcrypt { |
757 | 757 | categories-append security |
758 | | |
| 758 | |
759 | 759 | description a PHP interface to the mcrypt library, which offers \ |
760 | 760 | a wide variety of algorithms |
761 | | |
| 761 | |
762 | 762 | long_description ${description} |
763 | | |
| 763 | |
764 | 764 | depends_lib-append port:libmcrypt |
765 | | |
| 765 | |
766 | 766 | # The mcrypt extension may be using libtool unnecessarily; monitor |
767 | 767 | # https://bugs.php.net/bug.php?id=54500 |
768 | 768 | depends_lib-append port:libtool |
769 | | |
| 769 | |
770 | 770 | configure.args-append --with-mcrypt=${prefix} |
771 | 771 | } |
772 | 772 | |
773 | 773 | if {[vercmp ${branch} 7] < 0} { |
774 | 774 | subport ${php}-mssql { |
775 | 775 | php.extensions mssql pdo_dblib |
776 | | |
| 776 | |
777 | 777 | categories-append databases |
778 | | |
| 778 | |
779 | 779 | description a PHP interface to MSSQL using FreeTDS, including \ |
780 | 780 | the mssql and pdo_dblib extensions |
781 | | |
| 781 | |
782 | 782 | long_description ${description} |
783 | | |
| 783 | |
784 | 784 | depends_lib-append port:freetds |
785 | | |
| 785 | |
786 | 786 | configure.args-append --with-mssql=${prefix} \ |
787 | 787 | --with-pdo-dblib=${prefix} |
788 | 788 | } |
… |
… |
subport ${php}-mysql { |
793 | 793 | if {[vercmp ${branch} 7] < 0} { |
794 | 794 | php.extensions-prepend mysql |
795 | 795 | } |
796 | | |
| 796 | |
797 | 797 | categories-append databases |
798 | | |
| 798 | |
799 | 799 | description a PHP interface to MySQL databases, including the |
800 | 800 | if {[vercmp ${branch} 7] < 0} { |
801 | 801 | description-append mysql, |
802 | 802 | } |
803 | 803 | description-append mysqli and pdo_mysql extensions |
804 | | |
| 804 | |
805 | 805 | long_description ${description} |
806 | | |
| 806 | |
807 | 807 | depends_lib-append port:zlib |
808 | | |
| 808 | |
809 | 809 | configure.args-append --with-zlib-dir=${prefix} |
810 | | |
| 810 | |
811 | 811 | if {[vercmp ${branch} 5.3] >= 0} { |
812 | 812 | variant mysqlnd conflicts mysql4 mysql5 mysql51 mysql55 mysql56 mariadb percona description {Use MySQL Native Driver} { |
813 | 813 | configure.args-append --with-mysql=mysqlnd \ |
814 | 814 | --with-mysqli=mysqlnd \ |
815 | 815 | --with-pdo-mysql=mysqlnd |
816 | | |
| 816 | |
817 | 817 | configure.cppflags-append -I${worksrcpath} |
818 | | |
| 818 | |
819 | 819 | set phpini ${prefix}/etc/${php}/php.ini |
820 | 820 | notes " |
821 | 821 | To use mysqlnd with a local MySQL server, edit ${phpini} and set\ |
… |
… |
For percona, use ${prefix}/var/run/percona/mysqld.sock |
831 | 831 | " |
832 | 832 | } |
833 | 833 | } |
834 | | |
| 834 | |
835 | 835 | variant mysql4 conflicts mysqlnd mysql5 mysql51 mysql55 mysql56 mariadb percona description {Use MySQL 4 libraries} { |
836 | 836 | depends_lib-append port:mysql4 |
837 | | |
| 837 | |
838 | 838 | configure.args-append --with-mysql=${prefix} \ |
839 | 839 | --with-pdo-mysql=${prefix} |
840 | 840 | } |
841 | | |
| 841 | |
842 | 842 | variant mysql5 conflicts mysqlnd mysql4 mysql51 mysql55 mysql56 mariadb percona description {Use MySQL 5 libraries} { |
843 | 843 | depends_lib-append path:bin/mysql_config5:mysql5 |
844 | | |
| 844 | |
845 | 845 | post-extract { |
846 | 846 | file mkdir ${workpath}/mysql5 |
847 | 847 | file link -symbolic ${workpath}/mysql5/lib ${prefix}/lib/mysql5 |
848 | 848 | file link -symbolic ${workpath}/mysql5/include ${prefix}/include/mysql5 |
849 | 849 | } |
850 | | |
| 850 | |
851 | 851 | configure.args-append --with-mysql=${workpath}/mysql5 \ |
852 | 852 | --with-mysqli=${prefix}/bin/mysql_config5 \ |
853 | 853 | --with-pdo-mysql=${prefix}/bin/mysql_config5 \ |
854 | 854 | --with-mysql-sock=${prefix}/var/run/mysql5/mysqld.sock |
855 | 855 | } |
856 | | |
| 856 | |
857 | 857 | variant mysql51 conflicts mysqlnd mysql4 mysql5 mysql55 mysql56 mariadb percona description {Use MySQL 5.1 libraries} { |
858 | 858 | depends_lib-append port:mysql51 |
859 | | |
| 859 | |
860 | 860 | post-extract { |
861 | 861 | file mkdir ${workpath}/mysql51 |
862 | 862 | file link -symbolic ${workpath}/mysql51/lib ${prefix}/lib/mysql51 |
863 | 863 | file link -symbolic ${workpath}/mysql51/include ${prefix}/include/mysql51 |
864 | 864 | } |
865 | | |
| 865 | |
866 | 866 | configure.args-append --with-mysql=${workpath}/mysql51 \ |
867 | 867 | --with-mysqli=${prefix}/lib/mysql51/bin/mysql_config \ |
868 | 868 | --with-pdo-mysql=${prefix}/lib/mysql51/bin/mysql_config \ |
869 | 869 | --with-mysql-sock=${prefix}/var/run/mysql51/mysqld.sock |
870 | 870 | } |
871 | | |
| 871 | |
872 | 872 | variant mysql55 conflicts mysqlnd mysql4 mysql5 mysql51 mysql56 mariadb percona description {Use MySQL 5.5 libraries} { |
873 | 873 | depends_lib-append port:mysql55 |
874 | | |
| 874 | |
875 | 875 | post-extract { |
876 | 876 | file mkdir ${workpath}/mysql55 |
877 | 877 | file link -symbolic ${workpath}/mysql55/lib ${prefix}/lib/mysql55 |
878 | 878 | file link -symbolic ${workpath}/mysql55/include ${prefix}/include/mysql55 |
879 | 879 | } |
880 | | |
| 880 | |
881 | 881 | configure.args-append --with-mysql=${workpath}/mysql55 \ |
882 | 882 | --with-mysqli=${prefix}/lib/mysql55/bin/mysql_config \ |
883 | 883 | --with-pdo-mysql=${prefix}/lib/mysql55/bin/mysql_config \ |
884 | 884 | --with-mysql-sock=${prefix}/var/run/mysql55/mysqld.sock |
885 | 885 | } |
886 | | |
| 886 | |
887 | 887 | variant mysql56 conflicts mysqlnd mysql4 mysql5 mysql51 mysql55 mariadb percona description {Use MySQL 5.6 libraries} { |
888 | 888 | depends_lib-append port:mysql56 |
889 | | |
| 889 | |
890 | 890 | post-extract { |
891 | 891 | file mkdir ${workpath}/mysql56 |
892 | 892 | file link -symbolic ${workpath}/mysql56/lib ${prefix}/lib/mysql56 |
893 | 893 | file link -symbolic ${workpath}/mysql56/include ${prefix}/include/mysql56 |
894 | 894 | } |
895 | | |
| 895 | |
896 | 896 | configure.args-append --with-mysql=${workpath}/mysql56 \ |
897 | 897 | --with-mysqli=${prefix}/lib/mysql56/bin/mysql_config \ |
898 | 898 | --with-pdo-mysql=${prefix}/lib/mysql56/bin/mysql_config \ |
899 | 899 | --with-mysql-sock=${prefix}/var/run/mysql56/mysqld.sock |
900 | 900 | } |
901 | | |
| 901 | |
902 | 902 | variant mariadb conflicts mysqlnd mysql4 mysql5 mysql51 mysql55 mysql56 percona description {Use MariaDB libraries} { |
903 | 903 | depends_lib-append port:mariadb |
904 | | |
| 904 | |
905 | 905 | post-extract { |
906 | 906 | file mkdir ${workpath}/mariadb |
907 | 907 | file link -symbolic ${workpath}/mariadb/lib ${prefix}/lib/mariadb |
908 | 908 | file link -symbolic ${workpath}/mariadb/include ${prefix}/include/mariadb |
909 | 909 | } |
910 | | |
| 910 | |
911 | 911 | configure.args-append --with-mysql=${workpath}/mariadb \ |
912 | 912 | --with-mysqli=${prefix}/lib/mariadb/bin/mysql_config \ |
913 | 913 | --with-pdo-mysql=${prefix}/lib/mariadb/bin/mysql_config \ |
914 | 914 | --with-mysql-sock=${prefix}/var/run/mariadb/mysqld.sock |
915 | 915 | } |
916 | | |
| 916 | |
917 | 917 | variant percona conflicts mysqlnd mysql4 mysql5 mysql51 mysql55 mysql56 mariadb description {Use Percona libraries} { |
918 | 918 | depends_lib-append port:percona |
919 | | |
| 919 | |
920 | 920 | post-extract { |
921 | 921 | file mkdir ${workpath}/percona |
922 | 922 | file link -symbolic ${workpath}/percona/lib ${prefix}/lib/percona |
923 | 923 | file link -symbolic ${workpath}/percona/include ${prefix}/include/percona |
924 | 924 | } |
925 | | |
| 925 | |
926 | 926 | configure.args-append --with-mysql=${workpath}/percona \ |
927 | 927 | --with-mysqli=${prefix}/lib/percona/bin/mysql_config \ |
928 | 928 | --with-pdo-mysql=${prefix}/lib/percona/bin/mysql_config \ |
929 | 929 | --with-mysql-sock=${prefix}/var/run/percona/mysqld.sock |
930 | 930 | } |
931 | | |
| 931 | |
932 | 932 | if {![variant_isset mysql4] && ![variant_isset mysql5] && ![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset mysql56] && ![variant_isset mariadb] && ![variant_isset percona]} { |
933 | 933 | if {[vercmp ${branch} 5.3] >= 0} { |
934 | 934 | default_variants +mysqlnd |
… |
… |
For percona, use ${prefix}/var/run/percona/mysqld.sock |
940 | 940 | |
941 | 941 | subport ${php}-odbc { |
942 | 942 | php.extensions odbc pdo_odbc |
943 | | |
| 943 | |
944 | 944 | categories-append databases |
945 | | |
| 945 | |
946 | 946 | description a PHP interface for accessing databases via Open \ |
947 | 947 | DataBase Connectivity (ODBC) |
948 | | |
| 948 | |
949 | 949 | long_description ${description} |
950 | | |
| 950 | |
951 | 951 | variant iodbc conflicts unixodbc description {Use iODBC} { |
952 | 952 | depends_lib-append port:libiodbc |
953 | | |
| 953 | |
954 | 954 | patchfiles-append patch-${php}-iODBC.diff |
955 | | |
| 955 | |
956 | 956 | configure.args-append --with-iODBC=${prefix} \ |
957 | 957 | --with-pdo-odbc=iODBC,${prefix} |
958 | 958 | } |
959 | | |
| 959 | |
960 | 960 | variant unixodbc conflicts iodbc description {Use unixODBC} { |
961 | 961 | depends_lib-append port:unixODBC |
962 | | |
| 962 | |
963 | 963 | patchfiles-append patch-${php}-unixODBC.diff |
964 | | |
| 964 | |
965 | 965 | configure.args-append --with-unixODBC=${prefix} \ |
966 | 966 | --with-pdo-odbc=unixODBC,${prefix} |
967 | 967 | } |
968 | | |
| 968 | |
969 | 969 | if {![variant_isset iodbc] && ![variant_isset unixodbc]} { |
970 | 970 | default_variants +unixodbc |
971 | 971 | } |
… |
… |
subport ${php}-odbc { |
974 | 974 | if {[vercmp ${branch} 5.5] >= 0} { |
975 | 975 | subport ${php}-opcache { |
976 | 976 | php.extensions.zend opcache |
977 | | |
| 977 | |
978 | 978 | description OPcache improves PHP performance by storing precompiled \ |
979 | 979 | script bytecode in shared memory, thereby removing the \ |
980 | 980 | need for PHP to load and parse scripts on each request. |
981 | | |
| 981 | |
982 | 982 | long_description ${description} |
983 | | |
| 983 | |
984 | 984 | configure.args-append --enable-opcache |
985 | | |
| 985 | |
986 | 986 | post-destroot { |
987 | 987 | set docdir ${destroot}${prefix}/share/doc/${subport} |
988 | 988 | xinstall -d ${docdir} |
… |
… |
if {[vercmp ${branch} 5.5] >= 0} { |
993 | 993 | |
994 | 994 | subport ${php}-openssl { |
995 | 995 | categories-append devel security |
996 | | |
| 996 | |
997 | 997 | description a PHP interface to OpenSSL signature-generation \ |
998 | 998 | and -verification and data-encryption and \ |
999 | 999 | -decryption functions |
1000 | | |
| 1000 | |
1001 | 1001 | long_description ${description} |
1002 | | |
| 1002 | |
1003 | 1003 | depends_lib-append port:kerberos5 \ |
1004 | 1004 | port:libcomerr \ |
1005 | 1005 | path:lib/libssl.dylib:openssl |
1006 | | |
| 1006 | |
1007 | 1007 | post-extract { |
1008 | 1008 | move ${php.build_dirs}/config0.m4 ${php.build_dirs}/config.m4 |
1009 | 1009 | } |
1010 | | |
| 1010 | |
1011 | 1011 | configure.args-append --with-kerberos=${prefix} \ |
1012 | 1012 | --with-openssl=${prefix} |
1013 | 1013 | } |
1014 | 1014 | |
1015 | 1015 | subport ${php}-oracle { |
1016 | 1016 | php.extensions oci8 pdo_oci |
1017 | | |
| 1017 | |
1018 | 1018 | categories-append databases |
1019 | | |
| 1019 | |
1020 | 1020 | description a PHP interface to Oracle, including the oci8 and \ |
1021 | 1021 | pdo_oci extensions |
1022 | | |
| 1022 | |
1023 | 1023 | long_description ${description} |
1024 | | |
| 1024 | |
1025 | 1025 | depends_lib-append port:oracle-instantclient |
1026 | | |
| 1026 | |
1027 | 1027 | if {[vercmp ${branch} 5.2] <= 0} { |
1028 | 1028 | patchfiles-append patch-${php}-ext-pdo_oci-config.m4.diff |
1029 | 1029 | } |
1030 | | |
| 1030 | |
1031 | 1031 | set lib_dir ${prefix}/lib/oracle |
1032 | 1032 | pre-configure { |
1033 | 1033 | regexp {\.dylib\.(.+)$} [glob -directory ${lib_dir} libclntsh.dylib.*] -> library_version |
… |
… |
subport ${php}-oracle { |
1039 | 1039 | |
1040 | 1040 | subport ${php}-pcntl { |
1041 | 1041 | categories-append sysutils |
1042 | | |
| 1042 | |
1043 | 1043 | description a PHP interface to Unix-style process creation, \ |
1044 | 1044 | program execution, signal handling and process \ |
1045 | 1045 | termination functions |
1046 | | |
| 1046 | |
1047 | 1047 | long_description ${description} |
1048 | | |
| 1048 | |
1049 | 1049 | notes " |
1050 | 1050 | ${subport} should not be enabled within a web server environment.\ |
1051 | 1051 | Unexpected results may occur if any process control functions are used within\ |
… |
… |
a web server environment. |
1055 | 1055 | |
1056 | 1056 | subport ${php}-posix { |
1057 | 1057 | categories-append sysutils |
1058 | | |
| 1058 | |
1059 | 1059 | description a PHP interface to additional POSIX functions |
1060 | | |
| 1060 | |
1061 | 1061 | long_description a PHP interface to those functions defined in the \ |
1062 | 1062 | IEEE 1003.1 (POSIX.1) standards document which are \ |
1063 | 1063 | not accessible through other means |
… |
… |
subport ${php}-posix { |
1065 | 1065 | |
1066 | 1066 | subport ${php}-postgresql { |
1067 | 1067 | php.extensions pgsql pdo_pgsql |
1068 | | |
| 1068 | |
1069 | 1069 | categories-append databases |
1070 | | |
| 1070 | |
1071 | 1071 | homepage http://www.php.net/pgsql |
1072 | | |
| 1072 | |
1073 | 1073 | description a PHP interface to PostgreSQL, including \ |
1074 | 1074 | the pgsql and pdo_pgsql extensions |
1075 | | |
| 1075 | |
1076 | 1076 | long_description ${description} |
1077 | | |
1078 | | variant postgresql82 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 8.2 libraries} { |
| 1077 | |
| 1078 | variant postgresql82 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 8.2 libraries} { |
1079 | 1079 | depends_lib-append port:postgresql82 |
1080 | | |
| 1080 | |
1081 | 1081 | configure.args-append --with-pgsql=${prefix}/lib/postgresql82/bin \ |
1082 | 1082 | --with-pdo-pgsql=${prefix}/lib/postgresql82/bin |
1083 | 1083 | } |
1084 | | |
1085 | | variant postgresql83 conflicts postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 8.3 libraries} { |
| 1084 | |
| 1085 | variant postgresql83 conflicts postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 8.3 libraries} { |
1086 | 1086 | depends_lib-append port:postgresql83 |
1087 | | |
| 1087 | |
1088 | 1088 | configure.args-append --with-pgsql=${prefix}/lib/postgresql83/bin \ |
1089 | 1089 | --with-pdo-pgsql=${prefix}/lib/postgresql83/bin |
1090 | 1090 | } |
1091 | | |
1092 | | variant postgresql84 conflicts postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 8.4 libraries} { |
| 1091 | |
| 1092 | variant postgresql84 conflicts postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 8.4 libraries} { |
1093 | 1093 | depends_lib-append port:postgresql84 |
1094 | | |
| 1094 | |
1095 | 1095 | configure.args-append --with-pgsql=${prefix}/lib/postgresql84/bin \ |
1096 | 1096 | --with-pdo-pgsql=${prefix}/lib/postgresql84/bin |
1097 | 1097 | } |
1098 | | |
1099 | | variant postgresql90 conflicts postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 9.0 libraries} { |
| 1098 | |
| 1099 | variant postgresql90 conflicts postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 9.0 libraries} { |
1100 | 1100 | depends_lib-append port:postgresql90 |
1101 | | |
| 1101 | |
1102 | 1102 | configure.args-append --with-pgsql=${prefix}/lib/postgresql90/bin \ |
1103 | 1103 | --with-pdo-pgsql=${prefix}/lib/postgresql90/bin |
1104 | 1104 | } |
1105 | | |
1106 | | variant postgresql91 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 9.1 libraries} { |
| 1105 | |
| 1106 | variant postgresql91 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 9.1 libraries} { |
1107 | 1107 | depends_lib-append port:postgresql91 |
1108 | | |
| 1108 | |
1109 | 1109 | configure.args-append --with-pgsql=${prefix}/lib/postgresql91/bin \ |
1110 | 1110 | --with-pdo-pgsql=${prefix}/lib/postgresql91/bin |
1111 | 1111 | } |
1112 | | |
1113 | | variant postgresql92 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql93 postgresql94 description {Use PostgreSQL 9.2 libraries} { |
| 1112 | |
| 1113 | variant postgresql92 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 9.2 libraries} { |
1114 | 1114 | depends_lib-append port:postgresql92 |
1115 | | |
| 1115 | |
1116 | 1116 | configure.args-append --with-pgsql=${prefix}/lib/postgresql92/bin \ |
1117 | 1117 | --with-pdo-pgsql=${prefix}/lib/postgresql92/bin |
1118 | 1118 | } |
1119 | | |
1120 | | variant postgresql93 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql94 description {Use PostgreSQL 9.3 libraries} { |
| 1119 | |
| 1120 | variant postgresql93 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql94 postgresql95 description {Use PostgreSQL 9.3 libraries} { |
1121 | 1121 | depends_lib-append port:postgresql93 |
1122 | | |
| 1122 | |
1123 | 1123 | configure.args-append --with-pgsql=${prefix}/lib/postgresql93/bin \ |
1124 | 1124 | --with-pdo-pgsql=${prefix}/lib/postgresql93/bin |
1125 | 1125 | } |
1126 | | |
1127 | | variant postgresql94 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 description {Use PostgreSQL 9.4 libraries} { |
| 1126 | |
| 1127 | variant postgresql94 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql95 description {Use PostgreSQL 9.4 libraries} { |
1128 | 1128 | depends_lib-append port:postgresql94 |
1129 | | |
| 1129 | |
1130 | 1130 | configure.args-append --with-pgsql=${prefix}/lib/postgresql94/bin \ |
1131 | 1131 | --with-pdo-pgsql=${prefix}/lib/postgresql94/bin |
1132 | 1132 | } |
1133 | | |
1134 | | if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91] && ![variant_isset postgresql92] && ![variant_isset postgresql93] && ![variant_isset postgresql94]} { |
| 1133 | |
| 1134 | variant postgresql95 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 9.5 libraries} { |
| 1135 | depends_lib-append port:postgresql95 |
| 1136 | |
| 1137 | configure.args-append --with-pgsql=${prefix}/lib/postgresql95/bin \ |
| 1138 | --with-pdo-pgsql=${prefix}/lib/postgresql95/bin |
| 1139 | } |
| 1140 | |
| 1141 | if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91] && ![variant_isset postgresql92] && ![variant_isset postgresql93] && ![variant_isset postgresql94] && ![variant_isset postgresql95]} { |
1135 | 1142 | default_variants +postgresql94 |
1136 | 1143 | } |
1137 | 1144 | } |
1138 | 1145 | |
1139 | 1146 | subport ${php}-pspell { |
1140 | 1147 | categories-append textproc |
1141 | | |
| 1148 | |
1142 | 1149 | description a PHP interface to the aspell library, which lets you \ |
1143 | 1150 | check spelling and offer spelling suggestions |
1144 | | |
| 1151 | |
1145 | 1152 | long_description ${description} |
1146 | | |
| 1153 | |
1147 | 1154 | depends_lib-append port:aspell |
1148 | | |
| 1155 | |
1149 | 1156 | configure.args-append --with-pspell=${prefix} |
1150 | 1157 | } |
1151 | 1158 | |
1152 | 1159 | subport ${php}-snmp { |
1153 | 1160 | categories-append sysutils |
1154 | | |
| 1161 | |
1155 | 1162 | description a PHP interface to the Simple Network Management \ |
1156 | 1163 | Protocol (SNMP) |
1157 | | |
| 1164 | |
1158 | 1165 | long_description ${description} |
1159 | | |
| 1166 | |
1160 | 1167 | depends_lib-append port:net-snmp |
1161 | | |
| 1168 | |
1162 | 1169 | configure.args-append --with-snmp=${prefix} |
1163 | 1170 | } |
1164 | 1171 | |
1165 | 1172 | subport ${php}-soap { |
1166 | 1173 | categories-append net |
1167 | | |
| 1174 | |
1168 | 1175 | description a PHP extension for writing SOAP clients and servers |
1169 | | |
| 1176 | |
1170 | 1177 | long_description ${description} |
1171 | | |
| 1178 | |
1172 | 1179 | depends_lib-append port:libxml2 |
1173 | | |
| 1180 | |
1174 | 1181 | configure.args-append --with-libxml-dir=${prefix} |
1175 | 1182 | } |
1176 | 1183 | |
1177 | 1184 | subport ${php}-sockets { |
1178 | 1185 | categories-append net |
1179 | | |
| 1186 | |
1180 | 1187 | description a PHP interface to BSD socket communication \ |
1181 | 1188 | functions |
1182 | | |
| 1189 | |
1183 | 1190 | long_description ${description} |
1184 | 1191 | } |
1185 | 1192 | |
1186 | 1193 | if {[vercmp ${branch} 5.3] >= 0} { |
1187 | 1194 | subport ${php}-sqlite { |
1188 | 1195 | php.extensions sqlite sqlite3 pdo_sqlite |
1189 | | |
| 1196 | |
1190 | 1197 | categories-append databases |
1191 | | |
| 1198 | |
1192 | 1199 | description a PHP interface to SQLite, including the sqlite, sqlite3 \ |
1193 | 1200 | and pdo_sqlite extensions |
1194 | | |
| 1201 | |
1195 | 1202 | if {[vercmp ${branch} 5.4] >= 0} { |
1196 | 1203 | php.extensions-delete sqlite |
1197 | 1204 | description-delete "sqlite," |
1198 | 1205 | } |
1199 | | |
| 1206 | |
1200 | 1207 | long_description ${description} |
1201 | | |
| 1208 | |
1202 | 1209 | depends_lib-append port:sqlite3 |
1203 | | |
| 1210 | |
1204 | 1211 | post-extract { |
1205 | 1212 | move ${worksrcpath}/ext/sqlite3/config0.m4 ${worksrcpath}/ext/sqlite3/config.m4 |
1206 | 1213 | } |
1207 | | |
| 1214 | |
1208 | 1215 | configure.args-append --with-sqlite3=${prefix} \ |
1209 | 1216 | --with-pdo-sqlite=${prefix} \ |
1210 | 1217 | --enable-sqlite-utf8 |
… |
… |
subport ${php}-tidy { |
1217 | 1224 | 5.3.29 {revision 2} |
1218 | 1225 | 5.4.45 {revision 1} |
1219 | 1226 | } |
1220 | | |
| 1227 | |
1221 | 1228 | categories-append www |
1222 | | |
| 1229 | |
1223 | 1230 | description a PHP interface to tidy, the HTML cleaning and \ |
1224 | 1231 | repair utility |
1225 | | |
| 1232 | |
1226 | 1233 | long_description ${description} |
1227 | | |
| 1234 | |
1228 | 1235 | depends_lib-append port:tidy |
1229 | | |
| 1236 | |
1230 | 1237 | if {[vercmp ${branch} 7.0] <= 0} { |
1231 | 1238 | patchfiles-append patch-${php}-ext-tidy-tidy.c.diff |
1232 | 1239 | } |
1233 | | |
| 1240 | |
1234 | 1241 | configure.args-append --with-tidy=${prefix} |
1235 | 1242 | } |
1236 | 1243 | |
1237 | 1244 | subport ${php}-wddx { |
1238 | 1245 | categories-append textproc |
1239 | | |
| 1246 | |
1240 | 1247 | description a PHP interface to Web Distributed Data Exchange |
1241 | | |
| 1248 | |
1242 | 1249 | long_description ${description} |
1243 | | |
| 1250 | |
1244 | 1251 | depends_build-append port:expat \ |
1245 | 1252 | port:libxml2 |
1246 | | |
| 1253 | |
1247 | 1254 | configure.args-append --with-libexpat-dir=${prefix} \ |
1248 | 1255 | --with-libxml-dir=${prefix} |
1249 | 1256 | } |
1250 | 1257 | |
1251 | 1258 | subport ${php}-xmlrpc { |
1252 | 1259 | categories-append textproc |
1253 | | |
| 1260 | |
1254 | 1261 | description a PHP extension for writing XML-RPC clients and servers |
1255 | | |
| 1262 | |
1256 | 1263 | long_description ${description} |
1257 | | |
| 1264 | |
1258 | 1265 | depends_build-append port:libiconv \ |
1259 | 1266 | port:libxml2 |
1260 | | |
| 1267 | |
1261 | 1268 | depends_lib-append port:expat |
1262 | | |
| 1269 | |
1263 | 1270 | configure.args-append --with-iconv-dir=${prefix} \ |
1264 | 1271 | --with-libexpat-dir=${prefix} \ |
1265 | 1272 | --with-libxml-dir=${prefix} |
1266 | | |
| 1273 | |
1267 | 1274 | pre-configure { |
1268 | 1275 | configure.cppflags-append [exec ${prefix}/bin/xml2-config --cflags] |
1269 | 1276 | } |
… |
… |
subport ${php}-xmlrpc { |
1271 | 1278 | |
1272 | 1279 | subport ${php}-xsl { |
1273 | 1280 | categories-append textproc |
1274 | | |
| 1281 | |
1275 | 1282 | description a PHP interface to libxslt, which implements the XSL \ |
1276 | 1283 | standard and lets you perform XSL transformations |
1277 | | |
| 1284 | |
1278 | 1285 | long_description ${description} |
1279 | | |
| 1286 | |
1280 | 1287 | depends_lib-append port:libxslt |
1281 | | |
| 1288 | |
1282 | 1289 | configure.args-append --with-xsl=${prefix} |
1283 | | |
| 1290 | |
1284 | 1291 | configure.cppflags-append -I${prefix}/include/${php}/php/ext/dom |
1285 | 1292 | } |
1286 | 1293 | |
1287 | 1294 | subport ${php}-zip { |
1288 | 1295 | categories-append archivers |
1289 | | |
| 1296 | |
1290 | 1297 | description PHP zip functions |
1291 | | |
| 1298 | |
1292 | 1299 | long_description ${description} |
1293 | | |
| 1300 | |
1294 | 1301 | depends_lib-append port:zlib |
1295 | | |
| 1302 | |
1296 | 1303 | configure.args-append --with-zlib-dir=${prefix} |
1297 | 1304 | } |
1298 | 1305 | |
… |
… |
proc get_default_php_extensions {} { |
1333 | 1340 | if {[is_extension_subport]} { |
1334 | 1341 | default php.extensions {[get_default_php_extensions]} |
1335 | 1342 | default homepage http://www.php.net/${php.rootname} |
1336 | | |
| 1343 | |
1337 | 1344 | php.build_dirs |
1338 | 1345 | set pdo no |
1339 | 1346 | foreach extension [concat ${php.extensions} ${php.extensions.zend}] { |
… |
… |
if {[is_extension_subport]} { |
1345 | 1352 | ln -s ${worksrcpath}/ext/pdo ${worksrcpath}/ext/${extension}/ext |
1346 | 1353 | } |
1347 | 1354 | } |
1348 | | |
| 1355 | |
1349 | 1356 | # Speed up extraction by extracting only the modules we're going to be building. |
1350 | 1357 | extract.post_args-append ${worksrcdir}/ext/${extension} |
1351 | | |
| 1358 | |
1352 | 1359 | # Run phpize, configure, build and destroot in each extension's directory. |
1353 | 1360 | php.build_dirs-append ${worksrcpath}/ext/${extension} |
1354 | 1361 | } |
1355 | | |
| 1362 | |
1356 | 1363 | if {${pdo}} { |
1357 | 1364 | # The PDO extensions need the PDO headers. |
1358 | 1365 | extract.post_args-append ${worksrcdir}/ext/pdo |
1359 | 1366 | } |
1360 | | |
| 1367 | |
1361 | 1368 | pre-configure { |
1362 | 1369 | set php_version [exec ${php.config} --version 2>/dev/null] |
1363 | 1370 | if {${version} ne ${php_version}} { |
… |
… |
if {[is_extension_subport]} { |
1365 | 1372 | return -code error "incompatible ${php} installation" |
1366 | 1373 | } |
1367 | 1374 | } |
1368 | | |
| 1375 | |
1369 | 1376 | destroot.target install-modules install-headers |
1370 | | |
| 1377 | |
1371 | 1378 | php.add_port_code |
1372 | 1379 | } |