summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-04-18 07:18:23 +0200
committerAndreas Grapentin <andreas@grapentin.org>2018-04-18 07:18:23 +0200
commitfabd77cc4d3756522bfb989d4d6a880b85f5b761 (patch)
tree0737f737bdb97fe8b756c29c6e51283b18f4aaf7
parent6e1ec90ab6704f7e472566725b524a888d63d2d2 (diff)
stage4 is done
-rw-r--r--src/stage4/patches/aspell.patch3
-rw-r--r--src/stage4/patches/clisp.patch23
-rw-r--r--src/stage4/patches/doxygen.patch22
-rw-r--r--src/stage4/patches/gtkglext.patch12
-rw-r--r--src/stage4/patches/linux-libre.patch789
-rw-r--r--src/stage4/patches/opencv.patch70
-rw-r--r--src/stage4/patches/phonon-breakdeps.patch21
-rw-r--r--src/stage4/patches/phonon-gstreamer-breakdeps.patch30
-rw-r--r--src/stage4/patches/pulseaudio.patch91
-rw-r--r--src/stage4/patches/qt5-webkit.patch178
-rw-r--r--src/stage4/patches/systemd.patch9
-rw-r--r--src/stage4/patches/texlive-bin.patch.texlive-bin102
-rw-r--r--src/stage4/patches/webkit2gtk.patch105
-rw-r--r--src/stage4/stage4.sh6
14 files changed, 995 insertions, 466 deletions
diff --git a/src/stage4/patches/aspell.patch b/src/stage4/patches/aspell.patch
index 7c574da..bd45264 100644
--- a/src/stage4/patches/aspell.patch
+++ b/src/stage4/patches/aspell.patch
@@ -1,6 +1,6 @@
--- a/PKGBUILD 2018-04-04 12:52:35.771273425 +0200
+++ b/PKGBUILD 2018-04-04 17:35:11.302666425 +0200
-@@ -15,9 +15,17 @@ url="http://aspell.net/"
+@@ -15,9 +15,18 @@ url="http://aspell.net/"
license=('LGPL')
depends=('gcc-libs' 'ncurses')
optdepends=('perl: to import old dictionaries')
@@ -16,6 +16,7 @@
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
++ # fix build with gcc-7
+ patch -Np1 -i ../8089fa02122fed0a6394eba14bbedcb1d18e238.patch
+}
diff --git a/src/stage4/patches/clisp.patch b/src/stage4/patches/clisp.patch
deleted file mode 100644
index 6f22827..0000000
--- a/src/stage4/patches/clisp.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -rupN a/PKGBUILD b/PKGBUILD
---- a/PKGBUILD 2018-04-06 04:59:13.746587767 +0200
-+++ b/PKGBUILD 2018-04-06 04:59:13.746587767 +0200
-@@ -9,7 +9,6 @@ license=('GPL')
- url="http://clisp.cons.org/"
- depends=('readline' 'libsigsegv')
- provides=('common-lisp')
--makedepends=('ffcall')
- options=('!makeflags' '!emptydirs')
- source=("http://downloads.sourceforge.net/sourceforge/clisp/clisp-${pkgver}.tar.bz2"
- "clisp-gcc5.patch"
-@@ -30,9 +29,9 @@ prepare() {
-
- build() {
- cd $srcdir/${pkgname}-${pkgver}
-- ./configure --prefix=/usr --with-readline --with-ffcall src
-+ ./configure --prefix=/usr --with-readline src
- cd src
-- ./makemake --prefix=/usr --with-readline --with-ffcall --with-dynamic-ffi > Makefile
-+ ./makemake --prefix=/usr --with-readline --with-dynamic-ffi > Makefile
- make
- sed -i 's,http://www.lisp.org/HyperSpec/,http://www.lispworks.com/reference/HyperSpec/,g' config.lisp
- make
diff --git a/src/stage4/patches/doxygen.patch b/src/stage4/patches/doxygen.patch
new file mode 100644
index 0000000..4399ee0
--- /dev/null
+++ b/src/stage4/patches/doxygen.patch
@@ -0,0 +1,22 @@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-14 16:29:01.773155012 +0200
++++ b/PKGBUILD 2018-04-14 16:50:58.123030252 +0200
+@@ -28,15 +28,16 @@ prepare() {
+ build() {
+ cd ${pkgbase}-Release_${pkgver//./_}/build
+
++ # FIXME: ironically, building docs breaks on risc-v.
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DDOC_INSTALL_DIR:PATH=share/doc/doxygen \
+ -DPYTHON_EXECUTABLE:FILE=/usr/bin/python2 \
+- -Dbuild_doc:BOOL=ON \
++ -Dbuild_doc:BOOL=OFF \
+ -Dbuild_wizard:BOOL=ON
+
+ make
+- make docs
++ #make docs
+ }
+
+ check(){
diff --git a/src/stage4/patches/gtkglext.patch b/src/stage4/patches/gtkglext.patch
deleted file mode 100644
index 929621e..0000000
--- a/src/stage4/patches/gtkglext.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -rupN a/PKGBUILD b/PKGBUILD
---- a/PKGBUILD 2018-04-11 14:52:50.921268248 +0200
-+++ b/PKGBUILD 2018-04-11 14:56:52.850245319 +0200
-@@ -10,7 +10,7 @@ arch=('i686' 'x86_64')
- url="http://gtkglext.sourceforge.net/"
- license=('LGPL')
- depends=('gtk2' 'glu' 'libxmu' 'pangox-compat')
--makedepends=('mesa')
-+makedepends=('mesa' 'python')
- source=("http://downloads.sourceforge.net/sourceforge/gtkglext/${pkgname}-${pkgver}.tar.bz2"
- 'gtk2.20.patch')
- md5sums=('ed7ba24ce06a8630c07f2d0ee5f04ab4'
diff --git a/src/stage4/patches/linux-libre.patch b/src/stage4/patches/linux-libre.patch
index 5362a43..69cad26 100644
--- a/src/stage4/patches/linux-libre.patch
+++ b/src/stage4/patches/linux-libre.patch
@@ -1,380 +1,23 @@
---- a/PKGBUILD 2018-03-25 19:29:50.050475492 +0200
-+++ b/PKGBUILD 2018-03-25 21:01:11.229898629 +0200
-@@ -1,156 +1,70 @@
--# Maintainer: David P. <megver83@parabola.nu>
--# Contributor: André Silva <emulatorman@hyperbola.info>
--# Contributor: Márcio Silva <coadde@hyperbola.info>
--# Contributor: fauno <fauno@parabola.nu>
--# Contributor: Sorin-Mihai Vârgolici <smv@yobicore.org>
--# Contributor: Michał Masłowski <mtjm@mtjm.eu>
--# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
--# Contributor: Luke R. <g4jc@openmailbox.org>
--# Contributor: Andreas Grapentin <andreas@grapentin.org>
--
--# Based on linux package
-+# $Id$
-+# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
-+# Maintainer (Arch): Thomas Baechler <thomas@archlinux.org>
-
- pkgbase=linux-libre # Build stock kernel
- #pkgbase=linux-libre-custom # Build kernel with a different name
--_pkgbasever=4.15-gnu
--_pkgver=4.15.15-gnu
--
--_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
--_replacesoldkernels=() # '%' gets replaced with _kernelname
--_replacesoldmodules=() # '%' gets replaced with _kernelname
--
--_srcname=linux-${_pkgbasever%-*}
--_archpkgver=${_pkgver%-*}
--pkgver=${_pkgver//-/_}
-+_srcname=linux-4.15
-+pkgver=4.15.11
-+pkgver+=_gnu
- pkgrel=1
--rcnrel=armv7-x1
--arch=('i686' 'x86_64' 'armv7h')
-+arch=('x86_64')
- url="https://linux-libre.fsfla.org/"
- license=('GPL2')
- makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
--makedepends_armv7h=('git')
- options=('!strip')
- source=(
-- "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"{,.sign}
-- "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz"{,.sign}
-- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm"{,.sig}
-- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm"{,.sig}
-- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm"{,.sig}
-- # the main kernel config files
-- 'config.i686' 'config.x86_64' 'config.armv7h'
-- # pacman hooks for depmod and initramfs regeneration
-- '60-linux.hook' '90-linux.hook'
-- # standard config files for mkinitcpio ramdisk
-- 'linux.preset'
-- # armv7h patches
-- "https://repo.parabola.nu/other/rcn-libre/patches/${_pkgver%-*}/rcn-libre-${_pkgver%-*}-${rcnrel}.patch"{,.sig}
-- '0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch'
-- '0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch'
-- '0003-SMILE-Plug-device-tree-file.patch'
-- '0004-fix-mvsdio-eMMC-timing.patch'
-- '0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch'
-- '0006-set-default-cubietruck-led-triggers.patch'
-- '0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch'
-- '0008-disable-USB3-port-on-ODROID-XU.patch'
-- '0009-ARM-dove-enable-ethernet-on-D3Plug.patch'
-- '0010-power-add-power-sequence-library.patch'
-- '0011-usb-core-add-power-sequence-handling-for-USB-devices.patch'
-- '0012-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch'
-- '0013-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch'
-- '0014-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch'
-- # other patches
-- '0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch'
-- '0002-fix-Atmel-maXTouch-touchscreen-support.patch'
-- '0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch'
-- '0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch'
-+ https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver%.*}-gnu/linux-libre-${pkgver%.*}-gnu.tar.xz{,.sign}
-+ https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver//_/-}/patch-${pkgver%.*}-gnu-${pkgver//_/-}.xz{,.sign}
-+ config # the main kernel config file
-+ 60-linux.hook # pacman hook for depmod
-+ 90-linux.hook # pacman hook for initramfs regeneration
-+ linux.preset # standard config files for mkinitcpio ramdisk
-+ 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
-+ 0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
-+ https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm{,.sig}
-+ https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm{,.sig}
-+ https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm{,.sig}
-+ 0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch
- )
- validpgpkeys=(
- '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
- '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P.
- )
--sha512sums=('a55cc663c6fb1e1cfa7905282b368b5d5888bc2398f0acf37e5bb9a232ded04fd566b1980e654da26aaec005332e458581495184d6bd4cec669181085d4d78a5'
-+sha256sums=('e6556514286f9cd6b46f5d5769b2cc3c61ac7d6fa9c9c400e3c2fb5949490186'
- 'SKIP'
-- 'fe327c836db34fc9ea2e616d3cb57cd7a56b9de56e85ccb513936c926d178ba81669c1ebe3ba0599eb942a87a9883576c7e404aa33aa3968613f88c621563453'
-+ '52005a49f68f683e12b407216476ea5dcc1c6511fc0a927b029793c253036427'
- 'SKIP'
-- '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
-+ '79893811422931bd216dac1f99319792ccebbc931b8f4699da990aae0c1757cc'
-+ 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
-+ '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
-+ 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
-+ '4ffdc2a458845c2a7c03c735477dbf51b5b01b10568bf577b37a29e872135cab'
-+ '12b281dc45f1954cc3f52276927bb2965c3132c0a8bd7f485869ced2c541d485'
-+ 'bfd4a7f61febe63c880534dcb7c31c5b932dde6acf991810b41a939a93535494'
- 'SKIP'
-- '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1'
-+ '13bd7a8d9ed6b6bc971e4cd162262c5a20448a83796af39ce394d827b0e5de74'
- 'SKIP'
-- '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78'
-+ '6de8a8319271809ffdb072b68d53d155eef12438e6d04ff06a5a4db82c34fa8a'
- 'SKIP'
-- '93cc2b304a116edb351d05a7b5c0a6b900fa4222474c26ac5dd15c754ddf0a0e2b7ec8bb40671fcb38c3be08c9279343456a3caf9d0b7ee4088b6afb4c465512'
-- '0c90ff5cfe3ed0484603255437fb7b7d3450482ede164e139324c2761f3640797932b95e5d696b074c173ef472a5cdeca04c0a56198e54b47c9394f9efd94570'
-- '36e657c0a1c389b9f68afd0506116af8bb18ee58d2b846ab2176831b897c533bac703337644bf963879549a9fc45786b5b4b5e964305a934630d5c1fb3e8a39f'
-- '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
-- '4a8b324aee4cccf3a512ad04ce1a272d14e5b05c8de90feb82075f55ea3845948d817e1b0c6f298f5816834ddd3e5ce0a0e2619866289f3c1ab8fd2f35f04f44'
-- '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
-- '7da8f3fbeb1b697f758ff6c09dd17384b931cebaa5f2f735998f8d30d088af3d6a1895dc741df3c94f3edaad80c01b588667558a82ed029ecec69dfa39706c16'
-- 'SKIP'
-- 'ba44aa1252aa1b172e0bc8bbbff864ff60cad6739b2aed2f6a2402848aa65cdb8a8ca6bb9341569b089d60dfd83c3bdd744b5810061ac76b19f0d337afe4cc8d'
-- '738bc2874351d9e1b94319e6caf615b49753155c99dc9318a1ce9eced50f87627a7331762951f55e2bea8abdb97b80a617a08f3f0bc735e56ff831a8bbb19816'
-- 'f45d8d417eb3f4b6e02e337480bd99a8ebb4b9ac004c53a5432255e5841578fb64530663b6eacb3c8f40aaade8e1dc1e584aa1cf4b560103119e4b32e19b66c3'
-- '25ee5d9859d3df2d054fd6d53fe6b8931d6ac9f85533c54f3dd926fce917c81bd96cb3858189a20cf28a32b43efd1566cb5513f7db18a0bb8ead1a4e8a7be6fc'
-- 'a1aa8272760da0c8d2772cc8a57d8600f08db176206afd2a155055d2969bf0295f342a156841964a07de53fbf0356385b604ad75e5556569872dfad1863b2c27'
-- 'b58efc374344d10290371f3dfe8a124f855015d3ce169ccf538e6c1476092abf7ac689f0f10fb6a191fa19545b49ce13957ada066b37415f37dd5989ff93db37'
-- 'd2326e2e3ef6f2f5e911e6ad2fc3ac33b6f53fc5bb03e61d0e8371e6c7199028b226356926472ba676ca68a6cc57d33856c662615ed5b52566570670d0f96c89'
-- 'bc47549f2a79a79659d4d53f739e091c1e8f54cef8c1776be2034675cbb43f584a128607b1d4dd6a9f465706bb1470c6cb4277877dd3218e7280f503babf8300'
-- 'd90f3a3b74d65b84c4c2c229d10d2bb854e39e3429ba1469f8bb286819d559c68e00302de2be5043cf274b39a58686dc822c60afe1c553c4c967ef168d98af05'
-- '0c1a4334fcb4e75d25ec43873275b2f8a599a096b05a51ef2f9d48f3c8425a153f5f0df775e030e61b792f8b34e9c848229028fb6d2411f85028441826951dd5'
-- '0ccccf4411df6b86486b14e9354bf48355a2dc5bfefce693c5afc1a340db6f9db525a0306897ccbb5ed80304fa38ef13f32355cfeee1c9b684db0a9c0063d5c1'
-- '1a491eab1b07e9fb0b8a8dba4ef17d658c85106e7f62f3a37c34513aa9cd50b4bbb273aa445380f2e2135adea68c7102718e71bf2c9f4d3a5c24515620606605'
-- '9ae97a7f29323542d70576e8800e2090a69a43caee3182a453e80c3c3265d6cc04e2b5701e5d24d8a2717e29272950231b7e477aa32d69c7333c083626fc6802'
-- '9b8829fd9bf6c91e5c9e21184c7f57b22d786c20a15512e91cc75890a5d08a633df555973b29f2da9a7d9b965abd0c76ecdefa5498217837389ad1d0be0fb754'
-- '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
-- 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
-- '0f5531df585efa48e72b335ab88973bbce6c3807db55dcfac2fcda20f69618ee5bd5881ab278bd8cdde1f96bc34d5becca11469516c56a157248e0ae793d8679'
-- '04dfdfca8b59c2c3c18eb4b59f6466ef6d2fe6799a8b77f403fbce0554bfc739e43ff20897d9a6ed97ca101ab1bc1b067ff4a2491e3607b42de43f45005dc323')
-+ '391765dc653ea4346a2f2939df3b25a1e1a689b2047b9f7999697e4accfa7479')
-
- _kernelname=${pkgbase#linux-libre}
--_replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}")
--_replacesoldkernels=("${_replacesoldkernels[@]/\%/${_kernelname}}")
--_replacesoldmodules=("${_replacesoldmodules[@]/\%/${_kernelname}}")
--
--case "${CARCH}" in
-- i686|x86_64) KARCH=x86;;
-- armv7h) KARCH=arm;;
--esac
-+: ${_kernelname:=-PARABOLA}
-
- prepare() {
- cd ${_srcname}
-
- # add upstream patch
-- if [ "${_pkgbasever}" != "${_pkgver}" ]; then
-- patch -p1 -i ../patch-${_pkgbasever}-${_pkgver}
-- fi
--
-- if [ "${CARCH}" = "armv7h" ]; then
-- # RCN patch (CM3 firmware deblobbed and AUFS removed)
-- # Note: For stability reasons, AUFS has been removed in the RCN patch.
-- # We are supporting AUFS in linux-libre-pck through PCK patch.
-- # See https://wiki.parabola.nu/PCK for further details.
-- git apply -v "${srcdir}/rcn-libre-${_pkgver%-*}-${rcnrel}.patch"
--
-- # ALARM patches
-- patch -p1 -i "${srcdir}/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch"
-- patch -p1 -i "${srcdir}/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch"
-- patch -p1 -i "${srcdir}/0003-SMILE-Plug-device-tree-file.patch"
-- patch -p1 -i "${srcdir}/0004-fix-mvsdio-eMMC-timing.patch"
-- patch -p1 -i "${srcdir}/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch"
-- patch -p1 -i "${srcdir}/0006-set-default-cubietruck-led-triggers.patch"
-- patch -p1 -i "${srcdir}/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch"
-- patch -p1 -i "${srcdir}/0008-disable-USB3-port-on-ODROID-XU.patch"
-- patch -p1 -i "${srcdir}/0009-ARM-dove-enable-ethernet-on-D3Plug.patch"
-- patch -p1 -i "${srcdir}/0010-power-add-power-sequence-library.patch"
-- patch -p1 -i "${srcdir}/0011-usb-core-add-power-sequence-handling-for-USB-devices.patch"
-- patch -p1 -i "${srcdir}/0012-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch"
-- patch -p1 -i "${srcdir}/0013-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch"
-- patch -p1 -i "${srcdir}/0014-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch"
-- fi
-+ patch -p1 -i ../patch-${pkgver%.*}-gnu-${pkgver//_/-}
-
- # add freedo as boot logo
- install -m644 -t drivers/video/logo \
- "${srcdir}/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}
-
-+ # https://patchwork.kernel.org/patch/10300449/
-+ patch -Np1 -i ../0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch
-+
- # add latest fixes from stable queue, if needed
- # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
-
-@@ -159,17 +73,8 @@ prepare() {
-
- # https://bugs.archlinux.org/task/56711
- patch -Np1 -i ../0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
--
-- # maintain the TTY over USB disconnects
-- # http://www.coreboot.org/EHCI_Gadget_Debug
-- patch -p1 -i "${srcdir}/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch"
--
-- # fix Atmel maXTouch touchscreen support
-- # https://labs.parabola.nu/issues/877
-- # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html
-- patch -p1 -i "${srcdir}/0002-fix-Atmel-maXTouch-touchscreen-support.patch"
-
-- cat ../config.${CARCH} - >.config <<END
-+ cat ../config - >.config <<END
- CONFIG_LOCALVERSION="${_kernelname}"
- CONFIG_LOCALVERSION_AUTO=n
- END
-@@ -200,21 +105,17 @@ END
- build() {
- cd ${_srcname}
-
-- if [ "${CARCH}" = "armv7h" ]; then
-- make ${MAKEFLAGS} LOCALVERSION= zImage modules dtbs
-- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
-- make ${MAKEFLAGS} LOCALVERSION= bzImage modules
-- fi
-+ make
- }
-
- _package() {
-- pkgdesc="The ${pkgbase^} kernel and modules"
-- [ "${pkgbase}" = "linux-libre" ] && groups=('base' 'base-openrc')
-+ pkgdesc="The ${pkgbase/linux/Linux} kernel and modules"
-+ [ "${pkgbase}" = "linux-libre" ] && groups=('base')
- depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7')
- optdepends=('crda: to set the correct wireless channels of your country')
-- provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}")
-- conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
-- replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
-+ provides=(${pkgname/-libre}=${pkgver%_*})
-+ conflicts=(${pkgname/-libre}=${pkgver%_*})
-+ replaces=(${pkgname/-libre}=${pkgver%_*})
- backup=("etc/mkinitcpio.d/${pkgbase}.preset")
- install=linux.install
-
-@@ -227,12 +128,7 @@ _package() {
-
- mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
- make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
-- if [ "${CARCH}" = "armv7h" ]; then
-- make LOCALVERSION= INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs/${pkgbase}" dtbs_install
-- cp arch/$KARCH/boot/zImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
-- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
-- cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
-- fi
-+ cp vmlinux "${pkgdir}/boot/vmlinuz-${pkgbase}"
-
- # make room for external modules
- local _extramodules="extramodules-${_basekernel}${_kernelname}"
-@@ -248,26 +144,15 @@ _package() {
- # now we call depmod...
- depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
-
-- if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
-- # add vmlinux
-- install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
-- fi
-+ # add vmlinux
-+ install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
-
- # sed expression for following substitutions
-- if [ "${CARCH}" = "armv7h" ]; then
- local _subst="
-- s|/boot/vmlinuz-%PKGBASE%|${_kernver}|g
- s|%PKGBASE%|${pkgbase}|g
- s|%KERNVER%|${_kernver}|g
- s|%EXTRAMODULES%|${_extramodules}|g
- "
-- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
-- local _subst="
-- s|%PKGBASE%|${pkgbase}|g
-- s|%KERNVER%|${_kernver}|g
-- s|%EXTRAMODULES%|${_extramodules}|g
-- "
-- fi
-
- # hack to allow specifying an initially nonexisting install file
- sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
-@@ -285,11 +170,11 @@ _package() {
- }
-
- _package-headers() {
-- pkgdesc="Header files and scripts for building modules for ${pkgbase^} kernel"
-- provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}")
-- conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
-- replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
--
-+ pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
-+ provides=(${pkgname/-libre}=${pkgver%_*})
-+ conflicts=(${pkgname/-libre}=${pkgver%_*})
-+ replaces=(${pkgname/-libre}=${pkgver%_*})
-+
- cd ${_srcname}
- local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
-
-@@ -300,14 +185,10 @@ _package-headers() {
-
- cp -t "${_builddir}" -a include scripts
-
-- install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
-- install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
-+ install -Dt "${_builddir}/arch/riscv" -m644 arch/riscv/Makefile
-+ install -Dt "${_builddir}/arch/riscv/kernel" -m644 arch/riscv/kernel/asm-offsets.s
-
-- if [[ ${CARCH} = i686 ]]; then
-- install -t "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile_32.cpu
-- fi
--
-- cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
-+ cp -t "${_builddir}/arch/riscv" -a arch/riscv/include
-
- install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
- install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
-@@ -329,36 +210,15 @@ _package-headers() {
- # copy in Kconfig files
- find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
-
-- # add objtool for external module building and enabled VALIDATION_STACK option
-- if [[ -e tools/objtool/objtool ]]; then
-- install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
-- fi
--
- # remove unneeded architectures
- local _arch
- for _arch in "${_builddir}"/arch/*/; do
-- [[ ${_arch} == */${KARCH}/ ]] && continue
-+ [[ ${_arch} == */riscv/ ]] && continue
- rm -r "${_arch}"
- done
-
- # remove files already in linux-docs package
- rm -r "${_builddir}/Documentation"
--
-- # parabola changes
-- #
-- # since we don't want to diverge too much from arch's pkgbuild, we'll
-- # start marking our changes as such
-- if [ "${CARCH}" = "armv7h" ]; then
-- for i in dove exynos omap2; do
-- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-${i}"
-- cp -a arch/${KARCH}/mach-${i}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-${i}/"
-- done
-- for i in omap orion samsung versatile; do
-- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-${i}"
-- cp -a arch/${KARCH}/plat-${i}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-${i}/"
-- done
-- fi
-- # end of parabola changes
-
- # remove now broken symlinks
- find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
-@@ -380,11 +240,11 @@ _package-headers() {
- }
-
- _package-docs() {
-- pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase^} kernel"
-- provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}")
-- conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
-- replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
--
-+ pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
-+ provides=(${pkgname/-libre}=${pkgver%_*})
-+ conflicts=(${pkgname/-libre}=${pkgver%_*})
-+ replaces=(${pkgname/-libre}=${pkgver%_*})
-+
- cd ${_srcname}
- local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
-
---- /dev/null 2018-03-21 10:59:45.661284739 +0100
-+++ b/config 2018-03-25 19:29:50.052475504 +0200
+diff -rupN a/0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch b/0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch
+--- a/0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch 1970-01-01 01:00:00.000000000 +0100
++++ b/0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch 2018-04-17 22:16:50.749610815 +0200
+@@ -0,0 +1,13 @@
++diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
++index 324568d33921..f6561b783b61 100644
++--- a/arch/riscv/kernel/vdso/Makefile
+++++ b/arch/riscv/kernel/vdso/Makefile
++@@ -52,7 +52,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
++ # Add -lgcc so rv32 gets static muldi3 and lshrdi3 definitions.
++ # Make sure only to export the intended __vdso_xxx symbol offsets.
++ quiet_cmd_vdsold = VDSOLD $@
++- cmd_vdsold = $(CC) $(KCFLAGS) -nostdlib $(SYSCFLAGS_$(@F)) \
+++ cmd_vdsold = $(CC) $(KCFLAGS) $(call cc-option, -no-pie) -nostdlib $(SYSCFLAGS_$(@F)) \
++ -Wl,-T,$(filter-out FORCE,$^) -o $@.tmp -lgcc && \
++ $(CROSS_COMPILE)objcopy \
++ $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@
+diff -rupN a/config b/config
+--- a/config 1970-01-01 01:00:00.000000000 +0100
++++ b/config 2018-04-17 22:16:50.749610815 +0200
@@ -0,0 +1,2706 @@
+#
+# Automatically generated file; DO NOT EDIT.
@@ -3082,19 +2725,379 @@
+# CONFIG_ARCH_HAS_SG_CHAIN is not set
+CONFIG_SBITMAP=y
+# CONFIG_STRING_SELFTEST is not set
---- /dev/null 2018-03-21 10:59:45.661284739 +0100
-+++ b/0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch 2018-03-25 20:08:57.324842634 +0200
-@@ -0,0 +1,13 @@
-+diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
-+index 324568d33921..f6561b783b61 100644
-+--- a/arch/riscv/kernel/vdso/Makefile
-++++ b/arch/riscv/kernel/vdso/Makefile
-+@@ -52,7 +52,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
-+ # Add -lgcc so rv32 gets static muldi3 and lshrdi3 definitions.
-+ # Make sure only to export the intended __vdso_xxx symbol offsets.
-+ quiet_cmd_vdsold = VDSOLD $@
-+- cmd_vdsold = $(CC) $(KCFLAGS) -nostdlib $(SYSCFLAGS_$(@F)) \
-++ cmd_vdsold = $(CC) $(KCFLAGS) $(call cc-option, -no-pie) -nostdlib $(SYSCFLAGS_$(@F)) \
-+ -Wl,-T,$(filter-out FORCE,$^) -o $@.tmp -lgcc && \
-+ $(CROSS_COMPILE)objcopy \
-+ $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-17 19:20:15.687614987 +0200
++++ b/PKGBUILD 2018-04-17 22:16:50.743610816 +0200
+@@ -1,156 +1,70 @@
+-# Maintainer: David P. <megver83@parabola.nu>
+-# Contributor: André Silva <emulatorman@hyperbola.info>
+-# Contributor: Márcio Silva <coadde@hyperbola.info>
+-# Contributor: fauno <fauno@parabola.nu>
+-# Contributor: Sorin-Mihai Vârgolici <smv@yobicore.org>
+-# Contributor: Michał Masłowski <mtjm@mtjm.eu>
+-# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
+-# Contributor: Luke R. <g4jc@openmailbox.org>
+-# Contributor: Andreas Grapentin <andreas@grapentin.org>
+-
+-# Based on linux package
++# $Id$
++# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
++# Maintainer (Arch): Thomas Baechler <thomas@archlinux.org>
+
+ pkgbase=linux-libre # Build stock kernel
+ #pkgbase=linux-libre-custom # Build kernel with a different name
+-_pkgbasever=4.15-gnu
+-_pkgver=4.15.17-gnu
+-
+-_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
+-_replacesoldkernels=() # '%' gets replaced with _kernelname
+-_replacesoldmodules=() # '%' gets replaced with _kernelname
+-
+-_srcname=linux-${_pkgbasever%-*}
+-_archpkgver=${_pkgver%-*}
+-pkgver=${_pkgver//-/_}
++_srcname=linux-4.15
++pkgver=4.15.17
++pkgver+=_gnu
+ pkgrel=1
+-rcnrel=armv7-x1
+-arch=('i686' 'x86_64' 'armv7h')
++arch=('x86_64')
+ url="https://linux-libre.fsfla.org/"
+ license=('GPL2')
+ makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
+-makedepends_armv7h=('git')
+ options=('!strip')
+ source=(
+- "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"{,.sign}
+- "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz"{,.sign}
+- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm"{,.sig}
+- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm"{,.sig}
+- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm"{,.sig}
+- # the main kernel config files
+- 'config.i686' 'config.x86_64' 'config.armv7h'
+- # pacman hooks for depmod and initramfs regeneration
+- '60-linux.hook' '90-linux.hook'
+- # standard config files for mkinitcpio ramdisk
+- 'linux.preset'
+- # armv7h patches
+- "https://repo.parabola.nu/other/rcn-libre/patches/${_pkgver%-*}/rcn-libre-${_pkgver%-*}-${rcnrel}.patch"{,.sig}
+- '0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch'
+- '0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch'
+- '0003-SMILE-Plug-device-tree-file.patch'
+- '0004-fix-mvsdio-eMMC-timing.patch'
+- '0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch'
+- '0006-set-default-cubietruck-led-triggers.patch'
+- '0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch'
+- '0008-disable-USB3-port-on-ODROID-XU.patch'
+- '0009-ARM-dove-enable-ethernet-on-D3Plug.patch'
+- '0010-power-add-power-sequence-library.patch'
+- '0011-usb-core-add-power-sequence-handling-for-USB-devices.patch'
+- '0012-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch'
+- '0013-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch'
+- '0014-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch'
+- # other patches
+- '0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch'
+- '0002-fix-Atmel-maXTouch-touchscreen-support.patch'
+- '0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch'
+- '0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch'
++ https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver%.*}-gnu/linux-libre-${pkgver%.*}-gnu.tar.xz{,.sign}
++ https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver//_/-}/patch-${pkgver%.*}-gnu-${pkgver//_/-}.xz{,.sign}
++ config # the main kernel config file
++ 60-linux.hook # pacman hook for depmod
++ 90-linux.hook # pacman hook for initramfs regeneration
++ linux.preset # standard config files for mkinitcpio ramdisk
++ 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
++ 0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
++ https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm{,.sig}
++ https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm{,.sig}
++ https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm{,.sig}
++ 0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch
+ )
+ validpgpkeys=(
+ '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
+ '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P.
+ )
+-sha512sums=('a55cc663c6fb1e1cfa7905282b368b5d5888bc2398f0acf37e5bb9a232ded04fd566b1980e654da26aaec005332e458581495184d6bd4cec669181085d4d78a5'
++sha256sums=('e6556514286f9cd6b46f5d5769b2cc3c61ac7d6fa9c9c400e3c2fb5949490186'
+ 'SKIP'
+- 'f74ad4904ec4a845682d3f735e63720793c3b7a915a8678c4e0866c54e0cec928cb5c3352dee4b3e8d7129bd0515b1b6a485d976c05df6585a1d2e4658884ad4'
++ 'ba1fd5e5fbb89f8bbcc40442f35409f50451a5e94e09c96f633cca6e53e23026'
+ 'SKIP'
+- '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
++ '79893811422931bd216dac1f99319792ccebbc931b8f4699da990aae0c1757cc'
++ 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
++ '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
++ 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
++ '4ffdc2a458845c2a7c03c735477dbf51b5b01b10568bf577b37a29e872135cab'
++ '12b281dc45f1954cc3f52276927bb2965c3132c0a8bd7f485869ced2c541d485'
++ 'bfd4a7f61febe63c880534dcb7c31c5b932dde6acf991810b41a939a93535494'
+ 'SKIP'
+- '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1'
++ '13bd7a8d9ed6b6bc971e4cd162262c5a20448a83796af39ce394d827b0e5de74'
+ 'SKIP'
+- '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78'
++ '6de8a8319271809ffdb072b68d53d155eef12438e6d04ff06a5a4db82c34fa8a'
+ 'SKIP'
+- '93cc2b304a116edb351d05a7b5c0a6b900fa4222474c26ac5dd15c754ddf0a0e2b7ec8bb40671fcb38c3be08c9279343456a3caf9d0b7ee4088b6afb4c465512'
+- '0c90ff5cfe3ed0484603255437fb7b7d3450482ede164e139324c2761f3640797932b95e5d696b074c173ef472a5cdeca04c0a56198e54b47c9394f9efd94570'
+- 'c23fe808c6c3fe9fa3c7c814b3f607178f22c7441858881e650a1883d19ca43b1ec2b4cd891bbc3341446c02005fe8366dddcd0baf09845a714576bb51a2f24a'
+- '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
+- '4a8b324aee4cccf3a512ad04ce1a272d14e5b05c8de90feb82075f55ea3845948d817e1b0c6f298f5816834ddd3e5ce0a0e2619866289f3c1ab8fd2f35f04f44'
+- '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
+- '9fcda845bf44fdf5a7907d4c9681eaf0d4dc67afde5d3848ee0364afc9ad6719de70770ccde8ed309747450f33275b55dc01a46fb6df4a92d5da87f0230632b3'
+- 'SKIP'
+- 'ba44aa1252aa1b172e0bc8bbbff864ff60cad6739b2aed2f6a2402848aa65cdb8a8ca6bb9341569b089d60dfd83c3bdd744b5810061ac76b19f0d337afe4cc8d'
+- '738bc2874351d9e1b94319e6caf615b49753155c99dc9318a1ce9eced50f87627a7331762951f55e2bea8abdb97b80a617a08f3f0bc735e56ff831a8bbb19816'
+- 'f45d8d417eb3f4b6e02e337480bd99a8ebb4b9ac004c53a5432255e5841578fb64530663b6eacb3c8f40aaade8e1dc1e584aa1cf4b560103119e4b32e19b66c3'
+- '25ee5d9859d3df2d054fd6d53fe6b8931d6ac9f85533c54f3dd926fce917c81bd96cb3858189a20cf28a32b43efd1566cb5513f7db18a0bb8ead1a4e8a7be6fc'
+- 'a1aa8272760da0c8d2772cc8a57d8600f08db176206afd2a155055d2969bf0295f342a156841964a07de53fbf0356385b604ad75e5556569872dfad1863b2c27'
+- 'b58efc374344d10290371f3dfe8a124f855015d3ce169ccf538e6c1476092abf7ac689f0f10fb6a191fa19545b49ce13957ada066b37415f37dd5989ff93db37'
+- 'd2326e2e3ef6f2f5e911e6ad2fc3ac33b6f53fc5bb03e61d0e8371e6c7199028b226356926472ba676ca68a6cc57d33856c662615ed5b52566570670d0f96c89'
+- 'bc47549f2a79a79659d4d53f739e091c1e8f54cef8c1776be2034675cbb43f584a128607b1d4dd6a9f465706bb1470c6cb4277877dd3218e7280f503babf8300'
+- 'd90f3a3b74d65b84c4c2c229d10d2bb854e39e3429ba1469f8bb286819d559c68e00302de2be5043cf274b39a58686dc822c60afe1c553c4c967ef168d98af05'
+- '0c1a4334fcb4e75d25ec43873275b2f8a599a096b05a51ef2f9d48f3c8425a153f5f0df775e030e61b792f8b34e9c848229028fb6d2411f85028441826951dd5'
+- '0ccccf4411df6b86486b14e9354bf48355a2dc5bfefce693c5afc1a340db6f9db525a0306897ccbb5ed80304fa38ef13f32355cfeee1c9b684db0a9c0063d5c1'
+- '1a491eab1b07e9fb0b8a8dba4ef17d658c85106e7f62f3a37c34513aa9cd50b4bbb273aa445380f2e2135adea68c7102718e71bf2c9f4d3a5c24515620606605'
+- '9ae97a7f29323542d70576e8800e2090a69a43caee3182a453e80c3c3265d6cc04e2b5701e5d24d8a2717e29272950231b7e477aa32d69c7333c083626fc6802'
+- '9b8829fd9bf6c91e5c9e21184c7f57b22d786c20a15512e91cc75890a5d08a633df555973b29f2da9a7d9b965abd0c76ecdefa5498217837389ad1d0be0fb754'
+- '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
+- 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
+- '0f5531df585efa48e72b335ab88973bbce6c3807db55dcfac2fcda20f69618ee5bd5881ab278bd8cdde1f96bc34d5becca11469516c56a157248e0ae793d8679'
+- '04dfdfca8b59c2c3c18eb4b59f6466ef6d2fe6799a8b77f403fbce0554bfc739e43ff20897d9a6ed97ca101ab1bc1b067ff4a2491e3607b42de43f45005dc323')
++ '391765dc653ea4346a2f2939df3b25a1e1a689b2047b9f7999697e4accfa7479')
+
+ _kernelname=${pkgbase#linux-libre}
+-_replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}")
+-_replacesoldkernels=("${_replacesoldkernels[@]/\%/${_kernelname}}")
+-_replacesoldmodules=("${_replacesoldmodules[@]/\%/${_kernelname}}")
+-
+-case "${CARCH}" in
+- i686|x86_64) KARCH=x86;;
+- armv7h) KARCH=arm;;
+-esac
++: ${_kernelname:=-PARABOLA}
+
+ prepare() {
+ cd ${_srcname}
+
+ # add upstream patch
+- if [ "${_pkgbasever}" != "${_pkgver}" ]; then
+- patch -p1 -i ../patch-${_pkgbasever}-${_pkgver}
+- fi
+-
+- if [ "${CARCH}" = "armv7h" ]; then
+- # RCN patch (CM3 firmware deblobbed and AUFS/WireGuard removed)
+- # Note: For stability reasons, AUFS has been removed in the RCN patch.
+- # We are supporting AUFS in linux-libre-pck through PCK patch.
+- # See https://wiki.parabola.nu/PCK for further details.
+- git apply -v ../rcn-libre-${_pkgver%-*}-${rcnrel}.patch
+-
+- # ALARM patches
+- patch -p1 -i ../0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch
+- patch -p1 -i ../0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch
+- patch -p1 -i ../0003-SMILE-Plug-device-tree-file.patch
+- patch -p1 -i ../0004-fix-mvsdio-eMMC-timing.patch
+- patch -p1 -i ../0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
+- patch -p1 -i ../0006-set-default-cubietruck-led-triggers.patch
+- patch -p1 -i ../0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch
+- patch -p1 -i ../0008-disable-USB3-port-on-ODROID-XU.patch
+- patch -p1 -i ../0009-ARM-dove-enable-ethernet-on-D3Plug.patch
+- patch -p1 -i ../0010-power-add-power-sequence-library.patch
+- patch -p1 -i ../0011-usb-core-add-power-sequence-handling-for-USB-devices.patch
+- patch -p1 -i ../0012-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch
+- patch -p1 -i ../0013-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch
+- patch -p1 -i ../0014-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch
+- fi
++ patch -p1 -i ../patch-${pkgver%.*}-gnu-${pkgver//_/-}
+
+ # add freedo as boot logo
+ install -m644 -t drivers/video/logo \
+ ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm}
+
++ # https://patchwork.kernel.org/patch/10300449/
++ patch -Np1 -i ../0001-RISC-V-build-vdso-dummy.o-with--no-pie.patch
++
+ # add latest fixes from stable queue, if needed
+ # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
+
+@@ -159,17 +73,8 @@ prepare() {
+
+ # https://bugs.archlinux.org/task/56711
+ patch -Np1 -i ../0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
+-
+- # maintain the TTY over USB disconnects
+- # http://www.coreboot.org/EHCI_Gadget_Debug
+- patch -p1 -i ../0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
+-
+- # fix Atmel maXTouch touchscreen support
+- # https://labs.parabola.nu/issues/877
+- # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html
+- patch -p1 -i ../0002-fix-Atmel-maXTouch-touchscreen-support.patch
+
+- cat ../config.${CARCH} - >.config <<END
++ cat ../config - >.config <<END
+ CONFIG_LOCALVERSION="${_kernelname}"
+ CONFIG_LOCALVERSION_AUTO=n
+ END
+@@ -200,21 +105,17 @@ END
+ build() {
+ cd ${_srcname}
+
+- if [ "${CARCH}" = "armv7h" ]; then
+- make ${MAKEFLAGS} LOCALVERSION= zImage modules dtbs
+- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+- make ${MAKEFLAGS} LOCALVERSION= bzImage modules
+- fi
++ make
+ }
+
+ _package() {
+- pkgdesc="The ${pkgbase^} kernel and modules"
+- [ "${pkgbase}" = "linux-libre" ] && groups=('base' 'base-openrc')
++ pkgdesc="The ${pkgbase/linux/Linux} kernel and modules"
++ [ "${pkgbase}" = "linux-libre" ] && groups=('base')
+ depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7')
+ optdepends=('crda: to set the correct wireless channels of your country')
+- provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}" "LINUX-ABI_VERSION=${_pkgver%%-*}")
+- conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
+- replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
++ provides=(${pkgname/-libre}=${pkgver%_*})
++ conflicts=(${pkgname/-libre}=${pkgver%_*})
++ replaces=(${pkgname/-libre}=${pkgver%_*})
+ backup=("etc/mkinitcpio.d/${pkgbase}.preset")
+ install=linux.install
+
+@@ -227,12 +128,7 @@ _package() {
+
+ mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
+ make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
+- if [ "${CARCH}" = "armv7h" ]; then
+- make LOCALVERSION= INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs/${pkgbase}" dtbs_install
+- cp arch/$KARCH/boot/zImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
+- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+- cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
+- fi
++ cp vmlinux "${pkgdir}/boot/vmlinuz-${pkgbase}"
+
+ # make room for external modules
+ local _extramodules="extramodules-${_basekernel}${_kernelname}"
+@@ -248,26 +144,15 @@ _package() {
+ # now we call depmod...
+ depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
+
+- if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+- # add vmlinux
+- install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
+- fi
++ # add vmlinux
++ install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
+
+ # sed expression for following substitutions
+- if [ "${CARCH}" = "armv7h" ]; then
+ local _subst="
+- s|/boot/vmlinuz-%PKGBASE%|${_kernver}|g
+ s|%PKGBASE%|${pkgbase}|g
+ s|%KERNVER%|${_kernver}|g
+ s|%EXTRAMODULES%|${_extramodules}|g
+ "
+- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+- local _subst="
+- s|%PKGBASE%|${pkgbase}|g
+- s|%KERNVER%|${_kernver}|g
+- s|%EXTRAMODULES%|${_extramodules}|g
+- "
+- fi
+
+ # hack to allow specifying an initially nonexisting install file
+ sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
+@@ -285,11 +170,11 @@ _package() {
+ }
+
+ _package-headers() {
+- pkgdesc="Header files and scripts for building modules for ${pkgbase^} kernel"
+- provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}")
+- conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
+- replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
+-
++ pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
++ provides=(${pkgname/-libre}=${pkgver%_*})
++ conflicts=(${pkgname/-libre}=${pkgver%_*})
++ replaces=(${pkgname/-libre}=${pkgver%_*})
++
+ cd ${_srcname}
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
+
+@@ -300,14 +185,10 @@ _package-headers() {
+
+ cp -t "${_builddir}" -a include scripts
+
+- install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
+- install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
++ install -Dt "${_builddir}/arch/riscv" -m644 arch/riscv/Makefile
++ install -Dt "${_builddir}/arch/riscv/kernel" -m644 arch/riscv/kernel/asm-offsets.s
+
+- if [[ ${CARCH} = i686 ]]; then
+- install -t "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile_32.cpu
+- fi
+-
+- cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
++ cp -t "${_builddir}/arch/riscv" -a arch/riscv/include
+
+ install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
+ install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
+@@ -329,36 +210,15 @@ _package-headers() {
+ # copy in Kconfig files
+ find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
+
+- # add objtool for external module building and enabled VALIDATION_STACK option
+- if [[ -e tools/objtool/objtool ]]; then
+- install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
+- fi
+-
+ # remove unneeded architectures
+ local _arch
+ for _arch in "${_builddir}"/arch/*/; do
+- [[ ${_arch} == */${KARCH}/ ]] && continue
++ [[ ${_arch} == */riscv/ ]] && continue
+ rm -r "${_arch}"
+ done
+
+ # remove files already in linux-docs package
+ rm -r "${_builddir}/Documentation"
+-
+- # parabola changes
+- #
+- # since we don't want to diverge too much from arch's pkgbuild, we'll
+- # start marking our changes as such
+- if [ "${CARCH}" = "armv7h" ]; then
+- for i in dove exynos omap2; do
+- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-${i}"
+- cp -a arch/${KARCH}/mach-${i}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-${i}/"
+- done
+- for i in omap orion samsung versatile; do
+- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-${i}"
+- cp -a arch/${KARCH}/plat-${i}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-${i}/"
+- done
+- fi
+- # end of parabola changes
+
+ # remove now broken symlinks
+ find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
+@@ -380,11 +240,11 @@ _package-headers() {
+ }
+
+ _package-docs() {
+- pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase^} kernel"
+- provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}")
+- conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
+- replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
+-
++ pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
++ provides=(${pkgname/-libre}=${pkgver%_*})
++ conflicts=(${pkgname/-libre}=${pkgver%_*})
++ replaces=(${pkgname/-libre}=${pkgver%_*})
++
+ cd ${_srcname}
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
+
diff --git a/src/stage4/patches/opencv.patch b/src/stage4/patches/opencv.patch
new file mode 100644
index 0000000..db50750
--- /dev/null
+++ b/src/stage4/patches/opencv.patch
@@ -0,0 +1,70 @@
+diff -rupN a/0001-opencv-riscv-support.patch b/0001-opencv-riscv-support.patch
+--- a/0001-opencv-riscv-support.patch 1970-01-01 01:00:00.000000000 +0100
++++ b/0001-opencv-riscv-support.patch 2018-04-17 09:04:43.865115287 +0200
+@@ -0,0 +1,13 @@
++diff -rupN opencv-3.4.1-orig/3rdparty/protobuf/src/google/protobuf/stubs/platform_macros.h opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/stubs/platform_macros.h
++--- opencv-3.4.1-orig/3rdparty/protobuf/src/google/protobuf/stubs/platform_macros.h 2018-04-17 09:00:18.978140393 +0200
+++++ opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/stubs/platform_macros.h 2018-04-17 09:02:50.023126077 +0200
++@@ -79,6 +79,9 @@
++ #elif defined(__PPC__)
++ #define GOOGLE_PROTOBUF_ARCH_PPC 1
++ #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+++#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+++#define GOOGLE_PROTOBUF_ARCH_RISCV64 1
+++#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
++ #elif defined(__GNUC__)
++ # if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
++ // We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-17 06:50:43.666877316 +0200
++++ b/PKGBUILD 2018-04-17 11:46:44.792193964 +0200
+@@ -14,19 +14,22 @@ arch=('i686' 'x86_64' 'armv7h')
+ license=('BSD')
+ url="http://opencv.org/"
+ depends=('intel-tbb' 'openexr' 'xine-lib' 'libdc1394' 'cblas' 'lapack' 'libgphoto2' 'jasper')
+-makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen' 'hdf5' 'lapacke' 'gtkglext')
++makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen' 'hdf5' 'lapacke')
+ optdepends=('opencv-samples'
+- 'gtkglext: for the HighGUI module'
+ 'hdf5: support for HDF5 format'
+ 'opencl-icd-loader: For coding with OpenCL'
+ 'python-numpy: Python 3 interface'
+ 'python2-numpy: Python 2 interface')
+ mksource=("$pkgbase-$pkgver.zip::https://github.com/opencv/opencv/archive/$pkgver.zip"
+ "opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz")
+-source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.zip")
++source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.zip"
++ "0001-opencv-riscv-support.patch"
++ "https://github.com/google/protobuf/pull/3955/commits/642e1ac635f2563b4a14c255374f02645ae85dac.patch")
+ mksha256sums=('24bda432eaace9e992322dcc3d30144cefa5314c2424d4aa02e5fe3fa9dd17bd'
+ '298c69ee006d7675e1ff9d371ba8b0d9e7e88374bb7ba0f9d0789851d352ec6e')
+-sha256sums=('e5b34f29622d044e07163ed8d806bce5ff208531c1cdd5be24a9ec0255633396')
++sha256sums=('e5b34f29622d044e07163ed8d806bce5ff208531c1cdd5be24a9ec0255633396'
++ '039667b90c16c9ad311b09ad40ff421e5fddbb8f4f2a50caa79b6e70b41265e5'
++ '74b368bc17ddbe056f73748c5557ff1709d03da67e3ebfaabcb9423e5507f65c')
+
+ _cmakeopts=('-D WITH_OPENCL=ON'
+ '-D WITH_OPENGL=ON'
+@@ -42,6 +45,7 @@ _cmakeopts=('-D WITH_OPENCL=ON'
+ '-D CMAKE_INSTALL_PREFIX=/usr'
+ '-D CMAKE_INSTALL_LIBDIR=lib'
+ '-D WITH_IPP=OFF'
++ '-D ENABLE_PRECOMPILED_HEADERS=OFF'
+ )
+
+ # SSE only available from Pentium 3 onwards (i686 is way older)
+@@ -69,6 +73,14 @@ prepare() {
+
+ # remove nonfree SIFT and SURF references
+ rm -rv modules/xfeatures2d
++
++ # add risc-v support
++ cd "$srcdir/opencv-$pkgver"
++ patch -Np1 -i "$srcdir"/0001-opencv-riscv-support.patch
++
++ # fix generic atomics on 64bit
++ cd "$srcdir/opencv-$pkgver/3rdparty/protobuf"
++ patch -Np1 -i "$srcdir"/642e1ac635f2563b4a14c255374f02645ae85dac.patch
+ }
+
+ build() {
diff --git a/src/stage4/patches/phonon-breakdeps.patch b/src/stage4/patches/phonon-breakdeps.patch
new file mode 100644
index 0000000..5cb9748
--- /dev/null
+++ b/src/stage4/patches/phonon-breakdeps.patch
@@ -0,0 +1,21 @@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-04 18:42:26.285284000 +0200
++++ b/PKGBUILD 2018-04-14 21:48:54.573335969 +0200
+@@ -46,7 +46,7 @@ build() {
+
+ package_phonon-qt4(){
+ pkgdesc="The multimedia framework for KDE4"
+- depends=(qt4 libpulse phonon-qt4-backend)
++ depends=(qt4 libpulse)
+ optdepends=('pulseaudio: PulseAudio support')
+
+ cd build
+@@ -62,7 +62,7 @@ package_phonon-qt4(){
+
+ package_phonon-qt5(){
+ pkgdesc="The multimedia framework for KF5"
+- depends=(libpulse qt5-base phonon-qt5-backend)
++ depends=(libpulse qt5-base)
+ optdepends=('pulseaudio: PulseAudio support')
+
+ cd build-qt5
diff --git a/src/stage4/patches/phonon-gstreamer-breakdeps.patch b/src/stage4/patches/phonon-gstreamer-breakdeps.patch
deleted file mode 100644
index a47e4a7..0000000
--- a/src/stage4/patches/phonon-gstreamer-breakdeps.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -rupN a/PKGBUILD b/PKGBUILD
---- a/PKGBUILD 2018-04-04 18:42:40.025282697 +0200
-+++ b/PKGBUILD 2018-04-09 13:58:22.983955501 +0200
-@@ -11,7 +11,7 @@ url='http://phonon.kde.org/'
- license=(LGPL)
- optdepends=('pulseaudio: PulseAudio support' 'gst-plugins-good: PulseAudio support and good codecs' 'gst-plugins-bad: additional codecs'
- 'gst-plugins-ugly: additional codecs' 'gst-libav: libav codec')
--makedepends=(gst-plugins-base extra-cmake-modules phonon-qt4 phonon-qt5 qt5-x11extras)
-+makedepends=(gst-plugins-base extra-cmake-modules qt5-x11extras)
- source=("http://download.kde.org/stable/phonon/phonon-backend-gstreamer/$pkgver/phonon-backend-gstreamer-$pkgver.tar.xz")
- sha256sums=('cec3e5ece1261d344b68363ef0606ebf49772628ba94bb55b0c0d18773b885f1')
-
-@@ -43,7 +43,7 @@ build() {
-
- package_phonon-qt4-gstreamer() {
- pkgdesc="Phonon GStreamer backend for Qt4"
-- depends=(gst-plugins-base phonon-qt4)
-+ depends=(gst-plugins-base)
- provides=(phonon-qt4-backend)
-
- cd build-qt4
-@@ -55,7 +55,7 @@ package_phonon-qt4-gstreamer() {
-
- package_phonon-qt5-gstreamer() {
- pkgdesc="Phonon GStreamer backend for Qt5"
-- depends=(gst-plugins-base qt5-x11extras phonon-qt5)
-+ depends=(gst-plugins-base qt5-x11extras)
- provides=(phonon-qt5-backend)
-
- cd build-qt5
diff --git a/src/stage4/patches/pulseaudio.patch b/src/stage4/patches/pulseaudio.patch
new file mode 100644
index 0000000..df76448
--- /dev/null
+++ b/src/stage4/patches/pulseaudio.patch
@@ -0,0 +1,91 @@
+diff -rupN a/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch b/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch
+--- a/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch 1970-01-01 01:00:00.000000000 +0100
++++ b/0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch 2018-04-15 09:54:17.396210991 +0200
+@@ -0,0 +1,63 @@
++From 01239c23f57e74ec40c92144d22fe153ee65f4ff Mon Sep 17 00:00:00 2001
++From: Tanu Kaskinen <tanuk@iki.fi>
++Date: Wed, 24 Jan 2018 03:51:49 +0200
++Subject: [PATCH] memfd-wrappers: only define memfd_create() if not already
++ defined
++
++glibc 2.27 is to be released soon, and it will provide memfd_create().
++If glibc provides the function, we must not define it ourselves,
++otherwise building fails due to conflict between the two implementations
++of the same function.
++
++BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104733
++---
++ configure.ac | 3 +++
++ src/pulsecore/memfd-wrappers.h | 7 ++++---
++ 2 files changed, 7 insertions(+), 3 deletions(-)
++
++diff --git a/configure.ac b/configure.ac
++index 013918f1a..1095ae8cb 100644
++--- a/configure.ac
+++++ b/configure.ac
++@@ -607,6 +607,9 @@ AS_IF([test "x$enable_memfd" = "xyes" && test "x$HAVE_MEMFD" = "x0"],
++ [AC_MSG_ERROR([*** Your Linux kernel does not support memfd shared memory.
++ *** Use linux v3.17 or higher for such a feature.])])
++
+++AS_IF([test "x$HAVE_MEMFD" = "x1"],
+++ AC_CHECK_FUNCS([memfd_create]))
+++
++ AC_SUBST(HAVE_MEMFD)
++ AM_CONDITIONAL([HAVE_MEMFD], [test "x$HAVE_MEMFD" = x1])
++ AS_IF([test "x$HAVE_MEMFD" = "x1"], AC_DEFINE([HAVE_MEMFD], 1, [Have memfd shared memory.]))
++diff --git a/src/pulsecore/memfd-wrappers.h b/src/pulsecore/memfd-wrappers.h
++index 3bed9b2b1..c7aadfd3c 100644
++--- a/src/pulsecore/memfd-wrappers.h
+++++ b/src/pulsecore/memfd-wrappers.h
++@@ -20,13 +20,14 @@
++ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
++ ***/
++
++-#ifdef HAVE_MEMFD
+++#if defined(HAVE_MEMFD) && !defined(HAVE_MEMFD_CREATE)
++
++ #include <sys/syscall.h>
++ #include <fcntl.h>
++
++ /*
++- * No glibc wrappers exist for memfd_create(2), so provide our own.
+++ * Before glibc version 2.27 there was no wrapper for memfd_create(2),
+++ * so we have to provide our own.
++ *
++ * Also define memfd fcntl sealing macros. While they are already
++ * defined in the kernel header file <linux/fcntl.h>, that file as
++@@ -63,6 +64,6 @@ static inline int memfd_create(const char *name, unsigned int flags) {
++ #define F_SEAL_WRITE 0x0008 /* prevent writes */
++ #endif
++
++-#endif /* HAVE_MEMFD */
+++#endif /* HAVE_MEMFD && !HAVE_MEMFD_CREATE */
++
++ #endif
++--
++2.15.1
++
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-15 09:49:28.725238350 +0200
++++ b/PKGBUILD 2018-04-15 09:54:17.141211015 +0200
+@@ -18,8 +18,10 @@ makedepends=(libasyncns libcap attr libx
+ check autoconf-archive git)
+ options=(!emptydirs)
+ _commit=f93e372b0b2cb960df04de3f0a8fbea683bb8229 # tags/v11.1^0
+-source=("git+https://anongit.freedesktop.org/git/pulseaudio/pulseaudio#commit=$_commit")
+-sha256sums=('SKIP')
++source=("git+https://anongit.freedesktop.org/git/pulseaudio/pulseaudio#commit=$_commit"
++ "0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch")
++sha256sums=('SKIP'
++ 'c7e75566cf198ecf09c01b606eb9618ff06528d3a2b3980615684db30f7e5a06')
+
+ pkgver() {
+ cd pulseaudio
+@@ -28,6 +30,7 @@ pkgver() {
+
+ prepare() {
+ cd pulseaudio
++ patch -Np1 -i ../0001-memfd-wrappers-only-define-memfd_create-if-not-alrea.patch
+ NOCONFIGURE=1 ./bootstrap.sh
+ }
+
diff --git a/src/stage4/patches/qt5-webkit.patch b/src/stage4/patches/qt5-webkit.patch
new file mode 100644
index 0000000..a6e7316
--- /dev/null
+++ b/src/stage4/patches/qt5-webkit.patch
@@ -0,0 +1,178 @@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-16 21:02:39.504221456 +0200
++++ b/PKGBUILD 2018-04-16 21:06:13.560201168 +0200
+@@ -12,7 +12,7 @@ url='http://qt-project.org/'
+ license=(GPL3 LGPL3 FDL custom)
+ pkgdesc='Classes for a WebKit2 based implementation and a new QML API'
+ depends=(qt5-location qt5-sensors qt5-webchannel libwebp libxslt libxcomposite gst-plugins-base hyphen)
+-makedepends=(cmake ruby gperf python2 qt5-doc qt5-tools)
++makedepends=(cmake ruby gperf python2 qt5-doc qt5-tools ninja)
+ optdepends=('gst-plugins-good: Webm codec support')
+ conflicts=(qt5-webkit-ng)
+ replaces=(qt5-webkit-ng)
+@@ -23,13 +23,15 @@ source=("https://github.com/annulen/webk
+ qt5-webkit-null-pointer-dereference.patch
+ qt5-webkit-trojita-1.patch::"https://github.com/annulen/webkit/commit/6faf1121.patch"
+ qt5-webkit-trojita-2.patch::"https://github.com/annulen/webkit/commit/76420459.patch"
+- qt5-webkit-cmake3.10.patch::"https://github.com/annulen/webkit/commit/f51554bf.patch")
++ qt5-webkit-cmake3.10.patch::"https://github.com/annulen/webkit/commit/f51554bf.patch"
++ "qtwebkit-5.212.0-alpha2-add-riscv.patch")
+ sha256sums=('f8f901de567e11fc5659402b6b827eac75505ff9c5072d8e919aa306003f8f8a'
+ 'f108833562d766d4c086026f9202b2ebc8c19e97fddedce952afed78df3c0720'
+ '510e1f78c2bcd76909703a097dbc1d5c9c6ce4cd94883c26138f09cc10121f43'
+ 'bd22bd7842d5ad1cb1f5a4b6acb2674509732274d5f9dc51943144dff76996ae'
+ 'b42b70fd2a4a36b0ff48fc4e0dc386b3dda373e6fec18f3be9f5e2d3b04e0aa3'
+- 'b4e6c85fcb062e7cc141b0e34977bcc4f9c8677c773fc4b310151b85f51e7189')
++ 'b4e6c85fcb062e7cc141b0e34977bcc4f9c8677c773fc4b310151b85f51e7189'
++ 'f976cc349e29c05efb0ad7b8548ef440256eea8610da14dade1ad181826af9e1')
+
+ prepare() {
+ mkdir -p build
+@@ -44,22 +46,27 @@ prepare() {
+ patch -p1 -i ../qt5-webkit-null-pointer-dereference.patch
+ # Fix build with cmake 3.10
+ patch -p1 -i ../qt5-webkit-cmake3.10.patch
++# add risc-v support
++ patch -Np1 -i ../qtwebkit-5.212.0-alpha2-add-riscv.patch
+ }
+
+ build() {
+ cd build
+
+ cmake ../qtwebkit-$_qtver \
++ -G Ninja \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DPORT=Qt \
+- -DENABLE_TOOLS=OFF
+- make
++ -DENABLE_TOOLS=OFF \
++ -DENABLE_JIT=OFF
++ sed -i 's/-lpthread/& -latomic/g' build.ninja
++ ninja
+ }
+
+ package() {
+ cd build
+- make DESTDIR="$pkgdir" install
++ DESTDIR="$pkgdir" ninja install
+
+ install -d "$pkgdir"/usr/share/licenses
+ ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
+diff -rupN a/qtwebkit-5.212.0-alpha2-add-riscv.patch b/qtwebkit-5.212.0-alpha2-add-riscv.patch
+--- a/qtwebkit-5.212.0-alpha2-add-riscv.patch 1970-01-01 01:00:00.000000000 +0100
++++ b/qtwebkit-5.212.0-alpha2-add-riscv.patch 2018-04-14 16:23:40.469185464 +0200
+@@ -0,0 +1,113 @@
++diff --git a/CMakeLists.txt b/CMakeLists.txt
++index 1f9bab8..d5aa2ee 100644
++--- a/CMakeLists.txt
+++++ b/CMakeLists.txt
++@@ -86,6 +86,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390")
++ set(WTF_CPU_S390 1)
++ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
++ set(WTF_CPU_S390X 1)
+++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
+++ set(WTF_CPU_RISCV64 1)
++ else ()
++ message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
++ endif ()
++diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
++index 1957446..96255d6 100644
++--- a/Source/JavaScriptCore/CMakeLists.txt
+++++ b/Source/JavaScriptCore/CMakeLists.txt
++@@ -1289,6 +1289,7 @@ elseif (WTF_CPU_MIPS)
++ elseif (WTF_CPU_SH4)
++ elseif (WTF_CPU_X86)
++ elseif (WTF_CPU_X86_64)
+++elseif (WTF_CPU_RISCV64)
++ if (MSVC AND ENABLE_JIT)
++ add_custom_command(
++ OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
++diff --git a/Source/ThirdParty/brotli/dec/port.h b/Source/ThirdParty/brotli/dec/port.h
++index 19b457c..be1b2ad 100644
++--- a/Source/ThirdParty/brotli/dec/port.h
+++++ b/Source/ThirdParty/brotli/dec/port.h
++@@ -66,6 +66,10 @@
++ #define BROTLI_TARGET_POWERPC64
++ #endif
++
+++#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+++#define BROTLI_TARGET_RISCV64
+++#endif
+++
++ #if defined(__GNUC__) && defined(__GNUC_MINOR__)
++ #define BROTLI_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
++ #else
++@@ -180,7 +184,7 @@ static inline void BrotliDump(const char* f, int l, const char* fn) {
++ #elif defined(BROTLI_BUILD_32_BIT)
++ #define BROTLI_64_BITS 0
++ #elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8) || \
++- defined(BROTLI_TARGET_POWERPC64)
+++ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64)
++ #define BROTLI_64_BITS 1
++ #else
++ #define BROTLI_64_BITS 0
++diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
++index 3f2069e..d4e02a8 100644
++--- a/Source/WTF/wtf/Platform.h
+++++ b/Source/WTF/wtf/Platform.h
++@@ -176,6 +176,11 @@
++ #define WTF_CPU_X86_SSE2 1
++ #endif
++
+++/* CPU(RISCV64) - RISCV64 */
+++#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+++#define WTF_CPU_RISCV64 1
+++#endif
+++
++ /* CPU(ARM64) - Apple */
++ #if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
++ #define WTF_CPU_ARM64 1
++@@ -712,7 +717,8 @@
++ || CPU(S390X) \
++ || CPU(MIPS64) \
++ || CPU(PPC64) \
++- || CPU(PPC64LE)
+++ || CPU(PPC64LE) \
+++ || CPU(RISCV64)
++ #define USE_JSVALUE64 1
++ #else
++ #define USE_JSVALUE32_64 1
++diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h
++index 889642c..176d590 100644
++--- a/Source/WTF/wtf/dtoa/utils.h
+++++ b/Source/WTF/wtf/dtoa/utils.h
++@@ -49,7 +49,7 @@
++ defined(__ARMEL__) || \
++ defined(_MIPS_ARCH_MIPS32R2)
++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
++-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
+++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(RISCV64)
++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
++ #elif defined(_M_IX86) || defined(__i386__)
++ #if defined(_WIN32)
++diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
++index 84b18c7..b64d9d1 100755
++--- a/Tools/Scripts/webkitdirs.pm
+++++ b/Tools/Scripts/webkitdirs.pm
++@@ -1264,6 +1264,11 @@ sub isARM()
++ return ($Config{archname} =~ /^arm[v\-]/) || ($Config{archname} =~ /^aarch64[v\-]/);
++ }
++
+++sub isRISCV()
+++{
+++ return ($Config{archname} =~ /^riscv(|32|64)\-/);
+++}
+++
++ sub isX86_64()
++ {
++ return (architecture() eq "x86_64") || 0;
++@@ -2064,7 +2069,7 @@ sub generateBuildSystemFromCMakeProject
++ # Compiler options to keep floating point values consistent
++ # between 32-bit and 64-bit architectures.
++ determineArchitecture();
++- if ($architecture ne "x86_64" && !isARM() && !isCrossCompilation() && !isAnyWindows()) {
+++ if ($architecture ne "x86_64" && !isARM() && !isRISCV && !isCrossCompilation() && !isAnyWindows()) {
++ $ENV{'CXXFLAGS'} = "-march=pentium4 -msse2 -mfpmath=sse " . ($ENV{'CXXFLAGS'} || "");
++ }
++
diff --git a/src/stage4/patches/systemd.patch b/src/stage4/patches/systemd.patch
index 62177a6..f915824 100644
--- a/src/stage4/patches/systemd.patch
+++ b/src/stage4/patches/systemd.patch
@@ -1,9 +1,10 @@
---- a/PKGBUILD 2018-03-16 18:23:58.112034593 +0100
-+++ b/PKGBUILD 2018-03-16 18:59:17.686017180 +0100
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-17 19:26:37.026578845 +0200
++++ b/PKGBUILD 2018-04-17 22:07:42.832662745 +0200
@@ -85,6 +85,10 @@ sha512sums=('SKIP'
_backports=(
- # core: do not free heap-allocated strings (#8391) (FS#57741)
- '5cbaad2f6795088db56063d20695c6444595822f'
+ # nspawn: wait for network namespace creation before interface setup (#8633)
+ '7511655807e90aa33ea7b71991401a79ec36bb41'
+ # basic/macros: rename noreturn into _noreturn_ (#8456)
+ '848e863acc51ecfb0f3955c498874588201d9130'
+ # core: don't include libmount.h in a header file (#8580)
diff --git a/src/stage4/patches/texlive-bin.patch.texlive-bin b/src/stage4/patches/texlive-bin.patch.texlive-bin
new file mode 100644
index 0000000..80a5e83
--- /dev/null
+++ b/src/stage4/patches/texlive-bin.patch.texlive-bin
@@ -0,0 +1,102 @@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-11 06:12:11.168229069 +0200
++++ b/PKGBUILD 2018-04-11 06:12:11.169229069 +0200
+@@ -9,18 +9,15 @@
+ # parabola changes and rationale:
+ # - rebranded to parabola
+
+-pkgname=('texlive-bin')
++pkgname=('texlive-bin' 'libsynctex')
+ pkgver=2017.44590
+ pkgrel=13
+-pkgrel+=.parabola1
+ license=('GPL')
+ arch=('x86_64')
+-arch+=('i686' 'armv7h')
+ makedepends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler'
+ 'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2'
+ 'icu' 'harfbuzz' 'harfbuzz-icu' 'gmp' 'mpfr' 'potrace' 'libpaper'
+- 'perl' 'clisp' 'ffcall')
+-makedepends+=('poppler=0.63.0' 'icu>=61' 'icu<62')
++ 'perl')
+ url='http://tug.org/texlive/'
+ source=("https://sources.archlinux.org/other/texlive/texlive-bin-source-${pkgver}.tar.xz"
+ "luatex-gcc7.patch"
+@@ -52,12 +49,6 @@ prepare() {
+ build() {
+ cd "$srcdir"
+
+- if [ "${CARCH}" = "armv7h" ]; then
+- local config_xindy="--disable-xindy"
+- else
+- local config_xindy="--enable-xindy"
+- fi
+-
+ #############################################################
+ ### configure
+ cd source
+@@ -105,8 +96,7 @@ build() {
+ --disable-dump-share \
+ --disable-aleph \
+ --enable-luatex \
+- --with-clisp-runtime=default \
+- --disable-xindy-rules --disable-xindy-docs "$config_xindy"
++ --disable-xindy --disable-luajittex --disable-mfluajit
+ #############################################################
+ ### make
+ echo "-------------------------------------------------------"
+@@ -115,6 +105,15 @@ build() {
+ make
+ }
+
++package_libsynctex() {
++ pkgdesc='Library for synchronization between TeX files and resulting file'
++ depends=('glibc' 'zlib')
++
++ cd "${srcdir}/source/Work"
++ make -C texk/web2c DESTDIR="${pkgdir}" \
++ install-data-am install-libLTLIBRARIES
++}
++
+ package_texlive-bin() {
+ pkgdesc="TeX Live binaries"
+ pkgdesc+=" (Parabola rebranded)"
+@@ -122,8 +121,7 @@ package_texlive-bin() {
+ 'libsigsegv' 'zziplib' 'libpng' 'libjpeg' 'freetype2'
+ 'icu' 'harfbuzz' 'harfbuzz-icu' 'gmp' 'mpfr' 'potrace' 'libpaper'
+ 'libsynctex')
+- depends+=('icu>=61' 'icu<62' 'poppler=0.63.0')
+- provides=('lcdf-typetools' 'kpathsea' 'xindy')
++ provides=('lcdf-typetools' 'kpathsea')
+ optdepends=('ed: for texconfig'
+ 'biber: for bibliography processing')
+ options=('!strip')
+@@ -133,8 +131,6 @@ package_texlive-bin() {
+ #############################################################
+ ### install
+ cd source
+- # fixes for xindy
+- find utils/xindy -name Makefile -exec sed -i -e "s|^prefix =.\+$|prefix = $pkgdir/usr|" -e "s|^mandir =.\+$|mandir = \${prefix}/share/man|" -e "s|^datadir =.\+$|datadir = \${datarootdir}/texmf|" -e "s|^docdir =.\+$|docdir = \${datadir}/doc/xindy|" '{}' \;
+
+ echo "-------------------------------------------------------"
+ echo "--> Proceeding with make install ..."
+@@ -307,7 +303,6 @@ texdoc
+ texdoctk
+ texexec
+ texfot
+-texindy
+ texlinks
+ texliveonfly
+ texloganalyser
+@@ -323,11 +318,7 @@ updmap-user
+ vpl2ovp
+ vpl2vpl
+ xhlatex
+-xindy
+ "
+- if [ "$CARCH" = "armv7h" ]; then
+- _core_scripts="$(echo "$_core_scripts" | sed '/xindy$/d')"
+- fi
+ _games_scripts="rubikrotation"
+ _humanities_scripts="diadia"
+ _langcyrillic_scripts="rubibtex rumakeindex"
diff --git a/src/stage4/patches/webkit2gtk.patch b/src/stage4/patches/webkit2gtk.patch
new file mode 100644
index 0000000..c8ea468
--- /dev/null
+++ b/src/stage4/patches/webkit2gtk.patch
@@ -0,0 +1,105 @@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-04-16 07:21:50.189889175 +0200
++++ b/PKGBUILD 2018-04-16 07:24:37.332873334 +0200
+@@ -15,14 +15,17 @@ optdepends=('gtk2: Netscape plugin suppo
+ 'gst-plugins-base: free media decoding'
+ 'gst-plugins-good: media decoding'
+ 'gst-libav: nonfree media decoding')
+-source=(https://webkitgtk.org/releases/webkitgtk-${pkgver}.tar.xz{,.asc})
++source=(https://webkitgtk.org/releases/webkitgtk-${pkgver}.tar.xz{,.asc}
++ webkitgtk-2.20.0-add-riscv64.patch)
+ sha256sums=('57f640f720bd9a8a7207f3321cf803a15c2f207b4e7b75ff1be17bc1eeb00a3c'
+- 'SKIP')
++ 'SKIP'
++ 'c843cc85b3f48121ed0fd3cb50d026f0c9d6e62461e457e1e059e9068c3b3997')
+ validpgpkeys=('D7FCF61CF9A2DEAB31D81BD3F3D322D0EC4582C3')
+
+ prepare() {
+ mkdir build
+ cd webkitgtk-$pkgver
++ patch -Np1 -i ../webkitgtk-2.20.0-add-riscv64.patch
+ sed -i '1s/python$/&2/' Tools/gtk/generate-gtkdoc
+ }
+
+@@ -35,10 +38,12 @@ build() {
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DENABLE_GTKDOC=ON \
++ -DENABLE_JIT=OFF \
+ -DLIBEXEC_INSTALL_DIR=/usr/lib \
+ -DLIB_INSTALL_DIR=/usr/lib \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ ../webkitgtk-$pkgver
++ sed -i 's/-lpthread/& -latomic/g' build.ninja
+ ninja
+ }
+
+diff -rupN a/webkitgtk-2.20.0-add-riscv64.patch b/webkitgtk-2.20.0-add-riscv64.patch
+--- a/webkitgtk-2.20.0-add-riscv64.patch 1970-01-01 01:00:00.000000000 +0100
++++ b/webkitgtk-2.20.0-add-riscv64.patch 2018-04-15 17:22:32.242661969 +0200
+@@ -0,0 +1,65 @@
++diff --git a/CMakeLists.txt b/CMakeLists.txt
++index 3fb3dd5..4da0158 100644
++--- a/CMakeLists.txt
+++++ b/CMakeLists.txt
++@@ -99,6 +99,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
++ set(WTF_CPU_PPC64 1)
++ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
++ set(WTF_CPU_PPC64LE 1)
+++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
+++ set(WTF_CPU_RISCV64 1)
++ else ()
++ set(WTF_CPU_UNKNOWN 1)
++ endif ()
++diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
++index 94036df..b8a784a 100644
++--- a/Source/JavaScriptCore/CMakeLists.txt
+++++ b/Source/JavaScriptCore/CMakeLists.txt
++@@ -225,6 +225,8 @@ else ()
++ set(OFFLINE_ASM_BACKEND "ARMv7_TRADITIONAL")
++ elseif (WTF_CPU_MIPS)
++ set(OFFLINE_ASM_BACKEND "MIPS")
+++ elseif (WTF_CPU_RISCV64)
+++ set(OFFLINE_ASM_BACKEND "RISCV64")
++ endif ()
++
++ if (NOT ENABLE_JIT)
++diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
++index 850e298..22f06c2 100644
++--- a/Source/WTF/wtf/Platform.h
+++++ b/Source/WTF/wtf/Platform.h
++@@ -137,6 +137,11 @@
++ #define WTF_CPU_KNOWN 1
++ #endif
++
+++/* CPU(RISCV64) - RISCV64 */
+++#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+++#define WTF_CPU_RISCV64 1
+++#endif
+++
++ /* CPU(ARM64) - Apple */
++ #if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
++ #define WTF_CPU_ARM64 1
++@@ -744,7 +749,8 @@
++ #if !defined(ENABLE_JIT) \
++ && (CPU(X86) || CPU(X86_64) || CPU(ARM) || (CPU(ARM64) && !defined(__ILP32__)) || CPU(MIPS)) \
++ && !CPU(APPLE_ARMV7K) \
++- && !CPU(ARM64E)
+++ && !CPU(ARM64E) \
+++ && !CPU(RISCV64)
++ #define ENABLE_JIT 1
++ #endif
++
++diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h
++index 14a9478..a35a78d 100644
++--- a/Source/WTF/wtf/dtoa/utils.h
+++++ b/Source/WTF/wtf/dtoa/utils.h
++@@ -49,7 +49,7 @@
++ defined(__ARMEL__) || \
++ defined(_MIPS_ARCH_MIPS32R2)
++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
++-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(ARM64)
+++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(ARM64) || CPU(RISCV64)
++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
++ #elif defined(_M_IX86) || defined(__i386__)
++ #if defined(_WIN32)
diff --git a/src/stage4/stage4.sh b/src/stage4/stage4.sh
index 9fc0408..6423757 100644
--- a/src/stage4/stage4.sh
+++ b/src/stage4/stage4.sh
@@ -128,11 +128,11 @@ stage4_package_install() {
pkgfile=$(find "$PKGPOOL" -regex "^.*/$esc-[^-]*-[^-]*-[^-]*\\.pkg\\.tar\\.xz\$" | head -n1)
[ -n "$pkgfile" ] || { error -n "$1: pkgfile not found"; return "$ERROR_MISSING"; }
- yes | librechroot \
+ librechroot \
-n "$CHOST-stage4" \
-C "$BUILDDIR"/config/pacman.conf \
-M "$BUILDDIR"/config/makepkg.conf \
- run pacman -U /repos/pool/"$(basename "$pkgfile")" || return
+ run pacman -U --noconfirm /repos/pool/"$(basename "$pkgfile")" || return
yes | librechroot \
-n "$CHOST-stage4" \
-C "$BUILDDIR"/config/pacman.conf \
@@ -143,7 +143,7 @@ stage4_package_install() {
stage4() {
msg -n "Entering Stage 4"
- local groups=(base-devel)
+ local groups=(base base-devel)
export BUILDDIR="$TOPBUILDDIR"/stage4
export SRCDIR="$TOPSRCDIR"/stage4