summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2018-04-21 18:47:26 +0200
committerAndreas Politz <politza@hochschule-trier.de>2018-04-21 18:47:26 +0200
commit11efb071eda9fb0ad519387a424c8f989cb5338e (patch)
tree609b40e545a08976d72ac1571c26c07a1a9dfa57
parent962b993f8b664cdb7e27f93daf690d4e9493f70b (diff)
parent73ead2b71368fdacc4a1209b5af252a3ea604fac (diff)
Merge branch 'master' into next
-rw-r--r--README.org57
-rw-r--r--lisp/pdf-tools.el6
2 files changed, 31 insertions, 32 deletions
diff --git a/README.org b/README.org
index 16c1461..3c983d4 100644
--- a/README.org
+++ b/README.org
@@ -130,9 +130,18 @@
or likewise within Emacs using `setenv`.
After that, compilation should proceed as normal.
-**** Compiling on FreeBSD
- Although not officially suppported, it has been reported that
- pdf-tools work well on FreeBSD. Install the dependencies with
+**** FreeBSD
+ Although not officially supported, it has been reported that
+ pdf-tools work well on FreeBSD. Instead of building pdf-tools, you
+ can install one of the OS packages with, e.g.
+#+BEGIN_SRC sh
+ $ pkg install pdf-tools-emacs25
+#+END_SRC
+ To see the current list of pdf-tools packages for FreeBSD visit
+ [[https://repology.org/metapackages/?search=pdf-tools&inrepo=freebsd][the Repology list]].
+
+ To build pdf-tools from either melpa or directly from the source
+ repository, install the dependencies with
#+BEGIN_SRC sh
$ pkg install autotools gmake poppler-glib
#+END_SRC
@@ -156,20 +165,10 @@
emacs. This includes the standard binaries provided by the GNU
project, those available as MSYS2 packages and numerous third-party
binaries. It has been tested with emacs 25.1. Instructions are
- provided under [[Compilation and installation on Windows]], below.
-**** Compiling on Cygwin
- On [[https://www.cygwin.com/][Cygwin]] the following dependencies are needed.
-
- - libpoppler-devel (*Lib* category)
- - libpoppler-glib-devel (*Lib* category)
- - libpng-devel (*Devel* category)
- - make (*Devel* category)
- - gcc-core (*Devel* category)
- - gcc-g++ (*Devel* category)
- - autoconf (*Devel* category)
- - automake (*Devel* category)
- - perl (*Perl* category)
- - emacs-w32 (*Editors* category)
+ provided under [[#compilation-and-installation-on-windows][Compilation and installation on Windows]], below.
+ PDF Tools will successfully compile using Cygwin, but it will not be
+ able to open PDFs properly due to the way binaries compiled with Cygwin
+ handle file paths.
*** Compilation
:PROPERTIES:
@@ -204,28 +203,28 @@
2. Update and install dependencies, skipping any you already have
#+BEGIN_SRC sh
- pacman -Syu
- pacman -S base-devel
- pacman -S mingw-w64-x86_64-toolchain
- pacman -S mingw-w64-x86_64-zlib
- pacman -S mingw-w64-x86_64-libpng
- pacman -S mingw-w64-x86_64-poppler
- pacman -S mingw-w64-x86_64-imagemagick
+ $ pacman -Syu
+ $ pacman -S base-devel
+ $ pacman -S mingw-w64-x86_64-toolchain
+ $ pacman -S mingw-w64-x86_64-zlib
+ $ pacman -S mingw-w64-x86_64-libpng
+ $ pacman -S mingw-w64-x86_64-poppler
+ $ pacman -S mingw-w64-x86_64-imagemagick
#+END_SRC
3. Install PDF tools in Emacs, but do not try to compile the
server. Instead, get a separate copy of the source somewhere
else.
#+BEGIN_SRC sh
- git clone https://github.com/politza/pdf-tools
+ $ git clone https://github.com/politza/pdf-tools
#+END_SRC
- 4. Open mingw64 shell
+ 4. Open mingw64 shell (*Note:* You must use mingw64.exe and not msys2.exe)
5. Compile pdf-tools
#+BEGIN_SRC sh
- cd pdf-tools/build
- make -s
+ $ cd /path/to/pdf-tools
+ $ make -s
#+END_SRC
6. This should produce a file ~server/epdfinfo.exe~. Copy this file
@@ -250,7 +249,7 @@
#+BEGIN_SRC emacs-lisp
(setenv "PATH" (concat "C:\\msys64\\mingw64\\bin;" (getenv "PATH")))
- #+END_SRC
+ #+END_SRC
*** ELisp Prerequisites
This package depends on the following Elisp packages, which should
diff --git a/lisp/pdf-tools.el b/lisp/pdf-tools.el
index 7731eeb..bc2d069 100644
--- a/lisp/pdf-tools.el
+++ b/lisp/pdf-tools.el
@@ -263,11 +263,11 @@ Returns always nil, unless `system-type' equals windows-nt."
(defun pdf-tools-find-bourne-shell ()
"Locate a usable sh."
- (or (executable-find "sh")
- (and (eq system-type 'windows-nt)
+ (or (and (eq system-type 'windows-nt)
(let* ((directory (pdf-tools-msys2-directory)))
(when directory
- (expand-file-name "usr/bin/bash.exe" directory))))))
+ (expand-file-name "usr/bin/bash.exe" directory))))
+ (executable-find "sh")))
(defun pdf-tools-build-server (target-directory
&optional