rpms/player/F-9 player-2.1.1-plugindir.patch, NONE, 1.1 player.spec, 1.2, 1.3

Tim Niemueller timn at fedoraproject.org
Tue Sep 2 18:10:18 UTC 2008


Author: timn

Update of /cvs/pkgs/rpms/player/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6691

Modified Files:
	player.spec 
Added Files:
	player-2.1.1-plugindir.patch 
Log Message:
Added plugindir patch

+ Patch resolves two issues:
. - /usr/lib was searched for plugins, even on x86_64. dlopen magic
.   prevented havoc.
. - We now have a specified plugin directory where plugins can be put.

Tim


player-2.1.1-plugindir.patch:

--- NEW FILE player-2.1.1-plugindir.patch ---
diff -urN player-2.1.1/libplayercore/Makefile.am player-2.1.1-plugindir/libplayercore/Makefile.am
--- player-2.1.1/libplayercore/Makefile.am	2008-06-11 03:11:18.000000000 +0200
+++ player-2.1.1-plugindir/libplayercore/Makefile.am	2008-09-02 19:59:41.000000000 +0200
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -g -Wall -D PLAYER_INSTALL_PREFIX="\"@PREFIX@\"" -I$(top_srcdir)
+AM_CPPFLAGS = -g -Wall -D PLAYER_INSTALL_PREFIX="\"@PREFIX@\"" -D PLAYER_PLUGINDIR="\"@libdir@/player\"" -D LIBDIR="\"@libdir@\"" -I$(top_srcdir)
 
 # create the pkg-config entry for the server headers
 pkgconfigdir = $(libdir)/pkgconfig
diff -urN player-2.1.1/libplayercore/plugins.cc player-2.1.1-plugindir/libplayercore/plugins.cc
--- player-2.1.1/libplayercore/plugins.cc	2008-04-13 00:16:48.000000000 +0200
+++ player-2.1.1-plugindir/libplayercore/plugins.cc	2008-09-02 20:00:15.000000000 +0200
@@ -169,8 +169,22 @@
   if(!handle)
   {
     memset(fullpath,0,PATH_MAX);
-    strncpy(fullpath,PLAYER_INSTALL_PREFIX, PATH_MAX);
-    strncat(fullpath,"/lib/", PATH_MAX);
+    strncpy(fullpath,LIBDIR, PATH_MAX);
+    strncat(fullpath,"/", PATH_MAX);
+    strncat(fullpath,pluginname, PATH_MAX);
+    PLAYER_MSG1(1, "trying to load %s...", fullpath);
+    if((handle = lt_dlopenext(fullpath)))
+      PLAYER_MSG0(1, "success");
+    else
+      PLAYER_MSG1(1, "failed (%s)\n", lt_dlerror() );
+  }
+
+  // try to load it from prefix/lib/player
+  if(!handle)
+  {
+    memset(fullpath,0,PATH_MAX);
+    strncpy(fullpath,PLAYER_PLUGINDIR, PATH_MAX);
+    strncat(fullpath,"/", PATH_MAX);
     strncat(fullpath,pluginname, PATH_MAX);
     PLAYER_MSG1(1, "trying to load %s...", fullpath);
     if((handle = lt_dlopenext(fullpath)))


Index: player.spec
===================================================================
RCS file: /cvs/pkgs/rpms/player/F-9/player.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- player.spec	2 Sep 2008 16:19:08 -0000	1.2
+++ player.spec	2 Sep 2008 18:09:48 -0000	1.3
@@ -2,7 +2,7 @@
 
 Name:           player
 Version:        2.1.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Cross-platform robot device interface and server
 
 Group:          Applications/System
@@ -15,6 +15,7 @@
 Patch0:         %{name}-2.1.1-gcc43.patch
 Patch1:         %{name}-2.1.1-norpath.patch
 Patch2:         %{name}-2.1.0rc2-paths.patch
+Patch3:         %{name}-2.1.1-plugindir.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  autoconf, automake
@@ -100,6 +101,7 @@
 %patch0 -p1 -b .gcc43
 %patch1 -p1 -b .norpath
 %patch2 -p1 -b .paths
+%patch3 -p1 -b .plugindir
 
 
 %build
@@ -132,6 +134,10 @@
 rm -f $RPM_BUILD_ROOT%{_bindir}/*.pyo
 #mv $RPM_BUILD_ROOT%{_libdir}/player/examples $RPM_BUILD_ROOT%{_datadir}/player/examples
 
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
+mv $RPM_BUILD_ROOT%{_libdir}/liblododriver.so.?.?.? $RPM_BUILD_ROOT%{_libdir}/%{name}/liblododriver.so
+rm -rf $RPM_BUILD_ROOT%{_libdir}/liblododriver.so*
+
 desktop-file-install --vendor="fedora"               \
 --dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
 %{SOURCE1}
@@ -162,6 +168,8 @@
 %dir %{_datadir}/player
 %dir %{_libdir}/player
 %{_datadir}/applications/*.desktop
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}
 
 %files python
 %defattr(-,root,root,-)
@@ -188,6 +196,9 @@
 %{_libdir}/*.a
 
 %changelog
+* Tue Sep 02 2008 Tim Niemueller <tim at niemueller.de> - 2.1.1-5
+- Added plugindir patch
+
 * Fri Aug 15 2008 Tim Niemueller <tim at niemueller.de> - 2.1.1-4
 - Changed norpath patch, fixes build problem on Fedora 8
 - Added libtool BR




More information about the fedora-extras-commits mailing list