Dag Wieers wrote:
Who requested the compat-wxGTK package ?

Not me since I don't care about Audacity. However I care about the well-fare of rpmforge so I did the work anyway.

Attached is a patch for wxGTK-2.6.spec and a single patch to the wxgtk source (courtesy of Fedora). This is the bare minimum ripped mostly from the Fedora rpm, they have more patches but they're not relevant to the change to compat-.

I installed the resulting packages on centos5/i386 and centos5/x86_64 and in both cases was able to yum install audacity.

-tgc
diff -Nur wxGTK-2.6.3-orig/src/common/intl.cpp wxGTK-2.6.3/src/common/intl.cpp
--- wxGTK-2.6.3-orig/src/common/intl.cpp	2006-03-22 00:42:10.000000000 +0100
+++ wxGTK-2.6.3/src/common/intl.cpp	2007-02-19 12:36:44.000000000 +0100
@@ -1520,7 +1520,7 @@
   bool bOk = true;
   if ( bLoadDefault )
   {
-    bOk = AddCatalog(wxT("wxstd"));
+    bOk = AddCatalog(wxT("compat-wxstd26"));
 
     // there may be a catalog with toolkit specific overrides, it is not
     // an error if this does not exist
--- wxGTK-2.6.spec	2008-09-22 10:10:43.000000000 +0200
+++ compat-wxGTK-2.6.spec	2008-09-29 15:15:33.000000000 +0200
@@ -2,7 +2,7 @@
 # Authority: dag
 
 Summary: The GTK port of the wxWindows library
-Name: wxGTK
+Name: compat-wxGTK26
 Version: 2.6.4
 Release: 1
 License: wxWidgets Library Licence
@@ -10,6 +10,7 @@
 URL: http://www.wxwindows.org/
 
 Source: http://dl.sf.net/wxwindows/wxGTK-%{version}.tar.bz2
+Patch0: wxGTK-2.6.3-locale-compat.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires: expat-devel
@@ -28,13 +29,10 @@
 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxqt..."
 Provides: wxwin
 Obsoletes: wxBase <= %{version}-%{release}
+Obsoletes: wxGTK < 2.8
 Obsoletes: wxGTK-gl <= %{version}-%{release}
 Obsoletes: wxGTK-stc <= %{version}-%{release}
 Obsoletes: wxGTK-xrc <= %{version}-%{release}
-Provides: wxBase = %{version}-%{release}
-Provides: wxGTK-gl = %{version}-%{release}
-Provides: wxGTK-stc = %{version}-%{release}
-Provides: wxGTK-xrc = %{version}-%{release}
 
 %description
 wxWindows is a free C++ library for cross-platform GUI development.
@@ -45,9 +43,9 @@
 Summary: Header files, libraries and development documentation for %{name}.
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
-Requires: %{name}-gl = %{version}-%{release}
 Requires: gtk2-devel, pkgconfig
 Requires: libpng-devel, libjpeg-devel, libtiff-devel
+Obsoletes: wxGTK-devel < 2.8
 
 %description devel
 This package contains the header files, static libraries and development
@@ -58,9 +56,11 @@
 Header files for wxGTK, the GTK port of the wxWindows library.
 
 %prep
-%setup
+%setup -n wxGTK-%{version}
 #%{__perl} -pi.orig -e 's| /usr/lib| %{_libdir} %{_prefix}/X11R6/%{_lib}|g' configure
 
+%patch0 -p1 -b .locale-compat
+
 %build
 export GDK_USE_XFT="1"
 %configure \
@@ -92,12 +92,23 @@
 %{__make} install DESTDIR="%{buildroot}" -C contrib/src/ogl
 %{__make} install DESTDIR="%{buildroot}" -C contrib/src/stc
 %{__make} install DESTDIR="%{buildroot}" -C contrib/src/svg
-%find_lang wxstd
-%find_lang wxmsw
-%{__cat} wxstd.lang wxmsw.lang >>wx.lang
+# We have to rename the .mo files. Requires Patch0.
+for i in ${RPM_BUILD_ROOT}%{_datadir}/locale/*/LC_MESSAGES/wxstd.mo; do
+        NEWNAME=`echo $i | sed -e 's!wxstd.mo!compat-wxstd26.mo!'`;
+        mv $i $NEWNAME;
+done
+%find_lang compat-wxstd26
+%{__cat} compat-wxstd26.lang >>wx.lang
 
 ### Overwrite wrong symlink (includes buildroot)
-%{__ln_s} -f ../%{_lib}/wx/config/gtk2-unicode-release-2.6 %{buildroot}%{_bindir}/wx-config
+%{__ln_s} -f ../%{_lib}/wx/config/gtk2-unicode-release-2.6 %{buildroot}%{_bindir}/wx-2.6-config
+
+# Resolve conflicts with wxGTK 2.8
+%{__mv} %{buildroot}%{_datadir}/aclocal/wxwin.m4 %{buildroot}%{_datadir}/aclocal/wxwin-2.6.m4
+%{__rm} -f %{buildroot}%{_bindir}/wxrc %{buildroot}%{_bindir}/wx-config
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/bakefile
+find ${RPM_BUILD_ROOT}%{_datadir}/locale -name wxmsw.mo | xargs rm -f
+
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -113,18 +124,25 @@
 %files devel
 %defattr(-, root, root, 0755)
 %doc COPYING.LIB *.txt
-%{_bindir}/wx-config
-%{_bindir}/wxrc
+%{_bindir}/wx-2.6-config
 %{_bindir}/wxrc-2.6
 %{_datadir}/aclocal/*.m4
-%dir %{_datadir}/bakefile/
-%dir %{_datadir}/bakefile/presets/
-%{_datadir}/bakefile/presets/wx*.bkl
 %{_includedir}/wx-2.6/
 %{_libdir}/wx/
 %{_libdir}/libwx_*.so
 
 %changelog
+* Mon Sep 29 2008 Tom G. Christensen <[EMAIL PROTECTED]> - 2.6.4-1
+- Turn this package into compat-wxGTK that coexists with wxGTK >= 2.8
+  and wxGTK-devel >= 2.8
+- Don't include bakefile presets.
+- Rename message object files, add patch to load them.
+- Don't include wxmsw.mo.
+- Rename wx-config to wx-2.6-config (to run this within packages,
+  insert a wx-config symlink into PATH, for example).
+- Rename aclocal files.
+- Obsolete wxGTK, wxGTK-devel, wxGTK-gl (all less than 2.8).
+
 * Mon Sep 15 2008 Dag Wieers <[EMAIL PROTECTED]> - 2.6.4-1
 - Updated to release 2.6.4.
 
_______________________________________________
users mailing list
[email protected]
http://lists.rpmforge.net/mailman/listinfo/users

Reply via email to