Changeset 98334
- Timestamp:
- Oct 3, 2012, 1:47:19 AM (12 years ago)
- Location:
- trunk/dports/aqua/qt4-mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/aqua/qt4-mac/Portfile
r98048 r98334 13 13 conflicts qt3 qt3-mac qt4-mac-devel 14 14 version 4.8.3 15 revision 1 15 16 categories aqua 16 17 platforms macosx … … 335 336 # configure.compiler should therefore not be one of the MacPorts compilers. 336 337 337 # http://llvm.org/bugs/show_bug.cgi?id=8971, #30271, #31076, #31638 338 compiler.blacklist {macports-clang-2.9} 339 if {[vercmp $xcodeversion 4.3] < 0} { 338 # Qt4 does not compile with clang 3.0 or older; it also does not work 339 # with Apple's clang from XCode 4.4 or older. Block the clang 340 # versions, both from Apple and MacPorts, and that don't meet these 341 # requirements. 342 # 343 # http://llvm.org/bugs/show_bug.cgi?id=8971, # #30271, #31076, #31638 344 345 compiler.blacklist { macports-clang-2.9 macports-clang-3.0 } 346 if {[vercmp $xcodeversion 4.4] <= 0} { 340 347 compiler.blacklist-append clang 341 348 } … … 546 553 547 554 post-destroot { 555 548 556 set destroot_qt ${destroot}${qt_dir} 549 557 … … 551 559 # ${qt_dir}\${prefix} ("\" means 'take away'). Cannot use 552 560 # "find -E" since it is not necessarily portable. 561 553 562 regsub ${prefix} ${worksrcpath} "" from_dir 554 563 regsub ${prefix} ${qt_dir} "" to_dir … … 560 569 } 561 570 562 # remove Libs.private from all pc files 571 # fix .pc files 572 563 573 foreach fixfile [exec find ${destroot_qt} -name "*.pc"] { 574 575 # remove Libs.private; they can mess up linking 576 564 577 reinplace "/Libs\.private/d" ${fixfile} 565 } 566 567 # Fix .pc files to use ${prefix} correctly 568 foreach fixfile [exec find ${destroot_qt} -name "*.pc"] { 578 579 # use ${prefix} correctly 580 569 581 reinplace "s|${prefix}/|\${prefix}/|g" ${fixfile} 570 } 571 572 # remove -L entries from .prl, and .la files; this is a 573 # framework install, not a library install 582 583 # fix libdir 584 585 reinplace "/libdir=/s|Library/Frameworks|lib|" ${fixfile} 586 587 # fix Libs: to use -L instead of -F 588 589 reinplace "/Libs:/s|-F|-L|" ${fixfile} 590 591 # fix Libs: to use -lQt* instead of "-framework Qt*" 592 # depends on whether for release or debug 593 594 set fn [lindex [split ${fixfile} /] end] 595 596 if {[lsearch -regexp ${fn} debug] == 0} { 597 598 # debug; need to add that string to all Qt dependency libraries 599 reinplace "/Libs:/s|-framework Qt\\(\[^ \]*\\)|-lQt\\1_debug|" \ 600 ${fixfile} 601 602 } else { 603 604 # no debug; just replace 605 reinplace "/Libs:/s|-framework Qt|-lQt|" ${fixfile} 606 607 } 608 } 609 610 # move .pc files from ${qt_frameworks_dir}/pkgconfig to 611 # ${qt_pkg_config_dir} 612 613 file delete -force ${destroot}${qt_pkg_config_dir} 614 xinstall -m 755 -d ${destroot}${qt_libs_dir} 615 move ${destroot}${qt_frameworks_dir}/pkgconfig \ 616 ${destroot}${qt_libs_dir} 617 618 # move .la files from ${qt_frameworks_dir} to ${qt_libs_dir} 619 620 foreach laf [glob ${destroot}/${qt_frameworks_dir}/*.la] { 621 move ${laf} ${destroot}${qt_libs_dir} 622 } 623 624 # remove -L entries from .prl and .la files 574 625 575 626 foreach fixfile [exec find ${destroot_qt} -name "*.prl"] { … … 580 631 } 581 632 582 # remove redundant -F ${prefix}/Library/Frameworks entries633 # remove redundant -F entries from .prl and .la files 583 634 584 635 foreach fixfile [exec find ${destroot_qt} -name "*.prl"] { … … 597 648 } 598 649 599 # move .pc files from ${qt_frameworks_dir}/pkgconfig to600 # ${qt_pkg_config_dir}601 602 file delete -force ${destroot}${qt_pkg_config_dir}603 xinstall -m 755 -d ${destroot}${qt_libs_dir}604 move ${destroot}${qt_frameworks_dir}/pkgconfig \605 ${destroot}${qt_libs_dir}606 607 650 # get Qt's version numbers 608 651 … … 620 663 set tf_full [strsed ${fixfile} {s@\\.framework@@}] 621 664 set tf [strsed ${tf_full} {g@.*\/@@}] 665 666 # special for QtWebKit entries 667 668 set t_minor ${qt_minor} 669 set is_QtWebKit 0 670 if {[string compare ${tf} QtWebKit] == 0} { 671 set t_minor 9 672 set is_QtWebKit 1 673 } 622 674 623 675 # link headers into ${qt_includes_dir}, removing directories … … 630 682 ln -s ${tf_full}.framework/Headers ${inc_file} 631 683 632 # link libraries into ${qt_libs_dir}, all 4 number variants as 633 # well as the .prl and .la files 634 635 set libs_dir ${destroot}${qt_libs_dir} 636 637 ln -s ${tf_full}.framework/${tf}.prl ${libs_dir}/lib${tf}.prl 638 ln -s ${tf_full}.la ${libs_dir}/lib${tf}.la 639 ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.dylib 640 ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qt_major}.dylib 641 ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qt_major}.${qt_minor}.dylib 642 ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qt_major}.${qt_minor}.${qt_patch}.dylib 643 684 # link libraries into ${qt_libs_dir}, all 4 number variants 685 686 set dr_qt_libs_dir ${destroot}${qt_libs_dir} 687 688 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.dylib 689 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.${qt_major}.dylib 690 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.${qt_major}.${t_minor}.dylib 691 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.${qt_major}.${t_minor}.${qt_patch}.dylib 692 693 # copy .prl file, then correct it for library usage 694 695 copy ${destroot}${tf_full}.framework/${tf}.prl ${dr_qt_libs_dir}/lib${tf}.prl 696 697 # fix TARGET in .prl file 698 699 reinplace "/QMAKE_PRL_TARGET/s|Qt\\(\[^ \]*\\)|libQt\\1.${qt_major}.${t_minor}.${qt_patch}.dylib|" ${dr_qt_libs_dir}/lib${tf}.prl 700 701 # fix PRL_LIBS -F -> -L in .prl file 702 703 reinplace "/QMAKE_PRL_LIBS/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}.prl 704 705 # fix "-framework Qt*" -> "-lQt*" in .prl file 706 707 reinplace "/QMAKE_PRL_LIBS/s|-framework Qt|-lQt|g" \ 708 ${dr_qt_libs_dir}/lib${tf}.prl 709 710 # fix up .la files to work with ${prefix}/lib entries 711 712 # rename .la file 713 714 move ${dr_qt_libs_dir}/${tf}.la ${dr_qt_libs_dir}/lib${tf}.la 715 716 # fix "name that we can dlopen" in .la file 717 718 reinplace "s|dlname=''|dlname='lib${tf}.${qt_major}.${t_minor}.${qt_patch}.dylib'|" ${dr_qt_libs_dir}/lib${tf}.la 719 720 # fix "names of this library" in .la file 721 722 reinplace "s|library_names='\[^'\]*'|library_names='lib${tf}.${qt_major}.${t_minor}.${qt_patch}.dylib lib${tf}.${qt_major}.${t_minor}.dylib lib${tf}.${qt_major}.dylib lib${tf}.dylib'|" \ 723 ${dr_qt_libs_dir}/lib${tf}.la 724 725 # fix "name of the static archive"; there is none in .la file 726 727 reinplace "s|old_library='\[^'\]*'|old_library=''|" \ 728 ${dr_qt_libs_dir}/lib${tf}.la 729 730 # fix "libraries that this one depends upon" in .la file 731 732 reinplace "/dependency_libs/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}.la 733 reinplace "/dependency_libs/s|-framework Qt|-lQt|g" \ 734 ${dr_qt_libs_dir}/lib${tf}.la 735 reinplace "/dependency_libs/s| ${worksrcpath}\[^ \]*||g" \ 736 ${dr_qt_libs_dir}/lib${tf}.la 737 reinplace "/dependency_libs/s| -lwebcore||" \ 738 ${dr_qt_libs_dir}/lib${tf}.la 739 reinplace "/dependency_libs/s| -ljscore||" \ 740 ${dr_qt_libs_dir}/lib${tf}.la 741 742 # fix "directory that this library needs to be installed in" in .la file 743 744 reinplace "/libdir/s|${qt_frameworks_dir}|${qt_libs_dir}|" \ 745 ${dr_qt_libs_dir}/lib${tf}.la 746 747 # deal with debug files 748 749 if {[variant_isset debug]} { 750 751 # but not if QtWebKit and +universal, since that one does 752 # not exist (the 32-bit version of the debug library is 753 # larger than fits into the 32-bit filespace). 754 755 if {[variant_isset debug] && ${is_QtWebKit}} { 756 continue 757 } 758 759 # link libraries into ${qt_libs_dir}, all 4 number variants 760 761 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.dylib 762 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.${qt_major}.dylib 763 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.${qt_major}.${t_minor}.dylib 764 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.${qt_major}.${t_minor}.${qt_patch}.dylib 765 766 # copy .prl file, then correct it for library usage 767 768 copy ${destroot}${tf_full}.framework/${tf}_debug.prl ${dr_qt_libs_dir}/lib${tf}_debug.prl 769 770 # fix TARGET in .prl file 771 772 reinplace "/QMAKE_PRL_TARGET/s|Qt\\(\[^ \]*\\)|libQt\\1.${qt_major}.${t_minor}.${qt_patch}.dylib|" ${dr_qt_libs_dir}/lib${tf}_debug.prl 773 774 # fix PRL_LIBS -F -> -L in .prl file 775 776 reinplace "/QMAKE_PRL_LIBS/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}_debug.prl 777 778 # fix "-framework Qt*" -> "-lQt*_debug" in .prl file 779 780 reinplace "/QMAKE_PRL_LIBS/s|-framework Qt\\(\[^ \]*\\)|-lQt\\1_debug|g" ${dr_qt_libs_dir}/lib${tf}_debug.prl 781 782 # fix up .la files to work with ${prefix}/lib entries 783 784 # rename .la file 785 786 move ${dr_qt_libs_dir}/${tf}_debug.la \ 787 ${dr_qt_libs_dir}/lib${tf}_debug.la 788 789 # fix "name that we can dlopen" in .la file 790 791 reinplace "s|dlname=''|dlname='lib${tf}_debug.${qt_major}.${t_minor}.${qt_patch}.dylib'|" ${dr_qt_libs_dir}/lib${tf}_debug.la 792 793 # fix "names of this library" in .la file 794 795 reinplace "s|library_names='\[^'\]*'|library_names='lib${tf}_debug.${qt_major}.${t_minor}.${qt_patch}.dylib lib${tf}_debug.${qt_major}.${t_minor}.dylib lib${tf}_debug.${qt_major}.dylib lib${tf}_debug.dylib'|" \ 796 ${dr_qt_libs_dir}/lib${tf}_debug.la 797 798 # fix "name of the static archive"; there is none in .la file 799 800 reinplace "s|old_library='\[^'\]*'|old_library=''|" \ 801 ${dr_qt_libs_dir}/lib${tf}_debug.la 802 803 # fix "libraries that this one depends upon" in .la file 804 805 reinplace "/dependency_libs/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}_debug.la 806 reinplace "/dependency_libs/s|-framework Qt\\(\[^ \]*\\)|-lQt\\1_debug|g" ${dr_qt_libs_dir}/lib${tf}_debug.la 807 reinplace "/dependency_libs/s| ${worksrcpath}\[^ \]*||g" \ 808 ${dr_qt_libs_dir}/lib${tf}_debug.la 809 reinplace "/dependency_libs/s| -lwebcored||" \ 810 ${dr_qt_libs_dir}/lib${tf}_debug.la 811 reinplace "/dependency_libs/s| -ljscored||" \ 812 ${dr_qt_libs_dir}/lib${tf}_debug.la 813 814 # fix "directory that this library needs to be installed in" in .la file 815 816 reinplace "/libdir/s|${qt_frameworks_dir}|${qt_libs_dir}|" \ 817 ${dr_qt_libs_dir}/lib${tf}_debug.la 818 819 } 644 820 } 645 821 … … 669 845 } 670 846 671 # remove 'tests' directory 672 673 file delete -force ${destroot}${prefix}/tests 847 # move tests to ${qt_data_dir} 848 849 xinstall -m 755 -d ${destroot}${qt_data_dir} 850 move ${destroot_qt}/tests/qt4 ${destroot}${qt_data_dir}/tests 851 674 852 } 675 853 … … 728 906 } 729 907 730 variant sqlite2 description {Enable SQLite version 2 SQL Driver} { 731 depends_lib-append port:sqlite2 732 configure.args-delete -no-sql-sqlite2 733 configure.args-append -plugin-sql-sqlite2 908 variant sqlite2 description {SQLite version 2 SQL Plugin Legacy Compatibility Variant} { 909 ui_error "${name} variant +sqlite2 has been replaced by the port 'qt4-mac-sqlite2-plugin'. Please install ${name} without +sqlite2, then install this new SQLite version 2 Qt plugin port." 910 return -code error "Variant disabled" 734 911 } 735 912 -
trunk/dports/aqua/qt4-mac/files/patch-tools_macdeployqt_shared_shared.cpp.diff
r96896 r98334 6 6 } else if (part < parts.count() && parts.at(part).endsWith(".framework")) { 7 7 - info.installName += "/" + (qtPath + "lib/").simplified(); 8 + info.installName += "/" + (qtPath + "Framework /").simplified();8 + info.installName += "/" + (qtPath + "Frameworks/").simplified(); 9 9 info.frameworkDirectory = info.installName; 10 10 state = FrameworkName;
Note: See TracChangeset
for help on using the changeset viewer.