diff --git a/libpqxx-2.6.8-visibility-2.patch b/libpqxx-2.6.8-visibility-2.patch new file mode 100644 index 0000000..af2ae5a --- /dev/null +++ b/libpqxx-2.6.8-visibility-2.patch @@ -0,0 +1,12 @@ +diff -up libpqxx-2.6.8/include/pqxx/prepared_statement.hxx.visibility libpqxx-2.6.8/include/pqxx/prepared_statement.hxx +--- libpqxx-2.6.8/include/pqxx/prepared_statement.hxx.visibility 2006-08-29 10:32:55.000000000 -0500 ++++ libpqxx-2.6.8/include/pqxx/prepared_statement.hxx 2009-04-09 13:37:38.000000000 -0500 +@@ -138,7 +138,7 @@ private: + namespace internal + { + /// Internal representation of a prepared statement definition +-struct PQXX_PRIVATE prepared_def ++struct PQXX_LIBEXPORT prepared_def + { + /// Parameter definition + struct param diff --git a/libpqxx-2.6.8-visibility.patch b/libpqxx-2.6.8-visibility.patch index 45a0e59..002ad48 100644 --- a/libpqxx-2.6.8-visibility.patch +++ b/libpqxx-2.6.8-visibility.patch @@ -1,31 +1,6 @@ -diff -up libpqxx-2.6.8/configure.ac.in.visibility libpqxx-2.6.8/configure.ac.in ---- libpqxx-2.6.8/configure.ac.in.visibility 2006-09-04 06:36:59.000000000 -0500 -+++ libpqxx-2.6.8/configure.ac.in 2008-02-19 08:33:36.000000000 -0600 -@@ -129,7 +129,7 @@ if test "$GCC" = "yes" ; then - AC_MSG_CHECKING([g++ visibility attribute]) - gcc_visibility=yes - SAVE_CXXFLAGS="$CXXFLAGS" --CXXFLAGS="$CXXFLAGS -Werror" -+#CXXFLAGS="$CXXFLAGS -Werror" - AC_TRY_COMPILE([ - struct __attribute__ ((visibility("hidden"))) d { d() {} void f() {} }; - ], -diff -up libpqxx-2.6.8/configure.ac.visibility libpqxx-2.6.8/configure.ac ---- libpqxx-2.6.8/configure.ac.visibility 2006-09-06 04:53:36.000000000 -0500 -+++ libpqxx-2.6.8/configure.ac 2008-02-19 08:33:44.000000000 -0600 -@@ -129,7 +129,7 @@ if test "$GCC" = "yes" ; then - AC_MSG_CHECKING([g++ visibility attribute]) - gcc_visibility=yes - SAVE_CXXFLAGS="$CXXFLAGS" --CXXFLAGS="$CXXFLAGS -Werror" -+#CXXFLAGS="$CXXFLAGS -Werror" - AC_TRY_COMPILE([ - struct __attribute__ ((visibility("hidden"))) d { d() {} void f() {} }; - ], -diff -up libpqxx-2.6.8/configure.visibility libpqxx-2.6.8/configure ---- libpqxx-2.6.8/configure.visibility 2006-09-06 04:53:48.000000000 -0500 -+++ libpqxx-2.6.8/configure 2008-02-19 08:33:47.000000000 -0600 -@@ -20203,7 +20203,7 @@ if test "$GCC" = "yes" ; then +--- libpqxx-2.6.8/configure.disable_visibility 2006-09-06 04:53:48.000000000 -0500 ++++ libpqxx-2.6.8/configure 2006-09-20 13:51:53.000000000 -0500 +@@ -20203,7 +20203,7 @@ echo $ECHO_N "checking g++ visibility attribute... $ECHO_C" >&6; } gcc_visibility=yes SAVE_CXXFLAGS="$CXXFLAGS" diff --git a/libpqxx.spec b/libpqxx.spec index b86d1a1..9baa46c 100644 --- a/libpqxx.spec +++ b/libpqxx.spec @@ -1,6 +1,6 @@ Name: libpqxx Version: 2.6.8 -Release: 12%{?dist} +Release: 13%{?dist} Summary: C++ client API for PostgreSQL Group: System Environment/Libraries @@ -12,7 +12,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # drop -Werror for now, since we get -fvisibility warnings using gcc-4.1.1/fc6+ # http://thaiopensource.org/development/libpqxx/ticket/83 +# or .. actually fix it. Patch1: libpqxx-2.6.8-visibility.patch +# or better yet, fix it: +Patch11: libpqxx-2.6.8-visibility-2.patch Patch2: libpqxx-2.6.8-gcc43.patch Patch3: libpqxx-2.6.8-multilib.patch @@ -41,15 +44,13 @@ Requires: postgresql-devel # fix spurious permissions chmod -x COPYING INSTALL -#if ! 0%{?fedora} > 8 -%patch1 -p1 -b .visibility -#endif +%patch11 -p1 -b .visibility %patch2 -p1 -b .gcc43 %patch3 -p1 -b .multilib # better fix/hack for current rpath and libtool issues -libtoolize -autoreconf +libtoolize --force +autoreconf -f -i %build @@ -85,7 +86,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING NEWS README TODO VERSION -%{_libdir}/libpqxx-*.so +%{_libdir}/libpqxx-%{version}.so %files devel %defattr(-,root,root,-) @@ -97,6 +98,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Apr 09 2009 Rex Dieter - 2.6.8-13 +- properly fix visibility issues + * Tue Mar 03 2009 Robert Scheck - 2.6.8-12 - Rebuilt against libtool 2.2