summaryrefslogtreecommitdiffstats
path: root/cad
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2007-02-17 22:54:03 +0000
committerthierry <thierry@FreeBSD.org>2007-02-17 22:54:03 +0000
commit1a2ab5138583a68f33d619ccdfa1c7134db578a7 (patch)
treed95b46b6ed0a363fd8173cd3af9839aaaab978e1 /cad
parent78fe0c00af5f1492b13d8cc49cada846844f0e58 (diff)
downloadFreeBSD-ports-1a2ab5138583a68f33d619ccdfa1c7134db578a7.zip
FreeBSD-ports-1a2ab5138583a68f33d619ccdfa1c7134db578a7.tar.gz
Trap an exception and set a default fqn when gethostbyaddr fails with
'hostname nor servname provided, or not known', thus hopefully fix the build of french/aster, which calls astk-serveur during its post-config. Reported by: pointyhat via Kris
Diffstat (limited to 'cad')
-rw-r--r--cad/astk-serveur/Makefile14
-rw-r--r--cad/astk-serveur/files/patch-lib__as_system.py16
2 files changed, 21 insertions, 9 deletions
diff --git a/cad/astk-serveur/Makefile b/cad/astk-serveur/Makefile
index 7673e4b..e225a53 100644
--- a/cad/astk-serveur/Makefile
+++ b/cad/astk-serveur/Makefile
@@ -58,6 +58,8 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}/ASTK_SERV
PATCHDIR= ${MASTERDIR}/files
PLIST_SUB= ASTKDIR=${LINSTDIR}/ASTK_SERV SERV="" CLIENT="@comment " \
vaster=${vaster}
+PATCH2RM= conf/config bin/as_exec bin/as_serv lib/as_config.py \
+ lib/as_exec.py conf/aster_profile.sh lib/as_system.py
.else
RUN_DEPENDS+= xterm:${PORTSDIR}/x11/xterm \
wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${SHORT_TK_VER}
@@ -65,6 +67,7 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}/ASTK_CLIENT
PATCHDIR= ${MASTERDIR}/files.client
PLIST_SUB= ASTKDIR=${LINSTDIR}/ASTK_CLIENT SERV="@comment " CLIENT="" vaster="" \
BWidget_DIR=${LINSTDIR}/ASTK_CLIENT/share/BWidget-${BWidget_VER}
+PATCH2RM= lib/ASTK/init.tcl lib/ASTK/astkrc/outils share/tkselecteur.tcl
.endif
FILESDIR= ${PATCHDIR}
@@ -140,15 +143,8 @@ ASTK_LANG= FR
ASTK_LANG= ENG
.endif
-post-patch:
-.if !defined(CLIENT_SEUL)
- @${RM} ${WRKSRC}/conf/config.orig ${WRKSRC}/bin/as_exec.orig \
- ${WRKSRC}/bin/as_serv.orig ${WRKSRC}/lib/as_config.py.orig \
- ${WRKSRC}/lib/as_exec.py.orig ${WRKSRC}/conf/aster_profile.sh.orig
-.else
- @${RM} ${WRKSRC}/lib/ASTK/init.tcl.orig ${WRKSRC}/lib/ASTK/astkrc/outils.orig \
- ${WRKSRC}/share/tkselecteur.tcl.orig
-.endif
+pre-configure:
+ ${RM} ${PATCH2RM:C|^|${WRKSRC}/|:C|$|.orig|}
do-configure:
.if !defined(CLIENT_SEUL)
diff --git a/cad/astk-serveur/files/patch-lib__as_system.py b/cad/astk-serveur/files/patch-lib__as_system.py
new file mode 100644
index 0000000..76ada1e
--- /dev/null
+++ b/cad/astk-serveur/files/patch-lib__as_system.py
@@ -0,0 +1,16 @@
+--- lib/as_system.py.orig Tue Dec 19 16:55:44 2006
++++ lib/as_system.py Sat Feb 17 23:15:15 2007
+@@ -672,7 +672,12 @@
+ from socket import gethostname, gethostbyaddr
+ if host == None:
+ host = gethostname()
+- fqn, alias, ip = gethostbyaddr(host)
++ """ Fix for package building on the FreeBSD cluster which has no hostname
++ """
++ try:
++ fqn, alias, ip = gethostbyaddr(host)
++ except:
++ fqn='put-your-host-name.here'
+ if fqn.find('localhost')>-1:
+ alias = [a for a in alias if a.find('localhost')<0]
+ if len(alias)>0:
OpenPOWER on IntegriCloud