1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

initial changes to suit linuxBrew

This commit is contained in:
Stephen Gaito 2020-06-02 04:14:34 +00:00
parent 3fcd0a6674
commit 9a13676801
5 changed files with 47 additions and 38 deletions

View File

@ -10,8 +10,8 @@ export MAKE_PARALLEL="-j $(nproc)"
# choose one of the following... # choose one of the following...
# #
export PDF2HTMLEX_BRANCH=update-poppler # export PDF2HTMLEX_BRANCH="<<YourTagHereWithNoSpaces>>"
# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
# The following environment variable determines where the poppler, # The following environment variable determines where the poppler,
# poppler-data, fontforge and pdf2htmlEX packages are installed. # poppler-data, fontforge and pdf2htmlEX packages are installed.

View File

@ -10,14 +10,22 @@ export MAKE_PARALLEL="-j $(nproc)"
# choose one of the following... # choose one of the following...
# #
export PDF2HTMLEX_BRANCH=update-poppler # export PDF2HTMLEX_BRANCH="<<YourTagHereWithNoSpaces>>"
# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
export PDF2HTMLEX_PREFIX=toBeDetermined # The following environment variable determines where the poppler,
# poppler-data, fontforge and pdf2htmlEX packages are installed.
# CHANGE IT TO SUIT YOUR NEEDS:
#
export PDF2HTMLEX_PREFIX=/home/linuxbrew/.linuxbrew
################ ################
# do the build # do the build
# The following is used by the pdf2htmlEX CMakeLists.txt file
#
export USING_BREW=1
./buildScripts/versionEnvs || { echo 'versionEnvs FAILED' ; exit 1 ; } ./buildScripts/versionEnvs || { echo 'versionEnvs FAILED' ; exit 1 ; }
./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; } ./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; }
@ -30,14 +38,10 @@ export PDF2HTMLEX_PREFIX=toBeDetermined
./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; } ./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; }
./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; }
./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; } ./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; }
./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; } ./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; }
./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; }
./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; } ./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; }
./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; } ./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; }

View File

@ -9,16 +9,16 @@ echo "-------------------------------------------------------------------"
echo "" echo ""
brew update brew update
brew install \ brew install \
git \ git \
pkg-config \ pkg-config \
ruby \ ruby \
autoconf \ autoconf \
libtool \ libtool \
cmake \ cmake \
make \ make \
gcc \ gcc \
gettext \ gettext \
openjdk \ openjdk \
jq \ jq \
tree tree

View File

@ -10,12 +10,13 @@ echo "-------------------------------------------------------------------"
echo "" echo ""
brew update brew update
brew install \ brew install \
cairo \ cairo \
libspiro \ libpng \
libpng \ jpeg \
jpeg \ libxml2 \
pango \
little-cms2 \ # libspiro \
libxml2 \ # pango \
libuninameslist \ # little-cms2 \
# libuninameslist \

View File

@ -39,6 +39,7 @@ set(POPPLER_LIBRARIES ${POPPLER_LIBRARIES}
${CMAKE_SOURCE_DIR}/../poppler/build/libpoppler.a ${CMAKE_SOURCE_DIR}/../poppler/build/libpoppler.a
) )
if(ENABLE_SVG) if(ENABLE_SVG)
pkg_check_modules(CAIRO REQUIRED cairo>=1.10.0) pkg_check_modules(CAIRO REQUIRED cairo>=1.10.0)
message("-- Trying to locate cairo-svg...") message("-- Trying to locate cairo-svg...")
@ -46,8 +47,10 @@ if(ENABLE_SVG)
if(CAIRO_SVG_INCLUDE_PATH) if(CAIRO_SVG_INCLUDE_PATH)
message("-- found cairo-svg...") message("-- found cairo-svg...")
include_directories(${CAIRO_INCLUDE_DIRS}) include_directories(${CAIRO_INCLUDE_DIRS})
link_directories(${CAIRO_LIBRARY_DIRS}) if(NOT DEFINED ENV{USING_BREW})
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${CAIRO_LIBRARIES}) link_directories(${CAIRO_LIBRARY_DIRS})
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${CAIRO_LIBRARIES})
endif()
set(ENABLE_SVG 1) set(ENABLE_SVG 1)
else() else()
message(FATAL_ERROR "Error: no SVG support found in Cairo") message(FATAL_ERROR "Error: no SVG support found in Cairo")
@ -56,7 +59,7 @@ if(ENABLE_SVG)
find_package(Freetype REQUIRED) find_package(Freetype REQUIRED)
include_directories(${FREETYPE_INCLUDE_DIRS}) include_directories(${FREETYPE_INCLUDE_DIRS})
link_directories(${FREETYPE_LIBRARY_DIRS}) link_directories(${FREETYPE_LIBRARY_DIRS})
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FREETYPE_LIBRARIES}) # set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FREETYPE_LIBRARIES})
endif() endif()
# SINCE we have a very intimate relationship with a particular version of # SINCE we have a very intimate relationship with a particular version of
@ -79,16 +82,17 @@ set(FONTFORGE_LIBRARIES ${FONTFORGE_LIBRARIES}
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS}
${POPPLER_LIBRARIES} ${POPPLER_LIBRARIES}
${FONTFORGE_LIBRARIES} ${FONTFORGE_LIBRARIES}
-lfreetype ${CAIRO_LIBRARIES}
-lfontconfig
-ljpeg -ljpeg
-lpng -lpng
-lz -lfontconfig
-pthread -lfreetype
-lm
-lxml2 -lxml2
-lglib-2.0 -lglib-2.0
-lgio-2.0 -lgio-2.0
-pthread
-lz
-lm
) )
# -llcms2 # -llcms2