Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Updated Portfile for 2.1.1 #14843

Closed
ioquatix opened this issue Feb 23, 2017 · 4 comments
Closed

Updated Portfile for 2.1.1 #14843

ioquatix opened this issue Feb 23, 2017 · 4 comments
Labels

Comments

@ioquatix
Copy link

I'm trying to fix the source build in Macports.

Here is the current port file, it's a work in progress.

# -*- 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

PortSystem          1.0
PortGroup           github 1.0

github.setup        ariya phantomjs 2.1.1
fetch.type          git

revision            1
categories          www
license             BSD
platforms           darwin
maintainers         stromnov openmaintainer

homepage            http://www.phantomjs.org/

description         PhantomJS is a minimalistic headless WebKit.

long_description    PhantomJS is a headless WebKit scriptable with a \
                    JavaScript API. It has fast and native support for \
                    various web standards: DOM handling, CSS selector, \
                    JSON, Canvas, and SVG.

checksums           rmd160  2197767a0498d0b8a9c90bf2daa9dcf135f36a69 \
                    sha256  538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1

depends_lib         port:openssl port:libxml2 port:libxslt port:sqlite3 port:icu port:zlib

#patchfiles          patch-tools_preconfig.sh.diff \
#                    patch-qcocoaapplicationdelegate.mm.diff \
#                    patch-src__tools__qlalr__lalr.cpp.diff

use_configure       no

build.cmd           ./build.py
build.target
build.args          --confirm \
                    --jobs ${build.jobs}

destroot    {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}

    xinstall -m 755 ${worksrcpath}/bin/${name} ${destroot}${prefix}/bin/${name}
    xinstall -W ${worksrcpath} ChangeLog README.md ${destroot}${docdir}
    move ${worksrcpath}/examples ${destroot}${docdir}/examples
}

# livecheck.regex     {phantomjs-(\d+(?:\.\d+)*)-source\.zip}

When trying to build this I get the following:

> sudo port -v install phantomjs
Portfile changed since last build; discarding previous state.
--->  Computing dependencies for phantomjs.
--->  Fetching archive for phantomjs
--->  phantomjs-2.1.1_1.darwin_16.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
--->  Attempting to fetch phantomjs-2.1.1_1.darwin_16.x86_64.tbz2 from http://nou.nc.packages.macports.org/pub/macports/packages.macports.org/phantomjs
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Attempting to fetch phantomjs-2.1.1_1.darwin_16.x86_64.tbz2 from https://packages.macports.org/phantomjs
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Attempting to fetch phantomjs-2.1.1_1.darwin_16.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/phantomjs
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Fetching distfiles for phantomjs
Cloning into '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1'...
remote: Counting objects: 64276, done.        
remote: Compressing objects: 100% (15/15), done.        
remote: Total 64276 (delta 2), reused 0 (delta 0), pack-reused 64261        
Receiving objects: 100% (64276/64276), 157.89 MiB | 2.15 MiB/s, done.
Resolving deltas: 100% (27052/27052), done.
--->  Verifying checksums for phantomjs
--->  Extracting phantomjs
--->  Configuring phantomjs
--->  Building phantomjs
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1" && ./build.py --confirm --jobs 8 
Submodule '3rdparty-win' (https://github.com/Vitallium/phantomjs-3rdparty-win.git) registered for path 'src/qt/3rdparty'
Submodule 'qtbase' (https://github.com/Vitallium/qtbase.git) registered for path 'src/qt/qtbase'
Submodule 'qtwebkit' (https://github.com/Vitallium/qtwebkit.git) registered for path 'src/qt/qtwebkit'
Cloning into '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1/src/qt/3rdparty'...
Cloning into '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1/src/qt/qtbase'...
Cloning into '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1/src/qt/qtwebkit'...
Submodule path 'src/qt/3rdparty': checked out '19051aa97cecdcd3ef8c8862e36a3cb4cd3471fc'
Submodule path 'src/qt/qtbase': checked out 'b5cc0083a5766e773885e8dd624c51a967c17de0'
Submodule path 'src/qt/qtwebkit': checked out 'e7b74331d695bfa8b77e39cdc50fc2d84a49a22a'

   Xcode not set up properly. You may need to confirm the license
   agreement by running /usr/bin/xcodebuild without arguments.


ERROR: Failed to build PhantomJS! Configuration of Qt Base failed.
Executing in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1: git submodule init
Executing in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1: git submodule update --init
configuring Qt Base, please wait...
Found OpenSSL installed via MacPorts
Executing in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1/src/qt/qtbase: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1/src/qt/qtbase/configure -static -opensource -confirm-license -prefix /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1/src/qt/qtbase -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -nomake examples -nomake tools -nomake tests -no-qml-debug -no-dbus -no-opengl -no-audio-backend -D QT_NO_GRAPHICSVIEW -D QT_NO_GRAPHICSEFFECT -D QT_NO_STYLESHEET -D QT_NO_STYLE_CDE -D QT_NO_STYLE_CLEANLOOKS -D QT_NO_STYLE_MOTIF -D QT_NO_STYLE_PLASTIQUE -D QT_NO_PRINTPREVIEWDIALOG -qpa phantom -openssl -openssl-linked -no-openvg -no-eglfs -no-egl -no-glib -no-gtkstyle -no-cups -no-sm -no-xinerama -no-xkb -no-xcb -no-kms -no-linuxfb -no-directfb -no-mtdev -no-libudev -no-evdev -no-pulseaudio -no-alsa -no-feature-PRINTPREVIEWWIDGET -no-pkg-config -no-c++11 -I/opt/local/include -L/opt/local/lib -release
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/work/phantomjs-2.1.1" && ./build.py --confirm --jobs 8 
Exit code: 1
Error: Failed to build phantomjs: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_phantomjs/phantomjs/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port phantomjs failed

The problem is the specific check in qtbase/mkspecs/features/mac/default_pre.prf

    # Make sure Xcode is set up properly
    isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
        error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")

and qtbase/configure

    if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then

This is not the correct way to determine if xcrun is working.

Replacing it with xcrun -find xcodebuild does work.

I checked in https://github.com/Vitallium/qtbase.git and it seems like this issue has been fixed.

https://github.com/Vitallium/qtbase/blob/phantomjs/configure#L546

SO the problem here is to update the external dependencies.

@ioquatix
Copy link
Author

Additionally, it would be nice to have a 2.1.2 release which included ALL sources, not as git submodules. If you download the release/archive from github, it doesn't include submodules. It's impossible to use. Can you make proper source releases that include everything?

@ioquatix
Copy link
Author

FYI here is the Macports issue: https://trac.macports.org/ticket/52365

@ioquatix
Copy link
Author

I think the goal should be to make a 2.1.2 release with updated dependencies, and then make a proper source release.

Additionally a long term goal might be to use the dependencies in Macports for qt rather than building it yourself.

@stale stale bot added the stale label Dec 26, 2019
@ariya
Copy link
Owner

ariya commented Dec 26, 2019

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be closed. In the future, if we see the need to attend to this issue again, then it will be reopened.
Thank you for your contribution!

@ariya ariya closed this as completed Dec 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants