Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-php/files/, app-eselect/eselect-php/
Date: Fri, 11 Dec 2015 01:08:19
Message-Id: 1449796040.983c8fcbdf2b0cea1236c87ac84bf4874a916271.mjo@gentoo
1 commit: 983c8fcbdf2b0cea1236c87ac84bf4874a916271
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 11 01:07:02 2015 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 11 01:07:20 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=983c8fcb
7
8 app-eselect/eselect-php: version bump adding v0.8.1.
9
10 This is another attempt at php-7.x support in apache2. This new
11 version is already masked for testing, which is good because it
12 requires some configuration changes to apache. Upgraders should
13 read the elogs.
14
15 Gentoo-Bug: 552156
16
17 Package-Manager: portage-2.2.20.1
18
19 app-eselect/eselect-php/Manifest | 1 +
20 app-eselect/eselect-php/eselect-php-0.8.1.ebuild | 54 ++++++++++++++++++++++++
21 app-eselect/eselect-php/files/70_mod_php.conf | 26 ++++++++++++
22 3 files changed, 81 insertions(+)
23
24 diff --git a/app-eselect/eselect-php/Manifest b/app-eselect/eselect-php/Manifest
25 index 9c9280e..249fc20 100644
26 --- a/app-eselect/eselect-php/Manifest
27 +++ b/app-eselect/eselect-php/Manifest
28 @@ -1,2 +1,3 @@
29 DIST eselect-php-0.7.1.bz2 2251 SHA256 10aa400e2d08bc71989366993f12ddb546a0ea29f191c40e37beba1d11d7abd7 SHA512 a6b4c1475dda9f368d799db7658c50cef7d6f71482a53a186fb1394e7ea1fff3c0ef123c82b7ca4d1e45aadb0a034d36f213fc9450766878a60d28639761cb3d WHIRLPOOL a4e45492068616ff30fd888b0cc64441a6eb6e6656e0107d00bd2cf15360dce15052d4d62089ab89d43e6bb36e126529aa101c70e8bd94a9fc916a5369463e3b
30 DIST eselect-php-0.8.0.tar.xz 43932 SHA256 1ddc6aafe269ebbf3006737701403bd2c7b324b9eea0fcbdc91e85a856f8a10d SHA512 53c735275264742542d3909ae2994d0720bc961533a3df5373dbc7a7a1f04e91591f4e8356c268954420487d3ead4006cc5d6f361ef0ac2836f7f126556e960d WHIRLPOOL 94deba4a5bd4d0d85c8f3afc96ac30a69cca5db95014b2fd8701495cc83488389302f640065e923cabd40c95f97f792dd173337cc33c7d38441956049fb90cda
31 +DIST eselect-php-0.8.1.tar.xz 44412 SHA256 aa118e936bff176fe64911d68bb72e6e9e03d33c106674169396826a3063a962 SHA512 3679c8ac4d980424a108d93c8e2e575b93196d7140f31f900e7f925ab26cf821233d12b9083fd7bdd7bd596c3b59544e972660be8ffce7c24d4a7980fbe5f770 WHIRLPOOL 19c6f05a02aa1a40586f352822679f7e655200374a100834d4370678b35856d5e255b0d83f07eafd69481ee3ee72cb976665e6c2b2df990be00b54bfa53a5a92
32
33 diff --git a/app-eselect/eselect-php/eselect-php-0.8.1.ebuild b/app-eselect/eselect-php/eselect-php-0.8.1.ebuild
34 new file mode 100644
35 index 0000000..d7a5283
36 --- /dev/null
37 +++ b/app-eselect/eselect-php/eselect-php-0.8.1.ebuild
38 @@ -0,0 +1,54 @@
39 +# Copyright 1999-2015 Gentoo Foundation
40 +# Distributed under the terms of the GNU General Public License v2
41 +# $Id$
42 +
43 +EAPI=5
44 +
45 +inherit depend.apache systemd
46 +
47 +DESCRIPTION="PHP eselect module"
48 +HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
49 +SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
50 +
51 +LICENSE="GPL-2"
52 +SLOT="0"
53 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
54 +IUSE="fpm apache2"
55 +
56 +# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
57 +RDEPEND="app-admin/eselect
58 + apache2? ( www-servers/apache[apache2_modules_dir] )"
59 +
60 +want_apache
61 +
62 +src_install() {
63 + default
64 +
65 + if use apache2 ; then
66 + insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
67 + doins "${FILESDIR}/70_mod_php.conf"
68 + fi
69 +
70 + if use fpm ; then
71 + newinitd "${FILESDIR}/php-fpm.init-r4" "php-fpm"
72 + systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
73 + exeinto /usr/libexec
74 + doexe "${FILESDIR}/php-fpm-launcher"
75 + fi
76 +}
77 +
78 +pkg_postinst() {
79 + if use apache2 ; then
80 + elog
81 + elog "If you are upgrading, be warned that our mod_php configuration"
82 + elog "file has changed! You should now define -DPHP for the apache2"
83 + elog "daemon, and inspect the new 70_mod_php.conf which has been"
84 + elog "installed. Module loading involves eselect as of this version."
85 + elog
86 + elog "You must run eselect at least once to choose your apache2 target"
87 + elog "before the new configuration will work. Afterwards, and after you"
88 + elog "have reviewed your new configuration, you are advised to remove"
89 + elog "the obsolete 70_mod_php5.conf file."
90 + elog
91 + fi
92 +}
93
94 diff --git a/app-eselect/eselect-php/files/70_mod_php.conf b/app-eselect/eselect-php/files/70_mod_php.conf
95 new file mode 100644
96 index 0000000..cf996fa
97 --- /dev/null
98 +++ b/app-eselect/eselect-php/files/70_mod_php.conf
99 @@ -0,0 +1,26 @@
100 +<IfDefine PHP>
101 + # The mod_php.so symlink is controlled by
102 + # eselect-php. However, the module name changed from
103 + # php5_module to php7_module so we can't blindly load whatever
104 + # is there. Instead we let eselect-php manage a small
105 + # configuration file that loads the appropriate module.
106 + #
107 + # This is relative to ServerRoot (see httpd.conf).
108 + Include ../../../var/lib/eselect-php/mod_php.conf
109 +
110 + # Tell apache that mod_php should handle PHP files.
111 + #
112 + # NOTE: Avoiding AddHandler/AddType for security (bug
113 + # #538822). Please read the related news item!
114 + <FilesMatch "\.(php|php[57]|phtml)$">
115 + SetHandler application/x-httpd-php
116 + </FilesMatch>
117 +
118 + # PHP source files which are meant to be displayed as
119 + # syntax-highlighted source code.
120 + <FilesMatch "\.phps$">
121 + SetHandler application/x-httpd-php-source
122 + </FilesMatch>
123 +
124 + DirectoryIndex index.php index.phtml
125 +</IfDefine>