1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

- Add options to allow user to select whether to depend on X or not

- Fix return status of build shell script to make 'make' happy
Added file(s):
- files/patch-src+bin+help.c
- files/patch-src+lib+plot+x11.c

PR:		ports/100652
Submitted by:	Stanislav Sedov <ssedov@mbsd.msk.ru> (maintainer)
This commit is contained in:
Ion-Mihai Tetcu 2006-07-23 15:09:39 +00:00
parent 5cc280614a
commit db4cc05a02
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=168566
5 changed files with 89 additions and 7 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= jspice3
PORTVERSION= 2.5
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= cad
MASTER_SITES= http://www.wrcad.com/ftp/pub/ \
ftp://ftp.srware.com/pub/
@ -17,12 +17,24 @@ COMMENT= An adaptation of the Berkeley Spice3f4 with superconductivity
CONFLICTS= spice-[0-9]*
OPTIONS= X "Use X window system" on
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_X)
USE_XLIB= yes
.endif
pre-configure:
@${REINPLACE_CMD} -e 's+/usr/local+${PREFIX}+g ; \
s+-O -g+${CFLAGS}+g;' \
${WRKSRC}/conf/unixconf/mkheader.0
.if !defined(WITHOUT_X)
@${REINPLACE_CMD} -e 's+#%%WITH_X%%++g' \
${WRKSRC}/conf/unixconf/mkheader.0
.else
@${ECHO} "#undef HAVE_X11" >> ${WRKSRC}/src/include/spice.h
.endif
do-build:
@(cd ${WRKSRC};${SETENV} ${MAKE_ENV} ${SH} build)
@ -37,4 +49,4 @@ post-install:
${RM} -R ${PREFIX}/lib/jspice3/examples
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1,11 +1,26 @@
--- build.orig Fri Jul 14 23:07:15 2006
+++ build Fri Jul 14 23:07:32 2006
--- build.orig Tue May 1 09:37:12 2001
+++ build Fri Jul 21 06:27:29 2006
@@ -22,7 +22,7 @@
echo '#######################################################################'> conf/mkheader.in
echo '####### Makefile generated by build script ############################'>> conf/mkheader.in
echo VERSION = $version>> conf/mkheader.in
- echo DATE = `/bin/date`>> conf/mkheader.in
+ echo DATE = `/bin/env LANG=C /bin/date`>> conf/mkheader.in
+ echo DATE = `/usr/bin/env LANG=C /bin/date`>> conf/mkheader.in
echo '#######################################################################'>> conf/mkheader.in
cat conf/unixconf/mkheader.0 >> conf/mkheader.in
else
@@ -92,8 +92,14 @@
fi
echo Creating makefiles in the subdirectories...
$makeprog make
+ if [ $? -ne 0 ]; then
+ exit $?
+ fi
echo ...done
$makeprog all 2> ../../errs
+ if [ $? -ne 0 ]; then
+ exit $?
+ fi
echo done
echo Check the errs file for any problems.
echo To finish the installation, cd to src/bin, become root, and type

View File

@ -1,5 +1,5 @@
--- conf/unixconf/mkheader.0.orig Tue Feb 28 16:30:32 2006
+++ conf/unixconf/mkheader.0 Tue Feb 28 16:36:32 2006
--- conf/unixconf/mkheader.0.orig Tue Jan 15 19:15:36 2002
+++ conf/unixconf/mkheader.0 Fri Jul 21 06:11:55 2006
@@ -18,7 +18,7 @@
BUG_ADDR = stevew@srware.com
@ -9,3 +9,11 @@
# spice daemon log file
SPICED_LOG = /tmp/spiced.log
@@ -43,6 +43,6 @@
LDFLAGS = @LIBS@
RANLIB = @RANLIB@
INCX = @X_CFLAGS@
-LIBX = @X_PRE_LIBS@ @X_LIBS@ -lXaw -lXt -lXext -lXmu -lX11 @X_EXTRA_LIBS@
+#%%WITH_X%%LIBX = @X_PRE_LIBS@ @X_LIBS@ -lXaw -lXt -lXext -lXmu -lX11 @X_EXTRA_LIBS@
INTERFACE_OPTS = -DWANT_MFB -DWANT_X11
MFB = mfb

View File

@ -0,0 +1,27 @@
--- src/bin/help.c.orig Fri Jul 21 06:16:08 2006
+++ src/bin/help.c Fri Jul 21 06:18:15 2006
@@ -14,6 +14,7 @@
#include <pwd.h>
#endif
+static char *hcopydev;
#ifdef HAVE_X11
#include <X11/Intrinsic.h>
@@ -22,7 +23,6 @@
Display *Xdisplay;
static XtAppContext app_con;
static Widget toplevel;
-static char *hcopydev;
static String fallback_resources[] = {
@@ -188,7 +188,7 @@
{
if (!strcmp(n, kw_hcopydev)) {
strcpy(r, hcopydev);
- return (True);
+ return (1);
}
return (false);
}

View File

@ -0,0 +1,20 @@
--- src/lib/plot/x11.c.orig Thu Sep 2 21:43:35 2004
+++ src/lib/plot/x11.c Fri Jul 21 06:06:00 2006
@@ -2205,7 +2205,7 @@
void
com_setrdb(wl)
-wordlist *wl;
+void *wl;
{
/* be silent */
}
@@ -2213,7 +2213,7 @@
int
PopUpErrMessage(fp)
-File *fp;
+void *fp;
{
return (0);
}