Kaynağa Gözat

Do not depend anymore on the native CPP and use the OpenPKG GCC package's CPP instead

Michael Schloh von Bennewitz 22 yıl önce
ebeveyn
işleme
ff19566e37
2 değiştirilmiş dosya ile 25 ekleme ve 3 silme
  1. 19 0
      infozip/infozip.patch
  2. 6 3
      infozip/infozip.spec

+ 19 - 0
infozip/infozip.patch

@@ -1,5 +1,24 @@
 --- zip-2.3/unix/configure	1999-04-27 21:49:05.000000000 +0200
 +++ zip-2.3/unix/configure	2003-03-06 21:46:09.399540000 +0100
+@@ -17,15 +17,9 @@
+ LN="ln -s"
+ 
+ echo Check for the C preprocessor
+-# on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+-CPP="${CC} -E"
+-# solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
++# use the OpenPKG GCC cpp binary unconditionally,
++# because on some platforms, the native one is broken
++CPP="@l_cpp@"
+ 
+ echo Check if we can use asm code
+ OBJA=""
 @@ -38,7 +38,7 @@
      echo "int foo() { return 0;}" > conftest.c
      $CC -c conftest.c >/dev/null 2>/dev/null

+ 6 - 3
infozip/infozip.spec

@@ -38,8 +38,8 @@ Packager:     The OpenPKG Project
 Distribution: OpenPKG [BASE]
 Group:        Archiver
 License:      BSD
-Version:      20030918
-Release:      20030918
+Version:      20031030
+Release:      20031030
 
 #   list of sources
 Source0:      ftp://ftp.info-zip.org/pub/infozip/src/zip%{V_zip_real}.tar.gz
@@ -49,7 +49,7 @@ Patch0:       infozip.patch
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20030909
+BuildPreReq:  OpenPKG, openpkg >= 20030909, gcc
 PreReq:       OpenPKG, openpkg >= 20030909
 AutoReq:      no
 AutoReqProv:  no
@@ -63,6 +63,9 @@ AutoReqProv:  no
     %setup0 -q -c
     %setup1 -q -T -D -a 1
     %patch0 -p0
+    %{l_shtool} subst \
+        -e 's;@l_cpp@;%{l_cc} -E;' \
+        zip-%{V_zip_here}/unix/configure
 
 %build
     ( cd zip-%{V_zip_here}