[73485] trunk/dports/devel
ryandesign at macports.org
ryandesign at macports.org
Sun Nov 14 23:47:37 PST 2010
Revision: 73485
http://trac.macports.org/changeset/73485
Author: ryandesign at macports.org
Date: 2010-11-14 23:47:33 -0800 (Sun, 14 Nov 2010)
Log Message:
-----------
libnewt: new port, version 0.52.12; see #27253
Added Paths:
-----------
trunk/dports/devel/libnewt/
trunk/dports/devel/libnewt/Portfile
trunk/dports/devel/libnewt/files/
trunk/dports/devel/libnewt/files/patch-Makefile.in.diff
trunk/dports/devel/libnewt/files/patch-configure.ac.diff
trunk/dports/devel/libnewt/files/patch-whiptail.c.diff
Added: trunk/dports/devel/libnewt/Portfile
===================================================================
--- trunk/dports/devel/libnewt/Portfile (rev 0)
+++ trunk/dports/devel/libnewt/Portfile 2010-11-15 07:47:33 UTC (rev 73485)
@@ -0,0 +1,49 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+name libnewt
+version 0.52.12
+categories devel
+platforms darwin
+maintainers ryandesign openmaintainer
+license GPL-2
+
+description text-mode widget-based user interface library
+
+long_description Newt is a programming library for color text-mode, \
+ widget-based user interfaces. Newt can be used to add \
+ stacked windows, entry widgets, checkboxes, radio \
+ buttons, labels, plain text fields, scrollbars, etc., \
+ to text mode user interfaces.
+
+homepage https://fedorahosted.org/newt/
+master_sites https://fedorahosted.org/releases/n/e/newt/ \
+ gentoo
+
+distname newt-${version}
+
+checksums sha1 6952115806c7b1dbc36858eb4ca0596b235cf6f4 \
+ rmd160 0d34b278e72c1b1305fc110e491e3bc96b42a374
+
+depends_lib port:gettext \
+ port:popt \
+ port:tcl \
+ port:slang2
+
+patchfiles patch-Makefile.in.diff \
+ patch-configure.ac.diff \
+ patch-whiptail.c.diff
+
+use_autoreconf yes
+
+destroot.destdir instroot=${destroot}
+
+# configure: WARNING: unrecognized options: --disable-dependency-tracking
+# gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
+universal_variant no
+
+livecheck.type regex
+livecheck.url [lindex ${master_sites} 0]
+livecheck.regex {newt-([0-9.]+)\.tar}
Property changes on: trunk/dports/devel/libnewt/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/devel/libnewt/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/devel/libnewt/files/patch-Makefile.in.diff (rev 0)
+++ trunk/dports/devel/libnewt/files/patch-Makefile.in.diff 2010-11-15 07:47:33 UTC (rev 73485)
@@ -0,0 +1,105 @@
+--- Makefile.in.orig 2010-08-06 06:45:34.000000000 -0500
++++ Makefile.in 2010-11-14 19:13:14.000000000 -0600
+@@ -1,12 +1,13 @@
+ LIBS = -lslang
+-LIBTCL = -ltcl8.4
++LIBTCL = -ltcl8.5
+
+ CC = @CC@
+ CPP = @CPP@
+ CFLAGS = @CFLAGS@
+-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
++CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
++GNU_LD = @GNU_LD@
+
+-SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver
+ VERSION = @VERSION@
+ TAG = r$(subst .,-,$(VERSION))
+ SONAME = @SONAME@
+@@ -25,6 +26,12 @@
+ scrollbar.o textbox.o scale.o grid.o windows.o buttonbar.o \
+ checkboxtree.o
+
++ifneq ($(GNU_LD),)
++SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver -Wl,-soname,$(LIBNEWTSONAME)
++else
++SHLIBFLAGS=
++endif
++
+ SHCFLAGS = -fPIC
+
+ prefix = @prefix@
+@@ -33,6 +40,7 @@
+ libdir = @libdir@
+ bindir = @bindir@
+ datadir = @datadir@
++datarootdir = @datarootdir@
+ mandir = @mandir@
+ man1dir = $(mandir)/man1
+ pkgconfigdir = $(libdir)/pkgconfig
+@@ -53,33 +61,37 @@
+ all: $(TARGET) _snackmodule.so
+
+ test: test.o $(LIBNEWT)
+- $(CC) -g -o test test.o $(LIBNEWT) $(LIBS)
++ $(CC) -g -o test test.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
+
+ testgrid: testgrid.o $(LIBNEWT)
+- $(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
++ $(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
+
+ testtree: testtree.o $(LIBNEWT)
+- $(CC) -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
++ $(CC) -g -o testtree testtree.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
+
+ showchars: showchars.o $(LIBNEWT)
+- $(CC) -g -o showchars showchars.o $(LIBNEWT) $(LIBS)
++ $(CC) -g -o showchars showchars.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
+
+ showkey: showkey.o $(LIBNEWT)
+- $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
++ $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
+
+ _snackmodule.so: snackmodule.c $(LIBNEWTSH)
+ for ver in $(PYTHONVERS) ; do \
+ mkdir -p $$ver ;\
+- $(CC) $(CFLAGS) -I/usr/include/$$ver $(SHCFLAGS) -c -o $$ver/snackmodule.o snackmodule.c ;\
+- $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . -lnewt ;\
++ PCFLAGS=`$$ver-config --cflags`; \
++ PIFLAGS=`$$ver-config --includes`; \
++ PLDFLAGS=`$$ver-config --ldflags`; \
++ PLFLAGS=`$$ver-config --libs`; \
++ $(CC) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\
++ $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L. -lnewt -lintl ;\
+ done
+ touch $@
+
+ whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
+- $(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
++ $(CC) -g -o whiptail $(NDIALOGOBJS) -L. $(LDFLAGS) -lnewt $(LIBS) -lpopt -lintl
+
+ whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
+- $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lpopt
++ $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L. -lnewt $(LIBS) $(LIBTCL) -lpopt -lintl
+
+ $(LIBNEWT): $(LIBOBJS)
+ ar rv $@ $^
+@@ -102,7 +114,7 @@
+ sharedlib: $(LIBNEWTSH)
+
+ $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
+- $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(LIBS)
++ $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS)
+ ln -fs $(LIBNEWTSONAME) libnewt.so
+ ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
+
+@@ -119,7 +131,7 @@
+ install -m 755 whiptail $(instroot)/$(bindir)
+ install -m 644 whiptail.1 $(instroot)/$(man1dir)
+ make -C po datadir=$(instroot)/$(datadir) install
+- install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
++ install -m 644 libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
+
+ install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
+ [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
Added: trunk/dports/devel/libnewt/files/patch-configure.ac.diff
===================================================================
--- trunk/dports/devel/libnewt/files/patch-configure.ac.diff (rev 0)
+++ trunk/dports/devel/libnewt/files/patch-configure.ac.diff 2010-11-15 07:47:33 UTC (rev 73485)
@@ -0,0 +1,27 @@
+--- configure.ac.orig 2010-08-06 06:45:34.000000000 -0500
++++ configure.ac 2010-11-14 19:11:45.000000000 -0600
+@@ -13,8 +13,24 @@
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
++AC_PROG_GREP
++
++# Are we using GNU ld?
++AC_MSG_CHECKING([for GNU ld])
++LD=`$CC -print-prog-name=ld 2>&5`
++
++if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then
++ # Not
++ GNU_LD=""
++ AC_MSG_RESULT([no])
++else
++ GNU_LD="$LD"
++ AC_MSG_RESULT([yes])
++ AC_SUBST([GNU_LD])
++fi
+
+ AC_CHECK_HEADERS([sys/select.h alloca.h])
++AC_CHECK_HEADERS([popt.h libintl.h])
+
+ AC_MSG_CHECKING([for python versions])
+ PYTHONVERS=$(echo /usr/include/python*/Python.h | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
Added: trunk/dports/devel/libnewt/files/patch-whiptail.c.diff
===================================================================
--- trunk/dports/devel/libnewt/files/patch-whiptail.c.diff (rev 0)
+++ trunk/dports/devel/libnewt/files/patch-whiptail.c.diff 2010-11-15 07:47:33 UTC (rev 73485)
@@ -0,0 +1,10 @@
+--- whiptail.c.orig 2009-09-24 10:03:09.000000000 -0500
++++ whiptail.c 2010-11-11 15:32:18.000000000 -0600
+@@ -8,6 +8,7 @@
+ #include <unistd.h>
+ #include <wchar.h>
+ #include <slang.h>
++#include <sys/stat.h>
+
+ #include "nls.h"
+ #include "dialogboxes.h"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101114/8dac0aaa/attachment-0001.html>
More information about the macports-changes
mailing list