Browse Source

really use our compiler, fix building with gcc3.3

Michael van Elst 22 years ago
parent
commit
cb4a0bc639
1 changed files with 15 additions and 6 deletions
  1. 15 6
      html2text/html2text.spec

+ 15 - 6
html2text/html2text.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [EVAL]
 Group:        Converter
 License:      GPL
 Version:      1.3.1
-Release:      20030211
+Release:      20030708
 
 #   list of sources
 Source0:      ftp://ftp.ibiblio.org/pub/linux/apps/www/converters/html2text-%{version}.tar.gz
@@ -57,14 +57,23 @@ AutoReqProv:  no
 
 %prep
     %setup -q
+    #   make configure use CXX from environment
+    %{l_shtool} subst \
+        -e 's;CXX=unknown;CXX=${CXX-unknown};' \
+        -e 's;\("CC"\);"${CXX}" \1;' \
+        configure
+    #   avoid warning about antiquated C++ headers
+    %{l_shtool} subst \
+        -e 's;^\(CXXFLAGS *= *\);\1%{l_cxxflags} -Wno-deprecated ;' \
+        Makefile.in
+    #   simulate deprecated strstream.h
+    %{l_shtool} subst \
+        -e 's;<strstream.h>;<strstream>;' \
+        -e 's;ostrstream;std::ostrstream;g' \
+        format.C
 
 %build
-    CC="%{l_cc}" \
     CXX="%{l_cxx}" \
-    CFLAGS="%{l_cflags -O}" \
-    CXXFLAGS="%{l_cxxflags -O}" \
-    CPPFLAGS="%{l_cppflags}" \
-    LDFLAGS="%{l_ldflags}" \
     ./configure
     %{l_make} %{l_mflags -O}