Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176074065
D23412.id67451.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D23412.id67451.diff
View Options
Index: math/openblas/Makefile
===================================================================
--- math/openblas/Makefile
+++ math/openblas/Makefile
@@ -3,6 +3,7 @@
PORTNAME= openblas
PORTVERSION= 0.3.7
+PORTREVISION= 1
DISTVERSIONPREFIX= v
PORTEPOCH= 1
CATEGORIES= math
@@ -36,7 +37,7 @@
OPENBLAS_SVER= 0
TEST_TARGET= tests
-BUILDFLAGS= FCOMMON_OPT=-frecursive MAKE_NB_JOBS=-1
+PLIST_SUB+= PORTVERSION=${PORTVERSION}
OPTIONS_DEFINE= INTERFACE64 OPENMP
OPTIONS_DEFINE_i386= AVX AVX2 DYNAMIC_ARCH
@@ -67,46 +68,20 @@
. endif
.endif
-.if defined(TARGET_CPU_ARCH)
-BUILDFLAGS+= TARGET=${TARGET_CPU_ARCH}
-MAKE_ENV+= TARGET=${TARGET_CPU_ARCH}
-.endif
-
MAXTHREADS?= 64
-BUILDFLAGS_THREAD+= NUM_THREADS=${MAXTHREADS} USE_THREAD=1
-
-.if ${ARCH:M*64} == ""
-BUILDFLAGS+= BINARY32=1
-.else
-BUILDFLAGS+= BINARY64=1
-.endif
.if ! ${PORT_OPTIONS:MDYNAMIC_ARCH} && ( ${ARCH} == "amd64" || ${ARCH} == "i386" )
MANUAL_PACKAGE_BUILD= Optimizes for the build machine.
.endif
.if ${PORT_OPTIONS:MDYNAMIC_ARCH}
-BUILDFLAGS+= DYNAMIC_ARCH=1
PLIST_SUB+= DYNARCH=""
.else
PLIST_SUB+= DYNARCH="@comment "
.endif
-.if ${PORT_OPTIONS:MINTERFACE64}
-BUILDFLAGS+= INTERFACE64=1
-.endif
-
-.if ! ${PORT_OPTIONS:MAVX}
-BUILDFLAGS+= NO_AVX=1
-.endif
-
-.if ! ${PORT_OPTIONS:MAVX2}
-BUILDFLAGS+= NO_AVX2=1
-.endif
-
.if ${PORT_OPTIONS:MOPENMP}
USES+= compiler:openmp
-BUILDFLAGS_THREAD+= USE_OPENMP=1
.else
USES+= compiler:c11
.endif
@@ -123,6 +98,35 @@
cd ${DISTDIR}/${DIST_SUBDIR} ; \
${CP} ${LARGE_FILE} ${TIMING_FILE} ${WRKSRC}
+post-patch:
+ @${ECHO} MAKE_NB_JOBS=-1 >> ${WRKSRC}/Makefile.rule
+ @${ECHO} NUM_THREADS=${MAXTHREADS} >> ${WRKSRC}/Makefile.rule
+ @${ECHO} USE_THREAD=1 >> ${WRKSRC}/Makefile.rule
+.if ! ${PORT_OPTIONS:MAVX}
+ @${ECHO} NO_AVX=1 >> ${WRKSRC}/Makefile.rule
+.endif
+.if ! ${PORT_OPTIONS:MAVX2}
+ @${ECHO} NO_AVX2=1 >> ${WRKSRC}/Makefile.rule
+.endif
+.if ${PORT_OPTIONS:MDYNAMIC_ARCH}
+ @${ECHO} DYNAMIC_ARCH=1 >> ${WRKSRC}/Makefile.rule
+ @${ECHO} DYNAMIC_OLDER=1 >> ${WRKSRC}/Makefile.rule
+.endif
+.if defined(TARGET_CPU_ARCH)
+ @${ECHO} TARGET=${TARGET_CPU_ARCH} >> ${WRKSRC}/Makefile.rule
+.endif
+.if ${PORT_OPTIONS:MINTERFACE64}
+ @${ECHO} INTERFACE64=1 >> ${WRKSRC}/Makefile.rule
+.endif
+.if ${PORT_OPTIONS:MOPENMP}
+ @${ECHO} USE_OPENMP=1 >> ${WRKSRC}/Makefile.rule
+.endif
+.if ${ARCH:M*64} == ""
+ @${ECHO} BINARY=32 >> ${WRKSRC}/Makefile.rule
+.else
+ @${ECHO} BINARY=64 >> ${WRKSRC}/Makefile.rule
+.endif
+
post-patch-OPENMP-on:
@${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
${WRKSRC}/test/Makefile \
@@ -136,35 +140,7 @@
.endif
benchmark: build
- cd ${WRKSRC} ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
- USE_THREAD=1 ${MAKE_CMD} ${MAKE_ARGS} hpl
- cd ${WRKSRC}/benchmark ; ${SETENV} ${BUILDFLAGS} NUM_THREADS=${MAXTHREADS} \
- USE_THREAD=1 ${BENCHMARK_THREADS_FLAG} ${MAKE_CMD} ${MAKE_ARGS}
-
-post-install:
- cd ${WRKSRC} && \
- ${FIND} . -name 'common*.h' -print | ${XARGS} ${BASENAME} | ${XARGS} -I {} ${MV} {} openblas_{}
- ${MV} ${WRKSRC}/version.h ${WRKSRC}/openblas_version.h
- ${MV} ${WRKSRC}/param.h ${WRKSRC}/openblas_param.h
- ${MV} ${WRKSRC}/cpuid.h ${WRKSRC}/openblas_cpuid.h
- ${MV} ${WRKSRC}/config.h ${WRKSRC}/openblas_config.h
- ${REINPLACE_CMD} \
- -e 's/"common.h"/"openblas_common.h"/' \
- -e 's/"version.h"/"openblas_version.h"/' \
- -e 's/"param.h"/"openblas_param.h"/' \
- -e 's/"cpuid.h"/"openblas_cpuid.h"/' \
- -e 's/"config.h"/"openblas_config.h"/' \
- -e 's/"common_/"openblas_common_/' \
- ${WRKSRC}/*.h \
- ${WRKSRC}/*.c \
- ${WRKSRC}/interface/*.c
- ${MKDIR} ${STAGEDIR}${PREFIX}/include/openblas
- ${INSTALL_DATA} ${WRKSRC}/openblas_*.h ${STAGEDIR}${PREFIX}/include/openblas
- ${INSTALL_DATA} ${WRKSRC}/cblas.h ${WRKSRC}/config_last.h ${WRKSRC}/l1param.h ${WRKSRC}/l2param.h ${WRKSRC}/symcopy.h \
- ${STAGEDIR}${PREFIX}/include/openblas
- ${MV} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}_*-r${PORTVERSION}.a ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.a
- ${MV} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}_*-r${PORTVERSION}.so ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.${OPENBLAS_SVER}
- ${RM} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so
- ${LN} -sf lib${PORTNAME}.so.${OPENBLAS_SVER} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so
+ cd ${WRKSRC} ; ${SETENV} ${MAKE_CMD} ${MAKE_ARGS} hpl
+ cd ${WRKSRC}/benchmark ; ${SETENV} ${BENCHMARK_THREADS_FLAG} ${MAKE_CMD} ${MAKE_ARGS}
.include <bsd.port.post.mk>
Index: math/openblas/pkg-plist
===================================================================
--- math/openblas/pkg-plist
+++ math/openblas/pkg-plist
@@ -4,49 +4,11 @@
include/lapacke_config.h
include/lapacke_mangling.h
include/lapacke_utils.h
-include/openblas/cblas.h
-include/openblas/config_last.h
-include/openblas/l1param.h
-include/openblas/l2param.h
-include/openblas/openblas_common.h
-include/openblas/openblas_common_alpha.h
-include/openblas/openblas_common_arm.h
-include/openblas/openblas_common_arm64.h
-include/openblas/openblas_common_c.h
-include/openblas/openblas_common_d.h
-include/openblas/openblas_common_ia64.h
-include/openblas/openblas_common_interface.h
-include/openblas/openblas_common_lapack.h
-include/openblas/openblas_common_level1.h
-include/openblas/openblas_common_level2.h
-include/openblas/openblas_common_level3.h
-include/openblas/openblas_common_linux.h
-include/openblas/openblas_common_macro.h
-include/openblas/openblas_common_mips.h
-include/openblas/openblas_common_mips64.h
-include/openblas/openblas_common_param.h
-include/openblas/openblas_common_power.h
-include/openblas/openblas_common_q.h
-include/openblas/openblas_common_reference.h
-include/openblas/openblas_common_s.h
-include/openblas/openblas_common_sparc.h
-include/openblas/openblas_common_stackalloc.h
-include/openblas/openblas_common_thread.h
-include/openblas/openblas_common_x.h
-include/openblas/openblas_common_x86.h
-include/openblas/openblas_common_x86_64.h
-include/openblas/openblas_common_z.h
-include/openblas/openblas_common_zarch.h
-include/openblas/openblas_config.h
-include/openblas/openblas_cpuid.h
-include/openblas/openblas_config_template.h
-include/openblas/openblas_param.h
-include/openblas/openblas_version.h
-include/openblas/symcopy.h
include/openblas_config.h
lib/cmake/openblas/OpenBLASConfig.cmake
lib/cmake/openblas/OpenBLASConfigVersion.cmake
lib/libopenblas.a
lib/libopenblas.so
-lib/libopenblas.so.0
+lib/libopenblasp-r%%PORTVERSION%%.a
+lib/libopenblasp-r%%PORTVERSION%%.so
libdata/pkgconfig/openblas.pc
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 16, 9:10 PM (18 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40913675
Default Alt Text
D23412.id67451.diff (6 KB)
Attached To
Mode
D23412: Fix math/openblas build on i386 and DYNAMIC_CORE (prevent local host optimization on build servers)
Attached
Detach File
Event Timeline
Log In to Comment