Kaynağa Gözat

sparc64-freebsd platform fixes

Christoph Schug 18 yıl önce
ebeveyn
işleme
f4463577d6

+ 6 - 2
bzip2/bzip2.spec

@@ -33,7 +33,7 @@ Class:        CORE
 Group:        Compression
 License:      GPL
 Version:      1.0.4
-Release:      20070105
+Release:      20070505
 
 #   list of sources
 Source0:      http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz
@@ -74,9 +74,13 @@ AutoReqProv:  no
 
 %build
     #   build package
+    cflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cflags="-fPIC" ;;
+    esac
     %{l_make} %{l_mflags} \
         CC="%{l_cc}" \
-        CFLAGS="%{l_cflags -O} -D_FILE_OFFSET_BITS=64"
+        CFLAGS="%{l_cflags -O} -D_FILE_OFFSET_BITS=64 $cflags"
 
 %install
     rm -rf $RPM_BUILD_ROOT

+ 6 - 1
db/db.spec

@@ -37,7 +37,7 @@ Class:        BASE
 Group:        Database
 License:      BSD
 Version:      %{V_version}.%{V_revision}
-Release:      20070409
+Release:      20070505
 
 #   package options
 %option       with_compat no
@@ -87,6 +87,10 @@ AutoReqProv:  no
 
 %build
     #   configure library
+    cppflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="-fPIC" ;;
+    esac
     mutex="no"
     case "%{l_platform -p}" in
         ix86-*   ) mutex="x86/gcc-assembly"   ;;
@@ -98,6 +102,7 @@ AutoReqProv:  no
     esac
     cd build_unix
     CC="%{l_cc}" \
+    CPPFLAGS="%{l_cppflags} $cppflags" \
     CFLAGS="%{l_cflags -O}" \
 %if "%{with_cxx}" == "yes"
     CXX="%{l_cxx}" \

+ 6 - 1
freetype/freetype.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Graphics
 License:      GPL
 Version:      2.3.4
-Release:      20070410
+Release:      20070505
 
 #   list of sources
 Source0:      http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.gz
@@ -74,7 +74,12 @@ AutoReqProv:  no
         builds/unix/configure
 
 %build
+    cppflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="-fPIC" ;;
+    esac
     CC="%{l_cc}" \
+    CPPFLAGS="%{l_cppflags} $cppflags" \
     CFLAGS="%{l_cflags -O}" \
     %{l_make} %{l_mflags} setup \
         CFG="--prefix=%{l_prefix} --disable-shared --without-zlib"

+ 8 - 2
gcc/gcc.spec

@@ -37,7 +37,7 @@ Class:        CORE
 Group:        Compiler
 License:      GPL
 Version:      %{V_full}
-Release:      20070419
+Release:      20070505
 
 #   package options
 %option       with_cxx       yes
@@ -231,10 +231,16 @@ AutoReqProv:  no
     fi
 %endif
 
+    #   enforce PIC on certain platforms
+    boot_cflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) boot_cflags="-fPIC" ;;
+    esac
+
     #   build the package
     %{l_make} %{l_mflags} \
         MAKE="%{l_make} %{l_mflags}" \
-        BOOT_CFLAGS="${l_boot_cflags}" \
+        BOOT_CFLAGS="${l_boot_cflags} $boot_cflags" \
         CFLAGS="${l_cflags}" \
         LIBCFLAGS="${l_libcflags}" \
         LIBCXXFLAGS="${l_libcxxflags}" \

+ 6 - 2
gd/gd.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Graphics
 License:      GPL
 Version:      2.0.34
-Release:      20070303
+Release:      20070505
 
 #   package options
 %option       with_xpm         no
@@ -95,9 +95,13 @@ AutoReqProv:  no
     ( echo "ac_cv_header_iconv_h=no"
       echo "am_cv_func_iconv=no"
     ) >config.cache
+    cppflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="-fPIC" ;;
+    esac
     CC="%{l_cc}" \
     CFLAGS="%{l_cflags -O}" \
-    CPPFLAGS="%{l_cppflags . libpng}" \
+    CPPFLAGS="%{l_cppflags . libpng} $cppflags" \
     LDFLAGS="%{l_ldflags}" \
 %if "%{with_fontconfig}" == "yes"
     LIBS="`pkg-config --libs fontconfig` -lm" \

+ 4 - 1
imapd/imapd.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Mail
 License:      BSD
 Version:      2.3.8
-Release:      20070502
+Release:      20070505
 
 #   package options
 %option       with_fsl           yes
@@ -189,6 +189,9 @@ AutoReqProv:  no
     export CFLAGS="%{l_cflags -O}"
     export LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}"
     export LIBS="%{l_fsl_libs}"
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) CPPFLAGS="$CPPFLAGS -fPIC" ;;
+    esac
 %if "%{with_atvdom}" == "yes"
     CPPFLAGS="$CPPFLAGS -DATVDOM"
 %endif

+ 6 - 1
jpeg/jpeg.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Graphics
 License:      GPL
 Version:      6b
-Release:      20061013
+Release:      20070505
 
 #   list of sources
 Source0:      ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
@@ -64,7 +64,12 @@ AutoReqProv:  no
     %patch -p0
 
 %build
+    cppflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="-fPIC" ;;
+    esac
     CC="%{l_cc}" \
+    CPPFLAGS="%{l_cppflags} $cppflags" \
     CFLAGS="%{l_cflags -O}" \
     ./configure \
         --prefix=%{l_prefix} \

+ 6 - 1
ncurses/ncurses.spec

@@ -49,7 +49,7 @@ Class:        BASE
 Group:        Terminal
 License:      MIT-style
 Version:      %{V_base}.%{V_patchL}
-Release:      20070501
+Release:      20070505
 
 #   list of sources
 Source0:      ftp://invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz
@@ -128,7 +128,12 @@ AutoReqProv:  no
     %patch -p0 -P 100
 
 %build
+    cppflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="-fPIC" ;;
+    esac
     CC="%{l_cc}" \
+    CPPFLAGS="%{l_cppflags} $cppflags" \
     CFLAGS="%{l_cflags}" \
     ./configure \
         --prefix=%{l_prefix} \

+ 6 - 2
png/png.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Graphics
 License:      BSD
 Version:      1.2.16
-Release:      20070131
+Release:      20070505
 
 #   list of sources
 Source0:      http://switch.dl.sourceforge.net/sourceforge/libpng/libpng-%{version}.tar.gz
@@ -70,9 +70,13 @@ AutoReqProv:  no
     %patch -p0
 
 %build
+    cppflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="-fPIC" ;;
+    esac
     CC="%{l_cc}" \
     CFLAGS="%{l_cflags -O}" \
-    CPPFLAGS="%{l_cppflags}" \
+    CPPFLAGS="%{l_cppflags} $cppflags" \
     LDFLAGS="%{l_ldflags}" \
     GREP="grep" \
     ./configure \

+ 6 - 1
readline/readline.spec

@@ -39,7 +39,7 @@ Class:        BASE
 Group:        Terminal
 License:      GPL
 Version:      %{V_base_real}.%{V_plvl_raw}
-Release:      20070426
+Release:      20070505
 
 #   list of sources
 Source0:      ftp://ftp.cwru.edu/pub/bash/readline-%{V_base_real}.tar.gz
@@ -78,7 +78,12 @@ AutoReqProv:  no
 
 %build
     #   configure package
+    cppflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="-fPIC" ;;
+    esac
     CC="%{l_cc}" \
+    CPPFLAGS="%{l_cppflags} $cppflags" \
     CFLAGS="%{l_cflags -O}" \
     ./configure \
         --prefix=%{l_prefix} \

+ 6 - 2
sasl/sasl.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Cryptography
 License:      BSD
 Version:      2.1.22
-Release:      20070412
+Release:      20070505
 
 #   package options
 %option       with_fsl    yes
@@ -150,6 +150,10 @@ AutoReqProv:  no
         lib/server.c
 
     #   determine build flags
+    cppflags="%{l_cppflags}"
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cppflags="$cppflags -fPIC" ;;
+    esac
     cflags="%{l_cflags -O} %{l_cppflags}"
     ldflags="%{l_ldflags} %{l_fsl_ldflags}"
     libs="-ldb %{l_fsl_libs}"
@@ -169,7 +173,7 @@ AutoReqProv:  no
     #   configure package
     CC="%{l_cc}" \
     CFLAGS="$cflags" \
-    CPPFLAGS="%{l_cppflags}" \
+    CPPFLAGS="$cppflags" \
     LDFLAGS="$ldflags" \
     LIBS="$libs" \
     ./configure \

+ 6 - 2
zlib/zlib.spec

@@ -33,7 +33,7 @@ Class:        CORE
 Group:        Compression
 License:      BSD
 Version:      1.2.3
-Release:      20061013
+Release:      20070505
 
 #   list of sources
 Source0:      http://www.zlib.net/zlib-%{version}.tar.gz
@@ -69,8 +69,12 @@ AutoReqProv:  no
     %setup -q
 
 %build
+    cflags=""
+    case "%{l_platform -t}" in
+        sparc64-freebsd* ) cflags="-fPIC" ;;
+    esac
     CC="%{l_cc}" \
-    CFLAGS="%{l_cflags -O}" \
+    CFLAGS="%{l_cflags -O} $cflags" \
     ./configure \
         --prefix=%{l_prefix}
     %{l_make} %{l_mflags -O}