openbsd-ports/print/foo2zjs/patches/patch-Makefile
2010-11-12 16:06:33 +00:00

172 lines
5.3 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.10 2010/11/12 16:06:33 ajacoutot Exp $
--- Makefile.orig Fri Nov 12 13:05:04 2010
+++ Makefile Fri Nov 12 17:01:51 2010
@@ -16,11 +16,6 @@ SYSNAME := $(shell uname -n)
# No version number yet...
VERSION=0.0
-# Installation prefix...
-PREFIX=/usr/local
-PREFIX=/usr
-PREFIX=$(DESTDIR)/usr
-
# Pathnames for this package...
BIN=$(PREFIX)/bin
SHAREZJS=$(PREFIX)/share/foo2zjs
@@ -31,13 +26,13 @@ SHARELAVA=$(PREFIX)/share/foo2lava
SHAREQPDL=$(PREFIX)/share/foo2qpdl
SHARESLX=$(PREFIX)/share/foo2slx
SHAREHC=$(PREFIX)/share/foo2hiperc
-MANDIR=$(PREFIX)/share/man
+MANDIR=$(PREFIX)/man
DOCDIR=$(PREFIX)/share/doc/foo2zjs/
INSTALL=install
ROOT=root
# Pathnames for referenced packages...
-FOODB=$(DESTDIR)/usr/share/foomatic/db/source
+FOODB=${PREFIX}/share/foomatic/db/source
# User ID's
LPuid=-oroot
@@ -236,7 +231,7 @@ FILES = \
# sihp1000.img sihp1005.img sihp1020.img sihp1018.img
# sihpP1005.img sihpP1006.img sihpP1505.img
-CUPS_DEVEL := $(shell ls /usr/include/cups/sidechannel.h 2>/dev/null)
+CUPS_DEVEL := 1
# Programs and libraries
PROGS= foo2zjs zjsdecode arm2hpdl foo2hp foo2xqx xqxdecode
@@ -274,7 +269,6 @@ ifeq ($(UNAME),Linux)
endif
# Compiler flags
-CFLAGS += -O2 -Wall
#CFLAGS += -g
#
@@ -522,7 +516,7 @@ gipddecode: gipddecode.o $(LIBJBG)
$(CC) $(CFLAGS) gipddecode.o $(LIBJBG) -o $@
command2foo2lava-pjl: command2foo2lava-pjl.o
- $(CC) $(CFLAGS) -L/usr/local/lib command2foo2lava-pjl.o -lcups -o $@
+ $(CC) $(CFLAGS) -L/usr/local/lib command2foo2lava-pjl.o -pthread -lcups -o $@
command2foo2lava-pjl.o: command2foo2lava-pjl.c
$(CC) $(CFLAGS) -I/usr/local/include -c command2foo2lava-pjl.c
@@ -530,9 +524,8 @@ command2foo2lava-pjl.o: command2foo2lava-pjl.c
#
# Installation rules
#
-install: all install-test install-prog install-icc2ps install-extra \
+install: all install-prog install-icc2ps install-extra \
install-crd install-foo install-ppd \
- install-gui install-desktop install-filter \
install-man install-doc
#
# If you use CUPS, then restart the spooler:
@@ -589,11 +582,6 @@ install-prog:
$(INSTALL) -d $(SHAREZJS)/
$(INSTALL) -c -m 644 gamma.ps $(SHAREZJS)/
$(INSTALL) -c -m 644 gamma-lookup.ps $(SHAREZJS)/
- $(INSTALL) -d $(SHAREOAK)/
- $(INSTALL) -d $(SHAREHP)/
- $(INSTALL) -d $(SHAREXQX)/
- $(INSTALL) -d $(SHARELAVA)/
- $(INSTALL) -d $(SHAREHC)/
install-foo:
#
@@ -611,24 +599,14 @@ install-foo:
#
# Install current database files
#
- @if [ -d $(FOODB) ]; then \
+ echo install -d $(FOODB)
+ $(INSTALL) -d $(FOODB)
for dir in driver printer opt; do \
echo install -d $(FOODB)/$$dir/; \
$(INSTALL) -d $(FOODB)/$$dir/; \
echo install -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \
$(INSTALL) -c -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \
done \
- else \
- echo "***"; \
- echo "*** WARNING! You don't have directory $(FOODB)/"; \
- echo "*** If you want support for foomatic printer configuration,";\
- echo "*** then you will have to manually install these files..."; \
- echo "***"; \
- ls foomatic-db/*/*.xml | sed 's/^/ /'; \
- echo "***"; \
- echo "*** ... wherever foomatic is stashed on your machine."; \
- echo "***"; \
- fi
#
# Clear foomatic cache and rebuild database if needed
#
@@ -749,47 +727,16 @@ install-extra:
fi; \
done
-MODEL=$(DESTDIR)/usr/share/cups/model
-LOCALMODEL=$(DESTDIR)/usr/local/share/cups/model
+MODEL=${PREFIX}/share/cups/model
+LOCALMODEL=${PREFIX}/share/foomatic/db/source/PPD/foo2zjs
PPD=$(DESTDIR)/usr/share/ppd
VARPPD=/var/lp/ppd
install-ppd:
#
# Install PPD files for CUPS
#
- export PATH=$$PATH:`pwd`:; \
- if [ -x /usr/sbin/ppdmgr -a -s $(VARPPD)/ppdcache ]; then \
- $(INSTALL) $(LPgid) -d $(VARPPD)/user; \
- cd PPD; \
- for ppd in *.ppd; do \
- manuf=`echo "$$ppd" | sed 's/-.*//'`; \
- $(INSTALL) $(LPgid) -d $(VARPPD)/user/$$manuf; \
- modify-ppd <$$ppd | gzip > $(VARPPD)/user/$$manuf/$$ppd.gz; \
- done; \
- ppdmgr -u; \
- elif [ -d $(PPD) ]; then \
- find $(PPD) -name '*foo2zjs*' | xargs rm -rf; \
- find $(PPD) -name '*foo2hp*' | xargs rm -rf; \
- find $(PPD) -name '*foo2xqx*' | xargs rm -rf; \
- find $(PPD) -name '*foo2lava*' | xargs rm -rf; \
- find $(PPD) -name '*foo2qpdl*' | xargs rm -rf; \
- find $(PPD) -name '*foo2slx*' | xargs rm -rf; \
- find $(PPD) -name '*foo2hiperc*' | xargs rm -rf; \
- [ -d $(PPD)/foo2zjs ] || mkdir $(PPD)/foo2zjs; \
- cd PPD; \
- for ppd in *.ppd; do \
- modify-ppd <$$ppd | gzip > $(PPD)/foo2zjs/$$ppd.gz; \
- done; \
- fi
- #
- export PATH=$$PATH:`pwd`:; \
- if [ -d $(MODEL) ]; then \
- rm -f $(MODEL)/KonicaMinolta*; \
- cd PPD; \
- for ppd in *.ppd; do \
- modify-ppd <$$ppd | gzip > $(MODEL)/$$ppd.gz; \
- done; \
- elif [ -d $(LOCALMODEL) ]; then \
+ mkdir -p $(LOCALMODEL)
+ if [ -d $(LOCALMODEL) ]; then \
rm -f $(LOCALMODEL)/KonicaMinolta*; \
cd PPD; \
for ppd in *.ppd; do \
@@ -1314,11 +1261,8 @@ install-doc: doc
#
$(INSTALL) -d -m 755 $(DOCDIR)
$(INSTALL) -c -m 644 manual.pdf $(DOCDIR)
- $(INSTALL) -c -m 644 COPYING $(DOCDIR)
$(INSTALL) -c -m 644 INSTALL $(DOCDIR)
- $(INSTALL) -c -m 644 INSTALL.osx $(DOCDIR)
$(INSTALL) -c -m 644 README $(DOCDIR)
- $(INSTALL) -c -m 644 ChangeLog $(DOCDIR)
GROFF=/usr/local/test/bin/groff
GROFF=groff