1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00
freebsd-ports/databases/py-pyPgSQL/Makefile
Philip M. Gollucci bcc0626319 PostgreSQL 8.3.1 has changed it's bytea encoding.
* in PostgreSQL 8.3.1 Release note
Make encode(bytea, 'escape') convert all high-bit-set byte values into \nnn octal escape sequences (Tom)

This is necessary to avoid encoding problems when the database encoding is multi-byte. This change could pose compatibility issues for applications that are expecting specific results from encode.

but pyPgSQL escape bytea encode as it's own implementments. PostgreSQL says that it may make failure(see PQescapeBytea documentation).

in PQescapeBytea function documentation:
"The only difference from PQescapeByteaConn is that PQescapeBytea does not take a PGconn parameter. Because of this, it cannot adjust its behavior depending on the connection properties (in particular, whether standard-conforming strings are enabled) and therefore it might give the wrong results. Also, it has no way to return an error message on failure."

Patch is included upstream already

PR:             ports/122616
Submitted by:   "Choe, Cheng-Dae" <whitekid@gmail.com>
2010-09-10 04:18:06 +00:00

57 lines
1.4 KiB
Makefile

# New ports collection makefile for: py-pypgsql
# Date created: 01 Nov 2001
# Whom: Gerhard Haering <gerhard.haering@gmx.de>
#
# $FreeBSD$
#
PORTNAME= pyPgSQL
PORTVERSION= 2.5.1
PORTREVISION= 4
CATEGORIES= databases python
MASTER_SITES= SF
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= python@FreeBSD.org
COMMENT= A Python DB-API 2 compliant library for using PostgreSQL databases
RUN_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
USE_PGSQL= yes
USE_PYTHON= yes
USE_PYDISTUTILS= yes
DOCS= Announce ChangeLog README README.html
EXAMPLES= examples/*.py
DATETIME_DEP= ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
OPTIONS= BYTEA_CONN "Apply Bytea connection patch" On
# bypass infrastructure bug
OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
.if !defined(WITH_BYTEA_CONN)
PATCH_SITES= http://sourceforge.net/tracker/download.php?group_id=16528&atid=316528&file_id=273956&aid=1939119/
PATCHFILES= pyPgSQL-patch_byteaconn
.endif
DOCSDIR= ${PREFIX}/share/doc/py-pyPgSQL
EXAMPLESDIR= ${PREFIX}/share/examples/py-pyPgSQL
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for f in ${DOCS}
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
.for f in ${EXAMPLES}
@${INSTALL_DATA} ${WRKSRC}/${f} ${EXAMPLESDIR}
.endfor
.endif
.include <bsd.port.mk>