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

Andreas Thienemann ixs at fedoraproject.org
Thu Oct 16 20:44:08 UTC 2008


Author: ixs

Update of /cvs/pkgs/rpms/pthsem/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8407

Added Files:
	pth-2.0.7-config-script.patch 
	pth-2.0.7-dont-remove-gcc-g.patch pthsem.spec 
Log Message:
initial commit

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


--- NEW FILE pthsem.spec ---
Summary:        The GNU Portable Threads library extended with semaphore support
Name:           pthsem
Version:        2.0.7
Release:        1%{?dist}
License:        LGPLv2+
Group:          System Environment/Libraries
URL:            http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth
Source:         http://downloads.sourceforge.net/bcusdk/pthsem_%{version}.tar.gz
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)
BuildRequires:  /usr/bin/iconv

%description
Pth is a very portable POSIX/ANSI-C based library for Unix platforms
which provides non-preemptive priority-based scheduling for multiple
threads of execution ("multithreading") inside server applications.
All threads run in the same address space of the server application,
but each thread has it's own individual program-counter, run-time
stack, signal mask and errno variable.

pthsem is an extend version, with support for semaphores added. It can
be installed parallel to a normal pth. The header file is called pthsem.h, 
the configuration program pthsem-config and the autoconf macro
AC_CHECK_PTHSEM.

%package devel
Summary:        Development headers and libraries for Pthsem
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
Development headers and libraries for pthsem.


%prep
%setup -q
%patch1 -p1 -b .dont-remove-gcc-g
%patch2 -p1 -b .config-script
for f in ChangeLog README THANKS; do
    iconv -f ISO-8859-1 -t UTF-8 $f -o $f.new && mv $f.new $f
done



%build
%configure --disable-static ac_cv_func_sigstack='no'

# 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}


%check
make test
l=$($(pwd)/pth-config --libdir)
%ifarch x86_64 ppc64
    [ "$l" == "/usr/lib64" ]
%endif


%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} install
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc ANNOUNCE AUTHORS COPYING ChangeLog HISTORY NEWS PORTING README
%doc SUPPORT TESTS THANKS USERS
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%doc HACKING
%{_bindir}/*
%{_includedir}/*
%{_libdir}/*.so
%{_mandir}/*/*
%{_datadir}/aclocal/*


%changelog
* Thu Jul 31 2008 Andreas Thienemann <athienem at redhat.com> - 2.0.7-1
- Rolled initial spec based on the pth-2.0.7.spec from mschwendt




More information about the scm-commits mailing list