diff options
author | Elan Ruusamäe | 2010-12-02 16:29:14 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | a197ee5a6f0dde7552aa9aeacbadb6e758a369df (patch) | |
tree | 7baf2278bd71cd7f89dba1bba6ce829677eb3e03 | |
parent | 68ff8bf3c3e2668e9fd9755766b69707cd5e1162 (diff) | |
download | nsis-a197ee5a6f0dde7552aa9aeacbadb6e758a369df.zip nsis-a197ee5a6f0dde7552aa9aeacbadb6e758a369df.tar.gz |
- cflags, CC/CXX not set as scons just does not work with spaces in it
Changed files:
nsis.spec -> 1.2
optflags.patch -> 1.1
-rw-r--r-- | nsis.spec | 25 | ||||
-rw-r--r-- | optflags.patch | 20 |
2 files changed, 34 insertions, 11 deletions
@@ -9,6 +9,7 @@ Source0: http://downloads.sourceforge.net/nsis/%{name}-%{version}-src.tar.bz2 # Source0-md5: 60243c2562710eeac45bda1378e4c88c Source1: http://downloads.sourceforge.net/nsis/%{name}-%{version}.zip # Source1-md5: 565d17b3ff12dffcf678ec252a892c04 +Patch0: optflags.patch BuildRequires: libstdc++-devel BuildRequires: scons >= 0.96.93 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -22,11 +23,19 @@ Internet distribution. %prep %setup -q -n %{name}-%{version}-src -a1 %{__cp} -aux %{name}-%{version}/* . +%patch0 -p1 %{__rm} -rf Docs/StrFunc %build -%scons \ +# build & install must use exactly same args to cmake, so make shell wrapper +# not to mistake. +cat <<'EOF' > build.sh +#!/bin/sh +%scons "$@" \ + APPEND_CCFLAGS="%{rpmcflags}" \ + APPEND_CXXFLAGS="%{rpmcxxflags}" \ + APPEND_LINKFLAGS="%{rpmldflags}" \ PREFIX=%{_prefix} \ PREFIX_DEST=$RPM_BUILD_ROOT \ PREFIX_CONF=%{_sysconfdir} \ @@ -36,19 +45,13 @@ Internet distribution. SKIPMISC="all" \ VERSION="%{version}" \ STRIP="false" +EOF +chmod a+rx build.sh +./build.sh %install rm -rf $RPM_BUILD_ROOT -%scons install \ - PREFIX=%{_prefix} \ - PREFIX_DEST=$RPM_BUILD_ROOT \ - PREFIX_CONF=%{_sysconfdir} \ - SKIPSTUBS="all" \ - SKIPPLUGINS="all" \ - SKIPUTILS="Library/RegTool,UIs,Makensisw,zip2exe,MakeLangId,NSIS Menu" \ - SKIPMISC="all" \ - VERSION="%{version}" \ - STRIP="false" +./build.sh install install -d $RPM_BUILD_ROOT%{_datadir}/nsis cp -fr Bin Contrib Include Menu Plugins Stubs $RPM_BUILD_ROOT%{_datadir}/nsis diff --git a/optflags.patch b/optflags.patch new file mode 100644 index 0000000..d9c4bb9 --- /dev/null +++ b/optflags.patch @@ -0,0 +1,20 @@ +--- nsis-2.34-src/SConstruct~ 2007-11-14 08:20:44.000000000 +0200 ++++ nsis-2.34-src/SConstruct 2010-12-02 18:08:32.174357723 +0200 +@@ -169,7 +169,8 @@ + opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc)) + opts.Add(PathOption('APPEND_CPPPATH', 'Additional paths to search for include files', None)) + opts.Add(PathOption('APPEND_LIBPATH', 'Additional paths to search for libraries', None)) +-opts.Add(('APPEND_CCFLAGS', 'Additional C/C++ compiler flags')) ++opts.Add(('APPEND_CCFLAGS', 'Additional C compiler flags')) ++opts.Add(('APPEND_CXXFLAGS', 'Additional C++ compiler flags')) + opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags')) + # build options + opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no')) +@@ -355,6 +356,7 @@ + defenv.Tool('mstoolkit', toolpath = ['SCons/Tools']) + + defenv.Append(CCFLAGS = Split('$APPEND_CCFLAGS')) ++defenv.Append(CXXFLAGS = Split('$APPEND_CXXFLAGS')) + defenv.Append(LINKFLAGS = Split('$APPEND_LINKFLAGS')) + defenv.Append(CPPPATH = Split('$APPEND_CPPPATH')) + defenv.Append(LIBPATH = Split('$APPEND_LIBPATH')) |