Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
builds now on CentOS7, workaround for new GCC 4.7
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
tpokorra committed Feb 11, 2015
1 parent f106ea0 commit f5f5fc0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
37 changes: 37 additions & 0 deletions nsis/gcc46NameLookupChanges.patch
@@ -0,0 +1,37 @@
--- a/SCons/Config/gnu 2015-02-11 09:44:40.746132954 +0100
+++ b/SCons/Config/gnu 2015-02-11 09:46:13.410128624 +0100
@@ -71,6 +71,7 @@
if not defenv['DEBUG']:
stub_env.Append(CCFLAGS = ['-Os']) # optimize for size
stub_env.Append(CCFLAGS = ['-Wall']) # all warnings
+stub_env.Append(CCFLAGS = ['-fpermissive']) # workaround for Name lookup changes
stub_env.Append(CCFLAGS = ['-xc']) # force compile as c
stub_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing

@@ -91,8 +92,10 @@
if not defenv['DEBUG']:
makensis_env.Append(CCFLAGS = ['-O2']) # optimize
makensis_env.Append(CFLAGS = ['-Wall']) # all warnings
+makensis_env.Append(CFLAGS = ['-fpermissive']) # workaround for Name lookup changes
makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor warnings
makensis_env.Append(CXXFLAGS = ['-Wall']) # all warnings
+makensis_env.Append(CXXFLAGS = ['-fpermissive']) # workaround for Name lookup changes

conf = FlagsConfigure(makensis_env)
conf.CheckCompileFlag('-m32') #
@@ -110,6 +113,7 @@
if not defenv['DEBUG']:
plugin_env.Append(CCFLAGS = ['-Os']) # optimize for size
plugin_env.Append(CCFLAGS = ['-Wall']) # level 3 warnings
+plugin_env.Append(CCFLAGS = ['-fpermissive']) # workaround for Name lookup changes
plugin_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing

if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
@@ -127,6 +131,7 @@
if not defenv['DEBUG']:
cp_util_env.Append(CCFLAGS = ['-O2']) # optimize
cp_util_env.Append(CCFLAGS = ['-Wall']) # all warnings
+cp_util_env.Append(CCFLAGS = ['-fpermissive']) # workaround for Name lookup changes
cp_util_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing

conf = FlagsConfigure(cp_util_env)
4 changes: 4 additions & 0 deletions nsis/nsis.spec
Expand Up @@ -18,6 +18,7 @@ BuildRequires: gcc gcc-c++ scons
BuildRoot: /tmp/buildroot
Source: nsis-%{version}-src.tar.bz2
Source1: nsis-%{version}.zip
Patch1: gcc46NameLookupChanges.patch

%description
NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers.
Expand All @@ -26,6 +27,7 @@ NSIS (Nullsoft Scriptable Install System) is a professional open source system t
[ -d $RPM_BUILD_ROOT ] && [ "/" != "$RPM_BUILD_ROOT" ] && rm -rf $RPM_BUILD_ROOT
%setup -q -n nsis-%{version}-src
unzip ../../SOURCES/nsis-%{version}.zip
%patch1 -p1

%build
scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=`pwd`/nsis-%{version} install-compiler
Expand All @@ -47,5 +49,7 @@ cd $RPM_BUILD_ROOT/usr/local/nsis; ln -s . bin
%post

%changelog
* Wed Feb 11 2015 Timotheus Pokorra <timotheus.pokorra@solidcharity.com>
- Fix build for CentOS7
* Thu Nov 20 2014 Timotheus Pokorra <timotheus.pokorra@solidcharity.com>
- First build

0 comments on commit f5f5fc0

Please sign in to comment.