diff options
author | Kurt Jaeger <pi@FreeBSD.org> | 2016-02-03 11:53:25 +0000 |
---|---|---|
committer | Kurt Jaeger <pi@FreeBSD.org> | 2016-02-03 11:53:25 +0000 |
commit | 1c26dc30e0af1fc86783293df32ca602f0596611 (patch) | |
tree | e9c48b3e8d42bf5f45add9bab9d7615f50b25edd /graphics/llpp | |
parent | 15460f6a1472d1e1b6f6ee4d68f76a1068cee649 (diff) | |
download | ports-1c26dc30e0af1fc86783293df32ca602f0596611.tar.gz ports-1c26dc30e0af1fc86783293df32ca602f0596611.zip |
Notes
Diffstat (limited to 'graphics/llpp')
-rw-r--r-- | graphics/llpp/Makefile | 58 | ||||
-rw-r--r-- | graphics/llpp/distinfo | 2 | ||||
-rw-r--r-- | graphics/llpp/files/patch-build.sh | 35 | ||||
-rw-r--r-- | graphics/llpp/files/patch-link.c | 25 | ||||
-rw-r--r-- | graphics/llpp/files/patch-misc_completions_mkcomp.sh | 18 | ||||
-rw-r--r-- | graphics/llpp/files/patch-misc_llppac | 11 | ||||
-rw-r--r-- | graphics/llpp/pkg-descr | 4 | ||||
-rw-r--r-- | graphics/llpp/pkg-message | 16 | ||||
-rw-r--r-- | graphics/llpp/pkg-plist | 7 |
9 files changed, 176 insertions, 0 deletions
diff --git a/graphics/llpp/Makefile b/graphics/llpp/Makefile new file mode 100644 index 000000000000..76b5f71343b6 --- /dev/null +++ b/graphics/llpp/Makefile @@ -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> diff --git a/graphics/llpp/distinfo b/graphics/llpp/distinfo new file mode 100644 index 000000000000..6544c21bec1f --- /dev/null +++ b/graphics/llpp/distinfo @@ -0,0 +1,2 @@ +SHA256 (561dc5673cea431e930668b0d87b0c4b31a36b39.tar.gz) = 06dff0377bb47c172f5cb498f8bce0f362cca910f90e8663fcd3f1500ce8fa0e +SIZE (561dc5673cea431e930668b0d87b0c4b31a36b39.tar.gz) = 153700 diff --git a/graphics/llpp/files/patch-build.sh b/graphics/llpp/files/patch-build.sh new file mode 100644 index 000000000000..776147e31dde --- /dev/null +++ b/graphics/llpp/files/patch-build.sh @@ -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" diff --git a/graphics/llpp/files/patch-link.c b/graphics/llpp/files/patch-link.c new file mode 100644 index 000000000000..3374da39f19d --- /dev/null +++ b/graphics/llpp/files/patch-link.c @@ -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; diff --git a/graphics/llpp/files/patch-misc_completions_mkcomp.sh b/graphics/llpp/files/patch-misc_completions_mkcomp.sh new file mode 100644 index 000000000000..5aeecf8d0ca0 --- /dev/null +++ b/graphics/llpp/files/patch-misc_completions_mkcomp.sh @@ -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" diff --git a/graphics/llpp/files/patch-misc_llppac b/graphics/llpp/files/patch-misc_llppac new file mode 100644 index 000000000000..b1059c16a2ae --- /dev/null +++ b/graphics/llpp/files/patch-misc_llppac @@ -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" + diff --git a/graphics/llpp/pkg-descr b/graphics/llpp/pkg-descr new file mode 100644 index 000000000000..04a33c3b072f --- /dev/null +++ b/graphics/llpp/pkg-descr @@ -0,0 +1,4 @@ +llpp is a graphical PDF viewer which aims to superficially resemble +less(1). + +WWW: http://repo.or.cz/llpp.git/ diff --git a/graphics/llpp/pkg-message b/graphics/llpp/pkg-message new file mode 100644 index 000000000000..d9de14e1ed22 --- /dev/null +++ b/graphics/llpp/pkg-message @@ -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 diff --git a/graphics/llpp/pkg-plist b/graphics/llpp/pkg-plist new file mode 100644 index 000000000000..e25745057b72 --- /dev/null +++ b/graphics/llpp/pkg-plist @@ -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 |