Magellan Linux

Contents of /trunk/extras/php5/php5-5.2.10-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2158 - (show annotations) (download)
Mon Jul 6 18:44:05 2009 UTC (14 years, 9 months ago) by niro
File size: 4810 byte(s)
-removed the deprecated db4 fix completly
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 # version branding
70 sed -i "s:^\(EXTRA_VERSION=\).*:\1-magellan-${PBUILD}:" configure.in || die
71
72 # fixes multilib search pathes
73 mpatch ${PNAME}-5.2.4-multilib.patch || die
74
75 # do not touch the system httpd.conf
76 mpatch ${PNAME}-5.2.3-httpd-config.patch || die
77
78 # fixes build dir -> /usr/lib/php5/build
79 mpatch ${PNAME}-5.2.4-build-dir.patch || die
80
81 # hardend php core patch
82 # see: http://www.hardened-php.net/suhosin/index.html
83 mpatch ${PNAME}-${PVER}-suhosin-${SUHOSIN_PVER}.patch || die
84
85 # fully regenerate aclocal too
86 rm aclocal.m4 || die
87
88 # rebuild configure
89 autoreconf --force --install --verbose || die
90
91 # force use of system libtool
92 mlibtoolize || die
93 }
94
95 src_compile()
96 {
97 cd ${SRCDIR}
98
99 # --with-libdir needed, doesn't honor --libdir
100 mconfigure \
101 --with-libdir=$(mlibdir) \
102 --with-config-file-path=/etc/${PNAME} \
103 --with-config-file-scan-dir=/etc/${PNAME}/conf.d \
104 --without-pear \
105 --with-apxs2 \
106 --enable-force-cgi-redirect \
107 --enable-fastcgi \
108 --enable-discard-path \
109 --with-zlib \
110 --with-bz2=shared \
111 --enable-bcmath=shared \
112 --enable-calendar=shared \
113 --enable-exif \
114 --enable-ftp=shared \
115 --with-gettext \
116 --enable-mbstring=shared \
117 --with-ncurses=shared \
118 --with-readline \
119 --with-openssl \
120 --with-gd=shared,/usr \
121 --enable-gd-native-ttf \
122 --with-freetype-dir=/usr \
123 --with-ttf \
124 --with-t1lib=/usr \
125 --with-pcre-regex \
126 --with-gmp \
127 --with-curl \
128 --with-curlwrappers \
129 --enable-dba=shared \
130 --with-db4 \
131 --with-mysql=shared \
132 --with-mysqli=shared \
133 --with-unixODBC=shared,/usr \
134 --with-sqlite=shared \
135 --enable-pdo=shared \
136 --with-pdo-odbc=shared,unixODBC,/usr \
137 --with-pdo-mysql=shared,/usr \
138 --with-pdo-sqlite=shared,/usr \
139 --enable-dbase=shared \
140 --enable-dom=shared \
141 --with-xmlrpc=shared \
142 --enable-xmlreader=shared \
143 --enable-xmlwriter=shared \
144 --with-xsl=shared,/usr \
145 --enable-json=shared \
146 --enable-zip=shared \
147 --enable-sockets=shared \
148 --enable-sysvsem=shared \
149 --enable-sysvshm=shared \
150 --enable-sysvmsg=shared \
151 --with-tidy=shared \
152 || die
153
154 # ToDo:
155 # --with-mcrypt=shared \
156 # --with-mhash=shared \
157 # --with-imap=shared \
158 # --with-imap-ssl \
159
160 mmake || die
161 }
162
163 src_install()
164 {
165 cd ${SRCDIR}
166 mmake INSTALL_ROOT=${BINDIR} EXTENSION_DIR=${PHP5_EXTENSIONS_DIR} install || die
167
168 # php config
169 minstalldir /etc/${PNAME}/conf.d || die
170 # fix extensions dir location
171 sed -i "s:^\(extension_dir =\).*:\1 ${PHP5_EXTENSIONS_DIR}:" php.ini-recommended || die
172 # allow short php open-tags
173 sed -i "s:^\(short_open_tag =\).*:\1 On:" php.ini-recommended || die
174 minstallfile php.ini-recommended /etc/${PNAME}/php.ini || die
175
176 # fix extension_dir also in php-config
177 sed -i "s:^\(extension_dir=\).*:\1${PHP5_EXTENSIONS_DIR}:" ${BINDIR}/usr/bin/php-config || die
178
179 # install apache module config
180 minstalldir /etc/apache2/modules.d || die
181 minstallfile -s php5_module.conf /etc/apache2/modules.d/php5.conf || die
182
183 # enable all default extensions
184 local i
185 for i in $(ls ${BINDIR}/${PHP5_EXTENSIONS_DIR}/*.so | sort )
186 do
187 echo "extension=$(basename ${i})" \
188 > ${BINDIR}/etc/${PNAME}/conf.d/$(basename ${i} .so).ini || die
189 done
190
191 minstalldocs CREDITS CODING_STANDARDS EXTENSIONS LICENSE NEWS README* TODO* || die
192 }

Properties

Name Value
svn:keywords Id