Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2002 18:55:31 +0900 (KST)
From:      Hye-Shik Chang <perky@fallin.lv>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/36001: Update port: devel/newt (and take maintainership)
Message-ID:  <200203170955.g2H9tVn43387@kornet.hanirc.org>

next in thread | raw e-mail | index | archive | help

>Number:         36001
>Category:       ports
>Synopsis:       Update port: devel/newt (and take maintainership)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 17 02:00:09 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Hye-Shik Chang
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Yonsei University
>Environment:
System: FreeBSD kornet.hanirc.org 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Jan 30 00:21:52 KST 2002 root@kornet.hanirc.org:/home/obj/home/src/sys/HANIRC i386

>Description:
- Update to 0.50.33-1
- make TCL and Python module optional.
- take a maintainership

>How-To-Repeat:
>Fix:

diff -ruN newt.orig/Makefile newt/Makefile
--- newt.orig/Makefile	Wed Jan 16 00:17:48 2002
+++ newt/Makefile	Sun Mar 17 18:29:35 2002
@@ -6,34 +6,70 @@
 #
 
 PORTNAME=	newt
-PORTVERSION=	0.50.8.2
+PORTVERSION=	${RPMVERSION}.${RPMREVISION}
 CATEGORIES=	devel
-MASTER_SITES=	ftp://ftp.redhat.com/pub/redhat/redhat-6.2-en/os/i386/SRPMS/
-
-DISTNAME=	${PORTNAME}-0.50.8-2
+MASTER_SITES=	http://www.silug.org/%SUBDIR%/ \
+		ftp://ftp.redhat.com/%SUBDIR%/ \
+		http://ftp.dulug.duke.edu/%SUBDIR%/ 
+MASTER_SITE_SUBDIR=	pub/redhat/linux/rawhide/SRPMS/SRPMS
+DISTNAME=	${PORTNAME}-${RPMVERSION}-${RPMREVISION}
 EXTRACT_SUFX=	.src.rpm
+PKGNAMESUFFIX=	${PYTHONSUFFIX}${TCLSUFFIX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	perky@fallin.lv
 
+BUILD_DEPENDS=	rpm2cpio:${PORTSDIR}/archivers/rpm
 LIB_DEPENDS=	slang.1:${PORTSDIR}/devel/libslang \
-		tcl82.1:${PORTSDIR}/lang/tcl82 \
 		popt.0:${PORTSDIR}/devel/popt
-BUILD_DEPENDS=	rpm2cpio:${PORTSDIR}/archivers/rpm \
-		python1.5:${PORTSDIR}/lang/python15
 
-USE_GMAKE=	yes
+RPMVERSION=	0.50.33
+RPMREVISION=	1
+WRKSRC=		${WRKDIR}/newt-${RPMVERSION}
+
 GNU_CONFIGURE=	yes
 INSTALLS_SHLIB=	yes
-WRKSRC=		${WRKDIR}/newt-0.50.8
 VERSION=	0
-MAKE_ENV+=	prefix=${PREFIX} VERSION=${VERSION} CC=${CC} PCFLAGS="${CFLAGS}"
-PLIST_SUB+=	VERSION="${VERSION}"
+TCL_VERSION?=	tcl8.3
+TCL_NODOT=	${TCL_VERSION:S/.//}
+MAKE_ENV+=	VERSION=${VERSION} CC=${CC} PCFLAGS="${CFLAGS}" TCLVERSION="${TCL_VERSION}"
+PLIST_SUB+=	VERSION=${VERSION} EXAMPLESDIR="${EXAMPLESDIR:S,${PREFIX}/,,}"
 CPIO?=		/usr/bin/cpio
 
+.if !defined(WITHOUT_PYTHON)
+PYTHONSUFFIX=	-${PYTHON_PKGNAMEPREFIX:S/-//}
+BUILD_DEPENDS+=	${PYDISTUTILS}
+USE_PYTHON=	yes
+MAKE_ENV+=	WITH_PYTHON=yes
+PLIST_SUB+=	PYTHONOPT=""
+.else
+PLIST_SUB+=	PYTHONOPT="@comment "
+.endif
+
+.if !defined(WITHOUT_TCL)
+TCLSUFFIX=	-${TCL_NODOT}
+LIB_DEPENDS+=	${TCL_NODOT}:${PORTSDIR}/lang/${TCL_NODOT}
+MAKE_ENV+=	WITH_TCL=yes
+PLIST_SUB+=	TCLOPT=""
+.else
+PLIST_SUB+=	TCLOPT="@comment "
+.endif
+
 do-extract:
 	@${RM} -rf ${WRKDIR}
 	@${MKDIR} ${WRKDIR}
 	@${LOCALBASE}/bin/rpm2cpio ${_DISTDIR}${DISTFILES} | (cd ${WRKDIR};${CPIO} -i)
 	@${TAR} xfz ${WRKSRC}.tar.gz -C ${WRKDIR}
+
+.if !defined(WITHOUT_PYTHON)
+post-build:
+	@cd ${WRKSRC} && ${MAKE_ENV} ${PYTHON_CMD} ${FILESDIR}/setup.py build
+
+post-install:
+	@cd ${WRKSRC} && ${MAKE_ENV} ${PYTHON_CMD} ${FILESDIR}/setup.py install
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${EXAMPLESDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/peanuts.py ${WRKSRC}/popcorn.py ${EXAMPLESDIR}
+.endif
+.endif
 
 .include <bsd.port.mk>
diff -ruN newt.orig/distinfo newt/distinfo
--- newt.orig/distinfo	Tue Aug  1 06:32:40 2000
+++ newt/distinfo	Sun Mar 17 15:19:24 2002
@@ -1 +1 @@
-MD5 (newt-0.50.8-2.src.rpm) = e3af47fa49859b7a72ac03ab352c793f
+MD5 (newt-0.50.33-1.src.rpm) = b8801b4aed32741859c061b791529159
diff -ruN newt.orig/files/patch-ab newt/files/patch-ab
--- newt.orig/files/patch-ab	Tue Aug  1 06:32:41 2000
+++ newt/files/patch-ab	Sun Mar 17 17:46:56 2002
@@ -1,39 +1,69 @@
---- Makefile.in.orig	Thu Feb  3 18:57:57 2000
-+++ Makefile.in	Sat Jul 22 01:45:55 2000
-@@ -1,16 +1,12 @@
+--- Makefile.in.orig	Tue Jan 23 15:27:38 2001
++++ Makefile.in	Sun Mar 17 17:46:32 2002
+@@ -1,18 +1,14 @@
 -LIBS = -lslang -lm #-lefence
 -SHLIBS = -lslang -lm -lc
 +CC ?= cc
-+LIBS = -L$(PREFIX)/lib -lslang -ltcl82 -lpopt -lncurses -lm
++LIBS = -L$(PREFIX)/lib -lslang -lpopt -lncurses -lm
++TCLLIBS = -l${TCLVERSION:S/.//g}
 +SHLIBS = $(LIBS)
  
 -GPM_SUPPORT=@gpm_support@
-+CFLAGS = $(PCFLAGS) -Wall -I$(prefix)/include -I$(prefix)/include/tcl8.2
++CFLAGS = $(PCFLAGS) -Wall -I$(prefix)/include -I$(prefix)/include/${TCLVERSION}
  
 -CFLAGS = $(RPM_OPT_FLAGS) -Wall -I/usr/include/slang
 -ifeq ($(RPM_OPT_FLAGS),)
 -CFLAGS += -g # -O2 -I/usr/include/slang
 -endif
--
--VERSION = @VERSION@
 +VERSION ?= 0
- CVSTAG = r$(subst .,-,$(VERSION))
--SONAME = @SONAME@
-+SONAME = $(VERSION)
++SONAME = ${VERSION}
  
- PROGS = test whiptail whiptcl.so testgrid testtree
+-VERSION = @VERSION@
+-CVSTAG = r$(subst .,-,$(VERSION))
+-SONAME = @SONAME@
+-
+-PROGS = test whiptail whiptcl.so testgrid testtree
++PROGS = test whiptail testgrid testtree
  TESTOBJS = test.o
-@@ -25,7 +21,7 @@
+ NDIALOGOBJS = whiptail.o dialogboxes.o
+ WHIPTCLOBJS = whiptcl.o dialogboxes.o
+@@ -25,51 +21,50 @@
  
  SHCFLAGS = -fPIC
  
 -prefix = /usr
-+prefix ?= /usr/local
++prefix ?= ${PREFIX}
  includedir = $(prefix)/include
  libdir = $(prefix)/lib
  bindir = $(prefix)/bin
-@@ -49,25 +45,25 @@
- all:	$(TARGET) _snackmodule.so
+-ARCHNAME = $(shell uname -m | sed 's/i.86/i386/')
+ pythondir = $(prefix)/lib/python1.5
+ pythonbindir = $(prefix)/lib/python1.5/lib-dynload
+ 
+ #--------------------------------------
+ 
+-SOURCES = $(subst .o,.c,$(TESTOBJS) $(NDIALOGOBJS) $(LIBOBJS))
++SOURCES = ${TESTOBJS:S/.o/.c/g} ${NDIALOGOBJS:S/.o/.c/g} ${LIBOBJS:S/.o/.c/g}
+ 
+ SHAREDDIR = shared
+ SHAREDOBJS = $(patsubst %,$(SHAREDDIR)/%, $(LIBOBJS))
++.if defined(WITH_TCL)
++TCLTARGET=whiptcl.so
++.endif
++TARGET=${PROGS} ${TCLTARGET}
++
++.if !exists(.depend)
++TARGET+=depend
++.endif
+ 
+-ifeq (.depend,$(wildcard .depend))
+-TARGET=$(PROGS)
+-else
+-TARGET=depend $(PROGS)
+-endif
+-
+-all:	$(TARGET) _snackmodule.so
++all:	$(TARGET)
  
  test:	$(TESTOBJS) $(LIBNEWT)
 -	gcc -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static
@@ -45,27 +75,41 @@
  
  testtree:	testtree.o $(LIBNEWT)
 -	gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
-+	$(CC) -o testtree testtree.o $(LIBNEWT) $(LIBS)
- 
- _snackmodule.so:   snackmodule.o $(LIBNEWTSH)
--	gcc --shared -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH)
-+	$(CC) --shared -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH)
- 
- snackmodule.o:   snackmodule.c
+-
+-_snackmodule.so:   snackmodule.o $(LIBNEWTSH)
+-	gcc --shared $(SHCFLAGS) -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH)
+-
+-snackmodule.o:   snackmodule.c
 -	gcc -I/usr/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c
-+	$(CC) -I$(prefix)/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c
++	$(CC) -o testtree testtree.o $(LIBNEWT) $(LIBS)
  
  whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
 -	gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
-+	$(CC) -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS)
++	$(CC) -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS)
  
++.if defined(WITH_TCL)
  whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
--	gcc -shared -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) -ltcl -lslang -lpopt -lm
-+	$(CC) -shared -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) $(LIBS)
- 
- $(LIBNEWT): $(LIBNEWT)($(LIBOBJS))
- 
-@@ -90,7 +86,7 @@
+-	gcc -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) -ltcl -lslang -lpopt -lm
++	$(CC) -shared -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBS) $(TCLLIBS)
++.endif
+ 
+-$(LIBNEWT): $(LIBNEWT)($(LIBOBJS))
++$(LIBNEWT): $(LIBOBJS)
++	ar q ${LIBNEWT} ${LIBOBJS}
++	ranlib ${LIBNEWT}
+ 
+ newt.o: newt.c Makefile
+ 	$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
+@@ -82,7 +77,7 @@
+ 		$(SHAREDOBJS) *.so*
+ 
+ depend:
+-	$(CPP) $(CFLAGS) -M $(SOURCES) > .depend
++	mkdep $(CFLAGS) $(SOURCES)
+ 
+ $(SHAREDDIR):
+ 	mkdir -p $(SHAREDDIR)
+@@ -90,7 +85,7 @@
  sharedlib: $(LIBNEWTSH)
  
  $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
@@ -74,7 +118,7 @@
  
  $(SHAREDDIR)/%.o : %.c
  	$(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $<
-@@ -100,21 +96,23 @@
+@@ -100,21 +95,20 @@
  
  
  install: $(LIBNEWT) install-sh whiptail
@@ -84,15 +128,8 @@
 -	install -m 644 newt.h $(instroot)/$(includedir)
 -	install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
 -	install -s -m 755 whiptail $(instroot)/$(bindir)
-+	[ -d $(bindir) ] || install -m 755 -d $(bindir)
-+	[ -d $(libdir) ] || install -m 755 -d $(libdir)
-+	[ -d $(includedir) ] || install -m 755 -d $(includedir)
-+	install -c -m 644 newt.h $(includedir)
-+	install -c -m 644 $(LIBNEWT) $(libdir)
-+	install -c -s -m 755 whiptail $(bindir)
-+
- 
- install-sh: sharedlib whiptcl.so _snackmodule.so
+-
+-install-sh: sharedlib whiptcl.so _snackmodule.so
 -	[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
 -	install -s -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
 -	ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so
@@ -100,14 +137,30 @@
 -	[ -d $(instroot)/$(pythonbindir) ] || install -m 755 -d $(instroot)/$(pythonbindir)
 -	install -s -m 755 _snackmodule.so $(instroot)/$(pythonbindir)
 -	install -m 755 snack.py $(instroot)/$(pythondir)
++	[ -d $(bindir) ] || install -m 755 -d $(bindir)
++	[ -d $(libdir) ] || install -m 755 -d $(libdir)
++	[ -d $(includedir) ] || install -m 755 -d $(includedir)
++	install -c -m 644 newt.h $(includedir)
++	install -c -m 644 $(LIBNEWT) $(libdir)
++	install -c -s -m 755 whiptail $(bindir)
++
++install-sh: sharedlib ${TCLTARGET}
 +	[ -d $(libdir) ] || install -m 755 -d $(libdir)
 +	install -c -m 755 $(LIBNEWTSH) $(libdir)
 +	ln -sf $(LIBNEWTSH) $(libdir)/libnewt.so
++.if defined(WITH_TCL)
 +	install -c -m 755 whiptcl.so $(libdir)
-+	[ -d $(pythonbindir) ] || install -m 755 -d $(pythonbindir)
-+	install -c -m 755 _snackmodule.so $(pythonbindir)
-+	install -c -m 755 snack.py $(pythondir)
-+
++.endif
  
  configure:  configure.in
  	autoconf
+@@ -133,6 +127,6 @@
+ 	@echo " "
+ 	@echo "The final archive is ./newt-$(VERSION).tar.gz."
+ 
+-ifeq (.depend,$(wildcard .depend))
+-include .depend
+-endif
++.if exists(.depend)
++.include ".depend"
++.endif
diff -ruN newt.orig/files/setup.py newt/files/setup.py
--- newt.orig/files/setup.py	Thu Jan  1 09:00:00 1970
+++ newt/files/setup.py	Sun Mar 17 18:27:46 2002
@@ -0,0 +1,15 @@
+# $FreeBSD$
+import os
+from distutils.core import setup, Extension
+
+setup ( name = 'newt',
+	version = '0.50.33',
+	description = 'Python interface to Newt module',
+	py_modules = ['snack'],
+	ext_modules = [ Extension(
+       		name='_snack',
+		sources=['snackmodule.c'],
+		include_dirs=['.', os.environ['PREFIX']+'/include'],
+		library_dirs=['.', os.environ['PREFIX']+'/lib'],
+		libraries=['newt', 'popt', 'slang', 'ncurses']
+	)])
diff -ruN newt.orig/pkg-descr newt/pkg-descr
--- newt.orig/pkg-descr	Tue Aug  1 06:32:41 2000
+++ newt/pkg-descr	Sun Mar 17 15:25:01 2002
@@ -1,10 +1,10 @@
-   Newt is a windowing toolkit for text mode built from the slang
-   library. It allows color text mode applications to easily use
-   stackable windows, push buttons, check boxes, radio buttons, lists,   
-   entry fields, labels, and displayable text. Scrollbars are supported,
-   and forms may be nested to provide extra functionality.
+Newt is a windowing toolkit for text mode built from the slang
+library. It allows color text mode applications to easily use
+stackable windows, push buttons, check boxes, radio buttons, lists,   
+entry fields, labels, and displayable text. Scrollbars are supported,
+and forms may be nested to provide extra functionality.
 
-WWW: http://www.redhat.com/support/manuals/archive/RHL-5.1-Installation-Guide/ manual/doc102.html
+WWW: http://www.msg.com.mx/Newt/
 
 Besides the newt library, this port provides whiptail, which may
 be used from shell scripts similarly to Savio Lam's "dialog". Newt
diff -ruN newt.orig/pkg-plist newt/pkg-plist
--- newt.orig/pkg-plist	Sun Aug  5 00:15:27 2001
+++ newt/pkg-plist	Sun Mar 17 18:01:11 2002
@@ -1,10 +1,12 @@
 bin/whiptail
-lib/python1.5/lib-dynload/_snackmodule.so
-lib/python1.5/snack.py
-lib/whiptcl.so
+%%PYTHONOPT%%lib/%%PYTHON_VERSION%%/site-packages/_snack.so
+%%PYTHONOPT%%lib/%%PYTHON_VERSION%%/site-packages/snack.py
+%%PYTHONOPT%%lib/%%PYTHON_VERSION%%/site-packages/snack.pyc
+%%TCLOPT%%lib/whiptcl.so
 lib/libnewt.a
 lib/libnewt.so
 lib/libnewt.so.%%VERSION%%
 include/newt.h
-@unexec rmdir %D/lib/python1.5/lib-dynload 2>/dev/null || true
-@unexec rmdir %D/lib/python1.5 2>/dev/null || true
+%%PORTDOCS%%%%PYTHONOPT%%%%EXAMPLESDIR%%/peanuts.py
+%%PORTDOCS%%%%PYTHONOPT%%%%EXAMPLESDIR%%/popcorn.py
+%%PORTDOCS%%%%PYTHONOPT%%@dirrm %%EXAMPLESDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203170955.g2H9tVn43387>