aboutsummaryrefslogtreecommitdiff
path: root/textproc/ctpp2
diff options
context:
space:
mode:
authorRuslan Makhmatkhanov <rm@FreeBSD.org>2012-10-01 18:35:12 +0000
committerRuslan Makhmatkhanov <rm@FreeBSD.org>2012-10-01 18:35:12 +0000
commita4c33e0371422987dccbc4f2f697ee805bafa1d7 (patch)
tree5182e3899791d4c9eb8a8bf9d1c9d91177f41d6e /textproc/ctpp2
parent509e18f858f1fe0d261e42de9981c4dc25ce2f46 (diff)
downloadports-a4c33e0371422987dccbc4f2f697ee805bafa1d7.tar.gz
ports-a4c33e0371422987dccbc4f2f697ee805bafa1d7.zip
- update to 2.8.2
- optionify the port - chase the update in dependend ports: - textproc/py-pyctpp2 - www/cas while here: - trim Makefile header - tab -> space change in pkg-descr:WWW PR: 170610 Submitted by: Veniamin Gvozdikov <g.veniamin at googlemail dot com> Approved by: maintainer timeout (> 1 month)
Notes
Notes: svn path=/head/; revision=305138
Diffstat (limited to 'textproc/ctpp2')
-rw-r--r--textproc/ctpp2/Makefile57
-rw-r--r--textproc/ctpp2/distinfo4
-rw-r--r--textproc/ctpp2/files/patch-CMakeLists.txt44
-rw-r--r--textproc/ctpp2/pkg-descr2
-rw-r--r--textproc/ctpp2/pkg-plist2
5 files changed, 100 insertions, 9 deletions
diff --git a/textproc/ctpp2/Makefile b/textproc/ctpp2/Makefile
index 0538cba93ed0..1c5d5c35aaa3 100644
--- a/textproc/ctpp2/Makefile
+++ b/textproc/ctpp2/Makefile
@@ -1,12 +1,8 @@
-# New ports collection makefile for: ctpp2
-# Date created: 25 Jan 2008
-# Whom: reki@reki.ru (Andrei V. Shetuhin)
-#
+# Created by: Andrei V. Shetuhin <reki@reki.ru>
# $FreeBSD$
-#
PORTNAME= ctpp2
-PORTVERSION= 2.8.1
+PORTVERSION= 2.8.2
CATEGORIES= textproc devel
MASTER_SITES= http://ctpp.havoc.ru/download/
@@ -22,4 +18,53 @@ PLIST_SUB+= PORTVERSION=${PORTVERSION}
MAN1= ctpp2c.1 ctpp2vm.1 ctpp2i.1 ctpp2json.1 ctpp2-config.1
+OPTIONS_DEFINE= DEBUG DISCARD_ILSEQ DOCS MD5 OPTIMIZATION TRANSLITERATE
+OPTIONS_DEFAULT= DISCARD_ILSEQ MD5 OPTIMIZATION TRANSLITERATE
+DEBUG_DESC= Enable debug output
+OPTIMIZATION_DESC= Enable optimization
+MD5_DESC= Enable md5 support
+DISCARD_ILSEQ_DESC= Discard illegal sequence and continue
+TRANSLITERATE_DESC= Enable transliteration in the conversion
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDEBUG}
+CMAKE_ARGS+= -DDEBUG_MODE=ON
+.else
+CMAKE_ARGS+= -DDEBUG_MODE=OFF
+.endif
+
+.if ${PORT_OPTIONS:MDOCS}
+BUILD_DEPENDS+= rst2html:${PORTSDIR}/textproc/py-docutils
+CMAKE_ARGS+= -DENABLE_DOCS=ON
+PLIST_SUB+= DOCS=""
+.else
+CMAKE_ARGS+= -DENABLE_DOCS=OFF
+PLIST_SUB+= DOCS="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MMD5}
+CMAKE_ARGS+= -DMD5_SUPPORT=ON
+.else
+CMAKE_ARGS+= -DMD5_SUPPORT=OFF
+.endif
+
+.if ${PORT_OPTIONS:MDISCARD_ILSEQ}
+CMAKE_ARGS+= -DICONV_DISCARD_ILSEQ=ON
+.else
+CMAKE_ARGS+= -DICONV_DISCARD_ILSEQ=OFF
+.endif
+
+.if ${PORT_OPTIONS:MTRANSLITERATE}
+CMAKE_ARGS+= -DICONV_TRANSLITERATE=ON
+.else
+CMAKE_ARGS+= -DICONV_TRANSLITERATE=OFF
+.endif
+
+.if ${PORT_OPTIONS:MOPTIMIZATION}
+CMAKE_ARGS+= -DENABLE_OPTIMIZATION=ON
+.else
+CMAKE_ARGS+= -DENABLE_OPTIMIZATION=OFF
+.endif
+
.include <bsd.port.mk>
diff --git a/textproc/ctpp2/distinfo b/textproc/ctpp2/distinfo
index b1124486869e..b037485091af 100644
--- a/textproc/ctpp2/distinfo
+++ b/textproc/ctpp2/distinfo
@@ -1,2 +1,2 @@
-SHA256 (ctpp2-2.8.1.tar.gz) = 451a42572cc713cbde56b659a20200f6feb73337ed0496ca9e5fa9cf79ebb33a
-SIZE (ctpp2-2.8.1.tar.gz) = 214747
+SHA256 (ctpp2-2.8.2.tar.gz) = 4d14b395520cf34bae8522a51b03b96b2da06ab4ee338047930d167a23a3dfc5
+SIZE (ctpp2-2.8.2.tar.gz) = 240096
diff --git a/textproc/ctpp2/files/patch-CMakeLists.txt b/textproc/ctpp2/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..d93205a7ad81
--- /dev/null
+++ b/textproc/ctpp2/files/patch-CMakeLists.txt
@@ -0,0 +1,44 @@
+--- CMakeLists.txt.orig 2012-07-13 16:53:18.000000000 +0400
++++ CMakeLists.txt 2012-08-13 15:53:30.167118048 +0400
+@@ -21,6 +21,7 @@
+
+ OPTION(ICONV_DISCARD_ILSEQ "Discard illegal sequence and continue (iconv) [default: ON]" ON)
+ OPTION(ICONV_TRANSLITERATE "Enable transliteration in the conversion (iconv) [default: ON]" ON)
++OPTION(ENABLE_DOCS "Enable docs [default: OFF]" OFF)
+
+ # Build optimized code for following CPU (default i386)
+ #SET(CPU_TUNE "i686")
+@@ -656,6 +657,8 @@
+ SET_TESTS_PROPERTIES(Calls_D PROPERTIES DEPENDS Calls_R)
+ ENDIF (DIFF_EXECUTABLE)
+
++
++IF(ENABLE_DOCS MATCHES "ON")
+ FIND_PROGRAM(RST2HTML_EXECUTABLE "rst2html" /usr/local/bin /usr/bin)
+ IF (RST2HTML_EXECUTABLE)
+ ADD_CUSTOM_COMMAND(
+@@ -665,6 +668,7 @@
+ )
+ ADD_CUSTOM_TARGET(doc ALL DEPENDS template_language.html)
+ ENDIF (RST2HTML_EXECUTABLE)
++ENDIF(ENABLE_DOCS MATCHES "ON")
+
+ # Install Headers
+ INSTALL(FILES include/CDT.hpp
+@@ -810,13 +814,15 @@
+ GROUP_READ
+ WORLD_READ)
+
++IF(ENABLE_DOCS MATCHES "ON")
+ IF(RST2HTML_EXECUTABLE)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/template_language.html
+- DESTINATION share/doc
++ DESTINATION share/doc/ctpp2
+ PERMISSIONS OWNER_READ OWNER_WRITE
+ GROUP_READ
+ WORLD_READ)
+ ENDIF(RST2HTML_EXECUTABLE)
++ENDIF(ENABLE_DOCS MATCHES "ON")
+
+ ENDIF("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
+
diff --git a/textproc/ctpp2/pkg-descr b/textproc/ctpp2/pkg-descr
index 74f35ff5f4a9..be6e0ef2a698 100644
--- a/textproc/ctpp2/pkg-descr
+++ b/textproc/ctpp2/pkg-descr
@@ -2,4 +2,4 @@ This is a simple set of C++ classes which allow to use
templates like perl modules Template Toolkit and HTML::Template::Pro
Version 2.
-WWW: http://ctpp.havoc.ru/
+WWW: http://ctpp.havoc.ru/
diff --git a/textproc/ctpp2/pkg-plist b/textproc/ctpp2/pkg-plist
index 3ad1b9f7aea1..3bb98f025fcb 100644
--- a/textproc/ctpp2/pkg-plist
+++ b/textproc/ctpp2/pkg-plist
@@ -65,8 +65,10 @@ include/ctpp2/STLOstream.hpp
include/ctpp2/STLPair.hpp
include/ctpp2/STLString.hpp
include/ctpp2/STLVector.hpp
+%%DOCS%%%%DOCSDIR%%/template_language.html
lib/libctpp2-st.a
lib/libctpp2.so
lib/libctpp2.so.2
lib/libctpp2.so.%%PORTVERSION%%
+%%DOCS%%@dirrm %%DOCSDIR%%
@dirrm include/ctpp2