Magellan Linux

Annotation of /trunk/extras/php5/php5-5.3.0-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id