Skip to content

Commit 81053ec

Browse files
authored
Create freebsd_pymupdf.sh
installation for FreeBSD
1 parent f9a41f5 commit 81053ec

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
setenv CFLAGS -fPIC
2+
3+
# also FreeBSD has a mupdf port, we should build it manually
4+
wget https://mupdf.com/downloads/mupdf-1.14.0-source.tar.gz
5+
tar -zxvf mupdf-1.14.0-source.tar.gz
6+
7+
rm -rf PyMuPDF
8+
git clone https://github.com/rk700/PyMuPDF.git
9+
10+
cd mupdf-1.14.0-source
11+
# replace 3 files in mupdf-1.14.0
12+
cp ../PyMuPDF/fitz/_mupdf_config.h include/mupdf/fitz/config.hfig.h
13+
cp ../PyMuPDF/fitz/_error.c source/fitz/error.c
14+
cp ../PyMuPDF/fitz/_pdf-device.c source/pdf/pdf-device.c
15+
16+
gmake HAVE_X11=no HAVE_GLFW=no HAVE_GLUT=no prefix=/usr/local
17+
gmake HAVE_X11=no HAVE_GLFW=no HAVE_GLUT=no prefix=/usr/local install
18+
19+
cd ../PyMuPDF
20+
python setup.py build
21+
python setup.py install

0 commit comments

Comments
 (0)