Mail archive
alpine-aports

[alpine-aports] [PATCH 1/2] main/mdocml: upgrade to 1.13.4

From: Daniel Sabogal <dsabogalcc_at_gmail.com>
Date: Sun, 14 Aug 2016 13:09:10 -0400

---
 main/mdocml/APKBUILD               | 45 +++++++++++++---------------
 main/mdocml/default-pager.patch    | 11 -------
 main/mdocml/pager.patch            | 27 +++++++++++++++++
 main/mdocml/shared-libmandoc.patch | 60 +++++++++++++++++++-------------------
 4 files changed, 77 insertions(+), 66 deletions(-)
 delete mode 100644 main/mdocml/default-pager.patch
 create mode 100644 main/mdocml/pager.patch
diff --git a/main/mdocml/APKBUILD b/main/mdocml/APKBUILD
index 096b570..c266fef 100644
--- a/main/mdocml/APKBUILD
+++ b/main/mdocml/APKBUILD
_at_@ -1,32 +1,27 @@
 # Maintainer:  Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=mdocml
-pkgver=1.13.3
-pkgrel=6
+pkgver=1.13.4
+pkgrel=0
 pkgdesc="mdoc/man compiler"
 url="http://mdocml.bsd.lv/"
 arch="all"
 license="BSD"
-depends=
-makedepends="sqlite-dev"
+depends=""
+makedepends="sqlite-dev zlib-dev"
 install="$pkgname.post-deinstall"
 triggers="$pkgname-apropos.trigger=/usr/share/man/*"
 subpackages="$pkgname-doc $pkgname-dev man $pkgname-apropos"
-source="http://mdocml.bsd.lv/snapshots/mdocml-$pkgver.tar.gz
+source="http://mdocml.bsd.lv/snapshots/$pkgname-$pkgver.tar.gz
 	shared-libmandoc.patch
-	default-pager.patch
+	pager.patch
 	mdocml-apropos.trigger
 	man.conf
 	"
 
-_builddir="$srcdir"/$pkgname-$pkgver
-
+builddir="$srcdir"/$pkgname-$pkgver
 prepare() {
-	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
+	default_prepare || return 1
+	cd "$builddir"
 	cat >configure.local<<EOF
 PREFIX=/usr
 MANDIR=/usr/share/man
_at_@ -36,13 +31,13 @@ EOF
 }
 
 build() {
-	cd "$_builddir"
+	cd "$builddir"
 	./configure || return 1
 	make || return 1
 }
 
 package() {
-	cd "$_builddir"
+	cd "$builddir"
 	make -j1 DESTDIR="$pkgdir" base-install db-install || return 1
 	install -Dm644 "$srcdir"/man.conf "$pkgdir"/etc/man.conf || return 1
 	for X in usr/bin/apropos usr/bin/whatis usr/bin/man usr/sbin/makewhatis
_at_@ -69,18 +64,18 @@ apropos() {
 		"$subpkgdir"/usr/sbin/ || return 1
 }
 
-md5sums="7be80e1116a11abe2aabd6b2f04434ef  mdocml-1.13.3.tar.gz
-8d130a332fbd3268550819ade96c9afd  shared-libmandoc.patch
-aa3421f2d2da345a7514be51707d6829  default-pager.patch
+md5sums="797d4f0e112479f8861e03a72f8b8b01  mdocml-1.13.4.tar.gz
+07aff0e8b4766aa22bddc2969aa158cf  shared-libmandoc.patch
+1b7b756e3a996f146971785bd3aeede5  pager.patch
 8c2f14c5bdefe45a119638b84588dde1  mdocml-apropos.trigger
 6e893bef0cf680eec807b230e6619d27  man.conf"
-sha256sums="23ccab4800d50bf4c327979af5d4aa1a6a2dc490789cb67c4c3ac1bd40b8cad8  mdocml-1.13.3.tar.gz
-676dd35caedc759cc83ae1dbf7fde5709d6fe4ed14c652af4cbebc5ccdbdc71b  shared-libmandoc.patch
-f0a393ff3a630cd0e9e412241890b2356153ffb4ef0d419a7979edc4ed5e57e3  default-pager.patch
+sha256sums="0a55c1addb188071d6f784599303656b8465e98ec6b2f4f264e12fb96d79e0ef  mdocml-1.13.4.tar.gz
+b4d3498a831fb840447ece0662b0f97831dc147cfb19d3ffbb55ce0fdd9d8763  shared-libmandoc.patch
+b1a94bc58655934f9356dcbdf16847fbbd30b2863b1e54b87721442e88ae6d0d  pager.patch
 45460578edf6262db83fc8215164530c6acd2d7d644908b36921a4a292f66dad  mdocml-apropos.trigger
 3381c6ceb99e7db1404fdb44419040c3b441a251d594292e53545b5e4e378e2b  man.conf"
-sha512sums="a3b7304e313b905b3575d79eb7ac861723e0ef3f700199c136abe4d4c698929e99ee0789bfc6e591224fb0006c709afe0e4c1bb578605a767c371ec7dee26024  mdocml-1.13.3.tar.gz
-bdbe471bcc5d5009ee8a9c4fb2f7903a5114afd8da1d6807c462fefdbe4b508711386b0fe7febb92977f97751c1d4fd486f1e1ecae0b7c1ba4dc28c0a7dda0b6  shared-libmandoc.patch
-c8a4a11a5aa166670d8f8d4e0dba803068d3f1b6aee483daaf889da661a9281387fcd2f00d2dad7ef5c66e3419df205e2c75bb58fb9b055db284b4ac2f23eb7e  default-pager.patch
+sha512sums="1d671651ca1bb81d0de86e34de8b95a3bde5b335bda03d1b83b601e26eed167af6ef8bac6f9935603e57514f2734cd8f979ed556c76db629dd5c685892d71ec2  mdocml-1.13.4.tar.gz
+3900787215c7b44fd731bb34a2678a99c54396f27a14d15ad7a0a7483a2a1882be701b26aa7fe56805879d1cb127877453ba5b0ef87df68e435be0053d1200b6  shared-libmandoc.patch
+04947a275df99298591c2a46fb81b74c7c3fcb9f3cf8fb718cf1e32eeae5409e90a3bca89e542f8aa1b30792e837fd3d716303a636d1a3ec165fbb9529546a64  pager.patch
 704bc159acfc639e10c7d505372d303cb5784c8e9eb30084236ad89978978d4ba74f3127d4597d78594b64182c47a00c011f8bb3271d2b784f03a2a411ccb1d8  mdocml-apropos.trigger
 0723c32ab70e5b1c77768ca78d7437b26bed19b90b27876b10cc463359c41332befc0105fc1e23ceae48de5a892f1aa7ac60ef7eb0b6b8f1616726c4300632fe  man.conf"
diff --git a/main/mdocml/default-pager.patch b/main/mdocml/default-pager.patch
deleted file mode 100644
index 06bf71e..0000000
--- a/main/mdocml/default-pager.patch
+++ /dev/null
_at_@ -1,11 +0,0 @@
---- mdocml-1.13.3.orig/main.c
-+++ mdocml-1.13.3/main.c
-_at_@ -989,7 +989,7 @@
- 	if (pager == NULL || *pager == '\0')
- 		pager = getenv("PAGER");
- 	if (pager == NULL || *pager == '\0')
--		pager = "/usr/bin/more -s";
-+		pager = "/bin/more -s";
- 	cp = mandoc_strdup(pager);
- 
- 	/*
diff --git a/main/mdocml/pager.patch b/main/mdocml/pager.patch
new file mode 100644
index 0000000..b887c8c
--- /dev/null
+++ b/main/mdocml/pager.patch
_at_@ -0,0 +1,27 @@
+--- mdocml-1.13.4/main.c.orig
++++ mdocml-1.13.4/main.c
+_at_@ -1042,7 +1042,7 @@
+ 	if (pager == NULL || *pager == '\0')
+ 		pager = getenv("PAGER");
+ 	if (pager == NULL || *pager == '\0')
+-		pager = "more -s";
++		pager = "/bin/more -s";
+ 	cp = mandoc_strdup(pager);
+ 
+ 	/*
+_at_@ -1063,15 +1063,6 @@
+ 			break;
+ 	}
+ 
+-	/* For less(1), use the tag file. */
+-
+-	if ((cmdlen = strlen(argv[0])) >= 4) {
+-		cp = argv[0] + cmdlen - 4;
+-		if (strcmp(cp, "less") == 0) {
+-			argv[argc++] = mandoc_strdup("-T");
+-			argv[argc++] = tag_files->tfn;
+-		}
+-	}
+ 	argv[argc++] = tag_files->ofn;
+ 	argv[argc] = NULL;
+ 
diff --git a/main/mdocml/shared-libmandoc.patch b/main/mdocml/shared-libmandoc.patch
index c7df2fd..9f1029f 100644
--- a/main/mdocml/shared-libmandoc.patch
+++ b/main/mdocml/shared-libmandoc.patch
_at_@ -1,13 +1,11 @@
---- ./Makefile.orig
-+++ ./Makefile
-_at_@ -267,9 +267,15 @@
+--- mdocml-1.13.4/Makefile.orig
++++ mdocml-1.13.4/Makefile
+_at_@ -311,9 +311,13 @@
  WWW_OBJS	 = mdocml.tar.gz \
  		   mdocml.sha256
  
-+#LIBMANDOC        = libmandoc.a
-+#MANDICLIB        = $(LIBMANDOC)
-+LIBMANDOC         = libmandoc.so
-+MANDOCLIB         = -L. -lmandoc
++LIBMANDOC        = libmandoc.so
++MANDOCLIB        = -L. -lmandoc
 +
  # === USER CONFIGURATION ===============================================
  
_at_@ -16,7 +14,7 @@
  
  # === DEPENDENCY HANDLING ==============================================
  
-_at_@ -296,7 +302,7 @@
+_at_@ -340,7 +344,7 @@
  	rm -f Makefile.local config.h config.h.old config.log config.log.old
  
  clean:
_at_@ -25,41 +23,43 @@
  	rm -f mandoc $(BASE_OBJS) $(DB_OBJS)
  	rm -f man.cgi $(CGI_OBJS)
  	rm -f manpage $(MANPAGE_OBJS)
-_at_@ -314,7 +320,7 @@
- 	mkdir -p $(DESTDIR)$(MANDIR)/man7
+_at_@ -360,7 +364,7 @@
  	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
+ 	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
  	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
 -	$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
 +	$(INSTALL_LIB) $(LIBMANDOC) $(DESTDIR)$(LIBDIR)
- 	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \
+ 	$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
  		$(DESTDIR)$(INCLUDEDIR)
  	$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
-_at_@ -366,17 +372,20 @@
- libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
- 	$(AR) rs $_at_ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
+_at_@ -405,20 +409,20 @@
+ 	_at_echo "$@ is out of date; please run ./configure"
+ 	_at_exit 1
  
--mandoc: $(MAIN_OBJS) libmandoc.a
--	$(CC) $(LDFLAGS) -o $_at_ $(MAIN_OBJS) libmandoc.a $(DBLIB)
+-libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
+-	ar rs $_at_ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
 +libmandoc.so: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
-+	$(CC) $(LDFLAGS) -shared -o $_at_ $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
++	$(CC) $(LDFLAGS) -shared -o $_at_ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(LDADD)
  
--manpage: $(MANPAGE_OBJS) libmandoc.a
--	$(CC) $(LDFLAGS) -o $_at_ $(MANPAGE_OBJS) libmandoc.a $(DBLIB)
+-mandoc: $(MAIN_OBJS) libmandoc.a
+-	$(CC) -o $_at_ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
 +mandoc: $(MAIN_OBJS) $(LIBMANDOC)
-+	$(CC) $(LDFLAGS) -o $_at_ $(MAIN_OBJS) $(MANDOCLIB) $(DBLIB)
++	$(CC) -o $_at_ $(LDFLAGS) $(MAIN_OBJS) $(MANDOCLIB) $(LDADD)
  
--man.cgi: $(CGI_OBJS) libmandoc.a
--	$(CC) $(LDFLAGS) $(STATIC) -o $_at_ $(CGI_OBJS) libmandoc.a $(DBLIB)
+-manpage: $(MANPAGE_OBJS) libmandoc.a
+-	$(CC) -o $_at_ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD)
 +manpage: $(MANPAGE_OBJS) $(LIBMANDOC)
-+	$(CC) $(LDFLAGS) -o $_at_ $(MANPAGE_OBJS) $(MANDOCLIB) $(DBLIB)
++	$(CC) -o $_at_ $(LDFLAGS) $(MANPAGE_OBJS) $(MANDOCLIB) $(LDADD)
  
--demandoc: $(DEMANDOC_OBJS) libmandoc.a
--	$(CC) $(LDFLAGS) -o $_at_ $(DEMANDOC_OBJS) libmandoc.a
+-man.cgi: $(CGI_OBJS) libmandoc.a
+-	$(CC) $(STATIC) -o $_at_ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
 +man.cgi: $(CGI_OBJS) $(LIBMANDOC)
-+	$(CC) $(LDFLAGS) $(STATIC) -o $_at_ $(CGI_OBJS) $(MANDOCLIB) $(DBLIB)
-+
-+demandoc: $(DEMANDOC_OBJS) $(LIBMANDOC)
-+	$(CC) $(LDFLAGS) -o $_at_ $(DEMANDOC_OBJS) $(MANDOCLIB)
++	$(CC) $(STATIC) -o $_at_ $(LDFLAGS) $(CGI_OBJS) $(MANDOCLIB) $(LDADD)
  
- # --- maintainer targets ---
+-demandoc: $(DEMANDOC_OBJS) libmandoc.a
+-	$(CC) -o $_at_ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)
++demandoc: $(DEMANDOC_OBJS) $(LIBMANDOC)
++	$(CC) -o $_at_ $(LDFLAGS) $(DEMANDOC_OBJS) $(MANDOCLIB) $(LDADD)
  
+ soelim: $(SOELIM_OBJS)
+ 	$(CC) -o $_at_ $(LDFLAGS) $(SOELIM_OBJS)
-- 
2.8.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Aug 14 2016 - 13:09:10 GMT