Opened 14 years ago

Closed 13 years ago

#28377 closed defect (fixed)

Pear install

Reported by: oldmilwaukee33@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), miwi@…, pixilla (Bradley Giesbrecht)
Port:

Description

I don't see Pear as a portfile. If I download Pear via Pear's install instructions, where should Pear be placed in /opt/local/? or what should the installation directory be? I don't see any basic install instructions for Pear & or macports....Thanks....

Attachments (1)

pear-php5extension-1.0.tcl.diff (10.0 KB) - added by pixilla (Bradley Giesbrecht) 14 years ago.
add pear option to php5extension PortGroup

Download all attachments as: .zip

Change History (12)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

There is a +pear variant of the php5 port, but I don't know what happens when you use it. I had thought I should split it out into its own port (e.g. php5-pear) but even then I don't know what to do with it. Basically, pear lets you install things into the MacPorts hierarchy, and that is something we don't like software other than MacPorts itself doing, so I don't know how we should be handling pear in MacPorts. Possibly we should be creating individual ports for each module available in pear (like we do for each perl module available in cpan -- php5-console_table is the first such port that has been submitted, in #27320), but that is a lot of work. I don't use pear, so figuring this out has not been a priority for me.

comment:2 in reply to:  1 Changed 14 years ago by oldmilwaukee33@…

I was told by another person who uses macports to to install PHP5 again with the pear port variant but I am not sure if that's the best solution as I am unsure of what would change on my current set up. Thanks for your help though. I only need pear because I want to install phpunit for testing purposes.

Changed 14 years ago by pixilla (Bradley Giesbrecht)

add pear option to php5extension PortGroup

comment:3 Changed 14 years ago by pixilla (Bradley Giesbrecht)

There are 6 ports that are required for my pear-php5extension patch to work. I don't know if this ticket is a good place to attach them.
I spent an hour and a half creating 36 pear-[name] ports this morning and am using them on my system now.

$ port installed name:pear
The following ports are currently installed:
  pear-Archive_Tar @1.3.7_0 (active)
  pear-Auth @1.6.4_0 (active)
  pear-Auth_SASL @1.0.4_0 (active)
  pear-Config @1.10.12_0 (active)
  pear-Console_Getopt @1.3.0_0 (active)
  pear-HTML_Common @1.2.5_0 (active)
  pear-HTML_Common2 @2.0.0_0 (active)
  pear-HTML_Table @1.8.3_0 (active)
  pear-HTML_Template_IT @1.3.0_0 (active)
  pear-HTTP_Client @1.2.1_0 (active)
  pear-HTTP_Request @1.4.4_0 (active)
  pear-HTTP_Request2 @0.6.0_0 (active)
  pear-Log @1.12.5_0 (active)
  pear-Mail @1.2.0_0 (active)
  pear-Mail_Mime @1.8.1_0 (active)
  pear-Mail_mimeDecode @1.5.5_0 (active)
  pear-Mail_Queue @1.2.6_0 (active)
  pear-MDB2 @2.5.0b3_0 (active)
  pear-MDB2_Driver_mysqli @1.5.0b3_0 (active)
  pear-MDB2_Schema @0.8.5_0 (active)
  pear-MIME_Type @1.2.1_0 (active)
  pear-Net_IMAP @1.1.0_0 (active)
  pear-Net_POP3 @1.3.8_0 (active)
  pear-Net_SMTP @1.5.0_0 (active)
  pear-Net_Socket @1.0.10_0 (active)
  pear-Net_URL @1.0.15_0 (active)
  pear-Net_URL2 @0.3.1_0 (active)
  pear-PEAR @1.9.1_0 (active)
  pear-PEAR_Frontend_Web @0.7.5_0 (active)
  pear-PHPUnit @1.3.2_0 (active)
  pear-SOAP @0.12.0_0 (active)
  pear-Structures_Graph @1.0.4_0 (active)
  pear-Var_Dump @1.0.4_0 (active)
  pear-XML_Parser @1.3.4_0 (active)
  pear-XML_Serializer @0.20.2_0 (active)
  pear-XML_Util @1.2.1_0 (active)
  php5-pear @20110221_0 (active)

The pear ports are very simple to create, just like Ryans extensions.

$ port cat pear-Auth
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0
PortGroup           archcheck 1.0
PortGroup           php5extension 1.0

php5extension.setup Auth 1.6.4 pear

checksums           sha1    37243ee9115f9d4838c75fe537724541bb885978 \
                    rmd160  78b64b2bd36c8ef24437c6c090b11956ee64bd23

I use a pear.ini file to load the pear lib path so the pear packages are available to php without manually editing conf files.

$ port contents php5-pear
Port php5-pear contains:
  /opt/local/lib/php/pear/pear-ini.php
  /opt/local/var/db/php5/pear.ini

$ cat /opt/local/var/db/php5/pear.ini
; Do not edit this file; it is automatically generated by MacPorts.
; Any changes you make will be lost if you upgrade or uninstall php5-pear.
; To configure PHP, edit /opt/local/etc/php5/php.ini.

auto_prepend_file = "/opt/local/lib/php/pear/pear-ini.php"
$ cat /opt/local/lib/php/pear/pear-ini.php
<?php
# Do not edit this file; it is automatically generated by MacPorts.
# Any changes you make will be lost if you upgrade or uninstall php5-pear.
# To configure PHP, edit /opt/local/etc/php5/php.ini.

$path = '/opt/local/lib/php/pear' ; 
set_include_path ( get_include_path (  ) . PATH_SEPARATOR . $path ) ; 

?>

comment:4 Changed 14 years ago by pixilla (Bradley Giesbrecht)

Cc: pixilla@… added

Cc Me!

comment:5 Changed 14 years ago by pixilla (Bradley Giesbrecht)

Cc: pixilla@… removed

Cc Me!

comment:6 Changed 13 years ago by miwi@…

Cc: miwi@… added

Cc Me!

comment:7 Changed 13 years ago by miwi@…

Hi,

Actually since macports 2.0 supports slave ports i like the idea to split pear to a own port. What can i/we do to get this patchset in, I just looked into it and it still works for me.

  • Martin

comment:8 Changed 13 years ago by pixilla (Bradley Giesbrecht)

Martin: I created a php5pear PortGroup and ports for the entire pear repository (563 ports).

I was wanting some help and confidence this is a decent enough approach before committing so many ports. I also want to add openmaintainer to all the pear- ports.
On my local dev system I used this PortGroup to install ALL 500+ "pear-" ports over six months ago.

$ sudo port install name:^pear-

I am close to having pear uninstall cleanly but pear (a package maintainer app) writes its on registry files that for now I have gave up trying to prevent. I don't see this as being a show stopper, lots of other apps leave remnants on uninstall.

comment:9 Changed 13 years ago by pixilla (Bradley Giesbrecht)

Cc: pixilla@… added

Cc Me!

comment:10 Changed 13 years ago by pixilla (Bradley Giesbrecht)

My files have moved. The new locations are here:

comment:11 Changed 13 years ago by pixilla (Bradley Giesbrecht)

Resolution: fixed
Status: newclosed

The entire pear.php.net pear repository has been added to MacPorts.

$ port echo name:^pear-
Note: See TracTickets for help on using tickets.