Skip to content

Commit

Permalink
Added php 5.4 from ec-userland.
Browse files Browse the repository at this point in the history
Some pieces are missing - extensions in components dir
(including MySQL/PgSQL), some modified
(e.g. using mediators instead of active link).
  • Loading branch information
pyhalov committed Jul 8, 2013
1 parent 1a65ffb commit 5ca1d7c
Show file tree
Hide file tree
Showing 76 changed files with 3,760 additions and 0 deletions.
199 changes: 199 additions & 0 deletions components/php-5_4/Makefile
@@ -0,0 +1,199 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL)". You may
# only use this file in accordance with the terms of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2013, EveryCity Ltd. All rights reserved.
#
include ../../make-rules/shared-macros.mk

COMPONENT_NAME= php
COMPONENT_VERSION= 5.4.16
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:10a71c80c0e0d2b60fd1b6fdce9f76e09d35648cf179bb182146babe61d8c4a3
COMPONENT_ARCHIVE_URL= http://uk3.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror

include ../../make-rules/prep.mk
include ../../make-rules/configure.mk
include ../../make-rules/ips.mk

# Apache Paths
AP_PREFIX=/usr/apache2/2.2
AP_SYSCONFDIR=/etc/apache2/2.2

# PHP Paths
PHP_PREFIX=/usr/php/5.4
PHP_SYSCONFDIR=/etc/php/5.4
PHP_DATADIR=/var/php/5.4

CFLAGS = $(CC_BITS) -D_POSIX_PTHREAD_SEMANTICS

# Configure Options

CONFIGURE_OPTIONS = --prefix=$(PHP_PREFIX)
CONFIGURE_OPTIONS.32 = --bindir=$(PHP_PREFIX)/bin
CONFIGURE_OPTIONS.64 = --bindir=$(PHP_PREFIX)/bin/$(MACH64)
CONFIGURE_OPTIONS.32 += --sbindir=$(PHP_PREFIX)/bin
CONFIGURE_OPTIONS.64 += --sbindir=$(PHP_PREFIX)/bin/$(MACH64)
CONFIGURE_OPTIONS.32 += --libdir=$(PHP_PREFIX)/lib
CONFIGURE_OPTIONS.64 += --libdir=$(PHP_PREFIX)/lib/$(MACH64)
CONFIGURE_OPTIONS.32 += --libexecdir=$(PHP_PREFIX)/libexec
CONFIGURE_OPTIONS.64 += --libexecdir=$(PHP_PREFIX)/libexec/$(MACH64)
CONFIGURE_OPTIONS += --includedir=$(PHP_PREFIX)/include
CONFIGURE_OPTIONS += --sysconfdir=$(PHP_SYSCONFDIR)
CONFIGURE_OPTIONS += --datadir=$(PHP_DATADIR)
CONFIGURE_OPTIONS += --mandir=$(PHP_PREFIX)/share/man
CONFIGURE_OPTIONS += CC="$(CC)" CXX="$(CCC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"

# SAPI modules
CONFIGURE_OPTIONS.32 += --with-apxs2=$(AP_PREFIX)/bin/apxs
CONFIGURE_OPTIONS.64 += --with-apxs2=$(AP_PREFIX)/bin/$(MACH64)/apxs
CONFIGURE_OPTIONS += --enable-fpm

CONFIGURE_OPTIONS.64 += --build=x86_64-pc-solaris$(SOLARIS_VERSION)

CONFIGURE_OPTIONS += --with-config-file-path=$(PHP_SYSCONFDIR)
CONFIGURE_OPTIONS += --with-config-file-scan-dir=$(PHP_SYSCONFDIR)/conf.d
CONFIGURE_OPTIONS += --with-pear=$(PHP_PREFIX)/share/PEAR

CONFIGURE_OPTIONS += --with-layout=PHP
CONFIGURE_OPTIONS += --with-zend-vm=CALL

CONFIGURE_OPTIONS += --with-cdb
CONFIGURE_OPTIONS += --with-kerberos
CONFIGURE_OPTIONS += --with-pcre-regex

# Shared Extensions
CONFIGURE_OPTIONS += --with-curlwrappers
CONFIGURE_OPTIONS += --with-gettext=shared
CONFIGURE_OPTIONS += --with-xmlrpc=shared
CONFIGURE_OPTIONS += --with-gd=shared
CONFIGURE_OPTIONS += --with-zlib=shared
CONFIGURE_OPTIONS += --with-openssl=shared
CONFIGURE_OPTIONS += --with-pdo-sqlite=shared
CONFIGURE_OPTIONS += --with-ldap=shared

# Shared Extensions
CONFIGURE_OPTIONS += --with-bz2=shared
CONFIGURE_OPTIONS += --with-iconv=shared
CONFIGURE_OPTIONS += --with-tidy=shared
CONFIGURE_OPTIONS += --with-mhash=shared
CONFIGURE_OPTIONS += --with-mcrypt=shared
CONFIGURE_OPTIONS += --with-xsl=shared
CONFIGURE_OPTIONS += --with-curl=shared
CONFIGURE_OPTIONS += --with-readline=shared
CONFIGURE_OPTIONS += --with-pspell=shared
CONFIGURE_OPTIONS += --with-imap=shared
CONFIGURE_OPTIONS += --with-imap-ssl

# Enabled Extensions
#CONFIGURE_OPTIONS += --with-libxml-dir=$(ECPREFIX)
#CONFIGURE_OPTIONS += --with-freetype-dir=$(ECPREFIX)
#CONFIGURE_OPTIONS += --with-jpeg-dir=$(ECPREFIX)
#CONFIGURE_OPTIONS += --with-png-dir=$(ECPREFIX)
#CONFIGURE_OPTIONS += --with-zlib-dir=$(ECPREFIX)
#CONFIGURE_OPTIONS += --with-xpm-dir=$(ECPREFIX)
#CONFIGURE_OPTIONS += --with-libexpat-dir=$(ECPREFIX)
#CONFIGURE_OPTIONS += --with-openssl-dir=$(ECPREFIX)

# Disabled extensions & Options
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --disable-dba
CONFIGURE_OPTIONS += --disable-debug
CONFIGURE_OPTIONS += --disable-libgcc
#CONFIGURE_OPTIONS += --disable-inline-optimization
#CONFIGURE_OPTIONS += --disable-libtool-lock
#CONFIGURE_OPTIONS += --disable-rpath

CONFIGURE_OPTIONS += --without-dbm
CONFIGURE_OPTIONS += --without-t1lib

# Enabled extensions
CONFIGURE_OPTIONS += --enable-cli
CONFIGURE_OPTIONS += --enable-cgi
CONFIGURE_OPTIONS += --enable-shared
CONFIGURE_OPTIONS += --enable-filter
CONFIGURE_OPTIONS += --enable-gd-jis-conv
CONFIGURE_OPTIONS += --enable-short-tags
CONFIGURE_OPTIONS += --enable-pcntl
CONFIGURE_OPTIONS += --enable-shmop
CONFIGURE_OPTIONS += --enable-sysvmsg
CONFIGURE_OPTIONS += --enable-sysvsem
CONFIGURE_OPTIONS += --enable-sysvshm
CONFIGURE_OPTIONS += --enable-simplexml
CONFIGURE_OPTIONS += --enable-hash
CONFIGURE_OPTIONS += --enable-session

# Shared Extensions
CONFIGURE_OPTIONS += --enable-bcmath=shared
CONFIGURE_OPTIONS += --enable-json=shared
CONFIGURE_OPTIONS += --enable-libxml=shared
CONFIGURE_OPTIONS += --enable-ctype=shared
CONFIGURE_OPTIONS += --enable-calendar=shared
CONFIGURE_OPTIONS += --enable-tokenizer=shared
CONFIGURE_OPTIONS += --enable-exif=shared
CONFIGURE_OPTIONS += --enable-dom=shared
CONFIGURE_OPTIONS += --enable-ftp=shared
CONFIGURE_OPTIONS += --enable-pdo=shared
CONFIGURE_OPTIONS += --enable-mbstring=shared
CONFIGURE_OPTIONS += --enable-xmlreader=shared
CONFIGURE_OPTIONS += --enable-xmlwriter=shared
CONFIGURE_OPTIONS += --enable-soap=shared
CONFIGURE_OPTIONS += --enable-sockets=shared
CONFIGURE_OPTIONS += --enable-wddx=shared
CONFIGURE_OPTIONS += --enable-zip=shared

CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(BITS))

#CONFIGURE_OPTIONS += $(CONFIGURE_VARIANT_OPTIONS)

# Installation Arguments
COMPONENT_INSTALL_ARGS += INSTALL_ROOT=$(PROTO_DIR)

# Pre-Install Actions
COMPONENT_PRE_INSTALL_ACTION+= \
( $(MKDIR) -p $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d ; \
echo "Creating fake modules-32.load" ; \
echo "\# LoadModule foo_module libexec/mod_foo.so" >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load ; \
echo "\# " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load ; \
echo "LoadModule foo_module libexec/mod_foo.so " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load ; \
cp $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-64.load \
)

# Environment Variables
COMPONENT_BUILD_ENV+= CC="$(CC) $(CC_BITS)" CXX="$(CCC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
CONFIGURE_ENV.32 += EXTENSION_DIR=$(PHP_PREFIX)/extensions
CONFIGURE_ENV.64 += EXTENSION_DIR=$(PHP_PREFIX)/extensions/$(MACH64)

# Standard build
#$(BUILD_DIR_32)/.configured: CONFIGURE_VARIANT_OPTIONS= \
# --with-apxs2=$(AP_PREFIX)/bin/apxs
#$(BUILD_DIR_64)/.configured: CONFIGURE_VARIANT_OPTIONS= \
# --with-apxs2=$(AP_PREFIX)/bin/$(MACH64)/apxs

# CGI build
#$(BUILD_DIR)/$(MACH32).cgi/.configured: BITS=32
#$(BUILD_DIR)/$(MACH64).cgi/.configured: BITS=64
#$(BUILD_DIR)/$(MACH32).cgi/.configured: CONFIGURE_VARIANT_OPTIONS=
#$(BUILD_DIR)/$(MACH64).cgi/.configured: CONFIGURE_VARIANT_OPTIONS=
#$(BUILD_DIR)/$(MACH32).cgi/.built: BITS=32
#$(BUILD_DIR)/$(MACH64).cgi/.built: BITS=64
#$(BUILD_DIR)/$(MACH32).cgi/.installed: BITS=32
#$(BUILD_DIR)/$(MACH64).cgi/.installed: BITS=64


build: $(BUILD_32_and_64)
# \
# $(BUILD_DIR)/$(MACH32).cgi/.built \
# $(BUILD_DIR)/$(MACH64).cgi/.built

install: $(INSTALL_32_and_64)
# $(CP) $(BUILD_DIR)/$(MACH32).cgi/sapi/cgi/php-cgi $(PROTO_DIR)$(PHP_PREFIX)/bin
# $(CP) $(BUILD_DIR)/$(MACH64).cgi/sapi/cgi/php-cgi $(PROTO_DIR)$(PHP_PREFIX)/bin/$(MACH64)
6 changes: 6 additions & 0 deletions components/php-5_4/files/bcmath.ini
@@ -0,0 +1,6 @@
[bcmath]
extension=bcmath.so

; Number of decimal digits for all bcmath functions.
bcmath.scale = 0

3 changes: 3 additions & 0 deletions components/php-5_4/files/bz2.ini
@@ -0,0 +1,3 @@
[bz2]
extension=bz2.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/calendar.ini
@@ -0,0 +1,3 @@
[calendar]
extension=calendar.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/ctype.ini
@@ -0,0 +1,3 @@
[ctype]
extension=ctype.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/curl.ini
@@ -0,0 +1,3 @@
[curl]
extension=curl.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/dom.ini
@@ -0,0 +1,3 @@
[dom]
extension=dom.so

15 changes: 15 additions & 0 deletions components/php-5_4/files/exif.ini
@@ -0,0 +1,15 @@
[exif]
extension=exif.so

; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
; With mbstring support this will automatically be converted into the encoding
; given by corresponding encode setting. When empty mbstring.internal_encoding
; is used. For the decode settings you can distinguish between motorola and
; intel byte order. A decode setting cannot be empty.
;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel = JIS

3 changes: 3 additions & 0 deletions components/php-5_4/files/ftp.ini
@@ -0,0 +1,3 @@
[ftp]
extension=ftp.so

8 changes: 8 additions & 0 deletions components/php-5_4/files/gd.ini
@@ -0,0 +1,8 @@
[gd]
extension=gd.so

; Tell the jpeg decode to libjpeg warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
;gd.jpeg_ignore_warning = 0

3 changes: 3 additions & 0 deletions components/php-5_4/files/gettext.ini
@@ -0,0 +1,3 @@
[gettext]
extension=gettext.so

7 changes: 7 additions & 0 deletions components/php-5_4/files/iconv.ini
@@ -0,0 +1,7 @@
[iconv]
extension=iconv.so

;iconv.input_encoding = ISO-8859-1
;iconv.internal_encoding = ISO-8859-1
;iconv.output_encoding = ISO-8859-1

2 changes: 2 additions & 0 deletions components/php-5_4/files/imap.ini
@@ -0,0 +1,2 @@
[imap]
extension=imap.so
3 changes: 3 additions & 0 deletions components/php-5_4/files/json.ini
@@ -0,0 +1,3 @@
[json]
extension=json.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/ldap.ini
@@ -0,0 +1,3 @@
[ldap]
extension=ldap.so

43 changes: 43 additions & 0 deletions components/php-5_4/files/mbstring.ini
@@ -0,0 +1,43 @@
[mbstring]
extension=mbstring.so

; language for internal character representation.
;mbstring.language = Japanese

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
;mbstring.internal_encoding = EUC-JP

; http input encoding.
;mbstring.http_input = auto

; http output encoding. mb_output_handler must be
; registered as output buffer to function
;mbstring.http_output = SJIS

; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
; portable libs/applications.
;mbstring.encoding_translation = Off

; automatic encoding detection order.
; auto means
;mbstring.detect_order = auto

; substitute_character used when character cannot be converted
; one from another
;mbstring.substitute_character = none;

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
;mbstring.func_overload = 0

3 changes: 3 additions & 0 deletions components/php-5_4/files/mcrypt.ini
@@ -0,0 +1,3 @@
[mcrypt]
extension=mcrypt.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/openssl.ini
@@ -0,0 +1,3 @@
[openssl]
extension=openssl.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/pdo.ini
@@ -0,0 +1,3 @@
[pdo]
extension=pdo.so

3 changes: 3 additions & 0 deletions components/php-5_4/files/pdo_sqlite.ini
@@ -0,0 +1,3 @@
[pdo_sqlite]
extension=pdo_sqlite.so

0 comments on commit 5ca1d7c

Please sign in to comment.