ports/62316: [MAINTAINER] devel/opentop: Utilize OPTIONS

Sergey Matveychuk sem at ciam.ru
Tue Feb 3 18:30:13 UTC 2004


>Number:         62316
>Category:       ports
>Synopsis:       [MAINTAINER] devel/opentop: Utilize OPTIONS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 03 10:30:08 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Matveychuk
>Release:        FreeBSD 5.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD Current.sem-home.ciam.ru 5.2-RELEASE FreeBSD 5.2-RELEASE #6: Sat Jan 17 16:12:04 MSK 2004
>Description:
[DESCRIBE CHANGES]
* Utilize OPTIONS
* Corract install all libraries user wants
* Auto generate library list
* SIZE in distinfo

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- opentop-1.3.0_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/opentop.orig/Makefile /usr/ports/devel/opentop/Makefile
--- /usr/ports/devel/opentop.orig/Makefile	Tue Feb  3 03:55:22 2004
+++ /usr/ports/devel/opentop/Makefile	Tue Feb  3 21:17:16 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	opentop
 PORTVERSION=	1.3.0
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	open-top
@@ -24,25 +25,66 @@
 
 DOCDIST=	${PORTNAME}-api-${PORTVERSION:C|\.[0-9]$||:C|\.|-|g}
 
-WCHAR=	"@comment "
-STATIC=	"@comment "
-DEBUG=	"@comment "
+OPTIONS=	DEBUG "Build library with debug symbols" off \
+		SINGLE_THRD "Build single-threaded library" off \
+		WCHAR "Build wchar_t support library instead of char" off \
+		STATIC "Build static library instead of dynamic" off
+
+.include <bsd.port.pre.mk>
+
+# Defaults: always build release, multi-threaded, char supported, shared
+TYPE=		release
+THREAD=		multi
+CHAR=		char
+LIBS=		shared
 
-ALL_TARGET=	release_multi_char_shared
-
-.if defined(WITH_WCHAR)
-ALL_TARGET+=	release_multi_wchar_shared
-WCHAR=	""
-.endif
 .if defined(WITH_DEBUG)
-ALL_TARGET+=	debug_multi_char_shared
+TYPE+=		debug
+.endif
+.if defined(WITH_SINGLE_THRD)
+THREAD+=	single
+.endif
 .if defined(WITH_WCHAR)
-ALL_TARGET+=	debug_multi_wchar_shared
+CHAR+=		wchar
 .endif
-DEBUG=	""
+.if defined(WITH_STATIC)
+LIBS+=		static
 .endif
 
-PLIST_SUB+=	WCHAR=${WCHAR} DEBUG=${DEBUG}
+PLIST_FILES!=for r in ${TYPE}; do \
+		for t in ${THREAD}; do \
+			for c in ${CHAR}; do \
+				for l in ${LIBS}; do \
+					type=""; thread=""; \
+			 		char=""; ext="so"; \
+					if [ "$$r" = "debug" ]; then \
+						type="d"; \
+					fi; \
+					if [ "$$t" = "multi" ]; then \
+						thread="mt"; \
+					fi; \
+					if [ "$$c" = "wchar" ]; then \
+						char="w"; \
+					fi; \
+					if [ "$$l" = "static" ]; then \
+						ext="a"; \
+					fi; \
+	${ECHO_CMD} "lib/libopentop-gcc$${char}$${thread}$${type}.$${ext}"; \
+	${ECHO_CMD} "lib/libotxml-gcc$${char}$${thread}$${type}.$${ext}"; \
+				done; \
+			done;\
+		done; \
+	done
+
+.for r in ${TYPE}
+.for t in ${THREAD}
+.for c in ${CHAR}
+.for l in ${LIBS}
+ALL_TARGET+=	$r_$t_$c_$l
+.endfor
+.endfor
+.endfor
+.endfor
 
 post-patch:
 	@${REINPLACE_CMD} "s/-O3/${CFLAGS}/" \
@@ -50,15 +92,14 @@
 		${WRKSRC}/buildtools/gcc_compiler_options
 
 do-install:
-	${MKDIR} ${PREFIX}/include/${PORTNAME}
+	@${MKDIR} ${PREFIX}/include/${PORTNAME}; \
 	cd ${WRKSRC}; ${FIND} ot -name *.h -print | ${TAR} cTf - - | \
-			${TAR} xUCf ${PREFIX}/include/${PORTNAME} -
-	${INSTALL_PROGRAM} ${WRKSRC}/lib/*.so ${PREFIX}/lib
-
-post-install:
+			${TAR} xUCf ${PREFIX}/include/${PORTNAME} - ; \
+	${FIND} lib -name "*.so" -o -name "*.a" -exec \
+		${INSTALL_PROGRAM} \{\} ${PREFIX}/lib \;
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	@cd ${WRKDIR}/${DOCDIST}/html; ${TAR} cf - . | ${TAR} xUCf ${DOCSDIR} -
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/devel/opentop.orig/distinfo /usr/ports/devel/opentop/distinfo
--- /usr/ports/devel/opentop.orig/distinfo	Tue Feb  3 03:55:22 2004
+++ /usr/ports/devel/opentop/distinfo	Tue Feb  3 21:15:41 2004
@@ -1,2 +1,4 @@
 MD5 (opentop-1-3-0.tar.gz) = b1aa1e140f5eb912e832ac453e6acc21
+SIZE (opentop-1-3-0.tar.gz) = 873032
 MD5 (opentop-api-1-3.tar.gz) = 059b4300f193ac6d4e21f74cc9d894d2
+SIZE (opentop-api-1-3.tar.gz) = 445165
diff -ruN --exclude=CVS /usr/ports/devel/opentop.orig/pkg-plist /usr/ports/devel/opentop/pkg-plist
--- /usr/ports/devel/opentop.orig/pkg-plist	Tue Feb  3 03:55:22 2004
+++ /usr/ports/devel/opentop/pkg-plist	Tue Feb  3 04:18:57 2004
@@ -251,14 +251,6 @@
 include/opentop/ot/xmlcat/CatalogSerialisationContext.h
 include/opentop/ot/xmlcat/CatalogSet.h
 include/opentop/ot/xmlcat/defs.h
-lib/libopentop-gccmt.so
-lib/libotxml-gccmt.so
-%%WCHAR%%lib/libopentop-gccwmt.so
-%%WCHAR%%lib/libotxml-gccwmt.so
-%%DEBUG%%lib/libopentop-gccmtd.so
-%%DEBUG%%lib/libotxml-gccmtd.so
-%%DEBUG%%%%WCHAR%%lib/libopentop-gccwmtd.so
-%%DEBUG%%%%WCHAR%%lib/libotxml-gccwmtd.so
 %%PORTDOCS%%%%DOCSDIR%%/allclasses-frame.html
 %%PORTDOCS%%%%DOCSDIR%%/glossary.html
 %%PORTDOCS%%%%DOCSDIR%%/index.html
--- opentop-1.3.0_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list