aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2006-01-26 03:46:56 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2006-01-26 03:46:56 +0000
commited4503f6d7afa8bfe94075dbc9fb5d0687a8469b (patch)
treeac1641f1e27c47d10c6f0006196cb53f8ab75c35 /misc
parentd1d5fd15064761a37939d96f4dc09b7805915e3e (diff)
downloadports-ed4503f6d7afa8bfe94075dbc9fb5d0687a8469b.tar.gz
ports-ed4503f6d7afa8bfe94075dbc9fb5d0687a8469b.zip
Handle WITHOUT_X11 option
Use REINPLACE_CMD
Notes
Notes: svn path=/head/; revision=154467
Diffstat (limited to 'misc')
-rw-r--r--misc/astrolog/Makefile13
-rw-r--r--misc/astrolog/files/patch-aa39
-rw-r--r--misc/astrolog/files/patch-ab29
3 files changed, 51 insertions, 30 deletions
diff --git a/misc/astrolog/Makefile b/misc/astrolog/Makefile
index 567925f13a8f..0618d0e49cd3 100644
--- a/misc/astrolog/Makefile
+++ b/misc/astrolog/Makefile
@@ -10,7 +10,7 @@
PORTNAME= astrolog
PORTVERSION= 5.40
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= misc
MASTER_SITES= http://www.astrolog.org/ftp/ephem/ \
http://www.astrolog.org/ftp/ \
@@ -22,8 +22,11 @@ DISTFILES= ${EXTRACT_ONLY} ${EPHEM}
MAINTAINER= ache@FreeBSD.org
COMMENT= An astrology program for X11 and alpha-numeric terminals
-USE_PERL5_BUILD=yes
+USE_REINPLACE= yes
+.if !defined(WITHOUT_X11)
USE_XLIB= yes
+MAKE_ARGS= -DX11
+.endif
EXTRACT_CMD= ${SH}
EXTRACT_BEFORE_ARGS= # empty
EXTRACT_AFTER_ARGS= # empty
@@ -31,9 +34,9 @@ DIST_SUBDIR= astrolog
ALL_TARGET= astrolog
NO_WRKSUBDIR= yes
-pre-patch:
- @${PERL} -pi.orig -e "s@malloc.h@stdlib.h@g" \
- ${WRKSRC}/astrolog.h ${WRKSRC}/placalc.h
+post-patch:
+ @${REINPLACE_CMD} -e "s@malloc.h@stdlib.h@g" \
+ ${WRKSRC}/astrolog.h ${WRKSRC}/placalc.h
do-install:
-@${MKDIR} ${PREFIX}/lib/astrolog
diff --git a/misc/astrolog/files/patch-aa b/misc/astrolog/files/patch-aa
index 4af7e5601af5..292bf68515ce 100644
--- a/misc/astrolog/files/patch-aa
+++ b/misc/astrolog/files/patch-aa
@@ -1,21 +1,18 @@
-*** makefile.unx.bak Sun Sep 29 23:27:00 1996
---- Makefile Tue Jan 14 01:06:55 1997
-***************
-*** 23,30 ****
- charts0.o charts1.o charts2.o charts3.o intrpret.o\
- xdata.o xgeneral.o xdevice.o xcharts0.o xcharts1.o xcharts2.o xscreen.o
- # If you don't have X windows, delete the "-lX11" part from the line below:
-! LIBS = -lm -lX11
-! CFLAGS = -O
-
- astrolog:: $(OBJ)
- cc -o $(NAME) $(OBJ) $(LIBS)
---- 23,30 ----
- charts0.o charts1.o charts2.o charts3.o intrpret.o\
- xdata.o xgeneral.o xdevice.o xcharts0.o xcharts1.o xcharts2.o xscreen.o
- # If you don't have X windows, delete the "-lX11" part from the line below:
-! LIBS = -L${X11BASE}/lib -lX11 -lm
-! CFLAGS += -I${X11BASE}/include -DDEFAULT_DIR=\"${PREFIX}/lib/astrolog\"
-
- astrolog:: $(OBJ)
- cc -o $(NAME) $(OBJ) $(LIBS)
+--- Makefile.orig Wed Dec 23 23:29:57 1998
++++ Makefile Thu Jan 26 06:18:04 2006
+@@ -23,8 +23,13 @@
+ charts0.o charts1.o charts2.o charts3.o intrpret.o\
+ xdata.o xgeneral.o xdevice.o xcharts0.o xcharts1.o xcharts2.o xscreen.o
+ # If you don't have X windows, delete the "-lX11" part from the line below:
+-LIBS = -lm -lX11
+-CFLAGS = -O
++.if defined(X11)
++LIBS = -L${X11BASE}/lib -lX11 -lm
++CFLAGS += -DX11 -I${X11BASE}/include -DDEFAULT_DIR=\"${PREFIX}/lib/astrolog\"
++.else
++LIBS = -lm
++CFLAGS += -DDEFAULT_DIR=\"${PREFIX}/lib/astrolog\"
++.endif
+
+ astrolog:: $(OBJ)
+ cc -o $(NAME) $(OBJ) $(LIBS)
diff --git a/misc/astrolog/files/patch-ab b/misc/astrolog/files/patch-ab
index 47aa54291c93..adc639f16d4e 100644
--- a/misc/astrolog/files/patch-ab
+++ b/misc/astrolog/files/patch-ab
@@ -1,6 +1,27 @@
---- astrolog.h.orig Wed Dec 23 23:29:51 1998
-+++ astrolog.h Sat Apr 3 05:41:04 1999
-@@ -86,7 +86,7 @@
+--- astrolog.h.orig Thu Jan 26 06:19:59 2006
++++ astrolog.h Thu Jan 26 06:24:50 2006
+@@ -52,7 +52,7 @@
+
+ /*#define MAC /* Comment out this #define if you're not compiling for a Mac. */
+
+-#define X11 /* Comment out this #define if you don't have X windows, or */
++/*#define X11 /* Comment out this #define if you don't have X windows, or */
+ /* else have them and don't wish to compile in X graphics. */
+
+ /*#define WIN /* Comment out this #define if you don't have MS Windows, or */
+@@ -69,9 +69,11 @@
+ /*#define MACG /* Comment out this #define if you don't have a Mac, or else */
+ /* have one and don't wish to compile in Mac screen graphics. */
+
++#if defined(X11) || defined(WIN) || defined(MSG) || defined(BGI) || defined(MACG)
+ #define MOUSE /* Comment out this #define if you don't have a mouse, or */
+ /* don't wish to compile in mouse tracking features. This is */
+ /* only valid if X11, WIN, MSG, BGI, or MACG above are set. */
++#endif
+
+ #define TIME /* Comment out this #define if your compiler can't take the */
+ /* calls to the 'time' or 'localtime' functions as in time.h */
+@@ -86,7 +88,7 @@
/* 'atof' and related functions aren't defined in stdio.h, */
/* such as most PC's, Linux, VMS compilers, and NeXT's. */
@@ -9,7 +30,7 @@
/* which doesn't allow full Ansi function prototypes. This */
/* is for programmers only and has no effect on executable. */
-@@ -131,7 +131,9 @@
+@@ -131,7 +133,9 @@
*/
#ifndef PC