ports/184897: devel/pcre++: Fix build with clang

KATO Tsuguru tkato432 at yahoo.com
Mon Dec 16 18:10:28 UTC 2013


>Number:         184897
>Category:       ports
>Synopsis:       devel/pcre++: Fix build with clang
>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:   Mon Dec 16 18:10:27 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang
- Support CXXFLAGS properly
- Add LICENSE

New file:
files/patch-libpcre++__pcre++.h

Remove file:
files/patch-doc::Makefile.in
files/patch-ltmain.sh

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/devel/pcre++/Makefile devel/pcre++/Makefile
--- /usr/ports/devel/pcre++/Makefile	2013-11-06 21:49:19.000000000 +0900
+++ devel/pcre++/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -3,31 +3,36 @@
 
 PORTNAME=	pcre++
 PORTVERSION=	0.9.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 MASTER_SITES=	http://www.daemon.de/idisk/Apps/pcre++/
 
 MAINTAINER=	ports at FreeBSD.org
-COMMENT=	A wrapper class around the pcre library
+COMMENT=	Wrapper class around the pcre library
 
-LIB_DEPENDS=	pcre.3:${PORTSDIR}/devel/pcre
+LICENSE=	LGPL21
 
-PCRE_CONFIG?=	${LOCALBASE}/bin/pcre-config
+LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
 
+USES=		gmake
 USE_AUTOTOOLS=	libtool
-USE_GMAKE=	yes
-GNU_CONFIGURE=	yes
-CPPFLAGS+=	`${PCRE_CONFIG} --cflags`
-LDFLAGS+=	`${PCRE_CONFIG} --libs`
 USE_LDCONFIG=	yes
 
-MAN3=		Pcre.3
-PLIST_SUB=	VERSION=${PORTVERSION}
+CPPFLAGS+=	$$(${PCRE_CONFIG} --cflags)
+LDFLAGS+=	$$(${PCRE_CONFIG} --libs)
 
 DOCSDIR=	${PREFIX}/share/doc/lib${PORTNAME}-${PORTVERSION}
 
-NO_STAGE=	yes
+PCRE_CONFIG?=	${LOCALBASE}/bin/pcre-config
+
 post-patch:
-	@${REINPLACE_CMD} -e 's|-O -g|\@CXXFLAGS\@|g' ${WRKSRC}/Makefile.in
+	@${REINPLACE_CMD} -e \
+		's| ../COPYING|| ; \
+		 s| $$(prefix)/doc| $${DESTDIR}$$(prefix)/share/doc|' \
+		${WRKSRC}/doc/Makefile.in
+.for i in examples/Makefile.in libpcre++/Makefile.in test/Makefile.in
+	@${REINPLACE_CMD} -e \
+		's|-O -g|@CXXFLAGS@|' ${WRKSRC}/${i}
+.endfor
 
 .include <bsd.port.mk>
diff -urN /usr/ports/devel/pcre++/files/patch-doc::Makefile.in devel/pcre++/files/patch-doc::Makefile.in
--- /usr/ports/devel/pcre++/files/patch-doc::Makefile.in	2013-11-06 21:49:19.000000000 +0900
+++ devel/pcre++/files/patch-doc::Makefile.in	1970-01-01 09:00:00.000000000 +0900
@@ -1,13 +0,0 @@
---- doc/Makefile.in.orig	Wed Jun 25 11:56:02 2003
-+++ doc/Makefile.in	Wed Jun 25 11:56:17 2003
-@@ -232,8 +232,8 @@
- 
- 
- install-data-local:
--	$(INSTALL) -m 755 -d $(prefix)/doc/libpcre++-$(VERSION)
--	$(INSTALL) -m 644 $(DOC_FILES) $(prefix)/doc/libpcre++-$(VERSION)/
-+	$(INSTALL) -m 755 -d $(prefix)/share/doc/libpcre++-$(VERSION)
-+	$(INSTALL) -m 644 $(DOC_FILES) $(prefix)/share/doc/libpcre++-$(VERSION)/
- 
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
diff -urN /usr/ports/devel/pcre++/files/patch-libpcre++__pcre++.h devel/pcre++/files/patch-libpcre++__pcre++.h
--- /usr/ports/devel/pcre++/files/patch-libpcre++__pcre++.h	1970-01-01 09:00:00.000000000 +0900
+++ devel/pcre++/files/patch-libpcre++__pcre++.h	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,15 @@
+--- libpcre++/pcre++.h.orig
++++ libpcre++/pcre++.h
+@@ -47,11 +47,11 @@
+ #include <map>
+ #include <stdexcept>
+ #include <iostream>
++#include <clocale>
+ 
+ 
+ extern "C" {
+   #include <pcre.h>
+-  #include <locale.h>
+ }
+ 
+ namespace pcrepp {
diff -urN /usr/ports/devel/pcre++/files/patch-ltmain.sh devel/pcre++/files/patch-ltmain.sh
--- /usr/ports/devel/pcre++/files/patch-ltmain.sh	2013-11-06 21:49:19.000000000 +0900
+++ devel/pcre++/files/patch-ltmain.sh	1970-01-01 09:00:00.000000000 +0900
@@ -1,15 +0,0 @@
---- ltmain.sh.orig	Wed Jun 25 11:24:31 2003
-+++ ltmain.sh	Wed Jun 25 11:25:27 2003
-@@ -4325,10 +4325,12 @@
- 	fi
- 
- 	# Install the pseudo-library for information purposes.
-+	if /usr/bin/false; then
- 	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- 	instname="$dir/$name"i
- 	$show "$install_prog $instname $destdir/$name"
- 	$run eval "$install_prog $instname $destdir/$name" || exit $?
-+	fi
- 
- 	# Maybe install the static library, too.
- 	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
diff -urN /usr/ports/devel/pcre++/pkg-plist devel/pcre++/pkg-plist
--- /usr/ports/devel/pcre++/pkg-plist	2013-11-06 21:49:19.000000000 +0900
+++ devel/pcre++/pkg-plist	2013-12-17 00:00:00.000000000 +0900
@@ -4,40 +4,40 @@
 lib/libpcre++.la
 lib/libpcre++.so
 lib/libpcre++.so.0
-%%DOCSDIR%%/AUTHORS
-%%DOCSDIR%%/COPYING
-%%DOCSDIR%%/ChangeLog
-%%DOCSDIR%%/INSTALL
-%%DOCSDIR%%/README
-%%DOCSDIR%%/annotated.html
-%%DOCSDIR%%/classPcre-members.html
-%%DOCSDIR%%/classPcre.html
-%%DOCSDIR%%/classPcre_1_1exception-members.html
-%%DOCSDIR%%/classPcre_1_1exception.html
-%%DOCSDIR%%/classpcrepp_1_1Pcre-members.html
-%%DOCSDIR%%/classpcrepp_1_1Pcre.html
-%%DOCSDIR%%/classpcrepp_1_1Pcre_1_1exception-members.html
-%%DOCSDIR%%/classpcrepp_1_1Pcre_1_1exception.html
-%%DOCSDIR%%/config.log
-%%DOCSDIR%%/doxygen.css
-%%DOCSDIR%%/doxygen.png
-%%DOCSDIR%%/files.html
-%%DOCSDIR%%/functions.html
-%%DOCSDIR%%/get_8cc-source.html
-%%DOCSDIR%%/get_8cc.html
-%%DOCSDIR%%/globals.html
-%%DOCSDIR%%/index.html
-%%DOCSDIR%%/namespacepcrepp.html
-%%DOCSDIR%%/namespaces.html
-%%DOCSDIR%%/namespacestd.html
-%%DOCSDIR%%/pcre++_8cc-source.html
-%%DOCSDIR%%/pcre++_8cc.html
-%%DOCSDIR%%/pcre++_8h-source.html
-%%DOCSDIR%%/pcre++_8h.html
-%%DOCSDIR%%/replace_8cc-source.html
-%%DOCSDIR%%/replace_8cc.html
-%%DOCSDIR%%/search_8cc-source.html
-%%DOCSDIR%%/search_8cc.html
-%%DOCSDIR%%/split_8cc-source.html
-%%DOCSDIR%%/split_8cc.html
- at dirrm %%DOCSDIR%%
+man/man3/Pcre.3.gz
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/annotated.html
+%%PORTDOCS%%%%DOCSDIR%%/classPcre-members.html
+%%PORTDOCS%%%%DOCSDIR%%/classPcre.html
+%%PORTDOCS%%%%DOCSDIR%%/classPcre_1_1exception-members.html
+%%PORTDOCS%%%%DOCSDIR%%/classPcre_1_1exception.html
+%%PORTDOCS%%%%DOCSDIR%%/classpcrepp_1_1Pcre-members.html
+%%PORTDOCS%%%%DOCSDIR%%/classpcrepp_1_1Pcre.html
+%%PORTDOCS%%%%DOCSDIR%%/classpcrepp_1_1Pcre_1_1exception-members.html
+%%PORTDOCS%%%%DOCSDIR%%/classpcrepp_1_1Pcre_1_1exception.html
+%%PORTDOCS%%%%DOCSDIR%%/config.log
+%%PORTDOCS%%%%DOCSDIR%%/doxygen.css
+%%PORTDOCS%%%%DOCSDIR%%/doxygen.png
+%%PORTDOCS%%%%DOCSDIR%%/files.html
+%%PORTDOCS%%%%DOCSDIR%%/functions.html
+%%PORTDOCS%%%%DOCSDIR%%/get_8cc-source.html
+%%PORTDOCS%%%%DOCSDIR%%/get_8cc.html
+%%PORTDOCS%%%%DOCSDIR%%/globals.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/namespacepcrepp.html
+%%PORTDOCS%%%%DOCSDIR%%/namespaces.html
+%%PORTDOCS%%%%DOCSDIR%%/namespacestd.html
+%%PORTDOCS%%%%DOCSDIR%%/pcre++_8cc-source.html
+%%PORTDOCS%%%%DOCSDIR%%/pcre++_8cc.html
+%%PORTDOCS%%%%DOCSDIR%%/pcre++_8h-source.html
+%%PORTDOCS%%%%DOCSDIR%%/pcre++_8h.html
+%%PORTDOCS%%%%DOCSDIR%%/replace_8cc-source.html
+%%PORTDOCS%%%%DOCSDIR%%/replace_8cc.html
+%%PORTDOCS%%%%DOCSDIR%%/search_8cc-source.html
+%%PORTDOCS%%%%DOCSDIR%%/search_8cc.html
+%%PORTDOCS%%%%DOCSDIR%%/split_8cc-source.html
+%%PORTDOCS%%%%DOCSDIR%%/split_8cc.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list