Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id