update packages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
|
||||
CASK = cask
|
||||
EMACS ?= emacs
|
||||
# Handle the mess when inside Emacs.
|
||||
unexport INSIDE_EMACS #cask not like this.
|
||||
@@ -15,21 +15,21 @@ version=$(shell sed -ne 's/^;\+ *Version: *\([0-9.]\)/\1/p' lisp/pdf-tools.el)
|
||||
pkgname=pdf-tools-$(version)
|
||||
pkgfile=$(pkgname).tar
|
||||
|
||||
.PHONY: all clean distclean bytecompile test check melpa cask-install
|
||||
.PHONY: all clean distclean bytecompile test check melpa
|
||||
|
||||
all: $(pkgfile)
|
||||
|
||||
# Create a elpa package including the server
|
||||
$(pkgfile): .cask/$(emacs_version) server/epdfinfo lisp/*.el
|
||||
cask package .
|
||||
$(CASK) package .
|
||||
|
||||
# Compile the Lisp sources
|
||||
bytecompile: .cask/$(emacs_version)
|
||||
cask exec $(emacs) --batch -L lisp -f batch-byte-compile lisp/*.el
|
||||
$(CASK) exec $(emacs) --batch -L lisp -f batch-byte-compile lisp/*.el
|
||||
|
||||
# Run ERT tests
|
||||
test: all
|
||||
PACKAGE_TAR=$(pkgfile) cask exec ert-runner
|
||||
PACKAGE_TAR=$(pkgfile) $(CASK) exec ert-runner
|
||||
|
||||
check: test
|
||||
|
||||
@@ -41,7 +41,7 @@ test-all: test test-autobuild
|
||||
|
||||
# Init cask
|
||||
.cask/$(emacs_version):
|
||||
cask install
|
||||
$(CASK) install
|
||||
|
||||
# Run the autobuild script (installing depends and compiling)
|
||||
autobuild:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##
|
||||
## Installs package dependencies and builds the application.
|
||||
@@ -64,16 +64,7 @@ which()
|
||||
if [ -z "$1" ]; then
|
||||
return 1
|
||||
fi
|
||||
IFS=:
|
||||
for dir in $PATH; do
|
||||
if [ -x "$dir/$1" ]; then
|
||||
printf "%s" "$dir/$1"
|
||||
unset IFS
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
unset IFS
|
||||
return 1
|
||||
command -v "$1"
|
||||
}
|
||||
|
||||
# Quote $@ for the shell.
|
||||
@@ -167,9 +158,7 @@ have_packages_installed()
|
||||
which make || return 1
|
||||
which gcc || which cc || return 1
|
||||
which g++ || which c++ || return 1
|
||||
cc $(pkg-config --cflags poppler) -o /dev/null -E - 2>/dev/null <<EOF
|
||||
#include <PDFDocEncoding.h>
|
||||
EOF
|
||||
c++ $(pkg-config --cflags poppler) -o /dev/null -E install_test.cpp 2>/dev/null
|
||||
[ $? -eq 0 ] || return 1
|
||||
return 0
|
||||
} >/dev/null 2>&1
|
||||
@@ -260,7 +249,7 @@ os_openbsd() {
|
||||
fi
|
||||
PKGCMD=pkg_add
|
||||
PKGARGS="-uU"
|
||||
PACKAGES="autoconf-2.69p2 automake-1.15.1 poppler poppler-utils png"
|
||||
PACKAGES="autoconf%2.69 automake%1.15 poppler poppler-utils png"
|
||||
export AUTOCONF_VERSION=2.69
|
||||
export AUTOMAKE_VERSION=1.15
|
||||
if whereis clang++ ;then
|
||||
@@ -317,7 +306,7 @@ os_debian() {
|
||||
make
|
||||
pkg-config"
|
||||
PKGCMD=apt-get
|
||||
PKGARGS=install
|
||||
PKGARGS="install -y"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -409,7 +398,7 @@ os_gentoo() {
|
||||
PKGCMD=emerge
|
||||
PKGARGS=--noreplace
|
||||
PACKAGES="app-text/poppler
|
||||
dev-util/pkgconfig
|
||||
dev-util/pkgconf
|
||||
media-libs/libpng
|
||||
sys-devel/autoconf
|
||||
sys-devel/automake
|
||||
@@ -419,6 +408,29 @@ os_gentoo() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# Void
|
||||
os_void() {
|
||||
if [ -f "/etc/os-release" ]; then
|
||||
. /etc/os-release
|
||||
if [ "$NAME" != "void" ]; then
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
PACKAGES="autoconf
|
||||
automake
|
||||
libpng-devel
|
||||
poppler-devel
|
||||
poppler-glib-devel
|
||||
zlib-devel
|
||||
make
|
||||
pkgconf"
|
||||
PKGCMD=xbps-install
|
||||
PKGARGS="-Sy"
|
||||
return 0
|
||||
}
|
||||
|
||||
# By Parameter --os
|
||||
os_argument() {
|
||||
[ -z "$OS" ] && return 1
|
||||
@@ -433,6 +445,7 @@ os_argument() {
|
||||
gentoo) os_gentoo "$@";;
|
||||
msys2) os_msys2 "$@";;
|
||||
nixos) os_nixos "$@";;
|
||||
void) os_void "$@";;
|
||||
*) echo "Invalid --os argument: $OS"
|
||||
exit 1
|
||||
esac || {
|
||||
@@ -458,6 +471,7 @@ os_debian "$@" || \
|
||||
os_gentoo "$@" || \
|
||||
os_msys2 "$@" || \
|
||||
os_nixos "$@" || \
|
||||
os_void "$@" || \
|
||||
{
|
||||
OS_IS_HANDLED=
|
||||
if [ -z "$DRY_RUN" ]; then
|
||||
@@ -490,10 +504,6 @@ if [ -n "$PKGCMD" ];then
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "---------------------------"
|
||||
echo " Configuring and compiling "
|
||||
echo "---------------------------"
|
||||
|
||||
# Try to be in the correct directory.
|
||||
if which dirname >/dev/null 2>&1; then
|
||||
cd "$(dirname "$0")" || {
|
||||
@@ -502,6 +512,10 @@ if which dirname >/dev/null 2>&1; then
|
||||
}
|
||||
fi
|
||||
|
||||
echo "---------------------------"
|
||||
echo " Configuring and compiling "
|
||||
echo "---------------------------"
|
||||
|
||||
# Create the configure script.
|
||||
if ! [ -f ./configure ]; then
|
||||
assert_program autoreconf
|
||||
@@ -515,8 +529,8 @@ if [ -n "$INSTALL_DIR" ]; then
|
||||
prefix=--bindir=$INSTALL_DIR
|
||||
fi
|
||||
|
||||
echo "./configure -q $prefix && make -s"
|
||||
eval "./configure -q $(quote "$prefix") && make -s || exit_fail"
|
||||
echo "./configure -q $prefix && make clean && make -s"
|
||||
eval "./configure -q $(quote "$prefix") && make clean && make -s || exit_fail"
|
||||
echo
|
||||
if [ -n "$INSTALL_DIR" ]; then
|
||||
echo "---------------------------"
|
||||
|
||||
@@ -339,7 +339,7 @@ strchomp (char *str)
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new, temporary file and returns it's name.
|
||||
* Create a new, temporary file and returns its name.
|
||||
*
|
||||
* @return The filename.
|
||||
*/
|
||||
@@ -672,7 +672,7 @@ region_print (cairo_region_t *region, double width, double height)
|
||||
*
|
||||
* @param type The PopplerActionType.
|
||||
*
|
||||
* @return It's string representation.
|
||||
* @return Its string representation.
|
||||
*/
|
||||
static const char *
|
||||
xpoppler_action_type_string(PopplerActionType type)
|
||||
@@ -699,7 +699,7 @@ xpoppler_action_type_string(PopplerActionType type)
|
||||
*
|
||||
* @param type The PopplerAnnotType.
|
||||
*
|
||||
* @return It's string representation.
|
||||
* @return Its string representation.
|
||||
*/
|
||||
static const char *
|
||||
xpoppler_annot_type_string (PopplerAnnotType type)
|
||||
@@ -741,7 +741,7 @@ xpoppler_annot_type_string (PopplerAnnotType type)
|
||||
*
|
||||
* @param type The PopplerAnnotTextState.
|
||||
*
|
||||
* @return It's string representation.
|
||||
* @return Its string representation.
|
||||
*/
|
||||
static const char *
|
||||
xpoppler_annot_text_state_string (PopplerAnnotTextState state)
|
||||
|
||||
7
lisp/pdf-tools/build/server/install_test.cpp
Normal file
7
lisp/pdf-tools/build/server/install_test.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <PDFDocEncoding.h>
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello World, pdf-tools!";
|
||||
return 0;
|
||||
}
|
||||
@@ -7592,7 +7592,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
|
||||
int min,med,max,width;
|
||||
switch(synctex_node_type(node)) {
|
||||
/* The distance between a point and a box is special.
|
||||
* It is not the euclidian distance, nor something similar.
|
||||
* It is not the euclidean distance, nor something similar.
|
||||
* We have to take into account the particular layout,
|
||||
* and the box hierarchy.
|
||||
* Given a box, there are 9 regions delimited by the lines of the edges of the box.
|
||||
@@ -7733,7 +7733,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
|
||||
int min,max,depth,height;
|
||||
switch(synctex_node_type(node)) {
|
||||
/* The distance between a point and a box is special.
|
||||
* It is not the euclidian distance, nor something similar.
|
||||
* It is not the euclidean distance, nor something similar.
|
||||
* We have to take into account the particular layout,
|
||||
* and the box hierarchy.
|
||||
* Given a box, there are 9 regions delimited by the lines of the edges of the box.
|
||||
@@ -7881,7 +7881,7 @@ SYNCTEX_INLINE static synctex_bool_t _synctex_point_in_box_v2(synctex_point_p hi
|
||||
|
||||
static int _synctex_distance_to_box_v2(synctex_point_p hit,synctex_box_p box) {
|
||||
/* The distance between a point and a box is special.
|
||||
* It is not the euclidian distance, nor something similar.
|
||||
* It is not the euclidean distance, nor something similar.
|
||||
* We have to take into account the particular layout,
|
||||
* and the box hierarchy.
|
||||
* Given a box, there are 9 regions delimited by the lines of the edges of the box.
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM base/archlinux
|
||||
FROM archlinux:latest
|
||||
RUN pacman -Syu --noconfirm --noprogressbar && \
|
||||
pacman -S --noconfirm --noprogressbar poppler-glib base-devel
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM ubuntu:artful
|
||||
FROM debian:10
|
||||
RUN apt-get update -y && apt-get install -y gcc g++ libpoppler-glib-dev
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM fedora:24
|
||||
FROM fedora:32
|
||||
RUN dnf update -y && dnf install -y gcc gcc-c++ poppler-glib-devel
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM fedora:25
|
||||
FROM fedora:33
|
||||
RUN dnf update -y && dnf install -y gcc gcc-c++ poppler-glib-devel
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM fedora:26
|
||||
FROM fedora:34
|
||||
RUN dnf update -y && dnf install -y gcc gcc-c++ poppler-glib-devel
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM fedora:35
|
||||
RUN dnf update -y && dnf install -y gcc gcc-c++ poppler-glib-devel
|
||||
@@ -0,0 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM ubuntu:bionic
|
||||
RUN apt-get update -y && apt-get install -y gcc g++ libpoppler-glib-dev
|
||||
@@ -0,0 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM ubuntu:groovy
|
||||
RUN apt-get update -y && apt-get install -y gcc g++ libpoppler-glib-dev
|
||||
@@ -0,0 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM ubuntu:focal
|
||||
RUN apt-get update -y && apt-get install -y gcc g++ libpoppler-glib-dev
|
||||
@@ -0,0 +1,3 @@
|
||||
# -*- dockerfile -*-
|
||||
FROM ubuntu:hirsute
|
||||
RUN apt-get update -y && apt-get install -y gcc g++ libpoppler-glib-dev
|
||||
Reference in New Issue
Block a user