Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id