Date: Friday, April 15, 2022 @ 01:13:42 Author: foutrelis Revision: 1186420
Fix linking error when building with LTO Added: deepin-music/trunk/fix-build-on-x86_64-add-fPIC-option.patch Modified: deepin-music/trunk/PKGBUILD -------------------------------------------+ PKGBUILD | 13 +++++++++++-- fix-build-on-x86_64-add-fPIC-option.patch | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-04-15 01:09:52 UTC (rev 1186419) +++ PKGBUILD 2022-04-15 01:13:42 UTC (rev 1186420) @@ -13,9 +13,18 @@ 'taglib' 'udisks2-qt5' 'vlc') makedepends=('cmake' 'ninja' 'qt5-tools') groups=('deepin-extra') -source=("https://github.com/linuxdeepin/deepin-music/archive/$pkgver/$pkgname-$pkgver.tar.gz") -sha512sums=('f5a0c70e24ec05c1a5e2cde4d98707b21e093825f2584f7395db3dfdab0326d2904aa595f15ad186cda505cc816a89017e15a75533343e957039a81bac6d8def') +options=('!lto') +source=("https://github.com/linuxdeepin/deepin-music/archive/$pkgver/$pkgname-$pkgver.tar.gz" + fix-build-on-x86_64-add-fPIC-option.patch) +sha512sums=('f5a0c70e24ec05c1a5e2cde4d98707b21e093825f2584f7395db3dfdab0326d2904aa595f15ad186cda505cc816a89017e15a75533343e957039a81bac6d8def' + 'fd04580c943868769d3ba93bbccdff5893052821c067e217df8bd009d6891c475bffba82d66e66112ebee3b83f0de956b0aef1ccafe6680b82ba4ad724a650b3') +prepare() { + cd deepin-music-$pkgver + # https://github.com/linuxdeepin/deepin-music/pull/118 + patch -Np1 -i ../fix-build-on-x86_64-add-fPIC-option.patch +} + build() { cd deepin-music-$pkgver cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr . Added: fix-build-on-x86_64-add-fPIC-option.patch =================================================================== --- fix-build-on-x86_64-add-fPIC-option.patch (rev 0) +++ fix-build-on-x86_64-add-fPIC-option.patch 2022-04-15 01:13:42 UTC (rev 1186420) @@ -0,0 +1,22 @@ +From 236a03dcddbd21b276818c4016991ca137e7a330 Mon Sep 17 00:00:00 2001 +From: hillwoodroc <hillwood...@gmail.com> +Date: Mon, 21 Feb 2022 16:49:55 +0800 +Subject: [PATCH] Fix build on x86_64: add fPIC option + +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 86970347..2c4dca9c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) ++set(CMAKE_C_FLAGS "-fPIC") ++set(CMAKE_CXX_FLAGS "-fPIC") + + option(USE_DXCB "integration with dxcb platform plugin" OFF) + option(DMR_DEBUG "turn on debug output" off)