setup: simplify SUBDIRS

2010-08-10 Thread Yaakov (Cygwin/X)
Right now, make clean (or the other *clean targets) does not clean in
libgetopt++.  Unless there is something I'm not aware of, libgetopt++
can be handled like any other SUBDIRS, so that all targets are passed
down to it as well.  Patch attached.


Yaakov

2010-08-10  Yaakov Selkowitz  yselkow...@users.sourceforge.net

	* Makefile.am: Treat libgetopt++ as full-fledged SUBDIRS.
	(setup_LDADD): Always link against included libgetopt++.

Index: Makefile.am
===
RCS file: /cvs/cygwin-apps/setup/Makefile.am,v
retrieving revision 2.82
diff -u -r2.82 Makefile.am
--- Makefile.am	29 Jul 2010 13:09:54 -	2.82
+++ Makefile.am	10 Aug 2010 06:46:57 -
@@ -15,9 +15,7 @@
 #
 # Makefile for Cygwin installer
 
-INST_SUBDIRS:=...@subdirs@
-DIST_SUBDIRS:=${INST_SUBDIRS} tests
-SUBDIRS:=tests
+SUBDIRS := @subdirs@ tests
 
 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
 
@@ -63,8 +61,7 @@
 # knows about that already)
 BUILT_SOURCES = \
 	setup_version.c \
-	iniparse.h \
-	${INST_SUBDIRS}
+	iniparse.h
 
 CLEANFILES = setup_version.c
 
@@ -115,7 +112,7 @@
 
 setup_LDADD = \
 	libinilex.a \
-	-Linst/lib -lgetopt++ -lgcrypt -lgpg-error \
+	libgetopt++/libgetopt++.la -lgcrypt -lgpg-error \
 	-lshlwapi -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -llzma -lbz2 -lz 
 setup_LDFLAGS = -mwindows -Wl,-static -static-libtool-libs
 setup_SOURCES = \
@@ -308,6 +305,3 @@
 	sort | tar -T - -cjf ${CURDIR}/$$ver-src.tar.bz2;\
 	echo $$ver-src.tar.bz2; exec rm -f $$ver
 
-.PHONY: ${INST_SUBDIRS}
-${INST_SUBDIRS}:
-	${MAKE} -C $@ install


Re: setup: simplify SUBDIRS

2010-08-10 Thread Christopher Faylor
On Tue, Aug 10, 2010 at 01:57:56AM -0500, Yaakov (Cygwin/X) wrote:
Right now, make clean (or the other *clean targets) does not clean in
libgetopt++.  Unless there is something I'm not aware of, libgetopt++
can be handled like any other SUBDIRS, so that all targets are passed
down to it as well.  Patch attached.

Hmm.  I could have sworn that it used to clean in that subdirectory.
Please check in.

Thanks.

cgf


New setup.exe uploaded

2010-08-10 Thread Christopher Faylor
I've uploaded a new setup.exe.

FYI
cgf


Re: ITP: rtorret, libtorrent, libsigc++

2010-08-10 Thread Chris Sutcliffe
On 8 August 2010 17:03, Chris Sutcliffe wrote:
 Valid point.  I'll change the hint files for libtorrent and libsigc++
 and upload new versions shortly.

 Done:

 libsigc++-2.0-2.2.8-1:

 wget -x -nH --cut-dirs=1 \
 http://emergedesktop.org/cygwin/libsigc++/setup.hint \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-2.2.8-1-src.tar.bz2 \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-2.2.8-1.tar.bz2 \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0_0/setup.hint \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0_0/libsigc++2.0_0-2.2.8-1.tar.bz2
 \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-devel/setup.hint \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-devel/libsigc++2.0-devel-2.2.8-1.tar.bz2
 \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-doc/setup.hint \
 http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-doc/libsigc++2.0-doc-2.2.8-1.tar.bz2

 libtorrent-0.12.6-1:

 wget -x -nH --cut-dirs=1 \
 http://emergedesktop.org/cygwin/libtorrent/setup.hint \
 http://emergedesktop.org/cygwin/libtorrent/libtorrent-0.12.6-1-src.tar.bz2 \
 http://emergedesktop.org/cygwin/libtorrent/libtorrent-0.12.6-1.tar.bz2 \
 http://emergedesktop.org/cygwin/libtorrent/libtorrent11/setup.hint \
 http://emergedesktop.org/cygwin/libtorrent/libtorrent11/libtorrent11-0.12.6-1.tar.bz2
 \
 http://emergedesktop.org/cygwin/libtorrent/libtorrent-devel/setup.hint \
 http://emergedesktop.org/cygwin/libtorrent/libtorrent-devel/libtorrent-devel-0.12.6-1.tar.bz2

 rtorrent-0.8.6-1:

 wget -x -nH --cut-dirs=1 \
 http://emergedesktop.org/cygwin/rtorrent/setup.hint \
 http://emergedesktop.org/cygwin/rtorrent/rtorrent-0.8.6-1-src.tar.bz2 \
 http://emergedesktop.org/cygwin/rtorrent/rtorrent-0.8.6-1.tar.bz2

Chuck / Steven, does this latest packaging capture all your proposed
changes appropriately?

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d


Re: ITP: rtorret, libtorrent, libsigc++

2010-08-10 Thread Yaakov (Cygwin/X)
On Tue, 2010-08-10 at 13:33 -0400, Chris Sutcliffe wrote:
  wget -x -nH --cut-dirs=1 \
  http://emergedesktop.org/cygwin/libsigc++/setup.hint \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-2.2.8-1-src.tar.bz2 \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-2.2.8-1.tar.bz2 \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0_0/setup.hint \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0_0/libsigc++2.0_0-2.2.8-1.tar.bz2
  \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-devel/setup.hint \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-devel/libsigc++2.0-devel-2.2.8-1.tar.bz2
  \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-doc/setup.hint \
  http://emergedesktop.org/cygwin/libsigc++/libsigc++2.0-doc/libsigc++2.0-doc-2.2.8-1.tar.bz2

Can you please make the naming of these packages match those in Ports so
that I don't have to adjust all my packages unnecessarily?


Yaakov




[PATCH] setup: gcc-4.x compatibility

2010-08-10 Thread Yaakov (Cygwin/X)
This patch fixes several issues compiling setup.exe with gcc-4.x while
retaining compatibility with gcc-3.4, as tested with gcc-mingw-3.4.4-999
and my mingw-gcc-4.5.1 sample build.  Once we switch to a proper
mingw-gcc cross-compiler, the only change that will need to be made is
to CC/CXX in doconfigure.

OK to apply?


Yaakov

2010-08-10  Yaakov Selkowitz  yselkow...@users.sourceforge.net

	Fix compatibility with GCC 4.x.
	* Makefile.am (setup_LDFLAGS): Pass -static to compiler instead of
	linker so that libgcc is statically linked as well.
	(autoload.o): Disable optimization.
	* localdir.cc (browse_cb): Fix jump to case label crosses
	initialization error.
	* mklink2.cc (sfli): Fix non-local variable uses anonymous type
	warning.
	* ntdll.h: Fix redeclared without dllimport attribute: previous
	dllimport ignored warnings.
	* package_message.h (display): Fix 'exit' was not declared in this
	scope error.

Index: Makefile.am
===
RCS file: /cvs/cygwin-apps/setup/Makefile.am,v
retrieving revision 2.81
diff -u -r2.81 Makefile.am
--- Makefile.am	8 Apr 2010 15:50:38 -	2.81
+++ Makefile.am	23 Jul 2010 17:01:14 -
@@ -114,7 +114,7 @@
 	libinilex.a \
 	libgetopt++/libgetopt++.la -lgcrypt -lgpg-error \
 	-lshlwapi -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -llzma -lbz2 -lz 
-setup_LDFLAGS = -mwindows -Wl,-static -static-libtool-libs
+setup_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
 setup_SOURCES = \
 	AntiVirus.cc \
 	AntiVirus.h \
@@ -283,6 +283,9 @@
 	libmd5-rfc/md5.c \
 	libmd5-rfc/md5.h
 
+# autoload code does not optimize well
+autoload.o: CFLAGS += -O0
+
 VER := $(shell sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
$(srcdir)/ChangeLog)
 
Index: localdir.cc
===
RCS file: /cvs/cygwin-apps/setup/localdir.cc,v
retrieving revision 2.36
diff -u -r2.36 localdir.cc
--- localdir.cc	2 Feb 2010 17:28:10 -	2.36
+++ localdir.cc	23 Jul 2010 17:01:14 -
@@ -152,12 +152,14 @@
 	SendMessage (h, BFFM_SETSELECTION, TRUE, (LPARAM) local_dir.c_str());
   break;
 case BFFM_SELCHANGED:
-  // Make a note of each new dir we successfully select, so that
-  // we know where to create the new directory if an invalid name
-  // is entered in the text box.
-  LPITEMIDLIST pidl = reinterpret_castLPITEMIDLIST(lp);
-  SHGetPathFromIDList (pidl, dirname);
-  break;
+  {
+// Make a note of each new dir we successfully select, so that
+// we know where to create the new directory if an invalid name
+// is entered in the text box.
+LPITEMIDLIST pidl = reinterpret_castLPITEMIDLIST(lp);
+SHGetPathFromIDList (pidl, dirname);
+break;
+  }
 case BFFM_VALIDATEFAILED:
   // See if user wants to create a dir in the last successfully-selected.
   CHAR tempname[MAX_PATH];
Index: mklink2.cc
===
RCS file: /cvs/cygwin-apps/setup/mklink2.cc,v
retrieving revision 2.11
diff -u -r2.11 mklink2.cc
--- mklink2.cc	18 Dec 2009 11:59:54 -	2.11
+++ mklink2.cc	23 Jul 2010 17:01:14 -
@@ -111,7 +111,7 @@
 			: mkcygsymlink_9x (from, to);
 }
 
-struct {
+static struct {
   FILE_LINK_INFORMATION fli;
   WCHAR namebuf[32768];
 } sfli;
Index: ntdll.h
===
RCS file: /cvs/cygwin-apps/setup/ntdll.h,v
retrieving revision 2.2
diff -u -r2.2 ntdll.h
--- ntdll.h	13 May 2009 11:28:34 -	2.2
+++ ntdll.h	23 Jul 2010 17:01:14 -
@@ -14,6 +14,8 @@
 #ifndef SETUP_NTDLL_H
 #define SETUP_NTDLL_H
 
+#define NTOSAPI
+
 #include ddk/ntapi.h
 #include ddk/ntifs.h
 
Index: package_message.h
===
RCS file: /cvs/cygwin-apps/setup/package_message.h,v
retrieving revision 1.2
diff -u -r1.2 package_message.h
--- package_message.h	22 Dec 2009 16:19:51 -	1.2
+++ package_message.h	23 Jul 2010 17:01:14 -
@@ -15,6 +15,7 @@
 
 #include UserSettings.h
 #include state.h
+#include stdlib.h
 #include windows.h
 
 class packagemessage


Re: [PATCH] setup: gcc-4.x compatibility

2010-08-10 Thread Christopher Faylor
On Tue, Aug 10, 2010 at 02:46:11PM -0500, Yaakov (Cygwin/X) wrote:
This patch fixes several issues compiling setup.exe with gcc-4.x while
retaining compatibility with gcc-3.4, as tested with gcc-mingw-3.4.4-999
and my mingw-gcc-4.5.1 sample build.  Once we switch to a proper
mingw-gcc cross-compiler, the only change that will need to be made is
to CC/CXX in doconfigure.

OK to apply?

Yes.  Thanks.

cgf


Re: ITP: rtorret, libtorrent, libsigc++

2010-08-10 Thread Chris Sutcliffe
On 10 August 2010 14:03, Yaakov (Cygwin/X) wrote:
 Can you please make the naming of these packages match those in Ports so
 that I don't have to adjust all my packages unnecessarily?

I've repackaged libsigc++2.0 as libsigc2.0:

libsigc2.0-2.2.8-1:

wget -x -nH --cut-dirs=1 \
http://emergedesktop.org/cygwin/libsigc/setup.hint \
http://emergedesktop.org/cygwin/libsigc/libsigc2.0-2.2.8-1-src.tar.bz2 \
http://emergedesktop.org/cygwin/libsigc/libsigc2.0-2.2.8-1.tar.bz2 \
http://emergedesktop.org/cygwin/libsigc/libsigc2.0_0/setup.hint \
http://emergedesktop.org/cygwin/libsigc/libsigc2.0_0/libsigc++2.0_0-2.2.8-1.tar.bz2
\
http://emergedesktop.org/cygwin/libsigc/libsigc2.0-devel/setup.hint \
http://emergedesktop.org/cygwin/libsigc/libsigc2.0-devel/libsigc++2.0-devel-2.2.8-1.tar.bz2
\
http://emergedesktop.org/cygwin/libsigc/libsigc2.0-doc/setup.hint \
http://emergedesktop.org/cygwin/libsigc/libsigc2.0-doc/libsigc++2.0-doc-2.2.8-1.tar.bz2

libtorrent-0.12.6-1:

wget -x -nH --cut-dirs=1 \
http://emergedesktop.org/cygwin/libtorrent/setup.hint \
http://emergedesktop.org/cygwin/libtorrent/libtorrent-0.12.6-1-src.tar.bz2 \
http://emergedesktop.org/cygwin/libtorrent/libtorrent-0.12.6-1.tar.bz2 \
http://emergedesktop.org/cygwin/libtorrent/libtorrent11/setup.hint \
http://emergedesktop.org/cygwin/libtorrent/libtorrent11/libtorrent11-0.12.6-1.tar.bz2
\
http://emergedesktop.org/cygwin/libtorrent/libtorrent-devel/setup.hint \
http://emergedesktop.org/cygwin/libtorrent/libtorrent-devel/libtorrent-devel-0.12.6-1.tar.bz2

rtorrent-0.8.6-1:

wget -x -nH --cut-dirs=1 \
http://emergedesktop.org/cygwin/rtorrent/setup.hint \
http://emergedesktop.org/cygwin/rtorrent/rtorrent-0.8.6-1-src.tar.bz2 \
http://emergedesktop.org/cygwin/rtorrent/rtorrent-0.8.6-1.tar.bz2

Please let me know if there any additional changes required.

Thank you,

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d


[PATCH] setup: build enhancements

2010-08-10 Thread Yaakov (Cygwin/X)
This patch for setup contains a few build-system enhancements:

* Bail out of configure if prereqs are missing.  I decided to check for
headers instead of libs to avoid possible stdcall issues with the
latter.  I'm not sure whether this will make such a difference with
gcc-3 -mno-cygwin (which IIUC is susceptible to find the native
versions' headers in /usr/include instead), but it will when proper
cross-compilers are out.

* Make doconfigure re-bootstrap if configure.in is newer than configure.
Otherwise once you configure, make will essentially autoreconf and run
configure a second time.

* Remove the special inilex.ll handling by solving the warning which
made it necessary.  Probably requires a new-ish flex.  If future
versions of flex or gcc don't get along with -Werror and can't be fixed
with flex %option's, an easier (and slightly faster) fix would be to
(similar to autoload.c handling):

inilex.o: CXXFLAGS += -Wno-unused-function

With the flex %option, inilex.o compiles with both gcc-mingw-3.4.4-999
and my mingw-gcc-4.5.1.


Yaakov

2010-08-10  Yaakov Selkowitz  yselkow...@users.sourceforge.net

	* configure.in: Check for prerequisites' headers.
	* doconfigure: Run bootstrap.sh if configure.in is newer than
	configure.
	* Makefile.am: Remove libinilex.a library, instead...
	(inilint_SOURCES): Add inilex.ll. (setup_SOURCES): Ditto.
	* inilex.ll: Use option nounput to avoid defined but not used
	warning from yyunput().

Index: configure.in
===
RCS file: /cvs/cygwin-apps/setup/configure.in,v
retrieving revision 2.25
diff -u -r2.25 configure.in
--- configure.in	30 Mar 2010 23:55:15 -	2.25
+++ configure.in	10 Aug 2010 21:40:12 -
@@ -70,6 +70,15 @@
 		 string \
 		 string.h )
 
+AC_CHECK_HEADER(zlib.h, , missing_deps=$missing_deps zlib)
+AC_CHECK_HEADER(bzlib.h, , missing_deps=$missing_deps libbz2)
+AC_CHECK_HEADER(lzma.h, , missing_deps=$missing_deps liblzma)
+AC_CHECK_HEADER(gcrypt.h, , missing_deps=$missing_deps libgcrypt)
+
+if test -n $missing_deps; then
+	AC_MSG_ERROR([missing prerequisites: $missing_deps])
+fi
+
 prefix=`pwd`/inst; mkdir -p $prefix
 exec_prefix=$prefix
 ac_configure_args=$ac_configure_args --disable-shared
Index: doconfigure
===
RCS file: /cvs/cygwin-apps/setup/doconfigure,v
retrieving revision 2.2
diff -u -r2.2 doconfigure
--- doconfigure	30 Mar 2010 23:55:15 -	2.2
+++ doconfigure	11 Aug 2010 01:10:57 -
@@ -4,7 +4,7 @@
 DIR=`dirname $0`
 
 # Autotool Bootstrap
-if [ ! -f $DIR/configure ]; then
+if [ ! -f $DIR/configure ] || [ $DIR/configure.in -nt $DIR/configure ]; then
   echo -e \033[32;1mRunning $DIR/bootstrap.sh\033[0m
   ( cd $DIR  ./bootstrap.sh )
 fi
Index: Makefile.am
===
RCS file: /cvs/cygwin-apps/setup/Makefile.am,v
retrieving revision 2.84
diff -u -r2.84 Makefile.am
--- Makefile.am	10 Aug 2010 20:38:00 -	2.84
+++ Makefile.am	11 Aug 2010 01:14:08 -
@@ -74,7 +74,7 @@
 endif
 
 inilint_LDADD = \
-	libinilex.a libgetopt++/libgetopt++.la
+	libgetopt++/libgetopt++.la
 inilint_SOURCES = \
 	filemanip.cc \
 	filemanip.h \
@@ -86,6 +86,7 @@
 	LogSingleton.h \
 	IniDBBuilder.h \
 	inilintmain.cc \
+	inilex.ll \
 	iniparse.yy \
 	IniParseFeedback.cc \
 	IniParseFeedback.h \
@@ -105,13 +106,7 @@
 	String++.h \
 	$(inilint_extras)
 
-# workaround to allow omitting -Werror on inilex.cc.
-noinst_LIBRARIES = libinilex.a
-libinilex_a_SOURCES = inilex.ll
-libinilex_a_CXXFLAGS = $(BASECXXFLAGS)
-
 setup_LDADD = \
-	libinilex.a \
 	libgetopt++/libgetopt++.la -lgcrypt -lgpg-error \
 	-lshlwapi -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -llzma -lbz2 -lz 
 setup_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
@@ -170,6 +165,7 @@
 	IniDBBuilder.h \
 	IniDBBuilderPackage.cc \
 	IniDBBuilderPackage.h \
+	inilex.ll \
 	iniparse.yy \
 	IniParseFeedback.cc \
 	IniParseFeedback.h \
Index: inilex.ll
===
RCS file: /cvs/cygwin-apps/setup/inilex.ll,v
retrieving revision 1.3
diff -u -r1.3 inilex.ll
--- inilex.ll	30 Jul 2010 14:02:34 -	1.3
+++ inilex.ll	11 Aug 2010 01:14:08 -
@@ -35,6 +35,7 @@
 %}
 
 /*%option debug */
+%option nounput
 %option noyywrap
 %option yylineno
 %option never-interactive