1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

[PATCH] WITHOUT_X11 support for graphics/xpdf

The xpdf toolset does not require X libraries installed.
	(only the xpdf and pdftoppm binaries are not built)

	pdftoppm compiles with freetype2 only, too. So patch
	patchfiles enable build for pdftoppm.

PR:		ports/89822
Submitted by:	Martin Matuska <martin@matuska.org>
This commit is contained in:
Edwin Groothuis 2006-01-05 04:42:29 +00:00
parent e62864a49b
commit dd5be694da
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=152779
6 changed files with 72 additions and 7 deletions

View File

@ -25,15 +25,12 @@ LIB_DEPENDS= t1.5:${PORTSDIR}/devel/t1lib \
freetype.9:${PORTSDIR}/print/freetype2
RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/n021003l.pfb:${PORTSDIR}/print/gsfonts
USE_X_PREFIX= yes
USE_MOTIF= yes
USE_GMAKE= yes
USE_AUTOTOOLS= autoconf:259
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-gzip --enable-opi --with-x \
CONFIGURE_ARGS= --with-gzip --enable-opi \
--with-t1-library="${LOCALBASE}/lib" \
--with-t1-includes="${LOCALBASE}/include" \
--with-freetype2-library="${LOCALBASE}/lib" \
@ -47,10 +44,21 @@ MAN1= pdffonts.1 \
pdfinfo.1 \
pdftoppm.1 \
pdftops.1 \
pdftotext.1 \
xpdf.1
pdftotext.1
MAN5= xpdfrc.5
.if defined(WITHOUT_X11)
PKGNAMESUFFIX+= -nox11
CONFIGURE_ARGS+= --without-x
PLIST_SUB+= X11='@comment '
.else
CONFIGURE_ARGS+= --with-x
USE_X_PREFIX= yes
USE_MOTIF= yes
MAN1+= xpdf.1
PLIST_SUB+= X11=''
.endif
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}

View File

@ -0,0 +1,20 @@
--- Makefile.in.orig Thu Dec 1 17:04:10 2005
+++ Makefile.in Thu Dec 1 17:04:31 2005
@@ -82,7 +82,7 @@
$(INSTALL_PROGRAM) xpdf/pdftotext$(EXE) $(DESTDIR)@bindir@/pdftotext$(EXE)
$(INSTALL_PROGRAM) xpdf/pdfinfo$(EXE) $(DESTDIR)@bindir@/pdfinfo$(EXE)
$(INSTALL_PROGRAM) xpdf/pdffonts$(EXE) $(DESTDIR)@bindir@/pdffonts$(EXE)
-@X@ $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE)
+ $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE)
$(INSTALL_PROGRAM) xpdf/pdfimages$(EXE) $(DESTDIR)@bindir@/pdfimages$(EXE)
-mkdir -p $(DESTDIR)@mandir@/man1
@X@ $(INSTALL_DATA) $(srcdir)/doc/xpdf.1 $(DESTDIR)@mandir@/man1/xpdf.1
@@ -90,7 +90,7 @@
$(INSTALL_DATA) $(srcdir)/doc/pdftotext.1 $(DESTDIR)@mandir@/man1/pdftotext.1
$(INSTALL_DATA) $(srcdir)/doc/pdfinfo.1 $(DESTDIR)@mandir@/man1/pdfinfo.1
$(INSTALL_DATA) $(srcdir)/doc/pdffonts.1 $(DESTDIR)@mandir@/man1/pdffonts.1
-@X@ $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1
+ $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1
$(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

View File

@ -0,0 +1,15 @@
--- configure.orig Thu Dec 1 17:06:03 2005
+++ configure Thu Dec 1 17:06:25 2005
@@ -11776,8 +11776,8 @@
{ echo "$as_me:$LINENO: WARNING: Couldn't find FreeType" >&5
echo "$as_me: WARNING: Couldn't find FreeType" >&2;};
fi
- { echo "$as_me:$LINENO: WARNING: -- You will be able to compile pdftops, pdftotext,
- pdfinfo, pdffonts, and pdfimages, but not xpdf or pdftoppm" >&5
-echo "$as_me: WARNING: -- You will be able to compile pdftops, pdftotext,
- pdfinfo, pdffonts, and pdfimages, but not xpdf or pdftoppm" >&2;}
+ { echo "$as_me:$LINENO: WARNING: -- You will be able to compile pdftoppm, pdftops, pdftotext,
+ pdfinfo, pdffonts, and pdfimages, but not xpdf" >&5
+echo "$as_me: WARNING: -- You will be able to compile pdftoppm, pdftops, pdftotext,
+ pdfinfo, pdffonts, and pdfimages, but not xpdf" >&2;}
fi

View File

@ -0,0 +1,11 @@
--- configure.in.orig Thu Dec 1 17:05:11 2005
+++ configure.in Thu Dec 1 17:05:25 2005
@@ -341,6 +341,6 @@
if test "x$smr_have_freetype2_library" != xyes; then
AC_MSG_WARN([Couldn't find FreeType]);
fi
- AC_MSG_WARN([-- You will be able to compile pdftops, pdftotext,
- pdfinfo, pdffonts, and pdfimages, but not xpdf or pdftoppm])
+ AC_MSG_WARN([-- You will be able to compile pdftoppm, pdftops, pdftotext,
+ pdfinfo, pdffonts, and pdfimages, but not xpdf])
fi

View File

@ -0,0 +1,11 @@
--- xpdf/Makefile.in.orig Thu Dec 1 17:10:20 2005
+++ xpdf/Makefile.in Thu Dec 1 17:10:34 2005
@@ -109,7 +109,7 @@
pdffonts$(EXE) pdftoppm$(EXE) pdfimages$(EXE)
all-no-x: pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) pdffonts$(EXE) \
- pdfimages$(EXE)
+ pdftoppm$(EXE) pdfimages$(EXE)
#------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ bin/pdfinfo
bin/pdftoppm
bin/pdftops
bin/pdftotext
bin/xpdf
%%X11%%bin/xpdf
etc/xpdfrc
%%PORTDOCS%%%%DOCSDIR%%/ANNOUNCE
%%PORTDOCS%%%%DOCSDIR%%/CHANGES