pkgsrc/print/foo2zjs/patches/patch-Makefile
rumko 1a88e77001 print/foo2zjs: fix runtime problems with paths and sed
* the syntax used for sed is not compatible with all sed
implementations, so depend on gsed and use it on all platforms
* before this, foo2qpdl-wrapper & co. would be searching for CMS
and other files in ${DESTDIR}${PREFIX} instead of ${PREFIX}
* also install crd files (needed for functioning CMS)

PKGREVISION bumped.

Ok@ wiz
2015-07-28 16:42:03 +00:00

117 lines
3.7 KiB
Text

$NetBSD: patch-Makefile,v 1.4 2015/07/28 16:42:03 rumko Exp $
Fix PREFIX path
Remove extra dc check. The DragonFly version has dc that supports the -e
option, but it doesn't support -V. It's a bad check, the conftest should
actually test for -e support. Just remove it completely.
--- Makefile.orig 2012-06-01 23:10:31.000000000 +0000
+++ Makefile
@@ -17,9 +17,8 @@ SYSNAME := $(shell uname -n)
VERSION=0.0
# Installation prefix...
-PREFIX=/usr/local
-PREFIX=/usr
-PREFIX=$(DESTDIR)/usr
+PREFIX=@PREFIX@
+RUNPREFIX=@RUNPREFIX@
# Pathnames for this package...
BIN=$(PREFIX)/bin
@@ -31,7 +30,7 @@ SHARELAVA=$(PREFIX)/share/foo2lava
SHAREQPDL=$(PREFIX)/share/foo2qpdl
SHARESLX=$(PREFIX)/share/foo2slx
SHAREHC=$(PREFIX)/share/foo2hiperc
-MANDIR=$(PREFIX)/share/man
+MANDIR=@PKGMANDIR@
DOCDIR=$(PREFIX)/share/doc/foo2zjs/
INSTALL=install
ROOT=root
@@ -58,7 +57,7 @@ endif
ifeq ($(UNAME),SunOS)
LPuid=-oroot
LPgid=-glp
- INSTALL=/usr/ucb/install
+ #INSTALL=/usr/ucb/install
endif
# If we aren't root, don't try to set ownership
ifneq ($(EUID),0)
@@ -409,12 +408,6 @@ all-test:
echo " ***"; \
exit 1; \
fi
- @if ! dc -V >/dev/null 2>&1; then \
- echo " ***"; \
- echo " *** Error: must install GNU dc with the -e option!"; \
- echo " ***"; \
- exit 1; \
- fi
ifeq ($(UNAME),Darwin)
@if ! type gsed >/dev/null 2>&1; then \
echo " ***"; \
@@ -469,55 +462,55 @@ foo2hiperc: foo2hiperc.o $(LIBJBG)
foo2zjs-wrapper: foo2zjs-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2hp2600-wrapper: foo2hp2600-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2xqx-wrapper: foo2xqx-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2lava-wrapper: foo2lava-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2qpdl-wrapper: foo2qpdl-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2oak-wrapper: foo2oak-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2slx-wrapper: foo2slx-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2hiperc-wrapper: foo2hiperc-wrapper.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@
foo2zjs-wrapper9: foo2zjs-wrapper9.in Makefile
[ ! -f $@ ] || chmod +w $@
sed < $@.in > $@ \
- -e 's@^PREFIX=.*@PREFIX=$(PREFIX)@' || (rm -f $@ && exit 1)
+ -e 's@^PREFIX=.*@PREFIX=$(RUNPREFIX)@' || (rm -f $@ && exit 1)
chmod 555 $@