[PC-BSD Commits] r19667 - in pcbsd/current/src-sh/pbi-manager: . wrapper

svn at pcbsd.org svn at pcbsd.org
Mon Oct 15 07:19:52 PDT 2012


Author: kris
Date: 2012-10-15 14:19:52 +0000 (Mon, 15 Oct 2012)
New Revision: 19667

Modified:
   pcbsd/current/src-sh/pbi-manager/install.sh
   pcbsd/current/src-sh/pbi-manager/pbi-manager
   pcbsd/current/src-sh/pbi-manager/wrapper/Makefile
Log:

Fix some bugs creating i386 PBIs on 64bit, make sure we create a special i386 wrapper
binary for them during install time



Modified: pcbsd/current/src-sh/pbi-manager/install.sh
===================================================================
--- pcbsd/current/src-sh/pbi-manager/install.sh	2012-10-15 13:55:33 UTC (rev 19666)
+++ pcbsd/current/src-sh/pbi-manager/install.sh	2012-10-15 14:19:52 UTC (rev 19667)
@@ -84,7 +84,26 @@
 
 # Create the wrapper binary
 cd ${DIR}/wrapper
+if [ `uname -m` = "amd64" ] ; then
+  # Build 32bit wrapper
+  echo "Building i386 wrapper..."
+  rm .pbiwrapper >/dev/null 2>/dev/null
+  make clean
+  make DEFINES="-mtune=i386 -march=i386 -m32"
+  make install
+  chown root:wheel /usr/pbi/.pbiwrapper 
+  chmod 644 /usr/pbi/.pbiwrapper
+  mv /usr/pbi/.pbiwrapper /usr/pbi/.pbiwrapper-i386
+fi
+
+# Build system arch wrapper
+echo "Building `uname -m` wrapper..."
+DEFINES=""
+export DEFINES
+rm .pbiwrapper >/dev/null 2>/dev/null
 make clean
-make install
+make DEFINES=""
+make install DEFINES=""
 chown root:wheel /usr/pbi/.pbiwrapper 
 chmod 644 /usr/pbi/.pbiwrapper
+mv /usr/pbi/.pbiwrapper /usr/pbi/.pbiwrapper-`uname -m`

Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-10-15 13:55:33 UTC (rev 19666)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-10-15 14:19:52 UTC (rev 19667)
@@ -1317,7 +1317,7 @@
   	FBSDREL=`uname -r`
 	FBSDMAJOR=${FBSDREL%%.*}
 
-	PBI_WRAPPERFILE="${PBI_APPDIR}/.pbiwrapper"
+	PBI_WRAPPERFILE="${PBI_APPDIR}/.pbiwrapper-$ARCH"
 	PBI_CHROOTFILE="${PBI_APPDIR}/.pbi-world-$ARCH.txz"
 	if [ `id -u` = "0" ] ; then 
 		PBI_HASHDIR="${PBI_APPDIR}/.hashdir"

Modified: pcbsd/current/src-sh/pbi-manager/wrapper/Makefile
===================================================================
--- pcbsd/current/src-sh/pbi-manager/wrapper/Makefile	2012-10-15 13:55:33 UTC (rev 19666)
+++ pcbsd/current/src-sh/pbi-manager/wrapper/Makefile	2012-10-15 14:19:52 UTC (rev 19667)
@@ -10,7 +10,7 @@
 CFLAGS        = -pipe -O2 -Wall -W $(DEFINES)
 CXXFLAGS      = -pipe -O2 -Wall -W $(DEFINES)
 INCPATH       = -I/usr/local/include -I. -I/usr/local/include
-LFLAGS        = -Wl,-O1
+LFLAGS        = -Wl,-O1 $(DEFINES)
 LIBS          = $(SUBLIBS)
 AR            = ar cqs
 RANLIB        = 



More information about the Commits mailing list