Changeset - 91c0b7fdc36c
[Not reviewed]
default
0 0 4
Nathan Brink (binki) - 14 years ago 2010-12-31 16:55:00
ohnobinki@ohnopublishing.net
dev-php/phpcaptcha: Add phpcaptcha-2.0.1 with patch to allow position independence of the PHP code.

(Portage version: 2.2.0_alpha2-r1/hg/Linux x86_64, signed Manifest commit with key 6BA81050)
4 files changed with 125 insertions and 0 deletions:
0 comments (0 inline, 0 general)
dev-php/phpcaptcha/Manifest
Show inline comments
 
new file 100644
 
-----BEGIN PGP SIGNED MESSAGE-----
 
Hash: SHA256
 

	
 
AUX phpcaptcha-2.0.1-pic.patch 1612 RMD160 20db81c0ad3b2756f8db760091ed02c5be6c56d0 SHA1 6a6cf3c2f278bb34704d89c55ffb1133a3305c1b SHA256 f02930084ac93944db6b656118c82ba005a2477c8804f0af3916f6e570c8c27f
 
DIST phpcaptcha-2.0.1.tar.gz 1225132 RMD160 1193ffa146c0c7e1fd882b6b62e3e63422c847a9 SHA1 f628ffc95638499b967251d31ab3ea8b7aa76444 SHA256 ec40eccac4833a754f67a7a83ab82cf5fcbed43d2682ae060ced87de84d20779
 
EBUILD phpcaptcha-2.0.1.ebuild 813 RMD160 9e3e7aa7b6ec9ab798d932fb0c9780a7fa677a42 SHA1 743b2ab914a8aa9d8bd7e6e781ac51b9ca0099bd SHA256 20b5e9f64e17b96224ebad7b21899e2b3b1f547839478ca1a82895e9d0eab36c
 
MISC metadata.xml 214 RMD160 bb0d8258795c3f73de94e0a8bc00e682d501385e SHA1 3deb0e98b60dbe29b548ad26852379fbdd07bb23 SHA256 2fff4b9c64633c18ee5ee3f2ff48f30d8310d56e414f09c0a1eacf4396dc1535
 
-----BEGIN PGP SIGNATURE-----
 
Version: GnuPG v2.0.14 (GNU/Linux)
 

	
 
iQIcBAEBCAAGBQJNHlEzAAoJEHQ6UuhrqBBQufsQAI6IBkCNlPbaXsxcS7UFRjvB
 
+HWSYRZEwVcsxRP9pey5jWE/nuoKY8731DCz6tsxkQV6znKL1GG9K94b+B027/7P
 
Vf6fjKczNMIjD1GBn4DON1BBSaLogvMRAJq5zTn2+l2b54pbtVdd+KIbl98nQJcy
 
ThIwVkbbx57tx4E4H2O67bm4GCPS6WCan+o0MRelRoTAbFYjgASlaJlR/ybT0Rfb
 
moiJR19LVRHEnYZ3kqtscHd8VeFf8kLWmwsAc2PkLrgw7r+54ppF+jJYhDFtrMkR
 
po2H9iWwElI0EZXpLZkmqO8gPAjXSYkozkvydbcLaRYpzn512+hMrl3OA42OrdsN
 
g9pAREHgnaEM8hP7D6g6hljUveIYF4RSB+YQBVJTbFt+YwsHmTbWhfnx1oCnVLfb
 
zSRNC4JAg1bQ7U8tenQlQAelrq14L5bIjPw24s2AmrUiU0UcneOz4G13ZapkZowj
 
HLkynRR1JsKGDnrVScs17DA/zX6WsBNS/C+ItHaOk9Nn56m8qTz9nNB85Qp8TV25
 
vj1oZYgGBPoi0HaO9QDT0gKf9rAw2MBaWJQb0djbI3aSWONs26jPJ5YHxTMI+IQp
 
FkqxcZyFaOFMtlbh7zAoUyO7rPpDQgIXRuJh3noMaLvC1FG0E7W6htuIUmxRq0vY
 
8ci6gqUoQ3Z5NWsUEqD7
 
=E7bc
 
-----END PGP SIGNATURE-----
dev-php/phpcaptcha/files/phpcaptcha-2.0.1-pic.patch
Show inline comments
 
new file 100644
 
diff -r aa5e56e0f3bc securimage.php
 
--- a/securimage/securimage.php	Fri Dec 31 16:19:41 2010 -0500
 
+++ b/securimage/securimage.php	Fri Dec 31 16:24:07 2010 -0500
 
@@ -107,6 +107,13 @@
 
 class Securimage {
 
 
 
 	/**
 
+	 * The path which contains securimage.php.
 
+	 *
 
+	 * @var string	The path to the securimage installation.
 
+	 */
 
+	var $basepath;
 
+
 
+	/**
 
 	 * The desired width of the CAPTCHA image.
 
 	 *
 
 	 * @var int
 
@@ -513,6 +520,9 @@
 
 			session_start();
 
 		}
 
 
 
+		// Calculated value
 
+		$this->basepath = dirname(__FILE__);
 
+
 
 		// Set Default Values
 
 		$this->image_width   = 230;
 
 		$this->image_height  = 80;
 
@@ -520,7 +530,7 @@
 
 
 
 		$this->code_length   = 6;
 
 		$this->charset       = 'ABCDEFGHKLMNPRSTUVWYZabcdefghklmnprstuvwyz23456789';
 
-		$this->wordlist_file = './words/words.txt';
 
+		$this->wordlist_file = $this->basepath . '/words/words.txt';
 
 		$this->use_wordlist  = false;
 
 
 
 		$this->gd_font_file  = 'gdfonts/automatic.gdf';
 
@@ -528,7 +538,7 @@
 
 		$this->gd_font_size  = 24;
 
 		$this->text_x_start  = 15;
 
 
 
-		$this->ttf_file      = './AHGBold.ttf';
 
+		$this->ttf_file      = $this->basepath . '/AHGBold.ttf';
 
 
 
 		$this->perturbation       = 0.75;
 
 		$this->iscale             = 5;
 
@@ -553,9 +563,9 @@
 
 
 
 		$this->image_signature = '';
 
 		$this->signature_color = new Securimage_Color(0x20, 0x50, 0xCC);
 
-		$this->signature_font  = './AHGBold.ttf';
 
+		$this->signature_font  = $this->basepath . '/AHGBold.ttf';
 
 
 
-		$this->audio_path   = './audio/';
 
+		$this->audio_path   = $this->basepath . '/audio/';
 
 		$this->audio_format = 'mp3';
 
 		$this->session_name = '';
 
 		$this->expiry_time  = 900;
dev-php/phpcaptcha/metadata.xml
Show inline comments
 
new file 100644
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 
<pkgmetadata>
 
	<maintainer>
 
		<email>ohnobinki@ohnopublishing.net</email>
 
	</maintainer>
 
</pkgmetadata>
dev-php/phpcaptcha/phpcaptcha-2.0.1.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2010 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.3.9.ebuild,v 1.12 2009/11/04 12:12:05 arfrever Exp $
 

	
 
EAPI="2"
 

	
 
inherit eutils
 

	
 
DESCRIPTION="PHP captcha creator and validator library"
 
HOMEPAGE="http://phpcaptcha.org/"
 
SRC_URI="mirror://ohnoproto/${P}.tar.gz"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~amd64"
 
IUSE=""
 

	
 
S=${WORKDIR}
 

	
 
src_prepare() {
 
	epatch "${FILESDIR}"/${P}-pic.patch
 

	
 
	mkdir securimage-doc || die
 
	mv -v securimage/README* securimage-doc/ || die
 

	
 
	# it's good that the license is distributed, we just don't want to
 
	# install it below.
 
	rm -v securimage/LICENSE.txt || die
 
}
 

	
 
src_install()
 
{
 
	insinto /usr/share/php
 
	doins -r securimage || die
 

	
 
	dodoc securimage-doc/* || die
 
}
0 comments (0 inline, 0 general)