Instead of tossing a bunch of utilities, pass the ones we want.
Makefile and Makefile.in patch gets simpler, no package change.

Feedback? OK?

diff --git a/textproc/xpdf/Makefile b/textproc/xpdf/Makefile
index b2d76aeb4..0c99b603e 100644
--- a/textproc/xpdf/Makefile
+++ b/textproc/xpdf/Makefile
@@ -32,18 +32,18 @@ COMPILER =          base-clang ports-gcc base-gcc
 
 NO_TEST=       Yes
 
-post-install:
+# others are already in popper-utils
+PROGS=         xpdf pdfdetach pdftopng
+ALL_TARGET=    ${PROGS}
+
+do-install:
+.for prog in ${PROGS}
+       ${INSTALL_PROGRAM} ${WRKBUILD}/xpdf/${prog} ${PREFIX}/bin/
+       ${INSTALL_MAN} ${WRKSRC}/doc/${prog}.1 ${PREFIX}/man/man1/
+.endfor
+       ${INSTALL_MAN} ${WRKSRC}/doc/xpdfrc.5 ${PREFIX}/man/man5/
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/xpdf
        ${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc \
                ${PREFIX}/share/examples/xpdf/xpdfrc
-# already in poppler-utils
-.for i in pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext
-       rm ${PREFIX}/man/man1/$i.1
-       rm ${PREFIX}/bin/$i
-.endfor
-# forgotten in Makefile.in (there's also a pdfthtml, but it conflicts
-# with poppler-utils):
-       ${INSTALL_PROGRAM} ${WRKBUILD}/xpdf/pdftopng ${PREFIX}/bin
-       ${INSTALL_MAN} ${WRKSRC}/doc/pdftopng.1 ${PREFIX}/man/man1
 
 .include <bsd.port.mk>
diff --git a/textproc/xpdf/patches/patch-Makefile_in 
b/textproc/xpdf/patches/patch-Makefile_in
index 9116dbe9c..065cec7fe 100644
--- a/textproc/xpdf/patches/patch-Makefile_in
+++ b/textproc/xpdf/patches/patch-Makefile_in
@@ -1,18 +1,16 @@
---- Makefile.in.orig   Mon Aug 15 23:08:52 2011
-+++ Makefile.in        Thu Aug 18 21:10:22 2011
-@@ -102,13 +102,8 @@ install: dummy
-       $(INSTALL_DATA) $(srcdir)/doc/pdfimages.1 
$(DESTDIR)@mandir@/man1/pdfimages.1
-       -mkdir -p $(DESTDIR)@mandir@/man5
-       $(INSTALL_DATA) $(srcdir)/doc/xpdfrc.5 $(DESTDIR)@mandir@/man5/xpdfrc.5
--      -mkdir -p $(DESTDIR)@sysconfdir@
--      @if test ! -f $(DESTDIR)@sysconfdir@/xpdfrc; then \
--              echo "$(INSTALL_DATA) $(srcdir)/doc/sample-xpdfrc 
$(DESTDIR)@sysconfdir@/xpdfrc"; \
--              $(INSTALL_DATA) $(srcdir)/doc/sample-xpdfrc 
$(DESTDIR)@sysconfdir@/xpdfrc; \
--      else \
--              echo "# not overwriting the existing 
$(DESTDIR)@sysconfdir@/xpdfrc"; \
--      fi
-+      -mkdir -p $(PREFIX)/share/examples/xpdf
-+      $(INSTALL_DATA) $(srcdir)/doc/sample-xpdfrc 
$(PREFIX)/share/examples/xpdf/xpdfrc
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -67,6 +67,12 @@ pdfdetach:
+       cd @UP_DIR@splash; $(MAKE)
+       cd @UP_DIR@xpdf; $(MAKE) pdfdetach$(EXE)
  
- clean:
-       -cd goo; $(MAKE) clean
++pdftopng:
++      cd goo; $(MAKE)
++      cd @UP_DIR@fofi; $(MAKE)
++      cd @UP_DIR@splash; $(MAKE)
++      cd @UP_DIR@xpdf; $(MAKE) pdftopng$(EXE)
++
+ pdftoppm:
+       cd goo; $(MAKE)
+       cd @UP_DIR@fofi; $(MAKE)

Reply via email to