Commit f58c55ee authored by olgeni's avatar olgeni
Browse files

Add common_lib, a library of Erlang functions used by oserl and

other projects.
parent e966bf99
......@@ -254,6 +254,7 @@
SUBDIR += colorgcc
SUBDIR += colormake
SUBDIR += combat
SUBDIR += common_lib
SUBDIR += commoncpp
SUBDIR += compiler-rt
SUBDIR += compiz-bcop
......
# $FreeBSD$
PORTNAME= common_lib
PORTVERSION= 3.3.4
CATEGORIES= devel
MASTER_SITES= GH
MAINTAINER= olgeni@FreeBSD.org
COMMENT= Library of commonly used Erlang functions
BUILD_DEPENDS= erlc:${PORTSDIR}/lang/erlang \
txt2tags:${PORTSDIR}/textproc/txt2tags \
iconv:${PORTSDIR}/converters/libiconv
RUN_DEPENDS= erl:${PORTSDIR}/lang/erlang
PLIST_SUB= VERSION="${PORTVERSION}"
USE_GITHUB= yes
GH_ACCOUNT= iamaleksey
GH_PROJECT= common_lib
GH_COMMIT= c242861
GH_TAGNAME= ${PORTVERSION}
USE_GMAKE= yes
USE_DOS2UNIX= Makefile
ALL_TARGET= compile doc
MAN1= common_lib.1
MAN3= cl_application.3 cl_binary.3 cl_calendar.3 cl_consumer.3 \
cl_csv.3 cl_dqueue.3 cl_lists.3 cl_math.3 cl_pool.3 cl_queue.3 \
cl_queue_srv.3 cl_queue_tab.3 cl_stats.3 cl_string.3 cl_timer.3
.include <bsd.port.options.mk>
post-extract:
@${REINPLACE_CMD} -e "s@&lt;@<@g" -e "s@&gt;@>@g" ${WRKSRC}/doc/*.ndoc
do-install:
.for manpage in ${MAN1} ${MAN3}
@iconv -f UTF-8 -t ISO-8859-1 ${WRKSRC}/doc/man/${manpage} > ${WRKSRC}/doc/man/${manpage}.iconv
.endfor
.for manpage in ${MAN1}
@${INSTALL_MAN} ${WRKSRC}/doc/man/${manpage}.iconv ${MAN1PREFIX}/man/man1/${manpage}
.endfor
.for manpage in ${MAN3}
@${INSTALL_MAN} ${WRKSRC}/doc/man/${manpage}.iconv ${MAN3PREFIX}/man/man3/${manpage}
.endfor
@${MKDIR} ${PREFIX}/lib/erlang/lib/common_lib-${PORTVERSION}
@${MKDIR} ${PREFIX}/lib/erlang/lib/common_lib-${PORTVERSION}/ebin
@${MKDIR} ${PREFIX}/lib/erlang/lib/common_lib-${PORTVERSION}/src
@${INSTALL_DATA} ${WRKSRC}/ebin/* ${PREFIX}/lib/erlang/lib/common_lib-${PORTVERSION}/ebin
@${INSTALL_DATA} ${WRKSRC}/src/* ${PREFIX}/lib/erlang/lib/common_lib-${PORTVERSION}/src
.include <bsd.port.mk>
SHA256 (common_lib-3.3.4.tar.gz) = 83a0964c15a14f91501e89ac22310c862398ac82e713c5f0868faaab8428f0be
SIZE (common_lib-3.3.4.tar.gz) = 140510
$FreeBSD$
--- Makefile.orig
+++ Makefile
@@ -1,3 +1,5 @@
+include app.mk
+
###-----------------------------------------------------------------------------
### APPLICATION LAYOUT
###-----------------------------------------------------------------------------
@@ -35,7 +37,10 @@
test:
./rebar ct
-doc: man html pdf
+doc: dirs man
+
+dirs:
+ @$(MKDIR) doc/man
man: $(MANS)
@$(MV) doc/man/$(APPNAME)_overview.3 doc/man/$(APPNAME).1
@@ -49,14 +54,14 @@
%.3: %.ndoc
@$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \
$(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \
- $(ERLDOC) -i - -t man --no-toc --erl -o man/$@; $(CD) ..
+ $(ERLDOC) -i - -t man --no-toc -o man/$@; $(CD) ..
%.html: %.ndoc
@$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \
$(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \
- $(ERLDOC) -i - -t xhtml --erl -o html/$@; $(CD) ..
+ $(ERLDOC) -i - -t xhtml -o html/$@; $(CD) ..
%.pdf: %.ndoc
@$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \
$(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \
- $(ERLDOC) -i - -t pdf --no-toc --erl -o pdf/$@; $(CD) ..
+ $(ERLDOC) -i - -t pdf --no-toc -o pdf/$@; $(CD) ..
$FreeBSD$
--- app.mk.orig
+++ app.mk
@@ -25,7 +25,7 @@
CD = cd
CP = cp -vf
ECHO = echo
-ERLDOC = ndoc
+ERLDOC = txt2tags
LN = ln -sf
MKDIR = mkdir
MV = mv -vf
common_lib is a library of Erlang functions used by oserl and other
projects.
WWW: https://github.com/iamaleksey/common_lib
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_application.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_bin.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_binary.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_calendar.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_consumer.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_csv.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_dqueue.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_lists.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_math.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_pool.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_queue.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_queue_srv.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_queue_tab.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_stats.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_string.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_timer.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_timer_srv.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/cl_url.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/common_lib.app
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/common_lib.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin/common_lib_sup.beam
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_application.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_bin.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_binary.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_calendar.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_consumer.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_csv.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_dqueue.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_lists.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_math.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_pool.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_queue.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_queue_srv.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_queue_tab.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_stats.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_string.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_timer.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_timer_srv.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/cl_url.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/common_lib.erl
%%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src/common_lib_sup.erl
@dirrm %%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/ebin
@dirrm %%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%/src
@dirrm %%LIB32DIR%%/erlang/lib/common_lib-%%VERSION%%
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment