From 06e666c3d9d0f1e64a1f15764c2b38f472078fb9 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Sun, 9 Sep 2007 14:42:02 +0000 Subject: [PATCH] Import foomatic-db-engine-3.0.2 Foomatic's database engine generates PPD files from the data in Foomatic's XML database. It also contains scripts to directly generate print queues and handle jobs. work by and ok jakemsr@, ok kili@ --- print/foomatic-db-engine/Makefile | 73 +++++++++++++++++++ print/foomatic-db-engine/distinfo | 5 ++ .../patches/patch-Makefile_in | 26 +++++++ .../patches/patch-configure | 48 ++++++++++++ .../patches/patch-foomatic-kitload_in | 12 +++ print/foomatic-db-engine/pkg/DESCR | 3 + print/foomatic-db-engine/pkg/PLIST | 37 ++++++++++ 7 files changed, 204 insertions(+) create mode 100644 print/foomatic-db-engine/Makefile create mode 100644 print/foomatic-db-engine/distinfo create mode 100644 print/foomatic-db-engine/patches/patch-Makefile_in create mode 100644 print/foomatic-db-engine/patches/patch-configure create mode 100644 print/foomatic-db-engine/patches/patch-foomatic-kitload_in create mode 100644 print/foomatic-db-engine/pkg/DESCR create mode 100644 print/foomatic-db-engine/pkg/PLIST diff --git a/print/foomatic-db-engine/Makefile b/print/foomatic-db-engine/Makefile new file mode 100644 index 00000000000..c2c180a24e9 --- /dev/null +++ b/print/foomatic-db-engine/Makefile @@ -0,0 +1,73 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2007/09/09 14:42:02 ajacoutot Exp $ + +COMMENT= Foomatic PPD generator + +DISTNAME= foomatic-db-engine-3.0.2 +CATEGORIES= print + +HOMEPAGE= http://www.linux-foundation.org/en/OpenPrinting/Database/Foomatic + +MAINTAINER= Jacob Meuser + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= http://www.linuxprinting.org/download/foomatic/ + +LIB_DEPENDS= xml2.>=8::textproc/libxml +BUILD_DEPENDS= ::print/foomatic-filters +RUN_DEPENDS= ::print/foomatic-filters \ + ::print/foomatic-db +WANTLIB= c iconv m z + +USE_GMAKE= Yes + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS= --without-ppr \ + --disable-gscheck +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/libxml2" \ + LDFLAGS="-L${LOCALBASE}/lib" \ + LIBDIR="${LOCALBASE}/share/foomatic" \ + GS="${LOCALBASE}/bin/gs" \ + A2PS="${LOCALBASE}/bin/a2ps" \ + GS="${LOCALBASE}/bin/gs" \ + WGET="${LOCALBASE}/bin/wget" \ + CURL="${LOCALBASE}/bin/curl" \ + SMBCLIENT="${LOCALBASE}/bin/smbclient" \ + DEVFD3="|/bin/cat >&3" \ + DEVFD0="-" \ + LPD_SPOOL="/var/spool/output" \ + LPD_LOG="/var/log/lpd-errs" \ + LPD_BIN="/usr/sbin/lpd" \ + LPD_LPR="/usr/bin/lpr" \ + LPD_LPQ="/usr/bin/lpq" \ + LPD_LPRM="/usr/bin/lprm" \ + LPD_LPC="/usr/sbin/lpc" \ + LPRNG_CHECKPC="${LOCALBASE}/sbin/checkpc" \ + CUPS_ETC="${SYSCONFDIR}/cups" \ + CUPS_ADMIN="${LOCALBASE}/sbin/lpadmin" \ + CUPS_LPSTAT="${LOCALBASE}/bin/lpstat" \ + CUPS_PPDS="${LOCALBASE}/share/cups/model" \ + CUPS_FILTERS="${LOCALBASE}/libexec/cups/filter" \ + CUPS_BACKENDS="${LOCALBASE}/libexec/cups/backend" \ + CUPS_CONF="${SYSCONFDIR}/cups/printers.conf" \ + CUPS_LPR="${LOCALBASE}/bin/lpr" \ + CUPS_LPQ="${LOCALBASE}/bin/lpq" \ + CUPS_LPRM="${LOCALBASE}/bin/lprm" \ + CUPS_LPC="${LOCALBASE}/sbin/lpc" \ + CUPS_LP="${LOCALBASE}/bin/lp" \ + CUPS_CANCEL="${LOCALBASE}/bin/cancel" \ + CUPS_ENABLE="${LOCALBASE}/bin/enable" \ + CUPS_DISABLE="${LOCALBASE}/bin/disable" \ + CUPS_ACCEPT="${LOCALBASE}/sbin/accept" \ + CUPS_REJECT="${LOCALBASE}/sbin/reject" \ + CUPS_LPMOVE="${LOCALBASE}/sbin/lpmove" \ + CUPS_LPOPTIONS="${LOCALBASE}/bin/lpoptions" \ + CUPS_LPINFO="${LOCALBASE}/sbin/lpinfo" + +NO_REGRESS= Yes + +.include diff --git a/print/foomatic-db-engine/distinfo b/print/foomatic-db-engine/distinfo new file mode 100644 index 00000000000..43890fe1d32 --- /dev/null +++ b/print/foomatic-db-engine/distinfo @@ -0,0 +1,5 @@ +MD5 (foomatic-db-engine-3.0.2.tar.gz) = MGG40/eHBGfm++ro1DmSEQ== +RMD160 (foomatic-db-engine-3.0.2.tar.gz) = cWDOmJ6AyECQ7MrEs/sAUhFqJYw= +SHA1 (foomatic-db-engine-3.0.2.tar.gz) = bD0ijP59aY5jV1tjEatIXr58PmE= +SHA256 (foomatic-db-engine-3.0.2.tar.gz) = 1AcOxInTR4EFabxqn2KJvjtU6kKv6hgRbA4GvxbkGjw= +SIZE (foomatic-db-engine-3.0.2.tar.gz) = 286367 diff --git a/print/foomatic-db-engine/patches/patch-Makefile_in b/print/foomatic-db-engine/patches/patch-Makefile_in new file mode 100644 index 00000000000..6c2cedf4ab9 --- /dev/null +++ b/print/foomatic-db-engine/patches/patch-Makefile_in @@ -0,0 +1,26 @@ +$OpenBSD: patch-Makefile_in,v 1.1.1.1 2007/09/09 14:42:02 ajacoutot Exp $ +--- Makefile.in.orig Sat Dec 20 02:01:43 2003 ++++ Makefile.in Thu Apr 26 18:03:07 2007 +@@ -182,13 +182,9 @@ check-config: + install-bin: check-config lib/Makefile + # This is the only way to get the Perl-generated Makefile using + # $(DESTDIR) properly +- ( cd lib && \ +- $(MAKE) PREFIX=$(PERLPREFIX) && \ +- $(MAKE) PREFIX=$(PERLPREFIX) pure_install \ +- ) ++ cd lib && $(MAKE) PREFIX=$(PERLPREFIX) pure_install + ${SRC}/mkinstalldirs $(DESTDIR)$(BINDIR) + ${SRC}/mkinstalldirs $(DESTDIR)$(SBINDIR) +- ${SRC}/mkinstalldirs $(DESTDIR)$(ETCDIR) + ${SRC}/mkinstalldirs $(DESTDIR)$(LIBDIR)/templates + ${INSTALL} -m 755 $(BINFILES) $(DESTDIR)$(BINDIR) + ${INSTALL} -m 755 $(SBINFILES) $(DESTDIR)$(SBINDIR) +@@ -214,6 +210,7 @@ build: defaults lib/Makefile foomatic-combo-xml foomat + $(PERL) -p -i -e "s=use lib '.*lib/';\n==s" $$m; \ + done + chmod a+rx $(AC_OUTPUT_FILES) mkinstalldirs ++ cd lib && $(MAKE) PREFIX=$(PERLPREFIX) + + lib/Makefile: lib/Makefile.PL + ( cd lib && $(PERL) Makefile.PL verbose INSTALLDIRS=$(PERL_INSTALLDIRS) ) diff --git a/print/foomatic-db-engine/patches/patch-configure b/print/foomatic-db-engine/patches/patch-configure new file mode 100644 index 00000000000..57674b50314 --- /dev/null +++ b/print/foomatic-db-engine/patches/patch-configure @@ -0,0 +1,48 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2007/09/09 14:42:02 ajacoutot Exp $ +--- configure.orig Tue Sep 14 23:27:41 2004 ++++ configure Thu Apr 26 18:00:11 2007 +@@ -1828,13 +1828,13 @@ else + PREFIX=$prefix + fi + echo -n Checking whether Perl will find libraries installed under $PREFIX... +-if ( $PERL -V | egrep "^ *$PREFIX/lib(/perl[0-9]?|)(/site_perl|)/[0-9]" > /dev/null); then ++if ( $PERL -V | egrep "^ *$PREFIX/libdata(/perl[0-9]?|'')(/site_perl|'')" > /dev/null); then + PERLPREFIX=$PREFIX + echo " yes" + else + echo " no" + echo -n Checking whether Perl will find libraries installed under /usr/local... +- if ( $PERL -V | egrep "^ */usr/local/lib(/perl[0-9]?|)(/site_perl|)/[0-9]" > /dev/null); then ++ if ( $PERL -V | egrep "^ */usr/local/libdata(/perl[0-9]?|)(/site_perl|)/[0-9]" > /dev/null); then + PERLPREFIX=/usr/local + echo " yes" + echo Installing the Perl libraries with prefix /usr/local. +@@ -3124,7 +3124,7 @@ test -n "$CUPS_LPINFO" && break + done + test -n "$CUPS_LPINFO" || CUPS_LPINFO="/usr/sbin/lpinfo" + +- ++if [ x"$with_pdq" = x"yes" ]; then + for ac_dir in pdq + do + # Extract the first word of "$ac_dir", so it can be a program name with args. +@@ -3247,8 +3247,9 @@ fi + test -n "$PDQ_PRINT" && break + done + test -n "$PDQ_PRINT" || PDQ_PRINT="/usr/bin/pdq" ++fi # with_pdq = yes + +- ++if [ x"$with_ppr" = x"yes" ]; then + for ac_prog in ppr/bin/pprd + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -3535,7 +3536,7 @@ fi + test -n "$PPR_PPOP" && break + done + test -n "$PPR_PPOP" || PPR_PPOP="/usr/bin/ppop" +- ++fi # with_ppr = yes + + + for ac_prog in nc netcat diff --git a/print/foomatic-db-engine/patches/patch-foomatic-kitload_in b/print/foomatic-db-engine/patches/patch-foomatic-kitload_in new file mode 100644 index 00000000000..13e55dd0e65 --- /dev/null +++ b/print/foomatic-db-engine/patches/patch-foomatic-kitload_in @@ -0,0 +1,12 @@ +$OpenBSD: patch-foomatic-kitload_in,v 1.1.1.1 2007/09/09 14:42:02 ajacoutot Exp $ +--- foomatic-kitload.in.orig Thu Oct 10 18:16:12 2002 ++++ foomatic-kitload.in Mon Jun 21 23:55:22 2004 +@@ -54,7 +54,7 @@ $ENV{'LC_ALL'} = "C"; + $ENV{'LANG'} = "C"; + + # Copy the files +-my $retval = system("( cd $dir ; tar cf - --exclude CVS . ) | tar xv${dontoverwrite}Cf $destdir$libdir/db/source - 2> $destdir$libdir/kitload2.log | tee $destdir$libdir/kitload.log"); ++my $retval = system("( cd $dir ; find . \! -path \*CVS\* | pax -rwdv$dontoverwrite $destdir$libdir/db/source ) 2>&1 | tee $destdir$libdir/kitload.log 2> $destdir$libdir/kitload2.log"); + #$retval = $retval / 256; + #if ($retval) { + # die "Error copying files to $destdir$libdir/db/source: $?"; diff --git a/print/foomatic-db-engine/pkg/DESCR b/print/foomatic-db-engine/pkg/DESCR new file mode 100644 index 00000000000..e74eb4bda1c --- /dev/null +++ b/print/foomatic-db-engine/pkg/DESCR @@ -0,0 +1,3 @@ +Foomatic's database engine generates PPD files from the data in +Foomatic's XML database. It also contains scripts to directly generate +print queues and handle jobs. diff --git a/print/foomatic-db-engine/pkg/PLIST b/print/foomatic-db-engine/pkg/PLIST new file mode 100644 index 00000000000..5be579f0680 --- /dev/null +++ b/print/foomatic-db-engine/pkg/PLIST @@ -0,0 +1,37 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2007/09/09 14:42:02 ajacoutot Exp $ +bin/foomatic-combo-xml +bin/foomatic-compiledb +bin/foomatic-configure +bin/foomatic-datafile +bin/foomatic-perl-data +bin/foomatic-ppd-options +bin/foomatic-ppdfile +bin/foomatic-printjob +libdata/perl5/site_perl/Foomatic/ +libdata/perl5/site_perl/Foomatic/DB.pm +libdata/perl5/site_perl/Foomatic/Defaults.pm +libdata/perl5/site_perl/Foomatic/PPD.pm +libdata/perl5/site_perl/Foomatic/UIElem.pm +@man man/man1/foomatic-combo-xml.1 +@man man/man1/foomatic-compiledb.1 +@man man/man1/foomatic-configure.1 +@man man/man1/foomatic-perl-data.1 +@man man/man1/foomatic-ppd-options.1 +@man man/man1/foomatic-ppdfile.1 +@man man/man1/foomatic-printjob.1 +@man man/man8/foomatic-addpjloptions.8 +@man man/man8/foomatic-getpjloptions.8 +@man man/man8/foomatic-kitload.8 +@man man/man8/foomatic-preferred-driver.8 +sbin/foomatic-addpjloptions +sbin/foomatic-fix-xml +sbin/foomatic-getpjloptions +sbin/foomatic-kitload +sbin/foomatic-nonumericalids +sbin/foomatic-preferred-driver +sbin/foomatic-printermap-to-gimp-print-xml +sbin/foomatic-replaceoldprinterids +share/foomatic/templates/ +share/foomatic/templates/pjl_enum_choice.xml +share/foomatic/templates/pjl_enum_option.xml +share/foomatic/templates/pjl_num_option.xml