[MacPorts] #42547: imake @1.0.5_1 Proposed fix for imake / clang inoperability

MacPorts noreply at macports.org
Thu Feb 27 08:50:44 PST 2014


#42547: imake @1.0.5_1 Proposed fix for imake / clang inoperability
------------------------+------------------------
  Reporter:  qbarnes@…  |      Owner:  mcalhoun@…
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.2.1
Resolution:             |   Keywords:  haspatch
      Port:  imake      |
------------------------+------------------------

Comment (by wf@…):

 Sounds wonderful. Please bare my ignorance - how do i get this patch
 working? I could patch the Portfile successfully. But how do I patch
 patch-imakemdep.h.diff given the patch that is a diff of imakemdep.h?

 Here is a script I started - it even attempts a local port repository -
 but i wouldn't know where to copy the files and what to do ...

 {{{
 #!/bin/bash
 # WF 2014-02-27

 # configure where you want to have your local port repository
 # see https://guide.macports.org/chunked/development.local-
 repositories.html
 ports=$HOME/ports

 # check where the port base directory is
 portdir=`which port`
 # e.g. /opt/local/bin/port
 portdir=`dirname $portdir`
 # e.g. /opt/local/bin
 portdir=`dirname $portdir`
 # e.g. /opt/local

 #
 #  autoinstall a cmd
 #   param1: the command
 #   param2: the port
 #
 #     e.g. autoinstall rcs rcs
 #
 autoinstall() {
   local l_cmd=$1
   local l_port=$2
   which $l_cmd
   if [ $? -ne 0 ]
   then
      sudo port install $l_port
   fi
 }


 #
 #  patch and diff
 #
 patchAndDiff() {
   local l_org=$1
   local l_patch=$2
   autoinstall rcs rcs
   if [ ! -d RCS ]
   then
     mkdir RCS
   fi
   ci -l $l_org
   patch  $l_org $l_patch
   rcsdiff $l_org
 }

 # show result
 echo "patching imake using port directory $portdir"
 if [ ! -d $ports ]
 then
   mkdir -p $ports
 fi

 # check that the local port repository has been configured
 sources=$portdir/etc/macports/sources.conf
 portrep="file://${ports}"
 grep "$portrep" $sources
 if [ $? -ne 0 ]
 then
   echo "missing $portrep in $sources" 1>&2
         echo "please edit $sources and rerun $0"
         exit 1
 fi

 cd $ports
 ticket=https://trac.macports.org/raw-attachment/ticket/42547
 for patch in patch-imakemdep.h.diff imake-Portfile.patch
 do
   if [ ! -f $patch ]
   then
     wget --no-check-certificate $ticket/$patch
   fi
 done

 # patch imake Portfile locally
 cp -p
 $portdir/var/macports/sources/rsync.macports.org/release/tarballs/ports/x11/imake/Portfile
 .
 patchAndDiff Portfile imake-Portfile.patch

 mv patch-imakemdep.h.diff p1
 cp -p
 $portdir/var/macports/sources/rsync.macports.org/release/tarballs/ports/x11/imake/files
 /patch-imakemdep.h.diff .
 #patchAndDiff

 sudo portindex
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/42547#comment:8>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list