From owner-svn-ports-all@FreeBSD.ORG Mon May 26 19:20:42 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C29736C5; Mon, 26 May 2014 19:20:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AED9D22BD; Mon, 26 May 2014 19:20:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QJKgXZ020466; Mon, 26 May 2014 19:20:42 GMT (envelope-from thierry@svn.freebsd.org) Received: (from thierry@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4QJKfGj020462; Mon, 26 May 2014 19:20:41 GMT (envelope-from thierry@svn.freebsd.org) Message-Id: <201405261920.s4QJKfGj020462@svn.freebsd.org> From: Thierry Thomas Date: Mon, 26 May 2014 19:20:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r355433 - in head/french/aster: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 19:20:42 -0000 Author: thierry Date: Mon May 26 19:20:41 2014 New Revision: 355433 URL: http://svnweb.freebsd.org/changeset/ports/355433 QAT: https://qat.redports.org/buildarchive/r355433/ Log: Unbreak and make packageable. Added: head/french/aster/files/bibc_utilitai_mempid.c.diff (contents, props changed) Modified: head/french/aster/Makefile head/french/aster/files/patch-as_setup.py head/french/aster/pkg-plist Modified: head/french/aster/Makefile ============================================================================== --- head/french/aster/Makefile Mon May 26 19:20:37 2014 (r355432) +++ head/french/aster/Makefile Mon May 26 19:20:41 2014 (r355433) @@ -3,7 +3,7 @@ PORTNAME= aster DISTVERSION= ${ASTER_DISTVERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= french cad MAINTAINER= thierry@FreeBSD.org @@ -43,7 +43,6 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/Gnupl ${SHELL_INSTALL_ASTER}:${PORTSDIR}/shells/${SHIADEP} \ ${LOCALBASE}/aster/ASTK/ASTK_SERV:${PORTSDIR}/cad/astk-serveur -BROKEN= WIP - it builds and runs, but yet some rough edges USES= bison fortran tk USE_PYTHON= 2 # >2.5 and <3.0 HAS_CONFIGURE= yes @@ -67,10 +66,6 @@ INTERACTIVE_SCRIPTS= check_compilers.py .include "${.CURDIR}/../../french/aster/bsd.aster.mk" .include -.if !exists(/compat/linux/proc/) -IGNORE= /compat/linux/proc/ must be mounted to build elements # Fixme -.endif - .if ${ARCH} == "i386" FLAGARCH= -DP_LINUX -DLINUX .else @@ -223,6 +218,7 @@ pre-configure: ${WRKSRC}/products.py ${REINPLACE_CMD} -e "s|'gfortran'|'${FC}'|g;s|'gcc'|'${CC}'|g" \ -e "s|'g++'|'${CXX}'|g" ${WRKSRC}/check_compilers.py + ${REINPLACE_CMD} -e 's|%%FILESDIR%%|${FILESDIR}|' ${WRKSRC}/as_setup.py .for sh in ${BASH2RC} ${REINPLACE_CMD} -e 's|/bin/bash|${SHELL_INSTALL_ASTER}|' ${WRKSRC}/${sh} .endfor @@ -256,7 +252,7 @@ pre-configure: ${ECHO_CMD} "OPT_ENV = 'verbose=True'" >> ${WRKSRC}/setup.cfg ${ECHO_CMD} "HOME_SCOTCH = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg ${ECHO_CMD} "HOME_METIS = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg - ${ECHO_CMD} "INCLUDEDIR = ['${LOCALBASE}/include/metis', ]" \ + ${ECHO_CMD} "INCLUDEDIR = ['${LOCALBASE}/include', '${LOCALBASE}/include/metis', ]"\ >> ${WRKSRC}/setup.cfg ${ECHO_CMD} "HOME_MUMPS = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg .if ${MUMPS_PORT} == "mumps-mpich" @@ -267,7 +263,8 @@ pre-configure: ${ECHO_CMD} "CXX='${CXX}'" >> ${WRKSRC}/setup.cfg ${ECHO_CMD} "LD='${FC}'" >> ${WRKSRC}/setup.cfg ${ECHO_CMD} "F90='${FC}'" >> ${WRKSRC}/setup.cfg - ${ECHO_CMD} "MATHLIB='${lib_math} ${LDFLAGS} -lgfortran -lm'" >> ${WRKSRC}/setup.cfg + ${ECHO_CMD} "MATHLIB='${lib_math} ${LDFLAGS} -lgfortran -lm -lkvm'" \ + >> ${WRKSRC}/setup.cfg ${ECHO_CMD} "OTHERLIB='-Xlinker -export-dynamic -lutil ${PTHREAD_LIBS} -lz'" \ >> ${WRKSRC}/setup.cfg ${ECHO_CMD} "SYSLIB='${PTHREAD_LIBS} -lz'" >> ${WRKSRC}/setup.cfg @@ -369,6 +366,8 @@ post-install: -d ${PREFIX} -f ${inst_dir:S|${PREFIX}/||}) (cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ -d ${PREFIX} -f ${inst_dir:S|${PREFIX}/||}) + ${CP} -p ${STAGEDIR}${inst_dir}/${VE}/bin/aster \ + ${STAGEDIR}${inst_dir}/${VE}/bin/asterd ${STRIP_CMD} ${STAGEDIR}${inst_dir}/${VE}/bin/aster ${SED} -e 's|%%VER%%|${VE}|' < ${FILESDIR}/astout.export \ > ${STAGEDIR}${inst_dir}/${VE}/astout.export @@ -378,6 +377,9 @@ post-install: ${LN} -fs ${LOCALBASE}/bin/${outil} ${STAGEDIR}${tools_dir}/${outil} .endfor .if !defined(WITHOUT_ASTK_CLI) + ${MKDIR} ${STAGEDIR}${PREFIX}/aster/ASTK/ASTK_SERV/etc/codeaster/astkrc + ${LN} -fs ${ASTKDIR}/etc/astkrc/* \ + ${STAGEDIR}${PREFIX}/aster/ASTK/ASTK_SERV/etc/codeaster/astkrc . for outil in astk bsf ${LN} -fs ${ASTKDIR}/bin/${outil} ${STAGEDIR}${tools_dir}/${outil} . endfor Added: head/french/aster/files/bibc_utilitai_mempid.c.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/french/aster/files/bibc_utilitai_mempid.c.diff Mon May 26 19:20:41 2014 (r355433) @@ -0,0 +1,79 @@ +--- bibc/utilitai/mempid.c.orig 2013-12-16 09:25:29.000000000 +0100 ++++ bibc/utilitai/mempid.c 2014-05-20 22:28:25.000000000 +0200 +@@ -19,7 +19,14 @@ + #include "aster.h" + + #ifdef _POSIX +-#include ++# ifdef __FreeBSD__ ++# include ++# include ++# include ++# include ++# include ++# endif ++# include + #endif + + /* +@@ -40,9 +47,48 @@ + pid_t numpro; + #ifdef _POSIX + pid_t getpid(void); +- ++ + numpro = getpid(); + ++# ifdef __FreeBSD__ ++/* ++** FreeBSD and some others without /proc ? ++*/ ++ ++ ++#define B2K(x) ((x) >> 10) /* bytes to kbytes */ ++#define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ ++ ++ char errbuf[_POSIX2_LINE_MAX]; ++ struct kinfo_proc *kp; ++ kvm_t *kd; ++ int count; ++ kd = kvm_openfiles(NULL, "/dev/null", NULL, O_RDONLY, errbuf); ++ if (kd == NULL) ++ errx(1, "kvm_openfiles: %s", errbuf); ++ ++ kp = kvm_getprocs(kd, KERN_PROC_PID, numpro, &count); ++ if (kp == NULL) { ++ (void)fprintf(stderr, "kvm_getprocs: %s", kvm_geterr(kd)); ++ kvm_close(kd); ++ return -1; ++ } ++ ++ kvm_close(kd); ++ ++ /* VmData */ ++ val[0] = P2K((uintmax_t)kp->ki_dsize); ++ /* VmSize */ ++ val[1] = B2K((uintmax_t)kp->ki_size); ++ /* VmPeak - not defined in /compat/linux/proc/pid/status */ ++ val[2] = -1; ++ /* VmRSS */ ++ val[3] = P2K((uintmax_t)kp->ki_rssize); ++ /* VmStk */ ++ lmem = P2K((uintmax_t)kp->ki_ssize); ++ ++# else /* Linux */ ++ + sprintf(filename, "/proc/%ld/status", (long)numpro); + fd = open(filename, O_RDONLY, 0); + if (fd==-1) return -1; +@@ -68,7 +114,10 @@ + + S=strstr(sbuf,"VmStk:")+7; + lmem = atoi(S); ++# endif ++ + return lmem ; ++ + #else + /* + ** Pour retourner des valeurs sous Windows Modified: head/french/aster/files/patch-as_setup.py ============================================================================== --- head/french/aster/files/patch-as_setup.py Mon May 26 19:20:37 2014 (r355432) +++ head/french/aster/files/patch-as_setup.py Mon May 26 19:20:41 2014 (r355433) @@ -1,5 +1,5 @@ --- as_setup.py.orig 2014-03-05 09:41:19.000000000 +0100 -+++ as_setup.py 2014-05-12 19:32:12.000000000 +0200 ++++ as_setup.py 2014-05-24 15:16:48.000000000 +0200 @@ -45,6 +45,8 @@ import compileall import imp @@ -9,7 +9,15 @@ import distutils.sysconfig as SC from subprocess import Popen, PIPE -@@ -516,6 +518,46 @@ +@@ -408,6 +410,7 @@ + archive filename !), + extract_as : rename content. + """ ++ from as_setup import (SYSTEM) + self._print(self._fmt_title % _('Extraction')) + if kargs.get('external')<>None: + self._call_external(**kargs) +@@ -516,6 +519,47 @@ if iextr_as: self.Clean(to_delete=path) @@ -22,6 +30,18 @@ + if nl > 0: + ligne =ligne.replace("self.check_cc", "# self.check_cc") + sys.stdout.write(ligne) ++ file2patch = os.path.join(self.workdir, self.content, 'waftools/scotch.py') ++ self._print('FreeBSD patch: int64_t missing => modify ' + file2patch) ++ for ligne in fileinput.input(file2patch, inplace=1): ++ nl = 0 ++ nl = string.find(ligne, 'include "scotch.h"') ++ if nl > 0: ++ sys.stdout.write("#include \n") ++ nl = 0 ++ nl = string.find(ligne, "stdio.h stdlib.h scotch.h") ++ if nl > 0: ++ ligne =ligne.replace("stdlib.h", "stdlib.h sys/types.h") ++ sys.stdout.write(ligne) + file2patch = os.path.join(self.workdir, self.content, 'bibc/utilitai/hpalloc.c') + self._print('FreeBSD patch: stdlib + no mallopt => modify ' + file2patch) + for ligne in fileinput.input(file2patch, inplace=1): @@ -35,22 +55,11 @@ + if nl > 0: + ligne =ligne.replace("malloc.h", "stdlib.h") + sys.stdout.write(ligne) -+ file2patch = os.path.join(self.workdir, self.content, 'bibfor/wscript') -+ self._print('FreeBSD patch: -O2 (GCC Bug 51267) => modify ' + file2patch) -+ for ligne in fileinput.input(file2patch, inplace=1): -+ nl = 0 -+ nl = string.find(ligne, "-O2") -+ if nl > 0: -+ ligne =ligne.replace("-O2", "-O0") -+ sys.stdout.write(ligne) + file2patch = os.path.join(self.workdir, self.content, 'bibc/utilitai/mempid.c') + self._print('FreeBSD patch: VmData VmSize and VmPeak in /proc/%pid%/status ' + file2patch) -+ for ligne in fileinput.input(file2patch, inplace=1): -+ nl = 0 -+ nl = string.find(ligne, "/proc") -+ if nl > 0: -+ ligne =ligne.replace("/proc", "/compat/linux/proc") -+ sys.stdout.write(ligne) ++ system=SYSTEM({ 'verbose' : True, 'debug' : False }, ++ **{'maxcmdlen' : 2**31, 'log' : self}) ++ iret, out = system.local_shell('cd ' + os.path.join(self.workdir, self.content) + '&& /usr/bin/patch -p0 < ' + '%%FILESDIR%%' + '/bibc_utilitai_mempid.c.diff') + # End of FreeBSD patches + #------------------------------------------------------------------------------- Modified: head/french/aster/pkg-plist ============================================================================== --- head/french/aster/pkg-plist Mon May 26 19:20:37 2014 (r355432) +++ head/french/aster/pkg-plist Mon May 26 19:20:41 2014 (r355433) @@ -1,4 +1,5 @@ aster/%%VE%%/bin/aster +aster/%%VE%%/bin/asterd aster/%%VE%%/include/aster/aster.h aster/%%VE%%/include/aster/aster_core.h aster/%%VE%%/include/aster/aster_depend.h @@ -11648,6 +11649,10 @@ aster/asrun/utils.pyo aster/bin/as_run aster/bin/auto_update.cron aster/bin/parallel_cp +%%ASTK_CLIENT%%aster/ASTK/ASTK_SERV/etc/codeaster/astkrc/ASTKRC_INFO.txt +%%ASTK_CLIENT%%aster/ASTK/ASTK_SERV/etc/codeaster/astkrc/config_serveurs +%%ASTK_CLIENT%%aster/ASTK/ASTK_SERV/etc/codeaster/astkrc/outils +%%ASTK_CLIENT%%aster/ASTK/ASTK_SERV/etc/codeaster/astkrc/prefs %%ASTK_CLIENT%%aster/outils/astk %%ASTK_CLIENT%%aster/outils/bsf %%EFICAS%%aster/outils/eficas