[MacPorts] #21955: gtkmm does not build

MacPorts noreply at macports.org
Thu Oct 22 01:24:43 PDT 2009


#21955: gtkmm does not build
----------------------------+-----------------------------------------------
 Reporter:  hwr@…           |       Owner:  devans@…           
     Type:  defect          |      Status:  new                
 Priority:  Normal          |   Milestone:                     
Component:  ports           |     Version:  1.8.1              
 Keywords:                  |        Port:  gtkmm              
----------------------------+-----------------------------------------------

Comment(by wf@…):

 Some investigation later this script seems to work. May be this could be a
 basis for getting similar tickets applied for novices and other people:

 {{{
 #
 # apply diff patches of macports ticket #21955
 # author wf (contact via http://www.bitplan.com)
 # 2009-10-22
 # License: Public domain

 #
 # check the availability of a user specific Local Portfile repository
 # see 4.6 of http://guide.macports.org
 #
 checksourcesconf() {
         # get the sources conf
         echo "looking for sources.conf .."
         sourcesconf=`locate macports/sources.conf`
         echo "found $sourcesconf"
         echo "looking for local portfile repository in $HOME"
         localrep=`grep $HOME $sourcesconf`
         echo "found $localrep"
         expectedrep="file://"$HOME"/ports"
         if [ "$localrep" = "$expectedrep" ]
         then
           echo "good ..."
         else
           echo "you might want to add $expectedrep to $sourcesconf as
 outlined in 4.6 Local Portfile Repositories of http://guide.macports.org"
                 exit 1
         fi
 }

 #
 # get the relative path of a portfile starting from "release" e.g.
 #
 getRelativePath() {
         # get relative path
         echo $1  | awk '
          # split with path separator
          BEGIN { FS="/";docollect=0 }
          {
            # loop over path parts
            for (i=1;i<NF;i++) {
                    # when collection is active
                    if (docollect) {
          path=path delim $i
                                  delim="/"
                          }
                    if ($i=="release")
                            docollect=1
            }
                  print path
          }'
 }

 # do we have a local portfile repository?
 checksourcesconf
 # install wget (if not done yet)
 echo "installing wget with sudo port install wget"
 sudo port install wget
 # base url for the three attachments
 base="https://trac.macports.org/raw-attachment/ticket/21955"
 # get the current directory
 current=`pwd`
 # example url
 #  https://trac.macports.org/raw-attachment/ticket/21955/Portfile-
 glibmm.diff
 # get the three libraries
 for lib in gtkmm glibmm pangomm
 do
   # go back to directory where we started
   cd $current
         # the patch file we are looking for
   patch=Portfile-$lib.diff
         # check whether it's already there
   if [ -f $patch ]
         then
           echo "portfile patch $patch already downloaded"
         else
           echo "getting portfile patch $patch"
     wget --no-check-certificate  $base/$patch
         fi
         # apply patch to the given portfile by putting the patch
         # in the local repository
         # get the portfile
   portfile=`locate $lib/Portfile | grep -v old`
         # if we found a portfile
         if [ "$portfile" = "" ]
         then
           echo "could not find original portfile for $lib"
         else
           echo "extracting relative path from $portfile"
           relpath=`getRelativePath $portfile`
                 echo "found $relpath"
                 echo "creating $relpath in $HOME if it does not exist yet"
                 if [ -d $HOME/$relpath ]
                 then
                   echo "$HOME/relpath already exists ... good"
           else
                 echo "creating local repository path $relpath"
                 mkdir -p $HOME/$relpath
                 fi
                 # copy the portfile and patch file
                 echo "preparing patch of portfile for $lib"
                 cp $portfile $HOME/$relpath
                 cp $current/$patch $HOME/$relpath
                 echo "patching portfile for $lib"
                 cd $HOME/$relpath
                 patch Portfile $patch
    echo "you may later try to install $lib with sudo port install $lib"
         fi
 done
 # recreate ports index
 echo "recreating ports index"
 cd $HOME/ports
 portindex
 # finished

 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/21955#comment:12>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list