rpms/pth/devel pth-2.0.7-config-script.patch, NONE, 1.1 pth-2.0.7-dont-remove-gcc-g.patch, NONE, 1.1 pth.spec, 1.18, 1.19

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sun Oct 21 13:01:12 UTC 2007


Author: mschwendt

Update of /cvs/extras/rpms/pth/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv681

Modified Files:
	pth.spec 
Added Files:
	pth-2.0.7-config-script.patch 
	pth-2.0.7-dont-remove-gcc-g.patch 
Log Message:
* Sun Oct 21 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.0.7-4
- Patch pth-config.
  This shall fix the multiarch conflict in pth-devel (#342961).
  It must not return -I/usr/include and -L/usr/{lib,lib64} either,
  since these are default search paths already.
- Replace the config.status CFLAGS sed expr with a patch.


pth-2.0.7-config-script.patch:

--- NEW FILE pth-2.0.7-config-script.patch ---
diff -Nur pth-2.0.7-orig/pth-config.in pth-2.0.7/pth-config.in
--- pth-2.0.7-orig/pth-config.in	2006-06-08 19:54:02.000000000 +0200
+++ pth-2.0.7/pth-config.in	2007-10-21 14:06:45.000000000 +0200
@@ -46,6 +46,19 @@
 help=no
 version=no
 
+arch=$(uname -i)
+case $arch in
+    x86_64 | ppc64 | ia64 | s390 )
+        pth_ldlibdir="/usr/lib64"
+        if [ "$pth_libdir" == "/usr/lib" ] ; then
+            pth_libdir=${pth_libdir}64
+        fi
+        ;;
+    * )
+        pth_ldlibdir="/usr/lib"
+        ;;
+esac
+
 usage="pth-config"
 usage="$usage [--help] [--version] [--all]"
 usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]"
@@ -109,11 +122,15 @@
             output="$output $pth_acdir"
             ;;
         --cflags)
-            output="$output -I$pth_includedir"
+            if [ "$pth_includedir" != "/usr/include" ] ; then
+                output="$output -I$pth_includedir"
+            fi
             output_extra="$output_extra $pth_cflags"
             ;;
         --ldflags)
-            output="$output -L$pth_libdir"
+            if [ "$pth_libdir" != "$pth_ldlibdir" ] ; then
+                output="$output -L$pth_libdir"
+            fi
             output_extra="$output_extra $pth_ldflags"
             ;;
         --libs)

pth-2.0.7-dont-remove-gcc-g.patch:

--- NEW FILE pth-2.0.7-dont-remove-gcc-g.patch ---
diff -Nur pth-2.0.7-orig/configure pth-2.0.7/configure
--- pth-2.0.7-orig/configure	2006-06-08 20:14:48.000000000 +0200
+++ pth-2.0.7/configure	2007-10-21 12:30:48.000000000 +0200
@@ -3054,14 +3054,6 @@
  ;;
 esac
 fi
-case "$CFLAGS" in
-    *-g* ) CFLAGS=`echo "$CFLAGS" |\
-                   sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
-esac
-case "$CXXFLAGS" in
-    *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
-                     sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
-esac
 msg="disabled"
 
 fi; echo "$as_me:$LINENO: checking for compilation debug mode" >&5


Index: pth.spec
===================================================================
RCS file: /cvs/extras/rpms/pth/devel/pth.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- pth.spec	21 Aug 2007 16:52:09 -0000	1.18
+++ pth.spec	21 Oct 2007 13:00:38 -0000	1.19
@@ -1,12 +1,14 @@
 Summary:        The GNU Portable Threads library
 Name:           pth
 Version:        2.0.7
-Release: 3
+Release:        4
 License:        LGPLv2+
 Group:          System Environment/Libraries
 URL:            http://www.gnu.org/software/pth/
 Source:         ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz
 Source1:        ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz.sig
+Patch1:         pth-2.0.7-dont-remove-gcc-g.patch
+Patch2:         pth-2.0.7-config-script.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -28,11 +30,34 @@
 
 %prep
 %setup -q
+%patch1 -p1 -b .dont-remove-gcc-g
+%patch2 -p1 -b .config-script
 
 
 %build
+%define _libdir /usr/lib64
 %configure --disable-static ac_cv_func_sigstack='no'
-sed -i -e 's!@CFLAGS@,!@CFLAGS@,-g !' config.status ; ./config.status
+
+# Work around multiarch conflicts in the pth-config script in order
+# to complete patch2. Make the script choose between /usr/lib and
+# /usr/lib64 at run-time.
+if [ "%_libdir" == "/usr/lib64" ] ; then
+    if grep -e '^pth_libdir="/usr/lib64"' pth-config ; then
+        sed -i -e 's!^pth_libdir="/usr/lib64"!pth_libdir="/usr/lib"!' pth-config
+    else
+        echo "ERROR: Revisit the multiarch pth_libdir fixes for pth-config!"
+        exit 1
+    fi
+fi
+if grep -e "$RPM_OPT_FLAGS" pth-config ; then
+    # Remove our extra CFLAGS from the pth-config script, since they
+    # don't belong in there.
+    sed -i -e "s!$RPM_OPT_FLAGS!!g" pth-config
+else
+    echo "ERROR: Revisit the multiarch CFLAGS fix for pth-config!"
+    exit 1
+fi
+
 # this is necessary; without it make -j fails
 make pth_p.h
 make %{?_smp_mflags}
@@ -40,6 +65,10 @@
 
 %check || :
 make test
+l=$($(pwd)/pth-config --libdir)
+%ifarch x86_64 ppc64
+    [ "$l" == "/usr/lib64" ]
+%endif
 
 
 %install
@@ -74,6 +103,13 @@
 
 
 %changelog
+* Sun Oct 21 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.0.7-4
+- Patch pth-config.
+  This shall fix the multiarch conflict in pth-devel (#342961).
+  It must not return -I/usr/include and -L/usr/{lib,lib64} either,
+  since these are default search paths already.
+- Replace the config.status CFLAGS sed expr with a patch.
+
 * Tue Aug 21 2007 Michael Schwendt <mschwendt[AT]users.sf.net>
 - rebuilt
 




More information about the scm-commits mailing list