summaryrefslogtreecommitdiff
path: root/databases/py-PyGreSQL/files
diff options
context:
space:
mode:
Diffstat (limited to 'databases/py-PyGreSQL/files')
-rw-r--r--databases/py-PyGreSQL/files/Makefile26
-rw-r--r--databases/py-PyGreSQL/files/patch-configure11
-rw-r--r--databases/py-PyGreSQL/files/patch-pgdb.py28
-rw-r--r--databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile28
4 files changed, 39 insertions, 54 deletions
diff --git a/databases/py-PyGreSQL/files/Makefile b/databases/py-PyGreSQL/files/Makefile
deleted file mode 100644
index 5b5c5edbdba7..000000000000
--- a/databases/py-PyGreSQL/files/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# grr, commit_prep wants the next line
-# $FreeBSD$
-.SUFFIXES: .py .pyc
-
-all: _pgmodule.so pg.pyc pgdb.pyc
-
-install:
- @${MKDIR} ${PYTHON_SITELIBDIR}
- ${BSD_INSTALL_PROGRAM} _pgmodule.so ${PYTHON_SITELIBDIR}
- ${BSD_INSTALL_DATA} pg.py pg.pyc pgdb.py pgdb.pyc \
- ${PYTHON_SITELIBDIR}
-
-clean:
- rm -f *.so *.o *.pyc
-
-_pgmodule.so: pgmodule.o
- ${LD} -Bshareable -lc_r -L${PYTHON_LIBDIR}/config \
- -l${PYTHON_VERSION} -L${PREFIX}/lib -L${PREFIX}/pgsql/lib -lpq \
- ${.ALLSRC} -o ${.TARGET}
-
-pgmodule.o: pgmodule.c
- ${CC} -c -I${PREFIX}/include/${PYTHON_VERSION} \
- -I${PREFIX}/include -I${PREFIX}/pgsql/include ${.ALLSRC}
-
-.py.pyc:
- ${SETENV} PYTHONPATH=${.CURDIR} ${PYTHON} -c 'import ${.IMPSRC:.py=}'
diff --git a/databases/py-PyGreSQL/files/patch-configure b/databases/py-PyGreSQL/files/patch-configure
new file mode 100644
index 000000000000..d52de30b0cc7
--- /dev/null
+++ b/databases/py-PyGreSQL/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig Tue Oct 1 05:34:27 2002
++++ configure Wed Oct 23 15:50:31 2002
+@@ -3239,7 +3239,7 @@
+ echo $ac_n "checking Python installation directories""... $ac_c" 1>&6
+ echo "configure:3241: checking Python installation directories" >&5
+ python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
+-python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
++python_prefix="${prefix}"
+ python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
+ python_configdir="${python_execprefix}/lib/python${python_version}/config"
+ python_moduledir="${python_prefix}/lib/python${python_version}/site-packages"
diff --git a/databases/py-PyGreSQL/files/patch-pgdb.py b/databases/py-PyGreSQL/files/patch-pgdb.py
deleted file mode 100644
index 1210ef8e5fa0..000000000000
--- a/databases/py-PyGreSQL/files/patch-pgdb.py
+++ /dev/null
@@ -1,28 +0,0 @@
---- pgdb.py.orig Sun Nov 5 20:15:26 2000
-+++ pgdb.py Thu Nov 29 17:38:24 2001
-@@ -58,7 +58,7 @@
- import string
- import exceptions
- import types
--import DateTime
-+import mx.DateTime
- import time
-
- ### module constants
-@@ -384,13 +384,13 @@
-
- # mandatory type helpers
- def Date(year, month, day):
-- return DateTime.DateTime(year, month, day)
-+ return mx.DateTime.DateTime(year, month, day)
-
- def Time(hour, minute, second):
-- return DateTime.TimeDelta(hour, minute, second)
-+ return mx.DateTime.TimeDelta(hour, minute, second)
-
- def Timestamp(year, month, day, hour, minute, second):
-- return DateTime.DateTime(year, month, day, hour, minute, second)
-+ return mx.DateTime.DateTime(year, month, day, hour, minute, second)
-
- def DateFromTicks(ticks):
- return apply(Date, time.localtime(ticks)[:3])
diff --git a/databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile b/databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile
new file mode 100644
index 000000000000..6b74261b7c1f
--- /dev/null
+++ b/databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile
@@ -0,0 +1,28 @@
+--- src/interfaces/python/GNUmakefile.orig Thu Dec 13 20:39:04 2001
++++ src/interfaces/python/GNUmakefile Wed Oct 23 15:52:18 2002
+@@ -34,9 +34,9 @@
+ echo "*** become the appropriate user, and do '$(MAKE) install'."; }
+
+ install: all installdirs
+- @if test -w $(DESTDIR)$(python_moduleexecdir) && test -w $(DESTDIR)$(python_moduledir); then \
+- echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX)"; \
+- $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX); \
++ @if test -w $(DESTDIR)$(python_moduledir); then \
++ echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX)"; \
++ $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX); \
+ \
+ echo "$(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py"; \
+ $(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py; \
+@@ -48,10 +48,10 @@
+ fi
+
+ installdirs:
+- $(mkinstalldirs) $(DESTDIR)$(python_moduleexecdir) $(DESTDIR)$(python_moduledir)
++ $(mkinstalldirs) $(DESTDIR)$(python_moduledir)
+
+ uninstall:
+- rm -f $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX) \
++ rm -f $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX) \
+ $(DESTDIR)$(python_moduledir)/pg.py \
+ $(DESTDIR)$(python_moduledir)/pgdb.py
+