1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

New port: graphics/llpp

llpp is a graphical PDF viewer which aims to superficially resemble
less(1).

WWW: http://repo.or.cz/llpp.git/

PR:		206006
Submitted by:	Tobias Kortkamp <t@tobik.me>
This commit is contained in:
Kurt Jaeger 2016-02-03 11:53:25 +00:00
parent 15460f6a14
commit 1c26dc30e0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=407951
10 changed files with 177 additions and 0 deletions

View File

@ -565,6 +565,7 @@
SUBDIR += linux-f10-sdl_ttf
SUBDIR += linux-f10-tiff
SUBDIR += linux-f10-ungif
SUBDIR += llpp
SUBDIR += lprof-devel
SUBDIR += lua-gd
SUBDIR += luminance

58
graphics/llpp/Makefile Normal file
View File

@ -0,0 +1,58 @@
# Created by: Tobias Kortkamp <t@tobik.me>
# $FreeBSD$
PORTNAME= llpp
PORTVERSION= 22
CATEGORIES= graphics
MASTER_SITES= http://repo.or.cz/llpp.git/snapshot/
DISTNAME= 561dc5673cea431e930668b0d87b0c4b31a36b39
MAINTAINER= t@tobik.me
COMMENT= PDF pager
# llpp itself is in the public domain, but it bundles lablGL which
# uses a BSD 3-clause license and statically links to mupdf which is
# AGPLv3 licensed.
LICENSE= PUBLIC_DOMAIN BSD3CLAUSE AGPLv3
LICENSE_COMB= multi
LICENSE_NAME_PUBLIC_DOMAIN= Public Domain
LICENSE_FILE_PUBLIC_DOMAIN= ${WRKSRC}/README
LICENSE_PERMS_PUBLIC_DOMAIN= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed \
${LOCALBASE}/lib/libmupdf.a:${PORTSDIR}/graphics/mupdf
LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
libfreetype.so:${PORTSDIR}/print/freetype2 \
libjbig2dec.so:${PORTSDIR}/graphics/jbig2dec \
libopenjp2.so:${PORTSDIR}/graphics/openjpeg
RUN_DEPENDS= xsel:${PORTSDIR}/x11/xsel-conrad
STRIP= # Stripping renders the executable unusable, so don't do it for now
USES= desktop-file-utils gmake
USE_GL= gl
USE_OCAML= yes
NO_OCAML_RUNDEPENDS= yes
USE_OPENGL= yes
USE_XORG= x11 xext
WRKSRC= ${WRKDIR}/${PORTNAME}-561dc56
do-build:
(cd ${WRKSRC} && ${SETENV} \
LOCALBASE="${LOCALBASE}" \
PORTVERSION="${PORTVERSION}" \
${SH} build.sh build/)
(cd ${WRKSRC}/misc/completions && ${GMAKE})
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/build/llpp ${STAGEDIR}${PREFIX}/bin/llpp
${INSTALL_SCRIPT} ${WRKSRC}/misc/llppac ${STAGEDIR}${PREFIX}/bin/llppac
${INSTALL_DATA} ${WRKSRC}/misc/llpp.desktop ${STAGEDIR}${PREFIX}/share/applications/
${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
${INSTALL_DATA} ${WRKSRC}/misc/completions/bash/llpp ${STAGEDIR}${PREFIX}/etc/bash_completion.d/_llpp.bash
${INSTALL_DATA} ${WRKSRC}/misc/completions/bash/llppac ${STAGEDIR}${PREFIX}/etc/bash_completion.d/_llppac.bash
${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${INSTALL_DATA} ${WRKSRC}/misc/completions/zsh/llpp ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_llpp
${INSTALL_DATA} ${WRKSRC}/misc/completions/zsh/llppac ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_llppac
.include <bsd.port.mk>

2
graphics/llpp/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (561dc5673cea431e930668b0d87b0c4b31a36b39.tar.gz) = 06dff0377bb47c172f5cb498f8bce0f362cca910f90e8663fcd3f1500ce8fa0e
SIZE (561dc5673cea431e930668b0d87b0c4b31a36b39.tar.gz) = 153700

View File

@ -0,0 +1,35 @@
--- build.sh.orig 2015-10-13 20:12:27 UTC
+++ build.sh
@@ -7,8 +7,8 @@ else
builddir="$1"
fi
-ccopt='-Wno-pointer-sign -O2'
-mlopt='-warn-error +a -w +a -g -safe-string'
+ccopt='-Wno-pointer-sign -I${LOCALBASE}/include'
+mlopt='-warn-error +a -w +a -safe-string'
if test -z "$native"; then
comp=ocamlc.opt
osu=.cmo
@@ -22,13 +22,13 @@ else
fi
mkdir -p "$builddir/lablGL"
srcdir=$(dirname $0)
-version=$(cd $srcdir && git describe --tags 2>/dev/null) || version=unknown
+version="v${PORTVERSION}"
mloptgl="-I $srcdir/lablGL -I $builddir/lablGL"
set -x
$comp -ccopt "$ccopt -o $builddir/lablGL/ml_raw.o" -c $srcdir/lablGL/ml_raw.c
$comp -ccopt "$ccopt -o $builddir/lablGL/ml_gl.o" -c $srcdir/lablGL/ml_gl.c
$comp -ccopt "$ccopt -o $builddir/lablGL/ml_glarray.o" -c $srcdir/lablGL/ml_glarray.c
-$comp -ccopt "-I $srcdir/mupdf/include -I $srcdir/mupdf/thirdparty/freetype/include -Wextra -Wall -Werror -D_GNU_SOURCE -O -g -std=c99 -pedantic-errors -Wunused-parameter -Wsign-compare -Wshadow -o $builddir/link.o" -c $srcdir/link.c
+$comp -ccopt "-I${LOCALBASE}/include/freetype2 -I${LOCALBASE}/include -Wextra -Wall -Wno-variadic-macros -D_GNU_SOURCE -std=c99 -pedantic-errors -Wunused-parameter -Wsign-compare -Wshadow -o $builddir/link.o" -c $srcdir/link.c
/bin/sh $srcdir/mkhelp.sh $srcdir/KEYS "$version" >$builddir/help.ml
$comp -c $mloptgl -o $builddir/lablGL/gl$osu $srcdir/lablGL/gl.ml
$comp -c $mloptgl -o $builddir/lablGL/raw$osu $srcdir/lablGL/raw.ml
@@ -50,4 +50,4 @@ $comp -c $mloptgl -I $builddir -o $build
sed -f $srcdir/pp.sed $srcdir/main.ml >$builddir/main.ml
$comp -c $mloptgl -I $builddir -o $builddir/main$osu $builddir/main.ml
$comp -c $mlopt -I $builddir -o $builddir/wsi$osu $srcdir/wsi.ml
-$comp -g $lfl -I lablGL -o $builddir/llpp unix$asu str$asu $builddir/help$osu $builddir/lablGL/raw$osu $builddir/utils$osu $builddir/parser$osu $builddir/lablGL/glMisc$osu $builddir/wsi$osu $builddir/lablGL/gl$osu $builddir/lablGL/glMat$osu $builddir/lablGL/glFunc$osu $builddir/lablGL/glClear$osu $builddir/lablGL/glPix$osu $builddir/lablGL/glTex$osu $builddir/lablGL/glDraw$osu $builddir/config$osu $builddir/lablGL/glArray$osu $builddir/main$osu $builddir/link.o -cclib "-lGL -lX11 -lmupdf -lz -lfreetype -ljpeg -ljbig2dec -lopenjpeg -lmujs -lpthread -L$srcdir/mupdf/build/native -lcrypto $builddir/lablGL/ml_gl.o $builddir/lablGL/ml_glarray.o $builddir/lablGL/ml_raw.o"
+$comp $lfl -I lablGL -o $builddir/llpp unix$asu str$asu $builddir/help$osu $builddir/lablGL/raw$osu $builddir/utils$osu $builddir/parser$osu $builddir/lablGL/glMisc$osu $builddir/wsi$osu $builddir/lablGL/gl$osu $builddir/lablGL/glMat$osu $builddir/lablGL/glFunc$osu $builddir/lablGL/glClear$osu $builddir/lablGL/glPix$osu $builddir/lablGL/glTex$osu $builddir/lablGL/glDraw$osu $builddir/config$osu $builddir/lablGL/glArray$osu $builddir/main$osu $builddir/link.o -cclib "-L${LOCALBASE}/lib -lGL -lX11 -lmupdf -lz -lfreetype -ljpeg -ljbig2dec -lopenjp2 -lpthread -L$srcdir/mupdf/build/native -lcrypto $builddir/lablGL/ml_gl.o $builddir/lablGL/ml_glarray.o $builddir/lablGL/ml_raw.o"

View File

@ -0,0 +1,25 @@
--- link.c.orig 2015-10-13 20:12:27 UTC
+++ link.c
@@ -34,12 +34,6 @@
#include <caml/memory.h>
#include <caml/unixsupport.h>
-#if __GNUC__ < 5
-/* At least gcc (Gentoo 4.9.3 p1.0, pie-0.6.2) 4.9.3 emits erroneous
- clobbered diagnostics */
-#pragma GCC diagnostic ignored "-Wclobbered"
-#endif
-
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wshadow"
@@ -3913,8 +3907,7 @@ CAMLprim value ml_platform (value unit_v
platid = pilinux;
#elif defined __CYGWIN__
platid = picygwin;
-#elif defined __DragonFly__ || defined __FreeBSD__
- || defined __OpenBSD__ || defined __NetBSD__
+#elif defined __DragonFly__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__
platid = pibsd;
#elif defined __sun__
platid = pisun;

View File

@ -0,0 +1,18 @@
--- misc/completions/mkcomp.sh.orig 2015-10-13 20:12:27 UTC
+++ misc/completions/mkcomp.sh
@@ -7,7 +7,7 @@ parse_infile () {
# Output list of file extensions from all input files, one per line.
# Delete lines beginning with `#', empty lines, and strip leading and
# trailing whitespace.
- sed -f - <<EOF $@
+ gsed -f - <<EOF $@
/^#/d
/^[[:space:]]*$/d
s/^[[:space:]]+//g
@@ -43,5 +43,5 @@ if test "$(basename "$f")" = llppac; the
fi
re="$(print_regex llpp.in $llppac)"
-sed -e "s/@re@/$re/g" "$f.mk" > "$f"
+gsed -e "s/@re@/$re/g" "$f.mk" > "$f"
printf "wrote: %s\n" "$f"

View File

@ -0,0 +1,11 @@
--- misc/llppac.orig 2015-10-13 20:12:27 UTC
+++ misc/llppac
@@ -197,7 +197,7 @@ EOF
*) die "unhandled filter type: '$type'";;
esac
-hash=$(md5sum "$md5of") || die "$hash"
+hash=$(md5 -q "$md5of") || die "$hash"
casp=$cachedir/${hash%% *}$caspsuf
(test -n "$force" -o ! -e "$casp") && eval "$filt" "$conv"

4
graphics/llpp/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
llpp is a graphical PDF viewer which aims to superficially resemble
less(1).
WWW: http://repo.or.cz/llpp.git/

16
graphics/llpp/pkg-message Normal file
View File

@ -0,0 +1,16 @@
llppac can auto-convert file formats for viewing in llpp. The
following optional ports are required:
Port Adds support for
------------------------------------------------------------
textproc/unoconv Word and Libre/OpenOffice documents
graphics/djvulibre DjVu
print/ghostscript9-base PostScript and dvi files
graphics/librsvg2 SVG
x11-toolkits/pango Fonts
graphics/imagemagick Image formats besides PNG and JPEG
textproc/hs-pandoc Text files
It might be necessary to first create a cache directory with
$ mkdir -p ~/.cache/llpp

7
graphics/llpp/pkg-plist Normal file
View File

@ -0,0 +1,7 @@
bin/llpp
bin/llppac
etc/bash_completion.d/_llpp.bash
etc/bash_completion.d/_llppac.bash
share/applications/llpp.desktop
share/zsh/site-functions/_llpp
share/zsh/site-functions/_llppac