ports/162593: [patch] devel/libmba: respect CC/CFLAGS, drop unused cruft

Jan Beich jbeich at tormail.net
Tue Nov 15 19:40:09 UTC 2011


>Number:         162593
>Category:       ports
>Synopsis:       [patch] devel/libmba: respect CC/CFLAGS, drop unused cruft
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 15 19:40:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
# slightly different from pointyhat
$ export PATH=~/.bin:$PATH
$ for cc in CC cc c++ gcc g++ cpp; do ln -s /usr/bin/false ~/.bin/${cc}; done
>Description:
Most build magic is replaced by WRKSRC/mktool since 0.9.1 so there is no
need to pass anything via MAKE_ENV. Also, altering SHLIB_MAJOR variable
have no effect on build but it's trivial to fix

  MAKE_ARGS=	LIBVERS=${SHLIB_MAJOR}.${PORTVERSION:R:E}.${PORTVERSION:E}

>How-To-Repeat:
http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110723205754/libmba-0.9.1.log

# -lexpat is unused since 0.9.1
$ ldd libmba.so.0
/usr/local/lib/libmba.so.0:
        libutil.so.9 => /lib/libutil.so.9 (0x801217000)
        libc.so.7 => /lib/libc.so.7 (0x800852000)
>Fix:
--- cc.diff begins here ---
Index: devel/libmba/Makefile
===================================================================
RCS file: /a/.csup/ports/devel/libmba/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- devel/libmba/Makefile	23 Sep 2011 22:22:05 -0000	1.24
+++ devel/libmba/Makefile	15 Nov 2011 16:05:18 -0000
@@ -16,15 +16,7 @@ MASTER_SITE_SUBDIR=	miwi
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	A collection of C modules potentially useful to any project
 
-LIB_DEPENDS=	expat.6:${PORTSDIR}/textproc/expat2
-
-USE_GMAKE=	yes
-MAKE_ENV=	prefix="${PREFIX}" \
-		MINVERSION="${SHLIB_MAJOR}" \
-		RPM_OPT_FLAGS="${CFLAGS} -I${LOCALBASE}/include"
-LDFLAGS+=	-L${LOCALBASE}/lib
 MAKE_JOBS_UNSAFE=	yes
-PLIST_SUB=	SHLIB_MAJOR="${SHLIB_MAJOR}"
 USE_LDCONFIG=	yes
 
 MAN3=		allocator.3m bitset.3m cfg.3m csv.3m diff.3m eval.3m hashmap.3m \
@@ -32,18 +24,12 @@ MAN3=		allocator.3m bitset.3m cfg.3m csv
 		stack.3m suba.3m svcond.3m svsem.3m text.3m time.3m varray.3m
 MANCOMPRESSED=	yes
 
-SHLIB_MAJOR=	0
-
 post-patch:
-	@${REINPLACE_CMD} -e 's|/usr/local|\$${PREFIX}|g ; \
-		 s|^CC|#CC|g ; \
-		 s|^MAJ|#MAJ|g ; \
-		 s|^MIN|#MIN|g ; \
-		 s|\.\$${MAJVERSION}||g ; \
-		 s|^RPM_OPT_FLAGS|#RPM_OPT_FLAGS|g ; \
-		 s| -lc| \$${LDFLAGS}|g ; \
-		 s|install -m ...|\$${BSD_INSTALL_DATA}|g ; \
-		 s|-/sbin/ldconfig.*$$||g ; \
-		 s|-D_XOPEN_SOURCE=500||g' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's,-g,$$(CFLAGS),' \
+		-e '/^prefix/s/=/?=/' \
+		-e 's/prefix/PREFIX/' \
+		${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -Ee 's,"g?cc","${CC}",' \
+		${WRKSRC}/mktool.c
 
 .include <bsd.port.mk>
Index: devel/libmba/pkg-plist
===================================================================
RCS file: /a/.csup/ports/devel/libmba/pkg-plist,v
retrieving revision 1.6
diff -u -p -r1.6 pkg-plist
--- devel/libmba/pkg-plist	1 Nov 2006 07:39:59 -0000	1.6
+++ devel/libmba/pkg-plist	15 Nov 2011 15:28:43 -0000
@@ -24,5 +24,5 @@ include/mba/time.h
 include/mba/varray.h
 lib/libmba.a
 lib/libmba.so
-lib/libmba.so.%%SHLIB_MAJOR%%
+lib/libmba.so.0
 @dirrm include/mba
--- cc.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list