ports/143878: Fix for port cad/salome (incorrect use of bsd.autotools.mk )
Stas Timokhin
devel at stasyan.com
Sat Feb 13 18:00:20 UTC 2010
>Number: 143878
>Category: ports
>Synopsis: Fix for port cad/salome (incorrect use of bsd.autotools.mk )
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sat Feb 13 18:00:13 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Stas Timokhin
>Release: 9.0-current
>Organization:
None
>Environment:
>Description:
Bulding cad/salome-kernel fails at start with error:
autoconf-2.62: no input file
>How-To-Repeat:
cd /usr/ports/cad/salome && make install
>Fix:
Patch in attachement make "canonical" use of bsd.autotools.mk insted of calling script build_configure.sh.
Patch attached with submission follows:
--- Makefile.ext.orig 2010-02-13 15:22:22.000000000 +0600
+++ Makefile.ext 2010-02-13 23:05:40.000000000 +0600
@@ -4,7 +4,6 @@
USE_GMAKE= yes
USE_LDCONFIG= yes
SAL_MODULE= ${PKGNAMESUFFIX:S/-//}
-#.if ${SAL_MODULE} == "med" || ${SAL_MODULE} == "smesh" || ${SAL_MODULE} == "visu" || ${SAL_MODULE} == "sierpinsky" || ${SAL_MODULE} == "multipr"
.if !${SAL_MODULE} == "gui"
USE_FORTRAN=yes
USE_GCC= 4.4
@@ -37,9 +36,8 @@
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --enable-debug
CONFIGURE_ENV+= MACHINE=${OPSYS:U}
-#CXXFLAGS+= -L${LOCALBASE}/lib -I/usr/include -I${LOCALBASE}/include -D__freebsd__ -DFREEBSD -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHAVE_IOMANIP -DMPICH_IGNORE_CXX_SEEK
CPPFLAGS+= -L${LOCALBASE}/lib -I/usr/include -I${LOCALBASE}/include -D__freebsd__ -DFREEBSD -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHAVE_IOMANIP -DMPICH_IGNORE_CXX_SEEK
-CXXFLAGS+= -ffriend-injection -fno-inline -fpermissive -L${LOCALBASE}/lib -L${LOCALBASE}/lib/salome
+CXXFLAGS+= -ffriend-injection -fno-inline -fpermissive -fPIC -L${LOCALBASE}/lib -L${LOCALBASE}/lib/salome
CONFIGURE_SCRIPT= ../configure
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}/${SAL_MODULE_UPPER}_SRC_${RELEASENAME}
WRKSRC= ${PATCH_WRKSRC}
@@ -53,6 +51,7 @@
.if !${SAL_MODULE} == "kernel"
.for D in ${${SAL_MODULE_UPPER}_DEPEND}
CONFIGURE_ENV+= ${D}_ROOT_DIR=${LOCALBASE}
+ AUTOTOOLS_ENV+= ${D}_ROOT_DIR=${LOCALBASE}
CPPFLAGS+= -L${LOCALBASE}/lib/salome
.endfor
.endif
@@ -74,6 +73,7 @@
.if ${SAL_MODULE} == "smesh" || ${SAL_MODULE} == "sierpinsky" || ${SAL_MODULE} == "multipr" || ${SAL_MODULE} == "visu"
BUILD_DEPENDS+= ${RESOURCEDIR}/med:${PORTSDIR}/cad/salome-med
RUN_DEPENDS+= ${RESOURCEDIR}/med:${PORTSDIR}/cad/salome-med
+AUTOTOOLS_ENV+= MED2HOME=${LOCALBASE}
.endif
#Depndency from GEOM module
@@ -95,12 +95,29 @@
#Dependency from other ports
###########################################################################
#Dependency from autotools
-USE_AUTOTOOLS= autoconf:262 automake:15 libtool:22
+USE_AUTOTOOLS= autoconf:262 automake:15 libtool:22 aclocal:19
+.if ${SAL_MODULE} == "kernel"
+ ACLOCAL_ARGS= -I salome_adm/unix/config_files
+.else
+. if ${SAL_MODULE} == "yacs"
+ ACLOCAL_ARGS= -I adm/unix/config_files
+ USE_AUTOTOOLS+= autoheader:262
+ AUTOHEADER_ARGS= -I adm/unix/config_files
+. else
+ ACLOCAL_ARGS= -I adm_local/unix/config_files -I ${LOCALBASE}/salome_adm/unix/config_files
+. if ${SAL_MODULE} != "gui"
+ ACLOCAL_ARGS+= -I ${LOCALBASE}/adm_local/unix/config_files
+. endif
+. endif
+.endif
+LIBTOOLFLAGS=--force --copy --automake
+AUTOMAKE_ARGS=--add-missing --copy --gnu
#Dependency from HDF5
.if !${SAL_MODULE} == "randomizer" && !${SAL_MODULE} == "yacs" && !${SAL_MODULE} == "hello" && !${SAL_MODULE} == "pyhello"
LIB_DEPENDS+= hdf5.0:${PORTSDIR}/science/hdf5
CONFIGURE_ARGS+= --with-hdf5=${LOCALBASE}
+AUTOTOOLS_ENV+= HDF5HOME=${LOCALBASE}
.endif
#Dependency from Opencascade
@@ -108,6 +125,7 @@
LIB_DEPENDS+= TKernel.0:${PORTSDIR}/cad/opencascade
CASROOT= ${LOCALBASE}/OpenCAS/ros
CONFIGURE_ENV+= CASROOT=${CASROOT}
+AUTOTOOLS_ENV+= CASROOT=${CASROOT}
#CXXFLAGS+= -I${CASROOT}/inc
.endif
@@ -141,6 +159,7 @@
CONFIGURE_ENV+= QTDIR=${LOCALBASE}
QTFLAGS+= -I${LOCALBASE}/include/qt4 -L${LOCALBASE}/lib/qt4
QT_COMPONENTS= gui opengl svg xml qmake_build moc_build rcc_build uic_build linguist
+AUTOTOOLS_ENV+= QTDIR=${LOCALBASE}
.endif
#Dependency from qscintilla2
@@ -162,6 +181,7 @@
#CONFIGURE_ENV+= QWTHOME=${LOCALBASE}
CONFIGURE_ARGS+= --with-qwt=${LOCALBASE}
CPPFLAGS+= -I/${LOCALBASE}/include/qwt/
+AUTOTOOLS_ENV+= QWTHOME=${LOCALBASE}
.endif
#Dependency from omniORB & py-omniorb
@@ -169,6 +189,7 @@
LIB_DEPENDS+= omniORB4.1:${PORTSDIR}/devel/omniORB
RUN_DEPENDS+= ${LOCALBASE}/include/omniORBpy.h:${PORTSDIR}/devel/py-omniorb
RUN_DEPENDS+= notifd:${PORTSDIR}/devel/omniNotify
+AUTOTOOLS_ENV+= OMNIORBDIR=${LOCALBASE}
.endif
#Dependency from sip
@@ -228,6 +249,7 @@
.endif
.endif
+#optionally dependency from mpich2
.if ${SAL_MODULE} == "kernel" || ${SAL_MODULE} == "med"
.if defined(WITH_MPI)
BUILD_DEPENDS+= ${LOCALBASE}/mpich2/bin/mpicc:${PORTSDIR}/net/mpich2
@@ -253,6 +275,11 @@
. endif
.endif
+.if ${SAL_MODULE} == "yacs"
+ post-patch:
+ ${CP} ${WRKSRC}/configure.in.base ${WRKSRC}/configure.in
+.endif
+
.if ${SAL_MODULE} == "kernel"
pre-patch:
${MKDIR} ${WRKSRC}/src/Communication/rpc
@@ -260,32 +287,43 @@
${REINPLACE_CMD} 's|__rpc_xdr|XDR|g' ${WRKSRC}/src/Communication/rpc/xdr.h
.endif
+MMDEPENDS=${SAL_MODULE_UPPER}_DEPEND
+AUTOTOOLS_ENV+= ${SAL_MODULE_UPPER}_ROOT_DIR=${PREFIX}
+
+.for D in ${MMDEPENDS}
+ AUTOTOOLS_ENV+=${D}_ROOT_DIR=${LOCALBASE}
+.endfor
+
+run-autotools-aclocal:
+ echo "Start of aclocal"
+ @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \
+ ${ACLOCAL_ARGS})
+ echo "End of aclocal"
+
+run-autotools-autoconf:
+ echo "Start of autoconf"
+ @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \
+ ${AUTOCONF_ARGS})
+ echo "End of autotools"
+
+run-autotools-automake:
+ echo "Start of automake"
+ @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE} \
+ ${AUTOMAKE_ARGS})
+ echo "End of automake"
+
+.if ${SAL_MODULE} == "yacs"
+run-autotools-autoheader:
+ echo "Start of autoheader"
+ @(cd ${PATCH_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER} \
+ ${AUTOHEADER_ARGS})
+ echo "End of autoheader"
+.endif
+
+patch-autotools:
+ @(cd ${PATCH_WRKSRC}; ${LIBTOOLIZE} --force;)
- pre-configure:
-# SAL_MODULE_UPPER=`${ECHO} ${SAL_MODULE} | ${AWK} '{ print(toupper($1)); }'`; \
- MMDEPENDS="${${SAL_MODULE_UPPER}_DEPEND}"; \
- for D in $${MMDEPENDS}; do \
- export "$$D"_ROOT_DIR=${LOCALBASE}; \
- if test "$$D"="MED2"; then \
- export MED2HOME=${LOCALBASE}; \
- fi; \
- if test "$$D"="QWT"; then \
- export QWTHOME=${LOCALBASE}; \
- fi; \
- if test "$$D"="HDF5HOME"; then \
- export HDF5HOME=${LOCALBASE}; \
- fi; \
- if test "$$D"="CASROOT"; then \
- export CASROOT=${CASROOT}; \
- fi; \
- if test "$$D"="QT"; then \
- export QTDIR=${LOCALBASE}; \
- fi; \
- if test "$$D"="OMNIORB"; then \
- export OMNIORBDIR=${LOCALBASE}; \
- fi; \
- echo "$$D"_ROOT_DIR; \
- done; \
- MACHINE=${OPSYS:U}; export MACHINE; set ${SAL_MODULE_UPPER}_ROOT_DIR ${PREFIX}; export ${SAL_MODULE_UPPER}_ROOT_DIR; cd ${WRKSRC}; ${MKDIR} ${BUILD_WRKSRC}; ${SH} ./build_configure
+pre-configure:
+ ${MKDIR} ${BUILD_WRKSRC}
.include <bsd.port.post.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list