[PC-BSD Commits] r3461 - in pbibuild/pbi-source: PBIsource PBItext

svn at pcbsd.org svn at pcbsd.org
Sun Feb 15 11:45:18 PST 2009


Author: kris
Date: 2009-02-15 11:45:17 -0800 (Sun, 15 Feb 2009)
New Revision: 3461

Modified:
   pbibuild/pbi-source/PBIsource/pbi.cpp
   pbibuild/pbi-source/PBItext/main.cpp
Log:

Updated the PBI installer to now be a bit more complete in setting LD_LIBRARY_PATH, and also cleanup the programs .sbin entries so they are more human-readable



Modified: pbibuild/pbi-source/PBIsource/pbi.cpp
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.cpp	2009-02-13 22:04:29 UTC (rev 3460)
+++ pbibuild/pbi-source/PBIsource/pbi.cpp	2009-02-15 19:45:17 UTC (rev 3461)
@@ -559,13 +559,23 @@
           QTextStream stream2( &file2 );
              stream2 << "#!/bin/sh\n";
              stream2 << "# Auto-Generated by PC-BSD\n";
-             stream2 << "PATH=\"/Programs/" + ProgDirName + "/bin:$PATH\"; export PATH\n";     
-             stream2 << "LANG=\"`grep ^Language= ~/.kde/share/config/kdeglobals | cut -d \"=\" -f2`\"; export LANG\n";     
-             stream2 << "XDG_DATA_DIRS=\"/Programs/" + ProgDirName + "/share:/Programs/" + ProgDirName + "/kde4/share:${XDG_DATA_DIRS}\"; export XDG_DATA_DIRS\n";     
+             stream2 << "PROGDIR=\"/Programs/" + ProgDirName + "\" ; export PROGDIR\n";     
+             stream2 << "PATH=\"${PROGDIR}/bin:$PATH\"; export PATH\n";     
+             stream2 << "LANG=\"`grep ^Language= ~/.kde4/share/config/kdeglobals | cut -d \"=\" -f2`\"; export LANG\n";     
+             stream2 << "XDG_DATA_DIRS=\"${PROGDIR}/share:${PROGDIR}/kde4/share:${XDG_DATA_DIRS}\"; export XDG_DATA_DIRS\n";     
 
              if ( LibDir == "Auto")
 	     {
-                   stream2 << "LD_LIBRARY_PATH=\"/Programs/" + ProgDirName + "/autolibs/:/Programs/" + ProgDirName + "/lib:/Programs/" + ProgDirName + "/kde4/lib\" ; export LD_LIBRARY_PATH\n";
+                   stream2 << "\n#Setup our LD_LIBRARY_PATH variable with all found lib dirs\n";
+                   stream2 << "LD_LIBRARY_PATH=\"${PROGDIR}/lib/:${PROGDIR}/kde4/lib\"\n";
+                   stream2 << "for i in `ls \"${PROGDIR}/lib\"`\n";
+                   stream2 << "do\n";
+                   stream2 << "  if [ -d \"${PROGDIR}/lib/${i}\" ]\n";
+                   stream2 << "  then\n";
+                   stream2 << "     LD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}:${PROGDIR}/lib/${i}\"\n";
+                   stream2 << "  fi\n";
+                   stream2 << "done\n";
+                   stream2 << "export LD_LIBRARY_PATH\n\n";
 	      } else if ( LibDir != "NONE" ) {
                    stream2 << "LD_LIBRARY_PATH=\"/Programs/" + ProgDirName + "/" + LibDir + "/\" ; export LD_LIBRARY_PATH\n"; 
               }

Modified: pbibuild/pbi-source/PBItext/main.cpp
===================================================================
--- pbibuild/pbi-source/PBItext/main.cpp	2009-02-13 22:04:29 UTC (rev 3460)
+++ pbibuild/pbi-source/PBItext/main.cpp	2009-02-15 19:45:17 UTC (rev 3461)
@@ -524,18 +524,28 @@
           QTextStream stream2( &file2 );
              stream2 << "#!/bin/sh\n";
              stream2 << "# Auto-Generated by PC-BSD\n";
-             stream2 << "PATH=\"/Programs/" + ProgDirName + "/bin:$PATH\"; export PATH\n";     
-	     stream2 << "LANG=\"`grep ^Language= ~/.kde/share/config/kdeglobals | cut -d \"=\" -f2`\"; export LANG\n";
-             stream2 << "XDG_DATA_DIRS=\"/Programs/" + ProgDirName + "/share:/Programs/" + ProgDirName + "/kde4/share:${XDG_DATA_DIRS}\"; export XDG_DATA_DIRS\n";
+             stream2 << "PROGDIR=\"/Programs/" + ProgDirName + "\" ; export PROGDIR\n";
+             stream2 << "PATH=\"${PROGDIR}/bin:$PATH\"; export PATH\n";
+             stream2 << "LANG=\"`grep ^Language= ~/.kde4/share/config/kdeglobals | cut -d \"=\" -f2`\"; export LANG\n";
+             stream2 << "XDG_DATA_DIRS=\"${PROGDIR}/share:${PROGDIR}/kde4/share:${XDG_DATA_DIRS}\"; export XDG_DATA_DIRS\n";
 
 
              if ( LibDir == "Auto")
-	     {
-	           stream2 << "LD_LIBRARY_PATH=\"/Programs/" + ProgDirName + "/autolibs/:/Programs/" + ProgDirName + "/lib:/Programs/" + ProgDirName + "/kde4/lib\" ; export LD_LIBRARY_PATH\n";
-	      } else if ( LibDir != "NONE" ) {
-                   stream2 << "LD_LIBRARY_PATH=\"/Programs/" + ProgDirName + "/" + LibDir + "/\" ; export LD_LIBRARY_PATH\n"; 
+             {
+                   stream2 << "\n#Setup our LD_LIBRARY_PATH variable with all found lib dirs\n";
+                   stream2 << "LD_LIBRARY_PATH=\"${PROGDIR}/lib/:${PROGDIR}/kde4/lib\"\n";
+                   stream2 << "for i in `ls \"${PROGDIR}/lib\"`\n";
+                   stream2 << "do\n";
+                   stream2 << "  if [ -d \"${PROGDIR}/lib/${i}\" ]\n";
+                   stream2 << "  then\n";
+                   stream2 << "     LD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}:${PROGDIR}/lib/${i}\"\n";
+                   stream2 << "  fi\n";
+                   stream2 << "done\n";
+                   stream2 << "export LD_LIBRARY_PATH\n\n";
+              } else if ( LibDir != "NONE" ) {
+                   stream2 << "LD_LIBRARY_PATH=\"/Programs/" + ProgDirName + "/" + LibDir + "/\" ; export LD_LIBRARY_PATH\n";
               }
-	
+
 	     
 	 if ( RunShell[i] == "1" )
 	{



More information about the Commits mailing list