[rkward-cvs] SF.net SVN: rkward-code:[4571] trunk/rkward/macports

m-eik at users.sf.net m-eik at users.sf.net
Thu Mar 7 16:18:22 UTC 2013


Revision: 4571
          http://sourceforge.net/p/rkward/code/4571
Author:   m-eik
Date:     2013-03-07 16:18:22 +0000 (Thu, 07 Mar 2013)
Log Message:
-----------
MacPorts: trying to strip down the bundle size by lowering the dependencies. the bundle script now also helps rebuilding everything from scratch.

Modified Paths:
--------------
    trunk/rkward/macports/kde/rkward/Portfile
    trunk/rkward/macports/update_bundle.sh

Modified: trunk/rkward/macports/kde/rkward/Portfile
===================================================================
--- trunk/rkward/macports/kde/rkward/Portfile	2013-03-07 16:11:20 UTC (rev 4570)
+++ trunk/rkward/macports/kde/rkward/Portfile	2013-03-07 16:18:22 UTC (rev 4571)
@@ -4,7 +4,7 @@
 PortSystem          1.0
 fetch.type          svn
 svn.url             http://svn.code.sf.net/p/rkward/code/trunk
-svn.revision        4494
+#svn.revision        4494
 worksrcdir          ${workpath}/trunk/rkward
 
 name                rkward-devel
@@ -25,10 +25,18 @@
 master_sites        https://sourceforge.net/projects/rkward/files/Current_Stable_Releases
 
 PortGroup           cmake 1.0
-depends_lib         port:kde4-baseapps \
+# depends_lib         port:kde4-baseapps \
+#                    port:kate \
+#                    port:R
+depends_lib         port:kdelibs4 \
                     port:kate \
                     port:R
 
+# add port:okular once the graphics device is fully functional
+variant okular description {Add okular for nice PDF handling} {
+        depends_lib-append port:okular
+}
+
 if {${configure.compiler} == "clang"} {
         configure.compiler llvm-gcc-4.2
 }

Modified: trunk/rkward/macports/update_bundle.sh
===================================================================
--- trunk/rkward/macports/update_bundle.sh	2013-03-07 16:11:20 UTC (rev 4570)
+++ trunk/rkward/macports/update_bundle.sh	2013-03-07 16:18:22 UTC (rev 4571)
@@ -9,25 +9,29 @@
 PTARGET=rkward-devel
 # specify local public directory
 LPUBDIR=~/Public/rkward
+OLDWD=$(pwd)
 
 if [[ $1 == "" ]] ; then
  echo "Usage: update_bundle.sh OPTION
           OPTIONS:
            -D (build target rkward instead of rkward-devel)
+           -X <MacPorts version> (completely!!! wipe ${MPTINST} and do an all fresh installation)
            -f (full -- all of the below)
+           -l (remove static port libraries)
            -p (update macports, remove inactive)
            -r (update port ${PTARGET})
            -m (create .mdmg of ${PTARGET})
            -s (create sources .tar)
            -c (copy .mdmg and src.tar to ${LPUBDIR}, if created)
-           -x (completely!!! wipe \$MACPORTS/var/macports/distfiles)"
+           -x (completely!!! wipe ${MPTINST}/var/macports/distfiles)"
 fi
 
 # get the options
-while getopts ":Dfprmscx" OPT; do
+while getopts ":DflprmscxX:" OPT; do
   case $OPT in
     D) PTARGET=rkward >&2 ;;
     f)
+       RMSTLIBS=TRUE >&2
        UPMPORTS=TRUE >&2
        UPRKWARD=TRUE >&2
        MAKEMDMD=TRUE >&2
@@ -35,12 +39,17 @@
        COPYMDMD=TRUE >&2
        WIPEDSTF=TRUE >&2
        ;;
+    l) RMSTLIBS=TRUE >&2 ;;
     p) UPMPORTS=TRUE >&2 ;;
     r) UPRKWARD=TRUE >&2 ;;
     m) MAKEMDMD=TRUE >&2 ;;
     s) MKSRCTAR=TRUE >&2 ;;
     c) COPYMDMD=TRUE >&2 ;;
     x) WIPEDSTF=TRUE >&2 ;;
+    X)
+       WIPEDSTF=FALSE >&2
+       MCPVERS=$OPTARG >&2
+       WIPEINST=TRUE >&2 ;;
     \?)
       echo "Invalid option: -$OPTARG" >&2
       exit 1
@@ -52,11 +61,42 @@
   esac
 done
 
+
+# do a full clean installation, remove MacPorts completely
+if [[ $WIPEINST ]] ; then
+  echo "removing ${MPTINST}..."
+  sudo rm -rf ${MPTINST} || exit 1
+  echo "creating ${MPTINST}..."
+  sudo mkdir -p ${MPTINST} || exit 1
+  mkdir /tmp/MP && cd /tmp/MP
+  curl "https://distfiles.macports.org/MacPorts/MacPorts-${MCPVERS}.tar.bz2" -o "MacPorts-${MCPVERS}.tar.bz2" || exit 1
+  tar xjvf "MacPorts-${MCPVERS}.tar.bz2" || exit 1
+  cd "MacPorts-${MCPVERS}" || exit 1
+  ./configure --prefix=${MPTINST}  || exit 1
+  make || exit 1
+  sudo make install || exit 1
+  cd $OLDWD || exit 1
+  rm -rf /tmp/MP || exit 1
+  sudo port -v selfupdate || exit 1
+  sudo port install subversion || exit 1
+  ## NOTE: there is some serious trouble with port:p5.12-locale-gettext which hasn't been fixed in months
+  ## a workaround, if you run into it:
+  ##   sudo port edit p5.12-locale-gettext
+  ## and append 
+  ##   configure.cc cc -L/opt/local/lib -I/opt/local/include -arch x86_64
+  ## to the portfile
+  echo "adding local portfiles to ${MPTINST}/etc/macports/sources.conf..."
+  sudo sed -i -e "s+rsync://rsync.macports.org.*\[default\]+file://${SRCPATH}/\\`echo -e '\n\r'`&+" ${MPTINST}/etc/macports/sources.conf || exit 1
+  sudo port -v selfupdate || exit 1
+  echo "successfully completed reincarnation of ${MPTINST}!"
+fi
+
 # prepare for a clean installation, remove all cached sources
 if [[ $WIPEDSTF ]] ; then
   sudo rm -rf ${MPTINST}/var/macports/distfiles/*
 fi
 
+
 # update installed ports
 if [[ $UPMPORTS ]] ; then
   sudo port selfupdate
@@ -77,6 +117,11 @@
   sudo port -v install $PTARGET
 fi
 
+# remove static libraries, they're a waste of disk space
+if [[ $RMSTLIBS ]] ; then
+  sudo rm ${MPTINST}/lib/*.a
+fi
+
 # set some variables
 if [[ $COPYMDMD ]] ; then
   # get version information of installed ports





More information about the rkward-tracker mailing list