SHA256
1
0
forked from pool/peazip

Accepting request 575385 from home:alois:branches:devel:languages:pascal

- Added peazip-build_PIE.patch to produce position independent
  executables

OBS-URL: https://build.opensuse.org/request/show/575385
OBS-URL: https://build.opensuse.org/package/show/devel:languages:pascal/peazip?expand=0&rev=27
This commit is contained in:
Lars Vogdt 2018-02-13 17:45:23 +00:00 committed by Git OBS Bridge
parent 322152b5f1
commit 8f52b50548
3 changed files with 63 additions and 4 deletions

46
peazip-build_PIE.patch Normal file
View File

@ -0,0 +1,46 @@
From: Luigi Baldoni <aloisio@gmx.com>
Date: 2018-02-11 13:31:28 +0100
Subject: Build PIE binaries
Set lazarus project files so that we produce position
independent executables.
Index: peazip-6.5.0.src/project_pea.lpi
===================================================================
--- peazip-6.5.0.src.orig/project_pea.lpi
+++ peazip-6.5.0.src/project_pea.lpi
@@ -485,6 +485,8 @@
<GenerateDebugInfo Value="False"/>
</Debugging>
<Options>
+ <PassLinkerOptions Value="True"/>
+ <LinkerOptions Value="-pie"/>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
Index: peazip-6.5.0.src/project_peach.lpi
===================================================================
--- peazip-6.5.0.src.orig/project_peach.lpi
+++ peazip-6.5.0.src/project_peach.lpi
@@ -1320,6 +1320,8 @@
<GenerateDebugInfo Value="False"/>
</Debugging>
<Options>
+ <PassLinkerOptions Value="True"/>
+ <LinkerOptions Value="-pie"/>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
Index: peazip-6.5.0.src/project_gwrap.lpi
===================================================================
--- peazip-6.5.0.src.orig/project_gwrap.lpi
+++ peazip-6.5.0.src/project_gwrap.lpi
@@ -458,6 +458,8 @@
<GenerateDebugInfo Value="False"/>
</Debugging>
<Options>
+ <PassLinkerOptions Value="True"/>
+ <LinkerOptions Value="-pie"/>
<Win32>
<GraphicApplication Value="True"/>
</Win32>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Feb 11 12:25:23 UTC 2018 - aloisio@gmx.com
- Added peazip-build_PIE.patch to produce position independent
executables
-------------------------------------------------------------------
Wed Dec 27 12:45:47 UTC 2017 - aloisio@gmx.com

View File

@ -1,7 +1,7 @@
#
# spec file for package peazip
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -30,20 +30,24 @@ Source2: https://sourceforge.net/projects/peazip/files/%{version}/peazip_
Patch0: peazip-desktop.patch
# PATCH-FIX-UPSTREAM peazip-lazarus_1.8.0.patch -- aloisio@gmx.com
Patch1: peazip-lazarus_1.8.0.patch
# PATCH-FIX-OPENSUSE peazip-build_PIE.patch -- aloisio@gmx.com
Patch2: peazip-build_PIE.patch
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: fpc
BuildRequires: fpc-src
BuildRequires: kf5-filesystem
BuildRequires: lazarus
BuildRequires: p7zip
BuildRequires: libQt5Pas-devel
BuildRequires: p7zip
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: upx
BuildRequires: xorg-x11-devel
Requires: p7zip
Requires: upx
BuildRequires: kf5-filesystem
%if 0%{?suse_version} < 1500
BuildRequires: update-desktop-files
%endif
%description
PeaZip is a free Zip files utility, providing an unified, natively portable,
@ -85,6 +89,7 @@ export job definition as script.
%setup -q -n %{name}-%{version}.src
%patch0
%patch1 -p1
%patch2 -p1
chmod +w res/lang
dos2unix readme
cp %{SOURCE2} .
@ -126,11 +131,13 @@ popd
%fdupes %{buildroot}
%if 0%{?suse_version} < 1500
%post kf5
%desktop_database_post
%postun kf5
%desktop_database_postun
%endif
%files
%{_bindir}/pea