On Fri, Jan 18, 2008 at 12:37:34AM -0200, Federico Schwindt wrote:
> > [..]
> > >
> > > If you look at the whole thread, having a flavor was the original
> > > idea from the OP, so if more people consider it the best option,
> > > we should have a look at it instead of trying to make this port
> > > a multipackage.
> > >
> > > Comments on the original diff ?
> > > http://marc.info/?l=openbsd-ports&m=119456375313172&w=2
> > > We take this as a starting point and add a no_x11 flavor ?
> >
> > I've read the whole thread and my point is that it's perfectly fine to
> > have a no_x11 flavor (as opposed to other people's opinion).
> > I've looked at it quickly and looks fine except for the BINARIES
> > define that seems unneeded/unused but I will try it and comment as
> > soon as I can.
> 
>   Builds and works fine here. Tested on amd64. the BINARIES define can
> be removed.

Ok, so here's an updated diff against current which removes the BINARIES
definition, tested @i386 with and without no_x11 flavor, make 
port-lib-depends-check is still happy.

Ok to commit it ? Objections from xpdf users ?

Landry
Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/xpdf/Makefile,v
retrieving revision 1.57
diff -u -p -u -r1.57 Makefile
--- Makefile    9 Nov 2007 07:15:12 -0000       1.57
+++ Makefile    18 Jan 2008 09:26:57 -0000
@@ -3,7 +3,7 @@
 COMMENT=       PDF viewer for X11
 
 DISTNAME=      xpdf-3.02
-PKGNAME=       xpdf-3.02pl2
+PKGNAME=       xpdf-3.02pl2p0
 CATEGORIES=    textproc x11
 
 MASTER_SITES=  ftp://ftp.foolabs.com/pub/xpdf/ \
@@ -17,24 +17,34 @@ HOMEPAGE=   http://www.foolabs.com/xpdf/
 LIB_DEPENDS+=  t1.>=3::devel/t1lib
 RUN_DEPENDS+=  ::print/ghostscript/gnu-fonts
 
+FLAVORS=        no_x11
+FLAVOR?=
+
 # GPL
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB=               ICE SM X11 Xext Xp Xpm Xt c freetype m pthread \
-                       stdc++ z
+WANTLIB=               c m pthread stdc++
 
-USE_X11=       Yes
 USE_GMAKE=     Yes
-USE_MOTIF=     openmotif
 CONFIGURE_STYLE=autoconf no-autoheader
 AUTOCONF_VERSION=2.59
 CONFIGURE_ARGS+= --enable-multithreaded \
                 --without-Sgm-library \
                 --without-libpaper-library
-CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include/freetype2 -I${X11BASE}/include 
-I${LOCALBASE}/include" \
+
+.if ${FLAVOR:L:Mno_x11}
+CONFIGURE_ARGS+= --without-x
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+               LDFLAGS="-L${LOCALBASE}/lib"
+.else
+USE_X11=       Yes
+USE_MOTIF=     openmotif
+WANTLIB+=      ICE SM X11 Xext Xp Xpm Xt freetype z
+CONFIGURE_ENV=  CPPFLAGS="-I${X11BASE}/include/freetype2 -I${X11BASE}/include 
-I${LOCALBASE}/include" \
                LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lz"
+.endif
 
 NO_REGRESS=    Yes
 
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_in   18 Jan 2008 09:26:57 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+--- Makefile.in.orig   Mon Nov 12 11:33:36 2007
++++ Makefile.in        Mon Nov 12 11:34:40 2007
+@@ -94,13 +94,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
+ 
+ clean:
+       -cd goo; $(MAKE) clean
Index: pkg/PFRAG.no-no_x11
===================================================================
RCS file: pkg/PFRAG.no-no_x11
diff -N pkg/PFRAG.no-no_x11
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.no-no_x11 18 Jan 2008 09:26:57 -0000
@@ -0,0 +1,5 @@
[EMAIL PROTECTED] $OpenBSD$
+bin/pdftoppm
+bin/xpdf
[EMAIL PROTECTED] man/man1/pdftoppm.1
[EMAIL PROTECTED] man/man1/xpdf.1
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/textproc/xpdf/pkg/PLIST,v
retrieving revision 1.9
diff -u -p -u -r1.9 PLIST
--- pkg/PLIST   15 Sep 2004 18:44:09 -0000      1.9
+++ pkg/PLIST   18 Jan 2008 09:26:57 -0000
@@ -2,18 +2,15 @@
 bin/pdffonts
 bin/pdfimages
 bin/pdfinfo
-bin/pdftoppm
 bin/pdftops
 bin/pdftotext
-bin/xpdf
 @man man/man1/pdffonts.1
 @man man/man1/pdfimages.1
 @man man/man1/pdfinfo.1
[EMAIL PROTECTED] man/man1/pdftoppm.1
 @man man/man1/pdftops.1
 @man man/man1/pdftotext.1
[EMAIL PROTECTED] man/man1/xpdf.1
 @man man/man5/xpdfrc.5
 share/examples/xpdf/
 share/examples/xpdf/xpdfrc
 @sample ${SYSCONFDIR}/xpdfrc
+!%%no_x11%%

Reply via email to