/pidgin/main: c83a09a6e3d5: Fix legacy win32 build

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Apr 23 21:15:44 EDT 2014


Changeset: c83a09a6e3d5dad5bcc3507b11edc6a318864207
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-24 03:15 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/c83a09a6e3d5

Description:

Fix legacy win32 build

diffstat:

 configure.ac                     |  2 +-
 libpurple/Makefile.mingw         |  4 ++++
 libpurple/win32/global.mak       |  7 +++++++
 libpurple/win32/libc_interface.h |  3 ++-
 pidgin/Makefile.mingw            |  8 ++++++++
 5 files changed, 22 insertions(+), 2 deletions(-)

diffs (81 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -142,7 +142,7 @@ case "$host" in
 			non-autotools win32 build working. Drop it when we fully
 			switch our win32 build to autotools.])
 		AC_DEFINE(WIN32_LEAN_AND_MEAN, 1,
-			[Define to 1, to build faster on win32.])
+			[Define to 1, to build faster for win32.])
 		;;
 	*)
 		is_win32="no"
diff --git a/libpurple/Makefile.mingw b/libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw
+++ b/libpurple/Makefile.mingw
@@ -209,6 +209,10 @@ install: install_shallow all
 ./win32/libpurplerc.rc: ./win32/libpurplerc.rc.in $(PIDGIN_TREE_TOP)/VERSION
 	@echo -e "  GEN\t$@"
 	@sed -e 's/@PURPLE_VERSION@/$(PURPLE_VERSION)/g' \
+		-e 's/@PURPLE_MAJOR_VERSION@/$(PURPLE_MAJOR_VERSION)/g' \
+		-e 's/@PURPLE_MINOR_VERSION@/$(PURPLE_MINOR_VERSION)/g' \
+		-e 's/@PURPLE_MICRO_VERSION@/$(PURPLE_MICRO_VERSION)/g' \
+		-e 's/@PURPLE_API_VERSION@/$(PURPLE_API_VERSION)/g' \
 	    $@.in > $@
 
 $(OBJECTS): $(PURPLE_CONFIG_H) $(PURPLE_VERSION_H) $(PURPLE_PURPLE_H)
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -8,6 +8,13 @@
 #include optional $(PIDGIN_TREE_TOP)/local.mak to allow overriding of any definitions
 -include $(PIDGIN_TREE_TOP)/local.mak
 
+# TODO: we should do parsing like for PURPLE_VERSION, if we won't drop
+# Makefile.mingw files before 3.0.0 release
+PURPLE_MAJOR_VERSION := 3
+PURPLE_MINOR_VERSION := 0
+PURPLE_MICRO_VERSION := 0
+PURPLE_API_VERSION := 20
+
 # Locations of our various dependencies
 WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP)/../win32-dev
 GTKSPELL_TOP ?= $(WIN32_DEV_TOP)/gtkspell-2.0
diff --git a/libpurple/win32/libc_interface.h b/libpurple/win32/libc_interface.h
--- a/libpurple/win32/libc_interface.h
+++ b/libpurple/win32/libc_interface.h
@@ -136,7 +136,8 @@ wpurple_gethostname( name, size )
 wpurple_gettimeofday( timeval, timezone )
 
 /* stdio.h */
-#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3
+#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3 || \
+	!defined(IS_WIN32_CROSS_COMPILED)
 #  undef snprintf
 #  define snprintf _snprintf
 #  undef vsnprintf
diff --git a/pidgin/Makefile.mingw b/pidgin/Makefile.mingw
--- a/pidgin/Makefile.mingw
+++ b/pidgin/Makefile.mingw
@@ -153,6 +153,10 @@ gtkdialogs.c: $(PIDGIN_REVISION_H)
 win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
 	@echo -e "  GEN\t$@"
 	@sed -e 's/@PURPLE_VERSION@/$(PIDGIN_VERSION)/g' \
+		-e 's/@PURPLE_MAJOR_VERSION@/$(PURPLE_MAJOR_VERSION)/g' \
+		-e 's/@PURPLE_MINOR_VERSION@/$(PURPLE_MINOR_VERSION)/g' \
+		-e 's/@PURPLE_MICRO_VERSION@/$(PURPLE_MICRO_VERSION)/g' \
+		-e 's/@PURPLE_API_VERSION@/$(PURPLE_API_VERSION)/g' \
 	    $@.in > $@
 
 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
@@ -168,6 +172,10 @@ install: install_shallow all
 win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
 	@echo -e "  GEN\t$@"
 	@sed -e 's/@PURPLE_VERSION@/$(PIDGIN_VERSION)/g' \
+		-e 's/@PURPLE_MAJOR_VERSION@/$(PURPLE_MAJOR_VERSION)/g' \
+		-e 's/@PURPLE_MINOR_VERSION@/$(PURPLE_MINOR_VERSION)/g' \
+		-e 's/@PURPLE_MICRO_VERSION@/$(PURPLE_MICRO_VERSION)/g' \
+		-e 's/@PURPLE_API_VERSION@/$(PURPLE_API_VERSION)/g' \
 	    $@.in > $@
 
 $(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)



More information about the Commits mailing list