Contents of /trunk/extras/php5/php5-5.3.0-r3.smage2
Parent Directory | Revision Log
Revision 5094 -
(show annotations)
(download)
Thu Mar 4 21:12:14 2010 UTC (14 years, 6 months ago) by niro
File size: 5439 byte(s)
Thu Mar 4 21:12:14 2010 UTC (14 years, 6 months ago) by niro
File size: 5439 byte(s)
-fixed shared modules and missing ldap dependency
1 | # $Id$ |
2 | |
3 | PNAME="php5" |
4 | PVER="5.3.0" |
5 | PBUILD="r3" |
6 | |
7 | PCATEGORIE="dev-lang" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="PHP Hypertext Preprocessor, a scripting language especially suited for web development." |
11 | HOMEPAGE="http://php.net/" |
12 | |
13 | DEPEND=">= net-www/apache2-2.2.14 |
14 | >= sys-libs/ncurses-5.7 |
15 | >= sys-libs/readline-6.0 |
16 | >= sys-libs/zlib-1.2 |
17 | >= app-arch/bzip2-1 |
18 | >= dev-libs/libxml2-2.7 |
19 | >= dev-libs/libxslt-1.1.26 |
20 | >= dev-libs/openssl-0.9.8 |
21 | >= dev-libs/libpcre-8.0 |
22 | >= dev-libs/gmp-4.3 |
23 | >= media-libs/libjpeg-7 |
24 | >= media-libs/libpng-1.2.40 |
25 | >= x11-libs/libXpm-3.5 |
26 | >= media-libs/gd-2.0.35 |
27 | >= media-libs/freetype-2.3 |
28 | >= media-libs/t1lib-5.1 |
29 | >= net-misc/curl-7.19 |
30 | >= app-text/aspell-0.60 |
31 | >= dev-db/db-4.8 |
32 | >= dev-db/sqlite-3.6 |
33 | >= dev-db/mysql5-5.1 |
34 | >= dev-db/unixodbc-2.2 |
35 | >= net-dns/libidn-1.15 |
36 | >= app-text/htmltidy-1.46" |
37 | aspell |
38 | enchant |
39 | ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) ) |
40 | |
41 | # ToDO: mcrypt, imap, mhash |
42 | |
43 | SDEPEND=">= sys-apps/sed-4 |
44 | >= sys-dev/m4-1.4 |
45 | >= sys-dev/libtool-1.5 |
46 | >= sys-dev/gettext-0.17" |
47 | |
48 | SRCFILE="${PNAME/5/}-${PVER}.tar.bz2" |
49 | SRCDIR="${BUILDDIR}/${PNAME/5/}-${PVER}" |
50 | |
51 | SUHOSIN_PVER="0.9.8" |
52 | PHP5_EXTENSIONS_DIR="/usr/$(mlibdir)/${PNAME}/extensions" |
53 | |
54 | sminclude mtools |
55 | |
56 | SRC_URI=( |
57 | http://de2.php.net/distributions/${SRCFILE} |
58 | http://us2.php.net/distributions/${SRCFILE} |
59 | mirror://${PNAME}/${SRCFILE} |
60 | mirror://${PNAME}/${PNAME}-5.2.4-multilib.patch |
61 | mirror://${PNAME}/${PNAME}-5.2.3-httpd-config.patch |
62 | mirror://${PNAME}/${PNAME}-5.2.4-build-dir.patch |
63 | mirror://${PNAME}/${PNAME}-${PVER}-suhosin-${SUHOSIN_PVER}.patch |
64 | mirror://${PNAME}/${PNAME}-${PVER}-gd-segfault.patch |
65 | mirror://${PNAME}/php5_module.conf |
66 | ) |
67 | |
68 | # 5.3 stable series |
69 | UP2TAG="5.3" |
70 | UP2DATE="updatecmd ${HOMEPAGE} | grep 'Current.*${UP2TAG}.*Stable' | sed 's/.*\:\ \(.*\)/\1/'" |
71 | |
72 | src_prepare() |
73 | { |
74 | munpack ${SRCFILE} || die |
75 | cd ${SRCDIR} |
76 | |
77 | # version branding |
78 | sed -i "s:^\(EXTRA_VERSION=\).*:\1-magellan-${PBUILD}:" configure.in || die |
79 | |
80 | # fixes multilib search pathes |
81 | mpatch ${PNAME}-5.2.4-multilib.patch || die |
82 | |
83 | # do not touch the system httpd.conf |
84 | mpatch ${PNAME}-5.2.3-httpd-config.patch || die |
85 | |
86 | # fixes build dir -> /usr/lib/php5/build |
87 | mpatch ${PNAME}-5.2.4-build-dir.patch || die |
88 | |
89 | # hardend php core patch |
90 | # see: http://www.hardened-php.net/suhosin/index.html |
91 | mpatch ${PNAME}-${PVER}-suhosin-${SUHOSIN_PVER}.patch || die |
92 | |
93 | # fixes segfaults of gd in phpinfo() |
94 | mpatch ${PNAME}-${PVER}-gd-segfault.patch || die |
95 | |
96 | # fully regenerate aclocal too |
97 | rm aclocal.m4 || die |
98 | |
99 | # rebuild configure |
100 | autoreconf --force --install --verbose || die |
101 | |
102 | # force use of system libtool |
103 | mlibtoolize || die |
104 | } |
105 | |
106 | src_compile() |
107 | { |
108 | cd ${SRCDIR} |
109 | |
110 | # --with-libdir needed, doesn't honor --libdir |
111 | mconfigure \ |
112 | --with-libdir=$(mlibdir) \ |
113 | --with-config-file-path=/etc/${PNAME} \ |
114 | --with-config-file-scan-dir=/etc/${PNAME}/conf.d \ |
115 | --without-pear \ |
116 | --with-apxs2 \ |
117 | --enable-force-cgi-redirect \ |
118 | --enable-fastcgi \ |
119 | --enable-discard-path \ |
120 | --with-zlib \ |
121 | --with-bz2=shared \ |
122 | --enable-bcmath=shared \ |
123 | --enable-calendar=shared \ |
124 | --enable-exif \ |
125 | --enable-ftp=shared \ |
126 | --with-gettext \ |
127 | --enable-mbstring=shared \ |
128 | --enable-mbregex \ |
129 | --with-ncurses=shared \ |
130 | --with-readline \ |
131 | --with-openssl \ |
132 | --with-gd=shared,/usr \ |
133 | --enable-gd-native-ttf \ |
134 | --with-freetype-dir=/usr \ |
135 | --with-ttf \ |
136 | --with-t1lib=/usr \ |
137 | --with-pcre-regex \ |
138 | --with-gmp \ |
139 | --with-curl=shared \ |
140 | --with-curlwrappers \ |
141 | --enable-dba=shared \ |
142 | --with-db4 \ |
143 | --with-mysql=shared \ |
144 | --with-mysqli=shared \ |
145 | --with-unixODBC=shared,/usr \ |
146 | --with-sqlite=shared \ |
147 | --with-sqlite3=shared \ |
148 | --enable-pdo=shared \ |
149 | --with-pdo-odbc=shared,unixODBC,/usr \ |
150 | --with-pdo-mysql=shared,/usr \ |
151 | --with-pdo-sqlite=shared,/usr \ |
152 | --enable-dbase=shared \ |
153 | --enable-dom=shared \ |
154 | --with-xmlrpc=shared \ |
155 | --enable-xmlreader=shared \ |
156 | --enable-xmlwriter=shared \ |
157 | --with-xsl=shared,/usr \ |
158 | --enable-wddx=shared \ |
159 | --enable-soap=shared \ |
160 | --enable-json=shared \ |
161 | --enable-zip=shared \ |
162 | --enable-posix=shared \ |
163 | --enable-fileinfo=shared \ |
164 | --enable-sockets=shared \ |
165 | --enable-sysvsem=shared \ |
166 | --enable-sysvshm=shared \ |
167 | --enable-sysvmsg=shared \ |
168 | --with-tidy=shared \ |
169 | --with-ldap=shared \ |
170 | --with-ldap-sasl \ |
171 | --with-enchant=shared \ |
172 | --with-pspell=shared \ |
173 | || die |
174 | |
175 | |
176 | |
177 | # ToDo: |
178 | # --with-mcrypt=shared \ |
179 | # --with-mhash=shared \ |
180 | # --with-imap=shared \ |
181 | # --with-imap-ssl \ |
182 | |
183 | mmake || die |
184 | } |
185 | |
186 | src_install() |
187 | { |
188 | cd ${SRCDIR} |
189 | mmake INSTALL_ROOT=${BINDIR} EXTENSION_DIR=${PHP5_EXTENSIONS_DIR} install || die |
190 | |
191 | local php_ini=php.ini-production |
192 | |
193 | # php config |
194 | minstalldir /etc/${PNAME}/conf.d || die |
195 | # fix extensions dir location |
196 | sed -i "s:^\(extension_dir =\).*:\1 ${PHP5_EXTENSIONS_DIR}:" ${php_ini} || die |
197 | # allow short php open-tags |
198 | sed -i "s:^\(short_open_tag =\).*:\1 On:" ${php_ini} || die |
199 | minstallfile ${php_ini} /etc/${PNAME}/php.ini || die |
200 | |
201 | # fix extension_dir also in php-config |
202 | sed -i "s:^\(extension_dir=\).*:\1${PHP5_EXTENSIONS_DIR}:" ${BINDIR}/usr/bin/php-config || die |
203 | |
204 | # install apache module config |
205 | minstalldir /etc/apache2/modules.d || die |
206 | minstallfile -s php5_module.conf /etc/apache2/modules.d/php5.conf || die |
207 | |
208 | # enable all default extensions |
209 | local i |
210 | for i in $(ls ${BINDIR}/${PHP5_EXTENSIONS_DIR}/*.so | sort ) |
211 | do |
212 | echo "extension=$(basename ${i})" \ |
213 | > ${BINDIR}/etc/${PNAME}/conf.d/$(basename ${i} .so).ini || die |
214 | done |
215 | |
216 | minstalldocs CREDITS CODING_STANDARDS EXTENSIONS LICENSE NEWS README* TODO* || die |
217 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |