diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-01-24 06:44:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-24 06:44:02 +0000 |
commit | a2994c588ade51270d8e50bc8c27a04b978afdbf (patch) | |
tree | c52380339ab5b1726e49429e2b328b3282e3720d /pkgs/tools/typesetting | |
parent | b88b52998be61d3959b3b3c17bc884576eedc1da (diff) | |
parent | 2a9f33600cd8aa3c72fdcdbcc74bdd8096b81ab3 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/lowdown/default.nix | 7 | ||||
-rw-r--r-- | pkgs/tools/typesetting/lowdown/shared.patch | 41 |
2 files changed, 46 insertions, 2 deletions
diff --git a/pkgs/tools/typesetting/lowdown/default.nix b/pkgs/tools/typesetting/lowdown/default.nix index 522c3438d9016..668e54c17307c 100644 --- a/pkgs/tools/typesetting/lowdown/default.nix +++ b/pkgs/tools/typesetting/lowdown/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "lowdown"; version = "0.7.9"; - outputs = [ "out" "dev" ]; + outputs = [ "out" "lib" "dev" "man" ]; src = fetchurl { url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz"; @@ -16,9 +16,12 @@ stdenv.mkDerivation rec { configurePhase = '' ./configure PREFIX=''${!outputDev} \ BINDIR=''${!outputBin}/bin \ - MANDIR=''${!outputBin}/share/man + LIBDIR=''${!outputLib}/lib \ + MANDIR=''${!outputMan}/share/man ''; + patches = lib.optional (!stdenv.hostPlatform.isStatic) ./shared.patch; + meta = with lib; { homepage = "https://kristaps.bsd.lv/lowdown/"; description = "Simple markdown translator"; diff --git a/pkgs/tools/typesetting/lowdown/shared.patch b/pkgs/tools/typesetting/lowdown/shared.patch new file mode 100644 index 0000000000000..ed9f266b3f9cb --- /dev/null +++ b/pkgs/tools/typesetting/lowdown/shared.patch @@ -0,0 +1,41 @@ +diff --git a/Makefile b/Makefile +index 955f737..2c9532c 100644 +--- a/Makefile ++++ b/Makefile +@@ -80,7 +80,7 @@ REGRESS_ARGS += "--parse-no-autolink" + REGRESS_ARGS += "--parse-no-cmark" + REGRESS_ARGS += "--parse-no-deflists" + +-all: lowdown lowdown-diff lowdown.pc ++all: lowdown lowdown-diff liblowdown.so lowdown.pc + + www: $(HTMLS) $(PDFS) $(THUMBS) lowdown.tar.gz lowdown.tar.gz.sha512 + +@@ -101,6 +101,9 @@ lowdown-diff: lowdown + liblowdown.a: $(OBJS) $(COMPAT_OBJS) + $(AR) rs $@ $(OBJS) $(COMPAT_OBJS) + ++liblowdown.so: $(OBJS) $(COMPAT_OBJS) ++ $(CC) -shared -o $@ $(OBJS) $(COMPAT_OBJS) $(LDFLAGS) ++ + install: all + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig +@@ -111,7 +114,7 @@ install: all + $(INSTALL_DATA) lowdown.pc $(DESTDIR)$(LIBDIR)/pkgconfig + $(INSTALL_PROGRAM) lowdown $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) lowdown-diff $(DESTDIR)$(BINDIR) +- $(INSTALL_LIB) liblowdown.a $(DESTDIR)$(LIBDIR) ++ $(INSTALL_LIB) liblowdown.so $(DESTDIR)$(LIBDIR) + $(INSTALL_DATA) lowdown.h $(DESTDIR)$(INCLUDEDIR) + for f in $(MANS) ; do \ + name=`basename $$f .html` ; \ +@@ -199,7 +202,7 @@ main.o: lowdown.h + + clean: + rm -f $(OBJS) $(COMPAT_OBJS) main.o +- rm -f lowdown lowdown-diff liblowdown.a lowdown.pc ++ rm -f lowdown lowdown-diff liblowdown.so lowdown.pc + rm -f index.xml diff.xml diff.diff.xml README.xml lowdown.tar.gz.sha512 lowdown.tar.gz + rm -f $(PDFS) $(HTMLS) $(THUMBS) + |