View | Details | Raw Unified | Return to bug 61597
Collapse All | Expand All

(-)Makefile (-18 / +17 lines)
Lines 6-39 Link Here
6
#
6
#
7
7
8
PORTNAME=	PyGreSQL
8
PORTNAME=	PyGreSQL
9
PORTREVISION=	0
9
PORTVERSION=	3.4
10
PORTEPOCH=	1
10
CATEGORIES=	databases python
11
CATEGORIES=	databases python
12
MASTER_SITES=	ftp://ftp.pygresql.org/pub/distrib/
11
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
13
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
14
EXTRACT_SUFX=	.tgz
12
15
13
MAINTAINER=	girgen@pingpong.net
16
MAINTAINER=	girgen@pingpong.net
14
COMMENT=	A Python interface to PostgreSQL, including a DP-API 2.0 wrapper
17
COMMENT=	A Python interface to PostgreSQL, both classic interface and DP-API 2.0
15
18
16
BUILD_DEPENDS=	${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
19
BUILD_DEPENDS=	${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
17
RUN_DEPENDS=	${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
20
RUN_DEPENDS=	${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
18
LIB_DEPENDS=	pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
21
LIB_DEPENDS=	pq:${PORTSDIR}/${POSTGRESQL_PORT}
19
22
20
POSTGRESQL_PORT?=	databases/postgresql7
23
POSTGRESQL_PORT?=	databases/postgresql7
21
POSTGRESQL_SUBPORT=YES
24
USE_PYTHON=	yes
25
DATETIME_DEP=	${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
26
USE_REINPLACE=yes
22
27
23
WRKSRC=		${WRKDIR}/postgresql-${PORTVERSION}
28
pre-build:
29
	@ cd ${WRKSRC} ; ${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' setup.py
24
30
25
# The PyGreSQL distfile is nowhere to be found, but exists in
31
do-build:
26
# postgresql-7.3 distribution so do not be alarmed if you use
32
	@ cd ${WRKSRC} ; ${PYTHON_CMD} setup.py build
27
# a newer version of postgresql
28
.include <${.CURDIR}/../postgresql73/Makefile>
29
33
30
USE_PYTHON=	yes
34
do-install:
31
CONFIGURE_ARGS=	--with-python --prefix=${PREFIX}
35
	@ cd ${WRKSRC} ; ${PYTHON_CMD} setup.py install
32
MAKE_ARGS+=	-C src/interfaces/python
33
CFLAGS+=	-L${LOCALBASE}/lib
34
MAKEFILE=	GNUmakefile
35
36
DATETIME_DEP=	${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
37
36
38
post-install:
37
post-install:
39
	@ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -lf \
38
	@ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -lf \
Lines 41-49 Link Here
41
	@ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -lf \
40
	@ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -lf \
42
	  ${PYTHONPREFIX_SITELIBDIR}
41
	  ${PYTHONPREFIX_SITELIBDIR}
43
.if !defined(NOPORTDOCS)
42
.if !defined(NOPORTDOCS)
44
.for docfile in Announce ChangeLog README
43
.for docfile in Announce ChangeLog
45
	@ ${MKDIR} ${DOCSDIR}
44
	@ ${MKDIR} ${DOCSDIR}
46
	  ${INSTALL_DATA} ${WRKSRC}/src/interfaces/python/${docfile} \
45
	  ${INSTALL_DATA} ${WRKSRC}/${docfile} \
47
	  ${DOCSDIR}
46
	  ${DOCSDIR}
48
.endfor
47
.endfor
49
.endif
48
.endif
(-)pkg-plist (-2 / +1 lines)
Lines 1-7 Link Here
1
%%PORTDOCS%%%%DOCSDIR%%/Announce
1
%%PORTDOCS%%%%DOCSDIR%%/Announce
2
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
2
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
3
%%PORTDOCS%%%%DOCSDIR%%/README
3
%%PYTHON_SITELIBDIR%%/_pg.so
4
%%PYTHON_SITELIBDIR%%/_pgmodule.so
5
%%PYTHON_SITELIBDIR%%/pg.py
4
%%PYTHON_SITELIBDIR%%/pg.py
6
%%PYTHON_SITELIBDIR%%/pg.pyc
5
%%PYTHON_SITELIBDIR%%/pg.pyc
7
%%PYTHON_SITELIBDIR%%/pg.pyo
6
%%PYTHON_SITELIBDIR%%/pg.pyo
(-)files/patch-setyp.py (+13 lines)
Added Link Here
1
--- setup.py~	Tue Jan 13 13:29:57 2004
2
+++ setup.py	Tue Jan 13 16:14:50 2004
3
@@ -30,8 +30,8 @@
4
 	optional_libs=[ 'libpqdll', 'wsock32', 'advapi32' ]
5
 	data_files = [ 'libpq.dll' ]
6
 else:
7
-	include_dirs=['/usr/include/pgsql']
8
-	library_dirs=['/usr/lib/pgsql']
9
+	include_dirs=['%%LOCALBASE%%/include', '%%LOCALBASE%%/include/postgresql', '%%LOCALBASE%%/include/postgresql/server']
10
+	library_dirs=['%%LOCALBASE%%/lib']
11
 	optional_libs=['pq']
12
 	data_files = []
13
 
(-)files/patch-src::interfaces::python::GNUmakefile (-28 lines)
Removed Link Here
1
--- src/interfaces/python/GNUmakefile.orig	Thu Dec 13 20:39:04 2001
2
+++ src/interfaces/python/GNUmakefile	Wed Oct 23 15:52:18 2002
3
@@ -34,9 +34,9 @@
4
 echo "*** become the appropriate user, and do '$(MAKE) install'."; }
5
 
6
 install: all installdirs
7
-	@if test -w $(DESTDIR)$(python_moduleexecdir) && test -w $(DESTDIR)$(python_moduledir); then \
8
-	  echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX)"; \
9
-	  $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX); \
10
+	@if test -w $(DESTDIR)$(python_moduledir); then \
11
+	  echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX)"; \
12
+	  $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX); \
13
 	\
14
 	  echo "$(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py"; \
15
 	  $(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py; \
16
@@ -48,10 +48,10 @@
17
 	fi
18
 
19
 installdirs:
20
-	$(mkinstalldirs) $(DESTDIR)$(python_moduleexecdir) $(DESTDIR)$(python_moduledir)
21
+	$(mkinstalldirs) $(DESTDIR)$(python_moduledir)
22
 
23
 uninstall:
24
-	rm -f $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX) \
25
+	rm -f $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX) \
26
 	      $(DESTDIR)$(python_moduledir)/pg.py \
27
 	      $(DESTDIR)$(python_moduledir)/pgdb.py
28
 
(-)files/patch-configure (-11 lines)
Removed Link Here
1
--- configure.orig	Tue Oct  1 05:34:27 2002
2
+++ configure	Wed Oct 23 15:50:31 2002
3
@@ -3239,7 +3239,7 @@
4
 echo $ac_n "checking Python installation directories""... $ac_c" 1>&6
5
 echo "configure:3241: checking Python installation directories" >&5
6
 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
7
-python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
8
+python_prefix="${prefix}"
9
 python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
10
 python_configdir="${python_execprefix}/lib/python${python_version}/config"
11
 python_moduledir="${python_prefix}/lib/python${python_version}/site-packages"

Return to bug 61597