* [ITA] xpdf-4.00-1
@ 2017-10-09 16:20 Ken Brown
2017-10-09 20:54 ` Jon Turney
0 siblings, 1 reply; 3+ messages in thread
From: Ken Brown @ 2017-10-09 16:20 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
My cygport file and patches are attached. Note that there has been a
change in the build system since the last release. It now uses cmake
and libQt. For comparison, I'm also attaching the cygport file from the
previous release.
Package files
=============
D=http://sanibeltranquility.com/cygwin
${D}/x86/release/xpdf/xpdf-4.00-1-src.tar.xz
${D}/x86/release/xpdf/xpdf-4.00-1.hint
${D}/x86/release/xpdf/xpdf-4.00-1.tar.xz
${D}/x86/release/xpdf/xpdf-debuginfo/xpdf-debuginfo-4.00-1.hint
${D}/x86/release/xpdf/xpdf-debuginfo/xpdf-debuginfo-4.00-1.tar.xz
${D}/x86_64/release/xpdf/xpdf-4.00-1-src.tar.xz
${D}/x86_64/release/xpdf/xpdf-4.00-1.hint
${D}/x86_64/release/xpdf/xpdf-4.00-1.tar.xz
${D}/x86_64/release/xpdf/xpdf-debuginfo/xpdf-debuginfo-4.00-1.hint
${D}/x86_64/release/xpdf/xpdf-debuginfo/xpdf-debuginfo-4.00-1.tar.xz
Ken
[-- Attachment #2: xpdf.cygport --]
[-- Type: text/plain, Size: 2275 bytes --]
NAME="xpdf"
VERSION=4.00
RELEASE=1
CATEGORY="X11 Doc"
SUMMARY="An open source viewer for Portable Document Format (PDF) files"
DESCRIPTION="Xpdf is an open source viewer for Portable Document Format (PDF)
files. (These are also sometimes called 'Acrobat' files, from the
name of Adobe's PDF software.) The Xpdf viewer uses the Qt
cross-platform GUI toolkit. The Xpdf project also includes a PDF text
extractor, PDF-to-PostScript converter, and various other utilities.
These are not included in the Cygwin xpdf package because poppler
provides similar utilities."
HOMEPAGE="http://www.xpdfreader.com/"
SRC_URI="
${HOMEPAGE}/dl/${P}.tar.gz
${HOMEPAGE}/dl/${PN}-arabic.tar.gz
${HOMEPAGE}/dl/${PN}-chinese-simplified.tar.gz
${HOMEPAGE}/dl/${PN}-chinese-traditional.tar.gz
${HOMEPAGE}/dl/${PN}-cyrillic.tar.gz
${HOMEPAGE}/dl/${PN}-greek.tar.gz
${HOMEPAGE}/dl/${PN}-hebrew.tar.gz
${HOMEPAGE}/dl/${PN}-japanese.tar.gz
${HOMEPAGE}/dl/${PN}-korean.tar.gz
${HOMEPAGE}/dl/${PN}-latin2.tar.gz
${HOMEPAGE}/dl/${PN}-thai.tar.gz
${HOMEPAGE}/dl/${PN}-turkish.tar.gz
"
inherit cmake
# Don't try to use lcms2; it's not supported in the open-source version.
CYGCMAKE_ARGS="
-DUSE_LIBPAPER=ON
-DA4_PAPER=ON
-DOPI_SUPPORT=ON
-DSPLASH_CMYK=ON
-DSYSTEM_XPDFRC=/etc/xpdfrc
"
PATCH_URI="xpdfrc.patch"
PATCH_URI+=" libpaper.patch"
DEPEND="cmake libQt5Core-devel libQt5Gui-devel libpaper-devel libfreetype-devel"
REQUIRES="libQt5Svg5" # Needed for the toolbar icons.
src_install() {
cd ${B}
cyginstall
insinto /etc
newins ${S}/doc/sample-xpdfrc xpdfrc
# For the following deletions see --> http://cygwin.com/ml/cygwin-apps/2012-02/msg00148.html
rm -fr ${D}/usr/{bin,share/man/man1}/pdf*
for l in arabic chinese-simplified chinese-traditional cyrillic greek \
hebrew japanese korean latin2 thai turkish
do
cd ${S}/../${PN}-${l}
newdoc README README.${l}
echo >> ${D}/etc/xpdfrc
cat add-to-xpdfrc >> ${D}/etc/xpdfrc
insinto /usr/share/${PN}/${l}
doins *.unicodeMap
if [ -f *.nameToUnicode ]
then
doins *.nameToUnicode
fi
if [ -d CMap ]
then
doins *.cidToUnicode
cp -r CMap ${D}/usr/share/${PN}/${l}/
fi
done
sed -e 's#/usr/local/share/xpdf#/usr/share/xpdf#g' -i ${D}/etc/xpdfrc
make_etc_defaults /etc/xpdfrc
}
[-- Attachment #3: libpaper.patch --]
[-- Type: text/plain, Size: 6198 bytes --]
Based on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222002
--- origsrc/xpdf-4.00/cmake-config.txt 2017-08-08 19:22:50.000000000 -0400
+++ src/xpdf-4.00/cmake-config.txt 2017-10-02 12:11:58.200991200 -0400
@@ -79,6 +79,7 @@ option(USE_EXCEPTIONS "use C++ exception
option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF)
option(SPLASH_CMYK "include support for CMYK rasterization" OFF)
option(SPLASH_DEVICEN "include support for DeviceN rasterization" OFF)
+option(USE_LIBPAPER "use libpaper" OFF)
if (SPLASH_DEVICEN)
set(SPLASH_CMYK ON)
endif ()
@@ -278,10 +279,34 @@ else()
endif()
#--- look for libpaper
-find_library(HAVE_PAPER_H
- NAMES paper libpaper
- PATH_SUFFIXES lib64 lib
-)
+if(USE_LIBPAPER)
+ find_library(PAPER_LIBRARY
+ NAMES paper libpaper
+ HINTS
+ ${PAPER_DIR}
+ PATHS
+ /usr/local
+ /usr/freeware
+ )
+ find_path(PAPER_INCLUDE_DIR paper.h
+ HINTS
+ ${PAPER_DIR}
+ PATHS
+ /usr/local/include
+ /usr/freeware/include
+ PATH_SUFFIXES include
+ )
+endif()
+
+if (USE_LIBPAPER)
+ if (PAPER_INCLUDE_DIR AND PAPER_LIBRARY)
+ set(HAVE_PAPER_H TRUE)
+ message(STATUS "Found libpaper: ${PAPER_LIBRARY}")
+ else ()
+ set(HAVE_PAPER_H FALSE)
+ message(STATUS "libpaper not found")
+ endif ()
+endif ()
#--- look for pthreads
find_package(Threads)
--- origsrc/xpdf-4.00/xpdf/CMakeLists.txt 2017-08-08 19:22:50.000000000 -0400
+++ src/xpdf-4.00/xpdf/CMakeLists.txt 2017-10-02 12:11:58.208511100 -0400
@@ -24,6 +24,10 @@ else ()
set(COLOR_MANAGER_SOURCE "")
endif ()
+if (HAVE_PAPER_H)
+ include_directories("${PAPER_INCLUDE_DIR}")
+endif ()
+
add_library(xpdf_objs OBJECT
AcroForm.cc
Annot.cc
@@ -108,7 +112,7 @@ if (HAVE_SPLASH)
target_link_libraries(pdftops goo fofi splash
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
- ${LCMS_LIBRARY})
+ ${LCMS_LIBRARY} ${PAPER_LIBRARY})
else ()
add_executable(pdftops
$<TARGET_OBJECTS:xpdf_objs>
@@ -116,7 +120,7 @@ else ()
PSOutputDev.cc
pdftops.cc
)
- target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY})
+ target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
endif ()
install(TARGETS pdftops RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftops.1 DESTINATION man/man1)
@@ -128,7 +132,7 @@ add_executable(pdftotext
TextOutputDev.cc
pdftotext.cc
)
-target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY})
+target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
install(TARGETS pdftotext RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftotext.1 DESTINATION man/man1)
@@ -145,7 +149,7 @@ if (HAVE_SPLASH AND PNG_FOUND)
target_link_libraries(pdftohtml goo fofi splash
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
- ${LCMS_LIBRARY} ${PNG_LIBRARIES})
+ ${LCMS_LIBRARY} ${PNG_LIBRARIES} ${PAPER_LIBRARY})
install(TARGETS pdftohtml RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftohtml.1 DESTINATION man/man1)
endif ()
@@ -156,7 +160,7 @@ add_executable(pdfinfo
$<TARGET_OBJECTS:xpdf_objs>
pdfinfo.cc
)
-target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY})
+target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
install(TARGETS pdfinfo RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfinfo.1 DESTINATION man/man1)
@@ -166,7 +170,7 @@ add_executable(pdffonts
$<TARGET_OBJECTS:xpdf_objs>
pdffonts.cc
)
-target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY})
+target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
install(TARGETS pdffonts RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdffonts.1 DESTINATION man/man1)
@@ -176,7 +180,7 @@ add_executable(pdfdetach
$<TARGET_OBJECTS:xpdf_objs>
pdfdetach.cc
)
-target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY})
+target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
install(TARGETS pdfdetach RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfdetach.1 DESTINATION man/man1)
@@ -191,7 +195,7 @@ if (HAVE_SPLASH)
target_link_libraries(pdftoppm goo fofi splash
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
- ${LCMS_LIBRARY})
+ ${LCMS_LIBRARY} ${PAPER_LIBRARY})
install(TARGETS pdftoppm RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftoppm.1 DESTINATION man/man1)
endif ()
@@ -207,7 +211,7 @@ if (HAVE_SPLASH AND PNG_FOUND)
target_link_libraries(pdftopng goo fofi splash
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
- ${LCMS_LIBRARY} ${PNG_LIBRARIES})
+ ${LCMS_LIBRARY} ${PNG_LIBRARIES} ${PAPER_LIBRARY})
install(TARGETS pdftopng RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftopng.1 DESTINATION man/man1)
endif ()
@@ -219,7 +223,7 @@ add_executable(pdfimages
ImageOutputDev.cc
pdfimages.cc
)
-target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY})
+target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
install(TARGETS pdfimages RUNTIME DESTINATION bin)
install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfimages.1 DESTINATION man/man1)
--- origsrc/xpdf-4.00/xpdf-qt/CMakeLists.txt 2017-08-08 19:22:50.000000000 -0400
+++ src/xpdf-4.00/xpdf-qt/CMakeLists.txt 2017-10-02 12:11:58.212001500 -0400
@@ -82,7 +82,7 @@ if ((QT4_FOUND OR Qt5Widgets_FOUND)
)
target_link_libraries(xpdf ${QT_LIBRARIES} ${EXTRA_QT_LIBRARIES}
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
- ${DTYPE_LIBRARY} ${LCMS_LIBRARY}
+ ${DTYPE_LIBRARY} ${LCMS_LIBRARY} ${PAPER_LIBRARY}
${CMAKE_THREAD_LIBS_INIT})
set_property(TARGET xpdf PROPERTY WIN32_EXECUTABLE 1)
[-- Attachment #4: xpdfrc.patch --]
[-- Type: text/plain, Size: 3513 bytes --]
--- origsrc/xpdf-4.00/doc/sample-xpdfrc 2017-08-08 19:22:50.000000000 -0400
+++ src/xpdf-4.00/doc/sample-xpdfrc 2017-10-02 12:32:08.809515600 -0400
@@ -4,7 +4,7 @@
#
# The Xpdf tools look for a config file in two places:
# 1. ~/.xpdfrc
-# 2. in a system-wide directory, typically /usr/local/etc/xpdfrc
+# 2. in a system-wide directory, typically /etc/xpdfrc
#
# This sample config file demonstrates some of the more common
# configuration options. Everything here is commented out. You
@@ -29,20 +29,20 @@
# installed in a "standard" location, xpdf will find them
# automatically.)
-#fontFile Times-Roman /usr/local/share/ghostscript/fonts/n021003l.pfb
-#fontFile Times-Italic /usr/local/share/ghostscript/fonts/n021023l.pfb
-#fontFile Times-Bold /usr/local/share/ghostscript/fonts/n021004l.pfb
-#fontFile Times-BoldItalic /usr/local/share/ghostscript/fonts/n021024l.pfb
-#fontFile Helvetica /usr/local/share/ghostscript/fonts/n019003l.pfb
-#fontFile Helvetica-Oblique /usr/local/share/ghostscript/fonts/n019023l.pfb
-#fontFile Helvetica-Bold /usr/local/share/ghostscript/fonts/n019004l.pfb
-#fontFile Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
-#fontFile Courier /usr/local/share/ghostscript/fonts/n022003l.pfb
-#fontFile Courier-Oblique /usr/local/share/ghostscript/fonts/n022023l.pfb
-#fontFile Courier-Bold /usr/local/share/ghostscript/fonts/n022004l.pfb
-#fontFile Courier-BoldOblique /usr/local/share/ghostscript/fonts/n022024l.pfb
-#fontFile Symbol /usr/local/share/ghostscript/fonts/s050000l.pfb
-#fontFile ZapfDingbats /usr/local/share/ghostscript/fonts/d050000l.pfb
+#fontFile Times-Roman /usr/share/ghostscript/fonts/n021003l.pfb
+#fontFile Times-Italic /usr/share/ghostscript/fonts/n021023l.pfb
+#fontFile Times-Bold /usr/share/ghostscript/fonts/n021004l.pfb
+#fontFile Times-BoldItalic /usr/share/ghostscript/fonts/n021024l.pfb
+#fontFile Helvetica /usr/share/ghostscript/fonts/n019003l.pfb
+#fontFile Helvetica-Oblique /usr/share/ghostscript/fonts/n019023l.pfb
+#fontFile Helvetica-Bold /usr/share/ghostscript/fonts/n019004l.pfb
+#fontFile Helvetica-BoldOblique /usr/share/ghostscript/fonts/n019024l.pfb
+#fontFile Courier /usr/share/ghostscript/fonts/n022003l.pfb
+#fontFile Courier-Oblique /usr/share/ghostscript/fonts/n022023l.pfb
+#fontFile Courier-Bold /usr/share/ghostscript/fonts/n022004l.pfb
+#fontFile Courier-BoldOblique /usr/share/ghostscript/fonts/n022024l.pfb
+#fontFile Symbol /usr/share/ghostscript/fonts/s050000l.pfb
+#fontFile ZapfDingbats /usr/share/ghostscript/fonts/d050000l.pfb
# If you need to display PDF files that refer to non-embedded fonts,
# you should add one or more fontDir options to point to the
@@ -50,19 +50,20 @@
# .pfb, .ttf, and .ttc files in those directories (other files will
# simply be ignored).
-#fontDir /usr/local/fonts/bakoma
+#fontDir /usr/local/share/fonts
+#fontDir /usr/share/fonts
#----- PostScript output control
# Set the default PostScript file or command.
-#psFile "|lpr -Pmyprinter"
+#psFile "/tmp/xpdf2ps.ps"
# Set the default PostScript paper size -- this can be letter, legal,
# A4, or A3. You can also specify a paper size as width and height
# (in points).
-#psPaperSize letter
+psPaperSize A4
#----- text output control
@@ -75,7 +76,7 @@
# Choose the end-of-line convention for multi-line copy-and-past and
# for pdftotext output. The available options are unix, mac, and dos.
-#textEOL unix
+textEOL unix
#----- misc settings
[-- Attachment #5: xpdf-old.cygport --]
[-- Type: text/plain, Size: 2769 bytes --]
# Adapted from Cygwin Ports project: http://cygwinports.dotsrc.org/
NAME="xpdf"
VERSION="3.04"
RELEASE="1"
CATEGORY="X11 Doc"
SUMMARY="An open source viewer for Portable Document Format (PDF) files"
DESCRIPTION="Xpdf is an open source viewer for Portable Document Format (PDF)
files. (These are also sometimes also called 'Acrobat' files, from the
name of Adobe's PDF software.) The Xpdf project also includes a PDF text
extractor, PDF-to-PostScript converter, and various other utilities. Xpdf
runs under the X Window System on UNIX, VMS, and OS/2. The non-X components
(pdftops, pdftotext, etc.) also run on Win32 systems and should run on pretty
much any system with a decent C++ compiler. Xpdf is designed to be small and
efficient. It can use Type 1 or TrueType fonts."
HOMEPAGE="http://www.foolabs.com/${PN}/"
SRC_URI="
ftp://ftp.foolabs.com/pub/${PN}/${P}.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${P}.tar.gz.sig
ftp://ftp.foolabs.com/pub/${PN}/${PN}-arabic-2011-aug-15.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-chinese-simplified-2011-sep-02.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-chinese-traditional-2011-sep-02.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-cyrillic-2011-aug-15.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-greek-2011-aug-15.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-hebrew-2011-aug-15.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-japanese-2011-sep-02.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-korean-2011-sep-02.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-latin2-2011-aug-15.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-thai-2011-aug-15.tar.gz
ftp://ftp.foolabs.com/pub/${PN}/${PN}-turkish-2011-aug-15.tar.gz
"
PATCH_URI="
xpdf.xpdfrc.patch
"
# Build dependencies only
DEPEND="libXm-devel"
DIFF_EXCLUDES="configure"
CYGCONF_ARGS="
--enable-a4-paper
--enable-opi
--enable-multithreaded
--enable-cmyk
--with-freetype2-includes=/usr/include/freetype2
"
src_compile() {
cd ${S}
autoconf
lndirs
cd ${B}
cygconf
cygmake
}
src_test() {
:
}
src_install() {
cd ${B}
cyginstall
# For the following deletions see --> http://cygwin.com/ml/cygwin-apps/2012-02/msg00148.html
rm -fr ${D}/usr/{bin,share/man/man1}/pdf*
for l in arabic chinese-simplified chinese-traditional cyrillic greek \
hebrew japanese korean latin2 thai turkish
do
cd ${S}/../${PN}-${l}
newdoc README README.${l}
echo >> ${D}/etc/xpdfrc
cat add-to-xpdfrc >> ${D}/etc/xpdfrc
insinto /usr/share/${PN}/${l}
doins *.unicodeMap
if [ -f *.nameToUnicode ]
then
doins *.nameToUnicode
fi
if [ -d CMap ]
then
doins *.cidToUnicode
cp -r CMap ${D}/usr/share/${PN}/${l}/
fi
done
sed -e 's#/usr/local/share/xpdf#/usr/share/xpdf#g' -i ${D}/etc/xpdfrc
make_etc_defaults /etc/xpdfrc
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ITA] xpdf-4.00-1
2017-10-09 16:20 [ITA] xpdf-4.00-1 Ken Brown
@ 2017-10-09 20:54 ` Jon Turney
2017-10-13 14:30 ` Andrew Schulman
0 siblings, 1 reply; 3+ messages in thread
From: Jon Turney @ 2017-10-09 20:54 UTC (permalink / raw)
To: cygwin-apps
On 09/10/2017 17:19, Ken Brown wrote:
> My cygport file and patches are attached. Note that there has been a
> change in the build system since the last release. It now uses cmake
> and libQt. For comparison, I'm also attaching the cygport file from the
> previous release.
Added to your packages.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ITA] xpdf-4.00-1
2017-10-09 20:54 ` Jon Turney
@ 2017-10-13 14:30 ` Andrew Schulman
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Schulman @ 2017-10-13 14:30 UTC (permalink / raw)
To: cygwin-apps
> On 09/10/2017 17:19, Ken Brown wrote:
> > My cygport file and patches are attached. Note that there has been a
> > change in the build system since the last release. It now uses cmake
> > and libQt. For comparison, I'm also attaching the cygport file from the
> > previous release.
>
> Added to your packages.
Gold star awarded! https://cygwin.com/goldstars/#KB
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-13 14:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 16:20 [ITA] xpdf-4.00-1 Ken Brown
2017-10-09 20:54 ` Jon Turney
2017-10-13 14:30 ` Andrew Schulman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).