View | Details | Raw Unified | Return to bug 100181
Collapse All | Expand All

(-)/work/src/ports/calctool/Makefile (-6 / +48 lines)
Lines 7-23 Link Here
7
7
8
PORTNAME=	calctool
8
PORTNAME=	calctool
9
PORTVERSION=	2.4.13
9
PORTVERSION=	2.4.13
10
PORTREVISION=	1
10
CATEGORIES=	math
11
CATEGORIES=	math
11
MASTER_SITES=	${MASTER_SITE_LOCAL}
12
MASTER_SITES=	${MASTER_SITE_LOCAL}
12
DISTNAME=	calctool-2.4pl13
13
MASTER_SITE_SUBDIR=	nsayer
13
MASTER_SITE_SUBDIR=	nsayer
14
DISTNAME=	calctool-2.4pl13
14
15
15
MAINTAINER=	ports@FreeBSD.org
16
MAINTAINER=	ssedov@mbsd.msk.ru
16
COMMENT=	A multi-GUI (text, X, xview, NeWS, sunview) calculator program
17
COMMENT=	A multi-GUI (terminal, X) calculator program
18
19
USE_LDCONFIG=	yes
20
OPTIONS=	X11 "Build X11 version of calctool" on \
21
		TTY "Build tty version of calctool" on
17
22
18
USE_X_PREFIX=	yes
19
MAN1=		calctool.1
23
MAN1=		calctool.1
20
24
21
ALL_TARGET=	x11
25
.include <bsd.port.pre.mk>
26
27
.if !defined(WITHOUT_X11)
28
USE_XLIB=	yes
29
BINARIES+=	xcalctool
30
PLIST_SUB+=	X11=""
31
.else
32
PLIST_SUB+=	X11="@comment "
33
.endif
34
35
.if !defined(WITHOUT_TTY)
36
BINARIES+=	tty_calctool
37
PLIST_SUB+=	TTY=""
38
.else
39
PLIST_SUB+=	TTY="@comment "
40
.endif
41
42
.if ${ARCH} == "sparc64"
43
FPIC=	-fPIC
44
.else
45
FPIC=	-fpic
46
.endif
47
48
post-patch:
49
	@${REINPLACE_CMD}	-e "s#%%FPIC%%#${FPIC}#g" \
50
				-e "s#%%X11BASE%%#${X11BASE}#g" \
51
				-e "s#%%BINARIES%%#${BINARIES}#g" \
52
				-e "s#%%DATADIR%%#${DATADIR}#g" \
53
				${WRKSRC}/Makefile
54
55
do-install:
56
	${MKDIR} ${DATADIR}
57
	${INSTALL_PROGRAM} ${WRKSRC}/libcalctool.so.1 ${PREFIX}/lib
58
	@(cd ${PREFIX}/lib; ${LN} -sf libcalctool.so.1 libcalctool.so)
59
.for BIN in ${BINARIES}
60
	${INSTALL_PROGRAM} ${WRKSRC}/${BIN} ${PREFIX}/bin
61
.endfor
62
	${INSTALL_MAN} ${WRKSRC}/calctool.1 ${PREFIX}/man/man1
63
	${INSTALL_DATA} ${WRKSRC}/calctool.help ${DATADIR}
22
64
23
.include <bsd.port.mk>
65
.include <bsd.port.post.mk>
(-)/work/src/ports/calctool/files/patch-ab (-21 / +75 lines)
Lines 1-17 Link Here
1
--- Makefile.orig	Sat May 29 09:35:43 1993
1
--- Makefile.orig	Sat May 29 20:35:43 1993
2
+++ Makefile	Fri Mar  9 10:17:33 2001
2
+++ Makefile	Thu Jul 13 01:33:02 2006
3
@@ -116,8 +116,8 @@
3
@@ -28,7 +28,7 @@
4
 #  It can also be specified here by uncommenting the following
5
 #  macro definition and setting appropriately.
6
 #
7
-HELPNAME        = -DHELPNAME=\"$(LIBDIR)/calctool.help\"
8
+HELPNAME        = -DHELPNAME=\"%%DATADIR%%/calctool.help\"
9
 #-----------------------------------------------------------------------
10
 #  An attempt is now made at using a portable math library. You should
11
 #  carefully setup the following three definitions.
12
@@ -85,13 +85,13 @@
13
 #  uncomment the other three definitions below, commented out the initial
14
 #  two.
15
 #
16
-LIBNAME         = libcalctool.a
17
-CALCLIB	        = $(LIBNAME)
18
+#LIBNAME         = libcalctool.a
19
+#CALCLIB	        = $(LIBNAME)
20
 #
21
 # Shared library definitions. Uncomment if required.
22
-#LIBNAME         = libcalctool.so.1.1
23
-#CALCLIB         = -L. -lcalctool
24
-#SHLIB           = -pic
25
+LIBNAME         = libcalctool.so.1
26
+CALCLIB         = -L . -lcalctool
27
+SHLIB           = %%FPIC%%
28
 #-----------------------------------------------------------------------
29
 #  If you are not running under a BSD4.3 derived system, then the
30
 #  second parameter to a select call is a pointer to an integer function,
31
@@ -116,38 +116,37 @@
4
 #  library files are not in a standard place, then the following
32
 #  library files are not in a standard place, then the following
5
 #  two lines should be uncommented, and set appropriately.
33
 #  two lines should be uncommented, and set appropriately.
6
 #
34
 #
7
-#X11INCDIR         = -I$(OPENWINHOME)/include
35
-#X11INCDIR         = -I$(OPENWINHOME)/include
8
-#X11LIBDIR         = -L$(OPENWINHOME)/lib
36
-#X11LIBDIR         = -L$(OPENWINHOME)/lib
9
+X11INCDIR         = -I${X11BASE}/include
37
+X11INCDIR         = -I%%X11BASE%%/include
10
+X11LIBDIR         = -L${X11BASE}/lib
38
+X11LIBDIR         = -L%%X11BASE%%/lib
11
 #-------------------------------------------------------------------------
39
 #-------------------------------------------------------------------------
12
 #  If you are compiling the XView version, then the following two lines
40
 #  If you are compiling the XView version, then the following two lines
13
 #  should be uncommented.
41
 #  should be uncommented.
14
@@ -130,14 +130,14 @@
42
 #
43
-XVIEWINCDIR      = -I$(OPENWINHOME)/include
44
-XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
45
+#XVIEWINCDIR      = -I$(OPENWINHOME)/include
46
+#XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
47
 #
48
 #=========================================================================
49
 #
15
 #  Default locations where calctool files will be installed.
50
 #  Default locations where calctool files will be installed.
16
 #  You might wish to alter these values.
51
 #  You might wish to alter these values.
17
 #
52
 #
Lines 19-52 Link Here
19
-LIBDIR          = /usr/local/lib
54
-LIBDIR          = /usr/local/lib
20
-MANDIR          = /usr/man/man$(MANSECT)
55
-MANDIR          = /usr/man/man$(MANSECT)
21
-MANSECT         = l
56
-MANSECT         = l
22
+BINDIR          = ${PREFIX}/bin
57
+BINDIR          = $(PREFIX)/bin
23
+LIBDIR          = ${PREFIX}/lib/X11
58
+LIBDIR          = $(PREFIX)/lib
24
+MANDIR          = ${PREFIX}/man/man$(MANSECT)
59
+MANDIR          = $(PREFIX)/man/man$(MANSECT)
25
+MANSECT         = 1
60
+MANSECT         = 1
26
 #
61
 #
27
 #  Compilation flags and standard macro definitions.
62
 #  Compilation flags and standard macro definitions.
28
 #
63
 #
29
-CFLAGS		= -g $(HELPNAME) $(NEWSFILE) $(STUPID_FPE) $(NOIEEE) \
64
-CFLAGS		= -g $(HELPNAME) $(NEWSFILE) $(STUPID_FPE) $(NOIEEE) \
30
+CFLAGS		+= $(HELPNAME) $(NEWSFILE) $(STUPID_FPE) $(NOIEEE) \
65
+CFLAGS		+=   $(HELPNAME) $(NEWSFILE) $(STUPID_FPE) $(NOIEEE) \
31
 		     $(NOINDEX) $(RCNAME) $(SELTYPE) $(SHLIB) $(SIGRET) \
66
 		     $(NOINDEX) $(RCNAME) $(SELTYPE) $(SHLIB) $(SIGRET) \
32
 		     $(SUN4_KEYBOARD) $(TTEXT) $(MGRPARAM) $(MGRINCDIR) \
67
 		     $(SUN4_KEYBOARD) $(TTEXT) $(MGRPARAM) $(MGRINCDIR) \
33
 		     $(X11INCDIR) $(XVIEWINCDIR)
68
 		     $(X11INCDIR) $(XVIEWINCDIR)
34
@@ -147,7 +147,7 @@
69
 #
35
 BINARIES        = mgr_calctool ps_calctool sv_calctool \
70
 #=========================================================================
36
 		  tty_calctool xcalctool xv_calctool
71
 
72
-BINARIES        = mgr_calctool ps_calctool sv_calctool \
73
-		  tty_calctool xcalctool xv_calctool
74
+BINARIES        = %%BINARIES%%
37
 
75
 
38
-CC		= cc
76
-CC		= cc
39
+#CC		= cc
77
+#CC		= cc
40
 
78
 
41
 LIBSRCS         = graphics.c display.c functions.c get.c
79
 LIBSRCS         = graphics.c display.c functions.c get.c
42
 LIBOBJS         = graphics.o display.o functions.o get.o
80
 LIBOBJS         = graphics.o display.o functions.o get.o
43
@@ -233,8 +233,7 @@
81
@@ -208,11 +207,10 @@
44
 			ld -o libcalctool.so.1.1 -assert pure-text $?
82
 		$(CC) -o sv_calctool $(CFLAGS) $(STDOBJS) sunview.o $(SVIEWLIBS)
83
 		-cp sv_calctool calctool
84
 
85
-tty:            $(OBJS) tty.o
86
+tty_calctool:   $(OBJS) tty.o
87
 		$(CC) -o tty_calctool $(CFLAGS) $(STDOBJS) tty.o $(TTYLIBS)
88
-		-cp tty_calctool calctool
89
 
90
-x11:            $(OBJS) x11.o
91
+xcalctool:      $(OBJS) x11.o
92
 		$(CC) -o xcalctool $(X11LIBDIR) $(CFLAGS) $(STDOBJS) x11.o \
93
 				$(X11LIBS)
94
 		-cp xcalctool calctool
95
@@ -229,8 +227,9 @@
96
 #  These are the library creation rules for making the shared calctool
97
 #  library (available with SunOS v4.x).
98
  
99
-libcalctool.so.1.1:     $(LIBOBJS)
100
-			ld -o libcalctool.so.1.1 -assert pure-text $?
101
+libcalctool.so.1:	$(LIBOBJS)
102
+			$(CC) -shared -o ${LIBNAME} $?
103
+			ln -sf ${LIBNAME} libcalctool.so
45
 
104
 
46
 install:
105
 install:
47
-		install -c -m 644 $(LIBNAME) $(LIBDIR)
106
 		install -c -m 644 $(LIBNAME) $(LIBDIR)
48
-		install -s -m 751 calctool $(BINDIR)
49
+		install -c -s -m 751 calctool $(BINDIR)
50
 		install -c -m 644 calctool.help $(LIBDIR)
51
 		install -c -m 644 calctool.ps $(LIBDIR)
52
 		install -c -m 644 calctool.1 $(MANDIR)/calctool.$(MANSECT)
(-)/work/src/ports/calctool/pkg-descr (-3 / +2 lines)
Lines 3-10 Link Here
3
calctool  -  README  -  November 1989.
3
calctool  -  README  -  November 1989.
4
4
5
This is V2.4 of a simple desktop calculator.
5
This is V2.4 of a simple desktop calculator.
6
This version works under SunView, XView, X11, NeWS, MGR and for
6
This version works under X11 and dumb tty terminals.
7
dumb tty terminals.
8
7
9
It is almost visually identical to V2.1 which was released in August
8
It is almost visually identical to V2.1 which was released in August
10
1988, but internally most of the code has been reworked to include a
9
1988, but internally most of the code has been reworked to include a
Lines 20-23 Link Here
20
which can define upto ten new values for constants, and ten function
19
which can define upto ten new values for constants, and ten function
21
definitions which are used in conjunction with the FUN key.
20
definitions which are used in conjunction with the FUN key.
22
21
23
(port maintained by nsayer@quack.kfu.com)
22
(port maintained by ssedov@mbsd.msk.ru)
(-)/work/src/ports/calctool/pkg-plist (-3 / +6 lines)
Lines 1-3 Link Here
1
bin/calctool
1
%%TTY%%bin/tty_calctool
2
lib/X11/calctool.help
2
%%X11%%bin/xcalctool
3
lib/X11/calctool.ps
3
lib/libcalctool.so
4
lib/libcalctool.so.1
5
%%DATADIR%%/calctool.help
6
@dirrm %%DATADIR%%

Return to bug 100181