From de49812990871e1705b64051c35161d5e6400269 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Dec 2018 14:11:38 +0000 Subject: gentoo resync : 24.12.2018 --- app-text/llpp/Manifest | 7 ++- app-text/llpp/files/Makefile | 91 ++++++++++++++++++++++++++++++++ app-text/llpp/files/llpp-30-keysym.patch | 55 +++++++++++++++++++ app-text/llpp/files/llpp.desktop | 14 +++++ app-text/llpp/llpp-30.ebuild | 70 ++++++++++++++++++++++++ app-text/llpp/metadata.xml | 5 +- 6 files changed, 237 insertions(+), 5 deletions(-) create mode 100644 app-text/llpp/files/Makefile create mode 100644 app-text/llpp/files/llpp-30-keysym.patch create mode 100644 app-text/llpp/files/llpp.desktop create mode 100644 app-text/llpp/llpp-30.ebuild (limited to 'app-text/llpp') diff --git a/app-text/llpp/Manifest b/app-text/llpp/Manifest index cdf8e65ac6b4..1598c696919e 100644 --- a/app-text/llpp/Manifest +++ b/app-text/llpp/Manifest @@ -1,4 +1,9 @@ +AUX Makefile 2810 BLAKE2B 9c8ad849e95dc4037813bc575b5627b54bdf1eae3085235489e1a1c0fdf3aa3c679b5884d4044fce828f2feef02afcb82c7762b09af2c9b167c1c2dd7d0c5c7c SHA512 28014bbf81cb22c28963b594f8ef15a16740e41de2d6ad7421017fc5a50015e33ca1d449ea43a9976f741a269dac4045b2ed459cb74081690f919a4218542303 AUX llpp-26b-WM_CLASS.patch 860 BLAKE2B adcd60863d72d5328d6918c7904c58f160651a911c9b3f8f891ff884aae54b4327ca4b21fabf95a63025a7d76799a74d47dfb60a2ab55981aabf026be3afc2ca SHA512 42973fa329ab7fc900b1a5e86fee70918c5e78486cfc6fcf4802d9dc3e5a8a902d866a1ad23f3a6febf1dcd2d18f90389369d89024e3e1727a19fce456cf8604 +AUX llpp-30-keysym.patch 1669 BLAKE2B 4df35a04c4b5de7e8fa4eaf7efe6a63f203292f12c03d1c232a0c54fa7f9f47b92f1618042e998a006f9c9822f335620b6c0c40fe0d547ea6871cfff51e75676 SHA512 003d085650ee88ee3f7f12657aa81c8a46653f3fe4a13527aa18cd52f669b7135de7686169dfed706400a557c6654fdb8041a3cf2348014425f2063be67d494f +AUX llpp.desktop 566 BLAKE2B 2b7497616434d7ae4abfa7a78d753f194ff13c460138a1d8f13cbee674b641a476d73753c8f95ef2d02e29568fcebc47df8820329ee224b611269724d812e108 SHA512 7bbfdb97ca6f3b58f95bde326cf20bed2a5b2797ff033b1fa497e1d1fbd4522c7691b3d06f57d36707623d335e0d6a7b2e82ec6e94bfd16689241bf58289313e DIST llpp-26b_p20180114.tar.gz 170204 BLAKE2B c7f46491d69350e8e94b444f0be4d7375f5658cccded792ecce2a246c907ae98bcca45d73e3b6c15765bd926d559327491559b5e5eec63bf2645cba84f6ee0d3 SHA512 1bc544f4bae268f573c2c111b69f7129bd3d1c1c8cc635c06f76e12670ad9476b4c2a2776e3959203ab6e53ea8ad1c68be290619298f7ebc1ae8203875f88314 +DIST llpp-30.tar.gz 165821 BLAKE2B 755648f9f7e0e0740dd9647559c085ab1626edfceb91d8df4aa783610f32499d744f24a2e0ac0d6f13e747695e8829112e59bcf0fc78c7ef5f4b2427c759353d SHA512 1dfcf273bdabfb3c7b38366bac60659555b943f459cb3fd6e656df1a33c0f84e6745d62522c5498df0bd6182bda13973144724054588c07145018bb3e758d893 EBUILD llpp-26b_p20180114.ebuild 3032 BLAKE2B d6cc8bf1fac0cd932c298d4816221137e47df136283fc752be62886a1111de02803e92230319ccffc1864dbaf81b318c0400a34454a4f1019d8825d76f353e5b SHA512 f4b0da1be74c63c71ae02e1b6dfb7067ead203a9e1203e2c88e1eb4302364205bb92c2e4e841d861124f99781e6bb7214bf5e536dbab51a0e20c178b54afec11 -MISC metadata.xml 237 BLAKE2B f22c3926ba75c18fce7667217807f3710a315b12b1341622c949e7bc0056cd1cb403ea6c66d838675f3cb5dcd53d2fc4ec71425ec3f96aaffb94b70b73e99320 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f +EBUILD llpp-30.ebuild 1716 BLAKE2B 720bf3ad6f76923ef518fe2bbbef66575087a27a7320b4e76fecbd09754ec64a80189e9da3e14d7f59d98a092222460c736f60b18841460edcc05b3d3159de89 SHA512 f1da1557700969bc6a1ad7aee50437b0b157dfbdfacbdf4377e55f434222d351faa231f0a5d9042b3de52524b25defdbf75e7a34a133f29df7a439e518f91959 +MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 diff --git a/app-text/llpp/files/Makefile b/app-text/llpp/files/Makefile new file mode 100644 index 000000000000..0bd94cab00f2 --- /dev/null +++ b/app-text/llpp/files/Makefile @@ -0,0 +1,91 @@ +VERSION = $(shell test -d .git && git describe --tags --dirty 2>/dev/null) +ifeq "$(VERSION)" "" +VERSION = 28 +endif + +# paths +PREFIX ?= /usr/local +LIBDIR ?= /usr/lib + +# includes and libs +PKGCONF_DEPS := freetype2 harfbuzz libopenjp2 libjpeg mupdf x11 zlib +CPPFLAGS += -D_GNU_SOURCE -DFFP +CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wshadow $(shell pkg-config --cflags $(PKGCONF_DEPS)) +LDLIBS = -L$(LIBDIR) -lpthread -ljbig2dec $(shell pkg-config --libs $(PKGCONF_DEPS)) + +# ocaml +CAMLOPT = ocamlopt +CAMLFLAGS = -g -w +a -safe-string -I +lablGL + +VPATH = wsi/x11 + +C_SRC = cutils.c keysym2ucs.c link.c xlib.c version.c +C_OBJ = $(C_SRC:.c=.o) +OCAML_SRC = utils.ml wsi.ml confstruct.ml parser.ml config.ml ffi.ml glutils.ml help.ml keys.ml utf8syms.ml listview.ml main.ml +OCAML_OBJ = $(OCAML_SRC:.ml=.cmx) +MOD = unix.cmxa str.cmxa lablgl.cmxa +SRCMANS = $(wildcard adoc/*.adoc) +MANS = $(SRCMANS:.adoc=.1) + +DISTFILES := Makefile $(OCAML_SRC) link.c glfont.c keysym2ucs.c wsi.mli +DISTFILES += $(wildcard *.sh) KEYS README BUILDING +DISTFILES += misc/ adoc/ + +all: llpp $(MANS) + +# dependency ordering +config.cmx: wsi.cmi parser.cmx utils.cmx confstruct.cmx +confstruct.cmx: wsi.cmx utils.cmx +ffi.cmx: config.cmx +glutils.cmx: ffi.cmx +help.cmx: help.cmi config.cmx utils.cmx +listview.cmx: utils.cmx glutils.cmx config.cmx utf8syms.cmx +main.cmx: main.ml utils.cmx config.cmx glutils.cmx listview.cmx ffi.cmx keys.cmx wsi.cmx +main.cmx: CAMLFLAGS += -thread +parser.cmx: utils.cmx +wsi.cmi: utils.cmx keys.cmx +wsi.cmx: wsi.cmi + +link.o: glfont.c +version.o: CPPFLAGS += -DLLPP_VERSION=$(VERSION) + +# ordinary targets +llpp: $(OCAML_OBJ) $(C_OBJ) + $(CAMLOPT) -o $@ $(CAMLFLAGS) $(C_OBJ) -ccopt '$(LDFLAGS)' -cclib '$(LDLIBS)' $(MOD) $(OCAML_OBJ) + + +confstruct.ml: genconfstr.sh + sh $< >$@ + +# pattern rules +%.o: %.c + $(CAMLOPT) -c -o $@ $(CAMLFLAGS) -cc $(CC) -ccopt '$(CFLAGS) $(CPPFLAGS)' $< + +%.cmx: %.ml + $(CAMLOPT) -c -o $@ $(CAMLFLAGS) $< + +%.cmi: %.mli + $(CAMLOPT) -c -o $@ $(CAMLFLAGS) $< + +%.1: %.adoc adoc/asciidoc.conf + a2x -d manpage -f manpage --asciidoc-opts="-f adoc/asciidoc.conf --out-file=$@.xml" $< + +# special targets +clean: + $(RM) llpp link.o help.ml $(OCAML_OBJ) $(OCAML_OBJ:.cmx=.cmi) $(OCAML_OBJ:.cmx=.o) $(MANS) $(MANS:.1=.xml) + +dist: clean + mkdir llpp-$(VERSION) + cp -r $(DISTFILES) llpp-$(VERSION) + tar czf llpp-$(VERSION).tar.gz llpp-$(VERSION) + rm -rf llpp-$(VERSION) + +install: + install -Dm755 llpp "$(DESTDIR)"$(PREFIX)/bin/llpp + install -Dm644 -t "$(DESTDIR)"$(PREFIX)/share/man/man1 $(MANS) + install -Dm755 misc/llppac "$(DESTDIR)"$(PREFIX)/bin/llppac + install -Dm755 misc/llpp.inotify "$(DESTDIR)"$(PREFIX)/bin/llpp.inotify + install -Dm755 misc/llpphtml "$(DESTDIR)"$(PREFIX)/bin/llpphtml + install -Dm644 misc/llpp.desktop "$(DESTDIR)"$(PREFIX)/share/applications/llpp.desktop + +.PHONY: all clean dist install diff --git a/app-text/llpp/files/llpp-30-keysym.patch b/app-text/llpp/files/llpp-30-keysym.patch new file mode 100644 index 000000000000..b1527e1856f1 --- /dev/null +++ b/app-text/llpp/files/llpp-30-keysym.patch @@ -0,0 +1,55 @@ +From 6e40f7315cb620fef1d96bbe56cfe24dd91e182a Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Tue, 5 Jun 2018 11:56:06 -0400 +Subject: [PATCH] Do not use CPPFLAGS to add headers to source files + +Source code, e.g. #include, belongs in the source code, not the build +system. Build systems are for defining include paths, not the includes +themselves. + +Drop the KeySym keyword since it seems to be a useless alias for +uint32_t which might as well be used directly instead of indirectly +using #define everywhere. +--- + link.c | 4 ++-- + wsi/x11/keysym2ucs.c | 4 +++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/link.c b/link.c +index 783b12f..e8dcac3 100644 +--- a/link.c ++++ b/link.c +@@ -3437,9 +3437,9 @@ CAMLprim value ml_keysymtoutf8 (value keysym_v) + { + CAMLparam1 (keysym_v); + CAMLlocal1 (str_v); +- KeySym keysym = Int_val (keysym_v); ++ uint32_t keysym = Int_val (keysym_v); + Rune rune; +- extern long keysym2ucs (KeySym); ++ extern long keysym2ucs (uint32_t); + int len; + char buf[5]; + +diff --git a/wsi/x11/keysym2ucs.c b/wsi/x11/keysym2ucs.c +index 38f9f1f..0f907c2 100644 +--- a/wsi/x11/keysym2ucs.c ++++ b/wsi/x11/keysym2ucs.c +@@ -37,6 +37,8 @@ + * AUTOMATICALLY GENERATED FILE, DO NOT EDIT !!! (unicode/convmap.pl) + */ + ++#include ++ + struct codepair { + unsigned short keysym; + unsigned short ucs; +@@ -816,7 +818,7 @@ struct codepair { + { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */ + }; + +-long keysym2ucs(KeySym keysym) ++long keysym2ucs(uint32_t keysym) + { + int min = 0; + int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; diff --git a/app-text/llpp/files/llpp.desktop b/app-text/llpp/files/llpp.desktop new file mode 100644 index 000000000000..9d81141aede6 --- /dev/null +++ b/app-text/llpp/files/llpp.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Name=llpp +GenericName=PDF Pager +Exec=llpp %f +TryExec=llpp +Terminal=false +Type=Application +MimeType=application/pdf;application/x-pdf;application/x-cbz;application/oxps;application/vnd.ms-xpsdocument;application/epub+zip;image/png;image/jpeg;image/pjpeg;image/gif;image/bmp;image/jpx;image/jp2;image/vnd.ms-photo;image/jxr;image/x-portable-bitmap;image/x-portable-greymap;image/x-portable-pixmap;image/x-portable-arbitrarymap;image/png; +Categories=Office;Viewer;Graphics +Actions=View +Version=1.0 +[Desktop Action View] +Name=View with llpp +Exec=llpp %f diff --git a/app-text/llpp/llpp-30.ebuild b/app-text/llpp/llpp-30.ebuild new file mode 100644 index 000000000000..3ba1ce6fe451 --- /dev/null +++ b/app-text/llpp/llpp-30.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs xdg-utils + +DESCRIPTION="graphical PDF viewer which aims to superficially resemble less(1)" +HOMEPAGE="https://github.com/moosotc/llpp" +SRC_URI="https://github.com/moosotc/llpp/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+ocamlopt static" + +LIB_DEPEND=">=app-text/mupdf-1.12.0:0=[static-libs] + media-libs/openjpeg:2[static-libs] + media-libs/fontconfig:1.0[static-libs] + media-libs/freetype:2[static-libs] + media-libs/jbig2dec[static-libs] + sys-libs/zlib[static-libs] + virtual/jpeg:0[static-libs] + x11-libs/libX11[static-libs]" +RDEPEND="x11-misc/xsel + !static? ( ${LIB_DEPEND//\[static-libs]} )" +DEPEND="${RDEPEND} + app-text/asciidoc + virtual/pkgconfig + static? ( ${LIB_DEPEND} + app-arch/bzip2[static-libs] + media-libs/libXcm[static-libs] + x11-libs/libXau[static-libs] + x11-libs/libXdmcp[static-libs] + x11-libs/libXmu[static-libs] ) + >=dev-lang/ocaml-4.02[ocamlopt?] + dev-ml/lablgl[glut,ocamlopt?]" + +RESTRICT="!ocamlopt? ( strip )" + +PATCHES=( "${FILESDIR}"/${P}-keysym.patch ) + +src_prepare() { + default + + # use custom makefile from archlinux with minor changes + cp "${FILESDIR}"/Makefile "${S}" || die + + # re-add desktop file removed upstream + cp "${FILESDIR}"/llpp.desktop "${S}"/misc || die +} + +src_compile() { + emake -j1 VERSION=${PV} CC="$(tc-getCC)" LIBDIR="/usr/$(get_libdir)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" install + dodoc README Thanks +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_mimeinfo_database_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_mimeinfo_database_update +} diff --git a/app-text/llpp/metadata.xml b/app-text/llpp/metadata.xml index a535b8852829..6f49eba8f496 100644 --- a/app-text/llpp/metadata.xml +++ b/app-text/llpp/metadata.xml @@ -1,8 +1,5 @@ - -xmw@gentoo.org -Michael Weber - + -- cgit v1.2.3