aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2021-03-30 19:16:41 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2021-03-30 19:16:41 +0000
commit29547ac3cd5791f9d395c180fb7b7a65f2201a81 (patch)
tree59cc8ac6ea3e169fc05d5967bccef4a396cc6256
parent2a1bd56b04fc746db7bc6e1e9dda6432e76cab61 (diff)
downloadports-29547ac3cd5791f9d395c180fb7b7a65f2201a81.tar.gz
ports-29547ac3cd5791f9d395c180fb7b7a65f2201a81.zip
Build and install shared library
- Bump PORTREVISION for package change PR: 254071 (based on) Submitted by: yuri
Notes
Notes: svn path=/head/; revision=569584
-rw-r--r--textproc/discount/Makefile11
-rw-r--r--textproc/discount/files/patch-Makefile.in8
-rw-r--r--textproc/discount/pkg-plist3
3 files changed, 21 insertions, 1 deletions
diff --git a/textproc/discount/Makefile b/textproc/discount/Makefile
index f51232ad8136..22286914dd2d 100644
--- a/textproc/discount/Makefile
+++ b/textproc/discount/Makefile
@@ -4,6 +4,7 @@
PORTNAME= discount
PORTVERSION= 2.2.7
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= textproc devel
MAINTAINER= sunpoet@FreeBSD.org
@@ -18,12 +19,13 @@ USE_GITHUB= yes
GH_ACCOUNT= Orc
CFLAGS+= -fPIC
-CONFIGURE_ARGS= --mandir=${PREFIX}/share/man --prefix=${PREFIX}
+CONFIGURE_ARGS= --mandir=${PREFIX}/share/man --prefix=${PREFIX} --shared
CONFIGURE_SCRIPT= configure.sh
HAS_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes # libmarkdown is used before it is built
INSTALL_TARGET= install install.man
TEST_TARGET= test
+USE_LDCONFIG= yes
CONFLICTS_INSTALL= markdown
@@ -38,4 +40,11 @@ EXTRA_CONFIGURE_ON= --with-dl=both --with-fenced-code --with-github-tags --with-
SAMPLES_INSTALL_TARGET= install install.samples
TAB8_CONFIGURE_ON= --with-tabstops=8
+post-configure:
+ @${REINPLACE_CMD} -e 's|/sbin/ldconfig|#&|' ${WRKSRC}/librarian.sh
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/libmarkdown.a ${STAGEDIR}${PREFIX}/lib/libmarkdown.a
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmarkdown.so
+
.include <bsd.port.mk>
diff --git a/textproc/discount/files/patch-Makefile.in b/textproc/discount/files/patch-Makefile.in
index 5e16e6db4d3b..9d4542bd5cfa 100644
--- a/textproc/discount/files/patch-Makefile.in
+++ b/textproc/discount/files/patch-Makefile.in
@@ -17,3 +17,11 @@
done
$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man7
$(INSTALL_DATA) markdown.7 mkd-extensions.7 $(DESTDIR)$(MANDIR)/man7
+@@ -128,6 +128,7 @@ main.o: main.c mkdio.h config.h
+
+ $(MKDLIB): $(OBJS)
+ ./librarian.sh make $(MKDLIB) VERSION $(OBJS)
++ ar crv $(MKDLIB).a $(OBJS)
+
+ verify: echo tools/checkbits.sh
+ @./echo -n "headers ... "; tools/checkbits.sh && echo "GOOD"
diff --git a/textproc/discount/pkg-plist b/textproc/discount/pkg-plist
index 3b449208f64b..f736121635c5 100644
--- a/textproc/discount/pkg-plist
+++ b/textproc/discount/pkg-plist
@@ -4,6 +4,9 @@ bin/markdown
%%SAMPLES%%bin/theme
include/mkdio.h
lib/libmarkdown.a
+lib/libmarkdown.so
+lib/libmarkdown.so.2
+lib/libmarkdown.so.2.2.7
libdata/pkgconfig/libmarkdown.pc
%%SAMPLES%%share/man/man1/makepage.1.gz
share/man/man1/markdown.1.gz