|
1 |
| -# Tesseract configuration |
2 |
| -TESSERACT_RWINLIB = ../windows/tesseract |
3 |
| -PKG_CPPFLAGS += -I${TESSERACT_RWINLIB}/include -I${TESSERACT_RWINLIB}/include/leptonica |
| 1 | +RWINLIB_TESSERACT=../windows/tesseract |
| 2 | +RWINLIB_POPPLER=../windows/poppler |
| 3 | +POPPLERDATA=share/poppler |
4 | 4 |
|
5 |
| -PKG_LIBS += \ |
6 |
| - -L${TESSERACT_RWINLIB}/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} \ |
7 |
| - -L${TESSERACT_RWINLIB}/lib \ |
| 5 | +PKG_CPPFLAGS = -I${RWINLIB_TESSERACT}/include -I${RWINLIB_TESSERACT}/include/leptonica -I${RWINLIB_POPPLER}/include/poppler/cpp -I${RWINLIB_POPPLER}/include/poppler |
| 6 | + |
| 7 | +PKG_CXXFLAGS = -Dpoppler_cpp_EXPORTS -DBUNDLE_POPPLER_DATA |
| 8 | + |
| 9 | +PKG_LIBS = \ |
| 10 | + -L${RWINLIB_TESSERACT}/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} \ |
| 11 | + -L${RWINLIB_TESSERACT}/lib \ |
| 12 | + -L${RWINLIB_POPPLER}/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} \ |
| 13 | + -L${RWINLIB_POPPLER}/lib \ |
8 | 14 | -ltesseract -lleptonica \
|
9 | 15 | -ltiff -lopenjp2 -lwebp -lsharpyuv -ljpeg -lgif -lpng16 -lz \
|
10 |
| - -lws2_32 |
11 |
| - |
12 |
| -# Poppler configuration |
13 |
| -POPPLERDATA = share/poppler |
14 |
| -POPPLER_RWINLIB = ../windows/poppler |
15 |
| -PKG_CXXFLAGS += -Dpoppler_cpp_EXPORTS -DBUNDLE_POPPLER_DATA |
16 |
| -PKG_CPPFLAGS += -I$(POPPLER_RWINLIB)/include/poppler/cpp \ |
17 |
| - -I$(POPPLER_RWINLIB)/include/poppler \ |
18 |
| - -DSTRICT_R_HEADERS -DR_NO_REMAP |
19 |
| - |
20 |
| -PKG_LIBS += \ |
21 |
| - -L$(POPPLER_RWINLIB)/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} \ |
22 |
| - -L$(POPPLER_RWINLIB)/lib \ |
| 16 | + -lws2_32 \ |
23 | 17 | -lpoppler-cpp -lpoppler -llcms2 -ljpeg -lpng16 -ltiff -lopenjp2 \
|
24 | 18 | -lfreetype -lfreetype -lbz2 -liconv -lz
|
25 | 19 |
|
26 | 20 | all: clean winlibs
|
27 | 21 |
|
28 | 22 | clean:
|
29 |
| - cmd /C "del /Q $(OBJECTS) $(SHLIB)" |
| 23 | + rm -f $(OBJECTS) $(SHLIB) |
30 | 24 |
|
31 | 25 | winlibs:
|
32 | 26 | "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
|
33 |
| - cmd /C "rmdir /S /Q ..\\inst\\share && mkdir ..\\inst\\share" |
34 |
| - cmd /C "xcopy /E /I $(POPPLER_RWINLIB)\\$(POPPLERDATA) ..\\inst\\share\\poppler" |
| 27 | + cp -Rf ../windows/tessdata ../inst/ |
| 28 | + cp -Rf ${RWINLIB_TESSERACT}/share/tessdata ../inst/ |
| 29 | + rm -Rf ../inst/share && mkdir -p ../inst/share |
| 30 | + cp -Rf $(RWINLIB_POPPLER)/$(POPPLERDATA) ../inst/share/poppler |
35 | 31 |
|
36 | 32 | .PHONY: all winlibs clean
|
37 | 33 |
|
0 commit comments