From c94297e3cab7b0be8336dc3ea0276d316c00d39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 4 Apr 2007 20:43:29 +0200 Subject: Properly uninstall plugins installed through xineplug_LTLIBRARIES. As we remove the .la files from libtool, the default uninstall targets will not work for the plugins, so we have to remove them by hand. When all the plugins will be migrated to xineplug_LTLIBRARIES, we can remove the egrep call and that part of the code. --- misc/Makefile.common | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'misc') diff --git a/misc/Makefile.common b/misc/Makefile.common index b3772941f..aa5ec1013 100644 --- a/misc/Makefile.common +++ b/misc/Makefile.common @@ -49,6 +49,11 @@ uninstall-hook: rm -f $(DESTDIR)$(libdir)/$$p; \ done; \ fi + @list='$(xineplug_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(xineplugdir)/$$p"; \ + rm -f $(DESTDIR)$(xineplugdir)/$$p; \ + done; mostlyclean-generic: -rm -f *~ \#* .*~ .\#* -- cgit v1.2.3 From e7b343f647fa5c44551946b39afdeebe0812c8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 16:17:04 +0200 Subject: Define a xinepostdir directory to point to the post-plugins path. Together with this, define a xinepost_LTLIBRARIES class that is used to install the post-plugins in the correct directory. Also add the rule to remove them. --- misc/Makefile.common | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'misc') diff --git a/misc/Makefile.common b/misc/Makefile.common index aa5ec1013..739ebb54e 100644 --- a/misc/Makefile.common +++ b/misc/Makefile.common @@ -5,6 +5,8 @@ xineincludedir = $(includedir)/xine xineplugdir = $(XINE_PLUGINDIR) xineplug_ldflags = $(NOUNDEF) -avoid-version -module +xinepostdir = $(XINE_PLUGINDIR)/post + $(XINE_LIB): @cd $(top_srcdir)/src/xine-engine && $(MAKE) @@ -54,6 +56,11 @@ uninstall-hook: echo " rm -f $(DESTDIR)$(xineplugdir)/$$p"; \ rm -f $(DESTDIR)$(xineplugdir)/$$p; \ done; + @list='$(xinepost_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(xinepostdir)/$$p"; \ + rm -f $(DESTDIR)$(xinepostdir)/$$p; \ + done; mostlyclean-generic: -rm -f *~ \#* .*~ .\#* -- cgit v1.2.3 From 8d13033d6c84109fff3d2788d9bb844462ad6b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 16:18:25 +0200 Subject: Similarly, add a vidix_LTLIBRARIES class to install the vidix drivers in the correct location. --- misc/Makefile.common | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'misc') diff --git a/misc/Makefile.common b/misc/Makefile.common index 739ebb54e..357c19666 100644 --- a/misc/Makefile.common +++ b/misc/Makefile.common @@ -6,6 +6,7 @@ xineplugdir = $(XINE_PLUGINDIR) xineplug_ldflags = $(NOUNDEF) -avoid-version -module xinepostdir = $(XINE_PLUGINDIR)/post +vidixdir = $(XINE_PLUGINDIR)/vidix $(XINE_LIB): @cd $(top_srcdir)/src/xine-engine && $(MAKE) @@ -61,6 +62,11 @@ uninstall-hook: echo " rm -f $(DESTDIR)$(xinepostdir)/$$p"; \ rm -f $(DESTDIR)$(xinepostdir)/$$p; \ done; + @list='$(vidix_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(vidixdir)/$$p"; \ + rm -f $(DESTDIR)$(vidixdir)/$$p; \ + done; mostlyclean-generic: -rm -f *~ \#* .*~ .\#* -- cgit v1.2.3 From 8a843e03d0cbdf532f9820e475cff1238b114bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 16:24:09 +0200 Subject: Properly use chcon over only xineplug and xinepost libraries. This reduces the number of objects that are allowed to contain TEXT section relocations (skipping for instance libxine and the vidix drivers). This is still suboptimal because only those plugins that actually contains text relocation should be allowed to contain them (that is what is done with IMPURE_TEXT_LDFLAGS for Solaris and Darwin). --- misc/Makefile.common | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'misc') diff --git a/misc/Makefile.common b/misc/Makefile.common index 357c19666..3bae6f001 100644 --- a/misc/Makefile.common +++ b/misc/Makefile.common @@ -18,14 +18,18 @@ install-data-hook: fi; \ fi; \ if test -x /usr/bin/chcon -a "`id -u`" -eq 0; then \ - list='$(lib_LTLIBRARIES)'; \ - if test -n "$$list" ; then \ + list='$(xineplug_LTLIBRARIES)'; \ for p in $$list; do \ p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \ - echo " chcon system_u:object_r:texrel_shlib_t $(DESTDIR)$(libdir)/$$p"; \ - chcon system_u:object_r:texrel_shlib_t $(DESTDIR)$(libdir)/$$p || :; \ + echo " chcon system_u:object_r:texrel_shlib_t $(DESTDIR)$(xineplugdir)/$$p"; \ + chcon system_u:object_r:texrel_shlib_t $(DESTDIR)$(xineplugdir)/$$p || :; \ + done; \ + list='$(xinepost_LTLIBRARIES)'; \ + for p in $$list; do \ + p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \ + echo " chcon system_u:object_r:texrel_shlib_t $(DESTDIR)$(xinepostdir)/$$p"; \ + chcon system_u:object_r:texrel_shlib_t $(DESTDIR)$(xinepostdir)/$$p || :; \ done; \ - fi; \ fi pass1: -- cgit v1.2.3 From 3445cc5bf8d58dc0fa34eb0e5d12b83617670fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 17:07:37 +0200 Subject: Now that all plugins install using xineplug_LTLIBRARIES, avoid grepping libdir for plugins installation. With this change, it avoids running an egrep command for every directory at uninstall time; the for has way less impact as the list can just be empty. --- misc/Makefile.common | 7 ------- 1 file changed, 7 deletions(-) (limited to 'misc') diff --git a/misc/Makefile.common b/misc/Makefile.common index 3bae6f001..d23ea5b5e 100644 --- a/misc/Makefile.common +++ b/misc/Makefile.common @@ -49,13 +49,6 @@ install-debug: debug $(MAKE) $(AM_MAKEFLAGS) install-data-hook uninstall-hook: - @if echo '$(libdir)' | egrep ^'$(XINE_PLUGINDIR)' >/dev/null; then \ - list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \ - echo " rm -f $(DESTDIR)$(libdir)/$$p"; \ - rm -f $(DESTDIR)$(libdir)/$$p; \ - done; \ - fi @list='$(xineplug_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(xineplugdir)/$$p"; \ -- cgit v1.2.3