/pidgin/main: 2b4af2e09a67: Update windows build to use perl 5.2...

Daniel Atallah datallah at pidgin.im
Thu Jan 1 19:56:46 EST 2015


Changeset: 2b4af2e09a67e0337e79690abcfb26f9e8908870
Author:	 Daniel Atallah <datallah at pidgin.im>
Date:	 2015-01-01 19:40 -0500
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/2b4af2e09a67

Description:

Update windows build to use perl 5.20.1. Thanks to Renato Silva for much of this. Fixes #15599

 * Remove the stuff for looking up ActivePerl (and MIT Kerberos) at startup and installation

diffstat:

 COPYRIGHT                                    |   1 +
 ChangeLog                                    |   3 +-
 libpurple/plugins/perl/Makefile.mingw        |   6 +-
 libpurple/plugins/perl/common/Makefile.mingw |   6 +-
 libpurple/plugins/perl/common/module.h       |   1 -
 libpurple/plugins/perl/perl-common.h         |   1 -
 libpurple/win32/global.mak                   |   2 +-
 pidgin/plugins/perl/common/Makefile.mingw    |   6 +-
 pidgin/win32/nsis/pidgin-installer.nsi       |  16 ------
 pidgin/win32/winpidgin.c                     |  74 ----------------------------
 10 files changed, 13 insertions(+), 103 deletions(-)

diffs (258 lines):

diff --git a/COPYRIGHT b/COPYRIGHT
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -504,6 +504,7 @@ Michael Shkutkov
 Shreevatsa R
 Dylan Simon <dylan at dylex.net>
 Ettore Simone
+Renato Silva
 John Silvestri
 Mukund Sivaraman
 Craig Slusher
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,9 +3,10 @@ Pidgin and Finch: The Pimpin' Penguin IM
 version 2.10.12 (MM/DD/YY):
 	Windows-Specific Changes:
 	* Updates to dependencies:
-	        * Cyrus SASL 2.1.26
+		* Cyrus SASL 2.1.26
 		* NSS 3.17.3 and NSPR 4.10.7
 		* SILC 1.1.12
+		* Perl 5.20.1
 
 version 2.10.11 (11/23/14):
 	General:
diff --git a/libpurple/plugins/perl/Makefile.mingw b/libpurple/plugins/perl/Makefile.mingw
--- a/libpurple/plugins/perl/Makefile.mingw
+++ b/libpurple/plugins/perl/Makefile.mingw
@@ -27,11 +27,11 @@ INCLUDE_PATHS +=	-I. \
 			-I$(GTK_TOP)/include \
 			-I$(GTK_TOP)/include/glib-2.0 \
 			-I$(GTK_TOP)/lib/glib-2.0/include \
-			-I$(PERL_LIB_TOP)/CORE
+			-I$(PERL_LIB_TOP)/lib/CORE
 
 LIB_PATHS +=		-L$(GTK_TOP)/lib \
 			-L$(PURPLE_TOP) \
-			-L$(PERL_LIB_TOP)
+			-L$(PERL_LIB_TOP)/lib/CORE
 
 ##
 ##  SOURCES, OBJECTS
@@ -52,7 +52,7 @@ LIBS =	\
 			-lws2_32 \
 			-lintl \
 			-lpurple \
-			-lperl510
+			-lperl520
 
 include $(PIDGIN_COMMON_RULES)
 
diff --git a/libpurple/plugins/perl/common/Makefile.mingw b/libpurple/plugins/perl/common/Makefile.mingw
--- a/libpurple/plugins/perl/common/Makefile.mingw
+++ b/libpurple/plugins/perl/common/Makefile.mingw
@@ -28,9 +28,9 @@ INCLUDE_PATHS +=		-I. \
 			-I$(GTK_TOP)/include \
 			-I$(GTK_TOP)/include/glib-2.0 \
 			-I$(GTK_TOP)/lib/glib-2.0/include \
-			-I$(PERL_LIB_TOP)/CORE
+			-I$(PERL_LIB_TOP)/lib/CORE
 
-LIB_PATHS += 		-L$(PERL_LIB_TOP) \
+LIB_PATHS += 		-L$(PERL_LIB_TOP)/lib/CORE \
 			-L$(PERL_PLUGIN_TOP) \
 			-L$(PURPLE_TOP) \
 			-L$(GTK_TOP)/lib
@@ -84,7 +84,7 @@ OBJECTS = $(C_FILES:%.c=%.o)
 ##
 ## LIBRARIES
 ##
-LIBS =			-lperl510 \
+LIBS =			-lperl520 \
 			-lperl \
 			-lpurple \
 			-lglib-2.0
diff --git a/libpurple/plugins/perl/common/module.h b/libpurple/plugins/perl/common/module.h
--- a/libpurple/plugins/perl/common/module.h
+++ b/libpurple/plugins/perl/common/module.h
@@ -9,7 +9,6 @@ typedef struct group *Purple__Group;
 #include <glib.h>
 #ifdef _WIN32
 #undef pipe
-#undef STRINGIFY
 #endif
 
 #define SILENT_NO_TAINT_SUPPORT 0
diff --git a/libpurple/plugins/perl/perl-common.h b/libpurple/plugins/perl/perl-common.h
--- a/libpurple/plugins/perl/perl-common.h
+++ b/libpurple/plugins/perl/perl-common.h
@@ -3,7 +3,6 @@
 
 #include <glib.h>
 #ifdef _WIN32
-#undef STRINGIFY
 #undef pipe
 #endif
 
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -17,7 +17,7 @@ GTK_BIN ?= $(GTK_TOP)/bin
 LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.9.0
 MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2_daa3
 NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.17.3-nspr-4.10.7
-PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.10.0
+PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.20.1.1
 SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.12
 TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5
 GSTREAMER_TOP ?= $(WIN32_DEV_TOP)/gstreamer-0.10.13
diff --git a/pidgin/plugins/perl/common/Makefile.mingw b/pidgin/plugins/perl/common/Makefile.mingw
--- a/pidgin/plugins/perl/common/Makefile.mingw
+++ b/pidgin/plugins/perl/common/Makefile.mingw
@@ -33,9 +33,9 @@ INCLUDE_PATHS =		-I. \
 			-I$(GTK_TOP)/include/pango-1.0 \
 			-I$(GTK_TOP)/lib/glib-2.0/include \
 			-I$(GTK_TOP)/lib/gtk-2.0/include \
-			-I$(PERL_LIB_TOP)/CORE
+			-I$(PERL_LIB_TOP)/lib/CORE
 
-LIB_PATHS += 		-L$(PERL_LIB_TOP) \
+LIB_PATHS += 		-L$(PERL_LIB_TOP)/lib/CORE \
 			-L$(PURPLE_TOP) \
 			-L$(PIDGIN_TOP) \
 			-L$(PURPLE_PERL_TOP) \
@@ -77,7 +77,7 @@ OBJECTS = $(C_FILES:%.c=%.o)
 ##
 ## LIBRARIES
 ##
-LIBS =			-lperl510 \
+LIBS =			-lperl520 \
 			-lperl \
 			-lpurple \
 			-lpidgin \
diff --git a/pidgin/win32/nsis/pidgin-installer.nsi b/pidgin/win32/nsis/pidgin-installer.nsi
--- a/pidgin/win32/nsis/pidgin-installer.nsi
+++ b/pidgin/win32/nsis/pidgin-installer.nsi
@@ -67,8 +67,6 @@ RequestExecutionLevel highest
 !define PIDGIN_UNINST_EXE			"pidgin-uninst.exe"
 
 !define GTK_MIN_VERSION				"2.14.0"
-!define PERL_REG_KEY				"SOFTWARE\Perl"
-!define PERL_DLL				"perl510.dll"
 
 !define DOWNLOADER_URL				"https://pidgin.im/win32/download_redir.php?version=${PIDGIN_VERSION}"
 
@@ -343,20 +341,6 @@ Section $(PIDGINSECTIONTITLE) SecPidgin
 
     File /r /x locale /x Gtk ..\..\..\${PIDGIN_INSTALL_DIR}\*.*
 
-    ; Check if Perl is installed, if so add it to the AppPaths
-    ReadRegStr $R2 HKLM ${PERL_REG_KEY} ""
-    StrCmp $R2 "" 0 perl_exists
-      ReadRegStr $R2 HKCU ${PERL_REG_KEY} ""
-      StrCmp $R2 "" perl_done perl_exists
-
-      perl_exists:
-        IfFileExists "$R2\bin\${PERL_DLL}" 0 perl_done
-        StrCmp $R0 "HKLM" 0 perl_done
-          ReadRegStr $R3 HKLM "${HKLM_APP_PATHS_KEY}" "Path"
-          WriteRegStr HKLM "${HKLM_APP_PATHS_KEY}" "Path" "$R3;$R2\bin"
-
-    perl_done:
-
     SetOutPath "$INSTDIR"
 
     ; If we don't have install rights we're done
diff --git a/pidgin/win32/winpidgin.c b/pidgin/win32/winpidgin.c
--- a/pidgin/win32/winpidgin.c
+++ b/pidgin/win32/winpidgin.c
@@ -420,78 +420,6 @@ static void winpidgin_set_locale() {
 	_wputenv(envstr);
 }
 
-
-static void winpidgin_add_stuff_to_path() {
-	wchar_t perl_path[MAX_PATH + 1];
-	wchar_t *ppath = NULL;
-	wchar_t mit_kerberos_path[MAX_PATH + 1];
-	wchar_t *mpath = NULL;
-	DWORD plen;
-
-	printf("%s", "Looking for Perl... ");
-
-	plen = sizeof(perl_path) / sizeof(wchar_t);
-	if (read_reg_string(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Perl", L"",
-			    (LPBYTE) &perl_path, &plen)) {
-		/* We *could* check for perl510.dll, but it seems unnecessary. */
-		wprintf(L"found in '%s'.\n", perl_path);
-
-		if (perl_path[wcslen(perl_path) - 1] != L'\\')
-			wcscat(perl_path, L"\\");
-		wcscat(perl_path, L"bin");
-
-		ppath = perl_path;
-	} else
-		printf("%s", "not found.\n");
-
-	printf("%s", "Looking for MIT Kerberos... ");
-
-	plen = sizeof(mit_kerberos_path) / sizeof(wchar_t);
-	if (read_reg_string(HKEY_LOCAL_MACHINE, L"SOFTWARE\\MIT\\Kerberos", L"InstallDir",
-			    (LPBYTE) &mit_kerberos_path, &plen)) {
-		/* We *could* check for gssapi32.dll */
-		wprintf(L"found in '%s'.\n", mit_kerberos_path);
-
-		if (mit_kerberos_path[wcslen(mit_kerberos_path) - 1] != L'\\')
-			wcscat(mit_kerberos_path, L"\\");
-		wcscat(mit_kerberos_path, L"bin");
-
-		mpath = mit_kerberos_path;
-	} else
-		printf("%s", "not found.\n");
-
-	if (ppath != NULL || mpath != NULL) {
-		const wchar_t *path = _wgetenv(L"PATH");
-		BOOL add_ppath = ppath != NULL && (path == NULL || !wcsstr(path, ppath));
-		BOOL add_mpath = mpath != NULL && (path == NULL || !wcsstr(path, mpath));
-		wchar_t *newpath;
-		int newlen;
-
-		if (add_ppath || add_mpath) {
-			/* Enough to add "PATH=" + path + ";"  + ppath + ";" + mpath + \0 */
-			newlen = 6 + (path ? wcslen(path) + 1 : 0);
-			if (add_ppath)
-				newlen += wcslen(ppath) + 1;
-			if (add_mpath)
-				newlen += wcslen(mpath) + 1;
-			newpath = malloc(newlen * sizeof(wchar_t));
-
-			_snwprintf(newpath, newlen, L"PATH=%s%s%s%s%s%s",
-				  path ? path : L"",
-				  path ? L";" : L"",
-				  add_ppath ? ppath : L"",
-				  add_ppath ? L";" : L"",
-				  add_mpath ? mpath : L"",
-				  add_mpath ? L";" : L"");
-
-			wprintf(L"New PATH: %s\n", newpath);
-
-			_wputenv(newpath);
-			free(newpath);
-		}
-	}
-}
-
 #define PIDGIN_WM_FOCUS_REQUEST (WM_APP + 13)
 #define PIDGIN_WM_PROTOCOL_HANDLE (WM_APP + 14)
 
@@ -769,8 +697,6 @@ WinMain (struct HINSTANCE__ *hInstance, 
 
 	winpidgin_set_locale();
 
-	winpidgin_add_stuff_to_path();
-
 	/* If help, version or multiple flag used, do not check Mutex */
 	if (!help && !version)
 		if (!winpidgin_set_running(getenv("PIDGIN_MULTI_INST") == NULL && !multiple))



More information about the Commits mailing list