aboutsummaryrefslogtreecommitdiff
path: root/print/system-config-printer-kde
diff options
context:
space:
mode:
authorMax Brazhnikov <makc@FreeBSD.org>2009-05-09 19:38:16 +0000
committerMax Brazhnikov <makc@FreeBSD.org>2009-05-09 19:38:16 +0000
commitc4efb99db9a863fc5634862ec14c82f8eeeae58f (patch)
tree93caf9fe09ed5fca76b36388a4fe15de2b67e9e3 /print/system-config-printer-kde
parentb1df87c2ed3148118da4eb634135e84b097a5983 (diff)
downloadports-c4efb99db9a863fc5634862ec14c82f8eeeae58f.tar.gz
ports-c4efb99db9a863fc5634862ec14c82f8eeeae58f.zip
Notes
Diffstat (limited to 'print/system-config-printer-kde')
-rw-r--r--print/system-config-printer-kde/Makefile43
-rw-r--r--print/system-config-printer-kde/files/patch-system-config-printer-kde__cmake-modules__FindSystemConfigPrinter.py11
-rw-r--r--print/system-config-printer-kde/files/patch-system-config-printer-kde__system-config-printer-kde.py38
-rw-r--r--print/system-config-printer-kde/pkg-descr4
-rw-r--r--print/system-config-printer-kde/pkg-plist6
5 files changed, 102 insertions, 0 deletions
diff --git a/print/system-config-printer-kde/Makefile b/print/system-config-printer-kde/Makefile
new file mode 100644
index 000000000000..86f749c4e3fd
--- /dev/null
+++ b/print/system-config-printer-kde/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: system-config-printer-kde
+# Date created: 2009-05-04
+# Whom: Max Brazhnikov <makc@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= system-config-printer-kde
+PORTVERSION= ${KDE4_VERSION}
+CATEGORIES= print kde
+MASTER_SITES= ${MASTER_SITE_KDE}
+MASTER_SITE_SUBDIR= ${KDE4_BRANCH}/${PORTVERSION}/src
+DISTNAME= kdeadmin-${PORTVERSION}
+DIST_SUBDIR= KDE
+
+MAINTAINER= kde@FreeBSD.org
+COMMENT= KDE4 frontend for system-config-printer
+
+BUILD_DEPENDS= system-config-printer:${PORTSDIR}/print/system-config-printer \
+ ${PYTHON_SITELIBDIR}/cups.so:${PORTSDIR}/print/py-cups \
+ ${PYTHON_KDE4PREFIX_SITELIBDIR}/PyKDE4/kdeui.so:${PORTSDIR}/devel/kdebindings4-python-pykde4
+RUN_DEPENDS:= ${BUILD_DEPENDS} \
+ ${PYTHON_SITELIBDIR}/dbus/mainloop/qt.so:${PORTSDIR}/devel/py-qt4-dbus
+
+USE_BZIP2= yes
+USE_CMAKE= yes
+USE_KDE4= kdeprefix pimlibs automoc4
+USE_QT_VER= 4
+QT_COMPONENTS= qmake_build moc_build uic_build rcc_build
+USE_PYTHON= 2.5+
+MD5_FILE= ${PORTSDIR}/sysutils/kdeadmin4/distinfo
+
+BUILD_WRKSRC= ${WRKSRC}/${PORTNAME}
+INSTALL_WRKSRC= ${BUILD_WRKSRC}
+
+PYTHON_KDE4PREFIX_SITELIBDIR= ${PYTHON_SITELIBDIR:S;${PYTHONBASE};${KDE4_PREFIX};}
+
+post-patch:
+ cd ${BUILD_WRKSRC} && ${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
+ system-config-printer-kde.py \
+ cmake-modules/FindSystemConfigPrinter.py
+
+.include <bsd.port.mk>
diff --git a/print/system-config-printer-kde/files/patch-system-config-printer-kde__cmake-modules__FindSystemConfigPrinter.py b/print/system-config-printer-kde/files/patch-system-config-printer-kde__cmake-modules__FindSystemConfigPrinter.py
new file mode 100644
index 000000000000..cd6028d9f0c2
--- /dev/null
+++ b/print/system-config-printer-kde/files/patch-system-config-printer-kde__cmake-modules__FindSystemConfigPrinter.py
@@ -0,0 +1,11 @@
+--- ./system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py.orig 2008-09-13 12:16:28.000000000 +0400
++++ ./system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py 2009-05-04 22:46:32.000000000 +0400
+@@ -4,7 +4,7 @@
+
+ import sys
+
+-SYSTEM_CONFIG_PRINTER_DIR = "/usr/share/system-config-printer"
++SYSTEM_CONFIG_PRINTER_DIR = "%%LOCALBASE%%/share/system-config-printer"
+ sys.path.append (SYSTEM_CONFIG_PRINTER_DIR)
+
+ try:
diff --git a/print/system-config-printer-kde/files/patch-system-config-printer-kde__system-config-printer-kde.py b/print/system-config-printer-kde/files/patch-system-config-printer-kde__system-config-printer-kde.py
new file mode 100644
index 000000000000..216bbe4f4bdb
--- /dev/null
+++ b/print/system-config-printer-kde/files/patch-system-config-printer-kde__system-config-printer-kde.py
@@ -0,0 +1,38 @@
+--- ./system-config-printer-kde/system-config-printer-kde.py.orig 2008-12-21 23:20:45.000000000 +0300
++++ ./system-config-printer-kde/system-config-printer-kde.py 2009-05-04 22:50:28.000000000 +0400
+@@ -33,7 +33,7 @@
+ import thread
+
+ #load modules from system-config-printer-common (debug, smburi), change path here if you have it installed elsewhere
+-SYSTEM_CONFIG_PRINTER_DIR = "/usr/share/system-config-printer"
++SYSTEM_CONFIG_PRINTER_DIR = "%%LOCALBASE%%/share/system-config-printer"
+ if os.path.exists(SYSTEM_CONFIG_PRINTER_DIR + "/debug.py"):
+ sys.path.append(SYSTEM_CONFIG_PRINTER_DIR)
+
+@@ -2265,7 +2265,7 @@
+ # Try to get make and model via SNMP
+ if host:
+ os.environ["HOST"] = host
+- cmd = '/usr/lib/cups/backend/snmp "${HOST}"'
++ cmd = '%%LOCALBASE%%/libexec/cups/backend/snmp "${HOST}"'
+ debugprint (host + ": " + cmd)
+ stdout = None
+ try:
+@@ -2920,7 +2920,7 @@
+ os.environ["PPD"] = filename
+ # We want this to be in the current natural language,
+ # so we intentionally don't set LC_ALL=C here.
+- p = os.popen ('/usr/bin/cupstestppd -rvv "$PPD"', 'r')
++ p = os.popen ('%%LOCALBASE%%/bin/cupstestppd -rvv "$PPD"', 'r')
+ output = p.readlines ()
+ p.close ()
+ err += reduce (lambda x, y: x + y, output)
+@@ -3168,7 +3168,7 @@
+ (pkgs, exes) = cupshelpers.missingPackagesAndExecutables (ppd)
+ if len (pkgs) > 0 or len (exes) > 0:
+ # We didn't find a necessary executable. Complain.
+- install = "/usr/bin/system-install-packages"
++ install = "/usr/bin/true"
+ if len (pkgs) > 0 and os.access (install, os.X_OK):
+ pkg = pkgs[0]
+ install_text = ('<span weight="bold" size="larger">' +
diff --git a/print/system-config-printer-kde/pkg-descr b/print/system-config-printer-kde/pkg-descr
new file mode 100644
index 000000000000..2bbde24ce18a
--- /dev/null
+++ b/print/system-config-printer-kde/pkg-descr
@@ -0,0 +1,4 @@
+system-config-printer-kde is a port of Red Hat's Gnome
+system-config-printer to KDE.
+
+WWW: http://www.kde.org
diff --git a/print/system-config-printer-kde/pkg-plist b/print/system-config-printer-kde/pkg-plist
new file mode 100644
index 000000000000..0044f4893f4b
--- /dev/null
+++ b/print/system-config-printer-kde/pkg-plist
@@ -0,0 +1,6 @@
+bin/system-config-printer-kde
+share/applications/kde4/system-config-printer-kde.desktop
+share/apps/system-config-printer-kde/new-printer.ui
+share/apps/system-config-printer-kde/system-config-printer-kde.py
+share/apps/system-config-printer-kde/system-config-printer.ui
+@dirrm share/apps/system-config-printer-kde