[PATCH] Convert misc/dvorakng to USE_GETOPT_LONG
Sergei Kolobov
sergei at kolobov.com
Mon Apr 28 16:20:27 PDT 2003
>Submitter-Id: current-users
>Originator: Sergei Kolobov
>Organization:
>Confidential: no
>Synopsis: [PATCH] Convert misc/dvorakng to USE_GETOPT_LONG
>Severity: non-critical
>Priority: low
>Category: ports
>Class: update
>Release: FreeBSD 5.0-CURRENT i386
>Environment:
System: FreeBSD elf.chetwood.ru 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Apr 13 01:13:44 MSD 2003
>Description:
- Properly conditionalize gnugetopt dependency by USE_GETOPT_LONG=yes
- Install some documentation
- Bump PORTREVISION
>How-To-Repeat:
>Fix:
--- dvorakng-0.5.0.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/misc/dvorakng/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile 2003/03/26 08:29:43 1.1
+++ Makefile 2003/04/28 23:07:10
@@ -8,6 +8,7 @@
PORTNAME= dvorakng
PORTVERSION= 0.5.0
+PORTREVISION= 1
CATEGORIES= misc
MASTER_SITES= http://www.free.of.pl/n/nopik/
@@ -15,20 +16,18 @@
COMMENT= A Dvorak typing tutor
USE_BZIP2= yes
-WRKSRC= ${WRKDIR}/${PORTNAME}
+USE_GETOPT_LONG= yes
-.include <bsd.port.pre.mk>
+WRKSRC= ${WRKDIR}/${PORTNAME}
+MAKE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-.if ${OSVERSION} < 500041
-LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
-MAKE_ARGS= PROF="-I${LOCALBASE}/include ${CFLAGS}" \
- LDFLAGS="-L${LOCALBASE}/lib" \
- LIBS="-lncurses -lgnugetopt"
-.else
-MAKE_ARGS= PROF="${CFLAGS}"
-.endif
+DOCS= README TODO
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/dvorakng ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
+.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/misc/dvorakng/pkg-plist,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist
--- pkg-plist 2003/03/26 08:29:43 1.1
+++ pkg-plist 2003/04/28 23:07:10
@@ -1 +1,4 @@
bin/dvorakng
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
Index: files/patch-Makefile
===================================================================
RCS file: /home/ncvs/ports/misc/dvorakng/files/patch-Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-Makefile
--- files/patch-Makefile 2003/03/26 08:29:43 1.1
+++ files/patch-Makefile 2003/04/28 23:07:10
@@ -1,11 +1,28 @@
---- Makefile.orig Wed Mar 26 16:27:35 2003
-+++ Makefile Wed Mar 26 16:27:42 2003
-@@ -11,7 +11,7 @@
- CC = gcc
- CXX = g++
+--- Makefile.orig Mon Mar 17 15:14:42 2003
++++ Makefile Tue Apr 29 03:00:34 2003
+@@ -8,12 +8,10 @@
+
+ ### That's all ###
+
+-CC = gcc
+-CXX = g++
PROF = #-g0 -O2
-CFLAGS = $(PROF) -fmessage-length=0 -Wall $(LIMIT_LENGTH)
-+CFLAGS = $(PROF) -Wall $(LIMIT_LENGTH)
- CXXFLAGS = $(CFLAGS)
- LDFLAGS = $(PROF)
+-CXXFLAGS = $(CFLAGS)
+-LDFLAGS = $(PROF)
++CFLAGS += $(PROF) -fmessage-length=0 -Wall $(LIMIT_LENGTH)
++CXXFLAGS?= $(CFLAGS)
++LDFLAGS += $(PROF)
LIBS = -lncurses
+
+ OBJECTS = dvorakng.o lessons.o
+@@ -30,6 +28,9 @@
+
+ dvorakng: $(OBJECTS)
+ $(CXX) -s $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
++
++.cpp.o:
++ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $>
+
+ clean:
+ rm -f $(OBJECTS) $(TARGET)
--- dvorakng-0.5.0.patch ends here ---
More information about the freebsd-ports
mailing list