Contents of /trunk/extras/php5/php5-5.2.10-r1.smage2
Parent Directory | Revision Log
Revision 2157 -
(show annotations)
(download)
Mon Jul 6 18:40:46 2009 UTC (15 years, 2 months ago) by niro
File size: 4930 byte(s)
Mon Jul 6 18:40:46 2009 UTC (15 years, 2 months ago) by niro
File size: 4930 byte(s)
fix db4 issues
1 | # $Id$ |
2 | |
3 | PNAME="php5" |
4 | PVER="5.2.10" |
5 | PBUILD="r1" |
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.11 |
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.24 |
20 | >= dev-libs/openssl-0.9.8 |
21 | >= dev-libs/libpcre-7.9 |
22 | >= dev-libs/gmp-4.3 |
23 | >= media-libs/libjpeg-6b |
24 | >= media-libs/libpng-1.2 |
25 | >= x11-libs/libXpm-3.5 |
26 | >= media-libs/gd-2.0 |
27 | >= media-libs/freetype-2 |
28 | >= media-libs/t1lib-5.1 |
29 | >= net-misc/curl-7.19 |
30 | >= app-text/aspell-0.60 |
31 | >= dev-db/db-4.7 |
32 | >= dev-db/sqlite-3.6 |
33 | >= dev-db/mysql5-5.1 |
34 | >= dev-db/unixodbc-2.2 |
35 | >= net-dns/libidn-1.14 |
36 | >= app-text/htmltidy-1.46" |
37 | |
38 | # ToDO: mcrypt, imap, mhash |
39 | |
40 | SDEPEND=">= sys-apps/sed-4 |
41 | >= sys-dev/m4-1.4 |
42 | >= sys-dev/libtool-1.5 |
43 | >= sys-dev/gettext-0.17" |
44 | |
45 | SRCFILE="${PNAME/5/}-${PVER}.tar.bz2" |
46 | SRCDIR="${BUILDDIR}/${PNAME/5/}-${PVER}" |
47 | |
48 | SUHOSIN_PVER="0.9.7" |
49 | PHP5_EXTENSIONS_DIR="/usr/$(mlibdir)/${PNAME}/extensions" |
50 | |
51 | sminclude mtools |
52 | |
53 | SRC_URI=( |
54 | http://de2.php.net/distributions/${SRCFILE} |
55 | http://us2.php.net/distributions/${SRCFILE} |
56 | mirror://${PNAME}/${SRCFILE} |
57 | mirror://${PNAME}/${PNAME}-5.2.4-multilib.patch |
58 | mirror://${PNAME}/${PNAME}-5.2.3-httpd-config.patch |
59 | mirror://${PNAME}/${PNAME}-5.2.4-build-dir.patch |
60 | mirror://${PNAME}/${PNAME}-${PVER}-suhosin-${SUHOSIN_PVER}.patch |
61 | mirror://${PNAME}/php5_module.conf |
62 | ) |
63 | |
64 | src_prepare() |
65 | { |
66 | munpack ${SRCFILE} || die |
67 | cd ${SRCDIR} |
68 | |
69 | # fixes some issues with db4 |
70 | # sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c || die |
71 | |
72 | # version branding |
73 | sed -i "s:^\(EXTRA_VERSION=\).*:\1-magellan-${PBUILD}:" configure.in || die |
74 | |
75 | # fixes multilib search pathes |
76 | mpatch ${PNAME}-5.2.4-multilib.patch || die |
77 | |
78 | # do not touch the system httpd.conf |
79 | mpatch ${PNAME}-5.2.3-httpd-config.patch || die |
80 | |
81 | # fixes build dir -> /usr/lib/php5/build |
82 | mpatch ${PNAME}-5.2.4-build-dir.patch || die |
83 | |
84 | # hardend php core patch |
85 | # see: http://www.hardened-php.net/suhosin/index.html |
86 | mpatch ${PNAME}-${PVER}-suhosin-${SUHOSIN_PVER}.patch || die |
87 | |
88 | # fully regenerate aclocal too |
89 | rm aclocal.m4 || die |
90 | |
91 | # rebuild configure |
92 | autoreconf --force --install --verbose || die |
93 | |
94 | # force use of system libtool |
95 | mlibtoolize || die |
96 | } |
97 | |
98 | src_compile() |
99 | { |
100 | cd ${SRCDIR} |
101 | |
102 | # --with-libdir needed, doesn't honor --libdir |
103 | mconfigure \ |
104 | --with-libdir=$(mlibdir) \ |
105 | --with-config-file-path=/etc/${PNAME} \ |
106 | --with-config-file-scan-dir=/etc/${PNAME}/conf.d \ |
107 | --without-pear \ |
108 | --with-apxs2 \ |
109 | --enable-force-cgi-redirect \ |
110 | --enable-fastcgi \ |
111 | --enable-discard-path \ |
112 | --with-zlib \ |
113 | --with-bz2=shared \ |
114 | --enable-bcmath=shared \ |
115 | --enable-calendar=shared \ |
116 | --enable-exif \ |
117 | --enable-ftp=shared \ |
118 | --with-gettext \ |
119 | --enable-mbstring=shared \ |
120 | --with-ncurses=shared \ |
121 | --with-readline \ |
122 | --with-openssl \ |
123 | --with-gd=shared,/usr \ |
124 | --enable-gd-native-ttf \ |
125 | --with-freetype-dir=/usr \ |
126 | --with-ttf \ |
127 | --with-t1lib=/usr \ |
128 | --with-pcre-regex \ |
129 | --with-gmp \ |
130 | --with-curl \ |
131 | --with-curlwrappers \ |
132 | --enable-dba=shared \ |
133 | --with-db4 \ |
134 | --with-mysql=shared \ |
135 | --with-mysqli=shared \ |
136 | --with-unixODBC=shared,/usr \ |
137 | --with-sqlite=shared \ |
138 | --enable-pdo=shared \ |
139 | --with-pdo-odbc=shared,unixODBC,/usr \ |
140 | --with-pdo-mysql=shared,/usr \ |
141 | --with-pdo-sqlite=shared,/usr \ |
142 | --enable-dbase=shared \ |
143 | --enable-dom=shared \ |
144 | --with-xmlrpc=shared \ |
145 | --enable-xmlreader=shared \ |
146 | --enable-xmlwriter=shared \ |
147 | --with-xsl=shared,/usr \ |
148 | --enable-json=shared \ |
149 | --enable-zip=shared \ |
150 | --enable-sockets=shared \ |
151 | --enable-sysvsem=shared \ |
152 | --enable-sysvshm=shared \ |
153 | --enable-sysvmsg=shared \ |
154 | --with-tidy=shared \ |
155 | || die |
156 | |
157 | # ToDo: |
158 | # --with-mcrypt=shared \ |
159 | # --with-mhash=shared \ |
160 | # --with-imap=shared \ |
161 | # --with-imap-ssl \ |
162 | |
163 | mmake || die |
164 | } |
165 | |
166 | src_install() |
167 | { |
168 | cd ${SRCDIR} |
169 | mmake INSTALL_ROOT=${BINDIR} EXTENSION_DIR=${PHP5_EXTENSIONS_DIR} install || die |
170 | |
171 | # php config |
172 | minstalldir /etc/${PNAME}/conf.d || die |
173 | # fix extensions dir location |
174 | sed -i "s:^\(extension_dir =\).*:\1 ${PHP5_EXTENSIONS_DIR}:" php.ini-recommended || die |
175 | # allow short php open-tags |
176 | sed -i "s:^\(short_open_tag =\).*:\1 On:" php.ini-recommended || die |
177 | minstallfile php.ini-recommended /etc/${PNAME}/php.ini || die |
178 | |
179 | # fix extension_dir also in php-config |
180 | sed -i "s:^\(extension_dir=\).*:\1${PHP5_EXTENSIONS_DIR}:" ${BINDIR}/usr/bin/php-config || die |
181 | |
182 | # install apache module config |
183 | minstalldir /etc/apache2/modules.d || die |
184 | minstallfile -s php5_module.conf /etc/apache2/modules.d/php5.conf || die |
185 | |
186 | # enable all default extensions |
187 | local i |
188 | for i in $(ls ${BINDIR}/${PHP5_EXTENSIONS_DIR}/*.so | sort ) |
189 | do |
190 | echo "extension=$(basename ${i})" \ |
191 | > ${BINDIR}/etc/${PNAME}/conf.d/$(basename ${i} .so).ini || die |
192 | done |
193 | |
194 | minstalldocs CREDITS CODING_STANDARDS EXTENSIONS LICENSE NEWS README* TODO* || die |
195 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |