Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Aug 2015 22:40:01 +0000 (UTC)
From:      Don Lewis <truckman@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r393676 - in head/editors/openoffice-devel: . files
Message-ID:  <201508062240.t76Me1S4068224@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: truckman
Date: Thu Aug  6 22:40:00 2015
New Revision: 393676
URL: https://svnweb.freebsd.org/changeset/ports/393676

Log:
  Update to SVN revision 1694132, which contains some changes to aid
  building with gcc from ports on FreeBSD.  Remove the REINPLACE_CMD
  patches in the ports Makefile and $FBSD_LDFLAGS from do-build that
  are no longer needed for building with gcc in the general case.
  
  Add a patch to disable optimization when compiling one source file
  with base clang 3.4 on FreeBSD 10 amd64 to avoid tripping on a compiler
  code generation bug.  This allows us to build with base clang on
  FreeBSD 10 amd64 instead of using the clang35 port.
  
  Fine tune compiler optimization flags when using clang 3.6 on FreeBSD 11
  i386 or gcc 4.9 instead of totally disabling optimization.  Unbreak
  the build with gcc 4.9 on amd64.
  
  A few Makefile cleanups without functional change:
  
    * Combine two .if ${ARCH} == amd64 sections of Makefile
  
    * Merge the pre-configure target into post-extract
  
    * Simplify the code in the do-build target
  
  Approved by:	mat (mentor, implicit)

Added:
  head/editors/openoffice-devel/files/patch-clang34amd64   (contents, props changed)
Modified:
  head/editors/openoffice-devel/Makefile
  head/editors/openoffice-devel/distinfo

Modified: head/editors/openoffice-devel/Makefile
==============================================================================
--- head/editors/openoffice-devel/Makefile	Thu Aug  6 22:36:08 2015	(r393675)
+++ head/editors/openoffice-devel/Makefile	Thu Aug  6 22:40:00 2015	(r393676)
@@ -3,7 +3,7 @@
 
 PORTNAME=	apache-openoffice
 PORTVERSION=	${AOOVERSION1}.${AOOVERSION2}.${SVNREVISION}
-PORTREVISION=	2
+#PORTREVISION=	1
 PORTEPOCH=	3
 CATEGORIES=	editors java
 MASTER_SITES=	http://ci.apache.org/projects/openoffice/milestones/${AOOVERSION}-${AOORC}-r${SVNREVISION}/source/ \
@@ -100,7 +100,7 @@ AOOVERSION2=	2
 AOOVERSION3=	0
 # From solenv/inc/minor.mk SOURCEREVISION LAST_MINOR BUILD
 AOOTAG=		AOO420m1\(Build:9800\)
-SVNREVISION=	1689959
+SVNREVISION=	1694132
 #AOORC=rc3
 EXTSRC=		ApacheOpenOffice.ext_sources.${AOOVERSION1}.x.x.20150707.tar.gz
 
@@ -170,33 +170,21 @@ MMEDIA_USE=			GSTREAMER=yes
 .include <${FILESDIR}/Makefile.localized>
 
 .if ${COMPILER_TYPE} == clang
-. if ${COMPILER_VERSION} < 35 && ${ARCH} == amd64
-BUILD_DEPENDS+=		clang35:${PORTSDIR}/lang/clang35
-CPP=			clang-cpp35
-CC=			clang35
-CXX=			clang++35
-. endif
 CPPFLAGS+=		-I${LOCALBASE}/include
 .else
 USE_GCC=		yes
-SUBST=			"s/-fexceptions/& -fno-enforce-eh-specs/;s/-DHAVE_STL_INCLUDE_PATH/-DBOOST_TR1_DISABLE_INCLUDE_NEXT -DBOOST_TR1_GCC_INCLUDE_PATH=c++/"
 .endif
 
 .if ${ARCH} == amd64
 FREEBSD_ENV_SET=	FreeBSDAMDEnv.Set.sh
+PACKAGE_MIDDLE=		${PORTVERSION}_${OPSYS}_x86-64
 .else
 FREEBSD_ENV_SET=	FreeBSDX86Env.Set.sh
+PACKAGE_MIDDLE=		${PORTVERSION}_${OPSYS}_x86
 .endif
-
-LOCALIZED_LANG?=	en-US
-
 PACKAGE_PREFIX=		Apache_OpenOffice
 
-.if ${ARCH} == amd64
-PACKAGE_MIDDLE=		${PORTVERSION}_${OPSYS}_x86-64
-.else
-PACKAGE_MIDDLE=		${PORTVERSION}_${OPSYS}_x86
-.endif
+LOCALIZED_LANG?=	en-US
 
 .if ${PORT_OPTIONS:MCCACHE} || defined(WITH_CCACHE)
 BUILD_DEPENDS+=	ccache:${PORTSDIR}/devel/ccache
@@ -308,6 +296,7 @@ post-extract:
 	${TAR} -C ${WRKSUBDIR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${EXTSRC}
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/unowinreg.dll ${WRKSRC}/external/unowinreg/
 	${RM} -rf ${WRKSRC}/l10n
+	${LN} -sf ${UNZIP_CMD} ${WRKSRC}/solenv/bin/unzip
 	${SED}  -e '\|^For main/vcl/unx/generic/fontmanager/parseAFM|,/^__/p' \
 		-e '\|^For PostScript(R) AFM|,/^__/p'			\
 		-e d  ${WRKSRC}/LICENSE > ${LICENSE_FILE_ADOBE}
@@ -338,27 +327,28 @@ post-extract:
 		-e d  ${WRKSRC}/LICENSE > ${LICENSE_FILE_W3C}
 
 post-patch:
-.if defined (USE_GCC)
-	${REINPLACE_CMD} -e ${SUBST} ${WRKSRC}/solenv/gbuild/platform/freebsd.mk
-	${REINPLACE_CMD} -e ${SUBST} ${WRKSRC}/solenv/inc/unxfbsd.mk
-.endif
-.if ${ARCH} == i386
-	# g++49 -Os sometimes leaves inline class methods undefined
-	# autodoc core dumps when built with with -Os clang 3.6 on i386
-	if [ ${CXX} = g++49 -o \
-	     ${COMPILER_TYPE} = clang -a ${COMPILER_VERSION} = 36 ]; then \
-		${REINPLACE_CMD} -e "s/ := -Os/ := -O0/" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk; \
-		${REINPLACE_CMD} -e "s/=-Os /=-O0 /" ${WRKSRC}/solenv/inc/unxfbsdi.mk; \
+.if ${COMPILER_TYPE} == gcc
+	# g++49 -Os sometimes leaves inline class methods undefined,
+	# affects fmgridif.cxx and ColumnControl.cxx
+	# See: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65009>;
+	if [ ${CXX} = g++49  ]; then \
+		${REINPLACE_CMD} -e "s/ := -Os/ := -Os -fno-devirtualize -fno-devirtualize-speculatively/" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk; \
+		${REINPLACE_CMD} -e "s/=-Os /=-Os -fno-devirtualize -fno-devirtualize-speculatively /" ${WRKSRC}/solenv/inc/unxfbsdi.mk; \
 	fi
+.elif ${ARCH} == i386 && ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} == 36
+	# autodoc and uno (bridgetest) core dump when built with with -Os
+	# on i386, affects file.cxx and bridgetest.cxx
+	# Using -O2 optimiztion works, and -Os is essentially -O2 with out
+	# loop unrolling.
+	# Changing optimization in just unxfbsdi.mk is sufficient to get
+	# a successful build, but change it in both places to avoid the
+	# possibility of obscure runtime problems.
+	${REINPLACE_CMD} -e "s/=-Os /=-O2 -fno-unroll-loops /" ${WRKSRC}/solenv/inc/unxfbsdi.mk
+	${REINPLACE_CMD} -e "s/ := -Os/ := -O2 -fno-unroll-loops/" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk
 .endif
 
-pre-configure:
-	${LN} -sf ${UNZIP_CMD} ${WRKSRC}/solenv/bin/unzip
-
 do-build:
-	cd ${WRKSUBDIR} ; ${PRINTF} "[repositories]\n" > source_config
-	cd ${WRKSUBDIR} ; ${PRINTF} "main=active\n" >> source_config
-	cd ${WRKSUBDIR} ; ${PRINTF} "extras=active\n" >> source_config
+	${PRINTF} "[repositories]\nmain=active\nextras=active\n" > ${WRKSUBDIR}/source_config
 	cd ${WRKSRC} ; ./bootstrap
 	#
 	# numproc controls the number of parallel makes.
@@ -375,27 +365,27 @@ do-build:
 	#  * dmproc >= numproc
 	#  * dmproc <= 2*numproc if MAKE_JOBS_NUMBER <= 3
 	#
-	cd ${WRKSRC} ; . ${FREEBSD_ENV_SET} ; cd instsetoo_native/util ;  \
-	 export LANG=C LC_ALL=C FBSD_LDFLAGS="${LDFLAGS}" ;		  \
-	 if [ ${MAKE_JOBS_NUMBER} -le 3 ] ; then			  \
-	  numproc=1 ; dmproc=${MAKE_JOBS_NUMBER} ;			  \
+	if [ ${MAKE_JOBS_NUMBER} -le 3 ] ; then				  \
+	 numproc=1 ; dmproc=${MAKE_JOBS_NUMBER} ;			  \
+	else								  \
+	 a=1 ;								  \
+	 while [ $$(( 2 * $${a} * $${a} )) -lt ${MAKE_JOBS_NUMBER} ]; do  \
+	  a=$$(( $${a} + 1 )) ;						  \
+	 done ;								  \
+	 b=$$(( $${a} + 1 )) ;						  \
+	 ad=$$(( ( ${MAKE_JOBS_NUMBER} + $${a} - 1 ) / $${a} )) ;	  \
+	 ap=$$(( $${a} * $${ad} )) ;					  \
+	 bd=$$(( ( ${MAKE_JOBS_NUMBER} + $${b} - 1 ) / $${b} )) ;	  \
+	 bp=$$(( $${b} * $${bd} )) ;					  \
+	 if [ $${ap} -le $${bp} ]; then					  \
+	  numproc=$${a} ; dmproc=$${ad} ;				  \
 	 else								  \
-	  a=1 ;								  \
-	  while [ $$(( 2 * $${a} * $${a} )) -lt ${MAKE_JOBS_NUMBER} ]; do \
-	   a=$$(( $${a} + 1 )) ;					  \
-	  done ;							  \
-	  b=$$(( $${a} + 1 )) ;						  \
-	  ad=$$(( ( ${MAKE_JOBS_NUMBER} + $${a} - 1 ) / $${a} )) ;	  \
-	  ap=$$(( $${a} * $${ad} )) ;					  \
-	  bd=$$(( ( ${MAKE_JOBS_NUMBER} + $${b} - 1 ) / $${b} )) ;	  \
-	  bp=$$(( $${b} * $${bd} )) ;					  \
-	  if [ $${ap} -le $${bp} ]; then				  \
-	   numproc=$${a} ; dmproc=$${ad} ;				  \
-	  else								  \
-	   numproc=$${b} ; dmproc=$${bd} ;				  \
-	  fi ;								  \
+	  numproc=$${b} ; dmproc=$${bd} ;				  \
 	 fi ;								  \
-	 build.pl --all -P$${numproc} -- -P$${dmproc}
+	fi ;								  \
+	cd ${WRKSRC}/instsetoo_native ;					  \
+	. ../${FREEBSD_ENV_SET} ; 					  \
+	LANG=C LC_ALL=C build.pl --all -P$${numproc} -- -P$${dmproc}
 
 do-install:
 	cd ${WRKSRC}/instsetoo_native/unxfbsd?.pro/Apache_OpenOffice/archive/install/${LOCALIZED_LANG}/ ; ${LS} *.tar.?z > ${WRKDIR}/INSTALLFILES

Modified: head/editors/openoffice-devel/distinfo
==============================================================================
--- head/editors/openoffice-devel/distinfo	Thu Aug  6 22:36:08 2015	(r393675)
+++ head/editors/openoffice-devel/distinfo	Thu Aug  6 22:40:00 2015	(r393676)
@@ -1,5 +1,5 @@
-SHA256 (openoffice/apache-openoffice-r1689959-src.tar.xz) = 22f66a8d19d1bb3355370875628f5bc44ec02c7ce75fb57021ced1834eb8da29
-SIZE (openoffice/apache-openoffice-r1689959-src.tar.xz) = 215148292
+SHA256 (openoffice/apache-openoffice-r1694132-src.tar.xz) = 861f9e7c559a3bc345c4a3e5e94fa15683259ee00692034833a40d03bdb2ddce
+SIZE (openoffice/apache-openoffice-r1694132-src.tar.xz) = 215178940
 SHA256 (openoffice/unowinreg.dll) = f563e522922133db9340b0306711c2d8767cc3481dd9e7d9b0d059906d12653c
 SIZE (openoffice/unowinreg.dll) = 6144
 SHA256 (openoffice/ApacheOpenOffice.ext_sources.4.x.x.20150707.tar.gz) = 966a8333c83a18ddd84401389006d6e0b52b8175924b808b54b88211669985fa

Added: head/editors/openoffice-devel/files/patch-clang34amd64
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/openoffice-devel/files/patch-clang34amd64	Thu Aug  6 22:40:00 2015	(r393676)
@@ -0,0 +1,27 @@
+--- connectivity/source/drivers/dbase/makefile.mk.orig	2014-09-19 18:15:41 UTC
++++ connectivity/source/drivers/dbase/makefile.mk
+@@ -76,7 +76,9 @@ EXCEPTIONSFILES=\
+ 	$(SLO)$/DDriver.obj
+ 
+ # [kh] ppc linux gcc compiler problem
+-.IF "$(OS)$(COM)$(CPUNAME)"=="LINUXGCCPOWERPC"
++# [Don Lewis] clang 3.4 -O2 on amd64 tries to use R_X86_64_PC32 relocation with
++#             symbol _ZThn192_N12connectivity4file10OFileTable7acquireEvj
++.IF "$(OS)$(COM)$(CPUNAME)"=="LINUXGCCPOWERPC" || ("$(OS)$(COM)$(CPUNAME)"=="FREEBSDCLANGX86_64" && $(CCNUMVER)>=000300040000 && $(CCNUMVER)<000300050000)
+ EXCEPTIONSNOOPTFILES= \
+ 	$(SLO)$/DTable.obj
+ .ELSE
+--- solenv/inc/tg_compv.mk.orig	2015-08-05 01:53:01 UTC
++++ solenv/inc/tg_compv.mk
+@@ -38,7 +38,11 @@ CFLAGSNUMVERSION_CMD=-dumpversion $(PIPE
+ .ELIF "$(COM)"=="CLANG"
+ CFLAGSVERSION=--version
+ CFLAGSVERSION_CMD=--version | head -n1 | sed -e"s/.*version //" -e"s/ .*//"
++.IF "$(OS)"="FREEBSD"
++CFLAGSNUMVERSION_CMD=${CFLAGSVERSION_CMD} | $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
++.ELSE
+ CFLAGSNUMVERSION_CMD=${CFLAGSVERSION_CMD} | sed -e"s/\.//"
++.ENDIF
+ .ELIF "$(COM)"=="MSC"
+ CFLAGSVERSION=
+ CFLAGSVERSION_CMD=  $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk



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