diff options
author | sf <sf@FreeBSD.org> | 2003-07-14 10:37:49 +0800 |
---|---|---|
committer | sf <sf@FreeBSD.org> | 2003-07-14 10:37:49 +0800 |
commit | ec86ac0b52ca39e73c4ba333276213abdcb416ea (patch) | |
tree | 18b206b22a066e49956718e7db53be30d74d15e7 | |
parent | e4c18f2955f27cbf53bbe698b6182ffe3eb91f30 (diff) | |
download | freebsd-ports-gnome-ec86ac0b52ca39e73c4ba333276213abdcb416ea.tar.gz freebsd-ports-gnome-ec86ac0b52ca39e73c4ba333276213abdcb416ea.tar.zst freebsd-ports-gnome-ec86ac0b52ca39e73c4ba333276213abdcb416ea.zip |
get rid of libgnugetopt dependency for -CURRENT,
use USE_GETOPT_LONG instead.
respect CC, CFLAGS.
use getopt_long() instead of getopt_long_only().
-rw-r--r-- | www/htdump/Makefile | 5 | ||||
-rw-r--r-- | www/htdump/files/patch-aa | 22 | ||||
-rw-r--r-- | www/htdump/files/patch-init.c | 11 | ||||
-rw-r--r-- | www/htdump/files/patch-usage.c | 62 | ||||
-rw-r--r-- | x11/cnslock/Makefile | 6 | ||||
-rw-r--r-- | x11/cnslock/files/patch-Makefile | 12 | ||||
-rw-r--r-- | x11/cnslock/files/patch-cnslock.c | 39 |
7 files changed, 134 insertions, 23 deletions
diff --git a/www/htdump/Makefile b/www/htdump/Makefile index efbb8588e030..ba57f16f3cc4 100644 --- a/www/htdump/Makefile +++ b/www/htdump/Makefile @@ -7,13 +7,16 @@ PORTNAME= htdump PORTVERSION= 0.9x +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://arak.cs.hro.nl/~ren/linux/htdump/bin/ MAINTAINER= mux@FreeBSD.org COMMENT= A tool to retrieve WWW data -LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt +USE_GETOPT_LONG=yes +CFLAGS+= ${CPPFLAGS} +MAKE_ENV= LDFLAGS="${LDFLAGS}" .if defined(WITH_SSL) USE_OPENSSL= yes diff --git a/www/htdump/files/patch-aa b/www/htdump/files/patch-aa index f95abd76ce49..7efabae7b018 100644 --- a/www/htdump/files/patch-aa +++ b/www/htdump/files/patch-aa @@ -1,29 +1,23 @@ ---- Makefile.orig Tue Dec 19 16:26:47 2000 -+++ Makefile Wed Feb 21 00:33:15 2001 -@@ -5,10 +5,11 @@ +--- Makefile.orig Wed Dec 20 00:26:47 2000 ++++ Makefile Sun Jul 6 20:19:19 2003 +@@ -5,10 +5,8 @@ # # -CFLAGS = -O4 -m486 -Wall #-funsigned-char -Wshadow -Wmissing-prototypes -Wmissing-declarations -Winline -+CFLAGS = -O4 -Wall -I${PREFIX}/include #-funsigned-char -Wshadow -Wmissing-prototypes -Wmissing-declarations -Winline PROGS = htdump - LFLAGS = -s #-static - CC = cc -+LDFLAGS += -L${PREFIX}/lib +-LFLAGS = -s #-static +-CC = cc ++LFLAGS = -s ${LDFLAGS} # Nothing should have to change beneath this line -@@ -22,19 +23,19 @@ - - htdump: $(OBJS) socket.o - rm -f htdump -- $(CC) $(LFLAGS) -o htdump $(OBJS) socket.o -+ $(CC) $(LFLAGS) -o htdump $(OBJS) socket.o ${LDFLAGS} -lgnugetopt +@@ -26,15 +24,15 @@ ssl: $(OBJS) socket-ssl.o rm -f htdump - $(CC) $(LFLAGS) -o htdump $(OBJS) socket-ssl.o -lssl -lcrypto -L/usr/local/ssl/lib -+ $(CC) $(LFLAGS) -o htdump $(OBJS) socket-ssl.o ${LDFLAGS} -lssl -lcrypto -lgnugetopt ++ $(CC) $(LFLAGS) -o htdump $(OBJS) socket-ssl.o -lssl -lcrypto -$(OBJS): %.o: %.c $(HDRS) +$(OBJS): $(HDRS) diff --git a/www/htdump/files/patch-init.c b/www/htdump/files/patch-init.c new file mode 100644 index 000000000000..a2d9f214edda --- /dev/null +++ b/www/htdump/files/patch-init.c @@ -0,0 +1,11 @@ +--- init.c.orig Wed Dec 20 00:26:47 2000 ++++ init.c Mon Jul 7 04:39:00 2003 +@@ -121,7 +121,7 @@ + CONFIG.new_argv = CONFIG.argv; + + +-while ((t = getopt_long_only(CONFIG.new_argc ++while ((t = getopt_long(CONFIG.new_argc + ,CONFIG.new_argv + ,"h" + ,long_options diff --git a/www/htdump/files/patch-usage.c b/www/htdump/files/patch-usage.c new file mode 100644 index 000000000000..edf718f1de95 --- /dev/null +++ b/www/htdump/files/patch-usage.c @@ -0,0 +1,62 @@ +--- usage.c.orig Wed Dec 20 00:26:47 2000 ++++ usage.c Mon Jul 7 04:43:54 2003 +@@ -29,24 +29,24 @@ + " OPTIONS\n" + " ===================================\n" + " Main mode of operation:\n" +- " -command=<command> Define request command. Default is 'GET'.\n" +- " -post=<form data> POST form data. When used, command is\n" +- " overriden to 'POST'\n" ++ " --command=<command> Define request command. Default is 'GET'.\n" ++ " --post=<form data> POST form data. When used, command is\n" ++ " overriden to 'POST'\n" + "\n" + " Miscellaneous:\n" +- " -debug=<level> Debug mode, specify level\n" +- " -file=<file> Dump data to file. (Auto-resumes)\n" +- " When omitted, output goes to stdout.\n" ++ " --debug=<level> Debug mode, specify level\n" ++ " --file=<file> Dump data to file. (Auto-resumes)\n" ++ " When omitted, output goes to stdout.\n" + "\n" + " Header adjustment:\n" +- " -accept=<Accept> Add 'Accept:' header\n" +- " -cookie=<Cookie> Add 'Cookie:' header\n" +- " -from=<From> Add 'From:' header\n" +- " -host=<Host> Add 'Host:' header (*)\n" +- " -referer=<Referer> Add 'Referer:' header\n" +- " -range=<Range string> Add 'Range:' header (*)\n" +- " -agent=<Agent string> Add 'User-Agent:' header\n" +- " -version=<0|1|r> Select HTTP version. Default is HTTP/1.1\n" ++ " --accept=<Accept> Add 'Accept:' header\n" ++ " --cookie=<Cookie> Add 'Cookie:' header\n" ++ " --from=<From> Add 'From:' header\n" ++ " --host=<Host> Add 'Host:' header (*)\n" ++ " --referer=<Referer> Add 'Referer:' header\n" ++ " --range=<Range string> Add 'Range:' header (*)\n" ++ " --agent=<Agent string> Add 'User-Agent:' header\n" ++ " --version=<0|1|r> Select HTTP version. Default is HTTP/1.1\n" + "\n" + " (*) = HTTP/1.1 only\n" + " You need version 1.1 to use password authentication\n" +@@ -56,13 +56,13 @@ + " ===================================\n" + " htdump www.netscape.com\n" + " htdump https://flemming:secret@www.jamesbond.com/members/secret.html\n" +- " htdump -host=\"www.vhost1.com\" http://127.0.0.1/\n" +- " htdump -referer=\"www.fbi.gov\" http://www.arpa.mil/secret.zip\n" +- " htdump -version=r -agent=\"Crazy www browser 1.6\" http://bouncy.com/\n" +- " htdump -command=\"OPTIONS\" http://arak.cs.hro.nl/ -debug\n" +- " htdump -file=this.zip download.com/this.zip &\n" +- " htdump http://download.com/big.zip -range=\"644221-\" >> big.zip &\n" +- " htdump -post=\"name=Ren&op1=yes\" here.com/cgi-bin/prog\n" ++ " htdump --host=\"www.vhost1.com\" http://127.0.0.1/\n" ++ " htdump --referer=\"www.fbi.gov\" http://www.arpa.mil/secret.zip\n" ++ " htdump --version=r --agent=\"Crazy www browser 1.6\" http://bouncy.com/\n" ++ " htdump --command=\"OPTIONS\" http://arak.cs.hro.nl/ --debug\n" ++ " htdump --file=this.zip download.com/this.zip &\n" ++ " htdump http://download.com/big.zip --range=\"644221-\" >> big.zip &\n" ++ " htdump --post=\"name=Ren&op1=yes\" here.com/cgi-bin/prog\n" + "\n" + "\n" + " htdump "VERSION"\n" diff --git a/x11/cnslock/Makefile b/x11/cnslock/Makefile index 9e485a17e9b8..8646e68f7954 100644 --- a/x11/cnslock/Makefile +++ b/x11/cnslock/Makefile @@ -7,6 +7,7 @@ PORTNAME= cnslock PORTVERSION= 1.02 +PORTREVISION= 1 CATEGORIES= x11 windowmaker MASTER_SITES= http://www.dockapps.com/download.php/id/181/ \ http://freebsd.nsu.ru/distfiles/ @@ -14,12 +15,13 @@ MASTER_SITES= http://www.dockapps.com/download.php/id/181/ \ MAINTAINER= danfe@regency.nsu.ru COMMENT= A visual indicator of the states of the three "lock" buttons -LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt - +USE_GETOPT_LONG=yes USE_GNOME= gtk12 USE_X_PREFIX= yes USE_XPM= yes +MAKE_ENV= LDFLAGS="${LDFLAGS}" + do-install: @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin diff --git a/x11/cnslock/files/patch-Makefile b/x11/cnslock/files/patch-Makefile index 5b107b39b842..7d00a2814eb4 100644 --- a/x11/cnslock/files/patch-Makefile +++ b/x11/cnslock/files/patch-Makefile @@ -1,16 +1,16 @@ ---- Makefile.orig Thu Apr 10 19:48:41 2003 -+++ Makefile Thu Apr 10 20:03:05 2003 -@@ -2,11 +2,11 @@ +--- Makefile.orig Sun Oct 27 09:34:22 2002 ++++ Makefile Sun Jul 6 20:33:58 2003 +@@ -2,11 +2,10 @@ PREFIX = /usr/local VERSION = 1.02 -CFLAGS = -O3 -Wall `gtk-config --cflags` -DVERSION=$(VERSION) ${EXTRA} -+CFLAGS += `gtk12-config --cflags` -DVERSION=$(VERSION) ${EXTRA} - CC = gcc +-CC = gcc ++CFLAGS += ${CPPFLAGS} `${GTK_CONFIG} --cflags` -DVERSION=$(VERSION) ${EXTRA} OBJS = cnslock.o kleds.o applet.o -LIBS = `gtk-config --libs | sed "s/-lgtk//g"` -+LIBS = `gtk12-config --libs | sed "s/-lgtk12//g"` -lgnugetopt ++LIBS = `${GTK_CONFIG} --libs | sed "s/-lgtk12//g"` ${LDFLAGS} all: cnslock diff --git a/x11/cnslock/files/patch-cnslock.c b/x11/cnslock/files/patch-cnslock.c new file mode 100644 index 000000000000..c1c46c6bde19 --- /dev/null +++ b/x11/cnslock/files/patch-cnslock.c @@ -0,0 +1,39 @@ +--- cnslock.c.orig Sun Oct 27 09:32:56 2002 ++++ cnslock.c Mon Jul 7 04:47:44 2003 +@@ -212,29 +212,26 @@ + int c = 0; + + struct option long_options[] = { +- {"help", no_argument, NULL, 1}, +- {"h", no_argument, NULL, 1}, +- {"version", no_argument, NULL, 2}, +- {"v", no_argument, NULL, 2}, +- {"window", no_argument, NULL, 3}, +- {"w", no_argument, NULL, 3}, ++ {"help", no_argument, NULL, 'h'}, ++ {"version", no_argument, NULL, 'v'}, ++ {"window", no_argument, NULL, 'w'}, + + {0, 0, 0, 0} + }; + +- while ((c = getopt_long_only(argc, argv, "", long_options, NULL)) != -1) ++ while ((c = getopt_long(argc, argv, "", long_options, NULL)) != -1) + { + switch(c) + { +- case 1: ++ case 'h': + do_help(); + exit(0); + break; +- case 2: ++ case 'v': + do_version(); + exit(0); + break; +- case 3: ++ case 'w': + manager_style = 1; + break; + } |