[PC-BSD Commits] r19330 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Tue Sep 18 10:47:23 PDT 2012
Author: kris
Date: 2012-09-18 17:47:23 +0000 (Tue, 18 Sep 2012)
New Revision: 19330
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Make the handling of our icons a bit smarter, keep built-in icons from
a target port / PBI, don't auto-prune them along with all the dep icons
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-09-18 16:31:24 UTC (rev 19329)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-09-18 17:47:23 UTC (rev 19330)
@@ -1349,6 +1349,7 @@
PBI_INS_MENUSCRIPT="install-menu-icons.sh"
PBI_INS_MIMESCRIPT="install-mime.sh"
PBI_INS_PATHSCRIPT="install-pathlinks.sh"
+ PBI_ICDIR="pbi-shared-icons"
PBI_LISTREPO_UP=""
PBI_LISTREPO_DOWN=""
PBI_LISTREPO_MIRROR=""
@@ -3438,8 +3439,10 @@
clean_stage_dir
mk_extlink_entries
+ clean_icons_dir
mk_xdg_scripts
+
mk_install_script
mk_deinstall_script
@@ -3555,6 +3558,17 @@
if [ -z "$src" -o -z "$tar" ] ; then continue ; fi
+ # Check if this is an icon we need to preserve
+ echo $src | grep -q "^share/icons/"
+ if [ $? -eq 0 -a "${PBI_USESYSFONTS}" != "NO" ] ; then
+ iDir=`dirname $src`
+ if [ ! -d "${PBI_STAGEDIR}/${PBI_ICDIR}/${iDir}" ] ; then
+ mkdir -p "${PBI_STAGEDIR}/${PBI_ICDIR}/${iDir}"
+ fi
+ cp "${PBI_STAGEDIR}/${src}" "${PBI_STAGEDIR}/${PBI_ICDIR}/${iDir}"
+ src="${PBI_ICDIR}/${src}"
+ fi
+
if [ ! -e "${PBI_STAGEDIR}/$src" ] ; then
echo "WARN: external_link target: \"$src -> $tar $act\" does not exist!"
continue
@@ -3963,6 +3977,13 @@
fi
}
+# See if we need to clean the icons dir
+clean_icons_dir() {
+ if [ "${PBI_USESYSFONTS}" != "NO" ] ; then
+ rm -rf ${PBI_STAGEDIR}/share/icons >/dev/null 2>/dev/null
+ fi
+}
+
# See if we need to clean the stagedir
clean_stage_dir() {
if [ "${PBI_USESYSGL}" != "NO" ] ; then
@@ -3974,7 +3995,6 @@
rm -rf ${PBI_STAGEDIR}/etc/fonts >/dev/null 2>/dev/null
rm -rf ${PBI_STAGEDIR}/lib/X11/fonts >/dev/null 2>/dev/null
rm -rf ${PBI_STAGEDIR}/lib/X11/icons >/dev/null 2>/dev/null
- rm -rf ${PBI_STAGEDIR}/share/icons >/dev/null 2>/dev/null
fi
}
More information about the Commits
mailing list