1 |
mabi 12/06/11 15:12:54 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: jpgraph-3.0.7-r1.ebuild |
5 |
Removed: jpgraph-3.0.7.ebuild |
6 |
Log: |
7 |
bump to fix security issue (bug #303745), also move jpgraph install path to /usr/share/php/jpgraph (losing the src part) |
8 |
|
9 |
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.23 dev-php/jpgraph/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-php/jpgraph/ChangeLog?rev=1.23&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-php/jpgraph/ChangeLog?rev=1.23&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-php/jpgraph/ChangeLog?r1=1.22&r2=1.23 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/dev-php/jpgraph/ChangeLog,v |
21 |
retrieving revision 1.22 |
22 |
retrieving revision 1.23 |
23 |
diff -u -r1.22 -r1.23 |
24 |
--- ChangeLog 28 Jan 2012 14:04:18 -0000 1.22 |
25 |
+++ ChangeLog 11 Jun 2012 15:12:54 -0000 1.23 |
26 |
@@ -1,6 +1,13 @@ |
27 |
# ChangeLog for dev-php5/jpgraph |
28 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/dev-php/jpgraph/ChangeLog,v 1.22 2012/01/28 14:04:18 mabi Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/dev-php/jpgraph/ChangeLog,v 1.23 2012/06/11 15:12:54 mabi Exp $ |
31 |
+ |
32 |
+*jpgraph-3.0.7-r1 (11 Jun 2012) |
33 |
+ |
34 |
+ 11 Jun 2012; Matti Bickel <mabi@g.o> +files/cve-2009-4422.patch, |
35 |
+ +jpgraph-3.0.7-r1.ebuild, -jpgraph-3.0.7.ebuild: |
36 |
+ bump to fix security issue (bug #303745), also move jpgraph install path to |
37 |
+ /usr/share/php/jpgraph (losing the src part) |
38 |
|
39 |
28 Jan 2012; Matti Bickel <mabi@g.o> jpgraph-3.0.7.ebuild: |
40 |
EAPI bump |
41 |
|
42 |
|
43 |
|
44 |
1.1 dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: jpgraph-3.0.7-r1.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2012 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/dev-php/jpgraph/jpgraph-3.0.7-r1.ebuild,v 1.1 2012/06/11 15:12:54 mabi Exp $ |
54 |
|
55 |
EAPI="4" |
56 |
|
57 |
inherit eutils |
58 |
|
59 |
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" |
60 |
|
61 |
DESCRIPTION="Fully OO graph drawing library for PHP." |
62 |
HOMEPAGE="http://www.aditus.nu/jpgraph/" |
63 |
SRC_URI="http://hem.bredband.net/jpgraph2/${P}.tar.bz2" |
64 |
LICENSE="QPL-1.0" |
65 |
SLOT="0" |
66 |
IUSE="truetype +examples" |
67 |
|
68 |
DEPEND="" |
69 |
RDEPEND="truetype? ( media-fonts/corefonts ) |
70 |
dev-lang/php[gd] |
71 |
" |
72 |
S="${WORKDIR}" |
73 |
|
74 |
[[ -z "${JPGRAPH_CACHEDIR}" ]] && JPGRAPH_CACHEDIR="/var/cache/jpgraph-php5/" |
75 |
|
76 |
pkg_setup() { |
77 |
# check to which user:group the cache dir will go |
78 |
if has_version "www-servers/apache" ; then |
79 |
HTTPD_USER="apache" |
80 |
HTTPD_GROUP="apache" |
81 |
einfo "Configuring ${JPGRAPH_CACHEDIR} for Apache." |
82 |
else |
83 |
HTTPD_USER="${HTTPD_USER:-root}" |
84 |
HTTPD_GROUP="${HTTPD_GROUP:-root}" |
85 |
ewarn "No Apache webserver detected - ${JPGRAPH_CACHEDIR} will be" |
86 |
ewarn "owned by ${HTTPD_USER}:${HTTPD_GROUP} instead." |
87 |
ewarn "It this is not what you want, you can define" |
88 |
ewarn "HTTPD_USER and HTTPD_GROUP variables and re-emerge ${PN}." |
89 |
epause 3 |
90 |
fi |
91 |
} |
92 |
|
93 |
src_prepare() { |
94 |
epatch "${FILESDIR}/cve-2009-4422.patch" |
95 |
} |
96 |
|
97 |
src_install() { |
98 |
# some patches to adapt the config to Gentoo |
99 |
einfo "Patching jpg-config.inc.php" |
100 |
|
101 |
# patch 1: |
102 |
# make jpgraph use the correct group for file permissions |
103 |
|
104 |
sed -i "s|^define('CACHE_FILE_GROUP','www');|define('CACHE_FILE_GROUP','${HTTPD_GROUP}');|" src/jpg-config.inc.php \ |
105 |
|| die "sed failed in patch 1" |
106 |
|
107 |
# patch 2: |
108 |
# make jpgraph use the correct directory for caching |
109 |
|
110 |
sed -i "s|.*define('CACHE_DIR','/tmp/jpgraph_cache/');|define('CACHE_DIR','${JPGRAPH_CACHEDIR}');|" src/jpg-config.inc.php \ |
111 |
|| die "sed failed in patch 2" |
112 |
|
113 |
# patch 3: |
114 |
# make jpgraph use the correct directory for the corefonts if the truetype USE flag is set |
115 |
|
116 |
if use truetype ; then |
117 |
sed -i "s|.*define('TTF_DIR','/usr/X11R6/lib/X11/fonts/truetype/');|define('TTF_DIR','/usr/share/fonts/corefonts/');|" src/jpg-config.inc.php \ |
118 |
|| die "sed failed in patch 3" |
119 |
fi |
120 |
|
121 |
# patch 4: |
122 |
# disable READ_CACHE in jpgraph |
123 |
sed -i "s|^define('READ_CACHE',true);|define('READ_CACHE',false);|" src/jpg-config.inc.php \ |
124 |
|| die "sed failed in patch 4" |
125 |
|
126 |
# install php files |
127 |
einfo "Building list of files to install" |
128 |
insinto "/usr/share/php/${PN}" |
129 |
doins -r src/* |
130 |
|
131 |
# remove unwanted examples |
132 |
use examples || rm -rf "${D}/usr/share/php/${PN}/Examples" |
133 |
|
134 |
# install documentation |
135 |
einfo "Installing documentation" |
136 |
dodoc -r docportal/* |
137 |
dodoc README |
138 |
|
139 |
# setup the cache dir |
140 |
einfo "Setting up the cache dir" |
141 |
keepdir "${JPGRAPH_CACHEDIR}" |
142 |
fowners ${HTTPD_USER}:${HTTPD_GROUP} "${JPGRAPH_CACHEDIR}" |
143 |
fperms 750 "${JPGRAPH_CACHEDIR}" |
144 |
} |