summaryrefslogtreecommitdiff
path: root/qtwebengine/Pkgfile
blob: 4b7df74c66b1f2894c7edf5373283d72649dd5d2 (plain)
    1 # Description: Provides support for web applications using the Chromium browser project.
    2 # URL: https://www.qt.io/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Depends on: ffmpeg libvpx libwebp nodejs nss opus python qt5 xorg-libxscrnsaver xorg-libxtst
    5 
    6 name=qtwebengine
    7 version=5.15.9
    8 release=1
    9 source=(https://anduin.linuxfromscratch.org/BLFS/qtwebengine/$name-$version.tar.xz
   10 	https://www.linuxfromscratch.org/patches/blfs/svn/qtwebengine-$version-build_fixes-1.patch
   11 	qtwebengine-5.15.2-disable-fatal-warnings.patch
   12 	qtwebengine-5.15.2-extra_gn.patch
   13 	qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch
   14 	qtwebengine-5.15.2_p20210521-clang-libc++.patch
   15 	qtwebengine-5.15.2_p20211015-pdfium-system-lcms2.patch
   16 	qtwebengine-5.15.3_p20220406-ffmpeg5.patch
   17 	qt5-webengine-pipewire-0.3.patch
   18 	gcc12.patch)
   19 
   20 build() {
   21 	cd qtwebengine-$version
   22 
   23 	# https://www.linuxfromscratch.org/blfs/view/svn/x/qtwebengine.html
   24 	patch -p1 -i $SRC/qtwebengine-$version-build_fixes-1.patch
   25 	patch -p1 -i $SRC/qtwebengine-5.15.2-disable-fatal-warnings.patch
   26 	patch -p1 -i $SRC/qtwebengine-5.15.2-extra_gn.patch
   27 	patch -p1 -i $SRC/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch
   28 	patch -p1 -i $SRC/qtwebengine-5.15.2_p20210521-clang-libc++.patch
   29 	patch -p1 -i $SRC/qtwebengine-5.15.2_p20211015-pdfium-system-lcms2.patch
   30 	patch -p1 -i $SRC/qtwebengine-5.15.3_p20220406-ffmpeg5.patch
   31 	patch -p1 -d src/3rdparty -i $SRC/qt5-webengine-pipewire-0.3.patch
   32 	patch -p0 -d src/3rdparty/chromium/third_party/skia/src/utils/ -i $SRC/gcc12.patch
   33 
   34 	mkdir -pv .git src/3rdparty/chromium/.git
   35 	sed -e '/^MODULE_VERSION/s/5.*/5.15.2/' -i .qmake.conf
   36 	find -type f -name "*.pr[io]" | \
   37 		xargs sed -i -e 's|INCLUDEPATH += |&$$QTWEBENGINE_ROOT/include |'
   38 
   39 	prt-get isinst pulseaudio && sed -e '/link_pulseaudio/s/false/true/' \
   40 		-i src/3rdparty/chromium/media/media_options.gni
   41 
   42 	# Ninja, by default, sets the number of jobs to the number of availalble threads
   43 	test -n "$JOBS" && export NINJAFLAGS+=" -j ${JOBS-1}"
   44 
   45 	prt-get isinst ccache && export \
   46 		QMAKE_CC='ccache gcc' \
   47 		QMAKE_LINK_C='ccache gcc' \
   48 		QMAKE_LINK_C_SHLIB='ccache gcc' \
   49 		QMAKE_CXX='ccache g++' \
   50 		QMAKE_LINK='ccache g++' \
   51 		QMAKE_LINK_SHLIB='ccache g++' \
   52 		PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
   53 
   54 	install -d build
   55 	cd build
   56 
   57 	prt-get isinst pulseaudio && PKGMK_QTWEBENGINE+=' -pulseaudio' || PKGMK_QTWEBENGINE+=' -no-pulseaudio'
   58 	prt-get isinst pipewire && PKGMK_QTWEBENGINE+=' -webengine-webrtc-pipewire'
   59 	prt-get isinst icu && PKGMK_QTWEBENGINE+=' -webengine-icu' || PKGMK_QTWEBENGINE+=' -no-webengine-icu'
   60 
   61 	qmake-qt5 .. -- \
   62 		$PKGMK_QTWEBENGINE \
   63 		-proprietary-codecs \
   64 		-system-ffmpeg \
   65 		-system-opus \
   66 		-system-webp
   67 
   68 	make
   69 	make INSTALL_ROOT=$PKG install
   70 
   71 	find "$PKG/usr/lib" -type f -name '*.prl' \
   72 		-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
   73 }

Generated by cgit