From ea30c5c5fd39eda538b04740696175ebcbcc18dc Mon Sep 17 00:00:00 2001 From: sf Date: Mon, 14 Jul 2003 02:37:35 +0000 Subject: get rid of libgnugetopt dependency for -CURRENT, use USE_GETOPT_LONG instead. use getopt_long() instead of getopt_long_only(). --- x11-clocks/wmfishtime/Makefile | 7 ++--- x11-clocks/wmfishtime/files/patch-Makefile | 15 ++++++++--- x11-clocks/wmfishtime/files/patch-fishmon.c | 42 +++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 x11-clocks/wmfishtime/files/patch-fishmon.c (limited to 'x11-clocks') diff --git a/x11-clocks/wmfishtime/Makefile b/x11-clocks/wmfishtime/Makefile index 2ddced2..c135918 100644 --- a/x11-clocks/wmfishtime/Makefile +++ b/x11-clocks/wmfishtime/Makefile @@ -7,6 +7,7 @@ PORTNAME= wmfishtime PORTVERSION= 1.23 +PORTREVISION= 1 CATEGORIES= x11-clocks windowmaker MASTER_SITES= http://www.ne.jp/asahi/linux/timecop/software/ \ http://atreides.freenix.no/~anders/ @@ -14,14 +15,14 @@ MASTER_SITES= http://www.ne.jp/asahi/linux/timecop/software/ \ MAINTAINER= anders@FreeBSD.org COMMENT= A time/date applet for WindowMaker with fishes swimming around -LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt - +USE_GETOPT_LONG=yes USE_GNOME= gtk12 USE_X_PREFIX= yes GTK_LIBS?= `${GTK_CONFIG} --libs` GTK_CFLAGS?= `${GTK_CONFIG} --cflags` -MAKE_ARGS+= CFLAGS="${CFLAGS} -Wall -I${LOCALBASE}/include ${GTK_CFLAGS}" \ +MAKE_ARGS+= CFLAGS="${CPPFLAGS} ${CFLAGS} -Wall ${GTK_CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ GTK_LIBS="${GTK_LIBS}" do-install: diff --git a/x11-clocks/wmfishtime/files/patch-Makefile b/x11-clocks/wmfishtime/files/patch-Makefile index 5443503..ff24164 100644 --- a/x11-clocks/wmfishtime/files/patch-Makefile +++ b/x11-clocks/wmfishtime/files/patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig Sat May 26 22:49:41 2001 -+++ Makefile Sun May 27 00:14:26 2001 -@@ -6,17 +6,15 @@ +--- Makefile.orig Sun May 27 05:49:41 2001 ++++ Makefile Sun Jul 6 20:29:07 2003 +@@ -6,23 +6,21 @@ # no user serviceable parts below this line # optimization cflags @@ -15,7 +15,14 @@ SHELL = sh OBJS = fishmon.o -LIBS = `gtk-config --libs | sed "s/-lgtk//g"` -+LIBS = `echo $(GTK_LIBS) | sed "s/-lgtk12//g"` -lgnugetopt ++LIBS = `echo $(GTK_LIBS) | sed "s/-lgtk12//g"` INSTALL = -m 755 all: wmfishtime + + wmfishtime: $(OBJS) +- $(CC) $(CFLAGS) -o wmfishtime $(OBJS) $(LIBS) ++ $(CC) $(CFLAGS) -o wmfishtime $(OBJS) $(LIBS) $(LDFLAGS) + + clean: + rm -rf wmfishtime *.o *.bb* *.gcov gmon.* *.da *~ .xvpics diff --git a/x11-clocks/wmfishtime/files/patch-fishmon.c b/x11-clocks/wmfishtime/files/patch-fishmon.c new file mode 100644 index 0000000..f19ae98 --- /dev/null +++ b/x11-clocks/wmfishtime/files/patch-fishmon.c @@ -0,0 +1,42 @@ +--- fishmon.c.orig Sun May 27 05:53:09 2001 ++++ fishmon.c Mon Jul 7 04:01:52 2003 +@@ -1018,26 +1018,28 @@ + { + static int ch = 0; + static struct option long_opts[] = { +- { "h", no_argument, NULL, 1 }, +- { "help", no_argument, NULL, 1 }, +- { "v", no_argument, NULL, 2 }, +- { "version", no_argument, NULL, 2 }, +- { "c", no_argument, &enable_check_mail, 1 }, +- { "check-mail", no_argument, &enable_check_mail, 1 }, +- { "b", no_argument, &broken_wm, 1 }, +- { "broken", no_argument, &broken_wm, 1 }, ++ { "help", no_argument, NULL, 'h' }, ++ { "version", no_argument, NULL, 'v' }, ++ { "check-mail", no_argument, &enable_check_mail, 'c' }, ++ { "broken", no_argument, &broken_wm, 'b' }, + { 0, 0, 0, 0 } + }; + +- while ((ch = getopt_long_only(argc, argv, "", long_opts, NULL)) != -1) { ++ while ((ch = getopt_long(argc, argv, "hvcb", long_opts, NULL)) != -1) { + switch (ch) { +- case 1: ++ case 'h': + do_help(); + exit(0); + break; +- case 2: ++ case 'v': + do_version(); + exit(0); ++ break; ++ case 'c': ++ enable_check_mail = 1; ++ break; ++ case 'b': ++ broken_wm = 1; + break; + } + } -- cgit v1.1