[87321] trunk/dports/_resources/port1.0/group/php5pear-1.0.tcl

pixilla at macports.org pixilla at macports.org
Wed Nov 16 18:10:47 PST 2011


Revision: 87321
          http://trac.macports.org/changeset/87321
Author:   pixilla at macports.org
Date:     2011-11-16 18:10:46 -0800 (Wed, 16 Nov 2011)
Log Message:
-----------
_resources/port1.0/group/php5pear-1.0.tcl:
- Add mode line.
- Whitespace change to standard 4 spaces per tab.

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/php5pear-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/php5pear-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/php5pear-1.0.tcl	2011-11-17 01:26:28 UTC (rev 87320)
+++ trunk/dports/_resources/port1.0/group/php5pear-1.0.tcl	2011-11-17 02:10:46 UTC (rev 87321)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 # 
 # Copyright (c) 2011 The MacPorts Project
@@ -57,144 +58,146 @@
 options php5pear.packagexml
 
 proc php5pear.setup {php5pear.package version {php5pear.channel "pear.php.net"} {php5pear.packagexml "package.xml"}} {
-  global worksrcpath distname extract.suffix master_sites prefix destroot distpath
-  global php5pear.cmd-pre php5pear.cmd-pear php5pear.cmd-phar php5pear.cmd-php php5pear.cmd-post
-  global php5pear.cmd php5pear.instpath php5pear.pearpath
-  global php5pear.installer name php5pear.sourceroot
-
-  # The pear name for the package.
-  php5pear.package    ${php5pear.package}
-  # The pear channel for the package.
-  php5pear.channel    ${php5pear.channel}
-  # The name of the package's xml file used by pear to build the package.
-  # Note: so far the two known names are package.xml and package2.xml.
-  php5pear.packagexml ${php5pear.packagexml}
-
-  name                pear-${php5pear.package}
-  version             ${version}
-  categories          php
-  distname            ${php5pear.package}-${version}
-  extract.suffix      .tgz
-  homepage            http://${php5pear.channel}/package/${php5pear.package}
-  master_sites        http://${php5pear.channel}/get
-  livecheck.type      regex
-  livecheck.url       http://${php5pear.channel}/package/${php5pear.package}/download
-  livecheck.regex     "http://download.${php5pear.channel}/package/${php5pear.package}-((?!\.tgz).*)${extract.suffix}"
-
-  dist_subdir         pear
-  supported_archs     noarch
-  use_parallel_build  yes
-  depends_lib         path:bin/phpize:php5 port:php5-pear
-  
-  # List of ports that pear-PEAR depends on.
-  if {
-    ${name} != "pear-Archive_Tar" &&
-    ${name} != "pear-Console_Getopt" &&
-    ${name} != "pear-Structures_Graph" &&
-    ${name} != "pear-XML_Util" &&
-    ${name} != "pear-PEAR"
-  } {
-    depends_lib-append    port:pear-PEAR
-  }
-
-  # Where the pear installer is installed for each port.
-  php5pear.installer  ${worksrcpath}/installer
-  # The base paths for our pear.conf.
-  php5pear.instpath   ${prefix}/lib/php
-  php5pear.pearpath   ${php5pear.instpath}/pear
-  # Where we expand our source files.
-  php5pear.sourceroot ${worksrcpath}/packagesource    
-  # Where we instruct pear to install our package.
-  php5pear.destroot   ${worksrcpath}/packagingroot    
-
-  # The pear command we will use.
-  php5pear.cmd-pear   ${php5pear.installer}/bin/pear
-  # The phar file that contains our pear installer.
-  php5pear.cmd-phar   ${prefix}/lib/php/pear/install-pear-nozlib.phar
-  # The php binary we will use.
-  php5pear.cmd-php    ${prefix}/bin/php
-  # Args placed before the php or pear commands.
-  php5pear.cmd-pre    cd ${php5pear.sourceroot} && TZ=UTC \
-                      PHP_PEAR_INSTALL_DIR=${php5pear.installer}/pear \
-                      PHP_PEAR_BIN_DIR=${php5pear.installer}/bin \
-                      PHP_PEAR_PHP_BIN=${php5pear.cmd-php} \
-                      PHP_PEAR_CFG_DIR=${php5pear.installer}/pear/cfg \
-                      PHP_PEAR_DOC_DIR=${php5pear.installer}/pear/docs \
-                      PHP_PEAR_DATA_DIR=${php5pear.installer}/pear/data \
-                      PHP_PEAR_WWW_DIR=${php5pear.installer}/pear/www \
-                      PHP_PEAR_TEST_DIR=${php5pear.installer}/pear/tests \
-                      PHP_PEAR_SYSCONF_DIR=${php5pear.installer}
-  # Args placed after php or pear commands.
-  php5pear.cmd-post   -c ${php5pear.installer}/pear.conf \
-                      -C ${php5pear.installer}/pear.conf
-  
-  extract.mkdir       yes
-  extract.post_args   "| tar --strip-components 1 -x -f - -C '${php5pear.sourceroot}'"
-
-  pre-extract {
-    xinstall -d ${php5pear.sourceroot}
-  }
-
-  post-extract {
-    # Get the name of our package xml file.
-    php5pear.packagexml [lindex [exec tar -tzf ${distpath}/${distname}${extract.suffix} | grep package.*\.xml] 0]
-    # The "--strip-components 1" causes the loss of our package file so we will extract it now.
-    system "tar -z -x -v -f '${distpath}/${distname}${extract.suffix}' - -C '${php5pear.sourceroot}' ${php5pear.packagexml}"
-    # Install the pear command using the phar file.
-    system "${php5pear.cmd-pre} ${php5pear.cmd-php} ${php5pear.cmd-phar}"
-  }
-
-  post-patch {
-    # Some ports use a "." baseinstalldir which can cause issues creating pears packagingroot directory.
-    reinplace "s|baseinstalldir=\"\.\"|baseinstalldir=\"/\"|g" \
-      ${php5pear.sourceroot}/${php5pear.packagexml}
-  }
-
-  configure {
-    # Set up pear's conf file.
-    # The order appears to be important; we get errors if we set php_dir before adding channels
-    # and the directory is not writable.
-    xinstall -d "${php5pear.installer}/pear/php"
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set auto_discover 1"
-    if { "${php5pear.channel}" != "pear.php.net" } {
-      system "curl -s http://${php5pear.channel}/channel.xml -o ${worksrcpath}/channel.xml"
-      system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} channel-add ${worksrcpath}/channel.xml"
-      system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set default_channel ${php5pear.channel}"
+    global worksrcpath distname extract.suffix master_sites prefix destroot distpath
+    global php5pear.cmd-pre php5pear.cmd-pear php5pear.cmd-phar php5pear.cmd-php php5pear.cmd-post
+    global php5pear.cmd php5pear.instpath php5pear.pearpath
+    global php5pear.installer name php5pear.sourceroot
+    
+    # The pear name for the package.
+    php5pear.package    ${php5pear.package}
+    # The pear channel for the package.
+    php5pear.channel    ${php5pear.channel}
+    # The name of the package's xml file used by pear to build the package.
+    # Note: so far the two known names are package.xml and package2.xml.
+    php5pear.packagexml ${php5pear.packagexml}
+    
+    name                pear-${php5pear.package}
+    version             ${version}
+    categories          php
+    distname            ${php5pear.package}-${version}
+    extract.suffix      .tgz
+    homepage            http://${php5pear.channel}/package/${php5pear.package}
+    master_sites        http://${php5pear.channel}/get
+    livecheck.type      regex
+    livecheck.url       http://${php5pear.channel}/package/${php5pear.package}/download
+    livecheck.regex     "http://download.${php5pear.channel}/package/${php5pear.package}-((?!\.tgz).*)${extract.suffix}"
+    
+    dist_subdir         pear
+    supported_archs     noarch
+    use_parallel_build  yes
+    depends_lib         path:bin/phpize:php5 port:php5-pear
+    
+    # List of ports that pear-PEAR depends on.
+    if {
+        ${name} != "pear-Archive_Tar" &&
+        ${name} != "pear-Console_Getopt" &&
+        ${name} != "pear-Structures_Graph" &&
+        ${name} != "pear-XML_Util" &&
+        ${name} != "pear-PEAR"
+    } {
+        depends_lib-append    port:pear-PEAR
     }
-    # Change the install directories to the final destinations
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set php_dir ${php5pear.pearpath}"
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set bin_dir ${php5pear.pearpath}/bin"
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set doc_dir ${php5pear.pearpath}/docs"
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set data_dir ${php5pear.pearpath}/data"
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set www_dir ${php5pear.pearpath}/www"
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set test_dir ${php5pear.pearpath}/tests"
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-show"
-  }
-  
-  build {
-    # Get the name of our package xml file.
-    php5pear.packagexml [lindex [exec tar -tzf ${distpath}/${distname}${extract.suffix} | grep package.*\.xml] 0]
-    # Install our package into our pear's packagingroot.
-    system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} install -n -f -P '${php5pear.destroot}' ${php5pear.packagexml}"
-  }
-  
-  destroot {
-    copy ${php5pear.destroot}${php5pear.instpath} ${destroot}${prefix}/lib
-    # Remove all invisible "dot" files.
-    fs-traverse -ignoreErrors item "${destroot}${php5pear.instpath}" {
-      if {[string first . [file tail ${item}] 0] == 0} {
-        # Using system rm because I could not find a way to delete dot files with [file delete].
-        system "rm -R ${item}"
-      }
+    
+    # Where the pear installer is installed for each port.
+    php5pear.installer  ${worksrcpath}/installer
+    # The base paths for our pear.conf.
+    php5pear.instpath   ${prefix}/lib/php
+    php5pear.pearpath   ${php5pear.instpath}/pear
+    # Where we expand our source files.
+    php5pear.sourceroot ${worksrcpath}/packagesource    
+    # Where we instruct pear to install our package.
+    php5pear.destroot   ${worksrcpath}/packagingroot    
+    
+    # The pear command we will use.
+    php5pear.cmd-pear   ${php5pear.installer}/bin/pear
+    # The phar file that contains our pear installer.
+    php5pear.cmd-phar   ${prefix}/lib/php/pear/install-pear-nozlib.phar
+    # The php binary we will use.
+    php5pear.cmd-php    ${prefix}/bin/php
+    # Args placed before the php or pear commands.
+    php5pear.cmd-pre \
+        cd ${php5pear.sourceroot} && \
+        TZ=UTC \
+        PHP_PEAR_INSTALL_DIR=${php5pear.installer}/pear \
+        PHP_PEAR_BIN_DIR=${php5pear.installer}/bin \
+        PHP_PEAR_PHP_BIN=${php5pear.cmd-php} \
+        PHP_PEAR_CFG_DIR=${php5pear.installer}/pear/cfg \
+        PHP_PEAR_DOC_DIR=${php5pear.installer}/pear/docs \
+        PHP_PEAR_DATA_DIR=${php5pear.installer}/pear/data \
+        PHP_PEAR_WWW_DIR=${php5pear.installer}/pear/www \
+        PHP_PEAR_TEST_DIR=${php5pear.installer}/pear/tests \
+        PHP_PEAR_SYSCONF_DIR=${php5pear.installer}
+    # Args placed after php or pear commands.
+    php5pear.cmd-post \
+        -c ${php5pear.installer}/pear.conf \
+        -C ${php5pear.installer}/pear.conf
+    
+    extract.mkdir       yes
+    extract.post_args   "| tar --strip-components 1 -x -f - -C '${php5pear.sourceroot}'"
+    
+    pre-extract {
+        xinstall -d ${php5pear.sourceroot}
     }
-    if { [file exists "${destroot}${php5pear.pearpath}/generate_package_xml.php"] } {
-      # Some pear packages contain package creation files so we remove them.
-      delete "${destroot}${php5pear.pearpath}/generate_package_xml.php"
+    
+    post-extract {
+        # Get the name of our package xml file.
+        php5pear.packagexml [lindex [exec tar -tzf ${distpath}/${distname}${extract.suffix} | grep package.*\.xml] 0]
+        # The "--strip-components 1" causes the loss of our package file so we will extract it now.
+        system "tar -z -x -v -f '${distpath}/${distname}${extract.suffix}' - -C '${php5pear.sourceroot}' ${php5pear.packagexml}"
+        # Install the pear command using the phar file.
+        system "${php5pear.cmd-pre} ${php5pear.cmd-php} ${php5pear.cmd-phar}"
     }
-    if { [file exists "${destroot}${php5pear.pearpath}/package.php"] } {
-      # Some pear packages contain package creation files so we remove them.
-      delete "${destroot}${php5pear.pearpath}/package.php"
+    
+    post-patch {
+        # Some ports use a "." baseinstalldir which can cause issues creating pears packagingroot directory.
+        reinplace "s|baseinstalldir=\"\.\"|baseinstalldir=\"/\"|g" \
+          ${php5pear.sourceroot}/${php5pear.packagexml}
     }
-  }
-  
+    
+    configure {
+        # Set up pear's conf file.
+        # The order appears to be important; we get errors if we set php_dir before adding channels
+        # and the directory is not writable.
+        xinstall -d "${php5pear.installer}/pear/php"
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set auto_discover 1"
+        if { "${php5pear.channel}" != "pear.php.net" } {
+            system "curl -s http://${php5pear.channel}/channel.xml -o ${worksrcpath}/channel.xml"
+            system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} channel-add ${worksrcpath}/channel.xml"
+            system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set default_channel ${php5pear.channel}"
+        }
+        # Change the install directories to the final destinations
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set php_dir ${php5pear.pearpath}"
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set bin_dir ${php5pear.pearpath}/bin"
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set doc_dir ${php5pear.pearpath}/docs"
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set data_dir ${php5pear.pearpath}/data"
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set www_dir ${php5pear.pearpath}/www"
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-set test_dir ${php5pear.pearpath}/tests"
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} config-show"
+    }
+    
+    build {
+        # Get the name of our package xml file.
+        php5pear.packagexml [lindex [exec tar -tzf ${distpath}/${distname}${extract.suffix} | grep package.*\.xml] 0]
+        # Install our package into our pear's packagingroot.
+        system "${php5pear.cmd-pre} ${php5pear.cmd-pear} ${php5pear.cmd-post} install -n -f -P '${php5pear.destroot}' ${php5pear.packagexml}"
+    }
+    
+    destroot {
+        copy ${php5pear.destroot}${php5pear.instpath} ${destroot}${prefix}/lib
+        # Remove all invisible "dot" files.
+        fs-traverse -ignoreErrors item "${destroot}${php5pear.instpath}" {
+            if {[string first . [file tail ${item}] 0] == 0} {
+                # Using system rm because I could not find a way to delete dot files with [file delete].
+                system "rm -R ${item}"
+            }
+        }
+        if { [file exists "${destroot}${php5pear.pearpath}/generate_package_xml.php"] } {
+            # Some pear packages contain package creation files so we remove them.
+            delete "${destroot}${php5pear.pearpath}/generate_package_xml.php"
+        }
+        if { [file exists "${destroot}${php5pear.pearpath}/package.php"] } {
+            # Some pear packages contain package creation files so we remove them.
+            delete "${destroot}${php5pear.pearpath}/package.php"
+        }
+    }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111116/adc8bb72/attachment-0001.html>


More information about the macports-changes mailing list