source: src/router/rules/php7.mk @ 31084

Last change on this file since 31084 was 31084, checked in by brainslayer, 4 months ago

update libs

File size: 6.1 KB
Line 
1php7: libxml2 libmcrypt
2        CC="ccache $(ARCH)-linux-uclibc-gcc" \
3        CFLAGS="$(COPTS) $(MIPS16_OPT)   -I$(TOP)/libpng -I$(TOP)/libxml2/include -I$(TOP)/curl/include -ffunction-sections -fdata-sections -Wl,--gc-sections" \
4        CPPFLAGS="$(COPTS) $(MIPS16_OPT) -I$(TOP)/libpng -I$(TOP)/libxml2/include -I$(TOP)/curl/include -ffunction-sections -fdata-sections -Wl,--gc-sections" \
5        LDFLAGS="$(COPTS) $(MIPS16_OPT) -L$(TOP)/libpng/.libs -L$(TOP)/libxml2/.libs -lxml2 -L$(TOP)/glib20/libiconv/lib/.libs -liconv -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/zlib -lz -L$(TOP)/curl/lib/.libs -lcurl -lcrypto -lssl -ldl -fPIC -v -Wl,--verbose" \
6        $(MAKE) -C php7
7       
8       
9PHP_CONFIGURE_ARGS= \
10        --program-prefix= \
11        --program-suffix= \
12        --prefix=/usr \
13        --exec-prefix=/usr \
14        --bindir=/usr/bin \
15        --datadir=/usr/share \
16        --infodir=/usr/share/info \
17        --includedir=/ \
18        --oldincludedir=/ \
19        --libdir=/usr/lib \
20        --libexecdir=/usr/lib \
21        --localstatedir=/var \
22        --mandir=/usr/share/man \
23        --sbindir=/usr/sbin \
24        --sysconfdir=/etc \
25        --with-config-file-scan-dir=/jffs/etc \
26        --with-iconv-dir="$(TOP)/glib20/libiconv" \
27        --enable-shared \
28        --enable-static \
29        --disable-rpath \
30        --disable-debug \
31        --without-pear \
32        --with-libxml-dir="$(TOP)/libxml2" \
33        --with-config-file-path=/etc \
34        --disable-short-tags \
35        --disable-ftp \
36        --without-gettext \
37        --disable-mbregex \
38        --with-openssl-dir="$(TOP)/openssl" \
39        --with-openssl=shared,"$(TOP)/openssl" \
40        --with-kerberos=no \
41        --disable-phar \
42        --with-kerberos=no \
43        --disable-soap \
44        --enable-sockets \
45        --disable-tokenizer \
46        --without-freetype-dir \
47        --without-xpm-dir \
48        --without-t1lib \
49        --disable-gd-jis-conv \
50        --enable-cli \
51        --enable-cgi \
52        --enable-zip \
53        --enable-mbstring \
54        --enable-maintainer-zts \
55        --with-tsrm-pthreads \
56        --with-gd \
57        --with-zlib \
58        --with-zlib-dir="$(TOP)/zlib" \
59        --with-png-dir="$(TOP)/libpng/.libs" \
60        --with-jpeg-dir="$(TOP)/minidlna/jpeg-8" \
61        --with-mcrypt="$(TOP)/libmcrypt" \
62        --with-curl="$(TOP)/curl" \
63        php_cv_cc_rpath="no" \
64        iconv_impl_name="gnu_libiconv" \
65        ac_cv_lib_png_png_write_image="yes" \
66        ac_cv_lib_crypt_crypt="yes" \
67        ac_cv_lib_z_gzgets="yes" \
68        ac_cv_php_xml2_config_path="$(TOP)/libxml2/xml2-config" \
69        ac_cv_lib_z_gzgets="yes" \
70        ac_cv_lib_crypto_X509_free="yes" \
71        ac_cv_lib_ssl_DSA_get_default_method="yes" \
72        ac_cv_func_crypt="yes" \
73        ac_cv_lib_crypto_CRYPTO_free="yes" \
74        ac_cv_header_openssl_crypto_h="yes" \
75        ac_cv_lib_ssl_SSL_CTX_set_ssl_version="yes" \
76        ac_cv_glob="yes" \
77        ICONV_DIR="$(TOP)/glib20/libiconv" \
78        OPENSSL_LIBDIR="$(TOP)/openssl" \
79        PHP_OPENSSL_DIR="$(TOP)/openssl" \
80        PHP_CURL="$(TOP)/curl" \
81        PHP_ICONV="$(TOP)/glib20/libiconv" \
82        EXTRA_CFLAGS="-L$(TOP)/glib20/libiconv/lib/.libs -liconv -I$(TOP)/libmcrypt -I$(TOP)/zlib -I$(TOP)/libpng -lcrypt -L$(TOP)/openssl -I$(TOP)/curl/include -lcrypto -lssl" \
83        EXTRA_LIBS="-liconv " \
84        EXTRA_LDFLAGS="-L$(TOP)/libmcrypt/lib/.libs -lmcrypt -L$(TOP)/glib20/libiconv/lib/.libs -liconv -L$(TOP)/libxml2/.libs -lxml2 -L$(TOP)/zlib -L$(TOP)/libpng/.libs -lpng16 -L$(TOP)/libgd/src/.libs -lgd -L$(TOP)/openssl -L$(TOP)/zlib -lz -L$(TOP)/curl/lib/.libs -lcurl -lcrypto -lssl -lcrypt -ldl" \
85        EXTRA_LDFLAGS_PROGRAM="-L$(TOP)/libmcrypt/lib/.libs -lmcrypt -L$(TOP)/glib20/libiconv/lib/.libs -liconv -L$(TOP)/libxml2/.libs -lxml2 -L$(TOP)/libpng/.libs -lpng16 -L$(TOP)/libgd/src/.libs -lgd -L$(TOP)/openssl -L$(TOP)/zlib -lz -L$(TOP)/curl/lib/.libs -lcurl -lcrypto -lssl -lcrypt -ldl"
86
87ifeq ($(ARCH),mips64)
88PHP_ENDIAN=ac_cv_c_bigendian_php="yes"
89endif
90ifeq ($(ARCH),mips)
91PHP_ENDIAN=ac_cv_c_bigendian_php="yes"
92endif
93ifeq ($(ARCH),armeb)
94PHP_ENDIAN=ac_cv_c_bigendian_php="yes"
95endif
96ifeq ($(ARCH),powerpc)
97PHP_ENDIAN=ac_cv_c_bigendian_php="yes"
98endif
99
100       
101php7-configure: libpng libgd libxml2 zlib curl
102        rm -f php7/config.cache
103        rm -rf php7/autom4te.cache
104        cd php7 && autoconf
105        cd php7 && './configure'  '--host=$(ARCH)-linux-uclibc' $(PHP_ENDIAN) $(PHP_CONFIGURE_ARGS) \
106        'CFLAGS=$(COPTS) -I$(TOP)/minidlna/jpeg-8 -I$(TOP)/libmcrypt -I$(TOP)/libpng -I$(TOP)/libxml2/include -I$(TOP)/glib20/libiconv/include -I$(TOP)/curl/include -DNEED_PRINTF -L$(TOP)/glib20/libiconv/lib/.libs -L$(TOP)/zlib -lz -L$(TOP)/curl/lib/.libs -lcurl -liconv' \
107        'LDFLAGS=-L$(TOP)/minidlna/lib -ljpeg -L$(TOP)/libmcrypt/lib/.libs -lmcrypt -L$(TOP)/libxml2/.libs -L$(TOP)/zlib -L$(TOP)/libpng/.libs -lpng16 -L$(TOP)/libgd/src/.libs -lgd -L$(TOP)/glib20/libiconv/lib/.libs -liconv -L$(TOP)/openssl -L$(TOP)/zlib -lz -L$(TOP)/curl/lib/.libs -lcurl -lcrypto -lssl -lcrypt -ldl'
108        printf "#define HAVE_GLOB 1\n" >>$(TOP)/php7/main/php_config.h
109
110php7-clean:
111        if test -e "php7/Makefile"; then make -C php7 clean; fi
112
113php7-install:
114ifeq ($(CONFIG_PHPCMD),y)
115        install -D php7/sapi/cli/.libs/php $(INSTALLDIR)/php7/usr/bin/php
116endif
117ifneq ($(CONFIG_PHPCGI),y)
118        install -D php7/sapi/cli/.libs/php $(INSTALLDIR)/php7/usr/bin/php
119endif
120ifeq ($(CONFIG_PHPCGI),y)
121        install -D php7/sapi/cgi/.libs/php-cgi $(INSTALLDIR)/php7/usr/bin/php-cgi
122        mkdir -p $(INSTALLDIR)/php7/etc/php/modules
123        cp php7/modules/*.so $(INSTALLDIR)/php7/etc/php/modules
124        printf "short_open_tag=on\ncgi.fix_pathinfo=1\n" >$(INSTALLDIR)/php7/etc/php.ini
125        printf "post_max_size = 32M\n" >>$(INSTALLDIR)/php7/etc/php.ini
126        printf "upload_max_filesize = 32M\n" >>$(INSTALLDIR)/php7/etc/php.ini
127        printf "output_buffering = Off\n" >>$(INSTALLDIR)/php7/etc/php.ini
128        printf "extension_dir = /etc/php/modules\n" >>$(INSTALLDIR)/php7/etc/php.ini
129        printf "extension = openssl.so\n" >>$(INSTALLDIR)/php7/etc/php.ini
130        printf "zend_extension = opcache.so\n" >>$(INSTALLDIR)/php7/etc/php.ini
131endif
132ifeq ($(CONFIG_LIGHTTPD),y)
133        install -D php7/sapi/cgi/.libs/php-cgi $(INSTALLDIR)/php7/usr/bin/php-cgi
134        mkdir -p $(INSTALLDIR)/php7/etc/php/modules
135        cp php7/modules/*.so $(INSTALLDIR)/php7/etc/php/modules
136        printf "short_open_tag=on\ncgi.fix_pathinfo=1\n" >$(INSTALLDIR)/php7/etc/php.ini
137        printf "post_max_size = 32M\n" >>$(INSTALLDIR)/php7/etc/php.ini
138        printf "upload_max_filesize = 32M\n" >>$(INSTALLDIR)/php7/etc/php.ini
139        printf "output_buffering = Off\n" >>$(INSTALLDIR)/php7/etc/php.ini
140        printf "extension_dir = /etc/php/modules\n" >>$(INSTALLDIR)/php7/etc/php.ini
141        printf "extension = openssl.so\n" >>$(INSTALLDIR)/php7/etc/php.ini
142        printf "zend_extension = opcache.so\n" >>$(INSTALLDIR)/php7/etc/php.ini
143       
144endif
Note: See TracBrowser for help on using the repository browser.