[91066] trunk/dports/print/psutils

jmr at macports.org jmr at macports.org
Fri Mar 23 05:50:18 PDT 2012


Revision: 91066
          https://trac.macports.org/changeset/91066
Author:   jmr at macports.org
Date:     2012-03-23 05:50:17 -0700 (Fri, 23 Mar 2012)
Log Message:
-----------
psutils: better handling of cflags and destdir

Modified Paths:
--------------
    trunk/dports/print/psutils/Portfile

Added Paths:
-----------
    trunk/dports/print/psutils/files/Makefile.unix.patch

Modified: trunk/dports/print/psutils/Portfile
===================================================================
--- trunk/dports/print/psutils/Portfile	2012-03-23 08:23:31 UTC (rev 91065)
+++ trunk/dports/print/psutils/Portfile	2012-03-23 12:50:17 UTC (rev 91066)
@@ -23,25 +23,17 @@
 		sha1 6f1ecb5846cffb644826a02bd9153fe5d6387a9b \
 		rmd160 1494f37e7ae809f0e446d52d4b3a21cd48690cc0
 
+depends_build   bin:perl:perl5
+
 worksrcdir	${name}
 
-patchfiles clang.patch
+patchfiles clang.patch Makefile.unix.patch
 
 pre-configure	{
 	file rename ${worksrcpath}/Makefile.unix ${worksrcpath}/Makefile
-	reinplace "s|/usr/local/bin/perl|perl|" "${worksrcpath}/Makefile"
 	reinplace "s|/usr/local|${prefix}|g" "${worksrcpath}/Makefile"
 }
 use_configure	no
 
 variant universal {}
-if {[variant_isset universal]} {
-	set archflags ${configure.universal_cflags}
-} else {
-	set archflags ${configure.cc_archflags}
-}
-build.args	CC="${configure.cc} ${archflags}"
-
-pre-destroot	{
-	reinplace "s|${prefix}|${destroot}${prefix}|g" "${worksrcpath}/Makefile"
-}
+build.args	CC="${configure.cc}" EXTRA_CFLAGS="${configure.cflags} [get_canonical_archflags]"

Added: trunk/dports/print/psutils/files/Makefile.unix.patch
===================================================================
--- trunk/dports/print/psutils/files/Makefile.unix.patch	                        (rev 0)
+++ trunk/dports/print/psutils/files/Makefile.unix.patch	2012-03-23 12:50:17 UTC (rev 91066)
@@ -0,0 +1,97 @@
+--- Makefile.unix.orig	1997-03-12 09:52:59.000000000 +1100
++++ Makefile.unix	2012-03-23 23:44:54.000000000 +1100
+@@ -28,7 +28,7 @@
+ BINDIR = /usr/local/bin
+ SCRIPTDIR = $(BINDIR)
+ INCLUDEDIR = /usr/local/share/psutils
+-PERL = /usr/local/bin/perl
++PERL = perl
+ 
+ BINMODE = 0755
+ MANMODE = 0644
+@@ -39,7 +39,8 @@
+ MANDIR = /usr/local/share/man/man$(MANEXT)
+ 
+ CC = gcc
+-CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall
++CPPFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX
++CFLAGS = -Wall -Wextra $(EXTRA_CFLAGS)
+ 
+ BIN = psbook psselect pstops epsffit psnup \
+ 	psresize
+@@ -65,30 +66,30 @@
+ epsffit.o: epsffit.c pserror.h patchlev.h
+ 
+ epsffit: epsffit.o pserror.o
+-	$(CC) $(CCFLAGS) -o epsffit pserror.o epsffit.o
++	$(CC) $(CFLAGS) -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) $(CFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o
+ 
+ psnup.o: psutil.h patchlev.h psspec.h pserror.h psnup.c
+ 
+ psresize: psresize.o psutil.o pserror.o psspec.o
+-	$(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o
++	$(CC) $(CFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o
+ 
+ psresize.o: psutil.h patchlev.h psspec.h pserror.h psresize.c
+ 
+ psbook: psbook.o psutil.o pserror.o
+-	$(CC) $(CCFLAGS) -o psbook psutil.o pserror.o psbook.o
++	$(CC) $(CFLAGS) -o psbook psutil.o pserror.o psbook.o
+ 
+ psbook.o: psutil.h patchlev.h pserror.h psbook.c
+ 
+ psselect: psselect.o psutil.o pserror.o
+-	$(CC) $(CCFLAGS) -o psselect psutil.o pserror.o psselect.o
++	$(CC) $(CFLAGS) -o psselect psutil.o pserror.o psselect.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) $(CFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o
+ 
+ pstops.o: psutil.h patchlev.h psspec.h pserror.h pstops.c
+ 
+@@ -219,30 +220,30 @@
+ install: install.bin install.script install.man install.include
+ 
+ install.bin: $(BIN)
+-	-mkdir $(BINDIR)
++	mkdir -p $(DESTDIR)$(BINDIR)
+ 	@for i in $(BIN); do \
+ 		echo Installing $$i; \
+-		$(INSTALL) $$i $(BINDIR); \
++		$(INSTALL) $$i $(DESTDIR)$(BINDIR); \
+ 	done
+ 
+ install.script: $(PERLSCRIPTS) $(SHELLSCRIPTS)
+-	-mkdir $(SCRIPTDIR)
++	mkdir -p $(DESTDIR)$(SCRIPTDIR)
+ 	@for i in $(PERLSCRIPTS) $(SHELLSCRIPTS); do \
+ 		echo Installing $$i; \
+-		$(INSTALL) $$i $(SCRIPTDIR); \
++		$(INSTALL) $$i $(DESTDIR)$(SCRIPTDIR); \
+ 	done
+ 
+ install.include: $(INCLUDES)
+-	-mkdir $(INCLUDEDIR)
++	mkdir -p $(DESTDIR)$(INCLUDEDIR)
+ 	@for i in $(INCLUDES); do \
+ 		echo Installing $$i; \
+-		$(INSTALLMAN) $$i $(INCLUDEDIR); \
++		$(INSTALLMAN) $$i $(DESTDIR)$(INCLUDEDIR); \
+ 	done
+ 
+ install.man: $(MANPAGES)
+-	-mkdir $(MANDIR)
++	mkdir -p $(DESTDIR)$(MANDIR)
+ 	@for i in $(MANPAGES); do \
+ 		echo Installing manual page for $$i; \
+-		$(INSTALLMAN) $$i $(MANDIR)/$$i; \
++		$(INSTALLMAN) $$i $(DESTDIR)$(MANDIR)/$$i; \
+ 	done
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120323/447686ce/attachment.html>


More information about the macports-changes mailing list