Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'devel'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: '4.4'}
- {os: windows-latest, r: '4.3'}
- {os: windows-latest, r: '4.2'}
- {os: windows-latest, r: '4.1'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: pdftools
Type: Package
Title: Text Extraction, Rendering and Converting of PDF Documents
Version: 3.4.1
Version: 3.5.0
Authors@R: person("Jeroen", "Ooms", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0002-4035-0289"))
Description: Utilities based on 'libpoppler' <https://poppler.freedesktop.org> for extracting
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
3.5.0
- Windows: use poppler from Rtools if found

3.4.1
- Remove some test verbosity as per CRAN requeset
- Update maintainer email address
Expand Down
40 changes: 23 additions & 17 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
POPPLERDATA=share/poppler
RWINLIB=../windows/poppler
PKG_CXXFLAGS=-Dpoppler_cpp_EXPORTS -DBUNDLE_POPPLER_DATA
PKG_CPPFLAGS=-I$(RWINLIB)/include/poppler/cpp \
-I$(RWINLIB)/include/poppler \
-DSTRICT_R_HEADERS -DR_NO_REMAP
PKG_CONFIG_NAME = poppler-cpp poppler-data
PKG_CONFIG ?= $(BINPREF)pkg-config
PKG_CXXFLAGS = -Dpoppler_cpp_EXPORTS -DBUNDLE_POPPLER_DATA -DSTRICT_R_HEADERS -DR_NO_REMAP
PKG_LIBS := $(shell $(PKG_CONFIG) --libs $(PKG_CONFIG_NAME))

PKG_LIBS= \
-L$(RWINLIB)/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} \
-L$(RWINLIB)/lib \
-lpoppler-cpp -lpoppler -llcms2 -ljpeg -lpng16 -ltiff -lopenjp2 \
-lfreetype -lfreetype -lbz2 -liconv -lz
ifneq ($(PKG_LIBS),)
$(info using $(PKG_CONFIG_NAME) from Rtools)
PKG_CPPFLAGS := $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_NAME))
POPPLERDATA := $(shell pkg-config --variable=poppler_datadir $(PKG_CONFIG_NAME))
else
RWINLIB = ../windows/poppler
PKG_CPPFLAGS = -I$(RWINLIB)/include/poppler/cpp -I$(RWINLIB)/include/poppler
PKG_LIBS = -L$(RWINLIB)/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} -L$(RWINLIB)/lib \
-lpoppler-cpp -lpoppler -llcms2 -ljpeg -lpng16 -ltiff -lopenjp2 -lfreetype -lfreetype -lbz2 -liconv -lz
POPPLERDATA = $(RWINLIB)/share/poppler
endif

all: clean winlibs
all: $(SHLIB) copydata

clean:
rm -f $(OBJECTS) $(SHLIB)
$(OBJECTS): $(RWINLIB)

winlibs:
$(RWINLIB):
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"

copydata:
rm -Rf ../inst/share && mkdir -p ../inst/share
cp -Rf $(RWINLIB)/$(POPPLERDATA) ../inst/share/poppler
cp -Rf $(POPPLERDATA) ../inst/share/

.PHONY: all winlibs clean
clean:
rm -f $(SHLIB) $(OBJECTS)
Loading