import py-cups 1.9.38

Python bindings for the CUPS API.

help and ok ajacoutot@
This commit is contained in:
jasper 2008-04-10 10:21:42 +00:00
parent c187d7351f
commit 71202b314f
8 changed files with 105 additions and 0 deletions

41
print/py-cups/Makefile Normal file
View File

@ -0,0 +1,41 @@
# $OpenBSD: Makefile,v 1.1.1.1 2008/04/10 10:21:42 jasper Exp $
SHARED_ONLY= Yes
COMMENT= CUPS bindings for Python
VERSION= 1.9.38
DISTNAME= pycups-${VERSION}
PKGNAME= py-cups-${VERSION}
CATEGORIES= printing
HOMEPAGE= http://cyberelk.net/tim/software/pycups/
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://cyberelk.net/tim/data/pycups/
EXTRACT_SUFX= .tar.bz2
MODULES= converters/libiconv \
lang/python
RUN_DEPENDS= :python-bz2-*:lang/python/${MODPY_VERSION},-bz2
LIB_DEPENDS= cups::print/cups
CFLAGS+= -I${LOCALBASE}/include -DVERSION=\"${VERSION}\"
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV= PYTON="${MODPY_BIN}" \
CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}"
NO_REGRESS= Yes
pre-configure:
@perl -pi -e 's,!!PREFIX!!,${PREFIX},' ${WRKSRC}/setup.py
@perl -pi -e 's,!!LOCALBASE!!,${LOCALBASE},' ${WRKSRC}/cupsconnection.c
.include <bsd.port.mk>

5
print/py-cups/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (pycups-1.9.38.tar.bz2) = zzo9s/H/CL3yySVAhujscA==
RMD160 (pycups-1.9.38.tar.bz2) = iEYd025kMJ6bwU3yT21pIOXa93Q=
SHA1 (pycups-1.9.38.tar.bz2) = bvFR8J7wwOk1Na5dKN2dNUFdoF4=
SHA256 (pycups-1.9.38.tar.bz2) = nG/sDu0ia1uT2w8NmyKa/0pXHfxFQsuFGI5vTxPC78M=
SIZE (pycups-1.9.38.tar.bz2) = 37041

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2008/04/10 10:21:42 jasper Exp $
--- Makefile.orig Mon Mar 17 13:10:22 2008
+++ Makefile Thu Mar 27 15:23:38 2008
@@ -9,7 +9,7 @@ DIST=Makefile test.py \
COPYING NEWS README TODO ChangeLog
cups.so: $(SOURCES)
- CFLAGS=-DVERSION=\\\"$(VERSION)\\\" python setup.py build
+ CFLAGS=-DVERSION=\\\"$(VERSION)\\\" ${PYTHON} setup.py build
mv build/lib*/$@ .
doc: cups.so
@@ -29,7 +29,7 @@ dist:
install:
ROOT= ; \
if [ -n "$$DESTDIR" ]; then ROOT="--root $$DESTDIR"; fi; \
- python setup.py install $$ROOT
+ ${PYTHON} setup.py install $$ROOT
.PHONY: doc clean dist install

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-cupsconnection_c,v 1.1.1.1 2008/04/10 10:21:42 jasper Exp $
--- cupsconnection.c.orig Wed Apr 9 23:35:15 2008
+++ cupsconnection.c Wed Apr 9 23:35:35 2008
@@ -2722,7 +2722,7 @@ Connection_printTestPage (Connection *self, PyObject *
if (!fileobj) {
if ((datadir = getenv ("CUPS_DATADIR")) == NULL)
- datadir = "/usr/share/cups";
+ datadir = "!!LOCALBASE!!/share/cups";
snprintf (filename, sizeof (filename), "%s/data/testprint.ps", datadir);
file = filename;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-cupsppd_c,v 1.1.1.1 2008/04/10 10:21:42 jasper Exp $
--- cupsppd.c.orig Thu Mar 6 11:08:23 2008
+++ cupsppd.c Thu Mar 27 15:36:34 2008
@@ -451,7 +451,7 @@ PPD_nondefaultsMarked (PPD *self)
return PyBool_FromLong (nondefaults_marked);
}
-#ifdef __SVR4
+#if defined(__SVR4) || defined(__OpenBSD__)
/*
* A rudimentary emulation of getline() for systems that dont support it
* natively. Since this is used for PPD file reading, it assumes (possibly

View File

@ -0,0 +1,10 @@
$OpenBSD: patch-setup_py,v 1.1.1.1 2008/04/10 10:21:42 jasper Exp $
--- setup.py.orig Thu Jul 5 18:43:55 2007
+++ setup.py Thu Mar 27 15:25:11 2008
@@ -3,4 +3,5 @@ setup (name="cups", version="1.0",
ext_modules=[Extension("cups",
["cupsmodule.c", "cupsconnection.c",
"cupsppd.c"],
- libraries=["cups"])])
+ libraries=["cups", "iconv"],
+ include_dirs=['/usr/local/include'])])

1
print/py-cups/pkg/DESCR Normal file
View File

@ -0,0 +1 @@
Python bindings for the CUPS API.

3
print/py-cups/pkg/PLIST Normal file
View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2008/04/10 10:21:42 jasper Exp $
lib/python${MODPY_VERSION}/site-packages/cups-1.0-py${MODPY_VERSION}.egg-info
lib/python${MODPY_VERSION}/site-packages/cups.so