aboutsummaryrefslogtreecommitdiff
path: root/french
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2014-05-26 19:20:41 +0000
committerThierry Thomas <thierry@FreeBSD.org>2014-05-26 19:20:41 +0000
commit1c3ad3bd763b4416d6f1951bfedba8bfbfdecee9 (patch)
treef6b2ef99c2c1177d7c18bcf2f1a32c4e1336fea9 /french
parent1c4d588772af4ce701208ac9abf997be4304106f (diff)
downloadports-1c3ad3bd763b4416d6f1951bfedba8bfbfdecee9.tar.gz
ports-1c3ad3bd763b4416d6f1951bfedba8bfbfdecee9.zip
Unbreak and make packageable.
Notes
Notes: svn path=/head/; revision=355433
Diffstat (limited to 'french')
-rw-r--r--french/aster/Makefile18
-rw-r--r--french/aster/files/bibc_utilitai_mempid.c.diff79
-rw-r--r--french/aster/files/patch-as_setup.py41
-rw-r--r--french/aster/pkg-plist5
4 files changed, 119 insertions, 24 deletions
diff --git a/french/aster/Makefile b/french/aster/Makefile
index bccb1ba11302..eb74f26a33f6 100644
--- a/french/aster/Makefile
+++ b/french/aster/Makefile
@@ -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}/Gnuplot:${PORTSDIR}/math/py-gnuplot \
${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 setup.py
.include "${.CURDIR}/../../french/aster/bsd.aster.mk"
.include <bsd.port.pre.mk>
-.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
diff --git a/french/aster/files/bibc_utilitai_mempid.c.diff b/french/aster/files/bibc_utilitai_mempid.c.diff
new file mode 100644
index 000000000000..fbcaea810152
--- /dev/null
+++ b/french/aster/files/bibc_utilitai_mempid.c.diff
@@ -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 <fcntl.h>
++# ifdef __FreeBSD__
++# include <kvm.h>
++# include <sys/param.h>
++# include <sys/sysctl.h>
++# include <sys/user.h>
++# include <err.h>
++# endif
++# include <fcntl.h>
+ #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
diff --git a/french/aster/files/patch-as_setup.py b/french/aster/files/patch-as_setup.py
index aee47c47b94f..9b6ceb40f488 100644
--- a/french/aster/files/patch-as_setup.py
+++ b/french/aster/files/patch-as_setup.py
@@ -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 <sys/types.h>\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
+
#-------------------------------------------------------------------------------
diff --git a/french/aster/pkg-plist b/french/aster/pkg-plist
index f57edbde71b2..91c365e5b7b1 100644
--- a/french/aster/pkg-plist
+++ b/french/aster/pkg-plist
@@ -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