[142930] trunk/dports/devel

mcalhoun at macports.org mcalhoun at macports.org
Sat Dec 12 07:50:20 PST 2015


Revision: 142930
          https://trac.macports.org/changeset/142930
Author:   mcalhoun at macports.org
Date:     2015-11-28 09:51:32 -0800 (Sat, 28 Nov 2015)
Log Message:
-----------
qt5-creator-mac and subports:
* rename qt5-creator-mac -> qt5-creator
* rename qt5-creator-mac-docs -> qt5-creator-docs
* discontinue qt5-creator-mac-examples since it installed examples from qbs build system and not Qt Creator

* fix dependencies of new qt5-creator (#49825)
* install files to allow Qt Creator to find Qt from MacPorts (qtversion.xml and profiles.xml)
* remove delete commands that do not do anything

Modified Paths:
--------------
    trunk/dports/devel/qt5-creator/Portfile
    trunk/dports/devel/qt5-creator-mac/Portfile

Added Paths:
-----------
    trunk/dports/devel/qt5-creator/

Modified: trunk/dports/devel/qt5-creator/Portfile
===================================================================
--- trunk/dports/devel/qt5-creator-mac/Portfile	2015-11-27 13:32:37 UTC (rev 142913)
+++ trunk/dports/devel/qt5-creator/Portfile	2015-11-28 17:51:32 UTC (rev 142930)
@@ -3,11 +3,12 @@
 
 PortSystem          1.0
 
-name                qt5-creator-mac
+name                qt5-creator
 
-if { ${subport} eq "${name}-docs" || ${subport} eq "${name}-examples" } {
+if { ${subport} eq "${name}-docs" } {
     universal_variant no
     supported_archs   noarch
+    set qt5_qmake_request_no_debug 1
 }
 PortGroup           qmake5 1.0
 
@@ -27,6 +28,12 @@
                     sha256  029e22307e79c4fb3a34be854dedddaa56476c6c6374c312125b9302bcbc0fd9
 
 if { ${subport} eq ${name}  } {
+    depends_lib-append          \
+        port:qt5-qtscript       \
+        port:qt5-qtdeclarative  \
+        port:qt5-qttools        \
+        port:qt5-qtmacextras
+    
     depends_lib-append     port:botan
     configure.args-append  "USE_SYSTEM_BOTAN=1"
         
@@ -46,18 +53,81 @@
             }
         }
     }
+
+    # put following in post-destroot so it works with universal
+    post-destroot {
+        # sdktool is a tool located in "Qt Creator.app/Contents/Resources"
+        #
+        # two necessary files that sdktool creates are:
+        #    "${qt_apps_dir}/Qt Creator.app/Contents/Resources/QtProject/qtcreator/qtversion.xml"
+        #    "${qt_apps_dir}/Qt Creator.app/Contents/Resources/QtProject/qtcreator/profiles.xml"
+        #
+        # from the installer.dat file, it seems the following are run by the binary installer of Qt Creator version 5.5.1
+        #    sdktool addQt --id qt.55.clang_64 --name "Qt %{Qt:Version} clang 64bit" --qmake qmakeBinary --type Qt4ProjectManager.QtVersion.Desktop
+        #    sdktool addKit --id qt.55.clang_64_kit --name "Desktop Qt %{Qt:Version} clang 64bit" --devicetype Desktop --qt qt.55.clang_64 --toolchain x86-macos-generic-mach_o-64bit
+        # modify for our purposes
+        #
+        # for unknownd reason, using system instead of exec results in "QWidget: Cannot create a QWidget without QApplication"
+        set sdktool ${destroot}${qt_apps_dir}/Qt\ Creator.app/Contents/Resources/sdktool
+
+        exec                                             \
+            "${sdktool}"                                 \
+            addQt                                        \
+            --id    qt.5.macports                        \
+            --name  "Qt %{Qt:Version} from MacPorts"     \
+            --qmake "${qt_qmake_cmd}"                    \
+            --type  Qt4ProjectManager.QtVersion.Desktop
+
+        if { [variant_isset universal] } {
+            foreach arch ${universal_archs_to_use} {
+                if { ${arch} eq "i386" } {
+                    set toolchain_bit      32
+                    set qt_qmake_spec_arch ${qt_qmake_spec_32}
+                } else {
+                    set toolchain_bit      64
+                    set qt_qmake_spec_arch ${qt_qmake_spec_64}
+                }
+
+                exec                                                               \
+                    "${sdktool}"                                                   \
+                    addKit                                                         \
+                    --id         qt.5.macports_${arch}_kit                         \
+                    --name       "Desktop Qt %{Qt:Version} from MacPorts ${arch}"  \
+                    --devicetype Desktop                                           \
+                    --qt         qt.5.macports                                     \
+                    --toolchain  x86-macos-generic-mach_o-${toolchain_bit}bit      \
+                    --mkspec     ${qt_qmake_spec_arch}
+            }
+        } else {
+            if { ${build_arch} eq "i386" } {
+                set toolchain_bit 32
+            } else {
+                set toolchain_bit 64
+            }
+
+            exec                                                                     \
+                "${sdktool}"                                                         \
+                addKit                                                               \
+                --id         qt.5.macports_${build_arch}_kit                         \
+                --name       "Desktop Qt %{Qt:Version} from MacPorts ${build_arch}"  \
+                --devicetype Desktop                                                 \
+                --qt         qt.5.macports                                           \
+                --toolchain  x86-macos-generic-mach_o-${toolchain_bit}bit            \
+                --mkspec     ${qt_qmake_spec}
+
+        }
+
+        # N.B. that at some point in the future, QtCreator.ini may need to be created
+        #    to include more search locations for documentation and examples
+    }
 }
 
 subport ${name}-docs {
-    depends_lib-append port:${name} port:qt5-mac-sqlite3-plugin 
+    depends_build-append port:qt5-sqlite-plugin
+    depends_run-append   port:${name}
     build.target       docs
     
     destroot {
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/Info.plist"
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/MacOS/qml2puppet.app/Contents/Info.plist"
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/MacOS/qmlpuppet.app/Contents/Info.plist"
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/Resources/qml/qmldump/Info.plist"
-        
         xinstall -m 755 -d ${destroot}${qt_apps_dir}
         copy "${worksrcpath}/bin/Qt Creator.app" "${destroot}${qt_apps_dir}"
         
@@ -66,13 +136,6 @@
     }
 }
 
-subport ${name}-examples {
-    depends_lib-append port:${name}
-    build           {}
-    destroot.dir    ${worksrcpath}/src/shared/qbs
-    destroot.target -f Makefile.static INSTALL_ROOT=${destroot}${prefix} install_examples
-}
-
 livecheck.type      regex
 livecheck.url       http://www.qt.io/download-open-source/
 livecheck.regex     qt-creator-opensource-src-(\[a-z0-9.\]+)${extract.suffix}"

Modified: trunk/dports/devel/qt5-creator-mac/Portfile
===================================================================
--- trunk/dports/devel/qt5-creator-mac/Portfile	2015-11-28 17:23:32 UTC (rev 142929)
+++ trunk/dports/devel/qt5-creator-mac/Portfile	2015-11-28 17:51:32 UTC (rev 142930)
@@ -4,75 +4,19 @@
 PortSystem          1.0
 
 name                qt5-creator-mac
-
-if { ${subport} eq "${name}-docs" || ${subport} eq "${name}-examples" } {
-    universal_variant no
-    supported_archs   noarch
-}
-PortGroup           qmake5 1.0
-
 version             3.4.1
+revision            1
 categories          devel aqua
-platforms           darwin
 license             LGPL-2.1
-maintainers         mcalhoun openmaintainer
-description         Cross-platform integrated development environment (IDE) tailored to the needs of Qt developers.
-long_description    Qt Creator is a cross-platform integrated development environment (IDE) tailored to the needs of Qt developers.
 
-homepage            http://qt-project.org/wiki/Category:Tools::QtCreator
-distname            qt-creator-opensource-src-${version}
-master_sites        https://download.qt-project.org/official_releases/qtcreator/[join [lrange [split ${version} .] 0 1] .]/${version}/
-
-checksums           rmd160  e4fc59e156514e6c29697c414c655efdc410e337 \
-                    sha256  029e22307e79c4fb3a34be854dedddaa56476c6c6374c312125b9302bcbc0fd9
-
-if { ${subport} eq ${name}  } {
-    depends_lib-append     port:botan
-    configure.args-append  "USE_SYSTEM_BOTAN=1"
-        
-    if { ![variant_isset universal] } {
-        destroot {
-            # make install attempts to install command line tools into /bin, etc.
-            xinstall -m 755 -d ${destroot}${qt_apps_dir}
-            copy "${worksrcpath}/bin/Qt Creator.app" "${destroot}${qt_apps_dir}"
-        }
-    } else {
-        # We should really just override destroot, but the muniversal Portgroup would override our override.
-        destroot.cmd "true"
-        merger-post-destroot {
-            foreach arch ${universal_archs_to_use} {
-                xinstall -m 755 -d ${destroot}-${arch}${qt_apps_dir}
-                copy "${worksrcpath}-${arch}/bin/Qt Creator.app" "${destroot}-${arch}${qt_apps_dir}"
-            }
-        }
-    }
+if { ${subport} eq ${name} } {
+    replaced_by     qt5-creator
+} elseif { ${subport} eq "${name}-docs"  } {
+    replaced_by     qt5-creator-docs
+} elseif { ${subport} eq "${name}-examples"  } {
+    # this port installed examples from qbs build system not Qt Creator
 }
+PortGroup           obsolete 1.0
 
-subport ${name}-docs {
-    depends_lib-append port:${name} port:qt5-mac-sqlite3-plugin 
-    build.target       docs
-    
-    destroot {
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/Info.plist"
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/MacOS/qml2puppet.app/Contents/Info.plist"
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/MacOS/qmlpuppet.app/Contents/Info.plist"
-        delete "${worksrcpath}/bin/Qt Creator.app/Contents/Resources/qml/qmldump/Info.plist"
-        
-        xinstall -m 755 -d ${destroot}${qt_apps_dir}
-        copy "${worksrcpath}/bin/Qt Creator.app" "${destroot}${qt_apps_dir}"
-        
-        xinstall -m 755 -d ${destroot}${qt_docs_dir}
-        copy ${worksrcpath}/doc/html ${worksrcpath}/doc/html-dev ${destroot}${qt_docs_dir}
-    }
-}
-
-subport ${name}-examples {
-    depends_lib-append port:${name}
-    build           {}
-    destroot.dir    ${worksrcpath}/src/shared/qbs
-    destroot.target -f Makefile.static INSTALL_ROOT=${destroot}${prefix} install_examples
-}
-
-livecheck.type      regex
-livecheck.url       http://www.qt.io/download-open-source/
-livecheck.regex     qt-creator-opensource-src-(\[a-z0-9.\]+)${extract.suffix}"
+subport ${name}-docs { }
+subport ${name}-examples { }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/7303708a/attachment.html>


More information about the macports-changes mailing list