Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2017 09:56:36 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r438344 - head/science/libsvm
Message-ID:  <201704120956.v3C9ualE062220@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Wed Apr 12 09:56:35 2017
New Revision: 438344
URL: https://svnweb.freebsd.org/changeset/ports/438344

Log:
  - Sort out options (for instance, OPTIMIZED_CFLAGS does not belong to python slave port)
  - Add NO_ARCH for libsvm-python
  - Switch to PORTDOCS
  - Switch to options helpers
  - Cosmetic fixes

Modified:
  head/science/libsvm/Makefile

Modified: head/science/libsvm/Makefile
==============================================================================
--- head/science/libsvm/Makefile	Wed Apr 12 09:54:11 2017	(r438343)
+++ head/science/libsvm/Makefile	Wed Apr 12 09:56:35 2017	(r438344)
@@ -13,14 +13,13 @@ COMMENT=	Library for Support Vector Mach
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/COPYRIGHT
 
-OPTIONS_DEFINE=	OPTIMIZED_CFLAGS DOCS
-OPTIONS_DEFAULT=	OPTIMIZED_CFLAGS
-
 USES=		zip
 
 USE_LDCONFIG=	yes
 ALL_TARGET=	all lib
 
+OPTIONS_DEFINE=	DOCS
+
 .if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
 CATEGORIES+=	python
 
@@ -28,29 +27,22 @@ USES+=		python
 
 MAKE_ARGS=	PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
 
-TXT_DOCS=	README.python
+PORTDOCS=	README.python
 
 NO_BUILD=	yes
-
+NO_ARCH=	yes
 .else
-TXT_DOCS=	COPYRIGHT README FAQ.html README.tools
+PORTDOCS=	README FAQ.html README.tools
 
 TOOLS=		tools/checkdata.py tools/easy.py tools/grid.py tools/subset.py
 
 SUB_FILES=	pkg-message
 SUB_LIST=	DATADIR=${DATADIR}
 
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MDOCS}
-PORTDOCS=	${TXT_DOCS}
-.endif
+OPTIONS_DEFINE+=	OPTIMIZED_CFLAGS
+OPTIONS_DEFAULT+=	OPTIMIZED_CFLAGS
 
-.if ${PORT_OPTIONS:MOCFLAGS}
-# same as LIBSVM itself
-CFLAGS=		-Wall -Wconversion -O3
+OPTIMIZED_CFLAGS_CFLAGS=		-Wall -Wconversion -O3
 .endif
 
 post-patch:
@@ -60,31 +52,28 @@ post-patch:
 	@${CP} ${WRKSRC}/tools/README ${WRKSRC}/README.tools
 .endif
 
-.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
 do-install:
-	${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
+.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
+	@${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
 	${INSTALL_DATA} ${WRKSRC}/python/svm.py ${STAGEDIR}${PYTHON_SITELIBDIR}
 	${INSTALL_DATA} ${WRKSRC}/python/svmutil.py ${STAGEDIR}${PYTHON_SITELIBDIR}
 .else
-
-do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/svm-train ${STAGEDIR}${PREFIX}/bin/
 	${INSTALL_PROGRAM} ${WRKSRC}/svm-predict ${STAGEDIR}${PREFIX}/bin/
 	${INSTALL_PROGRAM} ${WRKSRC}/svm-scale ${STAGEDIR}${PREFIX}/bin/
 	${INSTALL_DATA} ${WRKSRC}/svm.h ${STAGEDIR}${PREFIX}/include/
 	${INSTALL_LIB} ${WRKSRC}/libsvm.so.2 ${STAGEDIR}${PREFIX}/lib/
 	${LN} -sf libsvm.so.2 ${STAGEDIR}${PREFIX}/lib/libsvm.so
-	${MKDIR} ${STAGEDIR}${DATADIR}
+	@${MKDIR} ${STAGEDIR}${DATADIR}
 	for f in ${TOOLS}; do \
-	  ${INSTALL_DATA} ${WRKSRC}/$$f ${STAGEDIR}${DATADIR}; \
+		${INSTALL_DATA} ${WRKSRC}/$$f ${STAGEDIR}${DATADIR}; \
 	done
-
 .endif
 
-post-install-DOCS-on:
+do-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	for f in ${TXT_DOCS}; do \
-	  ${INSTALL_DATA} ${WRKSRC}/$$f ${STAGEDIR}${DOCSDIR}; \
-	done
+.for f in ${PORTDOCS}
+	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
+.endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704120956.v3C9ualE062220>