[arch-commits] Commit in llpp/trunk (Makefile PKGBUILD no-quit-on-escape.patch)
Eli Schwartz
eschwartz at archlinux.org
Tue Jun 5 17:56:28 UTC 2018
Date: Tuesday, June 5, 2018 @ 17:56:28
Author: eschwartz
Revision: 340567
upgpkg: llpp 28-1
upstream release
shell completions were deleted upstream
Update Makefile:
- New files added to $(SRC)
- Adapt to changed manpage locations
- Start tracking *.c in $(C_SRC)
- Updated file target dependency links
- Use modern idiom for pattern rules
Modified:
llpp/trunk/Makefile
llpp/trunk/PKGBUILD
llpp/trunk/no-quit-on-escape.patch
-------------------------+
Makefile | 73 +++++++++++++++++++++++++---------------------
PKGBUILD | 25 ++++++++++-----
no-quit-on-escape.patch | 23 +++++++-------
3 files changed, 68 insertions(+), 53 deletions(-)
Modified: Makefile
===================================================================
--- Makefile 2018-06-05 17:34:21 UTC (rev 340566)
+++ Makefile 2018-06-05 17:56:28 UTC (rev 340567)
@@ -1,6 +1,6 @@
VERSION = $(shell test -d .git && git describe --tags --dirty 2>/dev/null)
ifeq "$(VERSION)" ""
-VERSION = 27
+VERSION = 28
endif
# paths
@@ -18,55 +18,60 @@
VPATH = wsi/x11
-SRC = utils.ml keys.ml wsi.ml parser.ml config.ml main.ml
-OBJ = help.cmx $(SRC:.ml=.cmx)
+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 man/*.man)
-MANS = $(SRCMANS:.man=.1)
+SRCMANS = $(wildcard adoc/*.adoc)
+MANS = $(SRCMANS:.adoc=.1)
-DISTFILES := Makefile $(SRC) link.c glfont.c keysym2ucs.c wsi.mli
-DISTFILES += mkhelp.sh KEYS README BUILDING
-DISTFILES += misc/ man/
+DISTFILES := Makefile $(OCAML_SRC) link.c glfont.c keysym2ucs.c wsi.mli
+DISTFILES += $(wildcard *.sh) KEYS README BUILDING
+DISTFILES += misc/ adoc/
all: llpp $(MANS)
-llpp: $(OBJ) link.o
- $(CAMLOPT) -o $@ $(CAMLFLAGS) link.o -ccopt '$(LDFLAGS)' -cclib '$(LDLIBS)' $(MOD) $(OBJ)
+# 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
+parser.cmx: utils.cmx
+wsi.cmi: utils.cmx keys.cmx
+wsi.cmx: wsi.cmi
-main.cmx: main.ml utils.cmx config.cmx
- $(CAMLOPT) -c -o $@ $(CAMLFLAGS) -thread $^
+link.o: glfont.c
+version.o: CPPFLAGS += -DLLPP_VERSION=$(VERSION)
-wsi.cmx: wsi.cmi utils.cmx keys.cmx
+# ordinary targets
+llpp: $(OCAML_OBJ) $(C_OBJ)
+ $(CAMLOPT) -o $@ $(CAMLFLAGS) $(C_OBJ) -ccopt '$(LDFLAGS)' -cclib '$(LDLIBS)' $(MOD) $(OCAML_OBJ)
-wsi.cmi: utils.cmx
+main.cmx: main.ml utils.cmx config.cmx glutils.cmx listview.cmx ffi.cmx keys.cmx wsi.cmx
+ $(CAMLOPT) -c -o $@ $(CAMLFLAGS) -thread $^
-help.ml: mkhelp.sh KEYS
- sh mkhelp.sh KEYS $(VERSION) > $@
+confstruct.ml: genconfstr.sh
+ sh $< >$@
-config.cmx: wsi.cmi parser.cmx utils.cmx help.cmx
-
-parser.cmx: utils.cmx
-
-link.o: glfont.c keysym2ucs.c
-
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly
-
-.c.o:
+# pattern rules
+%.o: %.c
$(CAMLOPT) -c -o $@ $(CAMLFLAGS) -cc $(CC) -ccopt '$(CFLAGS) $(CPPFLAGS)' $<
-.ml.cmx:
+%.cmx: %.ml
$(CAMLOPT) -c -o $@ $(CAMLFLAGS) $<
-.mli.cmi:
+%.cmi: %.mli
$(CAMLOPT) -c -o $@ $(CAMLFLAGS) $<
-%.1: %.man man/asciidoc.conf
- a2x -d manpage -f manpage --asciidoc-opts="-f man/asciidoc.conf --out-file=$@.xml" $<
+%.1: %.adoc adoc/asciidoc.conf
+ a2x -d manpage -f manpage --asciidoc-opts="-f adoc/asciidoc.conf --out-file=$@.xml" $<
-.PHONY: all clean dist install
-
+# special targets
clean:
- $(RM) llpp link.o help.ml $(OBJ) $(OBJ:.cmx=.cmi) $(OBJ:.cmx=.o) $(MANS) $(MANS:.1=.xml)
+ $(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)
@@ -76,9 +81,11 @@
install:
install -Dm755 llpp "$(DESTDIR)"$(PREFIX)/bin/llpp
- install -Dm644 -t "$(DESTDIR)"$(PREFIX)/share/man/man1 man/*.1
+ 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
install -Dm644 README "$(DESTDIR)"$(PREFIX)/share/licenses/llpp/README
+
+.PHONY: all clean dist install
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-06-05 17:34:21 UTC (rev 340566)
+++ PKGBUILD 2018-06-05 17:56:28 UTC (rev 340567)
@@ -3,10 +3,10 @@
# Contributor: earnestly
pkgname=llpp
-pkgver=27
+pkgver=28
# Often breaks with mupdf, which means I'll occasionally need to pin a specific commit.
-_commit=87faa123127cc0746c28531874af7aaef1feb574
-pkgrel=3
+_commit=6face0c21f4d1ac5d7d4ffd33fefc5ce924d4fc8
+pkgrel=1
pkgdesc='opengl accelerated pdf viewer based on mupdf'
arch=('x86_64')
url="https://github.com/moosotc/${pkgname}"
@@ -33,10 +33,12 @@
# reduces maintainence burden and unecessary dependency bloat.
source=("git+${url}#commit=${_commit}"
'no-quit-on-escape.patch'
+ "${url}/pull/85/commits/6e40f7315cb620fef1d96bbe56cfe24dd91e182a.patch"
'Makefile')
sha256sums=('SKIP'
- '29a9550c6502c9de7db14f2f61edc6b77c7ebee9f1de8b865d4e1b219b9ae377'
- 'e88e67a99ce28e26d4155ac05b476e024d0a7d654c7473a6bf3c2020cd799ca7')
+ '8bba7d57e65679c36f0dde27e38ded5e16f71d3c196d47573faa2c06533b1a73'
+ 'e6fa1df1e9451d4ffecc416676ad4697da21fc8809e20c78502b97805e4f4321'
+ '722b61229adde7e68de375bb713313759be3845715ca12a8fcbe60fe0d79ac45')
pkgver() {
cd "${srcdir}"/${pkgname}
@@ -47,9 +49,17 @@
prepare() {
cd "${srcdir}"/${pkgname}
- git revert --no-commit d4e7393edc61e94fe3e7a1482601da1f86b3f959
+ # weird tag breaks versioning logic
+ git tag -d llipposuction
+ # mupdf too new
+ git show c4a533126fa20f42088e2d99f416ce3d667f2d13 -- :./link.c | git apply --reverse --index
+ # Don't use CPPFLAGS to insert '#include <inttypes.h>'
+ patch -Np1 -i "${srcdir}"/6e40f7315cb620fef1d96bbe56cfe24dd91e182a.patch
+
patch -Np1 -i "${srcdir}"/no-quit-on-escape.patch
+ # apparently the desktop file went "stale"
+ git revert --no-commit aad4b1e65e581ff7a096a3c3901b222a9c127a1c
}
build() {
@@ -62,7 +72,4 @@
cd "${srcdir}"/${pkgname}
make -f "${srcdir}"/Makefile PREFIX=/usr DESTDIR="${pkgdir}" install
-
- cd misc/completions
- make SHELL=/bin/bash PREFIX=/usr DESTDIR="${pkgdir}" install
}
Modified: no-quit-on-escape.patch
===================================================================
--- no-quit-on-escape.patch 2018-06-05 17:34:21 UTC (rev 340566)
+++ no-quit-on-escape.patch 2018-06-05 17:56:28 UTC (rev 340567)
@@ -1,9 +1,10 @@
-diff --git a/KEYS b/KEYS
-index fa14c61..34f08bd 100644
---- a/KEYS
-+++ b/KEYS
-@@ -1,5 +1,5 @@
- -----Quitting-----
+diff --git a/help.ml b/help.ml
+index 165d46e..b86f0a0 100644
+--- a/help.ml
++++ b/help.ml
+@@ -1,6 +1,6 @@
+ let keys =
+ {|-----Quitting-----
-escape/q - quit
+q - quit
Q - quit without saving the configuration or changes
@@ -10,12 +11,12 @@
W - save changes
diff --git a/main.ml b/main.ml
-index 7ef80b5..5f0c3b3 100644
+index cd45361..5d66930 100644
--- a/main.ml
+++ b/main.ml
-@@ -4676,7 +4677,7 @@ let viewkeyboard key mask =
+@@ -3365,7 +3365,7 @@ let viewkeyboard key mask =
)
- else impmsg '!' "Keyboard link navigation does not work under rotation"
+ else impmsg "keyboard link navigation does not work under rotation"
- | Escape | Ascii 'q' ->
+ | Ascii 'q' ->
@@ -22,8 +23,8 @@
begin match state.mstate with
| Mzoomrect _ ->
resetmstate ();
-@@ -5150,7 +5150,7 @@ let viewkeyboard key mask =
- G.postRedisplay "|";
+@@ -3782,7 +3782,7 @@ let viewkeyboard key mask =
+ postRedisplay "|";
state.mode <- Textentry (te, onleave);
- | (Ascii _|Fn _|Enter|Left|Right|Code _|Ctrl _) ->
More information about the arch-commits
mailing list