logo

overlay

My (experimental) gentoo overlay

qtwebkit-5.212.9999.ebuild (3732B)


      1 # Copyright 1999-2018 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 git-r3
     10 
     11 DESCRIPTION="Open source web browser engine"
     12 HOMEPAGE="https://github.com/annulen/webkit"
     13 SRC_URI=""
     14 EGIT_REPO_URI="https://github.com/annulen/webkit"
     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 CHECKREQS_DISK_BUILD="1G" # Debug build requires much more see bug #417307
     77 
     78 pkg_pretend() {
     79 	if [[ ${MERGE_TYPE} != "binary" ]] ; then
     80 		if is-flagq "-g*" && ! is-flagq "-g*0" ; then
     81 			einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS"
     82 			check-reqs_pkg_pretend
     83 		fi
     84 	fi
     85 }
     86 
     87 pkg_setup() {
     88 	if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then
     89 		check-reqs_pkg_setup
     90 	fi
     91 
     92 	python-any-r1_pkg_setup
     93 }
     94 
     95 src_configure() {
     96 	# Respect CC, otherwise fails on prefix #395875
     97 	tc-export CC
     98 
     99 	# older glibc needs this for INTPTR_MAX, bug #533976
    100 	if has_version "<sys-libs/glibc-2.18" ; then
    101 		append-cppflags "-D__STDC_LIMIT_MACROS"
    102 	fi
    103 
    104 	# Multiple rendering bugs on youtube, github, etc without this, bug #547224
    105 	append-flags $(test-flags -fno-strict-aliasing)
    106 
    107 	local ruby_interpreter=""
    108 
    109 	if has_version "virtual/rubygems[ruby_targets_ruby23]"; then
    110 		ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby23)"
    111 	elif has_version "virtual/rubygems[ruby_targets_ruby22]"; then
    112 		ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby22)"
    113 	elif has_version "virtual/rubygems[ruby_targets_ruby21]"; then
    114 		ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby21)"
    115 	else
    116 		ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby20)"
    117 	fi
    118 
    119 	local mycmakeargs=(
    120 		-DENABLE_API_TESTS=OFF
    121 		-DENABLE_DEVICE_ORIENTATION=$(usex orientation)
    122 		-DENABLE_GEOLOCATION=$(usex geolocation)
    123 		-DENABLE_JIT=$(usex jit)
    124 		-DENABLE_NETSCAPE_PLUGIN_API=$(usex nsplugin)
    125 		-DENABLE_OPENGL=$(usex opengl)
    126 		-DENABLE_WEBKIT2=$(usex qml)
    127 		-DUSE_GSTREAMER=$(usex gstreamer)
    128 		-DUSE_QT_MULTIMEDIA=$(usex multimedia)
    129 		-DENABLE_X11_TARGET=$(usex X)
    130 		-DCMAKE_BUILD_TYPE=Release
    131 		-DPORT=Qt
    132 		${ruby_interpreter}
    133 	)
    134 
    135 	cmake-utils_src_configure
    136 }
    137 
    138 src_compile() {
    139 	cmake-utils_src_compile
    140 }
    141 
    142 src_install() {
    143 	cmake-utils_src_install
    144 }