diff --git a/srcpkgs/psutils/patches/psutils.patch b/srcpkgs/psutils/patches/psutils.patch index ef6e619285..e280ac1c54 100644 --- a/srcpkgs/psutils/patches/psutils.patch +++ b/srcpkgs/psutils/patches/psutils.patch @@ -40,7 +40,7 @@ diff -rupN psutils/Makefile.unix psutils-new/Makefile.unix BINMODE = 0755 MANMODE = 0644 -@@ -36,23 +47,30 @@ CHMOD = chmod +@@ -36,61 +47,79 @@ INSTALL = install -c -m $(BINMODE) INSTALLMAN = install -c -m $(MANMODE) MANEXT = 1 @@ -49,19 +49,21 @@ diff -rupN psutils/Makefile.unix psutils-new/Makefile.unix CC = gcc -CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall ++CFLAGS = @CFLAGS@ ++LDFLAGS = @LDFLAGS@ ++ ++ifdef LIBPAPER ++ CFLAGS += -DDEBIAN -DUNIX -O2 -g -Wall -Werror ++ LIBS = -lpaper ++else ++ CFLAGS += -DPAPER=\"$(PAPER)\" -DUNIX -O2 -g -Wall -Werror ++ LIBS = ++endif -BIN = psbook psselect pstops epsffit psnup \ - psresize -SHELLSCRIPTS = getafm showchar -PERLSCRIPTS = fixfmps fixmacps fixpsditps fixpspps \ -+ifdef LIBPAPER -+ CFLAGS = -DDEBIAN -DUNIX -O2 -g -Wall -Werror -+ LIBS = -lpaper -+else -+ CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O2 -g -Wall -Werror -+ LIBS = -+endif -+ + +BIN = psbook psselect pstops epsffit psnup psresize +SHELLSCRIPTS = getafm showchar psjoin @@ -81,32 +83,60 @@ diff -rupN psutils/Makefile.unix psutils-new/Makefile.unix all: $(BIN) $(PERLSCRIPTS) $(MANPAGES) $(SHELLSCRIPTS) -@@ -68,12 +86,13 @@ epsffit: epsffit.o pserror.o - $(CC) $(CCFLAGS) -o epsffit pserror.o epsffit.o + psutil.o: psutil.h patchlev.h pserror.h psutil.c ++ $(CC) $(CFLAGS) -o $@ -c psutil.c + + psspec.o: psutil.h patchlev.h psspec.h pserror.h psspec.c ++ $(CC) $(CFLAGS) -o $@ -c psspec.c + + pserror.o: psutil.h patchlev.h pserror.h pserror.c ++ $(CC) $(CFLAGS) -o $@ -c pserror.c + + epsffit.o: epsffit.c pserror.h patchlev.h ++ $(CC) $(CFLAGS) -o $@ -c epsffit.c + + epsffit: epsffit.o pserror.o +- $(CC) $(CCFLAGS) -o epsffit pserror.o epsffit.o ++ $(CC) $(LDFLAGS) -o epsffit pserror.o epsffit.o psnup: psnup.o psutil.o psspec.o pserror.o - $(CC) $(CCFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o -+ $(CC) $(CCFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o $(LIBS) ++ $(CC) $(LDFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o $(LIBS) psnup.o: psutil.h patchlev.h psspec.h pserror.h psnup.c ++ $(CC) $(CFLAGS) -o $@ -c psnup.c psresize: psresize.o psutil.o pserror.o psspec.o - $(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o -+ $(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o \ ++ $(CC) $(LDFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o \ + $(LIBS) psresize.o: psutil.h patchlev.h psspec.h pserror.h psresize.c ++ $(CC) $(CFLAGS) -o $@ -c psresize.c + + psbook: psbook.o psutil.o pserror.o +- $(CC) $(CCFLAGS) -o psbook psutil.o pserror.o psbook.o ++ $(CC) $(LDFLAGS) -o psbook psutil.o pserror.o psbook.o + + psbook.o: psutil.h patchlev.h pserror.h psbook.c ++ $(CC) $(CFLAGS) -o $@ -c psbook.c + + psselect: psselect.o psutil.o pserror.o +- $(CC) $(CCFLAGS) -o psselect psutil.o pserror.o psselect.o ++ $(CC) $(LDFLAGS) -o psselect psutil.o pserror.o psselect.o -@@ -88,7 +107,7 @@ psselect: psselect.o psutil.o pserror.o psselect.o: psutil.h patchlev.h pserror.h psselect.c pstops: pstops.o psutil.o psspec.o pserror.o - $(CC) $(CCFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o -+ $(CC) $(CCFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o $(LIBS) ++ $(CC) $(LDFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o $(LIBS) pstops.o: psutil.h patchlev.h psspec.h pserror.h pstops.c ++ $(CC) $(CFLAGS) -o $@ -c pstops.c -@@ -106,10 +125,6 @@ fixfmps: fixfmps.pl + getafm: getafm.sh + cp $? $@ +@@ -106,10 +135,6 @@ $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@ $(CHMOD) $(BINMODE) $@ @@ -117,7 +147,7 @@ diff -rupN psutils/Makefile.unix psutils-new/Makefile.unix fixpsditps: fixpsditps.pl $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@ $(CHMOD) $(BINMODE) $@ -@@ -171,11 +186,11 @@ pstops.$(MANEXT): pstops.man +@@ -171,11 +196,11 @@ psmerge.$(MANEXT): psmerge.man $(PERL) maketext "MAN=$(MANPAGES)" $? > $@ @@ -132,7 +162,7 @@ diff -rupN psutils/Makefile.unix psutils-new/Makefile.unix fixpsditps.$(MANEXT): fixpsditps.man $(PERL) maketext "MAN=$(MANPAGES)" $? > $@ -@@ -210,39 +225,35 @@ includeres.$(MANEXT): includeres.man +@@ -210,39 +235,35 @@ getafm.$(MANEXT): getafm.man $(PERL) maketext "MAN=$(MANPAGES)" $? > $@ diff --git a/srcpkgs/psutils/template b/srcpkgs/psutils/template index feea4a75a6..f3870f5f14 100644 --- a/srcpkgs/psutils/template +++ b/srcpkgs/psutils/template @@ -1,7 +1,7 @@ # Template file for 'psutils' pkgname="psutils" version="p17" -revision=3 +revision=4 short_desc="Set of utilities to manipulate PostScript files" maintainer="Carlo Dormeletti " license="AJCD-License" @@ -16,10 +16,13 @@ patch_args="-Np1" pre_configure() { # install in /usr instead of /usr/local - sed 's@/usr/local@/usr@g' Makefile.unix > Makefile + sed -e "s;/usr/local;/usr;g" \ + -e "s;@CFLAGS@;$CFLAGS;" \ + -e "s;@LDFLAGS@;$LDFLAGS;" \ + Makefile.unix > Makefile } do_build() { - make CC=$CC CFLAGS="$CFLAGS" + make CC=$CC ${makejobs} } do_install() { make DESTDIR=${DESTDIR} install