qtwebkit-5.212.0_alpha2.ebuild (3819B)
1 # Copyright 1999-2017 Gentoo Foundation 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=6 5 CMAKE_MAKEFILE_GENERATOR="ninja" 6 PYTHON_COMPAT=( python2_7 ) 7 USE_RUBY="ruby20 ruby21 ruby22 ruby23" 8 9 inherit check-reqs cmake-utils eutils flag-o-matic python-any-r1 ruby-single toolchain-funcs versionator 10 11 MY_P="qtwebkit-5.212.0-alpha2" # FIXME: ${PV} 12 DESCRIPTION="Open source web browser engine" 13 HOMEPAGE="https://github.com/annulen/webkit" 14 SRC_URI="https://github.com/annulen/webkit/releases/download/${MY_P}/${MY_P}.tar.xz" 15 QV="5.2" # Minimum Qt version 16 17 SLOT=5 18 19 LICENSE="LGPL-2+ BSD" 20 KEYWORDS="~amd64 ~x86" 21 22 IUSE="+geolocation +gstreamer +jit +hyphen multimedia nsplugin orientation opengl +printsupport qml +webp X" 23 24 REQUIRED_USE=" 25 nsplugin? ( X ) 26 qml? ( opengl ) 27 ?? ( gstreamer multimedia ) 28 " 29 30 # Dependencies found at Source/cmake/OptionsQt.cmake 31 RDEPEND=" 32 dev-db/sqlite:3= 33 >=dev-libs/icu-3.8.1-r1:= 34 >=dev-libs/libxml2-2.8:2 35 >=dev-libs/libxslt-1.1.7 36 >=media-libs/libpng-1.4:0= 37 media-libs/libwebp:= 38 virtual/jpeg:0= 39 >=dev-qt/qtcore-${QV} 40 >=dev-qt/qtgui-${QV} 41 >=dev-qt/qtnetwork-${QV} 42 >=dev-qt/qtwidgets-${QV} 43 44 geolocation? ( >=dev-qt/qtpositioning-${QV} ) 45 gstreamer? ( 46 >=dev-libs/glib-2.36:2 47 >=media-libs/gstreamer-1.2:1.0 48 >=media-libs/gst-plugins-base-1.2:1.0 49 >=media-libs/gst-plugins-bad-1.6.0:1.0 ) 50 hyphen? ( dev-libs/hyphen ) 51 multimedia? ( >=dev-qt/qtmultimedia-${QV}[widgets] ) 52 opengl? ( >=dev-qt/qtopengl-${QV} ) 53 orientation? ( >=dev-qt/qtsensors-${QV} ) 54 printsupport? ( >=dev-qt/qtprintsupport-${QV} ) 55 qml? ( 56 >=dev-qt/qtdeclarative-${QV} 57 >=dev-qt/qtwebchannel-${QV}[qml] ) 58 X? ( 59 x11-libs/libX11 60 x11-libs/libXcomposite 61 x11-libs/libXrender ) 62 " 63 64 # Need real bison, not yacc 65 DEPEND="${RDEPEND} 66 ${PYTHON_DEPS} 67 ${RUBY_DEPS} 68 >=dev-lang/perl-5.10 69 >=dev-util/gperf-3.0.1 70 >=sys-devel/bison-2.4.3 71 >=sys-devel/flex-2.5.34 72 || ( >=sys-devel/gcc-4.9 >=sys-devel/clang-3.3 ) 73 virtual/pkgconfig 74 " 75 76 S="${WORKDIR}/${MY_P}" 77 78 CHECKREQS_DISK_BUILD="1G" # Debug build requires much more see bug #417307 79 80 pkg_pretend() { 81 if [[ ${MERGE_TYPE} != "binary" ]] ; then 82 if is-flagq "-g*" && ! is-flagq "-g*0" ; then 83 einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" 84 check-reqs_pkg_pretend 85 fi 86 fi 87 } 88 89 pkg_setup() { 90 if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then 91 check-reqs_pkg_setup 92 fi 93 94 python-any-r1_pkg_setup 95 } 96 97 src_configure() { 98 # Respect CC, otherwise fails on prefix #395875 99 tc-export CC 100 101 # older glibc needs this for INTPTR_MAX, bug #533976 102 if has_version "<sys-libs/glibc-2.18" ; then 103 append-cppflags "-D__STDC_LIMIT_MACROS" 104 fi 105 106 # Multiple rendering bugs on youtube, github, etc without this, bug #547224 107 append-flags $(test-flags -fno-strict-aliasing) 108 109 local ruby_interpreter="" 110 111 if has_version "virtual/rubygems[ruby_targets_ruby23]"; then 112 ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby23)" 113 elif has_version "virtual/rubygems[ruby_targets_ruby22]"; then 114 ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby22)" 115 elif has_version "virtual/rubygems[ruby_targets_ruby21]"; then 116 ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby21)" 117 else 118 ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby20)" 119 fi 120 121 local mycmakeargs=( 122 -DENABLE_API_TESTS=OFF 123 -DENABLE_DEVICE_ORIENTATION=$(usex orientation) 124 -DENABLE_GEOLOCATION=$(usex geolocation) 125 -DENABLE_JIT=$(usex jit) 126 -DENABLE_NETSCAPE_PLUGIN_API=$(usex nsplugin) 127 -DENABLE_OPENGL=$(usex opengl) 128 -DENABLE_WEBKIT2=$(usex qml) 129 -DUSE_GSTREAMER=$(usex gstreamer) 130 -DUSE_QT_MULTIMEDIA=$(usex multimedia) 131 -DENABLE_X11_TARGET=$(usex X) 132 -DCMAKE_BUILD_TYPE=Release 133 -DPORT=Qt 134 ${ruby_interpreter} 135 ) 136 137 cmake-utils_src_configure 138 } 139 140 src_compile() { 141 cmake-utils_src_compile 142 } 143 144 src_install() { 145 cmake-utils_src_install 146 }