mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
GTK app which queries a dictionary server and returns a word definition.
Based on dict. PR: 12694 Submitted by: domi@saargate.de
This commit is contained in:
parent
8602d898ba
commit
a30e573225
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=20312
8 changed files with 96 additions and 0 deletions
21
textproc/gdict/Makefile
Normal file
21
textproc/gdict/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# New ports collection makefile for: gdict
|
||||||
|
# Version required: 0.7
|
||||||
|
# Date created: Sun Jul 18 1999
|
||||||
|
# Whom: domi@saargate.de
|
||||||
|
#
|
||||||
|
# $Id: Makefile,v 1.1.1.1 1999/06/09 01:54:51 steve Exp $
|
||||||
|
#
|
||||||
|
|
||||||
|
DISTNAME= gdict-0.7
|
||||||
|
CATEGORIES= textproc
|
||||||
|
MASTER_SITES= http://www.psilord.com/code/gdict/
|
||||||
|
|
||||||
|
MAINTAINER= domi@saargate.de
|
||||||
|
|
||||||
|
LIB_DEPENDS= gtk12.2:${PORTSDIR}/x11-toolkits/gtk12
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/gdict ${PREFIX}/bin
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/dict ${PREFIX}/bin
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
1
textproc/gdict/distinfo
Normal file
1
textproc/gdict/distinfo
Normal file
|
@ -0,0 +1 @@
|
||||||
|
MD5 (gdict-0.7.tar.gz) = ef81d5142345dc2b0b9af662a0cc3cc0
|
14
textproc/gdict/files/patch-aa
Normal file
14
textproc/gdict/files/patch-aa
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--- Makefile Mon Mar 29 08:02:27 1999
|
||||||
|
+++ Makefile~ Thu Jul 22 22:25:09 1999
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
# Makefile for gdict
|
||||||
|
|
||||||
|
-CC = gcc
|
||||||
|
-CFLAGS = -O6 -Wall
|
||||||
|
-CFL_GTK = $(CFLAGS) `gtk-config --cflags` `gtk-config --libs`
|
||||||
|
+CC ?= gcc
|
||||||
|
+CFLAGS ?= -O6 -Wall
|
||||||
|
+CFL_GTK = $(CFLAGS) `gtk12-config --cflags` `gtk12-config --libs`
|
||||||
|
CFL = $(CFLAGS)
|
||||||
|
OBJECTS_GDICT = gdict.c
|
||||||
|
OBJECTS_DICT = dict.c
|
25
textproc/gdict/files/patch-ab
Normal file
25
textproc/gdict/files/patch-ab
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
--- dict.c Mon Mar 29 08:10:35 1999
|
||||||
|
+++ dict.c~ Thu Jul 22 22:25:16 1999
|
||||||
|
@@ -4,11 +4,12 @@
|
||||||
|
* Thanks goes out to #linuxos also. :)
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <sys/types.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
-#include <arpa/inet.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
+#include <arpa/inet.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int main (int argc, char *argv[]) {
|
||||||
|
@@ -40,7 +41,7 @@
|
||||||
|
Sockaddr.sin_port = htons(2627);
|
||||||
|
Sockaddr.sin_addr.s_addr = inet_addr("128.52.39.7");
|
||||||
|
|
||||||
|
- err = connect (sd, &Sockaddr, sizeof(Sockaddr) );
|
||||||
|
+ err = connect (sd, (struct sockaddr *) &Sockaddr, sizeof(Sockaddr) );
|
||||||
|
|
||||||
|
if (err != 0) {
|
||||||
|
printf("Could not connect to dictionary server!\n");
|
26
textproc/gdict/files/patch-ac
Normal file
26
textproc/gdict/files/patch-ac
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
--- gdict.c Mon Mar 29 17:35:54 1999
|
||||||
|
+++ gdict.c~ Thu Jul 22 22:25:19 1999
|
||||||
|
@@ -13,12 +13,13 @@
|
||||||
|
* Window resizing and cleanup by Iain (Nodatadj, EFNet) 23-Mar-1999
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <sys/types.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
-#include <arpa/inet.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
+#include <arpa/inet.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
/* globals */
|
||||||
|
@@ -154,7 +155,7 @@
|
||||||
|
Sockaddr.sin_port = htons(2627);
|
||||||
|
Sockaddr.sin_addr.s_addr = inet_addr ("128.52.39.7");
|
||||||
|
|
||||||
|
- err = connect (sd, &Sockaddr, sizeof(Sockaddr));
|
||||||
|
+ err = connect (sd, (struct sockaddr *) &Sockaddr, sizeof(Sockaddr));
|
||||||
|
|
||||||
|
if (err != 0) {
|
||||||
|
sprintf (buffer, "Could not connect to dictionary server!");
|
1
textproc/gdict/pkg-comment
Normal file
1
textproc/gdict/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Small program that finds definitions of arbitrary (english) words
|
6
textproc/gdict/pkg-descr
Normal file
6
textproc/gdict/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
gdict is a small C/GTK+ program written to find definitions of arbitrary
|
||||||
|
words. It contacts the MIT dictionary server and returns a definition.
|
||||||
|
|
||||||
|
Additionally, there is a CLI version named "dict".
|
||||||
|
|
||||||
|
WWW: http://www.psilord.com/code/
|
2
textproc/gdict/pkg-plist
Normal file
2
textproc/gdict/pkg-plist
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bin/dict
|
||||||
|
bin/gdict
|
Loading…
Add table
Reference in a new issue