Author: glen                         Date: Thu Dec  2 16:29:19 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- cflags, CC/CXX not set as scons just does not work with spaces in it

---- Files affected:
packages/nsis:
   nsis.spec (1.1 -> 1.2) , optflags.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/nsis/nsis.spec
diff -u packages/nsis/nsis.spec:1.1 packages/nsis/nsis.spec:1.2
--- packages/nsis/nsis.spec:1.1 Thu Dec  2 16:58:58 2010
+++ packages/nsis/nsis.spec     Thu Dec  2 17:29:14 2010
@@ -10,6 +10,7 @@
 # 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)
@@ -23,11 +24,19 @@
 %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} \
@@ -37,19 +46,13 @@
        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
@@ -73,5 +76,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2010/12/02 16:29:14  glen
+- cflags, CC/CXX not set as scons just does not work with spaces in it
+
 Revision 1.1  2010/12/02 15:58:58  glen
 - new builds on ac-i686

================================================================
Index: packages/nsis/optflags.patch
diff -u /dev/null packages/nsis/optflags.patch:1.1
--- /dev/null   Thu Dec  2 17:29:19 2010
+++ packages/nsis/optflags.patch        Thu Dec  2 17:29:14 2010
@@ -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'))
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nsis/nsis.spec?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to